master-components-react 3.5.36 → 3.5.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,21 +44,21 @@ React keys must be passed directly to JSX without using spread:
44
44
  ${un.popupContainer}
45
45
  ${i!=null&&i.type?un.withOptions:""}
46
46
  ${o==="horizontal"?un.horizontal:""}
47
- `,children:[I.jsx("div",{className:un.closeButton,style:h??{},onClick:m,children:I.jsx(Ou,{width:"24",height:"24",viewBox:"0 0 24 24",d:"M18 6L6 18M6 6L18 18",stroke:"#A4A7AE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})}),((i==null?void 0:i.title)||(i==null?void 0:i.description)||(i==null?void 0:i.type))&&I.jsxs("div",{className:`${un.popupHeader}`,style:d??{},children:[p()&&I.jsx("div",{className:un.typeIcon,children:I.jsx("div",{style:{backgroundColor:(i==null?void 0:i.type)==="success"?"#DCFAE6":(i==null?void 0:i.type)==="unsaved"?"#FEF0C7":"#FEE4E2"},className:un.icon,children:p()})}),i&&(i==null?void 0:i.title)&&I.jsx("div",{className:un.popupTitle,children:I.jsxs("h2",{style:c??{},children:[" ",(i==null?void 0:i.title)??""," "]})}),i&&(i==null?void 0:i.description)&&I.jsx("div",{className:un.popupDescription,children:I.jsxs("p",{children:[" ",(i==null?void 0:i.description)??""," "]})})]}),I.jsxs("div",{className:un.templateWrapper,style:u??{},children:[t&&t(),n&&n]})]})})},OP="FilterWithTags-module__compWrapper",RP="FilterWithTags-module__filterButton",kP="FilterWithTags-module__filter",BP="FilterWithTags-module__resultNumber",LP="FilterWithTags-module__filterCont",PP="FilterWithTags-module__title",FP="FilterWithTags-module__renderComponent",MP="FilterWithTags-module__footer",VP="FilterWithTags-module__clear",NP="FilterWithTags-module__buttonsWrapper",$P="FilterWithTags-module__tag",HP="FilterWithTags-module__checkbox",WP="FilterWithTags-module__showButton",zP="FilterWithTags-module__dark",pi={compWrapper:OP,filterButton:RP,filter:kP,resultNumber:BP,filterCont:LP,title:PP,renderComponent:FP,footer:MP,clear:VP,buttonsWrapper:NP,tag:$P,checkbox:HP,showButton:WP,dark:zP},GP="TimePicker-module__timepickerWrapper",UP="TimePicker-module__timepickerLabel",KP="TimePicker-module__required",jP="TimePicker-module__timepicker",qP="TimePicker-module__sm",YP="TimePicker-module__md",XP="TimePicker-module__focused",ZP="TimePicker-module__error",JP="TimePicker-module__disabled",QP="TimePicker-module__dropdownList",eF="TimePicker-module__selected",tF="TimePicker-module__timepickerHelperText",iF="TimePicker-module__dark",Ji={timepickerWrapper:GP,timepickerLabel:UP,required:KP,timepicker:jP,sm:qP,md:YP,focused:XP,error:ZP,disabled:JP,dropdownList:QP,selected:eF,timepickerHelperText:tF,dark:iF};var wI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Nt,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",d="week",c="month",h="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var z=["th","st","nd","rd"],ie=x%100;return"["+x+(z[(ie-20)%10]||z[ie]||z[0])+"]"}},A=function(x,z,ie){var ne=String(x);return!ne||ne.length>=z?x:""+Array(z+1-ne.length).join(ie)+x},B={s:A,z:function(x){var z=-x.utcOffset(),ie=Math.abs(z),ne=Math.floor(ie/60),pe=ie%60;return(z<=0?"+":"-")+A(ne,2,"0")+":"+A(pe,2,"0")},m:function x(z,ie){if(z.date()<ie.date())return-x(ie,z);var ne=12*(ie.year()-z.year())+(ie.month()-z.month()),pe=z.clone().add(ne,c),le=ie-pe<0,J=z.clone().add(ne+(le?-1:1),c);return+(-(ne+(ie-pe)/(le?pe-J:J-pe))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:c,y:f,w:d,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},D="en",U={};U[D]=b;var H="$isDayjsObject",W=function(x){return x instanceof N||!(!x||!x[H])},G=function x(z,ie,ne){var pe;if(!z)return D;if(typeof z=="string"){var le=z.toLowerCase();U[le]&&(pe=le),ie&&(U[le]=ie,pe=le);var J=z.split("-");if(!pe&&J.length>1)return x(J[0])}else{var K=z.name;U[K]=z,pe=K}return!ne&&pe&&(D=pe),pe||!ne&&D},j=function(x,z){if(W(x))return x.clone();var ie=typeof z=="object"?z:{};return ie.date=x,ie.args=arguments,new N(ie)},te=B;te.l=G,te.i=W,te.w=function(x,z){return j(x,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function x(ie){this.$L=G(ie.locale,null,!0),this.parse(ie),this.$x=this.$x||ie.x||{},this[H]=!0}var z=x.prototype;return z.parse=function(ie){this.$d=function(ne){var pe=ne.date,le=ne.utc;if(pe===null)return new Date(NaN);if(te.u(pe))return new Date;if(pe instanceof Date)return new Date(pe);if(typeof pe=="string"&&!/Z$/i.test(pe)){var J=pe.match(g);if(J){var K=J[2]-1||0,y=(J[7]||"0").substring(0,3);return le?new Date(Date.UTC(J[1],K,J[3]||1,J[4]||0,J[5]||0,J[6]||0,y)):new Date(J[1],K,J[3]||1,J[4]||0,J[5]||0,J[6]||0,y)}}return new Date(pe)}(ie),this.init()},z.init=function(){var ie=this.$d;this.$y=ie.getFullYear(),this.$M=ie.getMonth(),this.$D=ie.getDate(),this.$W=ie.getDay(),this.$H=ie.getHours(),this.$m=ie.getMinutes(),this.$s=ie.getSeconds(),this.$ms=ie.getMilliseconds()},z.$utils=function(){return te},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(ie,ne){var pe=j(ie);return this.startOf(ne)<=pe&&pe<=this.endOf(ne)},z.isAfter=function(ie,ne){return j(ie)<this.startOf(ne)},z.isBefore=function(ie,ne){return this.endOf(ne)<j(ie)},z.$g=function(ie,ne,pe){return te.u(ie)?this[ne]:this.set(pe,ie)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(ie,ne){var pe=this,le=!!te.u(ne)||ne,J=te.p(ie),K=function(Q,oe){var ge=te.w(pe.$u?Date.UTC(pe.$y,oe,Q):new Date(pe.$y,oe,Q),pe);return le?ge:ge.endOf(u)},y=function(Q,oe){return te.w(pe.toDate()[Q].apply(pe.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(oe)),pe)},T=this.$W,S=this.$M,O=this.$D,P="set"+(this.$u?"UTC":"");switch(J){case f:return le?K(1,0):K(31,11);case c:return le?K(1,S):K(0,S+1);case d:var M=this.$locale().weekStart||0,$=(T<M?T+7:T)-M;return K(le?O-$:O+(6-$),S);case u:case p:return y(P+"Hours",0);case l:return y(P+"Minutes",1);case s:return y(P+"Seconds",2);case o:return y(P+"Milliseconds",3);default:return this.clone()}},z.endOf=function(ie){return this.startOf(ie,!1)},z.$set=function(ie,ne){var pe,le=te.p(ie),J="set"+(this.$u?"UTC":""),K=(pe={},pe[u]=J+"Date",pe[p]=J+"Date",pe[c]=J+"Month",pe[f]=J+"FullYear",pe[l]=J+"Hours",pe[s]=J+"Minutes",pe[o]=J+"Seconds",pe[a]=J+"Milliseconds",pe)[le],y=le===u?this.$D+(ne-this.$W):ne;if(le===c||le===f){var T=this.clone().set(p,1);T.$d[K](y),T.init(),this.$d=T.set(p,Math.min(this.$D,T.daysInMonth())).$d}else K&&this.$d[K](y);return this.init(),this},z.set=function(ie,ne){return this.clone().$set(ie,ne)},z.get=function(ie){return this[te.p(ie)]()},z.add=function(ie,ne){var pe,le=this;ie=Number(ie);var J=te.p(ne),K=function(S){var O=j(le);return te.w(O.date(O.date()+Math.round(S*ie)),le)};if(J===c)return this.set(c,this.$M+ie);if(J===f)return this.set(f,this.$y+ie);if(J===u)return K(1);if(J===d)return K(7);var y=(pe={},pe[s]=n,pe[l]=r,pe[o]=i,pe)[J]||1,T=this.$d.getTime()+ie*y;return te.w(T,this)},z.subtract=function(ie,ne){return this.add(-1*ie,ne)},z.format=function(ie){var ne=this,pe=this.$locale();if(!this.isValid())return pe.invalidDate||m;var le=ie||"YYYY-MM-DDTHH:mm:ssZ",J=te.z(this),K=this.$H,y=this.$m,T=this.$M,S=pe.weekdays,O=pe.months,P=pe.meridiem,M=function(oe,ge,ee,xe){return oe&&(oe[ge]||oe(ne,le))||ee[ge].slice(0,xe)},$=function(oe){return te.s(K%12||12,oe,"0")},Q=P||function(oe,ge,ee){var xe=oe<12?"AM":"PM";return ee?xe.toLowerCase():xe};return le.replace(C,function(oe,ge){return ge||function(ee){switch(ee){case"YY":return String(ne.$y).slice(-2);case"YYYY":return te.s(ne.$y,4,"0");case"M":return T+1;case"MM":return te.s(T+1,2,"0");case"MMM":return M(pe.monthsShort,T,O,3);case"MMMM":return M(O,T);case"D":return ne.$D;case"DD":return te.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return M(pe.weekdaysMin,ne.$W,S,2);case"ddd":return M(pe.weekdaysShort,ne.$W,S,3);case"dddd":return S[ne.$W];case"H":return String(K);case"HH":return te.s(K,2,"0");case"h":return $(1);case"hh":return $(2);case"a":return Q(K,y,!0);case"A":return Q(K,y,!1);case"m":return String(y);case"mm":return te.s(y,2,"0");case"s":return String(ne.$s);case"ss":return te.s(ne.$s,2,"0");case"SSS":return te.s(ne.$ms,3,"0");case"Z":return J}return null}(oe)||J.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(ie,ne,pe){var le,J=this,K=te.p(ne),y=j(ie),T=(y.utcOffset()-this.utcOffset())*n,S=this-y,O=function(){return te.m(J,y)};switch(K){case f:le=O()/12;break;case c:le=O();break;case h:le=O()/3;break;case d:le=(S-T)/6048e5;break;case u:le=(S-T)/864e5;break;case l:le=S/r;break;case s:le=S/n;break;case o:le=S/i;break;default:le=S}return pe?le:te.a(le)},z.daysInMonth=function(){return this.endOf(c).$D},z.$locale=function(){return U[this.$L]},z.locale=function(ie,ne){if(!ie)return this.$L;var pe=this.clone(),le=G(ie,ne,!0);return le&&(pe.$L=le),pe},z.clone=function(){return te.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},x}(),Y=N.prototype;return j.prototype=Y,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",c],["$y",f],["$D",p]].forEach(function(x){Y[x[1]]=function(z){return this.$g(z,x[0],x[1])}}),j.extend=function(x,z){return x.$i||(x(z,N,j),x.$i=!0),j},j.locale=G,j.isDayjs=W,j.unix=function(x){return j(1e3*x)},j.en=U[D],j.Ls=U,j.p={},j})})(wI);var nF=wI.exports;const ze=Hm(nF),rF=()=>I.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[I.jsx("g",{clipPath:"url(#clip0_1321_39043)",children:I.jsx("path",{d:"M10.0013 4.99935V9.99935L13.3346 11.666M18.3346 9.99935C18.3346 14.6017 14.6037 18.3327 10.0013 18.3327C5.39893 18.3327 1.66797 14.6017 1.66797 9.99935C1.66797 5.39698 5.39893 1.66602 10.0013 1.66602C14.6037 1.66602 18.3346 5.39698 18.3346 9.99935Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),I.jsx("defs",{children:I.jsx("clipPath",{id:"clip0_1321_39043",children:I.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});var II={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Nt,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,a=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(g){return(g=+g)+(g>68?1900:2e3)},d=function(g){return function(C){this[g]=+C}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var b=C.match(/([+-]|\d\d)/g),A=60*b[1]+(+b[2]||0);return A===0?0:b[0]==="+"?-A:A}(g)}],h=function(g){var C=l[g];return C&&(C.indexOf?C:C.s.concat(C.f))},f=function(g,C){var b,A=l.meridiem;if(A){for(var B=1;B<=24;B+=1)if(g.indexOf(A(B,0,C))>-1){b=B>12;break}}else b=g===(C?"pm":"PM");return b},p={A:[s,function(g){this.afternoon=f(g,!1)}],a:[s,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[a,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,d("seconds")],ss:[o,d("seconds")],m:[o,d("minutes")],mm:[o,d("minutes")],H:[o,d("hours")],h:[o,d("hours")],HH:[o,d("hours")],hh:[o,d("hours")],D:[o,d("day")],DD:[a,d("day")],Do:[s,function(g){var C=l.ordinal,b=g.match(/\d+/);if(this.day=b[0],C)for(var A=1;A<=31;A+=1)C(A).replace(/\[|\]/g,"")===g&&(this.day=A)}],w:[o,d("week")],ww:[a,d("week")],M:[o,d("month")],MM:[a,d("month")],MMM:[s,function(g){var C=h("months"),b=(h("monthsShort")||C.map(function(A){return A.slice(0,3)})).indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[s,function(g){var C=h("months").indexOf(g)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(g){this.year=u(g)}],YYYY:[/\d{4}/,d("year")],Z:c,ZZ:c};function m(g){var C,b;C=g,b=l&&l.formats;for(var A=(g=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(j,te,N){var Y=N&&N.toUpperCase();return te||b[N]||i[N]||b[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(x,z,ie){return z||ie.slice(1)})})).match(n),B=A.length,D=0;D<B;D+=1){var U=A[D],H=p[U],W=H&&H[0],G=H&&H[1];A[D]=G?{regex:W,parser:G}:U.replace(/^\[|\]$/g,"")}return function(j){for(var te={},N=0,Y=0;N<B;N+=1){var x=A[N];if(typeof x=="string")Y+=x.length;else{var z=x.regex,ie=x.parser,ne=j.slice(Y),pe=z.exec(ne)[0];ie.call(te,pe),j=j.replace(pe,"")}}return function(le){var J=le.afternoon;if(J!==void 0){var K=le.hours;J?K<12&&(le.hours+=12):K===12&&(le.hours=0),delete le.afternoon}}(te),te}}return function(g,C,b){b.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(u=g.parseTwoDigitYear);var A=C.prototype,B=A.parse;A.parse=function(D){var U=D.date,H=D.utc,W=D.args;this.$u=H;var G=W[1];if(typeof G=="string"){var j=W[2]===!0,te=W[3]===!0,N=j||te,Y=W[2];te&&(Y=W[2]),l=this.$locale(),!j&&Y&&(l=b.Ls[Y]),this.$d=function(ne,pe,le,J){try{if(["x","X"].indexOf(pe)>-1)return new Date((pe==="X"?1e3:1)*ne);var K=m(pe)(ne),y=K.year,T=K.month,S=K.day,O=K.hours,P=K.minutes,M=K.seconds,$=K.milliseconds,Q=K.zone,oe=K.week,ge=new Date,ee=S||(y||T?1:ge.getDate()),xe=y||ge.getFullYear(),w=0;y&&!T||(w=T>0?T-1:ge.getMonth());var he,de=O||0,F=P||0,L=M||0,X=$||0;return Q?new Date(Date.UTC(xe,w,ee,de,F,L,X+60*Q.offset*1e3)):le?new Date(Date.UTC(xe,w,ee,de,F,L,X)):(he=new Date(xe,w,ee,de,F,L,X),oe&&(he=J(he).week(oe).toDate()),he)}catch{return new Date("")}}(U,G,H,b),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),N&&U!=this.format(G)&&(this.$d=new Date("")),l={}}else if(G instanceof Array)for(var x=G.length,z=1;z<=x;z+=1){W[1]=G[z-1];var ie=b.apply(this,W);if(ie.isValid()){this.$d=ie.$d,this.$L=ie.$L,this.init();break}z===x&&(this.$d=new Date(""))}else B.call(this,D)}}})})(II);var aF=II.exports;const Gm=Hm(aF);ze.extend(Gm);const TI=({label:e,required:t,placeholder:i,format:n="HH:mm",defaultHour:r,defaultMinute:a,defaultValue:o,size:s="md",msg:l,onTimeChange:u,onFocus:d,onBlur:c,timepickerStyle:h,dropdownListStyle:f,hoursListStyle:p,minutesListStyle:m,timepickerHelperTextStyle:g,timepickerLabelStyle:C,requiredStyle:b,fixedDropdown:A,theme:B})=>{const[D,U]=ue.useState(!1);ue.useRef(!1);const[H,W]=ue.useState(""),G=ue.useRef(null),j=ue.useRef(null),te=ue.useRef(null),N=ue.useRef(null),Y=ue.useCallback(()=>Array.from({length:60},(T,S)=>S<10?`0${S}`:`${S}`),[]),x=ue.useCallback(()=>Array.from({length:23},(T,S)=>S<9?`0${S+1}`:`${S+1}`),[]),z=(y,T,S)=>{y.stopPropagation(),y.target.scrollIntoView({behavior:"smooth",block:"start"}),S==="hour"&&(j.current=T,G.current||(G.current="00")),S==="minute"&&(G.current=T,j.current||(j.current="00"));const O=ze().hour(parseInt(j.current??"0",10)).minute(parseInt(G.current??"0",10)).format(n??"HH:mm");W(O),u&&typeof u=="function"&&u(O)},ie=y=>{y.stopPropagation(),j.current=null,G.current=null,W(""),u&&typeof u=="function"&&u("")},ne=y=>{y.composedPath().includes(te.current)||U(!1)},pe=y=>{A&&y.composedPath().includes(te.current)||U(!1)},le=()=>{d&&typeof d=="function"&&d()},J=()=>{const y=te.current,T=N.current;if(!T||!y)return;const S=y.getBoundingClientRect(),O=window.innerHeight;A?(T.style.position="fixed",T.style.left=`${S.left+window.pageXOffset}px`,S.bottom+T.offsetHeight>O?(T.style.top=`${window.scrollY+S.top-T.offsetHeight-8}px`,T.style.bottom="unset"):(T.style.top=`${window.scrollY+S.bottom}px`,T.style.bottom="unset")):S.bottom>O?(T.style.top="unset",T.style.bottom="calc(100% + 8px)"):(T.style.bottom="unset",T.style.top="calc(100% + 8px)")},K=ue.useRef(!0);return ue.useEffect(()=>{if(o){const y=ze(o,[n],!0);j.current=y.format("HH"),G.current=y.format("mm"),W(y.format(n))}else if(r){const y=ze().hour(parseInt(r,10)).minute(parseInt(a??"0",10)).format(n??"HH:mm");j.current=r,G.current=a??"00",W(y)}},[]),ue.useEffect(()=>{if(K.current){K.current=!1;return}D||c&&typeof c=="function"&&c()},[D]),ue.useEffect(()=>{J()},[te,D]),ue.useEffect(()=>(document.addEventListener("click",ne),document.addEventListener("wheel",pe),()=>{document.removeEventListener("click",ne),document.removeEventListener("wheel",pe)}),[]),I.jsxs("div",{className:`${B==="dark"?Ji.dark:""} ${Ji.timepickerWrapper}`,children:[e&&I.jsxs("label",{className:Ji.timepickerLabel,style:C??{},children:[e," ",I.jsx("span",{className:Ji.required,style:b??{},children:t&&"*"})]}),I.jsxs("div",{ref:te,onFocus:le,className:`${Ji.timepicker} ${D?Ji.focused:""} ${Ji[s]}`,onClick:()=>U(y=>!y),style:h??{},children:[I.jsx("div",{style:{display:"grid",placeItems:"center"},children:I.jsx(rF,{})}),I.jsx("input",{type:"text",readOnly:!0,placeholder:i??"",value:H}),H?I.jsx("div",{onClick:y=>ie(y),style:{display:"grid",placeItems:"center"},children:I.jsx(Ou,{})}):I.jsx("div",{style:{display:"grid",placeItems:"center",transform:D?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:I.jsx(Du,{})}),D&&I.jsxs("div",{ref:N,className:Ji.dropdownList,style:f??{},children:[I.jsx("ul",{className:Ji.hours,children:x().map(y=>I.jsx("li",{style:p??{},className:`${y===j.current?Ji.selected:""}`,onClick:T=>z(T,y,"hour"),children:y},y))}),I.jsx("ul",{className:Ji.minutes,children:Y().map(y=>I.jsx("li",{style:m??{},className:`${y===G.current?Ji.selected:""}`,onClick:T=>z(T,y,"minute"),children:y},y))})]})]}),l&&(l==null?void 0:l.visible)&&I.jsx("div",{style:g??{},className:`${Ji.timepickerHelperText} ${l!=null&&l.error?Ji.error:""}`,children:I.jsx("p",{style:(l==null?void 0:l.style)??{},children:l.text})})]})},oF="DatePicker-module__datepickerContainer",sF="DatePicker-module__datepickerLabel",lF="DatePicker-module__required",uF="DatePicker-module__datepicker",dF="DatePicker-module__sm",cF="DatePicker-module__md",hF="DatePicker-module__focused",fF="DatePicker-module__error",pF="DatePicker-module__disabled",vF="DatePicker-module__datepickerHelperText",_F="DatePicker-module__dark",Zn={datepickerContainer:oF,datepickerLabel:sF,required:lF,datepicker:uF,sm:dF,md:cF,focused:hF,error:fF,disabled:pF,datepickerHelperText:vF,dark:_F},Yo=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),Xo=({style:e})=>I.jsx("svg",{style:e??{},xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),mF="Calendar-module__datePicker",gF="Calendar-module__dualCalendar",CF="Calendar-module__dualCalendarWithQuick",yF="Calendar-module__border",xF="Calendar-module__calendarWrapper",bF="Calendar-module__quickPick",SF="Calendar-module__datePickerHeader",EF="Calendar-module__div",wF="Calendar-module__left",IF="Calendar-module__right",TF="Calendar-module__singleIcon",AF="Calendar-module__doubleIcon",DF="Calendar-module__day",OF="Calendar-module__today",RF="Calendar-module__inRange",kF="Calendar-module__selected",BF="Calendar-module__startDate",LF="Calendar-module__endDate",PF="Calendar-module__disabled",FF="Calendar-module__otherMonth",MF="Calendar-module__dark",pt={datePicker:mF,dualCalendar:gF,dualCalendarWithQuick:CF,border:yF,calendarWrapper:xF,quickPick:bF,datePickerHeader:SF,div:EF,left:wF,right:IF,singleIcon:TF,doubleIcon:AF,day:DF,today:OF,inRange:RF,selected:kF,startDate:BF,endDate:LF,disabled:PF,otherMonth:FF,dark:MF};ze.extend(Gm);const VF=({valueFormat:e,quickPick:t,onChange:i,CurrentMonth:n,setCurrentMonth:r,SelectedDate:a,setSelectedDate:o,IsFocused:s,setIsFocused:l,mode:u,RangeSelection:d,setRangeSelection:c,type:h,disabledDatesRange:f,disabledDatesTill:p,disabledDatesFrom:m,CalendarRef:g,defaultValue:C,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j,theme:te})=>{const N=["Mo","Tu","We","Th","Fr","Sa","Su"],Y=ue.useRef([]),x=S=>{const O=(S.startOf("month").day()+6)%7,P=S.endOf("month").date(),M=S.subtract(1,"month").endOf("month").date(),$=[];let Q=[],oe=1;for(let ee=0;ee<O;ee++)Q.push({date:S.subtract(1,"month").date(M-O+ee+1),currentMonth:!1});for(;oe<=P;)Q.push({date:S.date(oe++),currentMonth:!0}),Q.length===7&&($.push(Q),Q=[]);let ge=1;for(;$.length<5;)Q.length===7&&($.push(Q),Q=[]),Q.push({date:S.add(1,"month").date(ge++),currentMonth:!1});if(Q.length){for(;Q.length<7;)Q.push({date:S.add(1,"month").date(ge++),currentMonth:!1});$.push(Q)}return $},z=x(n),ie=h==="dual"?x(n.add(1,"month")):null,ne=()=>{let S=[];return t&&Array.isArray(t)&&t.length>0&&t.forEach(O=>{switch(O){case"today":Y.current.push({name:"Today",key:"Today"});break;case"yesterday":Y.current.push({name:"Yesterday",key:"Yesterday"});break;case"thisweek":Y.current.push({name:"This week",key:"Thisweek"});break;case"lastweek":Y.current.push({name:"Last week",key:"Lastweek"});break;case"thismonth":Y.current.push({name:"This month",key:"Thismonth"});break;case"lastmonth":Y.current.push({name:"Last month",key:"Lastmonth"});break;case"thisyear":Y.current.push({name:"This year",key:"Thisyear"});break;case"lastyear":Y.current.push({name:"Last year",key:"Lastyear"});break;case"alltime":Y.current.push({name:"All time",key:"Alltime"});break}}),Y.current=SI(Y.current,"key"),S=Y.current,S},pe=S=>{let O={start:"",end:""};switch(o(null),S.key.toLowerCase()){case"today":c({start:ze(),end:ze()}),O.start=ze();break;case"yesterday":o(ze().subtract(1,"day")),c({start:ze().subtract(1,"day"),end:ze().subtract(1,"day")}),O.start=ze().subtract(1,"day");break;case"thisweek":c({start:ze().startOf("week"),end:ze().endOf("week")}),O.start=ze().startOf("week"),O.end=ze().endOf("week");break;case"lastweek":c({start:ze().subtract(1,"week").startOf("week"),end:ze().subtract(1,"week").endOf("week")}),O.start=ze().subtract(1,"week").startOf("week"),O.end=ze().subtract(1,"week").endOf("week");break;case"thismonth":c({start:ze().startOf("month"),end:ze().endOf("month")}),O.start=ze().startOf("month"),O.end=ze().endOf("month");break;case"lastmonth":c({start:ze().subtract(1,"month").startOf("month"),end:ze().subtract(1,"month").endOf("month")}),O.start=ze().subtract(1,"month").startOf("month"),O.end=ze().subtract(1,"month").endOf("month");break;case"thisyear":c({start:ze().startOf("year"),end:ze().endOf("year")}),O.start=ze().startOf("year"),O.end=ze().endOf("year");break;case"lastyear":c({start:ze().subtract(1,"year").startOf("year"),end:ze().subtract(1,"year").endOf("year")}),O.start=ze().subtract(1,"year").startOf("year"),O.end=ze().subtract(1,"year").endOf("year");break;case"alltime":c({start:"",end:""}),O.start="",O.end="";break;default:console.warn("Unsupported quick pick option:",S);break}if(i&&typeof i=="function"){const P={start:O.start?O.start:"",end:O.end?O.end:""};l(!1),i(P.end===""?P.start:P,P.end==="")}return S},le=(S,O,P=!1)=>{O||r(S.startOf("month")),u==="range"?c(M=>!M.start||M.start&&M.end?(i&&typeof i=="function"&&i({start:S??"",end:""}),{start:S??"",end:""}):M.start&&!M.end?S.isBefore(M.start,"day")?(i&&typeof i=="function"&&i({start:S??"",end:(M==null?void 0:M.start)??""}),{start:S??"",end:(M==null?void 0:M.start)??""}):(i({...M,end:S??""}),{...M,end:S??""}):M):(c({start:null,end:null}),o(S),P||(l(!1),i&&typeof i=="function"&&i(S.format(e??e))))},J=()=>{r(n.add(1,"month"))},K=()=>{r(n.subtract(1,"month"))},y=()=>{r(n.add(1,"year"))},T=()=>{r(n.subtract(1,"year"))};return ue.useEffect(()=>{C.state&&(Array.isArray(C.value)?c({start:ze(C.value[0],e),end:ze(C.value[1],e)}):le(ze(C.value,e),!1,!0),C.state=!1)},[]),I.jsxs("div",{ref:g,className:`${te==="dark"?pt.dark:""} ${pt.datePicker} ${s?pt.focused:""} ${h==="dual"?t&&t.length?pt.dualCalendarWithQuick:pt.dualCalendar:""} `,onClick:S=>S.stopPropagation(),style:h==="dual"&&t&&t.length>0?{width:"848px"}:{},children:[h==="dual"&&t&&t.length>0&&I.jsx("div",{children:t&&t.length>0&&I.jsx("ul",{className:pt.quickPick,children:ne().map(S=>I.jsx("li",{style:G??{},onClick:()=>pe(S),children:S.name},S.key))})}),I.jsxs("div",{className:pt.div,children:[h==="dual"?I.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between"},children:[I.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"80px"},children:[I.jsxs("div",{className:pt.left,children:[I.jsxs("div",{className:pt.doubleIcon,onClick:T,children:[I.jsx(Yo,{}),I.jsx(Yo,{})]}),I.jsx("div",{className:pt.singleIcon,onClick:K,children:I.jsx(Yo,{})})]}),I.jsx("span",{style:j??{},children:n.format("MMMM YYYY")})]}),I.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"80px"},children:[I.jsx("span",{style:j??{},children:n.add(1,"month").format("MMMM YYYY")}),I.jsxs("div",{className:pt.right,children:[I.jsx("div",{className:pt.singleIcon,onClick:J,children:I.jsx(Xo,{})}),I.jsxs("div",{className:pt.doubleIcon,onClick:y,children:[I.jsx(Xo,{}),I.jsx(Xo,{})]})]})]})]}):I.jsxs("div",{className:pt.datePickerHeader,children:[I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{className:pt.left,children:[I.jsxs("div",{className:pt.doubleIcon,onClick:T,children:[I.jsx(Yo,{}),I.jsx(Yo,{})]}),I.jsx("div",{className:pt.singleIcon,onClick:K,children:I.jsx(Yo,{})})]}),I.jsx("span",{style:j??{},children:n.format("MMMM YYYY")}),I.jsxs("div",{className:pt.right,children:[I.jsx("div",{className:pt.singleIcon,onClick:J,children:I.jsx(Xo,{})}),I.jsxs("div",{className:pt.doubleIcon,onClick:y,children:[I.jsx(Xo,{}),I.jsx(Xo,{})]})]})]}),h==="single"&&t&&t.length>0&&I.jsx("ul",{className:pt.quickPick,children:ne().slice(0,3).map(S=>I.jsx("li",{style:G??{},onClick:()=>pe(S),children:S.name},S.key))})]}),I.jsxs("div",{className:pt.calendarWrapper,children:[I.jsxs("table",{children:[I.jsx("thead",{children:I.jsx("tr",{children:N.map(S=>I.jsx("th",{style:W??{},children:S},S))})}),I.jsx("tbody",{children:z.map((S,O)=>I.jsx("tr",{children:S.map(({date:P,currentMonth:M},$)=>{const Q=d.start&&d.end&&P.isAfter(d.start,"day")&&P.isBefore(d.end,"day"),oe=d.start&&P.isSame(d.start,"day"),ge=d.end&&P.isSame(d.end,"day"),ee=u==="single"&&a&&P.isSame(a,"day"),xe=m&&P.isBefore(ze(m),"day"),w=p&&P.isAfter(ze(p),"day");let he=!1;if((f==null?void 0:f.length)===2){const[F,L]=f.map(X=>ze(X));he=P.isAfter(F.subtract(1,"day"))&&P.isBefore(L.add(1,"day"))}const de=xe||w||he;return I.jsx("td",{style:{...M?{}:U,...P.isSame(ze(),"day")?H:{},...Q?D:{},...oe?B:{},...ge?A:{},...ee?b:{}},className:`${pt.day}
47
+ `,children:[I.jsx("div",{className:un.closeButton,style:h??{},onClick:m,children:I.jsx(Ou,{width:"24",height:"24",viewBox:"0 0 24 24",d:"M18 6L6 18M6 6L18 18",stroke:"#A4A7AE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})}),((i==null?void 0:i.title)||(i==null?void 0:i.description)||(i==null?void 0:i.type))&&I.jsxs("div",{className:`${un.popupHeader}`,style:d??{},children:[p()&&I.jsx("div",{className:un.typeIcon,children:I.jsx("div",{style:{backgroundColor:(i==null?void 0:i.type)==="success"?"#DCFAE6":(i==null?void 0:i.type)==="unsaved"?"#FEF0C7":"#FEE4E2"},className:un.icon,children:p()})}),i&&(i==null?void 0:i.title)&&I.jsx("div",{className:un.popupTitle,children:I.jsxs("h2",{style:c??{},children:[" ",(i==null?void 0:i.title)??""," "]})}),i&&(i==null?void 0:i.description)&&I.jsx("div",{className:un.popupDescription,children:I.jsxs("p",{children:[" ",(i==null?void 0:i.description)??""," "]})})]}),I.jsxs("div",{className:un.templateWrapper,style:u??{},children:[t&&t(),n&&n]})]})})},OP="FilterWithTags-module__compWrapper",RP="FilterWithTags-module__filterButton",kP="FilterWithTags-module__filter",BP="FilterWithTags-module__resultNumber",LP="FilterWithTags-module__filterCont",PP="FilterWithTags-module__title",FP="FilterWithTags-module__renderComponent",MP="FilterWithTags-module__footer",VP="FilterWithTags-module__clear",NP="FilterWithTags-module__buttonsWrapper",$P="FilterWithTags-module__tag",HP="FilterWithTags-module__checkbox",WP="FilterWithTags-module__showButton",zP="FilterWithTags-module__dark",pi={compWrapper:OP,filterButton:RP,filter:kP,resultNumber:BP,filterCont:LP,title:PP,renderComponent:FP,footer:MP,clear:VP,buttonsWrapper:NP,tag:$P,checkbox:HP,showButton:WP,dark:zP},GP="TimePicker-module__timepickerWrapper",UP="TimePicker-module__timepickerLabel",KP="TimePicker-module__required",jP="TimePicker-module__timepicker",qP="TimePicker-module__sm",YP="TimePicker-module__md",XP="TimePicker-module__focused",ZP="TimePicker-module__error",JP="TimePicker-module__disabled",QP="TimePicker-module__dropdownList",eF="TimePicker-module__selected",tF="TimePicker-module__timepickerHelperText",iF="TimePicker-module__dark",Ji={timepickerWrapper:GP,timepickerLabel:UP,required:KP,timepicker:jP,sm:qP,md:YP,focused:XP,error:ZP,disabled:JP,dropdownList:QP,selected:eF,timepickerHelperText:tF,dark:iF};var wI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Nt,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",d="week",c="month",h="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var z=["th","st","nd","rd"],ie=x%100;return"["+x+(z[(ie-20)%10]||z[ie]||z[0])+"]"}},A=function(x,z,ie){var ne=String(x);return!ne||ne.length>=z?x:""+Array(z+1-ne.length).join(ie)+x},B={s:A,z:function(x){var z=-x.utcOffset(),ie=Math.abs(z),ne=Math.floor(ie/60),pe=ie%60;return(z<=0?"+":"-")+A(ne,2,"0")+":"+A(pe,2,"0")},m:function x(z,ie){if(z.date()<ie.date())return-x(ie,z);var ne=12*(ie.year()-z.year())+(ie.month()-z.month()),pe=z.clone().add(ne,c),le=ie-pe<0,J=z.clone().add(ne+(le?-1:1),c);return+(-(ne+(ie-pe)/(le?pe-J:J-pe))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:c,y:f,w:d,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},D="en",U={};U[D]=b;var H="$isDayjsObject",W=function(x){return x instanceof N||!(!x||!x[H])},G=function x(z,ie,ne){var pe;if(!z)return D;if(typeof z=="string"){var le=z.toLowerCase();U[le]&&(pe=le),ie&&(U[le]=ie,pe=le);var J=z.split("-");if(!pe&&J.length>1)return x(J[0])}else{var K=z.name;U[K]=z,pe=K}return!ne&&pe&&(D=pe),pe||!ne&&D},j=function(x,z){if(W(x))return x.clone();var ie=typeof z=="object"?z:{};return ie.date=x,ie.args=arguments,new N(ie)},te=B;te.l=G,te.i=W,te.w=function(x,z){return j(x,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function x(ie){this.$L=G(ie.locale,null,!0),this.parse(ie),this.$x=this.$x||ie.x||{},this[H]=!0}var z=x.prototype;return z.parse=function(ie){this.$d=function(ne){var pe=ne.date,le=ne.utc;if(pe===null)return new Date(NaN);if(te.u(pe))return new Date;if(pe instanceof Date)return new Date(pe);if(typeof pe=="string"&&!/Z$/i.test(pe)){var J=pe.match(g);if(J){var K=J[2]-1||0,y=(J[7]||"0").substring(0,3);return le?new Date(Date.UTC(J[1],K,J[3]||1,J[4]||0,J[5]||0,J[6]||0,y)):new Date(J[1],K,J[3]||1,J[4]||0,J[5]||0,J[6]||0,y)}}return new Date(pe)}(ie),this.init()},z.init=function(){var ie=this.$d;this.$y=ie.getFullYear(),this.$M=ie.getMonth(),this.$D=ie.getDate(),this.$W=ie.getDay(),this.$H=ie.getHours(),this.$m=ie.getMinutes(),this.$s=ie.getSeconds(),this.$ms=ie.getMilliseconds()},z.$utils=function(){return te},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(ie,ne){var pe=j(ie);return this.startOf(ne)<=pe&&pe<=this.endOf(ne)},z.isAfter=function(ie,ne){return j(ie)<this.startOf(ne)},z.isBefore=function(ie,ne){return this.endOf(ne)<j(ie)},z.$g=function(ie,ne,pe){return te.u(ie)?this[ne]:this.set(pe,ie)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(ie,ne){var pe=this,le=!!te.u(ne)||ne,J=te.p(ie),K=function(Q,oe){var ge=te.w(pe.$u?Date.UTC(pe.$y,oe,Q):new Date(pe.$y,oe,Q),pe);return le?ge:ge.endOf(u)},y=function(Q,oe){return te.w(pe.toDate()[Q].apply(pe.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(oe)),pe)},T=this.$W,S=this.$M,O=this.$D,P="set"+(this.$u?"UTC":"");switch(J){case f:return le?K(1,0):K(31,11);case c:return le?K(1,S):K(0,S+1);case d:var M=this.$locale().weekStart||0,$=(T<M?T+7:T)-M;return K(le?O-$:O+(6-$),S);case u:case p:return y(P+"Hours",0);case l:return y(P+"Minutes",1);case s:return y(P+"Seconds",2);case o:return y(P+"Milliseconds",3);default:return this.clone()}},z.endOf=function(ie){return this.startOf(ie,!1)},z.$set=function(ie,ne){var pe,le=te.p(ie),J="set"+(this.$u?"UTC":""),K=(pe={},pe[u]=J+"Date",pe[p]=J+"Date",pe[c]=J+"Month",pe[f]=J+"FullYear",pe[l]=J+"Hours",pe[s]=J+"Minutes",pe[o]=J+"Seconds",pe[a]=J+"Milliseconds",pe)[le],y=le===u?this.$D+(ne-this.$W):ne;if(le===c||le===f){var T=this.clone().set(p,1);T.$d[K](y),T.init(),this.$d=T.set(p,Math.min(this.$D,T.daysInMonth())).$d}else K&&this.$d[K](y);return this.init(),this},z.set=function(ie,ne){return this.clone().$set(ie,ne)},z.get=function(ie){return this[te.p(ie)]()},z.add=function(ie,ne){var pe,le=this;ie=Number(ie);var J=te.p(ne),K=function(S){var O=j(le);return te.w(O.date(O.date()+Math.round(S*ie)),le)};if(J===c)return this.set(c,this.$M+ie);if(J===f)return this.set(f,this.$y+ie);if(J===u)return K(1);if(J===d)return K(7);var y=(pe={},pe[s]=n,pe[l]=r,pe[o]=i,pe)[J]||1,T=this.$d.getTime()+ie*y;return te.w(T,this)},z.subtract=function(ie,ne){return this.add(-1*ie,ne)},z.format=function(ie){var ne=this,pe=this.$locale();if(!this.isValid())return pe.invalidDate||m;var le=ie||"YYYY-MM-DDTHH:mm:ssZ",J=te.z(this),K=this.$H,y=this.$m,T=this.$M,S=pe.weekdays,O=pe.months,P=pe.meridiem,M=function(oe,ge,ee,xe){return oe&&(oe[ge]||oe(ne,le))||ee[ge].slice(0,xe)},$=function(oe){return te.s(K%12||12,oe,"0")},Q=P||function(oe,ge,ee){var xe=oe<12?"AM":"PM";return ee?xe.toLowerCase():xe};return le.replace(C,function(oe,ge){return ge||function(ee){switch(ee){case"YY":return String(ne.$y).slice(-2);case"YYYY":return te.s(ne.$y,4,"0");case"M":return T+1;case"MM":return te.s(T+1,2,"0");case"MMM":return M(pe.monthsShort,T,O,3);case"MMMM":return M(O,T);case"D":return ne.$D;case"DD":return te.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return M(pe.weekdaysMin,ne.$W,S,2);case"ddd":return M(pe.weekdaysShort,ne.$W,S,3);case"dddd":return S[ne.$W];case"H":return String(K);case"HH":return te.s(K,2,"0");case"h":return $(1);case"hh":return $(2);case"a":return Q(K,y,!0);case"A":return Q(K,y,!1);case"m":return String(y);case"mm":return te.s(y,2,"0");case"s":return String(ne.$s);case"ss":return te.s(ne.$s,2,"0");case"SSS":return te.s(ne.$ms,3,"0");case"Z":return J}return null}(oe)||J.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(ie,ne,pe){var le,J=this,K=te.p(ne),y=j(ie),T=(y.utcOffset()-this.utcOffset())*n,S=this-y,O=function(){return te.m(J,y)};switch(K){case f:le=O()/12;break;case c:le=O();break;case h:le=O()/3;break;case d:le=(S-T)/6048e5;break;case u:le=(S-T)/864e5;break;case l:le=S/r;break;case s:le=S/n;break;case o:le=S/i;break;default:le=S}return pe?le:te.a(le)},z.daysInMonth=function(){return this.endOf(c).$D},z.$locale=function(){return U[this.$L]},z.locale=function(ie,ne){if(!ie)return this.$L;var pe=this.clone(),le=G(ie,ne,!0);return le&&(pe.$L=le),pe},z.clone=function(){return te.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},x}(),Y=N.prototype;return j.prototype=Y,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",c],["$y",f],["$D",p]].forEach(function(x){Y[x[1]]=function(z){return this.$g(z,x[0],x[1])}}),j.extend=function(x,z){return x.$i||(x(z,N,j),x.$i=!0),j},j.locale=G,j.isDayjs=W,j.unix=function(x){return j(1e3*x)},j.en=U[D],j.Ls=U,j.p={},j})})(wI);var nF=wI.exports;const ze=Hm(nF),rF=()=>I.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[I.jsx("g",{clipPath:"url(#clip0_1321_39043)",children:I.jsx("path",{d:"M10.0013 4.99935V9.99935L13.3346 11.666M18.3346 9.99935C18.3346 14.6017 14.6037 18.3327 10.0013 18.3327C5.39893 18.3327 1.66797 14.6017 1.66797 9.99935C1.66797 5.39698 5.39893 1.66602 10.0013 1.66602C14.6037 1.66602 18.3346 5.39698 18.3346 9.99935Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),I.jsx("defs",{children:I.jsx("clipPath",{id:"clip0_1321_39043",children:I.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});var II={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Nt,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,a=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(g){return(g=+g)+(g>68?1900:2e3)},d=function(g){return function(C){this[g]=+C}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var b=C.match(/([+-]|\d\d)/g),A=60*b[1]+(+b[2]||0);return A===0?0:b[0]==="+"?-A:A}(g)}],h=function(g){var C=l[g];return C&&(C.indexOf?C:C.s.concat(C.f))},f=function(g,C){var b,A=l.meridiem;if(A){for(var B=1;B<=24;B+=1)if(g.indexOf(A(B,0,C))>-1){b=B>12;break}}else b=g===(C?"pm":"PM");return b},p={A:[s,function(g){this.afternoon=f(g,!1)}],a:[s,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[a,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,d("seconds")],ss:[o,d("seconds")],m:[o,d("minutes")],mm:[o,d("minutes")],H:[o,d("hours")],h:[o,d("hours")],HH:[o,d("hours")],hh:[o,d("hours")],D:[o,d("day")],DD:[a,d("day")],Do:[s,function(g){var C=l.ordinal,b=g.match(/\d+/);if(this.day=b[0],C)for(var A=1;A<=31;A+=1)C(A).replace(/\[|\]/g,"")===g&&(this.day=A)}],w:[o,d("week")],ww:[a,d("week")],M:[o,d("month")],MM:[a,d("month")],MMM:[s,function(g){var C=h("months"),b=(h("monthsShort")||C.map(function(A){return A.slice(0,3)})).indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[s,function(g){var C=h("months").indexOf(g)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(g){this.year=u(g)}],YYYY:[/\d{4}/,d("year")],Z:c,ZZ:c};function m(g){var C,b;C=g,b=l&&l.formats;for(var A=(g=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(j,te,N){var Y=N&&N.toUpperCase();return te||b[N]||i[N]||b[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(x,z,ie){return z||ie.slice(1)})})).match(n),B=A.length,D=0;D<B;D+=1){var U=A[D],H=p[U],W=H&&H[0],G=H&&H[1];A[D]=G?{regex:W,parser:G}:U.replace(/^\[|\]$/g,"")}return function(j){for(var te={},N=0,Y=0;N<B;N+=1){var x=A[N];if(typeof x=="string")Y+=x.length;else{var z=x.regex,ie=x.parser,ne=j.slice(Y),pe=z.exec(ne)[0];ie.call(te,pe),j=j.replace(pe,"")}}return function(le){var J=le.afternoon;if(J!==void 0){var K=le.hours;J?K<12&&(le.hours+=12):K===12&&(le.hours=0),delete le.afternoon}}(te),te}}return function(g,C,b){b.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(u=g.parseTwoDigitYear);var A=C.prototype,B=A.parse;A.parse=function(D){var U=D.date,H=D.utc,W=D.args;this.$u=H;var G=W[1];if(typeof G=="string"){var j=W[2]===!0,te=W[3]===!0,N=j||te,Y=W[2];te&&(Y=W[2]),l=this.$locale(),!j&&Y&&(l=b.Ls[Y]),this.$d=function(ne,pe,le,J){try{if(["x","X"].indexOf(pe)>-1)return new Date((pe==="X"?1e3:1)*ne);var K=m(pe)(ne),y=K.year,T=K.month,S=K.day,O=K.hours,P=K.minutes,M=K.seconds,$=K.milliseconds,Q=K.zone,oe=K.week,ge=new Date,ee=S||(y||T?1:ge.getDate()),xe=y||ge.getFullYear(),w=0;y&&!T||(w=T>0?T-1:ge.getMonth());var he,de=O||0,F=P||0,L=M||0,X=$||0;return Q?new Date(Date.UTC(xe,w,ee,de,F,L,X+60*Q.offset*1e3)):le?new Date(Date.UTC(xe,w,ee,de,F,L,X)):(he=new Date(xe,w,ee,de,F,L,X),oe&&(he=J(he).week(oe).toDate()),he)}catch{return new Date("")}}(U,G,H,b),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),N&&U!=this.format(G)&&(this.$d=new Date("")),l={}}else if(G instanceof Array)for(var x=G.length,z=1;z<=x;z+=1){W[1]=G[z-1];var ie=b.apply(this,W);if(ie.isValid()){this.$d=ie.$d,this.$L=ie.$L,this.init();break}z===x&&(this.$d=new Date(""))}else B.call(this,D)}}})})(II);var aF=II.exports;const Gm=Hm(aF);ze.extend(Gm);const TI=({label:e,required:t,placeholder:i,format:n="HH:mm",defaultHour:r,defaultMinute:a,defaultValue:o,size:s="md",msg:l,onTimeChange:u,onFocus:d,onBlur:c,timepickerStyle:h,dropdownListStyle:f,hoursListStyle:p,minutesListStyle:m,timepickerHelperTextStyle:g,timepickerLabelStyle:C,requiredStyle:b,fixedDropdown:A,theme:B})=>{const[D,U]=ue.useState(!1);ue.useRef(!1);const[H,W]=ue.useState(""),G=ue.useRef(null),j=ue.useRef(null),te=ue.useRef(null),N=ue.useRef(null),Y=ue.useCallback(()=>Array.from({length:60},(T,S)=>S<10?`0${S}`:`${S}`),[]),x=ue.useCallback(()=>Array.from({length:23},(T,S)=>S<9?`0${S+1}`:`${S+1}`),[]),z=(y,T,S)=>{y.stopPropagation(),y.target.scrollIntoView({behavior:"smooth",block:"start"}),S==="hour"&&(j.current=T,G.current||(G.current="00")),S==="minute"&&(G.current=T,j.current||(j.current="00"));const O=ze().hour(parseInt(j.current??"0",10)).minute(parseInt(G.current??"0",10)).format(n??"HH:mm");W(O),u&&typeof u=="function"&&u(O)},ie=y=>{y.stopPropagation(),j.current=null,G.current=null,W(""),u&&typeof u=="function"&&u("")},ne=y=>{y.composedPath().includes(te.current)||U(!1)},pe=y=>{A&&y.composedPath().includes(te.current)||U(!1)},le=()=>{d&&typeof d=="function"&&d()},J=()=>{const y=te.current,T=N.current;if(!T||!y)return;const S=y.getBoundingClientRect(),O=window.innerHeight;A?(T.style.position="fixed",T.style.left=`${S.left+window.pageXOffset}px`,S.bottom+T.offsetHeight>O?(T.style.top=`${window.scrollY+S.top-T.offsetHeight-8}px`,T.style.bottom="unset"):(T.style.top=`${window.scrollY+S.bottom}px`,T.style.bottom="unset")):S.bottom>O?(T.style.top="unset",T.style.bottom="calc(100% + 8px)"):(T.style.bottom="unset",T.style.top="calc(100% + 8px)")},K=ue.useRef(!0);return ue.useEffect(()=>{if(o){const y=ze(o,[n],!0);j.current=y.format("HH"),G.current=y.format("mm"),W(y.format(n))}else if(r){const y=ze().hour(parseInt(r,10)).minute(parseInt(a??"0",10)).format(n??"HH:mm");j.current=r,G.current=a??"00",W(y)}},[]),ue.useEffect(()=>{if(K.current){K.current=!1;return}D||c&&typeof c=="function"&&c()},[D]),ue.useEffect(()=>{J()},[te,D]),ue.useEffect(()=>(document.addEventListener("click",ne),document.addEventListener("wheel",pe),()=>{document.removeEventListener("click",ne),document.removeEventListener("wheel",pe)}),[]),I.jsxs("div",{className:`${B==="dark"?Ji.dark:""} ${Ji.timepickerWrapper}`,children:[e&&I.jsxs("label",{className:Ji.timepickerLabel,style:C??{},children:[e," ",I.jsx("span",{className:Ji.required,style:b??{},children:t&&"*"})]}),I.jsxs("div",{ref:te,onFocus:le,className:`${Ji.timepicker} ${D?Ji.focused:""} ${Ji[s]}`,onClick:()=>U(y=>!y),style:h??{},children:[I.jsx("div",{style:{display:"grid",placeItems:"center"},children:I.jsx(rF,{})}),I.jsx("input",{type:"text",readOnly:!0,placeholder:i??"",value:H}),H?I.jsx("div",{onClick:y=>ie(y),style:{display:"grid",placeItems:"center"},children:I.jsx(Ou,{})}):I.jsx("div",{style:{display:"grid",placeItems:"center",transform:D?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:I.jsx(Du,{})}),D&&I.jsxs("div",{ref:N,className:Ji.dropdownList,style:f??{},children:[I.jsx("ul",{className:Ji.hours,children:x().map(y=>I.jsx("li",{style:p??{},className:`${y===j.current?Ji.selected:""}`,onClick:T=>z(T,y,"hour"),children:y},y))}),I.jsx("ul",{className:Ji.minutes,children:Y().map(y=>I.jsx("li",{style:m??{},className:`${y===G.current?Ji.selected:""}`,onClick:T=>z(T,y,"minute"),children:y},y))})]})]}),l&&(l==null?void 0:l.visible)&&I.jsx("div",{style:g??{},className:`${Ji.timepickerHelperText} ${l!=null&&l.error?Ji.error:""}`,children:I.jsx("p",{style:(l==null?void 0:l.style)??{},children:l.text})})]})},oF="DatePicker-module__datepickerContainer",sF="DatePicker-module__datepickerLabel",lF="DatePicker-module__required",uF="DatePicker-module__datepicker",dF="DatePicker-module__sm",cF="DatePicker-module__md",hF="DatePicker-module__focused",fF="DatePicker-module__error",pF="DatePicker-module__disabled",vF="DatePicker-module__datepickerHelperText",_F="DatePicker-module__dark",Zn={datepickerContainer:oF,datepickerLabel:sF,required:lF,datepicker:uF,sm:dF,md:cF,focused:hF,error:fF,disabled:pF,datepickerHelperText:vF,dark:_F},Yo=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),Xo=({style:e})=>I.jsx("svg",{style:e??{},xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),mF="Calendar-module__datePicker",gF="Calendar-module__dualCalendar",CF="Calendar-module__dualCalendarWithQuick",yF="Calendar-module__border",xF="Calendar-module__calendarWrapper",bF="Calendar-module__quickPick",SF="Calendar-module__datePickerHeader",EF="Calendar-module__div",wF="Calendar-module__left",IF="Calendar-module__right",TF="Calendar-module__singleIcon",AF="Calendar-module__doubleIcon",DF="Calendar-module__day",OF="Calendar-module__today",RF="Calendar-module__inRange",kF="Calendar-module__selected",BF="Calendar-module__startDate",LF="Calendar-module__endDate",PF="Calendar-module__disabled",FF="Calendar-module__otherMonth",MF="Calendar-module__dark",pt={datePicker:mF,dualCalendar:gF,dualCalendarWithQuick:CF,border:yF,calendarWrapper:xF,quickPick:bF,datePickerHeader:SF,div:EF,left:wF,right:IF,singleIcon:TF,doubleIcon:AF,day:DF,today:OF,inRange:RF,selected:kF,startDate:BF,endDate:LF,disabled:PF,otherMonth:FF,dark:MF};ze.extend(Gm);const VF=({valueFormat:e,quickPick:t,onChange:i,CurrentMonth:n,setCurrentMonth:r,SelectedDate:a,setSelectedDate:o,IsFocused:s,setIsFocused:l,mode:u,RangeSelection:d,setRangeSelection:c,type:h,disabledDatesRange:f,disabledDatesTill:p,disabledDatesFrom:m,CalendarRef:g,defaultValue:C,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j,theme:te})=>{const N=["Mo","Tu","We","Th","Fr","Sa","Su"],Y=ue.useRef([]),x=S=>{const O=(S.startOf("month").day()+6)%7,P=S.endOf("month").date(),M=S.subtract(1,"month").endOf("month").date(),$=[];let Q=[],oe=1;for(let ee=0;ee<O;ee++)Q.push({date:S.subtract(1,"month").date(M-O+ee+1),currentMonth:!1});for(;oe<=P;)Q.push({date:S.date(oe++),currentMonth:!0}),Q.length===7&&($.push(Q),Q=[]);let ge=1;for(;$.length<5;)Q.length===7&&($.push(Q),Q=[]),Q.push({date:S.add(1,"month").date(ge++),currentMonth:!1});if(Q.length){for(;Q.length<7;)Q.push({date:S.add(1,"month").date(ge++),currentMonth:!1});$.push(Q)}return $},z=x(n),ie=h==="dual"?x(n.add(1,"month")):null,ne=()=>{let S=[];return t&&Array.isArray(t)&&t.length>0&&t.forEach(O=>{switch(O){case"today":Y.current.push({name:"Today",key:"Today"});break;case"yesterday":Y.current.push({name:"Yesterday",key:"Yesterday"});break;case"thisweek":Y.current.push({name:"This week",key:"Thisweek"});break;case"lastweek":Y.current.push({name:"Last week",key:"Lastweek"});break;case"thismonth":Y.current.push({name:"This month",key:"Thismonth"});break;case"lastmonth":Y.current.push({name:"Last month",key:"Lastmonth"});break;case"thisyear":Y.current.push({name:"This year",key:"Thisyear"});break;case"lastyear":Y.current.push({name:"Last year",key:"Lastyear"});break;case"alltime":Y.current.push({name:"All time",key:"Alltime"});break}}),Y.current=SI(Y.current,"key"),S=Y.current,S},pe=S=>{let O={start:"",end:""};switch(o(null),S.key.toLowerCase()){case"today":c({start:ze(),end:ze()}),O.start=ze();break;case"yesterday":o(ze().subtract(1,"day")),c({start:ze().subtract(1,"day"),end:ze().subtract(1,"day")}),O.start=ze().subtract(1,"day");break;case"thisweek":c({start:ze().startOf("week"),end:ze().endOf("week")}),O.start=ze().startOf("week"),O.end=ze().endOf("week");break;case"lastweek":c({start:ze().subtract(1,"week").startOf("week"),end:ze().subtract(1,"week").endOf("week")}),O.start=ze().subtract(1,"week").startOf("week"),O.end=ze().subtract(1,"week").endOf("week");break;case"thismonth":c({start:ze().startOf("month"),end:ze().endOf("month")}),O.start=ze().startOf("month"),O.end=ze().endOf("month");break;case"lastmonth":c({start:ze().subtract(1,"month").startOf("month"),end:ze().subtract(1,"month").endOf("month")}),O.start=ze().subtract(1,"month").startOf("month"),O.end=ze().subtract(1,"month").endOf("month");break;case"thisyear":c({start:ze().startOf("year"),end:ze().endOf("year")}),O.start=ze().startOf("year"),O.end=ze().endOf("year");break;case"lastyear":c({start:ze().subtract(1,"year").startOf("year"),end:ze().subtract(1,"year").endOf("year")}),O.start=ze().subtract(1,"year").startOf("year"),O.end=ze().subtract(1,"year").endOf("year");break;case"alltime":c({start:"",end:""}),O.start="",O.end="";break;default:console.warn("Unsupported quick pick option:",S);break}if(i&&typeof i=="function"){const P={start:O.start?O.start:"",end:O.end?O.end:""};l(!1),i(P.end===""?P.start:P,P.end==="")}return S},le=(S,O,P=!1)=>{O||r(S.startOf("month")),u==="range"?c(M=>!M.start||M.start&&M.end?(i&&typeof i=="function"&&i({start:S??"",end:""}),{start:S??"",end:""}):M.start&&!M.end?S.isBefore(M.start,"day")?(i&&typeof i=="function"&&i({start:S??"",end:(M==null?void 0:M.start)??""}),{start:S??"",end:(M==null?void 0:M.start)??""}):(i({...M,end:S??""}),{...M,end:S??""}):M):(c({start:null,end:null}),o(S),P||(l(!1),i&&typeof i=="function"&&i(S.format(e??e))))},J=()=>{r(n.add(1,"month"))},K=()=>{r(n.subtract(1,"month"))},y=()=>{r(n.add(1,"year"))},T=()=>{r(n.subtract(1,"year"))};return ue.useEffect(()=>{C.state&&(Array.isArray(C.value)?c({start:ze(C.value[0],e),end:ze(C.value[1],e)}):le(ze(C.value,e),!1,!0),C.state=!1)},[]),I.jsxs("div",{ref:g,className:`${te==="dark"?pt.dark:""} ${pt.datePicker} ${s?pt.focused:""} ${h==="dual"?t&&t.length?pt.dualCalendarWithQuick:pt.dualCalendar:""} `,onClick:S=>S.stopPropagation(),style:h==="dual"&&t&&t.length>0?{width:"848px"}:{},children:[h==="dual"&&t&&t.length>0&&I.jsx("div",{children:t&&t.length>0&&I.jsx("ul",{className:pt.quickPick,children:ne().map(S=>I.jsx("li",{style:G??{},onClick:()=>pe(S),children:S.name},S.key))})}),I.jsxs("div",{className:pt.div,children:[h==="dual"?I.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between"},children:[I.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"80px"},children:[I.jsxs("div",{className:pt.left,children:[I.jsxs("div",{className:pt.doubleIcon,onClick:T,children:[I.jsx(Yo,{}),I.jsx(Yo,{})]}),I.jsx("div",{className:pt.singleIcon,onClick:K,children:I.jsx(Yo,{})})]}),I.jsx("span",{style:j??{},children:n.format("MMMM YYYY")})]}),I.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"80px"},children:[I.jsx("span",{style:j??{},children:n.add(1,"month").format("MMMM YYYY")}),I.jsxs("div",{className:pt.right,children:[I.jsx("div",{className:pt.singleIcon,onClick:J,children:I.jsx(Xo,{})}),I.jsxs("div",{className:pt.doubleIcon,onClick:y,children:[I.jsx(Xo,{}),I.jsx(Xo,{})]})]})]})]}):I.jsxs("div",{className:pt.datePickerHeader,children:[I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{className:pt.left,children:[I.jsxs("div",{className:pt.doubleIcon,onClick:T,children:[I.jsx(Yo,{}),I.jsx(Yo,{})]}),I.jsx("div",{className:pt.singleIcon,onClick:K,children:I.jsx(Yo,{})})]}),I.jsx("span",{style:j??{},children:n.format("MMMM YYYY")}),I.jsxs("div",{className:pt.right,children:[I.jsx("div",{className:pt.singleIcon,onClick:J,children:I.jsx(Xo,{})}),I.jsxs("div",{className:pt.doubleIcon,onClick:y,children:[I.jsx(Xo,{}),I.jsx(Xo,{})]})]})]}),h==="single"&&t&&t.length>0&&I.jsx("ul",{className:pt.quickPick,children:ne().slice(0,3).map(S=>I.jsx("li",{style:G??{},onClick:()=>pe(S),children:S.name},S.key))})]}),I.jsxs("div",{className:pt.calendarWrapper,children:[I.jsxs("table",{children:[I.jsx("thead",{children:I.jsx("tr",{children:N.map(S=>I.jsx("th",{style:W??{},children:S},S))})}),I.jsx("tbody",{children:z.map((S,O)=>I.jsx("tr",{children:S.map(({date:P,currentMonth:M},$)=>{const Q=d.start&&d.end&&P.isAfter(d.start,"day")&&P.isBefore(d.end,"day"),oe=d.start&&P.isSame(d.start,"day"),ge=d.end&&P.isSame(d.end,"day"),ee=u==="single"&&a&&P.isSame(a,"day"),xe=p&&P.isBefore(ze(p),"day"),w=m&&P.isAfter(ze(m),"day");let he=!1;if((f==null?void 0:f.length)===2){const[F,L]=f.map(X=>ze(X));he=P.isAfter(F.subtract(1,"day"))&&P.isBefore(L.add(1,"day"))}const de=w||xe||he;return I.jsx("td",{style:{...M?{}:U,...P.isSame(ze(),"day")?H:{},...Q?D:{},...oe?B:{},...ge?A:{},...ee?b:{}},className:`${pt.day}
48
48
  ${M?"":pt.otherMonth}
49
49
  ${M&&P.isSame(ze(),"day")?pt.today:""}
50
50
  ${M&&Q?pt.inRange:""}
51
51
  ${M&&oe?pt.startDate:""}
52
52
  ${M&&ge?pt.endDate:""}
53
53
  ${!M&&!Q&&!ge?"":ee?pt.selected:""}
54
- ${de?pt.disabled:""}`,onClick:()=>le(P,M),children:P.date()},$)})},O))})]}),h==="dual"&&I.jsx("div",{className:pt.border}),h==="dual"&&I.jsxs("table",{children:[I.jsx("thead",{children:I.jsx("tr",{children:N.map(S=>I.jsx("th",{style:W??{},children:S},S))})}),I.jsx("tbody",{children:ie.map((S,O)=>I.jsx("tr",{children:S.map(({date:P,currentMonth:M},$)=>{const Q=d.start&&d.end&&P.isAfter(d.start,"day")&&P.isBefore(d.end,"day"),oe=d.start&&P.isSame(d.start,"day"),ge=d.end&&P.isSame(d.end,"day"),ee=u==="single"&&a&&P.isSame(a,"day"),xe=m&&P.isBefore(ze(m),"day"),w=p&&P.isAfter(ze(p),"day");let he=!1;if((f==null?void 0:f.length)===2){const[F,L]=f.map(X=>ze(X));he=P.isAfter(F.subtract(1,"day"))&&P.isBefore(L.add(1,"day"))}const de=xe||w||he;return I.jsx("td",{style:{...M?{}:U,...P.isSame(ze(),"day")?H:{},...Q?D:{},...oe?B:{},...ge?A:{},...ee?b:{}},className:`${pt.day}
54
+ ${de?pt.disabled:""}`,onClick:()=>le(P,M),children:P.date()},$)})},O))})]}),h==="dual"&&I.jsx("div",{className:pt.border}),h==="dual"&&I.jsxs("table",{children:[I.jsx("thead",{children:I.jsx("tr",{children:N.map(S=>I.jsx("th",{style:W??{},children:S},S))})}),I.jsx("tbody",{children:ie.map((S,O)=>I.jsx("tr",{children:S.map(({date:P,currentMonth:M},$)=>{const Q=d.start&&d.end&&P.isAfter(d.start,"day")&&P.isBefore(d.end,"day"),oe=d.start&&P.isSame(d.start,"day"),ge=d.end&&P.isSame(d.end,"day"),ee=u==="single"&&a&&P.isSame(a,"day"),xe=p&&P.isBefore(ze(p),"day"),w=m&&P.isAfter(ze(m),"day");let he=!1;if((f==null?void 0:f.length)===2){const[F,L]=f.map(X=>ze(X));he=P.isAfter(F.subtract(1,"day"))&&P.isBefore(L.add(1,"day"))}const de=w||xe||he;return I.jsx("td",{style:{...M?{}:U,...P.isSame(ze(),"day")?H:{},...Q?D:{},...oe?B:{},...ge?A:{},...ee?b:{}},className:`${pt.day}
55
55
  ${M?"":pt.otherMonth}
56
56
  ${M&&P.isSame(ze(),"day")?pt.today:""}
57
57
  ${M&&Q?pt.inRange:""}
58
58
  ${M&&oe?pt.startDate:""}
59
59
  ${M&&ge?pt.endDate:""}
60
60
  ${!M&&!Q&&!ge?"":ee?pt.selected:""}
61
- ${de?pt.disabled:""}`,onClick:()=>le(P,M),children:P.date()},$)})},O))})]})]})]})]})},NF=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M17.5 8.33464H2.5M13.3333 1.66797V5.0013M6.66667 1.66797V5.0013M6.5 18.3346H13.5C14.9001 18.3346 15.6002 18.3346 16.135 18.0622C16.6054 17.8225 16.9878 17.44 17.2275 16.9696C17.5 16.4348 17.5 15.7348 17.5 14.3346V7.33464C17.5 5.9345 17.5 5.23444 17.2275 4.69966C16.9878 4.22925 16.6054 3.8468 16.135 3.60712C15.6002 3.33464 14.9001 3.33464 13.5 3.33464H6.5C5.09987 3.33464 4.3998 3.33464 3.86502 3.60712C3.39462 3.8468 3.01217 4.22925 2.77248 4.69966C2.5 5.23444 2.5 5.9345 2.5 7.33464V14.3346C2.5 15.7348 2.5 16.4348 2.77248 16.9696C3.01217 17.44 3.39462 17.8225 3.86502 18.0622C4.3998 18.3346 5.09987 18.3346 6.5 18.3346Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});ze.extend(Gm);const AI=({label:e,required:t=!1,msg:i,defaultValue:n,size:r="md",valueFormat:a="DD-MM-YYYY",onChange:o,onBlur:s,onFocus:l,fixedDropdown:u,disabledDatesFrom:d,disabledDatesTill:c,disabledDatesRange:h,datepickerStyle:f,placeholder:p,datepickerLabelStyle:m,requiredStyle:g,datepickerHelperTextStyle:C,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j,quickPick:te,mode:N="range",type:Y="dual",theme:x="light",disabled:z=!1})=>{const[ie,ne]=ue.useState(!1),[pe,le]=ue.useState(""),J=ue.useRef({state:!1,value:""}),[K,y]=ue.useState(!1),T=ue.useRef(null),[S,O]=ue.useState(ze()),[P,M]=ue.useState(""),[$,Q]=ue.useState({start:null,end:null}),oe=ue.useRef(null),ge=(L,X,ce)=>{let _e="",ae={start:"",end:""};!X&&(N==="single"||typeof L=="string")&&(_e=L,le(_e)),!X&&(N!=="single"||typeof L!="string")&&(_e=`${ze((L==null?void 0:L.start)??"").format(a)} / ${L!=null&&L.end?ze(L.end).format(a):""}`,ae.start=ze((L==null?void 0:L.start)??"").format(a),ae.end=L!=null&&L.end?ze(L.end).format(a):"",le(_e)),X&&(_e=ze(L).format(a),le(_e)),L!=null&&L.end&&ne(!1),o&&typeof o=="function"&&!ce&&(o(ae.start!==""?ae:_e),J.current.value=ae.start!==""?ae:_e)},ee=L=>{L.stopPropagation(),M(""),J.current.value="",le(""),Q({start:null,end:null}),o&&typeof o=="function"&&o("")},xe=L=>{L.composedPath().includes(oe.current)||ne(!1)},w=L=>{u&&L.composedPath().includes(oe.current)||ne(!1)},he=()=>{l&&typeof l=="function"&&l()},de=()=>{s&&typeof s=="function"&&s()},F=()=>{const L=oe.current,X=T.current;if(!X||!L)return;const ce=L.getBoundingClientRect(),_e=window.innerHeight,ae=window.innerWidth;u?(X.style.position="fixed",ce.bottom+X.offsetHeight>_e?(X.style.top=`${window.scrollY+ce.top-X.offsetHeight-8}px`,X.style.bottom="unset"):(X.style.top=`${window.scrollY+ce.bottom+8}px`,X.style.bottom="unset"),ce.right+ce.width>ae?X.style.left=`${window.scrollX+ce.left+ce.width-X.offsetWidth}px`:X.style.left=`${window.scrollX+ce.left}px`):(ce.bottom>_e?(X.style.top="unset",X.style.bottom="calc(100% + 8px)"):(X.style.bottom="unset",X.style.top="calc(100% + 8px)"),ce.right>window.innerWidth?X.style.left=`calc(100% - ${ce.width}px)`:ce.left<0&&(X.style.left="0px"))};return ue.useEffect(()=>{if(n&&J.current.value===""){let L=Array.isArray(n)?{start:ze(n[0],a),end:n.length>1?ze(n[1],a):""}:ze(n,a).format(a);J.current.value=n,J.current.state=!0,console.log(n,a),L&&ge(L,!1,!0)}},[]),ue.useEffect(()=>{ie&&F()},[T,ie]),ue.useEffect(()=>(document.addEventListener("click",xe),document.addEventListener("wheel",w),()=>{document.removeEventListener("click",xe),document.removeEventListener("wheel",w)}),[]),I.jsxs("div",{className:`${x==="dark"?Zn.dark:""} ${Zn.datepickerContainer}`,children:[e&&I.jsxs("label",{className:Zn.datepickerLabel,style:m??{},children:[e," ",I.jsx("span",{className:Zn.required,style:g??{},children:t&&"*"})]}),I.jsxs("div",{ref:oe,onFocus:he,onBlur:de,className:`${Zn.datepicker} ${ie?Zn.focused:""} ${Zn[r]} ${z?Zn.disabled:""}`,onClick:()=>{z||ne(L=>!L)},style:f??{},children:[I.jsx("div",{style:{display:"grid",placeItems:"center"},children:I.jsx(NF,{})}),I.jsx("input",{type:"text",readOnly:!0,placeholder:p??"",value:pe}),pe?I.jsx("div",{onClick:L=>ee(L),style:{display:"grid",placeItems:"center"},children:I.jsx(Ou,{})}):I.jsx("div",{style:{display:"grid",placeItems:"center",transform:ie?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:I.jsx(Du,{})}),ie&&I.jsx(VF,{theme:x,defaultValue:J.current,CalendarRef:T,disabledDatesFrom:d,disabledDatesTill:c,disabledDatesRange:h,valueFormat:a,onChange:ge,CurrentMonth:S,setCurrentMonth:O,SelectedDate:P,setSelectedDate:M,IsFocused:ie,setIsFocused:ne,quickPick:te,mode:N,RangeSelection:$,setRangeSelection:Q,type:Y,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j})]}),i&&(i==null?void 0:i.visible)&&I.jsx("div",{style:C??{},className:`${Zn.datepickerHelperText} ${i!=null&&i.error?Zn.error:""}`,children:I.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},$F="Slider-module__sliderContainer",HF="Slider-module__slider",WF="Slider-module__sliderProgress",zF="Slider-module__thumb",GF="Slider-module__thumbLeft",UF="Slider-module__thumbRight",KF="Slider-module__values",jF="Slider-module__top",qF="Slider-module__bottom",YF="Slider-module__dark",bn={sliderContainer:$F,slider:HF,sliderProgress:WF,thumb:zF,thumbLeft:GF,thumbRight:UF,values:KF,top:jF,bottom:qF,dark:YF},XF=()=>{const[e,t]=ue.useState(),i=(n,r)=>{clearTimeout(e),t(setTimeout(()=>{n()},r??500))};return ue.useEffect(()=>()=>{clearTimeout(e)},[]),i},DI=({minValue:e,maxValue:t,min:i=0,max:n=100,label:r="top",showLabels:a=!1,withPercent:o=!1,debounceTime:s,onChange:l,theme:u,sliderContainerStyle:d,sliderStyle:c,sliderProgressStyle:h,thumbValuesStyle:f,thumbValueStyle:p,thumbStyle:m,hoverStyle:g,isDraggingStyle:C})=>{const b=ue.useRef(!0),[A,B]=ue.useState({minValue:e??i,maxValue:t??n}),[D,U]=ue.useState({min:!1,max:!1}),[H,W]=ue.useState({min:!1,max:!1}),G=XF(),j=ue.useRef(null),te=z=>{const ne=j.current.getBoundingClientRect(),pe=Math.min(Math.max(0,(z-ne.left)/ne.width),1);return Math.round(pe*(n-i)+i)},N=z=>ie=>{ie.preventDefault(),W(le=>({...le,[z]:!0}));const ne=le=>{const J=te(le.clientX);B(K=>z==="min"?{...K,minValue:Math.min(J,K.maxValue-1)}:{...K,maxValue:Math.max(J,K.minValue+1)})},pe=()=>{W(le=>({...le,[z]:!1})),document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",pe)};document.addEventListener("mousemove",ne),document.addEventListener("mouseup",pe)},Y=z=>{const ie=te(z.clientX),ne=Math.abs(ie-A.minValue),pe=Math.abs(ie-A.maxValue),le=ne<pe?"min":"max";B(J=>le==="min"?{...J,minValue:Math.min(ie,J.maxValue-1)}:{...J,maxValue:Math.max(ie,J.minValue+1)}),N(le)(z)},x={left:`${(A.minValue-i)/(n-i)*100}%`,width:`${(A.maxValue-A.minValue)/(n-i)*100}%`};return ue.useEffect(()=>{if(b.current){b.current=!1;return}l&&typeof l=="function"&&G(()=>l([A.minValue,A.maxValue]),s??100)},[A]),I.jsx("div",{style:d??{},className:`${u==="dark"?bn.dark:""} ${bn.sliderContainer}`,children:I.jsxs("div",{ref:j,style:c??{},className:bn.slider,onMouseDown:Y,children:[I.jsx("div",{className:bn.sliderProgress,style:{...x,...h??{}}}),I.jsx("div",{className:`${bn.thumb} ${bn.thumbLeft}`,style:{left:`${(A.minValue-i)/(n-i)*100}%`,...m??{}},onMouseEnter:()=>U(z=>({...z,min:!0})),onMouseLeave:()=>U(z=>({...z,min:!1})),onMouseDown:N("min"),children:a&&(D.min||H.min)&&I.jsx("div",{style:f??{},className:`${bn.values} ${bn[r]}`,children:I.jsxs("span",{style:p??{},children:[A.minValue,o&&"%"]})})}),I.jsx("div",{className:`${bn.thumb} ${bn.thumbRight}`,style:{left:`${(A.maxValue-i)/(n-i)*100}%`,...m??{}},onMouseEnter:()=>U(z=>({...z,max:!0})),onMouseLeave:()=>U(z=>({...z,max:!1})),onMouseDown:N("max"),children:a&&(D.max||H.max)&&I.jsx("div",{style:f??{},className:`${bn.values} ${bn[r]}`,children:I.jsxs("span",{style:p??{},children:[A.maxValue,o&&"%"]})})})]})})},ZF=({options:e,filterOptions:t,selectedDropdown:i,deleteDate:n,setdeleteDate:r,setdeleteTime:a,deleteTime:o,renderComp:s,isLastElement:l,theme:u,onSingleChange:d,fieldGap:c,fieldStyle:h,MultiselectKey:f})=>{const[p,m]=ue.useState(!1),[g,C]=ue.useState(!1),[b,A]=ue.useState(""),[B,D]=ue.useState(""),U=ue.useRef([]);ue.useEffect(()=>{e.options[0].type=="slider"&&(A(e.options[0].min),D(e.options[0].max))},[e]),ue.useEffect(()=>{C(x=>!x),e.options[0].type=="slider"&&(A(e.options[0].min),D(e.options[0].max))},[s]);const H=()=>{let x=t.map(ie=>ie.options);U.current=x;let z=[];for(let ie=0;ie<U.current.length;ie++)z.push(...U.current[ie]);d&&typeof d=="function"&&d(z.filter(ie=>ie.value!==""))},W=x=>x!=null&&x.style&&Object.keys(x==null?void 0:x.style).length>0?x==null?void 0:x.style:{width:x.width?x.width*13.6875+(x.width-1)*1.9375+"rem":"13.6875rem"},G=x=>x&&Object.keys(x).length>0?x:{display:"flex",justifyContent:"flex-start",flexWrap:"wrap",width:"100%",gap:"1.9375rem"},j=ue.useRef(null),te=ue.useRef(null),N=(x,z,ie)=>{switch(z){case"min":x<=ie.min?(j.current=ie.min,A(ie.min)):(j.current=x,A(x));break;case"max":x>ie.max?(te.current=ie.max,D(ie.max)):(te.current=x,D(x));break}ie.value=[{label:`${j.current} - ${te.current}`,range:[+j.current,+te.current]}],m(ne=>!ne),C(ne=>!ne)},Y=()=>I.jsx("div",{style:G(h),children:e.options.map((x,z)=>{var ie,ne,pe,le,J,K,y,T;switch(x.type){case"slider":return I.jsxs("div",{style:{width:"100%",padding:"0 10px",display:"grid",placeItems:"center"},children:[I.jsx(DI,{debounceTime:0,showLabels:!0,min:x.min,max:x.max,minValue:x.value!==""&&x.value[0].range[0]?(ie=x.value[0])==null?void 0:ie.range[0]:b,maxValue:x.value!==""&&x.value[0].range[1]!==0?(ne=x.value[0])==null?void 0:ne.range[1]:B,onChange:S=>{A(S[0]),D(S[1]),j.current=b,te.current=B,x.value=[{label:`${S?S[0]:b} - ${S?S[1]:B}`,range:S}],m(O=>!O),H()}}),I.jsxs("div",{className:pi.inputs,style:{width:"70%",margin:"auto",marginTop:"0.75rem",display:"flex",justifyContent:"space-between",gap:"0.625rem"},children:[I.jsx(bc,{label:"Minimum",value:x.value!==""&&x.value[0].range[0]!==0?(pe=x.value[0])==null?void 0:pe.range[0]:b,type:"number",onChange:S=>{N(S,"min",x),H()}}),I.jsx(bc,{label:"Maximum",value:x.value!==""&&x.value[0].range[1]!==0?x.value[0].range[1]:B,type:"number",onChange:S=>{N(S,"max",x),H()}})]})]},z);case"datePicker":return I.jsx("div",{style:W(x),children:ue.createElement(AI,{theme:u,...x.props,label:x.label,defaultValue:x.value.length>0?(le=x.value[0])!=null&&le.time?(J=x.value[0])==null?void 0:J.time:x.value:"",fixedDropdown:!0,key:n,onChange:S=>{S===""?x.value="":x.props.mode=="single"?x.value=[{label:S,time:S}]:x.props.mode=="range"&&(x.value=[{label:`${S.start} / ${S.end}`,time:[S.start,S.end]}]),H()}})},z);case"timePicker":return I.jsx("div",{style:W(x),children:ue.createElement(TI,{...x.props,label:x.label,key:o,theme:u,defaultHour:x.value.length>0?x.value[0].time.split(":")[0]:x.value,defaultMinute:x.value.length>0?x.value[0].time.split(":")[1]:x.value,fixedDropdown:!0,onClear:()=>{x.value="",a(!0),H(),m(S=>!S)},onTimeChange:S=>{S===""?x.value="":(x.value=[{label:S,time:S}],H(),m(O=>!O))}})},z);case"input":return I.jsx("div",{style:W(x),children:I.jsx(bc,{...x.props,theme:u,value:(K=x.value[0])!=null&&K.id?(y=x.value[0])==null?void 0:y.id:x.value,label:x.label,onChange:S=>{S!==""?x.value=[{id:S,label:S}]:x.value="",H(),m(O=>!O)}})},z);case"dropdown":return I.jsx("div",{style:W(x),children:ue.createElement(v_,{...x.props,label:x.label,theme:u,data:x.data,key:i,fixedDropdown:!0,withFilter:!0,selectedOptionID:((T=x.value[0])==null?void 0:T.id)??null,onSelect:S=>{Object.keys(S).length===0?x.value="":(!Array.isArray(x.value)||x.value[0]!==S)&&(x.value=[S],H())}})},z);case"multiselect":return I.jsx("div",{style:W(x),children:ue.createElement(v_,{...x.props,key:f,label:x.label,theme:u,fixedDropdown:!0,data:x.data,withMultiSelect:!0,onSelect:S=>{S.length===0?x.value="":(x.value=S,H())}})},z);case"checkBox":return I.jsxs("div",{className:pi.checkbox,children:[I.jsx(Ru,{...x.props,checked:x.checked,theme:u,change:S=>{x.checked=!x.checked,x.checked?x.value=[{label:x.label,id:x.label,checked:x.checked}]:x.value="",m(O=>!O),H()}}),I.jsx("span",{className:pi.checkboxLabel,children:x.label})]},z);case"radio":return I.jsxs("div",{className:pi.checkbox,children:[I.jsx(bI,{...x.props,checked:x.checked,withUncheckState:!0,theme:u,change:S=>{x.checked=!x.checked,x.checked?x.value=[{label:x.label,id:x.label,checked:x.checked}]:x.value="",m(O=>!O),H()}}),I.jsx("span",{className:pi.checkboxLabel,children:x.label})]},z)}})});return I.jsxs("div",{className:pi.filterCont,children:[I.jsxs("div",{className:pi.title,children:[I.jsx("h3",{children:e.title}),I.jsx("p",{children:(e==null?void 0:e.subText)??""})]}),I.jsx("div",{className:pi.renderComponent,children:Y()}),!l&&I.jsx("hr",{})]})},OI=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",fill:"none",viewBox:"0 0 14 14",children:I.jsx("path",{fill:"#555F62",stroke:"#555F62",strokeWidth:"0.2",d:"M3.944 9.045c.9 0 1.664-.582 1.938-1.39h7.229a.656.656 0 100-1.31H5.88a2.045 2.045 0 00-3.874 0H.89a.656.656 0 100 1.31h1.118a2.045 2.045 0 001.937 1.39zm6.111.633c-.9 0-1.663.581-1.937 1.389H.89a.656.656 0 100 1.311h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.311h-1.119a2.045 2.045 0 00-1.937-1.389zm0-9.445c-.9 0-1.663.582-1.937 1.39H.89a.656.656 0 100 1.31h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.31h-1.119a2.045 2.045 0 00-1.937-1.39zm.734 2.045a.733.733 0 11-1.467 0 .733.733 0 011.467 0zm0 9.444a.733.733 0 11-1.467 0 .733.733 0 011.467 0zM3.21 7a.733.733 0 111.467 0A.733.733 0 013.21 7z"})}),JF=({onApply:e,filterOptions:t,modalSize:i,buttonStyle:n,tagPosition:r="bottom",rowReverse:a=!0,filterIcon:o,visibleTagsNumber:s,onClearAll:l,theme:u,resultNumber:d,onSingleChange:c,loaded:h,onFilterClick:f,popupWidth:p,fieldGap:m,labels:g,singleFieldStyle:C,buttonLabel:b,initialApply:A=!1,withTags:B=!0,clickOutside:D=!0,width:U,popupProps:H,tagsProps:W})=>{var X,ce,_e,ae,we,ke,Ae,Ne,ut,et,Ze,li,jt,Ht,mt,Bi,Li,wt,qe,ct,mi,Pi;const[G,j]=ue.useState(!1),[te,N]=ue.useState(d??null),[Y,x]=ue.useState(!1);ue.useEffect(()=>{h&&j(h)},[h]),ue.useEffect(()=>{N(d)},[d]),ue.useEffect(()=>{A&&oe()},[]);const[z,ie]=ue.useState(!1),[ne,pe]=ue.useState(!1),[le,J]=ue.useState(!1),[K,y]=ue.useState(!1),[T,S]=ue.useState(!1),[O,P]=ue.useState(0),M=ue.useRef([]),$=ue.useRef([]),Q=ue.useRef([]),oe=()=>{let We=t.map(gt=>gt.options);M.current=We;let ht=[];for(let gt=0;gt<M.current.length;gt++)ht.push(...M.current[gt]);$.current=ht;let Zt=[];for(let gt=0;gt<$.current.length;gt++)Zt.push(...$.current[gt].value);Q.current=Zt,j(!1),e&&typeof e=="function"&&e($.current.filter(gt=>gt.value!==""))},ge=()=>{l&&typeof l=="function"&&l([])},ee=We=>{We.selected&&(We.selected=!1);let ht=Q.current.filter(gt=>gt.label+gt.id===We.label+We.id);t.forEach(gt=>{gt.options.map(Wt=>{Wt.value.includes(ht[0])&&(Wt.data&&(Wt.data.filter(yr=>yr.itemNodeID===ht[0].itemNodeID)[0].selected=!1,Wt.value=Wt.value.filter(yr=>yr.selected!==!1)),Wt.type=="dropdown"&&(Wt.value=""),Wt.type=="input"&&(Wt.value=""),(Wt.type=="checkBox"||Wt.type=="toggle"||Wt.type=="radio")&&(Wt.value="",Wt.checked=!1),Wt.type=="slider"&&(Wt.value=""),(Wt.type=="datePicker"||Wt.type=="timePicker")&&(Wt.value=""))})}),y(gt=>!gt),S(gt=>!gt),pe(gt=>!gt),J(gt=>!gt);let Zt=$.current.filter(gt=>gt.value.length>0);e&&typeof e=="function"&&e(Zt),Q.current=Q.current.filter(gt=>gt.label+gt.id!==We.label+We.id),Q.current.length===0&&ge(),ie(gt=>!gt)},[xe,w]=ue.useState(s),[he,de]=ue.useState(!0),[F,L]=ue.useState(!1);return ue.useEffect(()=>{const We=ht=>{ht.key==="Enter"&&G&&oe()};return window.addEventListener("keypress",We),()=>{window.removeEventListener("keypress",We)}},[oe]),I.jsxs("div",{className:`${u==="dark"?pi.dark:""} ${pi.compWrapper}`,style:{display:r=="side"?"flex":"block",flexDirection:a?"row-reverse":"row",justifyContent:a?"space-between":null,gap:`${a?"0":"1"}.125rem`},children:[I.jsxs("div",{className:pi.filterButton,style:(n==null?void 0:n.style)??null,onClick:()=>{f&&typeof f=="function"&&f([]),h||h==!1?j(h):j(!0)},children:[I.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:o||I.jsx(OI,{})}),I.jsxs("span",{className:pi.filter,style:(b==null?void 0:b.style)??{},children:[(b==null?void 0:b.label)??"Filter",te&&!B&&I.jsx("span",{className:pi.resultNumber,style:((X=g==null?void 0:g.showResultName)==null?void 0:X.style)??{},children:te??""})]})]}),G&&I.jsxs(EI,{theme:u,visible:!0,size:i??"medium",titleStyle:((ce=g==null?void 0:g.headerName)==null?void 0:ce.style)??{},options:{title:(_e=g==null?void 0:g.headerName)!=null&&_e.label||((ae=g==null?void 0:g.headerName)==null?void 0:ae.label.length)>0?(we=g==null?void 0:g.headerName)==null?void 0:we.label:"Filters",align:"center"},onClickOutside:()=>D?j(!1):null,popupContainerStyle:{width:U??"825px"},...H,children:[I.jsx("div",{style:{maxHeight:"65vh",overflowY:"auto",paddingBottom:"4px"},children:t.map((We,ht)=>{let Zt=ht===t.length-1;return I.jsx("div",{children:I.jsx(ZF,{MultiselectKey:Y,popupWidth:p,fieldStyle:(We==null?void 0:We.style)??{},singleFieldStyle:C,fieldGap:m,setrenderComp:L,renderComp:F,deleteDate:K,setdeleteDate:y,setdeleteTime:S,deleteTime:T,setopenPopup:j,options:We,filterOptions:t,tagValue:Q.current,selectedDropdown:ne,setselectedDropdown:pe,deleteMultiSelect:le,setdeleteMultiSelect:J,isLastElement:Zt,setcounter:P,theme:u,onSingleChange:c})},ht)})}),I.jsxs("div",{className:pi.footer,children:[I.jsx("div",{className:pi.clear,onClick:()=>{c&&typeof c=="function"&&c([]),t.forEach(We=>{We.options.forEach(ht=>{ht.value="",ht.type=="multiselect"&&ht.data.forEach(Zt=>{Zt.selected=!1}),(ht.type=="radio"||ht.type=="checkBox")&&(ht.checked=!1)})}),Q.current=[],pe(We=>!We),J(We=>!We),y(We=>!We),S(We=>!We),P(0),ge(),e&&typeof e=="function"&&e(Q.current),L(We=>!We),x(We=>!We),ie(We=>!We)},style:((ke=g==null?void 0:g.clearAllName)==null?void 0:ke.style)??{},children:(Ae=g==null?void 0:g.clearAllName)!=null&&Ae.label||((ut=(Ne=g==null?void 0:g.clearAllName)==null?void 0:Ne.label)==null?void 0:ut.length)>0?(et=g==null?void 0:g.clearAllName)==null?void 0:et.label:"Clear All"}),I.jsxs("div",{className:pi.buttonsWrapper,children:[I.jsx(p_,{buttonStyle:(Ze=g==null?void 0:g.closeName)!=null&&Ze.style?{...(li=g==null?void 0:g.closeName)==null?void 0:li.style,borderRadius:"0.375rem",backgroundColor:"transparent"}:{borderRadius:"0.375rem",backgroundColor:"transparent"},label:(jt=g==null?void 0:g.closeName)!=null&&jt.label||((mt=(Ht=g==null?void 0:g.closeName)==null?void 0:Ht.label)==null?void 0:mt.length)>0?(Bi=g==null?void 0:g.closeName)==null?void 0:Bi.label:"Close",onClick:()=>j(!1)}),I.jsx(p_,{buttonStyle:(Li=g==null?void 0:g.showResultName)!=null&&Li.style?{...(wt=g==null?void 0:g.showResultName)==null?void 0:wt.style,borderRadius:"0.375rem"}:{borderRadius:"0.375rem"},label:(qe=g==null?void 0:g.showResultName)!=null&&qe.label||((mi=(ct=g==null?void 0:g.showResultName)==null?void 0:ct.label)==null?void 0:mi.length)>0?(Pi=g==null?void 0:g.showResultName)==null?void 0:Pi.label:`Show ${te??""} result`,onClick:oe})]})]})]}),B&&Q.current.length>0&&I.jsxs("div",{style:r=="side"?{marginTop:0}:{},className:pi.tag,children:[Q.current.slice(0,xe).map((We,ht)=>I.jsx(Wm,{id:We.id,label:We.label,withClose:!0,theme:u,...W,onClose:Zt=>ee(We)},ht)),Q.current.length>s&&xe<=s&&he&&I.jsx("button",{className:pi.showButton,onClick:()=>{w(Q.current.length),de(!1)},children:"Show More"}),!he&&Q.current.length>=s&&I.jsx("button",{className:pi.showButton,onClick:()=>{w(s),de(!0)},children:"Show Less"}),I.jsx("button",{className:pi.showButton,onClick:()=>{t.forEach(We=>{We.options.forEach(ht=>{ht.value="",ht.type=="multiselect"&&ht.data.forEach(Zt=>{Zt.selected=!1}),(ht.type=="radio"||ht.type=="checkBox")&&(ht.checked=!1)})}),Q.current=[],pe(We=>!We),J(We=>!We),y(We=>!We),S(We=>!We),P(0),ge(),x(We=>!We),e&&typeof e=="function"&&e(Q.current),L(We=>!We),ie(We=>!We)},children:"Clear All"})]})]})},QF="ProgressSteps-module__steps",eM="ProgressSteps-module__currentStep",tM="ProgressSteps-module__progressBar",iM="ProgressSteps-module__progressBarVertical",nM="ProgressSteps-module__singleStep",rM="ProgressSteps-module__texts",aM="ProgressSteps-module__currentText",oM="ProgressSteps-module__name",sM="ProgressSteps-module__subTitle",lM="ProgressSteps-module__vertical",uM="ProgressSteps-module__radioWrapper",dM="ProgressSteps-module__checked",cM="ProgressSteps-module__innerCircle",hM="ProgressSteps-module__radioState",fM="ProgressSteps-module__disabled",pM="ProgressSteps-module__dark",Jt={steps:QF,currentStep:eM,progressBar:tM,progressBarVertical:iM,singleStep:nM,texts:rM,currentText:aM,name:oM,subTitle:sM,vertical:lM,radioWrapper:uM,checked:dM,innerCircle:cM,radioState:hM,disabled:fM,dark:pM},vM=({width:e})=>I.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"32",height:e??"32",viewBox:"0 0 32 32",fill:"none",children:[I.jsx("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"#0158FF"}),I.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7953 9.8534L13.2487 19.0667L10.7153 16.3601C10.2487 15.9201 9.51534 15.8934 8.982 16.2667C8.462 16.6534 8.31534 17.3334 8.63534 17.8801L11.6353 22.7601C11.9287 23.2134 12.4353 23.4934 13.0087 23.4934C13.5553 23.4934 14.0753 23.2134 14.3687 22.7601C14.8487 22.1334 24.0087 11.2134 24.0087 11.2134C25.2087 9.98674 23.7553 8.90674 22.7953 9.84007V9.8534Z",fill:"white"})]}),_M=({currentStep:e,stepsData:t,onStepClick:i,independentStep:n,fillIcon:r,stepIcon:a,emptyIcon:o,gap:s=20,vertical:l=!1,stepsStyle:u,currentStepStyle:d,progressBarStyle:c,singleStepStyle:h,textsStyle:f,theme:p})=>{const m=b=>{i&&typeof i=="function"&&n&&i(b)},g=b=>l?{...b.id===t[t.length-1].id?{height:"0",top:0,left:0}:b.id===t[t.length-2].id?{height:`calc(100% + ${s}px`,top:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"}:{height:`calc(100% + ${s}px)`,top:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"},...c??{}}:{...b.id===t[t.length-1].id?{width:"0",left:0,right:0}:b.id===t[t.length-2].id?{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"}:{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"},...c??{}},C=b=>b;return I.jsx("div",{className:`${p==="dark"?Jt.dark:""} ${Jt.steps} ${l?Jt.vertical:""}`,style:{...u,gap:s+"px"},children:t.map(b=>I.jsxs("div",{style:d??{},className:`${Jt.currentStep} ${b.disabled?Jt.disabled:""}`,onClick:()=>m(b),children:[l?I.jsx("div",{className:Jt.progressBarVertical,style:g(b)}):I.jsx("div",{style:g(b),className:Jt.progressBar}),I.jsx("div",{className:Jt.singleStep,style:h??{},children:I.jsx(I.Fragment,{children:b.isAllFilled?I.jsx(I.Fragment,{children:r?C(r):I.jsx(vM,{width:"24px"})}):e<(b==null?void 0:b.id)?I.jsx(I.Fragment,{children:o?C(o):I.jsx("div",{className:`${Jt.radioWrapper} ${Jt.md} ${Jt.checked} ${Jt.disabled}`,children:I.jsx("div",{className:Jt.radioState,children:I.jsx("div",{className:Jt.innerCircle})})})}):I.jsx(I.Fragment,{children:a?C(a):I.jsx("div",{className:`${Jt.radioWrapper} ${Jt.md} ${Jt.checked} `,children:I.jsx("div",{className:Jt.radioState,children:I.jsx("div",{className:Jt.innerCircle})})})})})}),I.jsxs("div",{className:`${Jt.texts} ${b.id===e?Jt.currentText:{}}`,style:f??{},children:[I.jsx("p",{style:(b==null?void 0:b.titleStyle)??{},className:Jt.name,children:b==null?void 0:b.name}),typeof(b==null?void 0:b.subTitle)=="function"?b.subTitle():I.jsx("p",{className:Jt.subTitle,style:b!=null&&b.subTitleStyle?{...b.subTitleStyle}:{},children:(b==null?void 0:b.subTitle)??""})??""]})]},b.id))})};var ve={},mM={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string","[object Null]":"null"},Ln=function(e){var t=Object.prototype.toString.call(e);return typeof e=="object"?mM[t]||"object":typeof e},Ps=function(e){return typeof e=="boolean"},QC=function(e){return Et(e)&&e.toString().indexOf("e")!==-1},Wi=function(e){return Ln(e)==="date"},E=function(e){return e!=null},Ie=function(e){return typeof e=="function"},Ve=function(e){return typeof e=="string"},Et=function(e){return typeof e=="number"&&isFinite(e)||!isNaN(e-parseFloat(e))},$e=function(e){return Ln(e)==="object"},Pn=function(e){var t;for(t in e)return!1;return!0},Ye=function(e){if(!e||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e),i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&Object.toString.call(i)===Object.toString.call(Object)},Zl=function(e){return["object","array","function"].indexOf(Ln(e))===-1},Xt=function(e){return e!=null&&e===e.window},mn=function(e){return!!e&&!!(e.jquery||e.dxRenderer)},ku=function(e){return!!e&&Ie(e.then)},Um=function(e){return!!e&&Ie(e.done)&&Ie(e.fail)},gM=function(e){return!!(e&&e.preventDefault)},RI=function(e,t,i){e=e||{};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];(!(n in e)||i)&&(e[n]=r)}return e},k=function e(t){t=t||{};var i=1,n=!1;for(typeof t=="boolean"&&(n=t,t=arguments[1]||{},i++);i<arguments.length;i++){var r=arguments[i];if(r!=null)for(var a in r){var o=t[a],s=r[a],l=!1,u=void 0;a==="__proto__"||a==="constructor"||t===s||(n&&s&&(Ye(s)||(l=Array.isArray(s)))?(l?u=o&&Array.isArray(o)?o:[]:u=o&&Ye(o)?o:{},t[a]=e(n,u,s)):s!==void 0&&(t[a]=s))}}return t},ti=(e,t)=>{if(Array.isArray(e))return e.map(t);var i=[];for(var n in e)i.push(t(e[n],n));return i},V=(e,t)=>{if(e){if("length"in e)for(var i=0;i<e.length&&t.call(e[i],i,e[i])!==!1;i++);else for(var n in e)if(t.call(e[n],n,e[n])===!1)break;return e}},CM=function(){},If=function(e){return typeof console>"u"||!Ie(console[e])?CM:console[e].bind(console)},Bu={info:If("info"),warn:If("warn"),error:If("error")},Km=function(){var e=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(t){return String(t).replace(e[0],"&amp;").replace(e[1],"&quot;").replace(e[2],"&#39;").replace(e[3],"&lt;").replace(e[4],"&gt;")}}(),yM=function(e){switch(typeof e){case"string":return e.split(/\s+/,4);case"object":return[e.x||e.h||e.left,e.y||e.v||e.top,e.x||e.h||e.right,e.y||e.v||e.bottom];case"number":return[e];default:return e}},xM=function(e){var t=yM(e),i=parseInt(t&&t[0],10),n=parseInt(t&&t[1],10),r=parseInt(t&&t[2],10),a=parseInt(t&&t[3],10);return isFinite(i)||(i=0),isFinite(n)||(n=i),isFinite(r)||(r=i),isFinite(a)||(a=n),{top:n,right:r,bottom:a,left:i}};function Kr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Ie(e)?e(...i):(i.forEach((r,a)=>{Ve(r)&&(r=r.replace(/\$/g,"$$$$"));var o=new RegExp("\\{"+a+"\\}","gm");e=e.replace(o,r)}),e)}var Jl=function(){var e=/\s/g;return function(t){return!t||!t.replace(e,"")}}(),bM="22.1.3",SM="http://js.devexpress.com/error/"+bM.split(".").slice(0,2).join("_")+"/";function jm(e,t){var i={ERROR_MESSAGES:k(t,e),Error:function(){return o([].slice.call(arguments))},log:function(l){var u="log";/^E\d+$/.test(l)?u="error":/^W\d+$/.test(l)&&(u="warn"),Bu[u](u==="log"?l:n([].slice.call(arguments)))}};function n(l){var u=l[0];return l=l.slice(1),a(u,r(u,l))}function r(l,u){return u=[i.ERROR_MESSAGES[l]].concat(u),Kr.apply(this,u).replace(/\.*\s*?$/,"")}function a(l,u){return Kr.apply(this,[`{0} - {1}. See:
61
+ ${de?pt.disabled:""}`,onClick:()=>le(P,M),children:P.date()},$)})},O))})]})]})]})]})},NF=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:I.jsx("path",{d:"M17.5 8.33464H2.5M13.3333 1.66797V5.0013M6.66667 1.66797V5.0013M6.5 18.3346H13.5C14.9001 18.3346 15.6002 18.3346 16.135 18.0622C16.6054 17.8225 16.9878 17.44 17.2275 16.9696C17.5 16.4348 17.5 15.7348 17.5 14.3346V7.33464C17.5 5.9345 17.5 5.23444 17.2275 4.69966C16.9878 4.22925 16.6054 3.8468 16.135 3.60712C15.6002 3.33464 14.9001 3.33464 13.5 3.33464H6.5C5.09987 3.33464 4.3998 3.33464 3.86502 3.60712C3.39462 3.8468 3.01217 4.22925 2.77248 4.69966C2.5 5.23444 2.5 5.9345 2.5 7.33464V14.3346C2.5 15.7348 2.5 16.4348 2.77248 16.9696C3.01217 17.44 3.39462 17.8225 3.86502 18.0622C4.3998 18.3346 5.09987 18.3346 6.5 18.3346Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});ze.extend(Gm);const AI=({label:e,required:t=!1,msg:i,defaultValue:n,size:r="md",valueFormat:a="DD-MM-YYYY",onChange:o,onBlur:s,onFocus:l,fixedDropdown:u,disabledDatesFrom:d,disabledDatesTill:c,disabledDatesRange:h,datepickerStyle:f,placeholder:p,datepickerLabelStyle:m,requiredStyle:g,datepickerHelperTextStyle:C,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j,quickPick:te,mode:N="single",type:Y="single",theme:x="light",disabled:z=!1})=>{const[ie,ne]=ue.useState(!1),[pe,le]=ue.useState(""),J=ue.useRef({state:!1,value:""}),[K,y]=ue.useState(!1),T=ue.useRef(null),[S,O]=ue.useState(ze()),[P,M]=ue.useState(""),[$,Q]=ue.useState({start:null,end:null}),oe=ue.useRef(null),ge=(L,X,ce)=>{let _e="",ae={start:"",end:""};!X&&(N==="single"||typeof L=="string")&&(_e=L,le(_e)),!X&&(N!=="single"||typeof L!="string")&&(_e=`${ze((L==null?void 0:L.start)??"").format(a)} / ${L!=null&&L.end?ze(L.end).format(a):""}`,ae.start=ze((L==null?void 0:L.start)??"").format(a),ae.end=L!=null&&L.end?ze(L.end).format(a):"",le(_e)),X&&(_e=ze(L).format(a),le(_e)),L!=null&&L.end&&ne(!1),o&&typeof o=="function"&&!ce&&(o(ae.start!==""?ae:_e),J.current.value=ae.start!==""?ae:_e)},ee=L=>{L.stopPropagation(),M(""),J.current.value="",le(""),Q({start:null,end:null}),o&&typeof o=="function"&&o("")},xe=L=>{L.composedPath().includes(oe.current)||ne(!1)},w=L=>{u&&L.composedPath().includes(oe.current)||ne(!1)},he=()=>{l&&typeof l=="function"&&l()},de=()=>{s&&typeof s=="function"&&s()},F=()=>{const L=oe.current,X=T.current;if(!X||!L)return;const ce=L.getBoundingClientRect(),_e=window.innerHeight,ae=window.innerWidth;u?(X.style.position="fixed",ce.bottom+X.offsetHeight>_e?(X.style.top=`${window.scrollY+ce.top-X.offsetHeight-8}px`,X.style.bottom="unset"):(X.style.top=`${window.scrollY+ce.bottom+8}px`,X.style.bottom="unset"),ce.right+ce.width>ae?X.style.left=`${window.scrollX+ce.left+ce.width-X.offsetWidth}px`:X.style.left=`${window.scrollX+ce.left}px`):(ce.bottom>_e?(X.style.top="unset",X.style.bottom="calc(100% + 8px)"):(X.style.bottom="unset",X.style.top="calc(100% + 8px)"),ce.right>window.innerWidth?X.style.left=`calc(100% - ${ce.width}px)`:ce.left<0&&(X.style.left="0px"))};return ue.useEffect(()=>{if(n&&J.current.value===""){let L=Array.isArray(n)?{start:ze(n[0],a),end:n.length>1?ze(n[1],a):""}:ze(n,a).format(a);J.current.value=n,J.current.state=!0,console.log(n,a),L&&ge(L,!1,!0)}},[]),ue.useEffect(()=>{ie&&F()},[T,ie]),ue.useEffect(()=>(document.addEventListener("click",xe),document.addEventListener("wheel",w),()=>{document.removeEventListener("click",xe),document.removeEventListener("wheel",w)}),[]),I.jsxs("div",{className:`${x==="dark"?Zn.dark:""} ${Zn.datepickerContainer}`,children:[e&&I.jsxs("label",{className:Zn.datepickerLabel,style:m??{},children:[e," ",I.jsx("span",{className:Zn.required,style:g??{},children:t&&"*"})]}),I.jsxs("div",{ref:oe,onFocus:he,onBlur:de,className:`${Zn.datepicker} ${ie?Zn.focused:""} ${Zn[r]} ${z?Zn.disabled:""}`,onClick:()=>{z||ne(L=>!L)},style:f??{},children:[I.jsx("div",{style:{display:"grid",placeItems:"center"},children:I.jsx(NF,{})}),I.jsx("input",{type:"text",readOnly:!0,placeholder:p??"",value:pe}),pe?I.jsx("div",{onClick:L=>ee(L),style:{display:"grid",placeItems:"center"},children:I.jsx(Ou,{})}):I.jsx("div",{style:{display:"grid",placeItems:"center",transform:ie?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:I.jsx(Du,{})}),ie&&I.jsx(VF,{theme:x,defaultValue:J.current,CalendarRef:T,disabledDatesFrom:d,disabledDatesTill:c,disabledDatesRange:h,valueFormat:a,onChange:ge,CurrentMonth:S,setCurrentMonth:O,SelectedDate:P,setSelectedDate:M,IsFocused:ie,setIsFocused:ne,quickPick:te,mode:N,RangeSelection:$,setRangeSelection:Q,type:Y,selectedStyle:b,endDateStyle:A,startDateStyle:B,inRangeStyle:D,otherMonthStyle:U,todayStyle:H,weekDayStyle:W,quickPickStyle:G,monthStyle:j})]}),i&&(i==null?void 0:i.visible)&&I.jsx("div",{style:C??{},className:`${Zn.datepickerHelperText} ${i!=null&&i.error?Zn.error:""}`,children:I.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},$F="Slider-module__sliderContainer",HF="Slider-module__slider",WF="Slider-module__sliderProgress",zF="Slider-module__thumb",GF="Slider-module__thumbLeft",UF="Slider-module__thumbRight",KF="Slider-module__values",jF="Slider-module__top",qF="Slider-module__bottom",YF="Slider-module__dark",bn={sliderContainer:$F,slider:HF,sliderProgress:WF,thumb:zF,thumbLeft:GF,thumbRight:UF,values:KF,top:jF,bottom:qF,dark:YF},XF=()=>{const[e,t]=ue.useState(),i=(n,r)=>{clearTimeout(e),t(setTimeout(()=>{n()},r??500))};return ue.useEffect(()=>()=>{clearTimeout(e)},[]),i},DI=({minValue:e,maxValue:t,min:i=0,max:n=100,label:r="top",showLabels:a=!1,withPercent:o=!1,debounceTime:s,onChange:l,theme:u,sliderContainerStyle:d,sliderStyle:c,sliderProgressStyle:h,thumbValuesStyle:f,thumbValueStyle:p,thumbStyle:m,hoverStyle:g,isDraggingStyle:C})=>{const b=ue.useRef(!0),[A,B]=ue.useState({minValue:e??i,maxValue:t??n}),[D,U]=ue.useState({min:!1,max:!1}),[H,W]=ue.useState({min:!1,max:!1}),G=XF(),j=ue.useRef(null),te=z=>{const ne=j.current.getBoundingClientRect(),pe=Math.min(Math.max(0,(z-ne.left)/ne.width),1);return Math.round(pe*(n-i)+i)},N=z=>ie=>{ie.preventDefault(),W(le=>({...le,[z]:!0}));const ne=le=>{const J=te(le.clientX);B(K=>z==="min"?{...K,minValue:Math.min(J,K.maxValue-1)}:{...K,maxValue:Math.max(J,K.minValue+1)})},pe=()=>{W(le=>({...le,[z]:!1})),document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",pe)};document.addEventListener("mousemove",ne),document.addEventListener("mouseup",pe)},Y=z=>{const ie=te(z.clientX),ne=Math.abs(ie-A.minValue),pe=Math.abs(ie-A.maxValue),le=ne<pe?"min":"max";B(J=>le==="min"?{...J,minValue:Math.min(ie,J.maxValue-1)}:{...J,maxValue:Math.max(ie,J.minValue+1)}),N(le)(z)},x={left:`${(A.minValue-i)/(n-i)*100}%`,width:`${(A.maxValue-A.minValue)/(n-i)*100}%`};return ue.useEffect(()=>{if(b.current){b.current=!1;return}l&&typeof l=="function"&&G(()=>l([A.minValue,A.maxValue]),s??100)},[A]),I.jsx("div",{style:d??{},className:`${u==="dark"?bn.dark:""} ${bn.sliderContainer}`,children:I.jsxs("div",{ref:j,style:c??{},className:bn.slider,onMouseDown:Y,children:[I.jsx("div",{className:bn.sliderProgress,style:{...x,...h??{}}}),I.jsx("div",{className:`${bn.thumb} ${bn.thumbLeft}`,style:{left:`${(A.minValue-i)/(n-i)*100}%`,...m??{}},onMouseEnter:()=>U(z=>({...z,min:!0})),onMouseLeave:()=>U(z=>({...z,min:!1})),onMouseDown:N("min"),children:a&&(D.min||H.min)&&I.jsx("div",{style:f??{},className:`${bn.values} ${bn[r]}`,children:I.jsxs("span",{style:p??{},children:[A.minValue,o&&"%"]})})}),I.jsx("div",{className:`${bn.thumb} ${bn.thumbRight}`,style:{left:`${(A.maxValue-i)/(n-i)*100}%`,...m??{}},onMouseEnter:()=>U(z=>({...z,max:!0})),onMouseLeave:()=>U(z=>({...z,max:!1})),onMouseDown:N("max"),children:a&&(D.max||H.max)&&I.jsx("div",{style:f??{},className:`${bn.values} ${bn[r]}`,children:I.jsxs("span",{style:p??{},children:[A.maxValue,o&&"%"]})})})]})})},ZF=({options:e,filterOptions:t,selectedDropdown:i,deleteDate:n,setdeleteDate:r,setdeleteTime:a,deleteTime:o,renderComp:s,isLastElement:l,theme:u,onSingleChange:d,fieldGap:c,fieldStyle:h,MultiselectKey:f})=>{const[p,m]=ue.useState(!1),[g,C]=ue.useState(!1),[b,A]=ue.useState(""),[B,D]=ue.useState(""),U=ue.useRef([]);ue.useEffect(()=>{e.options[0].type=="slider"&&(A(e.options[0].min),D(e.options[0].max))},[e]),ue.useEffect(()=>{C(x=>!x),e.options[0].type=="slider"&&(A(e.options[0].min),D(e.options[0].max))},[s]);const H=()=>{let x=t.map(ie=>ie.options);U.current=x;let z=[];for(let ie=0;ie<U.current.length;ie++)z.push(...U.current[ie]);d&&typeof d=="function"&&d(z.filter(ie=>ie.value!==""))},W=x=>x!=null&&x.style&&Object.keys(x==null?void 0:x.style).length>0?x==null?void 0:x.style:{width:x.width?x.width*13.6875+(x.width-1)*1.9375+"rem":"13.6875rem"},G=x=>x&&Object.keys(x).length>0?x:{display:"flex",justifyContent:"flex-start",flexWrap:"wrap",width:"100%",gap:"1.9375rem"},j=ue.useRef(null),te=ue.useRef(null),N=(x,z,ie)=>{switch(z){case"min":x<=ie.min?(j.current=ie.min,A(ie.min)):(j.current=x,A(x));break;case"max":x>ie.max?(te.current=ie.max,D(ie.max)):(te.current=x,D(x));break}ie.value=[{label:`${j.current} - ${te.current}`,range:[+j.current,+te.current]}],m(ne=>!ne),C(ne=>!ne)},Y=()=>I.jsx("div",{style:G(h),children:e.options.map((x,z)=>{var ie,ne,pe,le,J,K,y,T;switch(x.type){case"slider":return I.jsxs("div",{style:{width:"100%",padding:"0 10px",display:"grid",placeItems:"center"},children:[I.jsx(DI,{debounceTime:0,showLabels:!0,min:x.min,max:x.max,minValue:x.value!==""&&x.value[0].range[0]?(ie=x.value[0])==null?void 0:ie.range[0]:b,maxValue:x.value!==""&&x.value[0].range[1]!==0?(ne=x.value[0])==null?void 0:ne.range[1]:B,onChange:S=>{A(S[0]),D(S[1]),j.current=b,te.current=B,x.value=[{label:`${S?S[0]:b} - ${S?S[1]:B}`,range:S}],m(O=>!O),H()}}),I.jsxs("div",{className:pi.inputs,style:{width:"70%",margin:"auto",marginTop:"0.75rem",display:"flex",justifyContent:"space-between",gap:"0.625rem"},children:[I.jsx(bc,{label:"Minimum",value:x.value!==""&&x.value[0].range[0]!==0?(pe=x.value[0])==null?void 0:pe.range[0]:b,type:"number",onChange:S=>{N(S,"min",x),H()}}),I.jsx(bc,{label:"Maximum",value:x.value!==""&&x.value[0].range[1]!==0?x.value[0].range[1]:B,type:"number",onChange:S=>{N(S,"max",x),H()}})]})]},z);case"datePicker":return I.jsx("div",{style:W(x),children:ue.createElement(AI,{theme:u,...x.props,label:x.label,defaultValue:x.value.length>0?(le=x.value[0])!=null&&le.time?(J=x.value[0])==null?void 0:J.time:x.value:"",fixedDropdown:!0,key:n,onChange:S=>{S===""?x.value="":x.props.mode=="single"?x.value=[{label:S,time:S}]:x.props.mode=="range"&&(x.value=[{label:`${S.start} / ${S.end}`,time:[S.start,S.end]}]),H()}})},z);case"timePicker":return I.jsx("div",{style:W(x),children:ue.createElement(TI,{...x.props,label:x.label,key:o,theme:u,defaultHour:x.value.length>0?x.value[0].time.split(":")[0]:x.value,defaultMinute:x.value.length>0?x.value[0].time.split(":")[1]:x.value,fixedDropdown:!0,onClear:()=>{x.value="",a(!0),H(),m(S=>!S)},onTimeChange:S=>{S===""?x.value="":(x.value=[{label:S,time:S}],H(),m(O=>!O))}})},z);case"input":return I.jsx("div",{style:W(x),children:I.jsx(bc,{...x.props,theme:u,value:(K=x.value[0])!=null&&K.id?(y=x.value[0])==null?void 0:y.id:x.value,label:x.label,onChange:S=>{S!==""?x.value=[{id:S,label:S}]:x.value="",H(),m(O=>!O)}})},z);case"dropdown":return I.jsx("div",{style:W(x),children:ue.createElement(v_,{...x.props,label:x.label,theme:u,data:x.data,key:i,fixedDropdown:!0,withFilter:!0,selectedOptionID:((T=x.value[0])==null?void 0:T.id)??null,onSelect:S=>{Object.keys(S).length===0?x.value="":(!Array.isArray(x.value)||x.value[0]!==S)&&(x.value=[S],H())}})},z);case"multiselect":return I.jsx("div",{style:W(x),children:ue.createElement(v_,{...x.props,key:f,label:x.label,theme:u,fixedDropdown:!0,data:x.data,withMultiSelect:!0,onSelect:S=>{S.length===0?x.value="":(x.value=S,H())}})},z);case"checkBox":return I.jsxs("div",{className:pi.checkbox,children:[I.jsx(Ru,{...x.props,checked:x.checked,theme:u,change:S=>{x.checked=!x.checked,x.checked?x.value=[{label:x.label,id:x.label,checked:x.checked}]:x.value="",m(O=>!O),H()}}),I.jsx("span",{className:pi.checkboxLabel,children:x.label})]},z);case"radio":return I.jsxs("div",{className:pi.checkbox,children:[I.jsx(bI,{...x.props,checked:x.checked,withUncheckState:!0,theme:u,change:S=>{x.checked=!x.checked,x.checked?x.value=[{label:x.label,id:x.label,checked:x.checked}]:x.value="",m(O=>!O),H()}}),I.jsx("span",{className:pi.checkboxLabel,children:x.label})]},z)}})});return I.jsxs("div",{className:pi.filterCont,children:[I.jsxs("div",{className:pi.title,children:[I.jsx("h3",{children:e.title}),I.jsx("p",{children:(e==null?void 0:e.subText)??""})]}),I.jsx("div",{className:pi.renderComponent,children:Y()}),!l&&I.jsx("hr",{})]})},OI=()=>I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",fill:"none",viewBox:"0 0 14 14",children:I.jsx("path",{fill:"#555F62",stroke:"#555F62",strokeWidth:"0.2",d:"M3.944 9.045c.9 0 1.664-.582 1.938-1.39h7.229a.656.656 0 100-1.31H5.88a2.045 2.045 0 00-3.874 0H.89a.656.656 0 100 1.31h1.118a2.045 2.045 0 001.937 1.39zm6.111.633c-.9 0-1.663.581-1.937 1.389H.89a.656.656 0 100 1.311h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.311h-1.119a2.045 2.045 0 00-1.937-1.389zm0-9.445c-.9 0-1.663.582-1.937 1.39H.89a.656.656 0 100 1.31h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.31h-1.119a2.045 2.045 0 00-1.937-1.39zm.734 2.045a.733.733 0 11-1.467 0 .733.733 0 011.467 0zm0 9.444a.733.733 0 11-1.467 0 .733.733 0 011.467 0zM3.21 7a.733.733 0 111.467 0A.733.733 0 013.21 7z"})}),JF=({onApply:e,filterOptions:t,modalSize:i,buttonStyle:n,tagPosition:r="bottom",rowReverse:a=!0,filterIcon:o,visibleTagsNumber:s,onClearAll:l,theme:u,resultNumber:d,onSingleChange:c,loaded:h,onFilterClick:f,popupWidth:p,fieldGap:m,labels:g,singleFieldStyle:C,buttonLabel:b,initialApply:A=!1,withTags:B=!0,clickOutside:D=!0,width:U,popupProps:H,tagsProps:W})=>{var X,ce,_e,ae,we,ke,Ae,Ne,ut,et,Ze,li,jt,Ht,mt,Bi,Li,wt,qe,ct,mi,Pi;const[G,j]=ue.useState(!1),[te,N]=ue.useState(d??null),[Y,x]=ue.useState(!1);ue.useEffect(()=>{h&&j(h)},[h]),ue.useEffect(()=>{N(d)},[d]),ue.useEffect(()=>{A&&oe()},[]);const[z,ie]=ue.useState(!1),[ne,pe]=ue.useState(!1),[le,J]=ue.useState(!1),[K,y]=ue.useState(!1),[T,S]=ue.useState(!1),[O,P]=ue.useState(0),M=ue.useRef([]),$=ue.useRef([]),Q=ue.useRef([]),oe=()=>{let We=t.map(gt=>gt.options);M.current=We;let ht=[];for(let gt=0;gt<M.current.length;gt++)ht.push(...M.current[gt]);$.current=ht;let Zt=[];for(let gt=0;gt<$.current.length;gt++)Zt.push(...$.current[gt].value);Q.current=Zt,j(!1),e&&typeof e=="function"&&e($.current.filter(gt=>gt.value!==""))},ge=()=>{l&&typeof l=="function"&&l([])},ee=We=>{We.selected&&(We.selected=!1);let ht=Q.current.filter(gt=>gt.label+gt.id===We.label+We.id);t.forEach(gt=>{gt.options.map(Wt=>{Wt.value.includes(ht[0])&&(Wt.data&&(Wt.data.filter(yr=>yr.itemNodeID===ht[0].itemNodeID)[0].selected=!1,Wt.value=Wt.value.filter(yr=>yr.selected!==!1)),Wt.type=="dropdown"&&(Wt.value=""),Wt.type=="input"&&(Wt.value=""),(Wt.type=="checkBox"||Wt.type=="toggle"||Wt.type=="radio")&&(Wt.value="",Wt.checked=!1),Wt.type=="slider"&&(Wt.value=""),(Wt.type=="datePicker"||Wt.type=="timePicker")&&(Wt.value=""))})}),y(gt=>!gt),S(gt=>!gt),pe(gt=>!gt),J(gt=>!gt);let Zt=$.current.filter(gt=>gt.value.length>0);e&&typeof e=="function"&&e(Zt),Q.current=Q.current.filter(gt=>gt.label+gt.id!==We.label+We.id),Q.current.length===0&&ge(),ie(gt=>!gt)},[xe,w]=ue.useState(s),[he,de]=ue.useState(!0),[F,L]=ue.useState(!1);return ue.useEffect(()=>{const We=ht=>{ht.key==="Enter"&&G&&oe()};return window.addEventListener("keypress",We),()=>{window.removeEventListener("keypress",We)}},[oe]),I.jsxs("div",{className:`${u==="dark"?pi.dark:""} ${pi.compWrapper}`,style:{display:r=="side"?"flex":"block",flexDirection:a?"row-reverse":"row",justifyContent:a?"space-between":null,gap:`${a?"0":"1"}.125rem`},children:[I.jsxs("div",{className:pi.filterButton,style:(n==null?void 0:n.style)??null,onClick:()=>{f&&typeof f=="function"&&f([]),h||h==!1?j(h):j(!0)},children:[I.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:o||I.jsx(OI,{})}),I.jsxs("span",{className:pi.filter,style:(b==null?void 0:b.style)??{},children:[(b==null?void 0:b.label)??"Filter",te&&!B&&I.jsx("span",{className:pi.resultNumber,style:((X=g==null?void 0:g.showResultName)==null?void 0:X.style)??{},children:te??""})]})]}),G&&I.jsxs(EI,{theme:u,visible:!0,size:i??"medium",titleStyle:((ce=g==null?void 0:g.headerName)==null?void 0:ce.style)??{},options:{title:(_e=g==null?void 0:g.headerName)!=null&&_e.label||((ae=g==null?void 0:g.headerName)==null?void 0:ae.label.length)>0?(we=g==null?void 0:g.headerName)==null?void 0:we.label:"Filters",align:"center"},onClickOutside:()=>D?j(!1):null,popupContainerStyle:{width:U??"825px"},...H,children:[I.jsx("div",{style:{maxHeight:"65vh",overflowY:"auto",paddingBottom:"4px"},children:t.map((We,ht)=>{let Zt=ht===t.length-1;return I.jsx("div",{children:I.jsx(ZF,{MultiselectKey:Y,popupWidth:p,fieldStyle:(We==null?void 0:We.style)??{},singleFieldStyle:C,fieldGap:m,setrenderComp:L,renderComp:F,deleteDate:K,setdeleteDate:y,setdeleteTime:S,deleteTime:T,setopenPopup:j,options:We,filterOptions:t,tagValue:Q.current,selectedDropdown:ne,setselectedDropdown:pe,deleteMultiSelect:le,setdeleteMultiSelect:J,isLastElement:Zt,setcounter:P,theme:u,onSingleChange:c})},ht)})}),I.jsxs("div",{className:pi.footer,children:[I.jsx("div",{className:pi.clear,onClick:()=>{c&&typeof c=="function"&&c([]),t.forEach(We=>{We.options.forEach(ht=>{ht.value="",ht.type=="multiselect"&&ht.data.forEach(Zt=>{Zt.selected=!1}),(ht.type=="radio"||ht.type=="checkBox")&&(ht.checked=!1)})}),Q.current=[],pe(We=>!We),J(We=>!We),y(We=>!We),S(We=>!We),P(0),ge(),e&&typeof e=="function"&&e(Q.current),L(We=>!We),x(We=>!We),ie(We=>!We)},style:((ke=g==null?void 0:g.clearAllName)==null?void 0:ke.style)??{},children:(Ae=g==null?void 0:g.clearAllName)!=null&&Ae.label||((ut=(Ne=g==null?void 0:g.clearAllName)==null?void 0:Ne.label)==null?void 0:ut.length)>0?(et=g==null?void 0:g.clearAllName)==null?void 0:et.label:"Clear All"}),I.jsxs("div",{className:pi.buttonsWrapper,children:[I.jsx(p_,{buttonStyle:(Ze=g==null?void 0:g.closeName)!=null&&Ze.style?{...(li=g==null?void 0:g.closeName)==null?void 0:li.style,borderRadius:"0.375rem",backgroundColor:"transparent"}:{borderRadius:"0.375rem",backgroundColor:"transparent"},label:(jt=g==null?void 0:g.closeName)!=null&&jt.label||((mt=(Ht=g==null?void 0:g.closeName)==null?void 0:Ht.label)==null?void 0:mt.length)>0?(Bi=g==null?void 0:g.closeName)==null?void 0:Bi.label:"Close",onClick:()=>j(!1)}),I.jsx(p_,{buttonStyle:(Li=g==null?void 0:g.showResultName)!=null&&Li.style?{...(wt=g==null?void 0:g.showResultName)==null?void 0:wt.style,borderRadius:"0.375rem"}:{borderRadius:"0.375rem"},label:(qe=g==null?void 0:g.showResultName)!=null&&qe.label||((mi=(ct=g==null?void 0:g.showResultName)==null?void 0:ct.label)==null?void 0:mi.length)>0?(Pi=g==null?void 0:g.showResultName)==null?void 0:Pi.label:`Show ${te??""} result`,onClick:oe})]})]})]}),B&&Q.current.length>0&&I.jsxs("div",{style:r=="side"?{marginTop:0}:{},className:pi.tag,children:[Q.current.slice(0,xe).map((We,ht)=>I.jsx(Wm,{id:We.id,label:We.label,withClose:!0,theme:u,...W,onClose:Zt=>ee(We)},ht)),Q.current.length>s&&xe<=s&&he&&I.jsx("button",{className:pi.showButton,onClick:()=>{w(Q.current.length),de(!1)},children:"Show More"}),!he&&Q.current.length>=s&&I.jsx("button",{className:pi.showButton,onClick:()=>{w(s),de(!0)},children:"Show Less"}),I.jsx("button",{className:pi.showButton,onClick:()=>{t.forEach(We=>{We.options.forEach(ht=>{ht.value="",ht.type=="multiselect"&&ht.data.forEach(Zt=>{Zt.selected=!1}),(ht.type=="radio"||ht.type=="checkBox")&&(ht.checked=!1)})}),Q.current=[],pe(We=>!We),J(We=>!We),y(We=>!We),S(We=>!We),P(0),ge(),x(We=>!We),e&&typeof e=="function"&&e(Q.current),L(We=>!We),ie(We=>!We)},children:"Clear All"})]})]})},QF="ProgressSteps-module__steps",eM="ProgressSteps-module__currentStep",tM="ProgressSteps-module__progressBar",iM="ProgressSteps-module__progressBarVertical",nM="ProgressSteps-module__singleStep",rM="ProgressSteps-module__texts",aM="ProgressSteps-module__currentText",oM="ProgressSteps-module__name",sM="ProgressSteps-module__subTitle",lM="ProgressSteps-module__vertical",uM="ProgressSteps-module__radioWrapper",dM="ProgressSteps-module__checked",cM="ProgressSteps-module__innerCircle",hM="ProgressSteps-module__radioState",fM="ProgressSteps-module__disabled",pM="ProgressSteps-module__dark",Jt={steps:QF,currentStep:eM,progressBar:tM,progressBarVertical:iM,singleStep:nM,texts:rM,currentText:aM,name:oM,subTitle:sM,vertical:lM,radioWrapper:uM,checked:dM,innerCircle:cM,radioState:hM,disabled:fM,dark:pM},vM=({width:e})=>I.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"32",height:e??"32",viewBox:"0 0 32 32",fill:"none",children:[I.jsx("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"#0158FF"}),I.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7953 9.8534L13.2487 19.0667L10.7153 16.3601C10.2487 15.9201 9.51534 15.8934 8.982 16.2667C8.462 16.6534 8.31534 17.3334 8.63534 17.8801L11.6353 22.7601C11.9287 23.2134 12.4353 23.4934 13.0087 23.4934C13.5553 23.4934 14.0753 23.2134 14.3687 22.7601C14.8487 22.1334 24.0087 11.2134 24.0087 11.2134C25.2087 9.98674 23.7553 8.90674 22.7953 9.84007V9.8534Z",fill:"white"})]}),_M=({currentStep:e,stepsData:t,onStepClick:i,independentStep:n,fillIcon:r,stepIcon:a,emptyIcon:o,gap:s=20,vertical:l=!1,stepsStyle:u,currentStepStyle:d,progressBarStyle:c,singleStepStyle:h,textsStyle:f,theme:p})=>{const m=b=>{i&&typeof i=="function"&&n&&i(b)},g=b=>l?{...b.id===t[t.length-1].id?{height:"0",top:0,left:0}:b.id===t[t.length-2].id?{height:`calc(100% + ${s}px`,top:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"}:{height:`calc(100% + ${s}px)`,top:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"},...c??{}}:{...b.id===t[t.length-1].id?{width:"0",left:0,right:0}:b.id===t[t.length-2].id?{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"}:{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(b==null?void 0:b.id)?"#7F56D9":"#E9EAEB"},...c??{}},C=b=>b;return I.jsx("div",{className:`${p==="dark"?Jt.dark:""} ${Jt.steps} ${l?Jt.vertical:""}`,style:{...u,gap:s+"px"},children:t.map(b=>I.jsxs("div",{style:d??{},className:`${Jt.currentStep} ${b.disabled?Jt.disabled:""}`,onClick:()=>m(b),children:[l?I.jsx("div",{className:Jt.progressBarVertical,style:g(b)}):I.jsx("div",{style:g(b),className:Jt.progressBar}),I.jsx("div",{className:Jt.singleStep,style:h??{},children:I.jsx(I.Fragment,{children:b.isAllFilled?I.jsx(I.Fragment,{children:r?C(r):I.jsx(vM,{width:"24px"})}):e<(b==null?void 0:b.id)?I.jsx(I.Fragment,{children:o?C(o):I.jsx("div",{className:`${Jt.radioWrapper} ${Jt.md} ${Jt.checked} ${Jt.disabled}`,children:I.jsx("div",{className:Jt.radioState,children:I.jsx("div",{className:Jt.innerCircle})})})}):I.jsx(I.Fragment,{children:a?C(a):I.jsx("div",{className:`${Jt.radioWrapper} ${Jt.md} ${Jt.checked} `,children:I.jsx("div",{className:Jt.radioState,children:I.jsx("div",{className:Jt.innerCircle})})})})})}),I.jsxs("div",{className:`${Jt.texts} ${b.id===e?Jt.currentText:{}}`,style:f??{},children:[I.jsx("p",{style:(b==null?void 0:b.titleStyle)??{},className:Jt.name,children:b==null?void 0:b.name}),typeof(b==null?void 0:b.subTitle)=="function"?b.subTitle():I.jsx("p",{className:Jt.subTitle,style:b!=null&&b.subTitleStyle?{...b.subTitleStyle}:{},children:(b==null?void 0:b.subTitle)??""})??""]})]},b.id))})};var ve={},mM={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string","[object Null]":"null"},Ln=function(e){var t=Object.prototype.toString.call(e);return typeof e=="object"?mM[t]||"object":typeof e},Ps=function(e){return typeof e=="boolean"},QC=function(e){return Et(e)&&e.toString().indexOf("e")!==-1},Wi=function(e){return Ln(e)==="date"},E=function(e){return e!=null},Ie=function(e){return typeof e=="function"},Ve=function(e){return typeof e=="string"},Et=function(e){return typeof e=="number"&&isFinite(e)||!isNaN(e-parseFloat(e))},$e=function(e){return Ln(e)==="object"},Pn=function(e){var t;for(t in e)return!1;return!0},Ye=function(e){if(!e||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e),i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&Object.toString.call(i)===Object.toString.call(Object)},Zl=function(e){return["object","array","function"].indexOf(Ln(e))===-1},Xt=function(e){return e!=null&&e===e.window},mn=function(e){return!!e&&!!(e.jquery||e.dxRenderer)},ku=function(e){return!!e&&Ie(e.then)},Um=function(e){return!!e&&Ie(e.done)&&Ie(e.fail)},gM=function(e){return!!(e&&e.preventDefault)},RI=function(e,t,i){e=e||{};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];(!(n in e)||i)&&(e[n]=r)}return e},k=function e(t){t=t||{};var i=1,n=!1;for(typeof t=="boolean"&&(n=t,t=arguments[1]||{},i++);i<arguments.length;i++){var r=arguments[i];if(r!=null)for(var a in r){var o=t[a],s=r[a],l=!1,u=void 0;a==="__proto__"||a==="constructor"||t===s||(n&&s&&(Ye(s)||(l=Array.isArray(s)))?(l?u=o&&Array.isArray(o)?o:[]:u=o&&Ye(o)?o:{},t[a]=e(n,u,s)):s!==void 0&&(t[a]=s))}}return t},ti=(e,t)=>{if(Array.isArray(e))return e.map(t);var i=[];for(var n in e)i.push(t(e[n],n));return i},V=(e,t)=>{if(e){if("length"in e)for(var i=0;i<e.length&&t.call(e[i],i,e[i])!==!1;i++);else for(var n in e)if(t.call(e[n],n,e[n])===!1)break;return e}},CM=function(){},If=function(e){return typeof console>"u"||!Ie(console[e])?CM:console[e].bind(console)},Bu={info:If("info"),warn:If("warn"),error:If("error")},Km=function(){var e=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(t){return String(t).replace(e[0],"&amp;").replace(e[1],"&quot;").replace(e[2],"&#39;").replace(e[3],"&lt;").replace(e[4],"&gt;")}}(),yM=function(e){switch(typeof e){case"string":return e.split(/\s+/,4);case"object":return[e.x||e.h||e.left,e.y||e.v||e.top,e.x||e.h||e.right,e.y||e.v||e.bottom];case"number":return[e];default:return e}},xM=function(e){var t=yM(e),i=parseInt(t&&t[0],10),n=parseInt(t&&t[1],10),r=parseInt(t&&t[2],10),a=parseInt(t&&t[3],10);return isFinite(i)||(i=0),isFinite(n)||(n=i),isFinite(r)||(r=i),isFinite(a)||(a=n),{top:n,right:r,bottom:a,left:i}};function Kr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Ie(e)?e(...i):(i.forEach((r,a)=>{Ve(r)&&(r=r.replace(/\$/g,"$$$$"));var o=new RegExp("\\{"+a+"\\}","gm");e=e.replace(o,r)}),e)}var Jl=function(){var e=/\s/g;return function(t){return!t||!t.replace(e,"")}}(),bM="22.1.3",SM="http://js.devexpress.com/error/"+bM.split(".").slice(0,2).join("_")+"/";function jm(e,t){var i={ERROR_MESSAGES:k(t,e),Error:function(){return o([].slice.call(arguments))},log:function(l){var u="log";/^E\d+$/.test(l)?u="error":/^W\d+$/.test(l)&&(u="warn"),Bu[u](u==="log"?l:n([].slice.call(arguments)))}};function n(l){var u=l[0];return l=l.slice(1),a(u,r(u,l))}function r(l,u){return u=[i.ERROR_MESSAGES[l]].concat(u),Kr.apply(this,u).replace(/\.*\s*?$/,"")}function a(l,u){return Kr.apply(this,[`{0} - {1}. See:
62
62
  {2}`,l,u,s(l)])}function o(l){var u=l[0];l=l.slice(1);var d=r(u,l),c=s(u),h=a(u,d);return k(new Error(h),{__id:u,__details:d,url:c})}function s(l){return SM+l}return i}const xt=jm({E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as {2}",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.DevExpressPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=DevExpress-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0024:"DevExtreme bundle already included",E0025:"Unexpected argument type",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0103:"validationCallback of an asynchronous rule should return a jQuery or a native promise",E0110:"Unknown validation group is detected",E0120:"Adapter for a DevExpressValidator component cannot be configured",E0121:"The 'customItem' parameter of the 'onCustomItemCreating' function is empty or contains invalid data. Assign a custom object or a Promise that is resolved after the item is created.",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"Invalid recurrence rule: '{0}'",W0007:"'{0}' Globalize culture is not defined",W0008:"Invalid view name: '{0}'",W0009:"Invalid time zone name: '{0}'",W0010:"{0} is deprecated in {1}. {2}",W0011:"Number parsing is invoked while the parser is not defined",W0012:"Date parsing is invoked while the parser is not defined",W0013:"'{0}' file is deprecated in {1}. {2}",W0014:"{0} - '{1}' type is deprecated in {2}. {3}",W0015:"Instead of returning a value from the '{0}' function, write it into the '{1}' field of the function's parameter.",W0016:'The "{0}" option does not accept the "{1}" value since v{2}. {3}.',W0017:'Setting the "{0}" property with a function is deprecated since v21.2',W0018:'Setting the "position" property with a function is deprecated since v21.2'});var EM=function(e,t,i){return function(){var n=this.callBase;this.callBase=e[t];try{return i.apply(this,arguments)}finally{this.callBase=n}}},wM=function(e){var t=function(){};return t.prototype=e.prototype,new t},IM=function(e){var t,i,n;if(!e)return this;for(i in e)n=e[i],t=typeof this.prototype[i]=="function"&&typeof n=="function",this.prototype[i]=t?EM(this.parent.prototype,i,n):n;return this},TM=function(){var e=this,t,i,n,r=Object.prototype.hasOwnProperty.bind(e),a=!r("_includedCtors")&&!r("_includedPostCtors");for(a&&(e._includedCtors=e._includedCtors.slice(0),e._includedPostCtors=e._includedPostCtors.slice(0)),n=0;n<arguments.length;n++){t=arguments[n],t.ctor&&e._includedCtors.push(t.ctor),t.postCtor&&e._includedPostCtors.push(t.postCtor);for(i in t)i==="ctor"||i==="postCtor"||i==="default"||(e.prototype[i]=t[i])}return e},AM=function(e){var t=Object.prototype.hasOwnProperty.bind(this)("parent"),i=!t&&this.parent;if(i){var n=Object.getPrototypeOf(this);return n===e||n.subclassOf(e)}else return this.parent===e?!0:!this.parent||!this.parent.subclassOf?!1:this.parent.subclassOf(e)},kI=function(){throw xt.Error("E0001")},DM=function(){var e=Object.prototype.hasOwnProperty;return function(t,i){for(var n in t){if(!e.call(t,n))return;i[n]=t[n]}}}(),it=function(){};it.inherit=function(e){var t=function(){if(!this||Xt(this)||typeof this.constructor!="function")throw xt.Error("E0003");var i=this,n=i.ctor,r=i.constructor._includedCtors,a=i.constructor._includedPostCtors,o;for(o=0;o<r.length;o++)r[o].call(i);for(n&&n.apply(i,arguments),o=0;o<a.length;o++)a[o].call(i)};return t.prototype=wM(this),DM(this,t),t.inherit=this.inherit,t.abstract=kI,t.redefine=IM,t.include=TM,t.subclassOf=AM,t.parent=this,t._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],t._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],t.prototype.constructor=t,t.redefine(e),t};it.abstract=kI;function Fn(e){var t=it.inherit(e),i=t,n=new i(e),r={},a=function(o,s){V(o,function(l){Ie(n[l])?(s||!e[l])&&(e[l]=function(){return n[l].apply(e,arguments)}):(s&&(r[l]=e[l]),e[l]=n[l])})};return a(e,!0),e.inject=function(o){i=i.inherit(o),n=new i,a(o)},e.resetInjection=function(){k(e,r),i=t,n=new t},e}var ey={rtlEnabled:!1,defaultCurrency:"USD",defaultUseCurrencyAccountingStyle:!0,oDataFilterToLower:!0,serverDecimalSeparator:".",decimalSeparator:".",thousandsSeparator:",",forceIsoDateParsing:!0,wrapActionsBeforeExecute:!0,useLegacyStoreResult:!1,useJQuery:void 0,editorStylingMode:void 0,useLegacyVisibleIndex:!1,floatingActionButtonConfig:{icon:"add",closeIcon:"close",label:"",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,shading:!1,direction:"auto"},optionsParser:e=>{e.trim().charAt(0)!=="{"&&(e="{"+e+"}");try{return new Function("return "+e)()}catch(t){throw xt.Error("E3018",t,e)}}},OM=["decimalSeparator","thousandsSeparator"],At=function(){if(!arguments.length)return ey;var e=arguments.length<=0?void 0:arguments[0];OM.forEach(t=>{if(e[t]){var i="Now, the ".concat(t," is selected based on the specified locale.");xt.log("W0003","config",t,"19.2",i)}}),k(ey,e)};typeof DevExpress<"u"&&DevExpress.config&&At(DevExpress.config);var si=it.inherit({ctor:function(e){e&&(e=String(e)),this._value=this._normalize(e||this._generate())},_normalize:function(e){for(e=e.replace(/[^a-f0-9]/gi,"").toLowerCase();e.length<32;)e+="0";return[e.substr(0,8),e.substr(8,4),e.substr(12,4),e.substr(16,4),e.substr(20,12)].join("-")},_generate:function(){for(var e="",t=0;t<32;t++)e+=Math.round(15*Math.random()).toString(16);return e},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}}),Zr=function(e){this._options=e||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};Zr.prototype._fireCore=function(e,t){var i=this._firingIndexes,n=this._list,r=this._options.stopOnFalse,a=i.length;for(i[a]=0;i[a]<n.length;i[a]++){var o=n[i[a]].apply(e,t);if(o===!1&&r)break}i.pop()};Zr.prototype.add=function(e){return typeof e=="function"&&(!this._options.unique||!this.has(e))&&this._list.push(e),this};Zr.prototype.remove=function(e){var t=this._list,i=this._firingIndexes,n=t.indexOf(e);if(n>-1&&(t.splice(n,1),this._firing&&i.length))for(var r=0;r<i.length;r++)n<=i[r]&&i[r]--;return this};Zr.prototype.has=function(e){var t=this._list;return e?t.indexOf(e)>-1:!!t.length};Zr.prototype.empty=function(e){return this._list=[],this};Zr.prototype.fireWith=function(e,t){var i=this._queue;if(t=t||[],t=t.slice?t.slice():t,this._options.syncStrategy)this._firing=!0,this._fireCore(e,t);else{if(i.push([e,t]),this._firing)return;for(this._firing=!0;i.length;){var n=i.shift();this._fireCore(n[0],n[1])}}return this._firing=!1,this._fired=!0,this};Zr.prototype.fire=function(){this.fireWith(this,arguments)};Zr.prototype.fired=function(){return this._fired};var dt=function(e){return new Zr(e)},BI=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}],Fs=function(){var e=this;this._state="pending",this._promise={},BI.forEach((function(t){var i=t.method;this[i+"Callbacks"]=new dt,this[i]=(function(){return this[i+"With"](this._promise,arguments)}).bind(this),this._promise[t.handler]=function(n){if(!n)return this;var r=e[i+"Callbacks"];return r.fired()?n.apply(e[i+"Context"],e[i+"Args"]):r.add((function(a,o){n.apply(a,o)}).bind(this)),this}}).bind(this)),this._promise.always=function(t){return this.done(t).fail(t)},this._promise.catch=function(t){return this.then(null,t)},this._promise.then=function(t,i){var n=new Fs;return["done","fail"].forEach((function(r){var a=r==="done"?t:i;this[r](function(){if(!a){n[r==="done"?"resolve":"reject"].apply(this,arguments);return}var o=a&&a.apply(this,arguments);Um(o)?o.done(n.resolve).fail(n.reject):ku(o)?o.then(n.resolve,n.reject):n.resolve.apply(this,E(o)?[o]:arguments)})}).bind(this)),n.promise()},this._promise.state=function(){return e._state},this._promise.promise=function(t){return t?k(t,e._promise):e._promise},this._promise.promise(this)};BI.forEach(function(e){var t=e.method,i=e.state;Fs.prototype[t+"With"]=function(n,r){var a=this[t+"Callbacks"];return this.state()==="pending"&&(this[t+"Args"]=r,this[t+"Context"]=n,i&&(this._state=i),a.fire(n,r)),this}});function yi(e,t){if(Um(e))return e;if(ku(e)){var i=new Fs;return e.then(function(){i.resolveWith.apply(i,[t].concat([[].slice.call(arguments)]))},function(){i.rejectWith.apply(i,[t].concat([[].slice.call(arguments)]))}),i}return new Fs().resolveWith(t,[e])}var RM=function(){if(arguments.length===1)return yi(arguments[0]);for(var e=[].slice.call(arguments),t=[],i=0,n=new Fs,r=function(o){return function(s){t[o]=this,e[o]=arguments.length>1?[].slice.call(arguments):s,i++,i===e.length&&n.resolveWith(t,e)}},a=0;a<e.length;a++)Um(e[a])?e[a].promise().done(r(a)).fail(n.reject):i++;return i===e.length&&n.resolveWith(t,e),n.promise()};function se(){return new Fs}function De(){return RM.apply(this,arguments)}const Hi=Fn({isWrapped:function(){return!1},isWritableWrapped:function(){return!1},wrap:function(e){return e},unwrap:function(e){return e},assign:function(){Bu.error("Method 'assign' should not be used for not wrapped variables. Use 'isWrapped' method for ensuring.")}});var m_=function(e,t){var i=[],n,r;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.push(n);for(i.sort(function(a,o){var s=Et(a),l=Et(o);return s&&l?a-o:s&&!l?-1:!s&&l?1:a<o?-1:a>o?1:0}),r=0;r<i.length;r++)n=i[r],t(n,e[n])},kM=function(e,t,i,n){!n&&Hi.isWrapped(e[t])?Hi.assign(e[t],i):e[t]=i},rr=function e(t,i,n,r){var a,o;for(var s in i)if(a=t[s],o=i[s],!(s==="__proto__"||s==="constructor"||t===o)){if(Ye(o)){var l=n?$e(a):Ye(a);o=e(l?a:{},o,n,r)}o!==void 0&&a!==o&&kM(t,s,o,r)}return t},BM=Hi.unwrap,LI=Hi.isWrapped,LM=Hi.assign,PM=function(e){return e.replace(/\[/g,".").replace(/\]/g,"")},Ao=function(e){return PM(e).split(".")},FM=function(e,t,i){return i=i||{},fu(t==="this"?e:e[t],i)},PI=function(e,t,i,n){if(t==="this")throw new xt.Error("E4016");var r=e[t];n.unwrapObservables&&LI(r)?LM(r,i):e[t]=i},FI=function(e){return e=e||{},e.unwrapObservables=e.unwrapObservables!==void 0?e.unwrapObservables:!0,e};function fu(e,t){return t.unwrapObservables?BM(e):e}var bt=function(e){if(arguments.length>1&&(e=[].slice.call(arguments)),!e||e==="this")return function(i){return i};if(typeof e=="string"){var t=Ao(e);return function(i,n){n=FI(n);for(var r=n.functionsAsIs,a=("defaultValue"in n),o=fu(i,n),s=0;s<t.length;s++){if(!o){if(o==null&&a)return n.defaultValue;break}var l=t[s];if(a&&$e(o)&&!(l in o))return n.defaultValue;var u=fu(o[l],n);!r&&Ie(u)&&(u=u.call(o)),o=u}return o}}if(Array.isArray(e))return MM(e);if(Ie(e))return e};function MM(e){for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];t[r]=bt(r)}return function(a,o){var s;return V(t,function(l){var u=this(a,o);if(u!==void 0){for(var d=s||(s={}),c=l.split("."),h=c.length-1,f=0;f<h;f++){var p=c[f];p in d||(d[p]={}),d=d[p]}d[c[h]]=u}}),s}}var ty=function(e,t,i,n){if(E(i))return i;var r={};return PI(e,t,r,n),r},qm=function(e){e=Ao(e||"this");var t=e.length-1;return function(i,n,r){r=FI(r);var a=fu(i,r);e.forEach(function(o,s){var l=FM(a,o,r),u=!r.functionsAsIs&&Ie(l)&&!LI(l);s===t?r.merge&&Ye(n)&&(!E(l)||Ye(l))?(l=ty(a,o,l,r),rr(l,n,!1,!0)):u?a[o](n):PI(a,o,n,r):(l=ty(a,o,l,r),u&&(l=l.call(a)),a=l)})}},qt=function(e,t){return e instanceof Date?e.getTime():e&&e instanceof it&&e.valueOf?e.valueOf():!t&&typeof e=="string"?e.toLowerCase():e},Mt=function(e,t){return E(e)?e:t},Lh=function(e,t){var i=new se,n=t||this,r={promise:i.promise(),abort:function(){clearTimeout(o),i.rejectWith(n)}},a=function(){var s=e.call(n);s&&s.done&&Ie(s.done)?s.done(function(){i.resolveWith(n)}):i.resolveWith(n)},o=(arguments[2]||setTimeout)(a,typeof t=="number"?t:0);return r},Tf=[],iy=[],ol=[],Zo,Ph=function(e,t,i){if(Zo&&Zo!==e)return Tf.push(t),iy.push(e),i=i||new se,ol.push(i),i;var n=Zo,r=ol.length;Zo=e;var a=t();return a||(ol.length>r?a=De.apply(this,ol.slice(r)):i&&i.resolve()),Zo=n,i&&a&&a.done&&a.done(i.resolve).fail(i.reject),!Zo&&Tf.length&&(iy.shift()==="render"?Qt:Vi)(Tf.shift(),ol.shift()),a||De()},Qt=function(e,t){return Ph("render",e,t)},Vi=function(e,t){return Ph("update",e,t)},oo=function(e){return function(){var t=this;return Ph("render",function(){return e.call(t)})}},g_=function(e){return function(){var t=this;return Ph("update",function(){return e.call(t)})}},Ym=function(e,t,i){var n=[],r=0;return V(t,(a,o)=>{var s=0,l=i?i(o):o;V(e,(u,d)=>{var c=l[u];if(c!==void 0){if(VM(c,d)){s++;return}return s=-1,!1}}),!(s<r)&&(s>r&&(n.length=0,r=s),n.push(o))}),n},VM=function(e,t){if(Array.isArray(e)&&Array.isArray(t)){var i=!1;return V(e,(n,r)=>{if(r!==t[n])return i=!0,!1}),!i}return e===t},Do=function(e){var t,i;switch(Ln(e)){case"string":return e.split(/\s+/,2);case"object":return[(t=e.x)!==null&&t!==void 0?t:e.h,(i=e.y)!==null&&i!==void 0?i:e.v];case"number":return[e];case"array":return e;default:return null}},NM=function(e){var t=Ve(e)?e:e.toString(),i=t.match(/[^a-zA-Z0-9_]/g);return i&&V(i,(n,r)=>{t=t.replace(r,"__"+r.charCodeAt()+"__")}),t},$M=function(e){var t=e.match(/__\d+__/g);return t&&t.forEach(i=>{var n=parseInt(i.replace("__",""));e=e.replace(i,String.fromCharCode(n))}),e},Fh=function(e,t){var i=Do(e),n=t?parseFloat(i&&i[0]):parseInt(i&&i[0],10),r=t?parseFloat(i&&i[1]):parseInt(i&&i[1],10);return isFinite(n)||(n=0),isFinite(r)||(r=n),{h:n,v:r}},jn=function(e){if(e instanceof si)return e.toString();if($e(e)||Array.isArray(e))try{var t=JSON.stringify(e);return t==="{}"?e:t}catch{return e}return e},Fr=function(e){return e.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")},MI=function(e){var t=At().serverDecimalSeparator;return E(e)&&(e=e.toString().replace(".",t)),e},re=function(){},Xm=function(){return new se().resolve().promise()},zi=function(e,t,i){for(var n=[],r,a=!i,o=0;o<e.length;o++)r=!!t(e[o],o),r===a&&n.push(e[o]);return n},HM=function(e,t,i){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Bt(e[n],t[n],i+1))return!1;return!0},WM=function(e,t,i,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!Bt(e[r],t[r],i+1,n))return!1;for(var a in t)if(!(a in e))return!1;return!0},zM=3,Bt=function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;e=qt(e,!0),t=qt(t,!0);var r=n?e===t:e==t;return r||i>=zM?!0:$e(e)&&$e(t)?WM(e,t,i,n):Array.isArray(e)&&Array.isArray(t)?HM(e,t,i):!1};const GM=Object.freeze(Object.defineProperty({__proto__:null,applyServerDecimalSeparator:MI,asyncNoop:Xm,deferRender:Qt,deferRenderer:oo,deferUpdate:Vi,deferUpdater:g_,denormalizeKey:$M,ensureDefined:Mt,equalByValue:Bt,escapeRegExp:Fr,executeAsync:Lh,findBestMatches:Ym,getKeyHash:jn,grep:zi,noop:re,normalizeKey:NM,pairToObject:Fh,splitPair:Do},Symbol.toStringTag,{value:"Module"}));var UM=1,KM=3,jM=9,qM={querySelectorAll:(e,t)=>e.querySelectorAll(t),elementMatches(e,t){var i=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||(n=>{var r=e.document||e.ownerDocument;if(!r)return!1;for(var a=this.querySelectorAll(r,n),o=0;o<a.length;o++)if(a[o]===e)return!0});return i.call(e,t)},createElement(e,t){return t=t||this._document,t.createElement(e)},createElementNS(e,t,i){return i=i||this._document,i.createElementNS(e,t)},createTextNode(e,t){return t=t||this._document,t.createTextNode(e)},isNode:e=>e&&typeof e=="object"&&"nodeType"in e&&"nodeName"in e,isElementNode:e=>e&&e.nodeType===UM,isTextNode:e=>e&&e.nodeType===KM,isDocument:e=>e&&e.nodeType===jM,removeElement(e){var t=e&&e.parentNode;t&&t.removeChild(e)},insertElement(e,t,i){e&&t&&e!==t&&(i?e.insertBefore(t,i):e.appendChild(t))},getAttribute:(e,t)=>e.getAttribute(t),setAttribute(e,t,i){e.setAttribute(t,i)},removeAttribute(e,t){e.removeAttribute(t)},setProperty(e,t,i){e[t]=i},setText(e,t){e&&(e.textContent=t)},setClass(e,t,i){e.nodeType===1&&t&&(i?e.classList.add(t):e.classList.remove(t))},setStyle(e,t,i){e.style[t]=i||""},_document:typeof document>"u"?void 0:document,getDocument(){return this._document},getActiveElement(){return this._document.activeElement},getBody(){return this._document.body},createDocumentFragment(){return this._document.createDocumentFragment()},getDocumentElement(){return this._document.documentElement},getLocation(){return this._document.location},getSelection(){return this._document.selection},getReadyState(){return this._document.readyState},getHead(){return this._document.head},hasDocumentProperty(e){return e in this._document},listen(e,t,i,n){return!e||!("addEventListener"in e)?re:(e.addEventListener(t,i,n),()=>{e.removeEventListener(t,i)})},elementsFromPoint(e,t){return this._document.elementsFromPoint(e,t)}};const me=Fn(qM);function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Se.apply(null,arguments)}class Zm{constructor(){this.memory=[],this.callbacks=dt()}add(t){V(this.memory,(i,n)=>t.apply(t,n)),this.callbacks.add(t)}remove(t){this.callbacks.remove(t)}fire(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];this.memory.push(i),this.callbacks.fire.apply(this.callbacks,i)}}const Jm=new Zm;var YM=typeof window<"u",Ue=()=>YM,eo=Ue()?window:void 0;eo||(eo={},eo.window=eo);var je=()=>eo,VI=e=>Ue()&&e in eo,Qm=e=>e<768?"xs":e<992?"sm":e<1200?"md":"lg",NI=e=>{var t=e||Qm,i=me.getDocumentElement().clientWidth;return t(i)},Lu=()=>Ue()?eo.navigator:{userAgent:""},XM=["pageX","pageY","screenX","screenY","clientX","clientY"],ZM=function(e,t){if(t[e]&&!t.touches||!t.touches)return t[e];var i=t.touches.length?t.touches:t.changedTouches;if(i.length)return i[0][e]};function JM(e){XM.forEach(function(t){e(t,function(i){return ZM(t,i)})},this)}var Jr=function(e){var t,i=function(){return t=e.apply(this,arguments),i=function(){return t},t};return function(){return i.apply(this,arguments)}},eg=je(),vd="dxEmptyEventType",ny={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},QM={focusin:"focus",focusout:"blur"},eV=["blur","focus","load"],$I=["touchmove","wheel","mousewheel","touchstart"],tV=["target","relatedTarget","delegateTarget","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","shiftKey","view","char","code","charCode","key","keyCode","button","buttons","offsetX","offsetY","pointerId","pointerType","targetTouches","toElement","touches"];function iV(e,t){return!Xt(e)&&e.nodeName!=="#document"&&me.elementMatches(e,t)}var Af=new WeakMap,HI=0,jc,ca=function(){var e={};return Jm.add(function(t,i){e[t]=i}),{getField:function(t,i){return e[t]&&e[t][i]},callMethod:function(t,i,n,r){return e[t]&&e[t][i]&&e[t][i].apply(n,r)}}}(),R=Fn({on:sl(C_(oy(function(e,t,i,n,r){var a=ys(e,t);a.addHandler(r,i,n)}))),one:sl(C_(function(e,t,i,n,r){R.on(e,t,i,n,function a(){R.off(e,t,i,a),r.apply(this,arguments)})})),off:sl(aV(oy(function(e,t,i,n){var r=ys(e,t);r.removeHandler(n,i)}))),trigger:sl(ay(function(e,t,i){var n=t.type,r=ys(e,t.type);ca.callMethod(n,"trigger",e,[t,i]),r.callHandlers(t,i);var a=ca.getField(n,"noBubble")||t.isPropagationStopped()||eV.indexOf(n)!==-1;if(!a){var o=[];(function u(d){var c=d.parentNode;c&&(o.push(c),u(c))})(e),o.push(eg);for(var s=0;o[s]&&!t.isPropagationStopped();){var l=ys(o[s],t.type);l.callHandlers(k(t,{currentTarget:o[s]}),i),s++}}(e.nodeType||Xt(e))&&(ca.callMethod(n,"_default",e,[t,i]),sV(n,e))})),triggerHandler:sl(ay(function(e,t,i){var n=ys(e,t.type);n.callHandlers(t,i)}))});function tg(e,t){var i=e[0];if(i)if(me.isNode(i)||Xt(i))t.apply(R,e);else if(!Ve(i)&&"length"in i){var n=Array.prototype.slice.call(e,0);Array.prototype.forEach.call(i,function(r){n[0]=r,tg(n,t)})}else throw xt.Error("E0025")}function sl(e){return function(){tg(arguments,e)}}function nV(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,!0}});eg.addEventListener("test",null,t)}catch{}return e}var WI=Jr(nV),zI=(e,t)=>Xt(e)?zI(e.document,t):e.contains?e.contains(t):!!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_CONTAINS);function ys(e,t){var i=Af.get(e);t=t||"";var n=t.split("."),r=n.slice(1),a=!!n[0];t=n[0]||vd,i||(i={},Af.set(e,i)),i[t]||(i[t]={handleObjects:[],nativeHandler:null});var o=i[t];return{addHandler:function(s,l,u){var d=function(m,g){var C=[m],b=m.currentTarget,A=m.relatedTarget,B,D;t in ny&&(B=A&&b&&(A===b||zI(b,A))),g!==void 0&&C.push(g),ca.callMethod(t,"handle",e,[m,u]),B||(D=s.apply(b,C)),D===!1&&(m.preventDefault(),m.stopPropagation())},c={handler:s,wrappedHandler:function(m,g){if(!(jc&&m.type===jc))if(m.data=u,m.delegateTarget=e,l)for(var C=m.target;C&&C!==e;)iV(C,l)&&(m.currentTarget=C,d(m,g)),C=C.parentNode;else m.currentTarget=m.delegateTarget||m.target,d(m,g)},selector:l,type:t,data:u,namespace:r.join("."),namespaces:r,guid:++HI};o.handleObjects.push(c);var h=o.handleObjects.length===1,f=h&&a,p;f&&(f=!ca.callMethod(t,"setup",e,[u,r,s])),f&&(o.nativeHandler=rV(t),WI()&&$I.indexOf(t)>-1&&(p={passive:!1}),o.removeListener=me.listen(e,ny[t]||t,o.nativeHandler,p)),ca.callMethod(t,"add",e,[c])},removeHandler:function(s,l){var u=function(h){var f=i[h];if(!f.handleObjects.length){delete i[h];return}var p;f.handleObjects=f.handleObjects.filter(function(C){var b=r.length&&!ry(C.namespaces,r)||s&&C.handler!==s||l&&C.selector!==l;return b||(p=C.handler,ca.callMethod(h,"remove",e,[C])),b});var m=!f.handleObjects.length,g=m&&h!==vd;g&&(ca.callMethod(h,"teardown",e,[r,p]),f.nativeHandler&&f.removeListener(),delete i[h])};if(a)u(t);else for(var d in i)u(d);var c=Object.keys(i).length===0;c&&Af.delete(e)},callHandlers:function(s,l){var u=!1,d=function(c){u||(!r.length||ry(c.namespaces,r))&&(c.wrappedHandler(s,l),u=s.isImmediatePropagationStopped())};o.handleObjects.forEach(d),r.length&&i[vd]&&i[vd].handleObjects.forEach(d)}}}function rV(e){return function(t,i){var n=ys(this,e);t=R.Event(t),n.callHandlers(t,i)}}function ry(e,t){for(var i=0;i<t.length;i++)if(e.indexOf(t[i])<0)return!1;return!0}function C_(e){return function(t,i,n,r,a){a||(a=r,r=void 0),typeof n!="string"&&(r=n,n=void 0),!a&&typeof i=="string"&&(a=r||n,n=void 0,r=void 0),e(t,i,n,r,a)}}function aV(e){return function(t,i,n,r){typeof n=="function"&&(r=n,n=void 0),e(t,i,n,r)}}function ay(e){return function(t,i,n){typeof i=="string"&&(i={type:i}),i.target||(i.target=t),i.currentTarget=t,i.delegateTarget||(i.delegateTarget=t),!i.type&&i.originalEvent&&(i.type=i.originalEvent.type),e(t,i instanceof R.Event?i:R.Event(i),n)}}function oV(e){return R.Event=function(t,i){if(!(this instanceof R.Event))return new R.Event(t,i);t||(t={}),typeof t=="string"&&(t={type:t}),i||(i={}),e.call(this,t,i)},Se(R.Event.prototype,{_propagationStopped:!1,_immediatePropagationStopped:!1,_defaultPrevented:!1,isPropagationStopped:function(){return!!(this._propagationStopped||this.originalEvent&&this.originalEvent.propagationStopped)},stopPropagation:function(){this._propagationStopped=!0,this.originalEvent&&this.originalEvent.stopPropagation()},isImmediatePropagationStopped:function(){return this._immediatePropagationStopped},stopImmediatePropagation:function(){this.stopPropagation(),this._immediatePropagationStopped=!0,this.originalEvent&&this.originalEvent.stopImmediatePropagation()},isDefaultPrevented:function(){return!!(this._defaultPrevented||this.originalEvent&&this.originalEvent.defaultPrevented)},preventDefault:function(){this._defaultPrevented=!0,this.originalEvent&&this.originalEvent.preventDefault()}}),R.Event}function oy(e){var t=function(i,n){if(n&&n.indexOf(" ")>-1){var r=Array.prototype.slice.call(arguments,0);n.split(" ").forEach(function(a){r[1]=a,e.apply(this,r)})}else e.apply(this,arguments)};return function(i,n){if(typeof n=="object"){var r=Array.prototype.slice.call(arguments,0);for(var a in n)r[1]=a,r[r.length-1]=n[a],t.apply(this,r)}else t.apply(this,arguments)}}function sV(e,t){var i=QM[e]||e;(function(n,r){return n==="click"&&r.localName==="a"})(e,t)||Ie(t[i])&&(jc=e,t[i](),jc=void 0)}function lV(e){return function(t){return t.which==null&&t.type.indexOf("key")===0}(e)?e.charCode!=null?e.charCode:e.keyCode:function(t){return!t.which&&t.button!==void 0&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(t.type)}(e)?{1:1,2:3,3:1,4:2}[e.button]:e.which}function GI(e){e&&(R.Event=e,R.Event.prototype=e.prototype)}GI(oV(function(e,t){var i,n=e instanceof R.Event||Ue()&&e instanceof eg.Event||((i=e.view)===null||i===void 0?void 0:i.Event)&&e instanceof e.view.Event;n?(this.originalEvent=e,this.type=e.type,this.currentTarget=void 0,Object.prototype.hasOwnProperty.call(e,"isTrusted")&&(this.isTrusted=e.isTrusted),this.timeStamp=e.timeStamp||Date.now()):Se(this,e),ig("which",lV,this),e.type.indexOf("touch")===0&&(delete t.pageX,delete t.pageY),Se(this,t),this.guid=++HI}));function ig(e,t,i){Object.defineProperty(i||R.Event.prototype,e,{enumerable:!0,configurable:!0,get:function(){return this.originalEvent&&t(this.originalEvent)},set:function(n){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}})}tV.forEach(e=>ig(e,t=>t[e]));JM(ig);var UI=dt(),KI=dt();R.set=function(e){UI.fire(),R.inject(e),GI(e.Event),KI.fire()};R.subscribeGlobal=function(){tg(arguments,C_(function(){var e=arguments;R.on.apply(this,e),UI.add(function(){var t=Array.prototype.slice.call(e,0);t.splice(3,1),R.off.apply(this,t)}),KI.add(function(){R.on.apply(this,e)})}))};R.forcePassiveFalseEventNames=$I;R.passiveEventHandlersSupported=WI;var ll=new WeakMap,so,uV=new Zm,jI=function(){},dV=function(e){uV.fire(e),so=e;var t=so.cleanData;so.cleanData=function(i){jI(i);var n=t.call(this,i);return n}};dV({data:function(){var e=arguments[0],t=arguments[1],i=arguments[2];if(e){var n=ll.get(e);return n||(n={},ll.set(e,n)),t===void 0?n:arguments.length===2?n[t]:(n[t]=i,i)}},removeData:function(e,t){if(e)if(t===void 0)ll.delete(e);else{var i=ll.get(e);i&&delete i[t]}},cleanData:function(e){for(var t=0;t<e.length;t++)R.off(e[t]),ll.delete(e[t])}});function Vt(){return so.data.apply(this,arguments)}function cV(e){jI=e}function Mh(e,t){return so.removeData.call(this,e,t)}function Pu(e,t){if(me.isElementNode(e)){var i=e.getElementsByTagName("*");so.cleanData(i),t&&so.cleanData([e])}}var qI=function(e){return e==null?"":String(e)},ng=function(e){return qI(e).charAt(0).toUpperCase()+e.substr(1)},rg=function(e){return qI(e).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},ag=function(e){return ti(rg(e),function(t){return t.toLowerCase()}).join("-")},qc=function(e,t){return ti(rg(e),function(i,n){return i=i.toLowerCase(),(t||n>0)&&(i=ng(i)),i}).join("")},hV=function(e){return ng(ag(e).replace(/-/g," "))},Yc=function(e){return ti(rg(e),function(t){return ng(t.toLowerCase())}).join(" ")},fV=["0","1","2","3","4","5","6","7","8","9"],vo=function(e){var t=[],i,n,r=!1,a=!1;for(i=0;i<e.length;i++)n=e.charAt(i),a=n===n.toUpperCase()&&n!=="-"&&n!==")"&&n!=="/"||n in fV,n==="_"||n==="."?(n=" ",a=!0):i===0?(n=n.toUpperCase(),a=!0):!r&&a&&t.length>0&&t.push(" "),t.push(n),r=a;return t.join("")},Xc=["","Webkit","Moz","O","Ms"],pV={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},y_=Jr(function(){return me.createElement("dx").style}),vV=function(e,t){e=qc(e,!0);for(var i,n=0,r=Xc.length;n<r;n++){var a=Xc[n],o=a+e,s=qc(o);if(i=t(s,a),i===void 0&&(i=t(o,a)),i!==void 0)break}return i||""},Ta=function(e){if(e in y_())return e;var t=e;e=e.charAt(0).toUpperCase()+e.substr(1);for(var i=1;i<Xc.length;i++){var n=Xc[i].toLowerCase()+e;if(n in y_())return n}return t},Sc=function(e){return vV(e,function(t,i){if(t in y_())return pV[i]})},_V=["fillOpacity","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","opacity","zIndex","zoom"],Ms=function(e,t){return Et(t)&&_V.indexOf(e)===-1&&(t+="px"),t},YI=function(e,t,i){if(e){i=Et(i)?i+="px":i;for(var n=0;n<e.length;++n)e[n].style[t]=i}},Df=function(e,t){YI(e,"width",t)},Of=function(e,t){YI(e,"height",t)},og=je(),mV=["auto","none","inherit","initial"],Rf=function(e,t){var i=0;return t.forEach(function(n){i+=parseFloat(e[n])||0}),i},XI=function(e,t){var i=e==="width"?"Left":"Top",n=e==="width"?"Right":"Bottom";return{padding:Rf(t,["padding"+i,"padding"+n]),border:Rf(t,["border"+i+"Width","border"+n+"Width"]),margin:Rf(t,["margin"+i,"margin"+n])}},ZI=function(e){var t,i=(e==null||(t=e.ownerDocument)===null||t===void 0?void 0:t.defaultView)||og;return i.getComputedStyle&&i.getComputedStyle(e)},x_=function(e,t,i,n){var r;return(t==null?void 0:t[i])||((r=e.style)===null||r===void 0?void 0:r[i])||n},Jo={content:0,padding:1,border:2,margin:3,"content-box":0,"border-box":2},sy={width:["left","right"],height:["top","bottom"]};function ul(e,t,i,n){var r=(o,s,l)=>parseFloat(x_(o,s,l,"0"))||0,a=i==="border"?"-width":"";return r(e,n,"".concat(i,"-").concat(sy[t][0]).concat(a))+r(e,n,"".concat(i,"-").concat(sy[t][1]).concat(a))}var gV=function(e,t,i){var n=t==="width"?"offsetWidth":"offsetHeight",r=ZI(e),a=x_(e,r,t);(a===""||a==="auto")&&(a=e[n]),a=parseFloat(a)||0;var o=x_(e,r,"boxSizing","content-box"),s=i||o,l=Jo[s],u=Jo[o];if(l===void 0||u===void 0)throw new Error;if(u===l)return a;var d=Math.sign(l-u),c=!1,h=!1,f=!1,p=!1;d===1&&(l+=1,u+=1);for(var m=u;m!==l;m+=d)switch(m){case Jo.content:break;case Jo.padding:c=d*ul(e,t,"padding",r);break;case Jo.border:h=d*ul(e,t,"border",r);break;case Jo.margin:f=d*ul(e,t,"margin",r)}if(c||h){var g=(c===!1?d*ul(e,t,"padding",r):c)+(h===!1?d*ul(e,t,"border",r):h);p=d*Math.max(0,Math.floor(e[n]-a-d*g))||0}return a+f+c+h+p},CV=function(e){return Xt(e)?e.innerHeight:e.offsetHeight},yV=function(e,t){return e.indexOf("px")>0?e=parseInt(e.replace("px","")):e.indexOf("%")>0?e=parseInt(e.replace("%",""))*CV(t)/100:isNaN(e)?e.indexOf("vh")>0&&(e=og.innerHeight/100*parseInt(e.replace("vh",""))):e=parseInt(e),e},JI=function(e,t,i){if(!e)return null;if(mV.indexOf(e)>-1)return t?null:e;if(Ve(e)&&(e=yV(e,i)),Et(e))return Math.max(0,e+t);var n=t<0?" - ":" ";return"calc("+e+n+Math.abs(t)+"px)"},xV=function(e,t,i){var n=JI(e,t,i);return n!==null?n:"none"},bV=function(e,t,i){var n=JI(e,t,i);return n!==null?n:0},kf=function(e,t){if(!e)return 0;var i=XI("height",og.getComputedStyle(e));return i.padding+i.border+(t?i.margin:0)},ly=function(e){if(e){var t=e.getBoundingClientRect();if(t.height)return t.height}return 0},pr={getWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("width",...t)},setWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("width",...t)},getHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("height",...t)},setHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("height",...t)},getOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("outerWidth",...t)},setOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("outerWidth",...t)},getOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("outerHeight",...t)},setOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("outerHeight",...t)},getInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("innerWidth",...t)},setInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("innerWidth",...t)},getInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("innerHeight",...t)},setInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Sn("innerHeight",...t)}};function Sn(e,t,i){return arguments.length===2?cy(t,e):cy(t,e,i)}var He=e=>pr.getWidth(e),Fu=(e,t)=>pr.setWidth(e,t),Ke=e=>pr.getHeight(e),gn=(e,t)=>pr.setHeight(e,t),ot=(e,t)=>pr.getOuterWidth(e,t||!1),uy=(e,t)=>pr.setOuterWidth(e,t),nt=(e,t)=>pr.getOuterHeight(e,t||!1),dy=(e,t)=>pr.setOuterHeight(e,t),b_=e=>pr.getInnerWidth(e),Zc=e=>pr.getInnerHeight(e),cy=function e(t,i,n){var r=i.toLowerCase().indexOf("width")>=0?"Width":"Height",a=r.toLowerCase(),o=i.indexOf("outer")===0,s=i.indexOf("inner")===0,l=arguments.length===2||typeof n=="boolean";if(mn(t)){if(t.length>1&&!l){for(var u=0;u<t.length;u++)e(t[u],i,n);return}t=t[0]}if(t){if(Xt(t))return o?t["inner"+r]:me.getDocumentElement()["client"+r];if(me.isDocument(t)){var d=me.getDocumentElement(),c=me.getBody();return Math.max(c["scroll"+r],c["offset"+r],d["scroll"+r],d["offset"+r],d["client"+r])}if(l){var h="content";return o&&(h=n?"margin":"border"),s&&(h="padding"),gV(t,a,h)}if(Et(n)){var f=ZI(t),p=XI(a,f),m=f.boxSizing==="border-box";n=Number(n),o?n-=m?0:p.border+p.padding:s?n+=m?p.border:-p.padding:m&&(n+=p.border+p.padding)}return n+=Et(n)?"px":"",me.setStyle(t,a,n),null}},QI=e=>Xt(e)?e:e.defaultView,S_=e=>{if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),i=QI(e.ownerDocument),n=e.ownerDocument.documentElement;return{top:t.top+i.pageYOffset-n.clientTop,left:t.left+i.pageXOffset-n.clientLeft}},eT=/<([a-z][^/\0>\x20\t\r\n\f]+)/i,sr={default:{tagsCount:0,startTags:"",endTags:""},thead:{tagsCount:1,startTags:"<table>",endTags:"</table>"},td:{tagsCount:3,startTags:"<table><tbody><tr>",endTags:"</tr></tbody></table>"},col:{tagsCount:2,startTags:"<table><colgroup>",endTags:"</colgroup></table>"},tr:{tagsCount:2,startTags:"<table><tbody>",endTags:"</tbody></table>"}};sr.tbody=sr.colgroup=sr.caption=sr.tfoot=sr.thead;sr.th=sr.td;var sg=function(e){if(typeof e!="string")return null;var t=me.createDocumentFragment(),i=t.appendChild(me.createElement("div")),n=eT.exec(e),r=n&&n[1].toLowerCase(),a=sr[r]||sr.default;i.innerHTML=a.startTags+e+a.endTags;for(var o=0;o<a.tagsCount;o++)i=i.lastChild;return[...i.childNodes]},SV=function(e){var t=eT.exec(e);return t&&t[1]in sr},EV=je(),rt,Ge=function(e,t){return e?typeof e=="string"?e==="body"?(this[0]=t?t.body:me.getBody(),this.length=1,this):(t=t||me.getDocument(),e[0]==="<"?(this[0]=me.createElement(e.slice(1,-1),t),this.length=1,this):([].push.apply(this,me.querySelectorAll(t,e)),this)):me.isNode(e)||Xt(e)?(this[0]=e,this.length=1,this):Array.isArray(e)?([].push.apply(this,e),this):rt(e.toArray?e.toArray():[e]):(this.length=0,this)};rt=function(e,t){return new Ge(e,t)};rt.fn={dxRenderer:!0};Ge.prototype=rt.fn;var Xs=function(e,t){for(var i=0;i<this.length;i++){var n=rt(this[i]);n[e].apply(n,t)}return this},E_=function(e,t,i){i!=null?me.setAttribute(e,t,i):me.removeAttribute(e,t)};Ge.prototype.show=function(){return this.toggle(!0)};Ge.prototype.hide=function(){return this.toggle(!1)};Ge.prototype.toggle=function(e){return this[0]&&this.toggleClass("dx-state-invisible",!e),this};Ge.prototype.attr=function(e,t){if(this.length>1&&arguments.length>1)return Xs.call(this,"attr",arguments);if(!this[0])return $e(e)||t!==void 0?this:void 0;if(!this[0].getAttribute)return this.prop(e,t);if(typeof e=="string"&&arguments.length===1){var i=this[0].getAttribute(e);return i??void 0}else if(Ye(e))for(var n in e)this.attr(n,e[n]);else E_(this[0],e,t);return this};Ge.prototype.removeAttr=function(e){return this[0]&&me.removeAttribute(this[0],e),this};Ge.prototype.prop=function(e,t){if(!this[0])return this;if(typeof e=="string"&&arguments.length===1)return this[0][e];if(Ye(e))for(var i in e)this.prop(i,e[i]);else me.setProperty(this[0],e,t);return this};Ge.prototype.addClass=function(e){return this.toggleClass(e,!0)};Ge.prototype.removeClass=function(e){return this.toggleClass(e,!1)};Ge.prototype.hasClass=function(e){if(!this[0]||this[0].className===void 0)return!1;for(var t=e.split(" "),i=0;i<t.length;i++)if(this[0].classList){if(this[0].classList.contains(t[i]))return!0}else{var n=Ve(this[0].className)?this[0].className:me.getAttribute(this[0],"class");if((n||"").split(" ").indexOf(t[i])>=0)return!0}return!1};Ge.prototype.toggleClass=function(e,t){if(this.length>1)return Xs.call(this,"toggleClass",arguments);if(!this[0]||!e)return this;t=t===void 0?!this.hasClass(e):t;for(var i=e.split(" "),n=0;n<i.length;n++)me.setClass(this[0],i[n],t);return this};Ge.prototype.html=function(e){return arguments.length?(this.empty(),typeof e=="string"&&!SV(e)||typeof e=="number"?(this[0].innerHTML=e,this):this.append(sg(e))):this[0].innerHTML};var tT=function(e,t){if(!(!this[0]||!e)){typeof e=="string"?e=sg(e):e.nodeType?e=[e]:Et(e)&&(e=[me.createTextNode(e)]);for(var i=0;i<e.length;i++){var n=e[i],r=this[0],a=r.tagName==="TABLE"&&n.tagName==="TR";a&&r.tBodies&&r.tBodies.length&&(r=r.tBodies[0]),me.insertElement(r,n.nodeType?n:n[0],t)}}},hy=function(e,t){if(!(!this[0]||!this[0].style)&&!(t===null||typeof t=="number"&&isNaN(t))){e=Ta(e);for(var i=0;i<this.length;i++)this[i].style[e]=Ms(e,t)}};Ge.prototype.css=function(e,t){if(Ve(e))if(arguments.length===2)hy.call(this,e,t);else{if(!this[0])return;e=Ta(e);var i=EV.getComputedStyle(this[0])[e]||this[0].style[e];return Et(i)?i.toString():i}else if(Ye(e))for(var n in e)hy.call(this,n,e[n]);return this};Ge.prototype.prepend=function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.prepend(arguments[t]);return this}return tT.apply(this,[e,this[0].firstChild]),this};Ge.prototype.append=function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.append(arguments[t]);return this}return tT.apply(this,[e]),this};Ge.prototype.prependTo=function(e){if(this.length>1){for(var t=this.length-1;t>=0;t--)rt(this[t]).prependTo(e);return this}return e=rt(e),e[0]&&me.insertElement(e[0],this[0],e[0].firstChild),this};Ge.prototype.appendTo=function(e){return this.length>1?Xs.call(this,"appendTo",arguments):(me.insertElement(rt(e)[0],this[0]),this)};Ge.prototype.insertBefore=function(e){return e&&e[0]&&me.insertElement(e[0].parentNode,this[0],e[0]),this};Ge.prototype.insertAfter=function(e){return e&&e[0]&&me.insertElement(e[0].parentNode,this[0],e[0].nextSibling),this};Ge.prototype.before=function(e){return this[0]&&me.insertElement(this[0].parentNode,e[0],this[0]),this};Ge.prototype.after=function(e){return this[0]&&me.insertElement(this[0].parentNode,e[0],this[0].nextSibling),this};Ge.prototype.wrap=function(e){if(this[0]){var t=rt(e);t.insertBefore(this),t.append(this)}return this};Ge.prototype.wrapInner=function(e){var t=this.contents();return t.length?t.wrap(e):this.append(e),this};Ge.prototype.replaceWith=function(e){if(e&&e[0])return e.is(this)?this:(e.insertBefore(this),this.remove(),e)};Ge.prototype.remove=function(){return this.length>1?Xs.call(this,"remove",arguments):(Pu(this[0],!0),me.removeElement(this[0]),this)};Ge.prototype.detach=function(){return this.length>1?Xs.call(this,"detach",arguments):(me.removeElement(this[0]),this)};Ge.prototype.empty=function(){return this.length>1?Xs.call(this,"empty",arguments):(Pu(this[0]),me.setText(this[0],""),this)};Ge.prototype.clone=function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t].cloneNode(!0));return rt(e)};Ge.prototype.text=function(e){if(!arguments.length){for(var t="",i=0;i<this.length;i++)t+=this[i]&&this[i].textContent||"";return t}var n=Ie(e)?e():e;return Pu(this[0],!1),me.setText(this[0],E(n)?n:""),this};Ge.prototype.val=function(e){return arguments.length===1?this.prop("value",E(e)?e:""):this.prop("value")};Ge.prototype.contents=function(){if(!this[0])return rt();var e=[];return e.push.apply(e,this[0].childNodes),rt(e)};Ge.prototype.find=function(e){var t=rt();if(!e)return t;var i=[],n;if(typeof e=="string")for(e=e.trim(),n=0;n<this.length;n++){var r=this[n];if(me.isElementNode(r)){var a=r.getAttribute("id"),o=a||"dx-query-children";a||E_(r,"id",o),o="[id='"+o+"'] ";var s=o+e.replace(/([^\\])(,)/g,"$1, "+o);i.push.apply(i,me.querySelectorAll(r,s)),E_(r,"id",a)}else me.isDocument(r)&&i.push.apply(i,me.querySelectorAll(r,e))}else for(n=0;n<this.length;n++)e=me.isNode(e)?e:e[0],this[n]!==e&&this[n].contains(e)&&i.push(e);return t.add(i)};var fy=function(e,t){return t.nodeType?!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length):!0};Ge.prototype.filter=function(e){if(!e)return rt();if(e===":visible")return this.filter(fy);if(e===":hidden")return this.filter(function(a,o){return!fy(a,o)});for(var t=[],i=0;i<this.length;i++){var n=this[i];if(me.isElementNode(n)&&Ln(e)==="string")me.elementMatches(n,e)&&t.push(n);else if(me.isNode(e)||Xt(e))e===n&&t.push(n);else if(Ie(e))e.call(n,i,n)&&t.push(n);else for(var r=0;r<e.length;r++)e[r]===n&&t.push(n)}return rt(t)};Ge.prototype.not=function(e){for(var t=[],i=this.filter(e).toArray(),n=0;n<this.length;n++)i.indexOf(this[n])===-1&&t.push(this[n]);return rt(t)};Ge.prototype.is=function(e){return!!this.filter(e).length};Ge.prototype.children=function(e){for(var t=[],i=0;i<this.length;i++)for(var n=this[i]?this[i].childNodes:[],r=0;r<n.length;r++)me.isElementNode(n[r])&&t.push(n[r]);return t=rt(t),e?t.filter(e):t};Ge.prototype.siblings=function(){var e=this[0];if(!e||!e.parentNode)return rt();for(var t=[],i=e.parentNode.childNodes||[],n=0;n<i.length;n++){var r=i[n];me.isElementNode(r)&&r!==e&&t.push(r)}return rt(t)};Ge.prototype.each=function(e){for(var t=0;t<this.length&&e.call(this[t],t,this[t])!==!1;t++);};Ge.prototype.index=function(e){return e?(e=rt(e),this.toArray().indexOf(e[0])):this.parent().children().index(this)};Ge.prototype.get=function(e){return this[e<0?this.length+e:e]};Ge.prototype.eq=function(e){return e=e<0?this.length+e:e,rt(this[e])};Ge.prototype.first=function(){return this.eq(0)};Ge.prototype.last=function(){return this.eq(-1)};Ge.prototype.parent=function(e){if(!this[0])return rt();var t=rt(this[0].parentNode);return!e||t.is(e)?t:rt()};Ge.prototype.parents=function(e){for(var t=[],i=this.parent();i&&i[0]&&!me.isDocument(i[0]);)me.isElementNode(i[0])&&(!e||i.is(e))&&t.push(i.get(0)),i=i.parent();return rt(t)};Ge.prototype.closest=function(e){if(this.is(e))return this;for(var t=this.parent();t&&t.length;){if(t.is(e))return t;t=t.parent()}return rt()};Ge.prototype.next=function(e){if(!this[0])return rt();var t=rt(this[0].nextSibling);if(!arguments.length)return t;for(;t&&t.length;){if(t.is(e))return t;t=t.next()}return rt()};Ge.prototype.prev=function(){return this[0]?rt(this[0].previousSibling):rt()};Ge.prototype.add=function(e){for(var t=rt(e),i=this.toArray(),n=0;n<t.length;n++){var r=t[n];i.indexOf(r)===-1&&i.push(r)}return rt(i)};var lg=[];Ge.prototype.splice=function(){return rt(lg.splice.apply(this,arguments))};Ge.prototype.slice=function(){return rt(lg.slice.apply(this,arguments))};Ge.prototype.toArray=function(){return lg.slice.call(this)};Ge.prototype.offset=function(){if(this[0])return S_(this[0])};Ge.prototype.offsetParent=function(){if(!this[0])return rt();for(var e=rt(this[0].offsetParent);e[0]&&e.css("position")==="static";)e=rt(e[0].offsetParent);return e=e[0]?e:rt(me.getDocumentElement()),e};Ge.prototype.position=function(){if(this[0]){var e,t=parseFloat(this.css("marginTop")),i=parseFloat(this.css("marginLeft"));if(this.css("position")==="fixed")return e=this[0].getBoundingClientRect(),{top:e.top-t,left:e.left-i};e=this.offset();var n=this.offsetParent(),r={top:0,left:0};return n[0].nodeName!=="HTML"&&(r=n.offset()),r={top:r.top+parseFloat(n.css("borderTopWidth")),left:r.left+parseFloat(n.css("borderLeftWidth"))},{top:e.top-r.top-t,left:e.left-r.left-i}}};[{name:"scrollLeft",offsetProp:"pageXOffset",scrollWindow:function(e,t){e.scrollTo(t,e.pageYOffset)}},{name:"scrollTop",offsetProp:"pageYOffset",scrollWindow:function(e,t){e.scrollTo(e.pageXOffset,t)}}].forEach(function(e){var t=e.name;Ge.prototype[t]=function(i){if(this[0]){var n=QI(this[0]);return i===void 0?n?n[e.offsetProp]:this[0][t]:(n?e.scrollWindow(n,i):this[0][t]=i,this)}}});Ge.prototype.data=function(e,t){if(this[0])return arguments.length<2?Vt.call(rt,this[0],e):(Vt.call(rt,this[0],e,t),this)};Ge.prototype.removeData=function(e){return this[0]&&Mh(this[0],e),this};var iT=function(){return rt.apply(this,arguments)};Object.defineProperty(iT,"fn",{enumerable:!0,configurable:!0,get:function(){return rt.fn},set:function(e){rt.fn=e}});const wV={set:function(e){rt=e},get:function(){return iT}},v=wV.get(),nT=new Zm;var Mn=function(e,t){var i={};"noBubble"in t&&(i.noBubble=t.noBubble),"bindType"in t&&(i.bindType=t.bindType),"delegateType"in t&&(i.delegateType=t.delegateType),V(["setup","teardown","add","remove","trigger","handle","_default","dispose"],function(n,r){t[r]&&(i[r]=function(){var a=[].slice.call(arguments);return a.unshift(this),t[r].apply(t,a)})}),Jm.fire(e,i)};Mn.callbacks=Jm;var vr="dxremove",w_="dxRemoveEvent";cV(function(e){e=[].slice.call(e);for(var t=0;t<e.length;t++){var i=v(e[t]);i.prop(w_)&&(i[0][w_]=null,R.triggerHandler(i,vr))}});Mn(vr,{noBubble:!0,setup:function(e){v(e).prop(w_,!0)}});var Bf="dxComponents",IV="dxPrivateComponent",_d=new WeakMap,TV=0,Mu=function(e,t){if(E(t)){_d.set(e,t);return}if(!_d.has(e)){var i=IV+TV++;return _d.set(e,i),i}return _d.get(e)};function rT(e,t,i){var n=Vt(e.get(0)),r=Mu(t.constructor);n[r]=t,i&&R.one(e,vr,function(){i.call(t)}),n[Bf]||(n[Bf]=[]),n[Bf].push(r)}function aT(e,t){var i=Mu(t);return Vt(e.get(0),i)}var tt=function(e,t,i){i?t[e]=i:i=t,Mu(i,e),nT.fire(e,i)},AV=function(e,t){v.fn[e]=function(i){var n=typeof i=="string",r;if(n){var a=i,o=[].slice.call(arguments).slice(1);this.each(function(){var s=t.getInstance(this);if(!s)throw xt.Error("E0009",e);var l=s[a],u=l.apply(s,o);r===void 0&&(r=u)})}else this.each(function(){var s=t.getInstance(this);s?s.option(i):new t(this,i)}),r=this;return r}};nT.add(AV);var DV=Lu(),OV=/(webkit)[ /]([\w.]+)/,RV=/(mozilla)(?:.*? rv:([\w.]+))/,py=e=>{e=e.toLowerCase();var t={},i=OV.exec(e)||e.indexOf("compatible")<0&&RV.exec(e)||[],n=i[1],r=i[2];return n==="webkit"&&(t.webkit=!0,e.indexOf("chrome")>=0||e.indexOf("crios")>=0?(n="chrome",r=/(?:chrome|crios)\/(\d+\.\d+)/.exec(e),r=r&&r[1]):e.indexOf("fxios")>=0?(n="mozilla",r=/fxios\/(\d+\.\d+)/.exec(e),r=r&&r[1]):e.indexOf("safari")>=0&&/version|phantomjs/.test(e)?(n="safari",r=/(?:version|phantomjs)\/([0-9.]+)/.exec(e),r=r&&r[1]):(n="unknown",r=/applewebkit\/([0-9.]+)/.exec(e),r=r&&r[1])),n&&(t[n]=!0,t.version=r),t};const Lt=k({_fromUA:py},py(DV.userAgent));class on{constructor(t,i){i=i||{},this._action=t,this._context=i.context||je(),this._beforeExecute=i.beforeExecute,this._afterExecute=i.afterExecute,this._component=i.component,this._validatingTargetName=i.validatingTargetName;var n=this._excludeValidators={};if(i.excludeValidators)for(var r=0;r<i.excludeValidators.length;r++)n[i.excludeValidators[r]]=!0}execute(){var t={action:this._action,args:Array.prototype.slice.call(arguments),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},i=this._beforeExecute,n=this._afterExecute,r=t.args[0]||{};if(this._validateAction(t)&&(i==null||i.call(this._context,t),!t.cancel)){var a=this._executeAction(t);if(!r.cancel)return n==null||n.call(this._context,t),a}}_validateAction(t){var i=this._excludeValidators,{executors:n}=on;for(var r in n)if(!i[r]){var a,o=n[r];if((a=o.validate)===null||a===void 0||a.call(o,t),t.cancel)return!1}return!0}_executeAction(t){var i,{executors:n}=on;for(var r in n){var a,o=n[r];if((a=o.execute)===null||a===void 0||a.call(o,t),t.handled){i=t.result;break}}return i}static registerExecutor(t,i){if(Ye(t)){V(t,on.registerExecutor);return}on.executors[t]=i}static unregisterExecutor(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];V(i,function(){delete on.executors[this]})}}on.executors={};var vy=e=>t=>{if(t.args.length){var i=t.args[0],n=i[t.validatingTargetName]||i.element;n&&e(v(n))&&(t.cancel=!0)}};on.registerExecutor({disabled:{validate:vy(e=>e.is(".dx-state-disabled, .dx-state-disabled *"))},readOnly:{validate:vy(e=>e.is(".dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)"))},undefined:{execute:e=>{e.action||(e.result=void 0,e.handled=!0)}},func:{execute:e=>{Ie(e.action)&&(e.result=e.action.call(e.context,e.args[0]),e.handled=!0)}}});var Lf=[],kV=Jr(()=>{var e=me.listen(me.getDocument(),"DOMContentLoaded",()=>{oT.fire(),e()})}),oT={add:e=>{var t=Ue();t&&me.getReadyState()!=="loading"?e():(Lf.push(e),t&&kV())},fire:()=>{Lf.forEach(e=>e()),Lf=[]}};const _r=Fn(oT);var _o=function(){var e,t=dt(),i=t.add,n=t.remove;if(!Ue())return t;var r=function(){var l=je();return{width:l.innerWidth,height:l.innerHeight}},a=function(){var l=r();if(!(l.width===e.width&&l.height===e.height)){var u;l.width===e.width&&(u="height"),l.height===e.height&&(u="width"),e=l,t.fire(u)}},o=Jr(function(){e=r()}),s;return t.add=function(){var l=i.apply(t,arguments);return o(),_r.add(function(){!s&&t.has()&&(s=me.listen(je(),"resize",a))}),l},t.remove=function(){var l=n.apply(t,arguments);return!t.has()&&s&&(s(),s=void 0),l},t}(),BV=function(e,t){return 1/e===1/t},LV=function(e,t){if(e=qt(e,!0),t=qt(t,!0),e&&t&&mn(e)&&mn(t))return t.is(e);var i=e!==e,n=t!==t;return i&&n?!0:e===0&&t===0?BV(e,t):e===null||typeof e!="object"||me.isElementNode(e)?e===t:!1};class Oo{constructor(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._events={},this._owner=t,this._options=i}static create(t,i){return i?Ie(i)?i(t):i:new Oo(t)}hasEvent(t){var i=this._events[t];return i?i.has():!1}fireEvent(t,i){var n=this._events[t];return n&&n.fireWith(this._owner,i),this._owner}on(t,i){if(Ye(t))V(t,(a,o)=>{this.on(a,o)});else{var n=this._events[t];n||(n=dt({syncStrategy:this._options.syncStrategy}),this._events[t]=n);var r=n.originalAdd||n.add;r.call(n,i)}}off(t,i){var n=this._events[t];n&&(Ie(i)?n.remove(i):n.empty())}dispose(){V(this._events,(t,i)=>{i.empty()})}}var PV=je(),sT=function(){var e;try{e=PV.sessionStorage}catch{}return e},FV=_r.add,Vh=dt(),lT=v(),xa=function(){var e;return function(t){if(!arguments.length)return e;var i=v(t);lT=i;var n=!!i.length,r=xa();e=n?i:v("body"),Vh.fire(n?xa():v(),r)}}();FV(function(){xa(".dx-viewport")});function uT(){return lT}var MV=Lu(),dT=je(),VV={iPhone:"iPhone",iPhone5:"iPhone",iPhone6:"iPhone",iPhone6plus:"iPhone",iPad:"iPad",iPadMini:"iPad Mini",androidPhone:"Android Mobile",androidTablet:"Android",msSurface:"Windows ARM Tablet PC",desktop:"desktop"},_y={deviceType:"desktop",platform:"generic",version:[],phone:!1,tablet:!1,android:!1,ios:!1,generic:!0,grade:"A",mac:!1},NV={generic(e){var t=/windows phone/i.test(e)||e.match(/WPDesktop/),i=!t&&/Windows(.*)arm(.*)Tablet PC/i.test(e),n=!t&&!i&&/msapphost/i.test(e),r=/((intel|ppc) mac os x)/.test(e.toLowerCase());if(t||i||n||r)return{deviceType:t?"phone":i?"tablet":"desktop",platform:"generic",version:[],grade:"A",mac:r}},ios(e){if(/ip(hone|od|ad)/i.test(e)){var t=/ip(hone|od)/i.test(e),i=e.match(/os (\d+)_(\d+)_?(\d+)?/i),n=i?[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3]||0,10)]:[],r=dT.screen.height===480,a=r?"B":"A";return{deviceType:t?"phone":"tablet",platform:"ios",version:n,grade:a}}},android(e){if(/android|htc_|silk/i.test(e)){var t=/mobile/i.test(e),i=e.match(/android (\d+)\.?(\d+)?\.?(\d+)?/i),n=i?[parseInt(i[1],10),parseInt(i[2]||0,10),parseInt(i[3]||0,10)]:[],r=n.length>1&&(n[0]<4||n[0]===4&&n[1]<4),a=r?"B":"A";return{deviceType:t?"phone":"tablet",platform:"android",version:n,grade:a}}}};class $V{constructor(t){this._window=(t==null?void 0:t.window)||dT,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new Oo(this),this.changed=dt(),Ue()&&(_r.add(this._recalculateOrientation.bind(this)),_o.add(this._recalculateOrientation.bind(this)))}current(t){if(t){this._currentDevice=this._getDevice(t),this._forced=!0,this.changed.fire();return}if(!this._currentDevice){t=void 0;try{t=this._getDeviceOrNameFromWindowScope()}catch{t=this._getDeviceNameFromSessionStorage()}finally{t||(t=this._getDeviceNameFromSessionStorage()),t&&(this._forced=!0)}this._currentDevice=this._getDevice(t)}return this._currentDevice}real(t){return k({},this._realDevice)}orientation(){return this._currentOrientation}isForced(){return this._forced}isRippleEmulator(){return!!this._window.tinyHippos}_getCssClasses(t){var i=[],n=this._realDevice;return t=t||this.current(),t.deviceType&&(i.push("dx-device-".concat(t.deviceType)),t.deviceType!=="desktop"&&i.push("dx-device-mobile")),i.push("dx-device-".concat(n.platform)),n.version&&n.version.length&&i.push("dx-device-".concat(n.platform,"-").concat(n.version[0])),this.isSimulator()&&i.push("dx-simulator"),At().rtlEnabled&&i.push("dx-rtl"),i}attachCssClasses(t,i){this._deviceClasses=this._getCssClasses(i).join(" "),v(t).addClass(this._deviceClasses)}detachCssClasses(t){v(t).removeClass(this._deviceClasses)}isSimulator(){try{return this._isSimulator||Ue()&&this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch{return!1}}forceSimulator(){this._isSimulator=!0}_getDevice(t){if(t==="genericPhone"&&(t={deviceType:"phone",platform:"generic",generic:!0}),Ye(t))return this._fromConfig(t);var i;if(t){if(i=VV[t],!i)throw xt.Error("E0005")}else i=MV.userAgent;return this._fromUA(i)}_getDeviceOrNameFromWindowScope(){var t;return Ue()&&(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(t=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),t}_getDeviceNameFromSessionStorage(){var t=sT();if(t){var i=t.getItem("dx-force-device");try{return JSON.parse(i)}catch{return i}}}_fromConfig(t){var i=k({},_y,this._currentDevice,t),n={phone:i.deviceType==="phone",tablet:i.deviceType==="tablet",android:i.platform==="android",ios:i.platform==="ios",generic:i.platform==="generic"};return k(i,n)}_fromUA(t){var i;return V(NV,(n,r)=>(i=r(t),!i)),i?this._fromConfig(i):_y}_changeOrientation(){var t=v(this._window),i=Ke(t)>He(t)?"portrait":"landscape";this._currentOrientation!==i&&(this._currentOrientation=i,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:i}]))}_recalculateOrientation(){var t=He(this._window);this._currentWidth!==t&&(this._currentWidth=t,this._changeOrientation())}on(t,i){return this._eventsStrategy.on(t,i),this}off(t,i){return this._eventsStrategy.off(t,i),this}}var Re=new $V,my=xa();my&&Re.attachCssClasses(my);Vh.add((e,t)=>{Re.detachCssClasses(t),Re.attachCssClasses(e)});var Pf={},Vs=e=>{var t=Re.current();return e.reduce((i,n)=>{var{device:r,options:a}=n,o=r||{},s=Ie(o)?o(t):WV(t,o);return s&&k(!0,i,a),i},{})},HV=(e,t)=>typeof e!="string"?e:{[e]:t},WV=(e,t)=>Pn(t)||Ym(e,[t]).length>0,gy=e=>e.substr(e.lastIndexOf(".")+1),Cy=e=>e.substr(0,e.lastIndexOf(".")),zV=function(e,t){return Pf[t]=Pf[t]||bt(t),Pf[t](e,{functionsAsIs:!0})},GV=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e},Ff={},Mf={};class UV{constructor(t,i){this._options=t,this._optionsByReference=i,this._changingCallback,this._changedCallback,this._namePreparedCallbacks}_setByReference(t,i){k(!0,t,i);for(var n in this._optionsByReference)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}_setPreparedValue(t,i,n,r){var a=this.get(this._options,t,!1);if(!LV(a,i)){var o=Ao(t);!r&&this._changingCallback(t,a,i),Mf[t]=Mf[t]||qm(t),Mf[t](this._options,i,{functionsAsIs:!0,merge:E(n)?n:!this._optionsByReference[t],unwrapObservables:o.length>1&&!!this._optionsByReference[o[0]]}),!r&&this._changedCallback(t,i,a)}}_prepareRelevantNames(t,i,n,r){if(Ye(n))for(var a in n)this._prepareRelevantNames(t,"".concat(i,".").concat(a),n[a]);this._namePreparedCallbacks(t,i,n,r)}get(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._options,i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Ff[i]=Ff[i]||bt(i),Ff[i](t,{functionsAsIs:!0,unwrapObservables:n})}set(t,i,n,r){t=HV(t,i);for(var a in t)this._prepareRelevantNames(t,a,t[a],r);for(var o in t)this._setPreparedValue(o,t[o],n,r)}onRelevantNamesPrepared(t){this._namePreparedCallbacks=t}onChanging(t){this._changingCallback=t}onChanged(t){this._changedCallback=t}dispose(){this._changingCallback=re,this._changedCallback=re}}class KV{constructor(t,i,n,r){this._deprecatedCallback,this._startChangeCallback,this._endChangeCallback,this._default=i,this._deprecated=r,this._deprecatedNames=[],this._initDeprecatedNames(),this._optionManager=new UV(t,n),this._optionManager.onRelevantNamesPrepared((a,o,s,l)=>this._setRelevantNames(a,o,s,l)),this._cachedOptions={},this._rules=[]}set _initial(t){this._initialOptions=t}get _initial(){if(!this._initialOptions){var t=this._getByRules(this.silent("defaultOptionsRules"));this._initialOptions=this._default,this._optionManager._setByReference(this._initialOptions,t)}return this._initialOptions}_initDeprecatedNames(){for(var t in this._deprecated)this._deprecatedNames.push(t)}_getByRules(t){return t=Array.isArray(t)?this._rules.concat(t):this._rules,Vs(t)}_notifyDeprecated(t){var i=this._deprecated[t];i&&this._deprecatedCallback(t,i)}_setRelevantNames(t,i,n,r){if(i){var a=this._normalizeName(i,r);a&&a!==i&&(this._setField(t,a,n),this._clearField(t,i))}}_setField(t,i,n){var r="",a=null;do r=r?".".concat(r):"",r=gy(i)+r,i=Cy(i),a=i?this._optionManager.get(t,i,!1):t;while(!a);a[r]=n}_clearField(t,i){delete t[i];var n=Cy(i),r=n?this._optionManager.get(t,n,!1):t;r&&delete r[gy(i)]}_normalizeName(t,i){if(this._deprecatedNames.length&&t){for(var n=0;n<this._deprecatedNames.length;n++)if(this._deprecatedNames[n]===t){var r=this._deprecated[t];if(r)return!i&&this._notifyDeprecated(t),r.alias||t}}return t}addRules(t){this._rules=t.concat(this._rules)}applyRules(t){var i=this._getByRules(t);this.silent(i)}dispose(){this._deprecatedCallback=re,this._startChangeCallback=re,this._endChangeCallback=re,this._optionManager.dispose()}onChanging(t){this._optionManager.onChanging(t)}onChanged(t){this._optionManager.onChanged(t)}onDeprecated(t){this._deprecatedCallback=t}onStartChange(t){this._startChangeCallback=t}onEndChange(t){this._endChangeCallback=t}isInitial(t){var i=this.silent(t),n=this.initial(t),r=Ie(i)&&Ie(n);return r?i.toString()===n.toString():Bt(i,n)}initial(t){return zV(this._initial,t)}option(t,i){var n=arguments.length<2&&Ln(t)!=="object";if(n)return this._optionManager.get(void 0,this._normalizeName(t));this._startChangeCallback();try{this._optionManager.set(t,i)}finally{this._endChangeCallback()}}silent(t,i){var n=arguments.length<2&&Ln(t)!=="object";if(n)return this._optionManager.get(void 0,t,void 0,!0);this._optionManager.set(t,i,void 0,!0)}reset(t){if(t){var i=Ao(t),n=i.reduce((a,o)=>a?a[o]:this.initial(o),null),r=$e(n)?Se({},n):n;this._optionManager.set(t,r,!1)}}getAliasesByName(t){return Object.keys(this._deprecated).filter(i=>t===this._deprecated[i].alias)}isDeprecated(t){return Object.prototype.hasOwnProperty.call(this._deprecated,t)}cache(t,i){var n=arguments.length<2;if(n)return this._cachedOptions[t];this._cachedOptions[t]=k(this._cachedOptions[t],i)}}class jV{constructor(){this._postponedOperations={}}add(t,i,n){if(t in this._postponedOperations)n&&this._postponedOperations[t].promises.push(n);else{var r=new se;this._postponedOperations[t]={fn:i,completePromise:r,promises:n?[n]:[]}}return this._postponedOperations[t].completePromise.promise()}callPostponedOperations(){for(var t in this._postponedOperations){var i=this._postponedOperations[t];E(i)&&(i.promises&&i.promises.length?De(...i.promises).done(i.fn).then(i.completePromise.resolve):i.fn().done(i.completePromise.resolve))}this._postponedOperations={}}}var yy=e=>e.charAt(2).toLowerCase()+e.substr(3),qV=e=>e.indexOf("_",0)===0,ug=it.inherit({_setDeprecatedOptions(){this._deprecatedOptions={}},_getDeprecatedOptions(){return this._deprecatedOptions},_getDefaultOptions:()=>({onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}),_defaultOptionsRules:()=>[],_setOptionsByDevice(e){this._options.applyRules(e)},_convertRulesToOptions:e=>Vs(e),_isInitialOptionValue(e){return this._options.isInitial(e)},_setOptionsByReference(){this._optionsByReference={}},_getOptionsByReference(){return this._optionsByReference},ctor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{_optionChangedCallbacks:t,_disposingCallbacks:i}=e;this.NAME=Mu(this.constructor),this._eventsStrategy=Oo.create(this,e.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=t||dt(),this._disposingCallbacks=i||dt(),this.postponedOperations=new jV,this._createOptions(e)},_createOptions(e){this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new KV(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging((t,i,n)=>this._initialized&&this._optionChanging(t,i,n)),this._options.onDeprecated((t,i)=>this._logDeprecatedOptionWarning(t,i)),this._options.onChanged((t,i,n)=>this._notifyOptionChanged(t,i,n)),this._options.onStartChange(()=>this.beginUpdate()),this._options.onEndChange(()=>this.endUpdate()),this._options.addRules(this._defaultOptionsRules()),e&&e.onInitializing&&e.onInitializing.apply(this,[e]),this._setOptionsByDevice(e.defaultOptionsRules),this._initOptions(e)}finally{this.endUpdate()}},_initOptions(e){this.option(e)},_init(){this._createOptionChangedAction(),this.on("disposing",e=>{this._disposingCallbacks.fireWith(this,[e])})},_logDeprecatedOptionWarning(e,t){var i=t.message||"Use the '".concat(t.alias,"' option instead");xt.log("W0001",this.NAME,e,t.since,i)},_logDeprecatedComponentWarning(e,t){xt.log("W0000",this.NAME,e,"Use the '".concat(t,"' widget instead"))},_createOptionChangedAction(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})},_createDisposingAction(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})},_optionChanged(e){switch(e.name){case"onDisposing":case"onInitialized":break;case"onOptionChanged":this._createOptionChangedAction()}},_dispose(){this._optionChangedCallbacks.empty(),this._createDisposingAction(),this._disposingAction(),this._eventsStrategy.dispose(),this._options.dispose(),this._disposed=!0},_lockUpdate(){this._updateLockCount++},_unlockUpdate(){this._updateLockCount=Math.max(this._updateLockCount-1,0)},_isUpdateAllowed(){return this._updateLockCount===0},_isInitializingRequired(){return!this._initializing&&!this._initialized},isInitialized(){return this._initialized},_commitUpdate(){this.postponedOperations.callPostponedOperations(),this._isInitializingRequired()&&this._initializeComponent()},_initializeComponent(){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._lockUpdate(),this._createActionByOption("onInitialized",{excludeValidators:["disabled","readOnly"]})(),this._unlockUpdate(),this._initialized=!0}},instance(){return this},beginUpdate:function(){this._lockUpdate()},endUpdate:function(){this._unlockUpdate(),this._isUpdateAllowed()&&this._commitUpdate()},_optionChanging:re,_notifyOptionChanged(e,t,i){if(this._initialized)for(var n=[e].concat(this._options.getAliasesByName(e)),r=0;r<n.length;r++){var a=n[r],o={name:Ao(a)[0],fullName:a,value:t,previousValue:i};qV(a)||(this._optionChangedCallbacks.fireWith(this,[k(this._defaultActionArgs(),o)]),this._optionChangedAction(k({},o))),!this._disposed&&this._cancelOptionChange!==a&&this._optionChanged(o)}},initialOption(e){return this._options.initial(e)},_defaultActionConfig(){return{context:this,component:this}},_defaultActionArgs(){return{component:this}},_createAction(e,t){var i;return n=>(E(n)||(n={}),Ye(n)||(n={actionValue:n}),i=i||new on(e,k(t,this._defaultActionConfig())),i.execute.call(i,k(n,this._defaultActionArgs())))},_createActionByOption(e,t){var i=this,n,r,a,o=function(){if(!r){if(t=t||{},typeof e!="string")throw xt.Error("E0008");e.indexOf("on")===0&&(r=yy(e)),a=i.option()[e]}if(!(!n&&!a&&!t.beforeExecute&&!t.afterExecute&&!i._eventsStrategy.hasEvent(r))){if(!n){var l=t.beforeExecute;t.beforeExecute=function(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];l&&l.apply(i,m),i._eventsStrategy.fireEvent(r,m[0].args)},n=i._createAction(a,t)}for(var u=arguments.length,d=new Array(u),c=0;c<u;c++)d[c]=arguments[c];if(At().wrapActionsBeforeExecute){var h=i.option("beforeActionExecute")||re,f=h(i,n,t)||n;return f.apply(i,d)}return n.apply(i,d)}};if(At().wrapActionsBeforeExecute)return o;var s=this.option("onActionCreated")||re;return s(this,o,t)||o},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this},hasActionSubscription:function(e){return!!this._options.silent(e)||this._eventsStrategy.hasEvent(yy(e))},isOptionDeprecated(e){return this._options.isDeprecated(e)},_setOptionWithoutOptionChange(e,t){this._cancelOptionChange=e,this.option(e,t),this._cancelOptionChange=!1},_getOptionValue(e,t){var i=this.option(e);return Ie(i)?i.bind(t)():i},option(){return this._options.option(...arguments)},resetOption(e){this.beginUpdate(),this._options.reset(e),this.endUpdate()}}),dg=je(),Zs=()=>{var e=me.getActiveElement();if(e&&e!==me.getBody()){var t;(t=e.blur)===null||t===void 0||t.call(e)}},YV=()=>{var e=dg.getSelection();if(e&&e.type!=="Caret"){if(e.empty)e.empty();else if(e.removeAllRanges)try{e.removeAllRanges()}catch{}}},XV=(e,t)=>{var i=v(e),n=v(t);if(i[0]===n[0])return i[0];for(var r=i.parents(),a=n.parents(),o=Math.min(r.length,a.length),s=-o;s<0;s++)if(r.get(s)===a.get(s))return r.get(s)},Ro=e=>{e=v(e);var t=e.length&&e.filter(function(){var i=v(this);return i.is("script[type]")&&i.attr("type").indexOf("script")<0});return t.length?t.eq(0).html():(e=v("<div>").append(e),e.html())},Nh=e=>{var t=E(e)&&(e.nodeType||mn(e))?v(e):v("<div>").html(e).contents();return t.length===1&&(t.is("script")?t=Nh(t.html().trim()):t.is("table")&&(t=t.children("tbody").contents())),t},I_=(e,t)=>{var i=e.originalEvent&&e.originalEvent.clipboardData||dg.clipboardData;if(!t)return i&&i.getData("Text");i&&i.setData("Text",t)},ma=(e,t)=>t?(me.isTextNode(t)&&(t=t.parentNode),me.isDocument(e)?e.documentElement.contains(t):Xt(e)?ma(e.document,t):e.contains?e.contains(t):!!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_CONTAINS)):!1,ZV=(e,t,i)=>{var n=dg.getComputedStyle(v(e).get(0));return v("<div>").text(t).css({fontStyle:n.fontStyle,fontVariant:n.fontVariant,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFamily:n.fontFamily,letterSpacing:n.letterSpacing,border:n.border,paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",visibility:"hidden",whiteSpace:"pre",position:"absolute",float:"left"})},JV=(e,t)=>(t&&me.insertElement(e.parentNode,t,e),e),QV=(e,t)=>{if(t&&t[0])return t.is(e)?e:(V(t,(i,n)=>{JV(e[0],n)}),e.remove(),t)},cg=function(e){return function(t){for(var i=v(t||"body"),n=i.filter(".dx-visibility-change-handler").add(i.find(".dx-visibility-change-handler")),r=0;r<n.length;r++)R.triggerHandler(n[r],e)}},Jc=cg("dxshown"),eN=cg("dxhiding"),lr=cg("dxresize"),tN=dt({syncStrategy:!0});class ko{render(t){t=t||{};var i=t.onRendered;delete t.onRendered;var n;return t.renovated&&t.transclude&&this._element?n=v("<div>").append(this._element).contents():n=this._renderCore(t),this._ensureResultInContainer(n,t.container),tN.fire(n,t.container),i&&i(),n}_ensureResultInContainer(t,i){if(i){var n=v(i),r=ma(n.get(0),t.get(0));if(n.append(t),!r){var a=me.getBody().contains(n.get(0));a&&Jc(t)}}}_renderCore(){throw xt.Error("E0001")}}class Ns extends ko{constructor(t){super(),this._render=t}_renderCore(t){return Nh(this._render(t))}}class lo extends ko{_renderCore(){return v()}}class $h extends ko{constructor(t){super(),this.name=t}}var cT={},Ec;function Aa(e,t){cT[e]=t}function iN(e){if(Ve(e)){if(Ec=cT[e],!Ec)throw xt.Error("E0020",e)}else Ec=e}function xy(){return Ec}Aa("jquery-tmpl",{compile:e=>Ro(e),render:(e,t)=>jQuery.tmpl(e,t)});Aa("jsrender",{compile:e=>(jQuery||jsrender).templates(Ro(e)),render:(e,t)=>e.render(t)});Aa("mustache",{compile:e=>Ro(e),render:(e,t)=>Mustache.render(e,t)});Aa("hogan",{compile:e=>Hogan.compile(Ro(e)),render:(e,t)=>e.render(t)});Aa("underscore",{compile:e=>_.template(Ro(e)),render:(e,t)=>e(t)});Aa("handlebars",{compile:e=>Handlebars.compile(Ro(e)),render:(e,t)=>e(t)});Aa("doT",{compile:e=>doT.template(Ro(e)),render:(e,t)=>e(t)});Aa("default",{compile:e=>Nh(e),render:(e,t,i)=>e.clone()});iN("default");let nN=class extends ko{constructor(t){super(),this._element=t}_renderCore(t){var i=t.transclude;return!i&&!this._compiledTemplate&&(this._compiledTemplate=xy().compile(this._element)),v("<div>").append(i?this._element:xy().render(this._compiledTemplate,t.model,t.index)).contents()}source(){return v(this._element).clone()}};var rN=function(e){return Array.isArray(e)?e:[e]},aN=function(e){return[...new Set(e)]},by=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=t.reduce((n,r)=>{var a;return n[r]=((a=n[r])!==null&&a!==void 0?a:0)+1,n},{});return e.filter(n=>!i[n]--)},Ml=function(e,t,i,n){var r={},{useLegacyVisibleIndex:a}=At(),o=0,s=l=>!E(l[t])&&(!n||n(l));e.forEach(l=>{var u=l[t];u>=0?(r[u]=r[u]||[],l===i?r[u].unshift(l):r[u].push(l)):l[t]=void 0}),a||e.forEach(l=>{if(s(l)){for(;r[o];)o++;r[o]=[l],o++}}),o=0,m_(r,function(l,u){u.forEach(d=>{l>=0&&(d[t]=o++)})}),a&&e.forEach(l=>{s(l)&&(l[t]=o++)})},oN=(e,t)=>e.reduce((i,n)=>{var r,a=t(n);return i[a]=(r=i[a])!==null&&r!==void 0?r:[],i[a].push(n),i},{}),hT=(e,t)=>{var i=v(e).contents().filter("[".concat("data-options",'*="').concat(t,'"]'));return[].slice.call(i).map(n=>{var r=v(n).attr("data-options")||"";return{element:n,options:At().optionsParser(r)[t]}}).filter(n=>!!n.options)},sN=e=>{var t=oN(e,n=>n.options.name);if(t[void 0])throw xt.Error("E0023");var i={};return Object.keys(t).forEach(n=>{var r,a=(r=Ym(Re.current(),t[n],o=>o.options)[0])===null||r===void 0?void 0:r.element;a&&(i[n]=a)}),i},fT=e=>{var t=e.render.bind(e);return k({},e,{render(i){var n=t(i);return i&&i.onRendered&&i.onRendered(),n}})},lN=e=>{var t=[];return"model"in e&&t.push(e.model),"index"in e&&t.push(e.index),t.push(e.container),t},uN=e=>typeof e=="string"?Nh(e):e,Sy=e=>mn(e)&&e[0]||e,dN=e=>new nN(e),cN=(e,t,i,n)=>{var r=null;return(!n||n.indexOf(e)===-1)&&(r=t[e],r&&!(r instanceof ko)&&!i&&(r=fT(r))),r},Ey=(e,t,i,n,r,a)=>e==null?new lo:e instanceof $h?a[e.name]:e instanceof ko?e:Ie(e.render)&&!mn(e)?n?e:fT(e):e.nodeType||mn(e)?t(v(e)):cN(e,i,n,r)||a[e]||t(e),hN=3,fN="template",pN="dxTemplate",vN="dx-template-wrapper",_N=new Ns(e=>{var{model:t,parent:i}=e,n=t.widget;if(!n)return v();var r=v("<div>"),a=t.options||{};return i?i._createComponent(r,n,a):r[n](a),r});class wy{constructor(t,i){this._tempTemplates=[],this._defaultTemplates={},this._anonymousTemplateName=i||fN,this._createElement=t||dN,this._createTemplateIfNeeded=this._createTemplateIfNeeded.bind(this)}static createDefaultOptions(){return{integrationOptions:{watchMethod:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n.skipImmediate||i(t()),re},templates:{"dx-polymorph-widget":_N},useDeferUpdateForTemplates:!0}}}get anonymousTemplateName(){return this._anonymousTemplateName}addDefaultTemplates(t){this._defaultTemplates=k({},this._defaultTemplates,t)}dispose(){this._tempTemplates.forEach(t=>{t.template.dispose&&t.template.dispose()}),this._tempTemplates=[]}extractTemplates(t){var i=this._extractTemplates(t),n=this._extractAnonymousTemplate(t);return{templates:i,anonymousTemplateMeta:n}}_extractTemplates(t){var i=hT(t,pN),n=sN(i);return i.forEach(r=>{var{element:a,options:{name:o}}=r;a===n[o]?v(a).addClass(vN).detach():v(a).remove()}),Object.keys(n).map(r=>({name:r,template:this._createTemplate(n[r])}))}_extractAnonymousTemplate(t){var i=t.contents().detach(),n=i.filter((r,a)=>{var o=a.nodeType===hN,s=v(a).text().trim().length<1;return!(o&&s)});return n.length>0?{template:this._createTemplate(i),name:this._anonymousTemplateName}:{}}_createTemplateIfNeeded(t){var i=this._tempTemplates.filter(r=>r.source===Sy(t))[0];if(i)return i.template;var n=this._createTemplate(t);return this._tempTemplates.push({template:n,source:Sy(t)}),n}_createTemplate(t){return this._createElement(uN(t))}getTemplate(t,i,n,r){var{isAsyncTemplate:a,skipTemplates:o}=n;return Ie(t)?new Ns(s=>{var l=t.apply(r,lN(s));if(!E(l))return new lo;var u=!1,d=Ey(l,h=>h.nodeType||mn(h)&&!v(h).is("script")?new Ns(()=>h):(u=!0,this._createTemplate(h)),i,a,o,this._defaultTemplates),c=d.render(s);return u&&d.dispose&&d.dispose(),c}):Ey(t,this._createTemplateIfNeeded,i,a,o,this._defaultTemplates)}}var mN=function(e){return e&&e.get(0)};function Me(e){return mN(e)}var T_=(e,t)=>{if(!t)throw xt.Error("E0017");return Array.isArray(e)?e.map(i=>T_(i,t)).join(" "):e.indexOf(" ")!==-1?T_(e.split(/\s+/g),t):"".concat(e,".").concat(t)},pT=function(e,t){if(!gN(e))return!1;var i=e.nodeName.toLowerCase(),n=!isNaN(t),r=e.disabled,a=/^(input|select|textarea|button|object|iframe)$/.test(i),o=i==="a",s=!0,l=e.isContentEditable;return a||l?s=!r:o?s=e.href||n:s=n,s};function gN(e){var t=v(e);return t.is(":visible")&&t.css("visibility")!=="hidden"&&t.parents().css("visibility")!=="hidden"}var A_=function(e,t){return pT(t,v(t).attr("tabIndex"))},Iy=function(e,t){var i=v(t).attr("tabIndex");return(isNaN(i)||i>=0)&&pT(t,i)},ba=function(e){var t=v(e).get(0);return me.getActiveElement()===t},CN={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space",f:"F",a:"A","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift"},yN={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",70:"F",65:"A",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},xN={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},bN=e=>e,SN=e=>bN(R.Event(e,e)),hg=e=>Vu(e)==="dx",EN=e=>Vu(e)==="mouse",vT=e=>Vu(e)==="touch",Vu=e=>{var{type:t}=e,i="other";return V(xN,function(n){if(this.test(t))return i=n,!1}),i},_T=e=>Vu(e)==="pointer",mo=e=>EN(e)||(_T(e)||hg(e))&&e.pointerType==="mouse",qi=e=>e&&e.type==="dxmousewheel",Nu=e=>vT(e)||(_T(e)||hg(e))&&e.pointerType==="touch",Gt=e=>{var{pageX:t,pageY:i,timeStamp:n}=e;return{x:t,y:i,time:n}},to=(e,t)=>({x:t.x-e.x,y:t.y-e.y,time:t.time-e.time||1}),wN=e=>{var{originalEvent:t,pointers:i}=e;return vT(e)?(t.touches||[]).length:hg(e)?(i||[]).length:0},mT=e=>{var{target:t}=e,i=v(t),n=(t==null?void 0:t.isContentEditable)||(t==null?void 0:t.hasAttribute("contenteditable")),r=i.is("input, textarea, select")||n;if(qi(e)){var a=i.is("textarea")&&i.hasClass("dx-texteditor-input");if(a||n)return!1;var o=i.is("input[type='number'], textarea, select")&&i.is(":focus");return o}if(mo(e))return r||e.which>1;if(Nu(e))return r&&ba(i)},uo=(e,t)=>{var i=SN(e);return t&&k(i,t),i},Da=e=>{var{originalEvent:t,delegateTarget:i}=e,n=uo(t,e);return R.trigger(i||n.target,n),n},$t=e=>{var{key:t,which:i}=e,n=t,r=!!t;if(t||i)return r&&(t=CN[t.toLowerCase()]),(!r||!t&&i)&&(t=yN[i]||String.fromCharCode(i)),t||n},Qc=e=>{var{key:t,which:i}=e;return t||String.fromCharCode(i)},ye=T_,vi=e=>{var{ctrlKey:t,metaKey:i}=e;return t||i},Ty="compositionstart",IN="compositionend",TN="keydown",Vf="KeyboardProcessor",gT=e=>({keyName:$t(e),key:e.key,code:e.code,ctrl:e.ctrlKey,location:e.location,metaKey:e.metaKey,shift:e.shiftKey,alt:e.altKey,which:e.which,originalEvent:e}),fg=it.inherit({_keydown:ye(TN,Vf),_compositionStart:ye(Ty,Vf),_compositionEnd:ye(IN,Vf),ctor:function(e){e=e||{},e.element&&(this._element=v(e.element)),e.focusTarget&&(this._focusTarget=e.focusTarget),this._handler=e.handler,this._element&&(this._processFunction=t=>{var i=v(this._focusTarget).toArray(),n=this._focusTarget&&this._focusTarget!==t.target&&!i.includes(t.target),r=this._isComposingJustFinished&&t.which===229||this._isComposing||n;this._isComposingJustFinished=!1,r||this.process(t)},this._toggleProcessingWithContext=this.toggleProcessing.bind(this),R.on(this._element,this._keydown,this._processFunction),R.on(this._element,this._compositionStart,this._toggleProcessingWithContext),R.on(this._element,this._compositionEnd,this._toggleProcessingWithContext))},dispose:function(){this._element&&(R.off(this._element,this._keydown,this._processFunction),R.off(this._element,this._compositionStart,this._toggleProcessingWithContext),R.off(this._element,this._compositionEnd,this._toggleProcessingWithContext)),this._element=void 0,this._handler=void 0},process:function(e){this._handler(gT(e))},toggleProcessing:function(e){var{type:t}=e;this._isComposing=t===Ty,this._isComposingJustFinished=!this._isComposing}});fg.createKeyDownOptions=gT;function ai(e,t){return t?ye(e,t):e}function D_(e,t){return typeof e=="function"?e(t):e.execute(t)}var Ay={on:(e,t,i,n)=>{var{selector:r,showTimeout:a,hideTimeout:o,namespace:s}=n;R.on(e,ai("dxactive",s),r,{timeout:a},l=>D_(t,{event:l,element:l.currentTarget})),R.on(e,ai("dxinactive",s),r,{timeout:o},l=>D_(i,{event:l,element:l.currentTarget}))},off:(e,t)=>{var{namespace:i,selector:n}=t;R.off(e,ai("dxactive",i),n),R.off(e,ai("dxinactive",i),n)}},eh={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.on(e,ai("dxresize",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.off(e,ai("dxresize",t))}},Dy={on:(e,t,i,n)=>{var{selector:r,namespace:a}=n;R.on(e,ai("dxhoverend",a),r,o=>i(o)),R.on(e,ai("dxhoverstart",a),r,o=>D_(t,{element:o.target,event:o}))},off:(e,t)=>{var{selector:i,namespace:n}=t;R.off(e,ai("dxhoverstart",n),i),R.off(e,ai("dxhoverend",n),i)}},th={on:(e,t,i,n)=>{var{namespace:r}=n;R.on(e,ai("dxhiding",r),i),R.on(e,ai("dxshown",r),t)},off:(e,t)=>{var{namespace:i}=t;R.off(e,ai("dxhiding",i)),R.off(e,ai("dxshown",i))}},wc={on:(e,t,i,n)=>{var{namespace:r}=n;R.on(e,ai("focusin",r),t),R.on(e,ai("focusout",r),i)},off:(e,t)=>{var{namespace:i}=t;R.off(e,ai("focusin",i)),R.off(e,ai("focusout",i))},trigger:e=>R.trigger(e,"focus")},Oy={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.on(e,ai("dxclick",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.off(e,ai("dxclick",t))}},Ry={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.on(e,ai("click",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.off(e,ai("click",t))}},AN=0,dl={},DN=()=>"keyboardProcessorId".concat(AN++),ga={on:(e,t,i)=>{var n=DN();return dl[n]=new fg({element:e,focusTarget:t,handler:i}),n},off:e=>{e&&dl[e]&&(dl[e].dispose(),delete dl[e])},_getProcessor:e=>dl[e]},{abstract:md}=ug,mr=ug.inherit({_getDefaultOptions(){return k(this.callBase(),{width:void 0,height:void 0,rtlEnabled:At().rtlEnabled,elementAttr:{},disabled:!1,integrationOptions:{}},this._useTemplates()?wy.createDefaultOptions():{})},ctor(e,t){this._customClass=null,this._createElement(e),rT(this._$element,this,this._dispose),this.callBase(t)},_createElement(e){this._$element=v(e)},_getSynchronizableOptionsForCreateComponent:()=>["rtlEnabled","disabled","templatesRenderAsynchronously"],_checkFunctionValueDeprecation:function(e){this.option("_ignoreFunctionValueDeprecation")||e.forEach(t=>{Ie(this.option(t))&&xt.log("W0017",t)})},_visibilityChanged:md,_dimensionChanged:md,_init(){this.callBase(),this._checkFunctionValueDeprecation(["width","height","maxHeight","maxWidth","minHeight","minWidth","popupHeight","popupWidth"]),this._attachWindowResizeCallback(),this._initTemplateManager()},_setOptionsByDevice(e){this.callBase([].concat(this.constructor._classCustomRules||[],e||[]))},_isInitialOptionValue(e){var t=this.constructor._classCustomRules&&Object.prototype.hasOwnProperty.call(this._convertRulesToOptions(this.constructor._classCustomRules),e);return!t&&this.callBase(e)},_attachWindowResizeCallback(){if(this._isDimensionChangeSupported()){var e=this._windowResizeCallBack=this._dimensionChanged.bind(this);_o.add(e)}},_isDimensionChangeSupported(){return this._dimensionChanged!==md},_renderComponent(){this._initMarkup(),Ue()&&this._render()},_initMarkup(){var{rtlEnabled:e}=this.option()||{};this._renderElementAttributes(),this._toggleRTLDirection(e),this._renderVisibilityChange(),this._renderDimensions()},_render(){this._attachVisibilityChangeHandlers()},_renderElementAttributes(){var{elementAttr:e}=this.option()||{},t=k({},e),i=t.class;delete t.class,this.$element().attr(t).removeClass(this._customClass).addClass(i),this._customClass=i},_renderVisibilityChange(){if(this._isDimensionChangeSupported()&&this._attachDimensionChangeHandlers(),this._isVisibilityChangeSupported()){var e=this.$element();e.addClass("dx-visibility-change-handler")}},_renderDimensions(){var e=this.$element(),t=e.get(0),i=this._getOptionValue("width",t),n=this._getOptionValue("height",t);this._isCssUpdateRequired(t,n,i)&&e.css({width:i===null?"":i,height:n===null?"":n})},_isCssUpdateRequired:(e,t,i)=>!!(E(i)||E(t)||e.style.width||e.style.height),_attachDimensionChangeHandlers(){var e=this.$element(),t="".concat(this.NAME,"VisibilityChange");eh.off(e,{namespace:t}),eh.on(e,()=>this._dimensionChanged(),{namespace:t})},_attachVisibilityChangeHandlers(){if(this._isVisibilityChangeSupported()){var e=this.$element(),t="".concat(this.NAME,"VisibilityChange");this._isHidden=!this._isVisible(),th.off(e,{namespace:t}),th.on(e,()=>this._checkVisibilityChanged("shown"),()=>this._checkVisibilityChanged("hiding"),{namespace:t})}},_isVisible(){var e=this.$element();return e.is(":visible")},_checkVisibilityChanged(e){var t=this._isVisible();t&&(e==="hiding"&&!this._isHidden?(this._visibilityChanged(!1),this._isHidden=!0):e==="shown"&&this._isHidden&&(this._isHidden=!1,this._visibilityChanged(!0)))},_isVisibilityChangeSupported(){return this._visibilityChanged!==md&&Ue()},_clean:re,_modelByElement(){var{modelByElement:e}=this.option(),t=this.$element();return e?e(t):void 0},_invalidate(){if(this._isUpdateAllowed())throw xt.Error("E0007");this._requireRefresh=!0},_refresh(){this._clean(),this._renderComponent()},_dispose(){this._templateManager&&this._templateManager.dispose(),this.callBase(),this._clean(),this._detachWindowResizeCallback()},_detachWindowResizeCallback(){this._isDimensionChangeSupported()&&_o.remove(this._windowResizeCallBack)},_toggleRTLDirection(e){var t=this.$element();t.toggleClass("dx-rtl",e)},_createComponent(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=zi(this._getSynchronizableOptionsForCreateComponent(),d=>!(d in i)),{integrationOptions:r}=this.option(),{nestedComponentOptions:a}=this.option();a=a||re;var o=k({integrationOptions:r},a(this));n.forEach(d=>o[d]=this.option(d)),this._extendConfig(i,o);var s=void 0;if(Ve(t)){var l=v(e)[t](i);s=l[t]("instance")}else e&&(s=t.getInstance(e),s?s.option(i):s=new t(e,i));if(s){var u=d=>{var{name:c,value:h}=d;n.includes(c)&&s.option(c,h)};this.on("optionChanged",u),s.on("disposing",()=>this.off("optionChanged",u))}return s},_extendConfig(e,t){V(t,(i,n)=>{!Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=n)})},_defaultActionConfig(){var e=this.$element(),t=this._modelByElement(e);return k(this.callBase(),{context:t})},_defaultActionArgs(){var e=this.$element(),t=this._modelByElement(e),i=this.element();return k(this.callBase(),{element:i,model:t})},_optionChanged(e){switch(e.name){case"width":case"height":this._renderDimensions();break;case"rtlEnabled":this._invalidate();break;case"elementAttr":this._renderElementAttributes();break;case"disabled":case"integrationOptions":break;default:this.callBase(e)}},_removeAttributes(e){for(var t=e.attributes,i=t.length-1;i>=0;i--){var n=t[i];if(n){var{name:r}=n;(!r.indexOf("aria-")||r.indexOf("dx-")!==-1||r==="role"||r==="style"||r==="tabindex")&&e.removeAttribute(r)}}},_removeClasses(e){e.className=e.className.split(" ").filter(t=>t.lastIndexOf("dx-",0)!==0).join(" ")},_updateDOMComponent(e){e?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())},endUpdate(){var e=this._isInitializingRequired();this.callBase(),this._isUpdateAllowed()&&this._updateDOMComponent(e)},$element(){return this._$element},element(){var e=this.$element();return Me(e)},dispose(){var e=this.$element().get(0);Pu(e,!0),e.textContent="",this._removeAttributes(e),this._removeClasses(e)},resetOption(e){if(this.callBase(e),e==="width"||e==="height"){var t=this.initialOption(e);!E(t)&&this.$element().css(e,"")}},_getAnonymousTemplateName(){},_initTemplateManager(){if(!(this._templateManager||!this._useTemplates())){var{integrationOptions:e={}}=this.option(),{createTemplate:t}=e;this._templateManager=new wy(t,this._getAnonymousTemplateName()),this._initTemplates()}},_initTemplates(){var{templates:e,anonymousTemplateMeta:t}=this._templateManager.extractTemplates(this.$element()),i=this.option("integrationOptions.templates.".concat(t.name));e.forEach(n=>{var{name:r,template:a}=n;this._options.silent("integrationOptions.templates.".concat(r),a)}),t.name&&!i&&(this._options.silent("integrationOptions.templates.".concat(t.name),t.template),this._options.silent("_hasAnonymousTemplateContent",!0))},_getTemplateByOption(e){return this._getTemplate(this.option(e))},_getTemplate(e){var t=this.option("integrationOptions.templates"),i=this.option("templatesRenderAsynchronously"),n=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(e,t,{isAsyncTemplate:i,skipTemplates:n},this)},_saveTemplate(e,t){this._setOptionWithoutOptionChange("integrationOptions.templates."+e,this._templateManager._createTemplate(t))},_useTemplates:()=>!0});mr.getInstance=function(e){return aT(v(e),this)};mr.defaultOptions=function(e){this._classCustomRules=this._classCustomRules||[],this._classCustomRules.push(e)};function CT(e,t,i){function n(l){return typeof l=="string"?l.split("."):typeof l=="number"?[l]:l}e=n(e),t=n(t);var r=Math.max(e.length,t.length);isFinite(i)&&(r=Math.min(r,i));for(var a=0;a<r;a++){var o=parseInt(e[a]||0,10),s=parseInt(t[a]||0,10);if(o<s)return-1;if(o>s)return 1}return 0}var Dn=Ue()?je():{},ON=1e3/60,yT=function(e){return setTimeout(e,ON)},xT=function(e){clearTimeout(e)},bT=Jr(function(){var e=Dn.requestAnimationFrame||Dn.webkitRequestAnimationFrame||Dn.mozRequestAnimationFrame||Dn.oRequestAnimationFrame||Dn.msRequestAnimationFrame,t=Dn.cancelAnimationFrame||Dn.webkitCancelAnimationFrame||Dn.mozCancelAnimationFrame||Dn.oCancelAnimationFrame||Dn.msCancelAnimationFrame;e&&t&&(yT=e,xT=t)});function pu(){return bT(),yT.apply(Dn,arguments)}function ur(){bT(),xT.apply(Dn,arguments)}const RN=Object.freeze(Object.defineProperty({__proto__:null,cancelAnimationFrame:ur,requestAnimationFrame:pu},Symbol.toStringTag,{value:"Module"}));function ST(e){return e&&[e.target,e.delegateTarget,e.relatedTarget,e.currentTarget].filter(t=>!!t)}var kN=(e,t)=>{R.one(ST(e),vr,t)},BN=(e,t)=>{R.off(ST(e),vr,t)},{maxTouchPoints:ET}=Lu(),LN={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},pg=function(e){return!!Ta(e)},PN=function(){var{platform:e,mac:t}=Re.real(),i=e==="ios"||e==="android"||t;return i},Hh=function(e){if(e==="text")return!0;var t=me.createElement("input");try{return t.setAttribute("type",e),t.value="wrongValue",!t.value}catch{return!1}},FN=function(e,t){return(e("ontouchstart")||!!t)&&!e("callPhantom")},MN=function(e){return e("PointerEvent")},wT=FN(VI,ET),IT=MN(VI),VN=!!ET,go=wT||IT&&VN,O_=Jr(function(){return pg("transition")}),TT=Jr(function(){return LN[Ta("transition")]}),AT=Jr(function(){return pg("animation")}),Co=PN();const NN=Object.freeze(Object.defineProperty({__proto__:null,animation:AT,inputType:Hh,nativeScrolling:Co,pointerEvents:IT,styleProp:Ta,stylePropPrefix:Sc,supportProp:pg,touch:go,touchEvents:wT,transition:O_,transitionEndEventName:TT},Symbol.toStringTag,{value:"Module"}));var ky="dxPointerEvents",vg=it.inherit({ctor:function(e,t){this._eventName=e,this._originalEvents=ye(t,ky),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){var e=this._eventName;return e==="dxpointerenter"||e==="dxpointerleave"},_handler:function(e){var t=this._getDelegateTarget(e);return this._fireEvent({type:this._eventName,pointerType:e.pointerType||Vu(e),originalEvent:e,delegateTarget:t,timeStamp:Lt.mozilla?new Date().getTime():e.timeStamp})},_getDelegateTarget:function(e){var t;return this.noBubble&&(t=e.delegateTarget),t},_fireEvent:function(e){return Da(e)},_setSelector:function(e){this._selector=this.noBubble&&e?e.selector:null},_getSelector:function(){return this._selector},setup:function(){return!0},add:function(e,t){if(this._handlerCount<=0||this.noBubble){e=this.noBubble?e:me.getDocument(),this._setSelector(t);var i=this;R.on(e,this._originalEvents,this._getSelector(),function(n){i._handler(n)})}this.noBubble||this._handlerCount++},remove:function(e){this._setSelector(e),this.noBubble||this._handlerCount--},teardown:function(e){this._handlerCount&&!this.noBubble||(e=this.noBubble?e:me.getDocument(),this._originalEvents!=="."+ky&&R.off(e,this._originalEvents,this._getSelector()))},dispose:function(e){e=this.noBubble?e:me.getDocument(),R.off(e,this._originalEvents)}}),$N={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel",dxpointerover:"",dxpointerout:"",dxpointerenter:"",dxpointerleave:""},DT=function(e){var t=[];return V(e.touches,function(i,n){t.push(k({pointerId:n.identifier},n))}),{pointers:t,pointerId:e.changedTouches[0].identifier}},HN=function(e){return Re.real().platform==="ios"&&(e==="dxpointerdown"||e==="dxpointerup")},Wh=vg.inherit({ctor:function(){this.callBase.apply(this,arguments),this._pointerId=0},_handler:function(e){if(HN(this._eventName)){var t=e.changedTouches[0];if(this._pointerId===t.identifier&&this._pointerId!==0)return;this._pointerId=t.identifier}return this.callBase.apply(this,arguments)},_fireEvent:function(e){return this.callBase(k(DT(e.originalEvent),e))}});Wh.map=$N;Wh.normalize=DT;var gd=function(e,t){_r.add(function(){e.split(" ").forEach(function(i){me.listen(me.getDocument(),i,t,!0)})})},WN=function(e,t,i){i=i||function(){};var n=[],r=function(o){var s=-1;return V(n,function(l,u){return t(o,u)?(s=l,!1):!0}),s},a=function(o){var s=r(o);s>-1&&n.splice(s,1)};gd(e.dxpointerdown,function(o){r(o)===-1&&(i(o),n.push(o))}),gd(e.dxpointermove,function(o){n[r(o)]=o}),gd(e.dxpointerup,a),gd(e.dxpointercancel,a),this.pointers=function(){return n},this.reset=function(){n=[]}},OT={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},RT=function(e){return e.pointerId=1,{pointers:_g.pointers(),pointerId:1}},_g,By=!1,kT=function(){By||(_g=new WN(OT,function(){return!0}),By=!0)},Oa=vg.inherit({ctor:function(){this.callBase.apply(this,arguments),kT()},_fireEvent:function(e){return this.callBase(k(RT(e.originalEvent),e))}});Oa.map=OT;Oa.normalize=RT;Oa.activate=kT;Oa.resetObserver=function(){_g.reset()};var zN={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},Ly=!1,GN=function(){Ly||(Oa.activate(),Ly=!0)},mg=vg.inherit({EVENT_LOCK_TIMEOUT:100,ctor:function(){this.callBase.apply(this,arguments),GN()},_handler:function(e){var t=mo(e);if(t||(this._skipNextEvents=!0),!(t&&this._mouseLocked)){if(t&&this._skipNextEvents){this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer);var i=this;this._unlockMouseTimer=setTimeout(function(){i._mouseLocked=!1},this.EVENT_LOCK_TIMEOUT);return}return this.callBase(e)}},_fireEvent:function(e){var t=mo(e.originalEvent)?Oa.normalize:Wh.normalize;return this.callBase(k(t(e.originalEvent),e))},dispose:function(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});mg.map=zN;mg.resetObserver=Oa.resetObserver;var UN=(e,t)=>{var{tablet:i,phone:n}=t;return e.touch&&!(i||n)?mg:e.touch?Wh:Oa},Py=UN(NN,Re.real());V(Py.map,(e,t)=>{Mn(e,new Py(e,t))});var lt={down:"dxpointerdown",up:"dxpointerup",move:"dxpointermove",cancel:"dxpointercancel",enter:"dxpointerenter",leave:"dxpointerleave",out:"dxpointerout"},zh=it.inherit({ctor:function(e){this._$element=v(e),this._cancelCallback=dt(),this._acceptCallback=dt()},getElement:function(){return this._$element},validate:function(e){return!qi(e)},validatePointers:function(e){return wN(e)===1},allowInterruptionByMouseWheel:function(){return!0},configure:function(e){k(this,e)},addCancelCallback:function(e){this._cancelCallback.add(e)},removeCancelCallback:function(){this._cancelCallback.empty()},_cancel:function(e){this._cancelCallback.fire(this,e)},addAcceptCallback:function(e){this._acceptCallback.add(e)},removeAcceptCallback:function(){this._acceptCallback.empty()},_accept:function(e){this._acceptCallback.fire(this,e)},_requestAccept:function(e){this._acceptRequestEvent=e},_forgetAccept:function(){this._accept(this._acceptRequestEvent),this._acceptRequestEvent=null},start:re,move:re,end:re,cancel:re,reset:function(){this._acceptRequestEvent&&this._accept(this._acceptRequestEvent)},_fireEvent:function(e,t,i){var n=k({type:e,originalEvent:t,target:this._getEmitterTarget(t),delegateTarget:this.getElement().get(0)},i);return t=Da(n),t.cancel&&this._cancel(t),t},_getEmitterTarget:function(e){return(this.delegateSelector?v(e.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:re}),$u="dxmousewheel",Fy="dxWheel",KN="wheel",My=0,R_={setup:function(e){var t=v(e);R.on(t,ye(KN,Fy),R_._wheelHandler.bind(R_))},teardown:function(e){R.off(e,".".concat(Fy))},_wheelHandler:function(e){var{deltaMode:t,deltaY:i,deltaX:n,deltaZ:r}=e.originalEvent;Da({type:$u,originalEvent:e,delta:this._normalizeDelta(i,t),deltaX:n,deltaY:i,deltaZ:r,deltaMode:t,pointerType:"mouse"}),e.stopPropagation()},_normalizeDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:My;return t===My?-e:-30*e}};Mn($u,R_);var Cd="dxEventManager",Vl="dxEmitter",jN=it.inherit({ctor:function(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=this._cancelHandler.bind(this),this._proxiedAcceptHandler=this._acceptHandler.bind(this)},_attachHandlers:function(){_r.add((function(){var e=me.getDocument();R.subscribeGlobal(e,ye(lt.down,Cd),this._pointerDownHandler.bind(this)),R.subscribeGlobal(e,ye(lt.move,Cd),this._pointerMoveHandler.bind(this)),R.subscribeGlobal(e,ye([lt.up,lt.cancel].join(" "),Cd),this._pointerUpHandler.bind(this)),R.subscribeGlobal(e,ye($u,Cd),this._mouseWheelHandler.bind(this))}).bind(this))},_eachEmitter:function(e){for(var t=this._activeEmitters||[],i=0;t.length>i;){var n=t[i];if(e(n)===!1)break;t[i]===n&&i++}},_applyToEmitters:function(e,t){this._eachEmitter(function(i){i[e].call(i,t)})},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(e){this._proxiedCancelHandler(e)},_pointerDownHandler:function(e){mo(e)&&e.which>1||this._updateEmitters(e)},_updateEmitters:function(e){this._isSetChanged(e)&&(this._cleanEmitters(e),this._fetchEmitters(e))},_isSetChanged:function(e){var t=this._closestEmitter(e),i=this._emittersSet||[],n=t.length!==i.length;return V(t,function(r,a){return n=n||i[r]!==a,!n}),this._emittersSet=t,n},_closestEmitter:function(e){var t=this,i=[],n=v(e.target);function r(o,s){s&&s.validatePointers(e)&&s.validate(e)&&(s.addCancelCallback(t._proxiedCancelHandler),s.addAcceptCallback(t._proxiedAcceptHandler),i.push(s))}for(;n.length;){var a=Vt(n.get(0),Vl)||[];V(a,r),n=n.parent()}return i},_acceptHandler:function(e,t){var i=this;this._eachEmitter(function(n){n!==e&&i._cancelEmitter(n,t)})},_cancelHandler:function(e,t){this._cancelEmitter(e,t)},_cancelEmitter:function(e,t){var i=this._activeEmitters;t?e.cancel(t):e.reset(),e.removeCancelCallback(),e.removeAcceptCallback();var n=i.indexOf(e);n>-1&&i.splice(n,1)},_cleanEmitters:function(e){this._applyToEmitters("end",e),this.reset(e)},_fetchEmitters:function(e){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",e)},_pointerMoveHandler:function(e){this._applyToEmitters("move",e)},_pointerUpHandler:function(e){this._updateEmitters(e)},_mouseWheelHandler:function(e){this._allowInterruptionByMouseWheel()&&(e.pointers=[null],this._pointerDownHandler(e),this._adjustWheelEvent(e),this._pointerMoveHandler(e),e.pointers=[],this._pointerUpHandler(e))},_allowInterruptionByMouseWheel:function(){var e=!0;return this._eachEmitter(function(t){return e=t.allowInterruptionByMouseWheel()&&e,e}),e},_adjustWheelEvent:function(e){var t=null;if(this._eachEmitter(function(a){if(a.gesture){var o=a.getDirection(e);if(o!=="horizontal"&&!e.shiftKey||o!=="vertical"&&e.shiftKey)return t=a,!1}}),!!t){var i=t.getDirection(e),n=i==="both"&&!e.shiftKey||i==="vertical",r=n?"pageY":"pageX";e[r]+=e.delta}},isActive:function(e){var t=!1;return this._eachEmitter(function(i){t=t||i.getElement().is(e)}),t}}),Vy=new jN,Nf="dxEmitterSubscription",Js=function(e){var t=e.emitter,i=e.events[0],n=e.events;V(n,function(r,a){Mn(a,{noBubble:!e.bubble,setup:function(o){var s=Vt(o,Nf)||{},l=Vt(o,Vl)||{},u=l[i]||new t(o);s[a]=!0,l[i]=u,Vt(o,Vl,l),Vt(o,Nf,s)},add:function(o,s){var l=Vt(o,Vl),u=l[i];u.configure(k({delegateSelector:s.selector},s.data),s.type)},teardown:function(o){var s=Vt(o,Nf),l=Vt(o,Vl),u=l[i];delete s[a];var d=!0;V(n,function(c,h){return d=d&&!s[h],d}),d&&(Vy.isActive(o)&&Vy.resetEmitter(u),u&&u.dispose(),delete l[i])}})})},vt="dxclick",k_=null,Nl=null,Ny=()=>{Nl=null},$y=function(e){var t=e.originalEvent,i=Nl===t||t&&t.DXCLICK_FIRED,n=!e.which||e.which===1;n&&!k_&&!i&&(t&&(t.DXCLICK_FIRED=!0),BN(Nl,Ny),Nl=t,kN(Nl,Ny),Da({type:vt,originalEvent:e}))},qN=zh.inherit({ctor:function(e){this.callBase(e),R.on(this.getElement(),"click",$y)},start:function(e){k_=null},cancel:function(){k_=!0},dispose:function(){R.off(this.getElement(),"click",$y)}});(function(){var e=Re.real().generic;if(!e){var t=null,i=!1,n=me.getDocument();R.subscribeGlobal(n,ye(lt.down,"NATIVE_CLICK_FIXER"),function(r){t=r.target,i=r.isDefaultPrevented()}),R.subscribeGlobal(n,ye("click","NATIVE_CLICK_FIXER"),function(r){var a=v(r.target);!i&&t&&!a.is(t)&&!v(t).is("label")&&(o=a,v(o).is("input, textarea, select, button ,:focus, :focus *"))&&Zs();var o;t=null,i=!1})}})();Js({emitter:qN,bubble:!0,events:[vt]});var B_="dxactive",L_="dxinactive",YN=30,XN=400,yd=it.inherit({ctor:function(e,t){this._timeout=e,this._fire=t},start:function(){var e=this;this._schedule(function(){e.force()})},_schedule:function(e){this.stop(),this._timer=setTimeout(e,this._timeout)},stop:function(){clearTimeout(this._timer)},force:function(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired:function(){return this._fired}}),Wn,gg=zh.inherit({ctor:function(){this.callBase.apply(this,arguments),this._active=new yd(0,re),this._inactive=new yd(0,re)},configure:function(e,t){switch(t){case B_:e.activeTimeout=e.timeout;break;case L_:e.inactiveTimeout=e.timeout}this.callBase(e)},start:function(e){if(Wn){var t=ma(this.getElement().get(0),Wn.getElement().get(0)),i=!Wn._active.fired();if(t&&i){this._cancel();return}Wn._inactive.force()}Wn=this,this._initEvents(e),this._active.start()},_initEvents:function(e){var t=this,i=this._getEmitterTarget(e),n=mo(e),r=Re.isSimulator(),a=r||!n,o=Mt(this.activeTimeout,YN),s=Mt(this.inactiveTimeout,XN);this._active=new yd(a?o:0,function(){t._fireEvent(B_,e,{target:i})}),this._inactive=new yd(a?s:0,function(){t._fireEvent(L_,e,{target:i}),Wn=null})},cancel:function(e){this.end(e)},end:function(e){var t=e.type!==lt.up;t?this._active.stop():this._active.force(),this._inactive.start(),t&&this._inactive.force()},dispose:function(){this._active.stop(),this._inactive.stop(),Wn===this&&(Wn=null),this.callBase()},lockInactive:function(){return this._active.force(),this._inactive.stop(),Wn=null,this._cancel(),this._inactive.force.bind(this._inactive)}});gg.lock=function(e){var t=Wn?Wn.lockInactive():re;e.done(t)};Js({emitter:gg,events:[B_,L_]});var ZN=gg.lock,BT="dxHoverStart",Cg="dxhoverstart",JN=ye(lt.enter,BT),LT="dxHoverEnd",Gh="dxhoverend",QN=ye(lt.leave,LT),PT=it.inherit({noBubble:!0,ctor:function(){this._handlerArrayKeyPath=this._eventNamespace+"_HandlerStore"},setup:function(e){Vt(e,this._handlerArrayKeyPath,{})},add:function(e,t){var i=this,n=function(r){i._handler(r)};R.on(e,this._originalEventName,t.selector,n),Vt(e,this._handlerArrayKeyPath)[t.guid]=n},_handler:function(e){Nu(e)||Re.isSimulator()||Da({type:this._eventName,originalEvent:e,delegateTarget:e.delegateTarget})},remove:function(e,t){var i=Vt(e,this._handlerArrayKeyPath)[t.guid];R.off(e,this._originalEventName,t.selector,i)},teardown:function(e){Mh(e,this._handlerArrayKeyPath)}}),e$=PT.inherit({ctor:function(){this._eventNamespace=BT,this._eventName=Cg,this._originalEventName=JN,this.callBase()},_handler:function(e){var t=e.pointers||[];t.length||this.callBase(e)}}),t$=PT.inherit({ctor:function(){this._eventNamespace=LT,this._eventName=Gh,this._originalEventName=QN,this.callBase()}});Mn(Cg,new e$);Mn(Gh,new t$);function Hy(e,t,i){e=e==="role"||e==="id"?e:"aria-".concat(e),t=E(t)?t.toString():null,i.attr(e,t)}var _i=mr.inherit({_feedbackHideTimeout:400,_feedbackShowTimeout:30,_supportedKeys:()=>({}),_getDefaultOptions(){return k(this.callBase(),{hoveredElement:null,isActive:!1,disabled:!1,visible:!0,hint:void 0,activeStateEnabled:!1,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,accessKey:void 0,onFocusIn:null,onFocusOut:null,onKeyboardHandled:null,ignoreParentReadOnly:!1,useResizeObserver:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){var e=Re.real(),t=e.platform,i=e.version;return t==="ios"&&CT(i,"13.3")<=0},options:{useResizeObserver:!1}}])},_init(){this.callBase(),this._initContentReadyAction()},_innerWidgetOptionChanged:function(e,t){var i=_i.getOptionsFromContainer(t);e&&e.option(i),this._options.cache(t.name,i)},_bindInnerWidgetOptions(e,t){var i=()=>this._options.silent(t,k({},e.option()));i(),e.on("optionChanged",i)},_getAriaTarget(){return this._focusTarget()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){var{disabled:e,visible:t}=this.option();this.$element().addClass("dx-widget"),this._toggleDisabledState(e),this._toggleVisibility(t),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),this.callBase()},_render(){this.callBase(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()},_renderHint(){var{hint:e}=this.option();this.$element().attr("title",e||null)},_renderContent(){Qt(()=>this._disposed?void 0:this._renderContentImpl()).done(()=>this._disposed?void 0:this._fireContentReadyAction())},_renderContentImpl:re,_fireContentReadyAction:oo(function(){return this._contentReadyAction()}),_dispose(){this._contentReadyAction=null,this._detachKeyboardEvents(),this.callBase()},_resetActiveState(){this._toggleActiveState(this._eventBindingTarget(),!1)},_clean(){this._cleanFocusState(),this._resetActiveState(),this.callBase(),this.$element().empty()},_toggleVisibility(e){this.$element().toggleClass("dx-state-invisible",!e),this.setAria("hidden",!e||void 0)},_renderFocusState(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())},_renderAccessKey(){var e=this._focusTarget(),{accessKey:t}=this.option();e.attr("accesskey",t)},_isFocusable(){var{focusStateEnabled:e,disabled:t}=this.option();return e&&!t},_eventBindingTarget(){return this.$element()},_focusTarget(){return this._getActiveElement()},_isFocusTarget:function(e){var t=v(this._focusTarget()).toArray();return t.includes(e)},_getActiveElement(){var e=this._eventBindingTarget();return this._activeStateUnit?e.find(this._activeStateUnit).not(".dx-state-disabled"):e},_renderFocusTarget(){var{tabIndex:e}=this.option();this._focusTarget().attr("tabIndex",e)},_keyboardEventBindingTarget(){return this._eventBindingTarget()},_refreshFocusEvent(){this._detachFocusEvents(),this._attachFocusEvents()},_focusEventTarget(){return this._focusTarget()},_focusInHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:()=>this._updateFocusState(e,!0),excludeValidators:["readOnly"]})({event:e})},_focusOutHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:()=>this._updateFocusState(e,!1),excludeValidators:["readOnly","disabled"]})({event:e})},_updateFocusState(e,t){var{target:i}=e;this._isFocusTarget(i)&&this._toggleFocusClass(t,v(i))},_toggleFocusClass(e,t){var i=t&&t.length?t:this._focusTarget();i.toggleClass("dx-state-focused",e)},_hasFocusClass(e){var t=v(e||this._focusTarget());return t.hasClass("dx-state-focused")},_isFocused(){return this._hasFocusClass()},_getKeyboardListeners:()=>[],_attachKeyboardEvents(){this._detachKeyboardEvents();var{focusStateEnabled:e,onKeyboardHandled:t}=this.option(),i=this._getKeyboardListeners().length,n=!!t,r=e||i||n;r&&(this._keyboardListenerId=ga.on(this._keyboardEventBindingTarget(),this._focusTarget(),a=>this._keyboardHandler(a)))},_keyboardHandler(e,t){if(!t){var{originalEvent:i,keyName:n,which:r}=e,a=this._supportedKeys(i),o=a[n]||a[r];if(o!==void 0){var s=o.bind(this),l=s(i,e);if(!l)return!1}}var u=this._getKeyboardListeners(),{onKeyboardHandled:d}=this.option();return u.forEach(c=>c&&c._keyboardHandler(e)),d&&d(e),!0},_refreshFocusState(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState(){var e=this._focusTarget();e.removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()},_detachKeyboardEvents(){ga.off(this._keyboardListenerId),this._keyboardListenerId=null},_attachHoverEvents(){var{hoverStateEnabled:e}=this.option(),t=this._activeStateUnit,i=this._eventBindingTarget();Dy.off(i,{selector:t,namespace:"UIFeedback"}),e&&Dy.on(i,new on(n=>{var{event:r,element:a}=n;this._hoverStartHandler(r),this.option("hoveredElement",v(a))},{excludeValidators:["readOnly"]}),n=>{this.option("hoveredElement",null),this._hoverEndHandler(n)},{selector:t,namespace:"UIFeedback"})},_attachFeedbackEvents(){var{activeStateEnabled:e}=this.option(),t=this._activeStateUnit,i=this._eventBindingTarget();Ay.off(i,{namespace:"UIFeedback",selector:t}),e&&Ay.on(i,new on(n=>{var{event:r,element:a}=n;return this._toggleActiveState(v(a),!0,r)}),new on(n=>{var{event:r,element:a}=n;return this._toggleActiveState(v(a),!1,r)},{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:t,namespace:"UIFeedback"})},_detachFocusEvents(){var e=this._focusEventTarget();wc.off(e,{namespace:"".concat(this.NAME,"Focus")})},_attachFocusEvents(){var e=this._focusEventTarget();wc.on(e,t=>this._focusInHandler(t),t=>this._focusOutHandler(t),{namespace:"".concat(this.NAME,"Focus"),isFocusable:(t,i)=>v(i).is(A_)})},_hoverStartHandler:re,_hoverEndHandler:re,_toggleActiveState(e,t){this.option("isActive",t),e.toggleClass("dx-state-active",t)},_updatedHover(){var e=this._options.silent("hoveredElement");this._hover(e,e)},_findHoverTarget(e){return e&&e.closest(this._activeStateUnit||this._eventBindingTarget())},_hover(e,t){var{hoverStateEnabled:i,disabled:n,isActive:r}=this.option();if(t=this._findHoverTarget(t),t&&t.toggleClass("dx-state-hover",!1),e&&i&&!n&&!r){var a=this._findHoverTarget(e);a&&a.toggleClass("dx-state-hover",!0)}},_toggleDisabledState(e){this.$element().toggleClass("dx-state-disabled",!!e),this.setAria("disabled",e||void 0)},_toggleIndependentState(){this.$element().toggleClass("dx-state-independent",this.option("ignoreParentReadOnly"))},_setWidgetOption(e,t){if(this[e]){if(Ye(t[0])){V(t[0],(a,o)=>this._setWidgetOption(e,[a,o]));return}var i=t[0],n=t[1];t.length===1&&(n=this.option(i));var r=this["".concat(e,"OptionMap")];this[e].option(r?r(i):i,n)}},_optionChanged(e){var{name:t,value:i,previousValue:n}=e;switch(t){case"disabled":this._toggleDisabledState(i),this._updatedHover(),this._refreshFocusState();break;case"hint":this._renderHint();break;case"ignoreParentReadOnly":this._toggleIndependentState();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents(),this._updatedHover();break;case"tabIndex":case"focusStateEnabled":this._refreshFocusState();break;case"onFocusIn":case"onFocusOut":case"useResizeObserver":break;case"accessKey":this._renderAccessKey();break;case"hoveredElement":this._hover(i,n);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(i),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(i?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:this.callBase(e)}},_isVisible(){var{visible:e}=this.option();return this.callBase()&&e},beginUpdate(){this._ready(!1),this.callBase()},endUpdate(){this.callBase(),this._initialized&&this._ready(!0)},_ready(e){if(arguments.length===0)return this._isReady;this._isReady=e},setAria(){if(!Ye(arguments.length<=0?void 0:arguments[0]))Hy(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget());else{var e=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();V(arguments.length<=0?void 0:arguments[0],(t,i)=>Hy(t,i,e))}},isReady(){return this._ready()},repaint(){this._refresh()},focus(){wc.trigger(this._focusTarget())},registerKeyHandler(e,t){var i=this._supportedKeys();this._supportedKeys=()=>k(i,{[e]:t})}});_i.getOptionsFromContainer=e=>{var{name:t,fullName:i,value:n}=e,r={};if(t===i)r=n;else{var a=i.split(".").pop();r[a]=n}return r};var i$=["year","month","day"],n$=["year","month","day","hour","minute"],P_=function(e){return e==="date"||e==="datetime"},$f=function(e){var t,i=[],n=["year","month","day","hour","minute","second"],r=e.headerFilter&&e.headerFilter.groupInterval,a=r==="quarter"?"month":r;if(P_(e.dataType)&&r!==null)return i=e.dataType==="datetime"?n$:i$,t=n.indexOf(a),t>=0&&(i=n.slice(0,t),i.push(r)),i;if(E(r))return Array.isArray(r)?r:[r]};const $s=function(){var e=function(r,a){var o=r.dataField||r.selector;return a==="search"&&(o=r.displayField||r.calculateDisplayValue||o),o},t=function(r,a){var o,s,l,u=e(this,a);if(Array.isArray(r)&&E(r[0])&&E(r[1]))return s=[u,">=",r[0]],l=[u,"<=",r[1]],P_(this.dataType)&&(d=r[1],d.getHours()+d.getMinutes()+d.getSeconds()+d.getMilliseconds()<1)&&(o=new Date(r[1].getTime()),this.dataType==="date"&&o.setDate(r[1].getDate()+1),l=[u,"<",o]),[s,"and",l];var d},i=function(r,a,o){var s,l,u,d=function(h){return Wi(h)?[h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds()]:ti((""+h).split("/"),function(f,p){return p===1?Number(f)-1:Number(f)})}(r),c=e(this,o);switch(o==="headerFilter"?u=$f(this)[d.length-1]:this.dataType==="datetime"&&(u="minute"),u){case"year":s=new Date(d[0],0,1),l=new Date(d[0]+1,0,1);break;case"month":s=new Date(d[0],d[1],1),l=new Date(d[0],d[1]+1,1);break;case"quarter":s=new Date(d[0],3*d[1],1),l=new Date(d[0],3*d[1]+3,1);break;case"hour":s=new Date(d[0],d[1],d[2],d[3]),l=new Date(d[0],d[1],d[2],d[3]+1);break;case"minute":s=new Date(d[0],d[1],d[2],d[3],d[4]),l=new Date(d[0],d[1],d[2],d[3],d[4]+1);break;case"second":s=new Date(d[0],d[1],d[2],d[3],d[4],d[5]),l=new Date(d[0],d[1],d[2],d[3],d[4],d[5]+1);break;default:s=new Date(d[0],d[1],d[2]),l=new Date(d[0],d[1],d[2]+1)}switch(a){case"<":return[c,"<",s];case"<=":return[c,"<",l];case">":return[c,">=",l];case">=":return[c,">=",s];case"<>":return[[c,"<",s],"or",[c,">=",l]];default:return[[c,">=",s],"and",[c,"<",l]]}},n=function(r,a,o){var s=e(this,o),l=$f(this);if(o==="headerFilter"&&l&&E(r)){var u=(""+r).split("/"),d=Number(u[u.length-1]),c=l[u.length-1],h=[s,">=",d],f=[s,"<",d+c],p=[h,"and",f];return p}return[s,a||"=",r]};return{defaultCalculateFilterExpression:function(r,a,o){var s=this,l=e(s,o),u=s.calculateDisplayValue&&o==="search",d=u&&s.lookup&&s.lookup.dataType||s.dataType,c=null;if((o==="headerFilter"||o==="filterBuilder")&&r===null)c=[l,a||"=",null],d==="string"&&(c=[c,a==="="?"or":"and",[l,a||"=",""]]);else if(d==="string"&&(!s.lookup||u))c=[l,a||"contains",r];else{if(a==="between")return t.apply(s,[r,o]);if(P_(d)&&E(r))return i.apply(s,arguments);if(d==="number")return n.apply(s,arguments);c=[l,a||"=",r]}return c},getGroupInterval:$f}}();var Ra=e=>{var t=e??At().rtlEnabled;return t?"right":"left"},Ut=e=>Xt(e)?{width:e.outerWidth,height:e.outerHeight}:e.getBoundingClientRect();const r$={"en-150":"en-001","en-AG":"en-001","en-AI":"en-001","en-AU":"en-001","en-BB":"en-001","en-BM":"en-001","en-BS":"en-001","en-BW":"en-001","en-BZ":"en-001","en-CC":"en-001","en-CK":"en-001","en-CM":"en-001","en-CX":"en-001","en-CY":"en-001","en-DG":"en-001","en-DM":"en-001","en-ER":"en-001","en-FJ":"en-001","en-FK":"en-001","en-FM":"en-001","en-GB":"en-001","en-GD":"en-001","en-GG":"en-001","en-GH":"en-001","en-GI":"en-001","en-GM":"en-001","en-GY":"en-001","en-HK":"en-001","en-IE":"en-001","en-IL":"en-001","en-IM":"en-001","en-IN":"en-001","en-IO":"en-001","en-JE":"en-001","en-JM":"en-001","en-KE":"en-001","en-KI":"en-001","en-KN":"en-001","en-KY":"en-001","en-LC":"en-001","en-LR":"en-001","en-LS":"en-001","en-MG":"en-001","en-MO":"en-001","en-MS":"en-001","en-MT":"en-001","en-MU":"en-001","en-MW":"en-001","en-MY":"en-001","en-NA":"en-001","en-NF":"en-001","en-NG":"en-001","en-NR":"en-001","en-NU":"en-001","en-NZ":"en-001","en-PG":"en-001","en-PK":"en-001","en-PN":"en-001","en-PW":"en-001","en-RW":"en-001","en-SB":"en-001","en-SC":"en-001","en-SD":"en-001","en-SG":"en-001","en-SH":"en-001","en-SL":"en-001","en-SS":"en-001","en-SX":"en-001","en-SZ":"en-001","en-TC":"en-001","en-TK":"en-001","en-TO":"en-001","en-TT":"en-001","en-TV":"en-001","en-TZ":"en-001","en-UG":"en-001","en-VC":"en-001","en-VG":"en-001","en-VU":"en-001","en-WS":"en-001","en-ZA":"en-001","en-ZM":"en-001","en-ZW":"en-001","en-AT":"en-150","en-BE":"en-150","en-CH":"en-150","en-DE":"en-150","en-DK":"en-150","en-FI":"en-150","en-NL":"en-150","en-SE":"en-150","en-SI":"en-150","es-AR":"es-419","es-BO":"es-419","es-BR":"es-419","es-BZ":"es-419","es-CL":"es-419","es-CO":"es-419","es-CR":"es-419","es-CU":"es-419","es-DO":"es-419","es-EC":"es-419","es-GT":"es-419","es-HN":"es-419","es-MX":"es-419","es-NI":"es-419","es-PA":"es-419","es-PE":"es-419","es-PR":"es-419","es-PY":"es-419","es-SV":"es-419","es-US":"es-419","es-UY":"es-419","es-VE":"es-419",nb:"no",nn:"no","pt-AO":"pt-PT","pt-CH":"pt-PT","pt-CV":"pt-PT","pt-FR":"pt-PT","pt-GQ":"pt-PT","pt-GW":"pt-PT","pt-LU":"pt-PT","pt-MO":"pt-PT","pt-MZ":"pt-PT","pt-ST":"pt-PT","pt-TL":"pt-PT","az-Arab":"und","az-Cyrl":"und","bal-Latn":"und","blt-Latn":"und","bm-Nkoo":"und","bs-Cyrl":"und","byn-Latn":"und","cu-Glag":"und","dje-Arab":"und","dyo-Arab":"und","en-Dsrt":"und","en-Shaw":"und","ff-Adlm":"und","ff-Arab":"und","ha-Arab":"und","hi-Latn":"und","iu-Latn":"und","kk-Arab":"und","ks-Deva":"und","ku-Arab":"und","ky-Arab":"und","ky-Latn":"und","ml-Arab":"und","mn-Mong":"und","mni-Mtei":"und","ms-Arab":"und","pa-Arab":"und","sat-Deva":"und","sd-Deva":"und","sd-Khoj":"und","sd-Sind":"und","shi-Latn":"und","so-Arab":"und","sr-Latn":"und","sw-Arab":"und","tg-Arab":"und","ug-Cyrl":"und","uz-Arab":"und","uz-Cyrl":"und","vai-Latn":"und","wo-Arab":"und","yo-Arab":"und","yue-Hans":"und","zh-Hant":"und","zh-Hant-MO":"zh-Hant-HK"};var a$="-";const o$=(e,t)=>{var i=e[t];return i?i!=="root"&&i:t.substr(0,t.lastIndexOf(a$))};var Hf="en";const Cn=Fn({locale:(()=>{var e=Hf;return t=>{if(!t)return e;e=t}})(),getValueByClosestLocale:function(e){for(var t=this.locale(),i=e(t),n;!i&&!n;)t=o$(r$,t),t?i=e(t):n=!0;return i===void 0&&t!==Hf?e(Hf):i}});var s$={en:{Yes:"Yes",No:"No",Cancel:"Cancel",Clear:"Clear",Done:"Done",Loading:"Loading...",Select:"Select...",Search:"Search",Back:"Back",OK:"OK","dxCollectionWidget-noDataText":"No data to display","dxDropDownEditor-selectLabel":"Select","validation-required":"Required","validation-required-formatted":"{0} is required","validation-numeric":"Value must be a number","validation-numeric-formatted":"{0} must be a number","validation-range":"Value is out of range","validation-range-formatted":"{0} is out of range","validation-stringLength":"The length of the value is not correct","validation-stringLength-formatted":"The length of {0} is not correct","validation-custom":"Value is invalid","validation-custom-formatted":"{0} is invalid","validation-async":"Value is invalid","validation-async-formatted":"{0} is invalid","validation-compare":"Values do not match","validation-compare-formatted":"{0} does not match","validation-pattern":"Value does not match pattern","validation-pattern-formatted":"{0} does not match pattern","validation-email":"Email is invalid","validation-email-formatted":"{0} is invalid","validation-mask":"Value is invalid","dxLookup-searchPlaceholder":"Minimum character number: {0}","dxList-pullingDownText":"Pull down to refresh...","dxList-pulledDownText":"Release to refresh...","dxList-refreshingText":"Refreshing...","dxList-pageLoadingText":"Loading...","dxList-nextButtonText":"More","dxList-selectAll":"Select All","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxScrollView-pullingDownText":"Pull down to refresh...","dxScrollView-pulledDownText":"Release to refresh...","dxScrollView-refreshingText":"Refreshing...","dxScrollView-reachBottomText":"Loading...","dxDateBox-simulatedDataPickerTitleTime":"Select time","dxDateBox-simulatedDataPickerTitleDate":"Select date","dxDateBox-simulatedDataPickerTitleDateTime":"Select date and time","dxDateBox-validation-datetime":"Value must be a date or time","dxFileUploader-selectFile":"Select a file","dxFileUploader-dropFile":"or Drop a file here","dxFileUploader-bytes":"bytes","dxFileUploader-kb":"kb","dxFileUploader-Mb":"Mb","dxFileUploader-Gb":"Gb","dxFileUploader-upload":"Upload","dxFileUploader-uploaded":"Uploaded","dxFileUploader-readyToUpload":"Ready to upload","dxFileUploader-uploadAbortedMessage":"Upload cancelled","dxFileUploader-uploadFailedMessage":"Upload failed","dxFileUploader-invalidFileExtension":"File type is not allowed","dxFileUploader-invalidMaxFileSize":"File is too large","dxFileUploader-invalidMinFileSize":"File is too small","dxRangeSlider-ariaFrom":"From","dxRangeSlider-ariaTill":"Till","dxSwitch-switchedOnText":"ON","dxSwitch-switchedOffText":"OFF","dxForm-optionalMark":"optional","dxForm-requiredMessage":"{0} is required","dxNumberBox-invalidValueMessage":"Value must be a number","dxNumberBox-noDataText":"No data","dxDataGrid-columnChooserTitle":"Column Chooser","dxDataGrid-columnChooserEmptyText":"Drag a column here to hide it","dxDataGrid-groupContinuesMessage":"Continues on the next page","dxDataGrid-groupContinuedMessage":"Continued from the previous page","dxDataGrid-groupHeaderText":"Group by This Column","dxDataGrid-ungroupHeaderText":"Ungroup","dxDataGrid-ungroupAllText":"Ungroup All","dxDataGrid-editingEditRow":"Edit","dxDataGrid-editingSaveRowChanges":"Save","dxDataGrid-editingCancelRowChanges":"Cancel","dxDataGrid-editingDeleteRow":"Delete","dxDataGrid-editingUndeleteRow":"Undelete","dxDataGrid-editingConfirmDeleteMessage":"Are you sure you want to delete this record?","dxDataGrid-validationCancelChanges":"Cancel changes","dxDataGrid-groupPanelEmptyText":"Drag a column header here to group by that column","dxDataGrid-noDataText":"No data","dxDataGrid-searchPanelPlaceholder":"Search...","dxDataGrid-filterRowShowAllText":"(All)","dxDataGrid-filterRowResetOperationText":"Reset","dxDataGrid-filterRowOperationEquals":"Equals","dxDataGrid-filterRowOperationNotEquals":"Does not equal","dxDataGrid-filterRowOperationLess":"Less than","dxDataGrid-filterRowOperationLessOrEquals":"Less than or equal to","dxDataGrid-filterRowOperationGreater":"Greater than","dxDataGrid-filterRowOperationGreaterOrEquals":"Greater than or equal to","dxDataGrid-filterRowOperationStartsWith":"Starts with","dxDataGrid-filterRowOperationContains":"Contains","dxDataGrid-filterRowOperationNotContains":"Does not contain","dxDataGrid-filterRowOperationEndsWith":"Ends with","dxDataGrid-filterRowOperationBetween":"Between","dxDataGrid-filterRowOperationBetweenStartText":"Start","dxDataGrid-filterRowOperationBetweenEndText":"End","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-editingSaveAllChanges":"Save changes","dxDataGrid-editingCancelAllChanges":"Discard changes","dxDataGrid-editingAddRow":"Add a row","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Min of {1} is {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Max of {1} is {0}","dxDataGrid-summaryAvg":"Avg: {0}","dxDataGrid-summaryAvgOtherColumn":"Avg of {1} is {0}","dxDataGrid-summarySum":"Sum: {0}","dxDataGrid-summarySumOtherColumn":"Sum of {1} is {0}","dxDataGrid-summaryCount":"Count: {0}","dxDataGrid-columnFixingFix":"Fix","dxDataGrid-columnFixingUnfix":"Unfix","dxDataGrid-columnFixingLeftPosition":"To the left","dxDataGrid-columnFixingRightPosition":"To the right","dxDataGrid-exportTo":"Export","dxDataGrid-exportToExcel":"Export to Excel file","dxDataGrid-exporting":"Exporting...","dxDataGrid-excelFormat":"Excel file","dxDataGrid-selectedRows":"Selected rows","dxDataGrid-exportSelectedRows":"Export selected rows to {0}","dxDataGrid-exportAll":"Export all data to {0}","dxDataGrid-headerFilterEmptyValue":"(Blanks)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Cancel","dxDataGrid-ariaAdaptiveCollapse":"Hide additional data","dxDataGrid-ariaAdaptiveExpand":"Display additional data","dxDataGrid-ariaColumn":"Column","dxDataGrid-ariaValue":"Value","dxDataGrid-ariaFilterCell":"Filter cell","dxDataGrid-ariaCollapse":"Collapse","dxDataGrid-ariaExpand":"Expand","dxDataGrid-ariaDataGrid":"Data grid","dxDataGrid-ariaSearchInGrid":"Search in the data grid","dxDataGrid-ariaSelectAll":"Select all","dxDataGrid-ariaSelectRow":"Select row","dxDataGrid-ariaToolbar":"Data grid toolbar","dxDataGrid-filterBuilderPopupTitle":"Filter Builder","dxDataGrid-filterPanelCreateFilter":"Create Filter","dxDataGrid-filterPanelClearFilter":"Clear","dxDataGrid-filterPanelFilterEnabledHint":"Enable the filter","dxTreeList-ariaTreeList":"Tree list","dxTreeList-ariaSearchInGrid":"Search in the tree list","dxTreeList-ariaToolbar":"Tree list toolbar","dxTreeList-editingAddRowToNode":"Add","dxPager-infoText":"Page {0} of {1} ({2} items)","dxPager-pagesCountText":"of","dxPager-pageSizesAllText":"All","dxPivotGrid-grandTotal":"Grand Total","dxPivotGrid-total":"{0} Total","dxPivotGrid-fieldChooserTitle":"Field Chooser","dxPivotGrid-showFieldChooser":"Show Field Chooser","dxPivotGrid-expandAll":"Expand All","dxPivotGrid-collapseAll":"Collapse All","dxPivotGrid-sortColumnBySummary":'Sort "{0}" by This Column',"dxPivotGrid-sortRowBySummary":'Sort "{0}" by This Row',"dxPivotGrid-removeAllSorting":"Remove All Sorting","dxPivotGrid-dataNotAvailable":"N/A","dxPivotGrid-rowFields":"Row Fields","dxPivotGrid-columnFields":"Column Fields","dxPivotGrid-dataFields":"Data Fields","dxPivotGrid-filterFields":"Filter Fields","dxPivotGrid-allFields":"All Fields","dxPivotGrid-columnFieldArea":"Drop Column Fields Here","dxPivotGrid-dataFieldArea":"Drop Data Fields Here","dxPivotGrid-rowFieldArea":"Drop Row Fields Here","dxPivotGrid-filterFieldArea":"Drop Filter Fields Here","dxScheduler-editorLabelTitle":"Subject","dxScheduler-editorLabelStartDate":"Start Date","dxScheduler-editorLabelEndDate":"End Date","dxScheduler-editorLabelDescription":"Description","dxScheduler-editorLabelRecurrence":"Repeat","dxScheduler-openAppointment":"Open appointment","dxScheduler-recurrenceNever":"Never","dxScheduler-recurrenceMinutely":"Every minute","dxScheduler-recurrenceHourly":"Hourly","dxScheduler-recurrenceDaily":"Daily","dxScheduler-recurrenceWeekly":"Weekly","dxScheduler-recurrenceMonthly":"Monthly","dxScheduler-recurrenceYearly":"Yearly","dxScheduler-recurrenceRepeatEvery":"Repeat Every","dxScheduler-recurrenceRepeatOn":"Repeat On","dxScheduler-recurrenceEnd":"End repeat","dxScheduler-recurrenceAfter":"After","dxScheduler-recurrenceOn":"On","dxScheduler-recurrenceRepeatMinutely":"minute(s)","dxScheduler-recurrenceRepeatHourly":"hour(s)","dxScheduler-recurrenceRepeatDaily":"day(s)","dxScheduler-recurrenceRepeatWeekly":"week(s)","dxScheduler-recurrenceRepeatMonthly":"month(s)","dxScheduler-recurrenceRepeatYearly":"year(s)","dxScheduler-switcherDay":"Day","dxScheduler-switcherWeek":"Week","dxScheduler-switcherWorkWeek":"Work Week","dxScheduler-switcherMonth":"Month","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Timeline Day","dxScheduler-switcherTimelineWeek":"Timeline Week","dxScheduler-switcherTimelineWorkWeek":"Timeline Work Week","dxScheduler-switcherTimelineMonth":"Timeline Month","dxScheduler-recurrenceRepeatOnDate":"on date","dxScheduler-recurrenceRepeatCount":"occurrence(s)","dxScheduler-allDay":"All day","dxScheduler-confirmRecurrenceEditMessage":"Do you want to edit only this appointment or the whole series?","dxScheduler-confirmRecurrenceDeleteMessage":"Do you want to delete only this appointment or the whole series?","dxScheduler-confirmRecurrenceEditSeries":"Edit series","dxScheduler-confirmRecurrenceDeleteSeries":"Delete series","dxScheduler-confirmRecurrenceEditOccurrence":"Edit appointment","dxScheduler-confirmRecurrenceDeleteOccurrence":"Delete appointment","dxScheduler-noTimezoneTitle":"No timezone","dxScheduler-moreAppointments":"{0} more","dxCalendar-todayButtonText":"Today","dxCalendar-ariaWidgetName":"Calendar","dxColorView-ariaRed":"Red","dxColorView-ariaGreen":"Green","dxColorView-ariaBlue":"Blue","dxColorView-ariaAlpha":"Transparency","dxColorView-ariaHex":"Color code","dxTagBox-selected":"{0} selected","dxTagBox-allSelected":"All selected ({0})","dxTagBox-moreSelected":"{0} more","vizExport-printingButtonText":"Print","vizExport-titleMenuText":"Exporting/Printing","vizExport-exportButtonText":"{0} file","dxFilterBuilder-and":"And","dxFilterBuilder-or":"Or","dxFilterBuilder-notAnd":"Not And","dxFilterBuilder-notOr":"Not Or","dxFilterBuilder-addCondition":"Add Condition","dxFilterBuilder-addGroup":"Add Group","dxFilterBuilder-enterValueText":"<enter a value>","dxFilterBuilder-filterOperationEquals":"Equals","dxFilterBuilder-filterOperationNotEquals":"Does not equal","dxFilterBuilder-filterOperationLess":"Is less than","dxFilterBuilder-filterOperationLessOrEquals":"Is less than or equal to","dxFilterBuilder-filterOperationGreater":"Is greater than","dxFilterBuilder-filterOperationGreaterOrEquals":"Is greater than or equal to","dxFilterBuilder-filterOperationStartsWith":"Starts with","dxFilterBuilder-filterOperationContains":"Contains","dxFilterBuilder-filterOperationNotContains":"Does not contain","dxFilterBuilder-filterOperationEndsWith":"Ends with","dxFilterBuilder-filterOperationIsBlank":"Is blank","dxFilterBuilder-filterOperationIsNotBlank":"Is not blank","dxFilterBuilder-filterOperationBetween":"Is between","dxFilterBuilder-filterOperationAnyOf":"Is any of","dxFilterBuilder-filterOperationNoneOf":"Is none of","dxHtmlEditor-dialogColorCaption":"Change Font Color","dxHtmlEditor-dialogBackgroundCaption":"Change Background Color","dxHtmlEditor-dialogLinkCaption":"Add Link","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Text","dxHtmlEditor-dialogLinkTargetField":"Open link in new window","dxHtmlEditor-dialogImageCaption":"Add Image","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Alternate text","dxHtmlEditor-dialogImageWidthField":"Width (px)","dxHtmlEditor-dialogImageHeightField":"Height (px)","dxHtmlEditor-dialogInsertTableRowsField":"Rows","dxHtmlEditor-dialogInsertTableColumnsField":"Columns","dxHtmlEditor-dialogInsertTableCaption":"Insert Table","dxHtmlEditor-dialogUpdateImageCaption":"Update Image","dxHtmlEditor-dialogImageUpdateButton":"Update","dxHtmlEditor-dialogImageAddButton":"Add","dxHtmlEditor-dialogImageSpecifyUrl":"From the Web","dxHtmlEditor-dialogImageSelectFile":"From This Device","dxHtmlEditor-dialogImageKeepAspectRatio":"Keep Aspect Ratio","dxHtmlEditor-dialogImageEncodeToBase64":"Encode to Base64","dxHtmlEditor-heading":"Heading","dxHtmlEditor-normalText":"Normal text","dxHtmlEditor-background":"Background Color","dxHtmlEditor-bold":"Bold","dxHtmlEditor-color":"Font Color","dxHtmlEditor-font":"Font","dxHtmlEditor-italic":"Italic","dxHtmlEditor-link":"Add Link","dxHtmlEditor-image":"Add Image","dxHtmlEditor-size":"Size","dxHtmlEditor-strike":"Strikethrough","dxHtmlEditor-subscript":"Subscript","dxHtmlEditor-superscript":"Superscript","dxHtmlEditor-underline":"Underline","dxHtmlEditor-blockquote":"Blockquote","dxHtmlEditor-header":"Header","dxHtmlEditor-increaseIndent":"Increase Indent","dxHtmlEditor-decreaseIndent":"Decrease Indent","dxHtmlEditor-orderedList":"Ordered List","dxHtmlEditor-bulletList":"Bullet List","dxHtmlEditor-alignLeft":"Align Left","dxHtmlEditor-alignCenter":"Align Center","dxHtmlEditor-alignRight":"Align Right","dxHtmlEditor-alignJustify":"Align Justify","dxHtmlEditor-codeBlock":"Code Block","dxHtmlEditor-variable":"Add Variable","dxHtmlEditor-undo":"Undo","dxHtmlEditor-redo":"Redo","dxHtmlEditor-clear":"Clear Formatting","dxHtmlEditor-insertTable":"Insert Table","dxHtmlEditor-insertHeaderRow":"Insert Header Row","dxHtmlEditor-insertRowAbove":"Insert Row Above","dxHtmlEditor-insertRowBelow":"Insert Row Below","dxHtmlEditor-insertColumnLeft":"Insert Column Left","dxHtmlEditor-insertColumnRight":"Insert Column Right","dxHtmlEditor-deleteColumn":"Delete Column","dxHtmlEditor-deleteRow":"Delete Row","dxHtmlEditor-deleteTable":"Delete Table","dxHtmlEditor-cellProperties":"Cell Properties","dxHtmlEditor-tableProperties":"Table Properties","dxHtmlEditor-insert":"Insert","dxHtmlEditor-delete":"Delete","dxHtmlEditor-border":"Border","dxHtmlEditor-style":"Style","dxHtmlEditor-width":"Width","dxHtmlEditor-height":"Height","dxHtmlEditor-borderColor":"Color","dxHtmlEditor-tableBackground":"Background","dxHtmlEditor-dimensions":"Dimensions","dxHtmlEditor-alignment":"Alignment","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertical","dxHtmlEditor-paddingVertical":"Vertical Padding","dxHtmlEditor-paddingHorizontal":"Horizontal Padding","dxHtmlEditor-pixels":"Pixels","dxHtmlEditor-list":"List","dxHtmlEditor-ordered":"Ordered","dxHtmlEditor-bullet":"Bullet","dxHtmlEditor-align":"Align","dxHtmlEditor-center":"Center","dxHtmlEditor-left":"Left","dxHtmlEditor-right":"Right","dxHtmlEditor-indent":"Indent","dxHtmlEditor-justify":"Justify","dxFileManager-newDirectoryName":"Untitled directory","dxFileManager-rootDirectoryName":"Files","dxFileManager-errorNoAccess":"Access Denied. Operation could not be completed.","dxFileManager-errorDirectoryExistsFormat":"Directory '{0}' already exists.","dxFileManager-errorFileExistsFormat":"File '{0}' already exists.","dxFileManager-errorFileNotFoundFormat":"File '{0}' not found.","dxFileManager-errorDirectoryNotFoundFormat":"Directory '{0}' not found.","dxFileManager-errorWrongFileExtension":"File extension is not allowed.","dxFileManager-errorMaxFileSizeExceeded":"File size exceeds the maximum allowed size.","dxFileManager-errorInvalidSymbols":"This name contains invalid characters.","dxFileManager-errorDefault":"Unspecified error.","dxFileManager-errorDirectoryOpenFailed":"The directory cannot be opened","dxFileManager-commandCreate":"New directory","dxFileManager-commandRename":"Rename","dxFileManager-commandMove":"Move to","dxFileManager-commandCopy":"Copy to","dxFileManager-commandDelete":"Delete","dxFileManager-commandDownload":"Download","dxFileManager-commandUpload":"Upload files","dxFileManager-commandRefresh":"Refresh","dxFileManager-commandThumbnails":"Thumbnails View","dxFileManager-commandDetails":"Details View","dxFileManager-commandClearSelection":"Clear selection","dxFileManager-commandShowNavPane":"Toggle navigation pane","dxFileManager-dialogDirectoryChooserMoveTitle":"Move to","dxFileManager-dialogDirectoryChooserMoveButtonText":"Move","dxFileManager-dialogDirectoryChooserCopyTitle":"Copy to","dxFileManager-dialogDirectoryChooserCopyButtonText":"Copy","dxFileManager-dialogRenameItemTitle":"Rename","dxFileManager-dialogRenameItemButtonText":"Save","dxFileManager-dialogCreateDirectoryTitle":"New directory","dxFileManager-dialogCreateDirectoryButtonText":"Create","dxFileManager-dialogDeleteItemTitle":"Delete","dxFileManager-dialogDeleteItemButtonText":"Delete","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Are you sure you want to delete {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Are you sure you want to delete {0} items?","dxFileManager-dialogButtonCancel":"Cancel","dxFileManager-editingCreateSingleItemProcessingMessage":"Creating a directory inside {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"Created a directory inside {0}","dxFileManager-editingCreateSingleItemErrorMessage":"Directory was not created","dxFileManager-editingCreateCommonErrorMessage":"Directory was not created","dxFileManager-editingRenameSingleItemProcessingMessage":"Renaming an item inside {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Renamed an item inside {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Item was not renamed","dxFileManager-editingRenameCommonErrorMessage":"Item was not renamed","dxFileManager-editingDeleteSingleItemProcessingMessage":"Deleting an item from {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Deleting {0} items from {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Deleted an item from {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"Deleted {0} items from {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Item was not deleted","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} items were not deleted","dxFileManager-editingDeleteCommonErrorMessage":"Some items were not deleted","dxFileManager-editingMoveSingleItemProcessingMessage":"Moving an item to {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"Moving {0} items to {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Moved an item to {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"Moved {0} items to {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Item was not moved","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} items were not moved","dxFileManager-editingMoveCommonErrorMessage":"Some items were not moved","dxFileManager-editingCopySingleItemProcessingMessage":"Copying an item to {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"Copying {0} items to {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Copied an item to {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"Copied {0} items to {1}","dxFileManager-editingCopySingleItemErrorMessage":"Item was not copied","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} items were not copied","dxFileManager-editingCopyCommonErrorMessage":"Some items were not copied","dxFileManager-editingUploadSingleItemProcessingMessage":"Uploading an item to {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"Uploading {0} items to {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Uploaded an item to {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"Uploaded {0} items to {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Item was not uploaded","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} items were not uploaded","dxFileManager-editingUploadCanceledMessage":"Canceled","dxFileManager-listDetailsColumnCaptionName":"Name","dxFileManager-listDetailsColumnCaptionDateModified":"Date Modified","dxFileManager-listDetailsColumnCaptionFileSize":"File Size","dxFileManager-listThumbnailsTooltipTextSize":"Size","dxFileManager-listThumbnailsTooltipTextDateModified":"Date Modified","dxFileManager-notificationProgressPanelTitle":"Progress","dxFileManager-notificationProgressPanelEmptyListText":"No operations","dxFileManager-notificationProgressPanelOperationCanceled":"Canceled","dxDiagram-categoryGeneral":"General","dxDiagram-categoryFlowchart":"Flowchart","dxDiagram-categoryOrgChart":"Org Chart","dxDiagram-categoryContainers":"Containers","dxDiagram-categoryCustom":"Custom","dxDiagram-commandExportToSvg":"Export to SVG","dxDiagram-commandExportToPng":"Export to PNG","dxDiagram-commandExportToJpg":"Export to JPEG","dxDiagram-commandUndo":"Undo","dxDiagram-commandRedo":"Redo","dxDiagram-commandFontName":"Font Name","dxDiagram-commandFontSize":"Font Size","dxDiagram-commandBold":"Bold","dxDiagram-commandItalic":"Italic","dxDiagram-commandUnderline":"Underline","dxDiagram-commandTextColor":"Font Color","dxDiagram-commandLineColor":"Line Color","dxDiagram-commandLineWidth":"Line Width","dxDiagram-commandLineStyle":"Line Style","dxDiagram-commandLineStyleSolid":"Solid","dxDiagram-commandLineStyleDotted":"Dotted","dxDiagram-commandLineStyleDashed":"Dashed","dxDiagram-commandFillColor":"Fill Color","dxDiagram-commandAlignLeft":"Align Left","dxDiagram-commandAlignCenter":"Align Center","dxDiagram-commandAlignRight":"Align Right","dxDiagram-commandConnectorLineType":"Connector Line Type","dxDiagram-commandConnectorLineStraight":"Straight","dxDiagram-commandConnectorLineOrthogonal":"Orthogonal","dxDiagram-commandConnectorLineStart":"Connector Line Start","dxDiagram-commandConnectorLineEnd":"Connector Line End","dxDiagram-commandConnectorLineNone":"None","dxDiagram-commandConnectorLineArrow":"Arrow","dxDiagram-commandFullscreen":"Full Screen","dxDiagram-commandUnits":"Units","dxDiagram-commandPageSize":"Page Size","dxDiagram-commandPageOrientation":"Page Orientation","dxDiagram-commandPageOrientationLandscape":"Landscape","dxDiagram-commandPageOrientationPortrait":"Portrait","dxDiagram-commandPageColor":"Page Color","dxDiagram-commandShowGrid":"Show Grid","dxDiagram-commandSnapToGrid":"Snap to Grid","dxDiagram-commandGridSize":"Grid Size","dxDiagram-commandZoomLevel":"Zoom Level","dxDiagram-commandAutoZoom":"Auto Zoom","dxDiagram-commandFitToContent":"Fit to Content","dxDiagram-commandFitToWidth":"Fit to Width","dxDiagram-commandAutoZoomByContent":"Auto Zoom by Content","dxDiagram-commandAutoZoomByWidth":"Auto Zoom by Width","dxDiagram-commandSimpleView":"Simple View","dxDiagram-commandCut":"Cut","dxDiagram-commandCopy":"Copy","dxDiagram-commandPaste":"Paste","dxDiagram-commandSelectAll":"Select All","dxDiagram-commandDelete":"Delete","dxDiagram-commandBringToFront":"Bring to Front","dxDiagram-commandSendToBack":"Send to Back","dxDiagram-commandLock":"Lock","dxDiagram-commandUnlock":"Unlock","dxDiagram-commandInsertShapeImage":"Insert Image...","dxDiagram-commandEditShapeImage":"Change Image...","dxDiagram-commandDeleteShapeImage":"Delete Image","dxDiagram-commandLayoutLeftToRight":"Left-to-right","dxDiagram-commandLayoutRightToLeft":"Right-to-left","dxDiagram-commandLayoutTopToBottom":"Top-to-bottom","dxDiagram-commandLayoutBottomToTop":"Bottom-to-top","dxDiagram-unitIn":"in","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Cancel","dxDiagram-dialogInsertShapeImageTitle":"Insert Image","dxDiagram-dialogEditShapeImageTitle":"Change Image","dxDiagram-dialogEditShapeImageSelectButton":"Select image","dxDiagram-dialogEditShapeImageLabelText":"or drop a file here","dxDiagram-uiExport":"Export","dxDiagram-uiProperties":"Properties","dxDiagram-uiSettings":"Settings","dxDiagram-uiShowToolbox":"Show Toolbox","dxDiagram-uiSearch":"Search","dxDiagram-uiStyle":"Style","dxDiagram-uiLayout":"Layout","dxDiagram-uiLayoutTree":"Tree","dxDiagram-uiLayoutLayered":"Layered","dxDiagram-uiDiagram":"Diagram","dxDiagram-uiText":"Text","dxDiagram-uiObject":"Object","dxDiagram-uiConnector":"Connector","dxDiagram-uiPage":"Page","dxDiagram-shapeText":"Text","dxDiagram-shapeRectangle":"Rectangle","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Cross","dxDiagram-shapeTriangle":"Triangle","dxDiagram-shapeDiamond":"Diamond","dxDiagram-shapeHeart":"Heart","dxDiagram-shapePentagon":"Pentagon","dxDiagram-shapeHexagon":"Hexagon","dxDiagram-shapeOctagon":"Octagon","dxDiagram-shapeStar":"Star","dxDiagram-shapeArrowLeft":"Left Arrow","dxDiagram-shapeArrowUp":"Up Arrow","dxDiagram-shapeArrowRight":"Right Arrow","dxDiagram-shapeArrowDown":"Down Arrow","dxDiagram-shapeArrowUpDown":"Up Down Arrow","dxDiagram-shapeArrowLeftRight":"Left Right Arrow","dxDiagram-shapeProcess":"Process","dxDiagram-shapeDecision":"Decision","dxDiagram-shapeTerminator":"Terminator","dxDiagram-shapePredefinedProcess":"Predefined Process","dxDiagram-shapeDocument":"Document","dxDiagram-shapeMultipleDocuments":"Multiple Documents","dxDiagram-shapeManualInput":"Manual Input","dxDiagram-shapePreparation":"Preparation","dxDiagram-shapeData":"Data","dxDiagram-shapeDatabase":"Database","dxDiagram-shapeHardDisk":"Hard Disk","dxDiagram-shapeInternalStorage":"Internal Storage","dxDiagram-shapePaperTape":"Paper Tape","dxDiagram-shapeManualOperation":"Manual Operation","dxDiagram-shapeDelay":"Delay","dxDiagram-shapeStoredData":"Stored Data","dxDiagram-shapeDisplay":"Display","dxDiagram-shapeMerge":"Merge","dxDiagram-shapeConnector":"Connector","dxDiagram-shapeOr":"Or","dxDiagram-shapeSummingJunction":"Summing Junction","dxDiagram-shapeContainerDefaultText":"Container","dxDiagram-shapeVerticalContainer":"Vertical Container","dxDiagram-shapeHorizontalContainer":"Horizontal Container","dxDiagram-shapeCardDefaultText":"Person's Name","dxDiagram-shapeCardWithImageOnLeft":"Card with Image on the Left","dxDiagram-shapeCardWithImageOnTop":"Card with Image on the Top","dxDiagram-shapeCardWithImageOnRight":"Card with Image on the Right","dxGantt-dialogTitle":"Title","dxGantt-dialogStartTitle":"Start","dxGantt-dialogEndTitle":"End","dxGantt-dialogProgressTitle":"Progress","dxGantt-dialogResourcesTitle":"Resources","dxGantt-dialogResourceManagerTitle":"Resource Manager","dxGantt-dialogTaskDetailsTitle":"Task Details","dxGantt-dialogEditResourceListHint":"Edit Resource List","dxGantt-dialogEditNoResources":"No resources","dxGantt-dialogButtonAdd":"Add","dxGantt-contextMenuNewTask":"New Task","dxGantt-contextMenuNewSubtask":"New Subtask","dxGantt-contextMenuDeleteTask":"Delete Task","dxGantt-contextMenuDeleteDependency":"Delete Dependency","dxGantt-dialogTaskDeleteConfirmation":"Deleting a task also deletes all its dependencies and subtasks. Are you sure you want to delete this task?","dxGantt-dialogDependencyDeleteConfirmation":"Are you sure you want to delete the dependency from the task?","dxGantt-dialogResourcesDeleteConfirmation":"Deleting a resource also deletes it from tasks to which this resource is assigned. Are you sure you want to delete these resources? Resources: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. How would you like to proceed?","dxGantt-dialogCancelOperationMessage":"Cancel the operation","dxGantt-dialogDeleteDependencyMessage":"Delete the dependency","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Move the task and keep the dependency","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. How would you like to proceed?","dxGantt-dialogDeleteDependenciesMessage":"Delete the dependency relations","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"Move the task and keep the dependencies","dxGantt-undo":"Undo","dxGantt-redo":"Redo","dxGantt-expandAll":"Expand All","dxGantt-collapseAll":"Collapse All","dxGantt-addNewTask":"Add New Task","dxGantt-deleteSelectedTask":"Delete Selected Task","dxGantt-zoomIn":"Zoom In","dxGantt-zoomOut":"Zoom Out","dxGantt-fullScreen":"Full Screen","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Sort Ascending","dxGantt-sortingDescendingText":"Sort Descending","dxGantt-sortingClearText":"Clear Sorting","dxGantt-showResources":"Show Resources","dxGantt-showDependencies":"Show Dependencies","dxGantt-dialogStartDateValidation":"Start date must be after {0}","dxGantt-dialogEndDateValidation":"End date must be after {0}"}},l$=k(!0,{},s$),u$=(e,t)=>e[t]||{},Wf={},fe=Fn({engine:function(){return"base"},_dictionary:l$,load:function(e){k(!0,this._dictionary,e)},_localizablePrefix:"@",setup:function(e){this._localizablePrefix=e},localizeString:function(e){var t=this,i=new RegExp("(^|[^a-zA-Z_0-9"+t._localizablePrefix+"-]+)("+t._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),n=t._localizablePrefix+t._localizablePrefix;return e.replace(i,(r,a,o,s)=>{var l=t._localizablePrefix+s,u;return o!==n&&(u=t.format(s)),u||(Wf[s]=hV(s)),a+(u||l)})},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(e){return e?Wf:k({},Wf,this.getMessagesByLocales()[Cn.locale()])},getFormatter:function(e){return this._getFormatterBase(e)||this._getFormatterBase(e,"en")},_getFormatterBase:function(e,t){var i=Cn.getValueByClosestLocale(n=>u$(this._dictionary,n)[e]);if(i)return function(){var n=arguments.length===1&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return n.unshift(i),Kr.apply(this,n)}},format:function(e){var t=this.getFormatter(e),i=Array.prototype.slice.call(arguments,1);return t&&t.apply(this,i)||""}}),Ss=new dt;const Qe=jm(xt.ERROR_MESSAGES,{E1001:"Module '{0}'. Controller '{1}' is already registered",E1002:"Module '{0}'. Controller '{1}' does not inherit from DevExpress.ui.dxDataGrid.Controller",E1003:"Module '{0}'. View '{1}' is already registered",E1004:"Module '{0}'. View '{1}' does not inherit from DevExpress.ui.dxDataGrid.View",E1005:"Public method '{0}' is already registered",E1006:"Public method '{0}.{1}' does not exist",E1007:"State storing cannot be provided due to the restrictions of the browser",E1010:"The template does not contain the TextBox widget",E1011:'Items cannot be deleted from the List. Implement the "remove" function in the data store',E1012:"Editing type '{0}' with the name '{1}' is unsupported",E1016:"Unexpected type of data source is provided for a lookup column",E1018:"The 'collapseAll' method cannot be called if you use a remote data source",E1019:"Search mode '{0}' is unavailable",E1020:"The type cannot be changed after initialization",E1021:"{0} '{1}' you are trying to remove does not exist",E1022:'The "markers" option is given an invalid value. Assign an array instead',E1023:'The "routes" option is given an invalid value. Assign an array instead',E1025:"This layout is too complex to render",E1026:'The "calculateCustomSummary" function is missing from a field whose "summaryType" option is set to "custom"',E1031:"Unknown subscription in the Scheduler widget: '{0}'",E1032:"Unknown start date in an appointment: '{0}'",E1033:"Unknown step in the date navigator: '{0}'",E1034:"The browser does not implement an API for saving files",E1035:"The editor cannot be created because of an internal error: {0}",E1037:"Invalid structure of grouped data",E1038:"The browser does not support local storages for local web pages",E1039:"A cell's position cannot be calculated",E1040:"The '{0}' key value is not unique within the data array",E1041:"The '{0}' script is referenced after the DevExtreme scripts or not referenced at all",E1042:"{0} requires the key field to be specified",E1043:"Changes cannot be processed due to the incorrectly set key",E1044:"The key field specified by the keyExpr option does not match the key field specified in the data store",E1045:"Editing requires the key field to be specified in the data store",E1046:"The '{0}' key field is not found in data objects",E1047:'The "{0}" field is not found in the fields array',E1048:'The "{0}" operation is not found in the filterOperations array',E1049:"Column '{0}': filtering is allowed but the 'dataField' or 'name' option is not specified",E1050:"The validationRules option does not apply to third-party editors defined in the editCellTemplate",E1051:`HtmlEditor's valueType is "{0}", but the {0} converter was not imported.`,E1052:'{0} should have the "dataSource" option specified',E1053:'The "buttons" option accepts an array that contains only objects or string values',E1054:"All text editor buttons must have names",E1055:'One or several text editor buttons have invalid or non-unique "name" values',E1056:'The {0} widget does not support buttons of the "{1}" type',E1058:'The "startDayHour" must be earlier than the "endDayHour"',E1059:"The following column names are not unique: {0}",E1060:"All editable columns must have names",W1001:'The "key" option cannot be modified after initialization',W1002:"An item with the key '{0}' does not exist",W1003:"A group with the key '{0}' in which you are trying to select items does not exist",W1004:"The item '{0}' you are trying to select in the group '{1}' does not exist",W1005:"Due to column data types being unspecified, data has been loaded twice in order to apply initial filter settings. To resolve this issue, specify data types for all grid columns.",W1006:"The map service returned the following error: '{0}'",W1007:"No item with key {0} was found in the data source, but this key was used as the parent key for item {1}",W1008:"Cannot scroll to the '{0}' date because it does not exist on the current view",W1009:"Searching works only if data is specified using the dataSource option",W1010:"The capability to select all items works with source data of plain structure only",W1011:'The "keyExpr" option is not applied when dataSource is not an array',W1012:"The '{0}' key field is not found in data objects",W1013:'The "message" field in the dialog component was renamed to "messageHtml". Change your code correspondingly. In addition, if you used HTML code in the message, make sure that it is secure',W1014:"The Floating Action Button exceeds the recommended speed dial action count. If you need to display more speed dial actions, increase the maxSpeedDialActionCount option value in the global config.",W1015:'The "cellDuration" should divide the range from the "startDayHour" to the "endDayHour" into even intervals',W1016:"The '{0}' field in the HTML Editor toolbar item configuration was renamed to '{1}'. Please make a corresponding change in your code.",W1017:"The 'key' property is not specified for a lookup data source. Please specify it to prevent requests for the entire dataset when users filter data.",W1018:"Infinite scrolling may not work properly with multiple selection. To use these features together, set 'selection.deferred' to true or set 'selection.selectAllMode' to 'page'.",W1019:"Filter query string exceeds maximum length limit of {0} characters.",W1020:"hideEvent is ignored when the shading property is true"});var FT=je(),d$=_r.add,c$=xa,h$=Vh,vu=new se,MT="link[rel=dx-theme]",f$="data-theme",p$="data-active",Wy="dx-hairlines",VT="any",Mr,F_,Vr,cn,ha,v$=15e3,zf="dx.";function yg(){if(!Ue())return null;var e=v("<div>",Mr).addClass("dx-theme-marker").appendTo(Mr.documentElement),t;try{return t=FT.getComputedStyle(e.get(0)).fontFamily,!t||(t=t.replace(/["']/g,""),t.substr(0,zf.length)!==zf)?null:t.substr(zf.length)}finally{e.remove()}}function zy(e){var t,i,n=!0;ha=e;function r(){ha=null,clearInterval(i),n=!0,Ss.fire(),Ss.empty(),vu.resolve()}if(Gy())r();else{if(!n){ha&&(ha=e);return}t=Date.now(),n=!1,i=setInterval(function(){var a=Gy(),o=!a&&Date.now()-t>v$;o&&Qe.log("W0004",ha),(a||o)&&r()},10)}}function Gy(){if(!ha)return!0;var e=ha===VT;if(vu.state()==="resolved"&&e)return!0;var t=yg();return t&&e?!0:t===ha}function _$(){var e=v(MT,Mr);e.length&&(Vr={},F_=v(sg("<link rel=stylesheet>"),Mr),e.each(function(){var t=v(this,Mr),i=t.attr(f$),n=t.attr("href"),r=t.attr(p$)==="true";Vr[i]={url:n,isActive:r}}),e.last().after(F_),e.remove())}function m$(e){var t=e?e.split("."):[],i=null;if(Vr){if(e in Vr)return e;V(Vr,function(n,r){var a=n.split(".");if(!(t[0]&&a[0]!==t[0])&&!(t[1]&&t[1]!==a[1])&&!(t[2]&&t[2]!==a[2])&&((!i||r.isActive)&&(i=n),r.isActive))return!1})}return i}function g$(e){try{e!==Mr&&(Vr=null)}catch{Vr=null}Mr=e}function NT(e){e=e||{},g$(e.context||me.getDocument()),Mr&&(_$(),cn=void 0,Xn(e))}function Xn(e){if(!arguments.length)return cn=cn||yg(),cn;HT(c$()),e=e||{},typeof e=="string"&&(e={theme:e});var t=e._autoInit,i=e.loadCallback,n;if(cn=m$(e.theme||cn),cn&&(n=Vr[cn]),i&&Ss.add(i),n)F_.attr("href",Vr[cn].url),(Ss.has()||vu.state()!=="resolved"||e._forceTimeout)&&zy(cn);else if(t)Ue()&&zy(VT),Ss.fire(),Ss.empty();else throw Qe.Error("E0021",cn);vu.done(()=>$T(uT(),cn))}function C$(e){e=e||Xn();var t=[],i=e&&e.split(".");return i&&(t.push("dx-theme-"+i[0],"dx-theme-"+i[0]+"-typography"),i.length>1&&t.push("dx-color-scheme-"+i[1]+(ei(e)?"-"+i[2]:""))),t}var Ic;function $T(e,t){Ic=C$(t).join(" "),v(e).addClass(Ic),function(){var i=Ue()&&FT.devicePixelRatio;if(!(!i||i<2)){var n=v("<div>");n.css("border",".5px solid transparent"),v("body").append(n),nt(n)===1&&(v(e).addClass(Wy),Ic+=" "+Wy),n.remove()}}()}function HT(e){v(e).removeClass(Ic)}function xg(e,t){return t||(t=cn||yg()),new RegExp(e).test(t)}function ei(e){return xg("material",e)}function WT(e){return xg("generic",e)}function y$(e){return xg("compact",e)}function x$(e,t){var i=me.getDocument(),n=i.createElement("span");n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.visibility="hidden",n.style.fontFamily="Arial",n.style.fontSize="250px",n.style.fontWeight=t,n.innerHTML=e,i.body.appendChild(n);var r=n.offsetWidth;n.style.fontFamily="Roboto, RobotoFallback, Arial";var a=n.offsetWidth;return n.parentNode.removeChild(n),r!==a}function b$(e,t){return new Promise(i=>{var n=()=>{clearInterval(r),clearTimeout(a),i()},r=setInterval(()=>{x$(e,t)&&n()},15),a=setTimeout(n,2e3)})}function Uy(){if(NT({_autoInit:!0,_forceTimeout:!0}),v(MT,Mr).length)throw Qe.Error("E0022")}Ue()?Uy():d$(Uy);h$.add(function(e,t){vu.done(function(){HT(t),$T(e)})});Re.changed.add(function(){NT({_autoInit:!0})});var S$=Lu(),E$="dx-loadindicator",w$="dx-loadindicator-wrapper",I$="dx-loadindicator-content",T$="dx-loadindicator-icon",Ky="dx-loadindicator-segment",A$="dx-loadindicator-segment-inner",D$="dx-loadindicator-image",vn=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules:function(){var e=Xn();return this.callBase().concat([{device:function(){var t=Re.real(),i=t.platform==="android"&&!/chrome/i.test(S$.userAgent);return i},options:{viaImage:!0}},{device:function(){return ei(e)},options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:function(){return WT(e)},options:{_animatingSegmentCount:7}}])},_useTemplates:function(){return!1},_init:function(){this.callBase(),this.$element().addClass(E$)},_initMarkup:function(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper:function(){this._$wrapper=v("<div>").addClass(w$),this.$element().append(this._$wrapper)},_renderIndicatorContent:function(){this._$content=v("<div>").addClass(I$),this._$wrapper.append(this._$content)},_renderMarkup:function(){AT()&&!this.option("viaImage")&&!this.option("indicatorSrc")?this._renderMarkupForAnimation():this._renderMarkupForImage()},_renderMarkupForAnimation:function(){var e=this.option("_animatingSegmentInner");this._$indicator=v("<div>").addClass(T$),this._$content.append(this._$indicator);for(var t=this.option("_animatingSegmentCount");t>=0;--t){var i=v("<div>").addClass(Ky).addClass(Ky+t);e&&i.append(v("<div>").addClass(A$)),this._$indicator.append(i)}},_renderMarkupForImage:function(){var e=this.option("indicatorSrc");this._$wrapper.addClass(D$),e&&this._$wrapper.css("backgroundImage","url("+e+")")},_renderDimensions:function(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation:function(){if(this._$indicator){var e=this.option("width"),t=this.option("height");if(e||t){e=He(this.$element()),t=Ke(this.$element());var i=Math.min(t,e);this._$wrapper.css({height:i,width:i,fontSize:i})}}},_clean:function(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation:function(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage:function(){this._$wrapper.css("backgroundImage","none")},_optionChanged:function(e){switch(e.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(e)}}});tt("dxLoadIndicator",vn);var bg="dxTranslator",O$=/matrix(3d)?\((.+?)\)/,R$=/translate(?:3d)?\((.+?)\)/,On=function(e){e=v(e);var t=nh(e);return{left:t.x,top:t.y}};function ih(e){return Ln(e)==="string"&&e[e.length-1]==="%"}function zT(e,t){e.length&&Vt(e.get(0),bg,t)}var Sg=function(e){e.length&&Mh(e.get(0),bg)},Hu=function(e){e.x=e.x||0,e.y=e.y||0;var t=ih(e.x)?e.x:e.x+"px",i=ih(e.y)?e.y:e.y+"px";return"translate("+t+", "+i+")"},nh=function(e){var t=e.length?Vt(e.get(0),bg):null;if(!t){var i=e.css("transform")||Hu({x:0,y:0}),n=i.match(O$),r=n&&n[1];n?(n=n[2].split(","),r==="3d"?n=n.slice(12,15):(n.push(0),n=n.slice(4,7))):n=[0,0,0],t={x:parseFloat(n[0]),y:parseFloat(n[1]),z:parseFloat(n[2])},zT(e,t)}return t},ri=function(e,t){e=v(e);var i=t.left,n=t.top,r;i===void 0?(r=nh(e),r.y=n||0):n===void 0?(r=nh(e),r.x=i||0):(r={x:i||0,y:n||0,z:0},zT(e,r)),e.css({transform:Hu(r)}),(ih(i)||ih(n))&&Sg(e)},Wu=function(e,t){e=v(e);var i,n={left:0,top:0,transform:"none"};t&&(i=e.css("transition"),n.transition="none"),e.css(n),Sg(e),t&&(e.get(0).offsetHeight,e.css("transition",i))},k$=function(e){var t=e.match(R$);if(!(!t||!t[1]))return t=t[1].split(","),t={x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])},t},jy=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,qy={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)"},B$=function(e,t,i,n){var r=3*e,a=3*(i-e)-r,o=1-r-a,s=3*t,l=3*(n-t)-s,u=1-s-l,d=function(h){return h*(r+h*(a+h*o))},c=function(h){return r+h*(2*a+3*h*o)};return function(h){return function(f){return f*(s+f*(l+f*u))}(function(f){for(var p=f,m=0,g;m<14&&(g=d(p)-f,!(Math.abs(g)<.001));)p-=g/c(p),m++;return p}(h))}},M_={},L$=function(e){e=qy[e]||e;var t=e.match(jy),i;t||(i="linear",t=qy[i].match(jy)),t=t.slice(1,5);for(var n=0;n<t.length;n++)t[n]=parseFloat(t[n]);var r=i||"cubicbezier_"+t.join("_").replace(/\./g,"p");return Ie(M_[r])||(M_[r]=function(a,o,s,l,u){return l*B$(t[0],t[1],t[2],t[3])(o/u)+s}),r};function P$(e){return M_[e]}var Yy=je(),F$=/left|right/,M$=/top|bottom/,Xy=/fit|flip|none/,V$=/scale\(.+?\)/,N$=Lt.safari,V_=function(e){var t={h:"center",v:"center"},i=Do(e);return i&&V(i,function(){var n=String(this).toLowerCase();F$.test(n)?t.h=n:M$.test(n)&&(t.v=n)}),t},Zy=function(e){return Fh(e)},$$=function(e){var t=Do(e),i=String(t&&t[0]).toLowerCase(),n=String(t&&t[1]).toLowerCase();return Xy.test(i)||(i="none"),Xy.test(n)||(n=i),{h:i,v:n}},Jy=function(e){switch(e){case"center":return .5;case"right":case"bottom":return 1;default:return 0}},N_=function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return e}},$_=function(e,t){var i=0;return e.myLocation<t.min&&(i+=t.min-e.myLocation),e.myLocation>t.max&&(i+=e.myLocation-t.max),i},Qy=function(e,t,i){return t.myLocation<i.min?e==="h"?"left":"top":t.myLocation>i.max?e==="h"?"right":"bottom":"none"},H_=function(e){e.myLocation=e.atLocation+Jy(e.atAlign)*e.atSize-Jy(e.myAlign)*e.mySize+e.offset},xd={fit:function(e,t){var i=!1;e.myLocation>t.max&&(e.myLocation=t.max,i=!0),e.myLocation<t.min&&(e.myLocation=t.min,i=!0),e.fit=i},flip:function(e,t){if(e.flip=!1,!(e.myAlign==="center"&&e.atAlign==="center")&&(e.myLocation<t.min||e.myLocation>t.max)){var i=k({},e,{myAlign:N_(e.myAlign),atAlign:N_(e.atAlign),offset:-e.offset});H_(i),i.oversize=$_(i,t),(i.myLocation>=t.min&&i.myLocation<=t.max||e.oversize>i.oversize)&&(e.myLocation=i.myLocation,e.oversize=i.oversize,e.flip=!0)}},flipfit:function(e,t){this.flip(e,t),this.fit(e,t)},none:function(e){e.oversize=0}},GT,UT=function(){var e=v("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo(v("body")),t=e.get(0).offsetWidth-e.get(0).clientWidth;e.remove(),GT=t},H$={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},KT=function(e,t){var i=v(e),n=i.offset(),r=k(!0,{},H$,{h:{location:n.left},v:{location:n.top}});if(!t)return r;var a=V_(t.my),o=V_(t.at),s=v(t.of).length&&t.of||Yy,l=Zy(t.offset),u=$$(t.collision),d=t.boundary,c=Zy(t.boundaryOffset),h={mySize:ot(i),myAlign:a.h,atAlign:o.h,offset:l.h,collision:u.h,boundaryOffset:c.h},f={mySize:nt(i),myAlign:a.v,atAlign:o.v,offset:l.v,collision:u.v,boundaryOffset:c.v};if(s.preventDefault)h.atLocation=s.pageX,f.atLocation=s.pageY,h.atSize=0,f.atSize=0;else if(s=v(s),Xt(s[0]))h.atLocation=s.scrollLeft(),f.atLocation=s.scrollTop(),Re.real().deviceType==="phone"&&s[0].visualViewport?(h.atLocation=Math.max(h.atLocation,s[0].visualViewport.offsetLeft),f.atLocation=Math.max(f.atLocation,s[0].visualViewport.offsetTop),h.atSize=s[0].visualViewport.width,f.atSize=s[0].visualViewport.height):(h.atSize=s[0].innerWidth>s[0].outerWidth?s[0].innerWidth:He(s),f.atSize=s[0].innerHeight>s[0].outerHeight||N$?s[0].innerHeight:Ke(s));else if(s[0].nodeType===9)h.atLocation=0,f.atLocation=0,h.atSize=He(s),f.atSize=Ke(s);else{var p=Ut(s.get(0)),m=jT(s);h.atLocation=m.left,f.atLocation=m.top,h.atSize=Math.max(p.width,ot(s)),f.atSize=Math.max(p.height,nt(s))}H_(h),H_(f);var g=function(){var b=v(Yy),A=He(b),B=Ke(b),D=b.scrollLeft(),U=b.scrollTop(),H=me.getDocumentElement(),W=go?H.clientWidth/A:1,G=go?H.clientHeight/B:1;GT===void 0&&UT();var j=A,te=B;if(d){var N=v(d),Y=N.offset();D=Y.left,U=Y.top,j=He(N),te=Ke(N)}return{h:{min:D+h.boundaryOffset,max:D+j/W-h.mySize-h.boundaryOffset},v:{min:U+f.boundaryOffset,max:U+te/G-f.mySize-f.boundaryOffset}}}();h.oversize=$_(h,g.h),f.oversize=$_(f,g.v),h.collisionSide=Qy("h",h,g.h),f.collisionSide=Qy("v",f,g.v),xd[h.collision]&&xd[h.collision](h,g.h),xd[f.collision]&&xd[f.collision](f,g.v);var C=function(b){return t.precise?b:Math.round(b)};return k(!0,r,{h:{location:C(h.myLocation),oversize:C(h.oversize),fit:h.fit,flip:h.flip,collisionSide:h.collisionSide},v:{location:C(f.myLocation),oversize:C(f.oversize),fit:f.fit,flip:f.flip,collisionSide:f.collisionSide},precise:t.precise}),r},e0=function(e,t,i,n,r){var a=E(e.style)&&!me.isNode(e.style);a?e.style.transform=r?i.replace(t,""):i:e.setAttribute("style",r?n.replace(t,""):n)},jT=function e(t){var i,n,r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,o=a.get(0);if(!o)return t.offset();var s=((i=o.getAttribute)===null||i===void 0?void 0:i.call(o,"style"))||"",l=(n=o.style)===null||n===void 0?void 0:n.transform,u=(r=s.match(V$))===null||r===void 0?void 0:r[0],d;return u?(e0(o,u,l,s,!0),d=e(t,a.parent()),e0(o,u,l,s,!1)):d=e(t,a.parent()),d},_u=function(e,t){var i=v(e);if(!t)return i.offset();Wu(i,!0);var n=jT(i),r=t.h&&t.v?t:KT(i,t),a=function(o){return t.precise?o:Math.round(o)};return ri(i,{left:r.h.location-a(n.left),top:r.v.location-a(n.top)}),r},W$=function(e){return e=v(e).get(0),Xt(e)?null:e&&"pageY"in e&&"pageX"in e?{top:e.pageY,left:e.pageX}:v(e).offset()};_u.inverseAlign||(_u.inverseAlign=N_);_u.normalizeAlign||(_u.normalizeAlign=V_);const xi={calculateScrollbarWidth:UT,calculate:KT,setup:_u,offset:W$};var qT=je(),Ql=ye(vr,"dxFX"),z$=/^([+-])=(.*)/i,mu="dxAnimData",Eg="dxAnimQueue",zn="transform",G$={initAnimation:function(e,t){e.css({transitionProperty:"none"}),typeof t.from=="string"?e.addClass(t.from):z_(e,t.from);var i=this,n=new se,r=t.cleanupWhen;t.transitionAnimation={deferred:n,finish:function(){i._finishTransition(e),r?De(n,r).always(function(){i._cleanup(e,t)}):i._cleanup(e,t),n.resolveWith(e,[t,e])}},this._completeAnimationCallback(e,t).done(function(){t.transitionAnimation.finish()}).fail(function(){n.rejectWith(e,[t,e])}),t.duration||t.transitionAnimation.finish(),e.css("transform")},animate:function(e,t){return this._startAnimation(e,t),t.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(e,t){var i=this,n=Date.now()+t.delay,r=new se,a=new se,o=new se,s,l=TT()+".dxFX";t.transitionAnimation.cleanup=function(){clearTimeout(s),clearTimeout(u),R.off(e,l),R.off(e,Ql)},R.one(e,l,function(){Date.now()-n>=t.duration&&a.reject()}),R.off(e,Ql),R.on(e,Ql,function(){i.stop(e,t),r.reject()});var u=setTimeout(function(){s=setTimeout(function(){o.reject()},t.duration+t.delay+zt._simulatedTransitionEndDelay),De(a,o).fail((function(){r.resolve()}).bind(this))});return r.promise()},_startAnimation:function(e,t){e.css({transitionProperty:"all",transitionDelay:t.delay+"ms",transitionDuration:t.duration+"ms",transitionTimingFunction:t.easing}),typeof t.to=="string"?e[0].className+=" "+t.to:t.to&&z_(e,t.to)},_finishTransition:function(e){e.css("transition","none")},_cleanup:function(e,t){t.transitionAnimation.cleanup(),typeof t.from=="string"&&(e.removeClass(t.from),e.removeClass(t.to))},stop:function(e,t,i){t&&(i?t.transitionAnimation.finish():(Ye(t.to)&&V(t.to,function(n){e.css(n,e.css(n))}),this._finishTransition(e),this._cleanup(e,t)))}},t0={initAnimation:function(e,t){z_(e,t.from)},animate:function(e,t){var i=new se,n=this;return t?(V(t.to,function(r){t.from[r]===void 0&&(t.from[r]=n._normalizeValue(e.css(r)))}),t.to[zn]&&(t.from[zn]=n._parseTransform(t.from[zn]),t.to[zn]=n._parseTransform(t.to[zn])),t.frameAnimation={to:t.to,from:t.from,currentValue:t.from,easing:L$(t.easing),duration:t.duration,startTime:new Date().valueOf(),finish:function(){this.currentValue=this.to,this.draw(),ur(t.frameAnimation.animationFrameId),i.resolve()},draw:function(){if(t.draw){t.draw(this.currentValue);return}var r=k({},this.currentValue);r[zn]&&(r[zn]=ti(r[zn],function(a,o){if(o==="translate")return Hu(a);if(o==="scale")return"scale("+a+")";if(o.substr(0,o.length-1)==="rotate")return o+"("+a+"deg)"}).join(" ")),e.css(r)}},t.delay?(t.frameAnimation.startTime+=t.delay,t.frameAnimation.delayTimeout=setTimeout(function(){n._startAnimation(e,t)},t.delay)):n._startAnimation(e,t),i.promise()):i.reject().promise()},_startAnimation:function(e,t){R.off(e,Ql),R.on(e,Ql,function(){t.frameAnimation&&ur(t.frameAnimation.animationFrameId)}),this._animationStep(e,t)},_parseTransform:function(e){var t={};return V(e.match(/\w+\d*\w*\([^)]*\)\s*/g),function(i,n){var r=k$(n),a=n.match(/scale\((.+?)\)/),o=n.match(/(rotate.)\((.+)deg\)/);r&&(t.translate=r),a&&a[1]&&(t.scale=parseFloat(a[1])),o&&o[1]&&(t[o[1]]=parseFloat(o[2]))}),t},stop:function(e,t,i){var n=t&&t.frameAnimation;n&&(ur(n.animationFrameId),clearTimeout(n.delayTimeout),i&&n.finish(),delete t.frameAnimation)},_animationStep:function(e,t){var i=t&&t.frameAnimation;if(i){var n=new Date().valueOf();if(n>=i.startTime+i.duration){i.finish();return}i.currentValue=this._calcStepValue(i,n-i.startTime),i.draw();var r=this;i.animationFrameId=pu(function(){r._animationStep(e,t)})}},_calcStepValue:function(e,t){return function i(n,r){var a=Array.isArray(r)?[]:{};return V(r,function(o,s){if(typeof s=="string"&&parseFloat(s,10)===!1)return!0;a[o]=typeof s=="object"?i(n[o],s):function(l){var u=t/e.duration,d=t,c=1*n[l],h=r[l]-n[l],f=e.duration;return P$(e.easing)(u,d,c,h,f)}(o)}),a}(e.from,e.to)},_normalizeValue:function(e){var t=parseFloat(e,10);return t===!1?e:t}},U$={initAnimation:function(){},animate:function(){return new se().resolve().promise()},stop:re,isSynchronous:!0},K$=function(e){e=e||{};var t={transition:O_()?G$:t0,frame:t0,noAnimation:U$},i=e.strategy||"transition";return e.type==="css"&&!O_()&&(i="noAnimation"),t[i]},YT=function(e,t,i,n){V(["from","to"],function(){if(!i(e[this]))throw xt.Error("E0010",t,this,n)})},XT=function(e,t){return YT(e,t,function(i){return Ye(i)},"a plain object")},j$=function(e,t){return YT(e,t,function(i){return typeof i=="string"},"a string")},q$={setup:function(){}},Y$={validateConfig:function(e){j$(e,"css")},setup:function(){}},X$={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},Gf={validateConfig:function(e){XT(e,"slide")},setup:function(e,t){var i=On(e);if(t.type!=="slide"){var n=t.type==="slideIn"?t.from:t.to;n.position=k({of:qT},X$[t.direction]),W_(e,n)}this._setUpConfig(i,t.from),this._setUpConfig(i,t.to),Sg(e)},_setUpConfig:function(e,t){t.left="left"in t?t.left:"+=0",t.top="top"in t?t.top:"+=0",this._initNewPosition(e,t)},_initNewPosition:function(e,t){var i={left:t.left,top:t.top};delete t.left,delete t.top;var n=this._getRelativeValue(i.left);n!==void 0?i.left=n+e.left:t.left=0,n=this._getRelativeValue(i.top),n!==void 0?i.top=n+e.top:t.top=0,t[zn]=Hu({x:i.left,y:i.top})},_getRelativeValue:function(e){var t;if(typeof e=="string"&&(t=z$.exec(e)))return parseInt(t[1]+"1")*t[2]}},Uf={setup:function(e,t){var i,n,r=t.from,a=t.to,o=t.type==="fadeOut"?1:0,s=t.type==="fadeOut"?0:1,l=Ye(r)?String((i=r.opacity)!==null&&i!==void 0?i:o):String(r),u=Ye(a)?String((n=a.opacity)!==null&&n!==void 0?n:s):String(a);switch(t.skipElementInitialStyles||(l=e.css("opacity")),t.type){case"fadeIn":u=1;break;case"fadeOut":u=0}t.from={visibility:"visible",opacity:l},t.to={opacity:u}}},Z$={validateConfig:function(e){XT(e,"pop")},setup:function(e,t){var i=t.from,n=t.to,r="opacity"in i?i.opacity:e.css("opacity"),a="opacity"in n?n.opacity:1,o="scale"in i?i.scale:0,s="scale"in n?n.scale:1;t.from={opacity:r};var l=nh(e);t.from[zn]=this._getCssTransform(l,o),t.to={opacity:a},t.to[zn]=this._getCssTransform(l,s)},_getCssTransform:function(e,t){return Hu(e)+"scale("+t+")"}},ZT={custom:q$,slide:Gf,slideIn:Gf,slideOut:Gf,fade:Uf,fadeIn:Uf,fadeOut:Uf,pop:Z$,css:Y$},J$=function(e){var t=ZT[e.type];if(!t)throw xt.Error("E0011",e.type);return t},Q$={type:"custom",from:{},to:{},duration:400,start:re,complete:re,easing:"ease",delay:0},eH={duration:400,easing:"ease",delay:0};function tH(){var e=this.element,t=this.config;if(W_(e,t.from),W_(e,t.to),this.configurator.setup(e,t),e.data(mu,this),this.strategy.initAnimation(e,t),t.start){var i=Me(e);t.start.apply(this,[i,t])}}var iH=function(e){var t=e.element,i=e.config;if(t.removeData(mu),i.complete){var n=Me(t);i.complete.apply(this,[n,i])}e.deferred.resolveWith(this,[t,i])},nH=function(){var e=this,t=e.element,i=e.config;return e.isStarted=!0,e.strategy.animate(t,i).done(function(){iH(e)}).fail(function(){e.deferred.rejectWith(this,[t,i])})},rH=function(e){var t=this.element,i=this.config;clearTimeout(this.startTimeout),this.isStarted||this.start(),this.strategy.stop(t,i,e)},Kf=ye(vr,"dxFXStartAnimation"),aH=function(e){R.off(e.element,Kf),R.on(e.element,Kf,function(){zt.stop(e.element)}),e.deferred.always(function(){R.off(e.element,Kf)})},JT=function(e,t){var i=t.type==="css"?eH:Q$,n=k(!0,{},i,t),r=J$(n),a=K$(n),o={element:v(e),config:n,configurator:r,strategy:a,isSynchronous:a.isSynchronous,setup:tH,start:nH,stop:rH,deferred:new se};return Ie(r.validateConfig)&&r.validateConfig(n),aH(o),o},oH=function(e,t){var i=v(e);if(!i.length)return new se().resolve().promise();var n=JT(i,t);return sH(i,n),n.deferred.promise()};function sH(e,t){var i=wg(e);lH(e,i),i.push(t),Uh(e)||Ig(e,i)}function wg(e){return e.data(Eg)||[]}function lH(e,t){e.data(Eg,t)}var QT=function(e){e.removeData(Eg)};function Uh(e){return!!e.data(mu)}function Ig(e,t){if(t=wg(e),!!t.length){var i=t.shift();t.length===0&&QT(e),uH(i).done(function(){Uh(e)||Ig(e)})}}function uH(e){return e.setup(),e.isSynchronous?e.start():e.startTimeout=setTimeout(function(){e.start()}),e.deferred.promise()}function W_(e,t){if(!(!t||!t.position)){var i=v(qT),n=0,r=0,a=xi.calculate(e,t.position),o=e.offset(),s=e.position();s.top>o.top&&(r=i.scrollTop()),s.left>o.left&&(n=i.scrollLeft()),k(t,{left:a.h.location-o.left+s.left-n,top:a.v.location-o.top+s.top-r}),delete t.position}}function z_(e,t){V(t,function(i,n){try{e.css(i,Ie(n)?n():n)}catch{}})}var dH=function(e,t){var i=v(e),n=wg(i);V(n,function(a,o){o.config.delay=0,o.config.duration=0,o.isSynchronous=!0}),Uh(i)||Ig(i,n);var r=i.data(mu);r&&r.stop(t),i.removeData(mu),QT(i)},zt={off:!1,animationTypes:ZT,animate:oH,createAnimation:JT,isAnimating:Uh,stop:dH,_simulatedTransitionEndDelay:100},Hs=function(e){return e===0?0:e/Math.abs(e)},ki=function(e,t,i){var n=!t&&t!==0,r=!i&&i!==0;return n&&(t=r?e:Math.min(e,i)),r&&(i=n?e:Math.max(e,t)),Math.min(Math.max(e,t),i)},Nr=function(e,t,i){return e>=t&&e<=i};function i0(e){return Math.abs(parseInt(e.toExponential().split("e")[1]))}function cH(){return 3e-4.toPrecision(3)!=="0.000300"}function eA(e,t){var i=hH(t||0)+2,n=e.toString().split("."),r=e,a=Math.abs(e),o,s=QC(e),l=a>1?10:0;return n.length===1?e:(s||(QC(t)&&(i=n[0].length+i0(t)),e=a,e=e-Math.floor(e)+l),i=cH()&&i0(e)>6||i>7?15:7,!s&&(o=parseFloat(e.toPrecision(i)).toString().split("."),o[0]===l.toString())?parseFloat(n[0]+"."+o[1]):parseFloat(r.toPrecision(i)))}function hH(e){var t=e.toString();if(t.indexOf(".")<0)return 0;var i=t.split("."),n=i[1].indexOf("e");return n>=0?n:i[1].length}var fH=_r.add,n0=Math.abs,jf=0,qf=1,cl=2,rh=10,pH=0,vH=180,_H=function(){return Ta("pointer-events")},mH=Jr(function(){var e=Re.real().deviceType==="desktop";if(!_H()||!e)return re;var t=v("<div>").addClass("dx-gesture-cover").css("pointerEvents","none");return R.subscribeGlobal(t,"dxmousewheel",function(i){i.preventDefault()}),fH(function(){t.appendTo("body")}),function(i,n){t.css("pointerEvents",i?"all":"none"),i&&t.css("cursor",n)}}),gH=function(e,t){var i=mH();i(e,t)},zu=zh.inherit({gesture:!0,configure:function(e){this.getElement().css("msTouchAction",e.immediate?"pinch-zoom":""),this.callBase(e)},allowInterruptionByMouseWheel:function(){return this._stage!==cl},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=jf},start:function(e){if(e._needSkipEvent||mT(e)){this._cancel(e);return}this._startEvent=uo(e),this._startEventData=Gt(e),this._stage=qf,this._init(e),this._setupImmediateTimer()},_setupImmediateTimer:function(){clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate&&(this._immediateTimer=setTimeout((function(){this._immediateAccepted=!0}).bind(this),vH))},move:function(e){if(this._stage===qf&&this._directionConfirmed(e)){if(this._stage=cl,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(e),this._adjustStartEvent(e),this._start(this._startEvent),this._stage===jf)return;this._requestAccept(e),this._move(e),this._forgetAccept()}else this._stage===cl&&(this._clearSelection(e),this._move(e))},_directionConfirmed:function(e){var t=this._getTouchBoundary(e),i=to(this._startEventData,Gt(e)),n=n0(i.x),r=n0(i.y),a=this._validateMove(t,n,r),o=this._validateMove(t,r,n),s=this.getDirection(e),l=s==="both"&&(a||o),u=s==="horizontal"&&a,d=s==="vertical"&&o;return l||u||d||this._immediateAccepted},_validateMove:function(e,t,i){return t&&t>=e&&(this.immediate?t>=i:!0)},_getTouchBoundary:function(e){return this.immediate||qi(e)?pH:rh},_adjustStartEvent:function(e){var t=this._getTouchBoundary(e),i=to(this._startEventData,Gt(e));this._startEvent.pageX+=Hs(i.x)*t,this._startEvent.pageY+=Hs(i.y)*t},_resetActiveElement:function(){Re.real().platform==="ios"&&this.getElement().find(":focus").length&&Zs()},_toggleGestureCover:function(e){this._toggleGestureCoverImpl(e)},_toggleGestureCoverImpl:function(e){var t=this._stage===cl;t&&gH(e,this.getElement().css("cursor"))},_clearSelection:function(e){qi(e)||Nu(e)||YV()},end:function(e){this._toggleGestureCover(!1),this._stage===cl?this._end(e):this._stage===qf&&this._stop(e),this._stage=jf},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:re,_start:re,_move:re,_stop:re,_end:re});zu.initialTouchBoundary=rh;zu.touchBoundary=function(e){if(E(e)){rh=e;return}return rh};var yo="dxdragstart",Sa="dxdrag",xo="dxdragend",Kh="dxdragenter",jh="dxdragleave",Tg="dxdrop",bd="dxDragEventsCount",Br=[],Es=[],G_=[],Ag={setup:function(e,t){var i=Br.includes(e);i||(Br.push(e),Es.push([]),G_.push(t||{}))},add:function(e,t){var i=Br.indexOf(e);this.updateEventsCounter(e,t.type,1);var n=t.selector;Es[i].includes(n)||Es[i].push(n)},updateEventsCounter:function(e,t,i){if([Kh,jh,Tg].indexOf(t)>-1){var n=Vt(e,bd)||0;Vt(e,bd,Math.max(0,n+i))}},remove:function(e,t){this.updateEventsCounter(e,t.type,-1)},teardown:function(e){var t=Vt(e,bd);if(!t){var i=Br.indexOf(e);Br.splice(i,1),Es.splice(i,1),G_.splice(i,1),Mh(e,bd)}}};Mn(Kh,Ag);Mn(jh,Ag);Mn(Tg,Ag);var CH=function(e){var t=Br.indexOf(e.get(0)),i=Es[t].filter(r=>r),n=e.find(i.join(", "));return Es[t].includes(void 0)&&(n=n.add(e)),n},yH=function(e){var t=Br.indexOf(e.get(0));return G_[t]},xH=function(e,t){return e.itemPositionFunc?e.itemPositionFunc(t):t.offset()},bH=function(e,t){return e.itemSizeFunc?e.itemSizeFunc(t):{width:t.get(0).getBoundingClientRect().width,height:t.get(0).getBoundingClientRect().height}},SH=zu.inherit({ctor:function(e){this.callBase(e),this.direction="both"},_init:function(e){this._initEvent=e},_start:function(e){e=this._fireEvent(yo,this._initEvent),this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset;var t=rN(e.targetElements||(e.targetElements===null?[]:Br));this._dropTargets=ti(t,function(i){return v(i).get(0)})},_move:function(e){var t=Gt(e),i=this._calculateOffset(t);e=this._fireEvent(Sa,e,{offset:i}),this._processDropTargets(e),e._cancelPreventDefault||e.preventDefault()},_calculateOffset:function(e){return{x:this._calculateXOffset(e),y:this._calculateYOffset(e)}},_calculateXOffset:function(e){if(this.direction!=="vertical"){var t=e.x-this._startEventData.x;return this._fitOffset(t,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset:function(e){if(this.direction!=="horizontal"){var t=e.y-this._startEventData.y;return this._fitOffset(t,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:function(e,t,i){return t!=null&&(e=Math.max(e,-t)),i!=null&&(e=Math.min(e,i)),e},_processDropTargets:function(e){var t=this._findDropTarget(e),i=t===this._currentDropTarget;i||(this._fireDropTargetEvent(e,jh),this._currentDropTarget=t,this._fireDropTargetEvent(e,Kh))},_fireDropTargetEvent:function(e,t){if(this._currentDropTarget){var i={type:t,originalEvent:e,draggingElement:this._$element.get(0),target:this._currentDropTarget};Da(i)}},_findDropTarget:function(e){var t=this,i;return V(Br,function(n,r){if(t._checkDropTargetActive(r)){var a=v(r);V(CH(a),function(o,s){var l=v(s);t._checkDropTarget(yH(a),l,v(i),e)&&(i=s)})}}),i},_checkDropTargetActive:function(e){var t=!1;return V(this._dropTargets,function(i,n){return t=t||n===e||ma(n,e),!t}),t},_checkDropTarget:function(e,t,i,n){var r=t.get(0)===v(n.target).get(0);if(r)return!1;var a=xH(e,t);if(n.pageX<a.left||n.pageY<a.top)return!1;var o=bH(e,t);return n.pageX>a.left+o.width||n.pageY>a.top+o.height||i.length&&i.closest(t).length||e.checkDropTarget&&!e.checkDropTarget(t,n)?!1:t},_end:function(e){var t=Gt(e);this._fireEvent(xo,e,{offset:this._calculateOffset(t)}),this._fireDropTargetEvent(e,Tg),delete this._currentDropTarget}});Js({emitter:SH,events:[yo,Sa,xo]});var r0=function(){var e=[];return{add:function(t){e.includes(t)||e.push(t)},remove:function(t){var i=e.indexOf(t);i!==-1&&e.splice(i,1)},fire:function(){var t=e.pop(),i=!!t;return i&&t(),i},hasCallback:function(){return e.length>0}}}(),Tc=1500,Ca=[],EH=e=>(Tc=Mt(e,Tc),Tc),tA=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tc,t=Ca.length,i=(t?Ca[t-1]:e)+1;return Ca.push(i),i},U_=e=>{var t=Ca.indexOf(e);t>=0&&Ca.splice(t,1)},wH=e=>Ca.length&&Ca[Ca.length-1]===e,Yf="dx-swatch-",IH=e=>{var t=v(e),i=t.closest('[class^="'.concat(Yf,'"], [class*=" ').concat(Yf,'"]')),n=xa();if(!i.length)return n;var r=new RegExp("(\\s|^)(".concat(Yf,".*?)(\\s|$)")),a=i[0].className.match(r)[2],o=n.children("."+a);return o.length||(o=v("<div>").addClass(a).appendTo(n)),o};const iA={getSwatchContainer:IH};var TH=je(),nA={top:{my:"top center",at:"top center"},bottom:{my:"bottom center",at:"bottom center"},right:{my:"right center",at:"right center"},left:{my:"left center",at:"left center"},center:{my:"center",at:"center"},"right bottom":{my:"right bottom",at:"right bottom"},"right top":{my:"right top",at:"right top"},"left bottom":{my:"left bottom",at:"left bottom"},"left top":{my:"left top",at:"left top"}},AH={h:0,v:0};class Dg{constructor(t){var{position:i,container:n,visualContainer:r,$root:a,$content:o,$wrapper:s,onPositioned:l,onVisualPositionChanged:u,restorePosition:d,_fixWrapperPosition:c}=t;this._props={position:i,container:n,visualContainer:r,restorePosition:d,onPositioned:l,onVisualPositionChanged:u,_fixWrapperPosition:c},this._$root=a,this._$content=o,this._$wrapper=s,this._$markupContainer=void 0,this._$visualContainer=void 0,this._shouldRenderContentInitialPosition=!0,this._visualPosition=void 0,this._initialPosition=void 0,this._previousVisualPosition=void 0,this.updateContainer(n),this.updatePosition(i),this.updateVisualContainer(r)}get $container(){return this.updateContainer(),this._$markupContainer}get $visualContainer(){return this._$visualContainer}get position(){return this._position}set fixWrapperPosition(t){this._props._fixWrapperPosition=t,this.styleWrapperPosition()}set restorePosition(t){this._props.restorePosition=t}restorePositionOnNextRender(t){this._shouldRenderContentInitialPosition=t||!this._visualPosition}openingHandled(){var t=this._props.restorePosition;this.restorePositionOnNextRender(t)}updatePosition(t){this._props.position=t,this._position=this._normalizePosition(t),this.updateVisualContainer()}updateContainer(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.container;this._props.container=t,this._$markupContainer=t?v(t):iA.getSwatchContainer(this._$root),this.updateVisualContainer(this._props.visualContainer)}updateVisualContainer(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.visualContainer;this._props.visualContainer=t,this._$visualContainer=this._getVisualContainer()}detectVisualPositionChange(t){this._updateVisualPositionValue(),this._raisePositionedEvents(t)}positionContent(){this._shouldRenderContentInitialPosition?this._renderContentInitialPosition():(ri(this._$content,this._visualPosition),this.detectVisualPositionChange())}positionWrapper(){this._$visualContainer&&xi.setup(this._$wrapper,{my:"top left",at:"top left",of:this._$visualContainer})}styleWrapperPosition(){var t=Xt(this.$visualContainer.get(0))||this._props._fixWrapperPosition,i=t?"fixed":"absolute";this._$wrapper.css("position",i)}_updateVisualPositionValue(){this._previousVisualPosition=this._visualPosition,this._visualPosition=On(this._$content)}_renderContentInitialPosition(){this._renderBoundaryOffset(),Wu(this._$content);var t=this._$wrapper.css("overflow");this._$wrapper.css("overflow","hidden");var i=xi.setup(this._$content,this._position);this._$wrapper.css("overflow",t),this._initialPosition=i,this.detectVisualPositionChange()}_raisePositionedEvents(t){var i=this._previousVisualPosition,n=this._visualPosition,r=(i==null?void 0:i.top)!==n.top||(i==null?void 0:i.left)!==n.left;r&&this._props.onVisualPositionChanged({previousPosition:i,position:n,event:t}),this._props.onPositioned({position:this._initialPosition})}_renderBoundaryOffset(){var t,i=(t=this._position)!==null&&t!==void 0?t:{};this._$content.css("margin","".concat(i.v,"px ").concat(i.h,"px"))}_getVisualContainer(){var t,i,n=this._props.container,r=this._props.visualContainer,a=gM((t=this._props.position)===null||t===void 0?void 0:t.of)?this._props.position.of.target:(i=this._props.position)===null||i===void 0?void 0:i.of;return v(r||n||a||TH)}_normalizePosition(t){var i={boundaryOffset:AH};return E(t)?k(!0,{},i,this._positionToObject(t)):i}_positionToObject(t){return Ve(t)?k({},nA[t]):t}}var DH=_r.add,Qo=je(),a0=Vh,OH="dx-overlay",RH="dx-overlay-wrapper",kH="dx-overlay-content",BH="dx-overlay-shader",o0="dx-inner-overlay",s0="dx-state-invisible",LH="content",PH="dx-rtl",K_=[],Xf="dx-prevent-safari-scrolling",FH="tab";DH(()=>{R.subscribeGlobal(me.getDocument(),lt.down,e=>{for(var t=K_.length-1;t>=0;t--)if(!K_[t]._proxiedDocumentDownHandler(e))return})});var qn=_i.inherit({_supportedKeys:function(){return k(this.callBase(),{escape:function(){this.hide()}})},_getDefaultOptions:function(){return k(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",wrapperAttr:{},position:k({},nA.center),width:"80vw",minWidth:null,maxWidth:null,height:"80vh",minHeight:null,maxHeight:null,animation:{show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,to:{opacity:0,scale:.55},from:{opacity:1,scale:1}}},closeOnOutsideClick:!1,hideOnOutsideClick:!1,copyRootClassesToWrapper:!1,_ignoreCopyRootClassesToWrapperDeprecation:!1,onShowing:null,onShown:null,onHiding:null,onHidden:null,contentTemplate:"content",innerOverlay:!1,restorePosition:!0,container:void 0,visualContainer:void 0,hideTopOverlayHandler:()=>{this.hide()},hideOnParentScroll:!1,onPositioned:null,propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0,_fixWrapperPosition:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return!Ue()},options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{animation:!0})},$wrapper:function(){return this._$wrapper},_eventBindingTarget:function(){return this._$content},_setDeprecatedOptions(){this.callBase(),k(this._deprecatedOptions,{elementAttr:{since:"21.2",message:'Use the "wrapperAttr" option instead'},closeOnOutsideClick:{since:"22.1",alias:"hideOnOutsideClick"}})},ctor:function(e,t){this.callBase(e,t),t&&t.copyRootClassesToWrapper&&!t._ignoreCopyRootClassesToWrapperDeprecation&&xt.log("W0001",this.NAME,"copyRootClassesToWrapper","21.2",'Use the "wrapperAttr" option instead')},_init:function(){this.callBase(),this._initActions(),this._initHideOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._customWrapperClass=null,this._$wrapper=v("<div>").addClass(RH),this._$content=v("<div>").addClass(kH),this._initInnerOverlayClass();var e=this.$element();this.option("copyRootClassesToWrapper")&&this._$wrapper.addClass(e.attr("class")),e.addClass(OH),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler")),this._parentsScrollSubscriptionInfo={handler:t=>{this._hideOnParentsScrollHandler(t)}},this.warnPositionAsFunction()},warnPositionAsFunction(){Ie(this.option("position"))&&xt.log("W0018")},_initInnerOverlayClass:function(){this._$content.toggleClass(o0,this.option("innerOverlay"))},_initHideTopOverlayHandler:function(e){this._hideTopOverlayHandler=e},_getActionsList:function(){return["onShowing","onShown","onHiding","onHidden","onPositioned","onVisualPositionChanged"]},_initActions:function(){this._actions={};var e=this._getActionsList();V(e,(t,i)=>{this._actions[i]=this._createActionByOption(i,{excludeValidators:["disabled","readOnly"]})||re})},_initHideOnOutsideClickHandler:function(){var e=this;this._proxiedDocumentDownHandler=function(){return e._documentDownHandler(...arguments)}},_areContentDimensionsRendered:function(e){var t,i,n,r=(t=e.contentBoxSize)===null||t===void 0?void 0:t[0];if(r){var a,o;return parseInt(r.inlineSize,10)===((a=this._renderedDimensions)===null||a===void 0?void 0:a.width)&&parseInt(r.blockSize,10)===((o=this._renderedDimensions)===null||o===void 0?void 0:o.height)}var s=e.contentRect;return parseInt(s.width,10)===((i=this._renderedDimensions)===null||i===void 0?void 0:i.width)&&parseInt(s.height,10)===((n=this._renderedDimensions)===null||n===void 0?void 0:n.height)},_initMarkup(){this.callBase(),this._renderWrapperAttributes(),this._initPositionController()},_documentDownHandler:function(e){this._showAnimationProcessing&&this._stopAnimation();var t=v(Qo.document).is(e.target)||ma(Qo.document,e.target),i=v(e.target).closest(".".concat(o0)).length,n=t&&!i&&!(this._$content.is(e.target)||ma(this._$content.get(0),e.target));return n&&this._shouldHideOnOutsideClick(e)&&this._outsideClickHandler(e),this.option("propagateOutsideClick")},_shouldHideOnOutsideClick:function(e){var{hideOnOutsideClick:t}=this.option();return Ie(t)?t(e):t},_outsideClickHandler(e){this.option("shading")&&e.preventDefault(),this.hide()},_getAnonymousTemplateName:function(){return LH},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new lo}),this.callBase()},_isTopOverlay:function(){for(var e=this._overlayStack(),t=e.length-1;t>=0;t--){var i=e[t]._findTabbableBounds();if(i.first||i.last)return e[t]===this}return!1},_overlayStack:function(){return K_},_zIndexInitValue:function(){return qn.baseZIndex()},_toggleViewPortSubscription:function(e){var t=this;a0.remove(this._viewPortChangeHandle),e&&(this._viewPortChangeHandle=function(){t._viewPortChangeHandler(...arguments)},a0.add(this._viewPortChangeHandle))},_viewPortChangeHandler:function(){this._positionController.updateContainer(this.option("container")),this._refresh()},_renderWrapperAttributes(){var{wrapperAttr:e}=this.option(),t=k({},e),i=t.class;delete t.class,this.$wrapper().attr(t).removeClass(this._customWrapperClass).addClass(i),this._customWrapperClass=i},_renderVisibilityAnimate:function(e){return this._stopAnimation(),e?this._show():this._hide()},_getAnimationConfig:function(){return this._getOptionValue("animation",this)},_animateShowing:function(){var e,t,i,n=this,r=(e=this._getAnimationConfig())!==null&&e!==void 0?e:{},a=this._normalizeAnimation(r.show,"to"),o=(t=a==null?void 0:a.start)!==null&&t!==void 0?t:re,s=(i=a==null?void 0:a.complete)!==null&&i!==void 0?i:re;this._animate(a,function(){if(!n._isAnimationPaused){n.option("focusStateEnabled")&&R.trigger(n._focusTarget(),"focus");for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];s.call(n,...u),n._showAnimationProcessing=!1,n._isHidden=!1,n._actions.onShown(),n._toggleSafariScrolling(),n._showingDeferred.resolve()}},function(){if(!n._isAnimationPaused){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];o.call(n,...u),n._showAnimationProcessing=!0}})},_show:function(){if(this._showingDeferred=new se,this._parentHidden=this._isParentHidden(),this._showingDeferred.done(()=>{delete this._parentHidden}),this._parentHidden)return this._isHidden=!0,this._showingDeferred.resolve();if(this._currentVisible)return new se().resolve().promise();if(this._currentVisible=!0,this._isHidingActionCanceled)delete this._isHidingActionCanceled,this._showingDeferred.resolve();else{var e=()=>{if(this._renderVisibility(!0),this._isShowingActionCanceled){delete this._isShowingActionCanceled,this._showingDeferred.resolve();return}this._animateShowing()};this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(e)):e()}return this._showingDeferred.promise()},_normalizeAnimation:function(e,t){return e&&(e=k({type:"slide",skipElementInitialStyles:!0},e),$e(e[t])&&k(e[t],{position:this._positionController.position})),e},_animateHiding:function(){var e,t,i,n=this,r=(e=this._getAnimationConfig())!==null&&e!==void 0?e:{},a=this._normalizeAnimation(r.hide,"from"),o=(t=a==null?void 0:a.start)!==null&&t!==void 0?t:re,s=(i=a==null?void 0:a.complete)!==null&&i!==void 0?i:re;this._animate(a,function(){var l;n._$content.css("pointerEvents",""),n._renderVisibility(!1);for(var u=arguments.length,d=new Array(u),c=0;c<u;c++)d[c]=arguments[c];s.call(n,...d),n._hideAnimationProcessing=!1,(l=n._actions)===null||l===void 0||l.onHidden(),n._hidingDeferred.resolve()},function(){n._$content.css("pointerEvents","none");for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];o.call(n,...u),n._hideAnimationProcessing=!0})},_hide:function(){if(!this._currentVisible)return new se().resolve().promise();this._currentVisible=!1,this._hidingDeferred=new se;var e={cancel:!1};return this._isShowingActionCanceled?this._hidingDeferred.resolve():(this._actions.onHiding(e),this._toggleSafariScrolling(),e.cancel?(this._isHidingActionCanceled=!0,this.option("visible",!0),this._hidingDeferred.resolve()):(this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animateHiding())),this._hidingDeferred.promise()},_forceFocusLost:function(){var e=me.getActiveElement(),t=!!this._$content.find(e).length;t&&Zs()},_animate:function(e,t,i){e?(i=i||e.start||re,zt.animate(this._$content,k({},e,{start:i,complete:t}))):t()},_stopAnimation:function(){zt.stop(this._$content,!0)},_renderVisibility:function(e){if(!(e&&this._isParentHidden())){if(this._currentVisible=e,this._stopAnimation(),e||eN(this._$content),this._toggleVisibility(e),this._$content.toggleClass(s0,!e),this._updateZIndexStackPosition(e),e){this._positionController.openingHandled(),this._renderContent();var t={cancel:!1};if(this._actions.onShowing(t),t.cancel){this._toggleVisibility(!1),this._$content.toggleClass(s0,!0),this._updateZIndexStackPosition(!1),this._moveFromContainer(),this._isShowingActionCanceled=!0,this.option("visible",!1);return}this._moveToContainer(),this._renderGeometry(),Jc(this._$content),lr(this._$content)}else this._moveFromContainer();this._toggleShading(e),this._toggleSubscriptions(e)}},_updateZIndexStackPosition:function(e){var t=this._overlayStack(),i=t.indexOf(this);e?(i===-1&&(this._zIndex=tA(this._zIndexInitValue()),t.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):i!==-1&&(t.splice(i,1),U_(this._zIndex))},_toggleShading:function(e){this._$wrapper.toggleClass(BH,e&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(e&&this.option("shading"))},_initTabTerminatorHandler:function(){var e=this;this._proxiedTabTerminatorHandler=function(){e._tabKeyHandler(...arguments)}},_toggleTabTerminator:function(e){var t=ye("keydown",this.NAME);e?R.on(me.getDocument(),t,this._proxiedTabTerminatorHandler):R.off(me.getDocument(),t,this._proxiedTabTerminatorHandler)},_findTabbableBounds:function(){for(var e=this._$wrapper.find("*"),t=e.length-1,i={first:null,last:null},n=0;n<=t&&(!i.first&&e.eq(n).is(Iy)&&(i.first=e.eq(n)),!i.last&&e.eq(t-n).is(Iy)&&(i.last=e.eq(t-n)),!(i.first&&i.last));n++);return i},_tabKeyHandler:function(e){if(!($t(e)!==FH||!this._isTopOverlay())){var t=this._findTabbableBounds(),i=t.first,n=t.last,r=!e.shiftKey&&e.target===n.get(0),a=e.shiftKey&&e.target===i.get(0),o=t.length===0,s=!ma(this._$wrapper.get(0),e.target);if(r||a||o||s){e.preventDefault();var l=e.shiftKey?n:i;R.trigger(l,"focusin"),R.trigger(l,"focus")}}},_toggleSubscriptions:function(e){Ue()&&(this._toggleHideTopOverlayCallback(e),this._toggleHideOnParentsScrollSubscription(e))},_toggleHideTopOverlayCallback:function(e){this._hideTopOverlayHandler&&(e?r0.add(this._hideTopOverlayHandler):r0.remove(this._hideTopOverlayHandler))},_toggleHideOnParentsScrollSubscription:function(e){var t,i=ye("scroll",this.NAME),{prevTargets:n,handler:r}=(t=this._parentsScrollSubscriptionInfo)!==null&&t!==void 0?t:{};R.off(n,i,r);var a=this.option("hideOnParentScroll");if(e&&a){var o=this._hideOnParentScrollTarget().parents();Re.real().deviceType==="desktop"&&(o=o.add(Qo)),R.on(o,i,r),this._parentsScrollSubscriptionInfo.prevTargets=o}},_hideOnParentsScrollHandler:function(e){var t=!1,i=this.option("hideOnParentScroll");Ie(i)&&(t=i(e)),!t&&!this._showAnimationProcessing&&this.hide()},_hideOnParentScrollTarget:function(){return this._$wrapper},_render:function(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement:function(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent:function(){var e=!this._currentVisible&&this.option("deferRendering"),t=this.option("visible")&&this._isParentHidden();if(t){this._isHidden=!0;return}this._contentAlreadyRendered||e||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden:function(){if(!this.option("_checkParentVisibility"))return!1;if(this._parentHidden!==void 0)return this._parentHidden;var e=this.$element().parent();if(e.is(":visible"))return!1;var t=!1;return e.add(e.parents()).each(function(){var i=v(this);if(i.css("display")==="none")return t=!0,!1}),t||!me.getBody().contains(e.get(0))},_renderContentImpl:function(){var e=new se,t=this.option("contentTemplate"),i=this._getTemplate(t),n=this._templateManager.anonymousTemplateName===t;return i&&i.render({container:Me(this.$content()),noModel:!0,transclude:n,onRendered:()=>{e.resolve()}}),this._renderScrollTerminator(),e.done(()=>{this.option("visible")&&this._moveToContainer()}),e.promise()},_getPositionControllerConfig(){var{container:e,visualContainer:t,_fixWrapperPosition:i,restorePosition:n}=this.option();return{container:e,visualContainer:t,$root:this.$element(),$content:this._$content,$wrapper:this._$wrapper,onPositioned:this._actions.onPositioned,onVisualPositionChanged:this._actions.onVisualPositionChanged,restorePosition:n,_fixWrapperPosition:i}},_initPositionController(){this._positionController=new Dg(this._getPositionControllerConfig())},_renderScrollTerminator:function(){var e=this._$wrapper,t=ye(Sa,this.NAME);R.off(e,t),R.on(e,t,{validate:function(){return!0},getDirection:function(){return"both"},_toggleGestureCover:function(i){i||this._toggleGestureCoverImpl(i)},_clearSelection:re,isNative:!0},i=>{var n=i.originalEvent.originalEvent,{type:r}=n||{},a=r==="wheel",o=r==="mousemove",s=a&&!vi(i);i._cancelPreventDefault=!0,n&&i.cancelable!==!1&&(!o&&!a||s)&&i.preventDefault()})},_moveFromContainer:function(){this._$content.appendTo(this.$element()),this._detachWrapperToContainer()},_detachWrapperToContainer:function(){this._$wrapper.detach()},_moveToContainer:function(){this._$wrapper.appendTo(this._positionController.$container),this._$content.appendTo(this._$wrapper)},_renderGeometry:function(e){var{visible:t}=this.option();t&&Ue()&&this._renderGeometryImpl()},_renderGeometryImpl:function(){this._positionController.updatePosition(this._getOptionValue("position")),this._renderWrapper(),this._renderDimensions(),this._renderPosition()},_renderPosition(){this._positionController.positionContent()},_isAllWindowCovered:function(){return Xt(this._positionController.$visualContainer.get(0))&&this.option("shading")},_toggleSafariScrolling:function(){var e=this.option("visible"),t=v(me.getBody()),i=Re.real().platform==="ios"&&Lt.safari,n=this._isAllWindowCovered(),r=t.hasClass(Xf),a=!r&&e&&n,o=r&&(!e||!n||this._disposed);i&&(o?(t.removeClass(Xf),Qo.scrollTo(0,this._cachedBodyScrollTop),this._cachedBodyScrollTop=void 0):a&&(this._cachedBodyScrollTop=Qo.pageYOffset,t.addClass(Xf)))},_renderWrapper:function(){this._positionController.styleWrapperPosition(),this._renderWrapperDimensions(),this._positionController.positionWrapper()},_renderWrapperDimensions:function(){var e=this._positionController.$visualContainer,t=me.getDocumentElement(),i=Xt(e.get(0)),n=i?t.clientWidth:ot(e),r=i?Qo.innerHeight:nt(e);this._$wrapper.css({width:n,height:r})},_renderDimensions:function(){var e=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",e),maxWidth:this._getOptionValue("maxWidth",e),minHeight:this._getOptionValue("minHeight",e),maxHeight:this._getOptionValue("maxHeight",e),width:this._getOptionValue("width",e),height:this._getOptionValue("height",e)})},_focusTarget:function(){return this._$content},_attachKeyboardEvents:function(){this._keyboardListenerId=ga.on(this._$content,null,e=>this._keyboardHandler(e))},_keyboardHandler:function(e){var t=e.originalEvent,i=v(t.target);(i.is(this._$content)||!this.option("ignoreChildEvents"))&&this.callBase(...arguments)},_isVisible:function(){return this.option("visible")},_visibilityChanged:function(e){e?this.option("visible")&&this._renderVisibilityAnimate(e):this._renderVisibilityAnimate(e)},_dimensionChanged:function(){this._renderGeometry()},_clean:function(){var e=this.option();!this._contentAlreadyRendered&&!e.isRenovated&&this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose:function(){zt.stop(this._$content,!1),clearTimeout(this._deferShowTimer),this._toggleViewPortSubscription(!1),this._toggleSubscriptions(!1),this._updateZIndexStackPosition(!1),this._toggleTabTerminator(!1),this._actions=null,this._parentsScrollSubscriptionInfo=null,this.callBase(),this._toggleSafariScrolling(),this.option("visible")&&U_(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleRTLDirection:function(e){this._$content.toggleClass(PH,e)},_optionChanged:function(e){var t=e.value;if(this._getActionsList().includes(e.name)){this._initActions();return}switch(e.name){case"animation":break;case"shading":this._toggleShading(this.option("visible")),this._toggleSafariScrolling();break;case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":this._renderGeometry();break;case"minWidth":case"maxWidth":case"minHeight":case"maxHeight":this._renderGeometry();break;case"position":this._positionController.updatePosition(this.option("position")),this._positionController.restorePositionOnNextRender(!0),this._renderGeometry(),this._toggleSafariScrolling();break;case"visible":this._renderVisibilityAnimate(t).done(()=>{this._animateDeferred&&this._animateDeferred.resolveWith(this)});break;case"container":this._positionController.updateContainer(t),this._invalidate(),this._toggleSafariScrolling();break;case"visualContainer":this._positionController.updateVisualContainer(t),this._renderWrapper(),this._toggleSafariScrolling();break;case"innerOverlay":this._initInnerOverlayClass();break;case"deferRendering":case"contentTemplate":this._contentAlreadyRendered=!1,this._clean(),this._invalidate();break;case"hideTopOverlayHandler":this._toggleHideTopOverlayCallback(!1),this._initHideTopOverlayHandler(e.value),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"hideOnParentScroll":this._toggleHideOnParentsScrollSubscription(this.option("visible"));break;case"closeOnOutsideClick":case"hideOnOutsideClick":case"propagateOutsideClick":break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(e);break;case"_fixWrapperPosition":this._positionController.fixWrapperPosition=t;break;case"wrapperAttr":this._renderWrapperAttributes();break;case"restorePosition":this._positionController.restorePosition=e.value;break;default:this.callBase(e)}},toggle:function(e){e=e===void 0?!this.option("visible"):e;var t=new se;if(e===this.option("visible"))return t.resolveWith(this,[e]).promise();var i=new se;return this._animateDeferred=i,this.option("visible",e),i.promise().done(()=>{delete this._animateDeferred,t.resolveWith(this,[this.option("visible")])}),t.promise()},$content:function(){return this._$content},show:function(){return this.toggle(!0)},hide:function(){return this.toggle(!1)},content:function(){return Me(this._$content)},repaint:function(){this._contentAlreadyRendered?(this._positionController.restorePositionOnNextRender(!0),this._renderGeometry({forceStopAnimation:!0}),lr(this._$content)):this.callBase()}});qn.baseZIndex=e=>EH(e);tt("dxOverlay",qn);var MH="dx-loadpanel",VH="dx-loadpanel-wrapper",l0="dx-loadpanel-indicator",u0="dx-loadpanel-message",NH="dx-loadpanel-content",$H="dx-loadpanel-content-wrapper",HH="dx-loadpanel-pane-hidden",Og=qn.inherit({_supportedKeys:function(){return k(this.callBase(),{escape:re})},_getDefaultOptions:function(){return k(this.callBase(),{message:fe.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,focusStateEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:function(){return ei()},options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}}])},_init:function(){this.callBase.apply(this,arguments)},_render:function(){this.callBase(),this.$element().addClass(MH),this.$wrapper().addClass(VH)},_renderContentImpl:function(){this.callBase(),this.$content().addClass(NH),this._$loadPanelContentWrapper=v("<div>").addClass($H),this._$loadPanelContentWrapper.appendTo(this.$content()),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show:function(){var e=this.option("delay");if(!e)return this.callBase();var t=new se,i=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout(function(){i().done(function(){t.resolve()})},e),t.promise()},_hide:function(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout:function(){clearTimeout(this._showTimeout)},_renderMessage:function(){if(this._$loadPanelContentWrapper){var e=this.option("message");if(e){var t=v("<div>").addClass(u0).text(e);this._$loadPanelContentWrapper.append(t)}}},_renderLoadIndicator:function(){!this._$loadPanelContentWrapper||!this.option("showIndicator")||(this._$indicator||(this._$indicator=v("<div>").addClass(l0).appendTo(this._$loadPanelContentWrapper)),this._createComponent(this._$indicator,vn,{indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent:function(){this.$content().find("."+u0).remove(),this.$content().find("."+l0).remove(),delete this._$indicator},_togglePaneVisible:function(){this.$content().toggleClass(HH,!this.option("showPane"))},_optionChanged:function(e){switch(e.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._renderLoadIndicator();break;default:this.callBase(e)}},_dispose:function(){this._clearShowTimeout(),this.callBase()}});tt("dxLoadPanel",Og);var WH=_r.add,rA="DEVEXTREME_XHR_ERROR_UNLOAD",zH=function(e){return[e[0],e.length<3?"=":String(e[1]).toLowerCase(),e.length<2?!0:e[e.length-1]]},jr=function(e){return Array.isArray(e)||(e=[e]),ti(e,function(t){var i={selector:Ie(t)||typeof t=="string"?t:t.getter||t.field||t.selector,desc:!!(t.desc||String(t.dir).charAt(0).toLowerCase()==="d")};return t.compare&&(i.compare=t.compare),i})},GH=function(){var e={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"},t;return WH(function(){var i=je();me.listen(i,"beforeunload",function(){t=!0})}),function(i,n){return t?rA:i.status<400?function(r){var a=e[r];return a||r}(n):i.statusText}}(),Rg={count:{seed:0,step:function(e){return 1+e}},sum:{seed:0,step:function(e,t){return e+t}},min:{step:function(e,t){return t<e?t:e}},max:{step:function(e,t){return t>e?t:e}},avg:{seed:[0,0],step:function(e,t){return[e[0]+t,e[1]+1]},finalize:function(e){return e[1]?e[0]/e[1]:NaN}}},UH=function(){var e=0,t;return{obtain:function(){e===0&&(t=new se),e++},release:function(){e--,e<1&&t.resolve()},promise:function(){var i=e===0?new se().resolve():t;return i.promise()},reset:function(){e=0,t&&t.resolve()}}}();function KH(e){return/^(and|&&|&)$/i.test(e)}var Gu=function(e,t,i){if(Array.isArray(e)){for(var n=ti(t,function(o,s){return s}),r,a=0;a<n.length;a++)if(r=n[a],!Bt(t[r],i[r],0,!1))return!1;return!0}return Bt(t,i,0,!1)},jH=function(e){return e[0]==="!"&&Array.isArray(e[1])},qH=function(e){return e==="and"||e==="or"},YH=function(e){var t=e[0],i=e[1];return!!(Array.isArray(t)||Ie(t)&&(Array.isArray(i)||Ie(i)||qH(i)))},Os=function(){var e=new se;return e.resolve.apply(e,arguments).promise()},aA=function(){var e=new se;return e.reject.apply(e,arguments).promise()};function XH(e,t){var i,n;return function(){return n=arguments,i||(i=setTimeout(()=>{i=void 0,n&&e.call(this,n)},Ie(t)?t():t)),i}}function ZH(e,t){var i=[],n=XH(function(){e.call(this,i),i=[]},t);return function(r){return Array.isArray(r)&&i.push(...r),n.call(this,i)}}var $l=["millisecond","second","minute","hour","day","week","month","quarter","year"],kg=function e(t){switch(t){case"millisecond":return 1;case"second":return 1e3*e("millisecond");case"minute":return 60*e("second");case"hour":return 60*e("minute");case"day":return 24*e("hour");case"week":return 7*e("day");case"month":return 30*e("day");case"quarter":return 3*e("month");case"year":return 365*e("day");default:return 0}},JH=function(e,t,i){var n=t.getTime()-e.getTime(),r=kg(i)||1;return Math.floor(n/r)},QH=function(e,t){var i=qh(e);switch(i){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return t?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},oA=function(e){var t,i,n,r=["millisecond","second","minute","hour","day","month","year"],a={};for(t=r.length-1;t>=0;t--)n=r[t],i=Math.floor(e/kg(n)),i>0&&(a[n+"s"]=i,e-=ah(n,i));return a},e2=function(e){var t=0;return $e(e)&&V(e,function(i,n){t+=ah(i.substr(0,i.length-1),n)}),Ve(e)&&(t=ah(e,1)),t};function ah(e,t){return kg(e)*t}function qh(e){var t=-1,i;return Ve(e)?e:$e(e)?(V(e,function(n,r){for(i=0;i<$l.length;i++)r&&(n===$l[i]+"s"||n===$l[i])&&t<i&&(t=i)}),$l[t]):""}var t2={millisecond:"millisecond",second:"longtime",minute:"shorttime",hour:"shorttime",day:"day",week:"day",month:"month",quarter:"quarter",year:"year"};function i2(e){return t2[qh(e)]||""}var sA=function(e){return Math.floor(e/3)},lA=function(e){return 3*sA(e)};function uA(e,t,i,n){e=new Date(e.getTime());var r=new Date(e.getTime()),a,o,s=qh(t);switch(s){case"second":e=new Date(1e3*Math.floor(r.getTime()/1e3));break;case"minute":e=new Date(6e4*Math.floor(r.getTime()/6e4));break;case"hour":e=new Date(36e5*Math.floor(r.getTime()/36e5));break;case"year":e.setMonth(0);case"month":e.setDate(1);case"day":e.setHours(0,0,0,0);break;case"week":e=vA(e,n||0),e.setHours(0,0,0,0);break;case"quarter":a=lA(e.getMonth()),o=e.getMonth(),e.setDate(1),e.setHours(0,0,0,0),o!==a&&e.setMonth(a)}return i&&s!=="hour"&&s!=="minute"&&s!=="second"&&mA(r,e),e}function dA(e){return uA(e,"day")}var n2=function(e){var t=dA(e);return t.setDate(t.getDate()+1),new Date(t.getTime()-1)},r2=function(e,t){var i=0,n={year:e.getFullYear()!==t.getFullYear(),month:e.getMonth()!==t.getMonth(),day:e.getDate()!==t.getDate(),hour:e.getHours()!==t.getHours(),minute:e.getMinutes()!==t.getMinutes(),second:e.getSeconds()!==t.getSeconds(),millisecond:e.getMilliseconds()!==t.getMilliseconds()};return V(n,function(r,a){a&&i++}),i===0&&gA(e,t)!==0&&(n.hour=!0,i++),n.count=i,n};function cA(e,t,i){var n=new Date(e.getTime()),r=Ve(t)?fA(t.toLowerCase()):Et(t)?oA(t):t;return r.years&&n.setFullYear(n.getFullYear()+r.years*i),r.quarters&&n.setMonth(n.getMonth()+3*r.quarters*i),r.months&&n.setMonth(n.getMonth()+r.months*i),r.weeks&&n.setDate(n.getDate()+7*r.weeks*i),r.days&&n.setDate(n.getDate()+r.days*i),r.hours&&n.setTime(n.getTime()+36e5*r.hours*i),r.minutes&&n.setTime(n.getTime()+6e4*r.minutes*i),r.seconds&&n.setTime(n.getTime()+1e3*r.seconds*i),r.milliseconds&&n.setTime(n.getTime()+r.milliseconds*i),n}var hA=function(e,t,i){var n=i?-1:1;return Wi(e)?cA(e,t,n):eA(e+t*n,t)},a2=function(e,t,i){var n=[],r;for(n.push(Wi(e)?new Date(e.getTime()):e),r=e;r<t;)r=hA(r,i),n.push(r);return n},o2=function(e,t){if(e==="month")return pn(t.getFullYear(),t.getMonth(),1);if(e==="year")return pn(t.getFullYear(),0,t.getDate());if(e==="decade")return pn(Ku(t),t.getMonth(),t.getDate());if(e==="century")return pn(Uu(t),t.getMonth(),t.getDate())},s2=function(e,t){if(e==="month")return pn(t.getFullYear(),t.getMonth(),oh(t));if(e==="year")return pn(t.getFullYear(),11,t.getDate());if(e==="decade")return pn(Ku(t)+9,t.getMonth(),t.getDate());if(e==="century")return pn(Uu(t)+90,t.getMonth(),t.getDate())},l2=function(e,t){var i=pn(t.getFullYear(),t.getMonth(),1);return e==="month"||(i.setMonth(0),e==="year")||(e==="decade"&&i.setFullYear(Ku(t)),e==="century"&&i.setFullYear(Uu(t))),i},u2=function(e,t){var i=new Date(t);return i.setDate(oh(t)),e==="month"||(i.setMonth(11),i.setDate(oh(i)),e==="year")||(e==="decade"&&i.setFullYear(Ku(t)+9),e==="century"&&i.setFullYear(Uu(t)+99)),i};function oh(e){var t=pn(e.getFullYear(),e.getMonth()+1,0);return t.getDate()}var d2=function(e){switch(e){case"month":return"year";case"year":return"decade";case"decade":return"century"}},c2=function(e){switch(e){case"century":return"decade";case"decade":return"year";case"year":return"month"}},h2=function(e){var t=1;return e==="year"&&(t=12),e==="decade"&&(t=120),e==="century"&&(t=1200),t},f2=function(e){var t=1;return e==="decade"&&(t=12),e==="century"&&(t=120),t};function fA(e){var t={};switch(e){case"year":t.years=1;break;case"month":t.months=1;break;case"quarter":t.months=3;break;case"week":t.weeks=1;break;case"day":t.days=1;break;case"hour":t.hours=1;break;case"minute":t.minutes=1;break;case"second":t.seconds=1;break;case"millisecond":t.milliseconds=1}return t}function p2(e,t){return j_(e,t)&&e.getDate()===t.getDate()}function j_(e,t){return pA(e,t)&&e.getMonth()===t.getMonth()}function pA(e,t){return e&&t&&e.getFullYear()===t.getFullYear()}var v2=function(e,t){if(!(!E(e)||!E(t))){var i=e.getFullYear()-e.getFullYear()%10,n=t.getFullYear()-t.getFullYear()%10;return e&&t&&i===n}},_2=function(e,t){if(!(!E(e)||!E(t))){var i=e.getFullYear()-e.getFullYear()%100,n=t.getFullYear()-t.getFullYear()%100;return e&&t&&i===n}};function Uu(e){return e&&e.getFullYear()-e.getFullYear()%100}function Ku(e){return e&&e.getFullYear()-e.getFullYear()%10}var m2=function(){return"yyyy/MM/dd"},g2=function(e){if(E(e))return pn(e.getFullYear(),e.getMonth(),1)},C2=function(e){if(E(e))return pn(e.getFullYear(),e.getMonth()+1,0)};function vA(e,t){var i=(e.getDay()-t+7)%7,n=new Date(e);return n.setDate(e.getDate()-i),n}var y2=function(e,t){var i=Fe.getDatesInterval(e,t,"day"),n=new Date(e);return i>=6&&(n=new Date(n.setDate(n.getDate()+7))),n},x2=function(e,t,i,n){return n==="date"&&(t=t&&Fe.correctDateWithUnitBeginning(t,"day"),i=i&&Fe.correctDateWithUnitBeginning(i,"day"),e=e&&Fe.correctDateWithUnitBeginning(e,"day")),_A(e,t,i)===e},b2=function(e){var{firstMin:t,firstMax:i,secondMin:n,secondMax:r}=e;return t<=n&&n<=i||t>n&&t<r||t<r&&i>r},S2=function(e){var t=Math.floor(e),i=e%1*60;return{hours:t,minutes:i}},E2=function(e,t){var i=this.dateTimeFromDecimal(t),n=new Date(e);return(e.getHours()===i.hours&&e.getMinutes()<i.minutes||e.getHours()<i.hours)&&n.setHours(i.hours,i.minutes,0,0),n};function _A(e,t,i){var n=e;return E(e)?(E(t)&&e<t&&(n=t),E(i)&&e>i&&(n=i),n):e}function mA(e,t){if(E(e)){var i=t.getHours()-e.getHours();if(i!==0){var n=i===1||i===-23?-1:1,r=new Date(t.getTime()+36e5*n);(n>0||r.getDate()===t.getDate())&&t.setTime(r.getTime())}}}var w2=function(e){var t=new Date(e.getTime());return t.setHours(t.getHours()+1),t.setMinutes(0),t};function gA(e,t){return 60*(t.getTimezoneOffset()-e.getTimezoneOffset())*1e3}var I2=function(e){return new Date(e)},T2=function(e,t,i){for(var n=[],r=new Date(e.getTime());r<t;)n.push(new Date(r.getTime())),r=this.addInterval(r,i);return n},pn=function(e){var t=new Date(...arguments);return t.setFullYear(e),t},Fe={dateUnitIntervals:$l,convertMillisecondsToDateUnits:oA,dateToMilliseconds:e2,getNextDateUnit:QH,convertDateUnitToMilliseconds:ah,getDateUnitInterval:qh,getDateFormatByTickInterval:i2,getDatesDifferences:r2,correctDateWithUnitBeginning:uA,trimTime:dA,setToDayEnd:n2,roundDateByStartDayHour:E2,dateTimeFromDecimal:S2,addDateInterval:cA,addInterval:hA,getSequenceByInterval:a2,getDateIntervalByString:fA,sameDate:p2,sameMonthAndYear:j_,sameMonth:j_,sameYear:pA,sameDecade:v2,sameCentury:_2,getDifferenceInMonth:h2,getDifferenceInMonthForCells:f2,getFirstYearInDecade:Ku,getFirstDecadeInCentury:Uu,getShortDateFormat:m2,getViewFirstCellDate:o2,getViewLastCellDate:s2,getViewDown:c2,getViewUp:d2,getLastMonthDay:oh,getLastMonthDate:C2,getFirstMonthDate:g2,getFirstWeekDate:vA,normalizeDateByWeek:y2,getQuarter:sA,getFirstQuarterMonth:lA,dateInRange:x2,intervalsOverlap:b2,roundToHour:w2,normalizeDate:_A,getViewMinBoundaryDate:l2,getViewMaxBoundaryDate:u2,fixTimezoneGap:mA,getTimezonesDifference:gA,makeDate:I2,getDatesInterval:JH,getDatesOfInterval:T2,createDateWithFullYear:pn};Fe.sameView=function(e,t,i){return Fe[qc("same "+e)](t,i)};var Zf=10;function A2(e){var t=Hs(e);return t*Math.round(Math.abs(e))}function D2(e,t){var i=Math.pow(Zf,t),n=i*Zf,r=e*n/Zf;return A2(r)/i}function CA(e,t){var i=t||0,n=i>0?D2(...arguments):e;return n.toFixed(i)}var O2={thousandsSeparator:",",decimalSeparator:"."},d0="'",R2=15;function k2(e){return e.split(",").slice(1).map(function(t){var i=0;return t.split("").filter(function(n,r){i+=n==="'";var a=n==="#"||n==="0",o=i%2;return a&&!o}).length})}function B2(e){var t=e.split(";");return t.length===1&&t.push("-"+t[0]),t}function Jf(e){return e.toString().split("").reverse().join("")}function L2(e){return e.indexOf("%")!==-1&&!e.match(/'[^']*%[^']*'/g)}function yA(e){return e.replace(/'.+'/g,"")}function c0(e){if(!e)return 0;var t=yA(e);return t.length-t.replace(/[#]/g,"").length}function h0(e){if(!e)return 0;var t=yA(e);return t.length-t.replace(/[0]/g,"").length}function f0(e,t,i){if(!e)return"";for(e.length>i&&(e=e.substr(0,i));e.length>t&&e.slice(-1)==="0";)e=e.substr(0,e.length-1);for(;e.length<t;)e+="0";return e}function P2(e,t,i){if(!t.length)return e;for(var n=[],r=0;e;){var a=t[r];if(!a)break;n.push(e.slice(0,a)),e=e.slice(a),r<t.length-1&&r++}return n.join(i)}function p0(e,t){return e.split(d0).map(function(i,n){var r=n%2;return!i&&r?d0:r?i:i.replace(/[,#0]+/,t)}).join("")}function F2(e){for(var t=!1,i=0;i<e.length;i++)if(e[i]==="'"&&(t=!t),e[i]==="."&&!t)return i;return e.length}function M2(e,t){return t=t||O2,function(i){if(typeof i!="number"||isNaN(i))return"";var n=B2(e),r=1/i===1/0,a=i>0||r,o=n[a?0:1];L2(o)&&(i*=100),a||(i=-i);var s=F2(o),l=[o.substr(0,s),o.substr(s+1)],u=h0(l[1]),d=u+c0(l[1]),c=h0(l[0]),h=c0(l[0])||t.unlimitedIntegerDigits?void 0:c,f=Math.floor(i).toString().length,p=ki(d,0,R2-f),m=k2(l[0]).reverse(),g=CA(i,p<0?0:p).split("."),C=f0(Jf(g[0]),c,h),b=f0(g[1],u,d);C=P2(C,m,t.thousandsSeparator);var A=Jf(p0(Jf(l[0]),C)),B=d?p0(l[1],b):"",D=A+(B.match(/\d/)?t.decimalSeparator:"")+B;return D}}function eu(e,t,i){var n=(t?.01:1)*parseFloat(e)||0;return i?-n:n}function v0(e,t,i,n){var r=e,a,o,s;do s&&(a=o.length===s.length?"0":"1",e=n?a+e:e+a),o=s||t(eu(r,i)),r=n?"1"+r:r+"1",s=t(eu(r,i));while(o!==s&&(n?o.length===s.length:o.length<=s.length));if(n&&s.length>o.length){var l=t(12345).indexOf("12345")===-1;do e="1"+e;while(l&&eu(e,i)<1e5)}return e}function _0(e,t,i,n){var r=t(eu(e,i,n)),a=e.split("."),o=a[0]+".3"+a[1].slice(1),s=eu(o,i,n),l=t(s).indexOf("3")-1;return r=r.replace(/(\d)\D(\d)/g,"$1,$2"),l>=0&&(r=r.slice(0,l)+"."+r.slice(l+1)),r=r.replace(/1+/,"1").replace(/1/g,"#"),i||(r=r.replace("%","'%'")),r}function V2(e){var t=".",i=e(1).indexOf("100")>=0;t=v0(t,e,i,!0),t=v0(t,e,i,!1);var n=_0(t,e,i,!1),r=_0(t,e,i,!0);return r==="-"+n?n:n+";"+r}const N2={_formatNumberCore:function(e,t,i){if(t==="currency"){i.precision=i.precision||0;var n=this.format(e,k({},i,{type:"fixedpoint"})),r=this.getCurrencySymbol().symbol.replace(/\$/g,"$$$$");return n=n.replace(/^(\D*)(\d.*)/,"$1"+r+"$2"),n}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}},$2=(e,t)=>{if(t){var i=e;if(typeof e=="string"){i="";for(var n=0;n<e.length;n++)e[n]!=="$"&&(i+="\\"),i+=e[n]}for(var r={".00":"{0}","'":"\\'","\\(":"\\(","\\)":"\\)"," ":"\\ ",'"':"&quot;","\\¤":i},a=t.split(";"),o=0;o<a.length;o++)for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[o]=a[o].replace(new RegExp(s,"g"),r[s]));return a.length===2?a[0]+"_);"+a[1]:a[0]}},H2={af:"¤#,##0.00;(¤#,##0.00)","af-NA":"¤#,##0.00;(¤#,##0.00)",agq:"#,##0.00¤",ak:"¤#,##0.00",am:"¤#,##0.00;(¤#,##0.00)",ar:"¤#,##0.00;(¤#,##0.00)","ar-AE":"¤#,##0.00;(¤#,##0.00)","ar-BH":"¤#,##0.00;(¤#,##0.00)","ar-DJ":"¤#,##0.00;(¤#,##0.00)","ar-DZ":"¤#,##0.00;(¤#,##0.00)","ar-EG":"¤#,##0.00;(¤#,##0.00)","ar-EH":"¤#,##0.00;(¤#,##0.00)","ar-ER":"¤#,##0.00;(¤#,##0.00)","ar-IL":"¤#,##0.00;(¤#,##0.00)","ar-IQ":"¤#,##0.00;(¤#,##0.00)","ar-JO":"¤#,##0.00;(¤#,##0.00)","ar-KM":"¤#,##0.00;(¤#,##0.00)","ar-KW":"¤#,##0.00;(¤#,##0.00)","ar-LB":"¤#,##0.00;(¤#,##0.00)","ar-LY":"¤#,##0.00;(¤#,##0.00)","ar-MA":"¤#,##0.00;(¤#,##0.00)","ar-MR":"¤#,##0.00;(¤#,##0.00)","ar-OM":"¤#,##0.00;(¤#,##0.00)","ar-PS":"¤#,##0.00;(¤#,##0.00)","ar-QA":"¤#,##0.00;(¤#,##0.00)","ar-SA":"¤#,##0.00;(¤#,##0.00)","ar-SD":"¤#,##0.00;(¤#,##0.00)","ar-SO":"¤#,##0.00;(¤#,##0.00)","ar-SS":"¤#,##0.00;(¤#,##0.00)","ar-SY":"¤#,##0.00;(¤#,##0.00)","ar-TD":"¤#,##0.00;(¤#,##0.00)","ar-TN":"¤#,##0.00;(¤#,##0.00)","ar-YE":"¤#,##0.00;(¤#,##0.00)",as:"¤ #,##,##0.00",asa:"#,##0.00 ¤",ast:"#,##0.00 ¤",az:"#,##0.00 ¤","az-Cyrl":"#,##0.00 ¤","az-Latn":"#,##0.00 ¤",bas:"#,##0.00 ¤",be:"#,##0.00 ¤","be-tarask":"#,##0.00 ¤",bem:"¤#,##0.00;(¤#,##0.00)",bez:"#,##0.00¤",bg:"0.00 ¤;(0.00 ¤)",bm:"¤#,##0.00;(¤#,##0.00)",bn:"#,##,##0.00¤;(#,##,##0.00¤)","bn-IN":"#,##,##0.00¤;(#,##,##0.00¤)",bo:"¤ #,##0.00","bo-IN":"¤ #,##0.00",br:"#,##0.00 ¤",brx:"¤ #,##,##0.00",bs:"#,##0.00 ¤","bs-Cyrl":"#,##0.00 ¤","bs-Latn":"#,##0.00 ¤",ca:"#,##0.00 ¤;(#,##0.00 ¤)","ca-AD":"#,##0.00 ¤;(#,##0.00 ¤)","ca-ES-valencia":"#,##0.00 ¤;(#,##0.00 ¤)","ca-FR":"#,##0.00 ¤;(#,##0.00 ¤)","ca-IT":"#,##0.00 ¤;(#,##0.00 ¤)",ccp:"#,##,##0.00¤;(#,##,##0.00¤)","ccp-IN":"#,##,##0.00¤;(#,##,##0.00¤)",ce:"#,##0.00 ¤",ceb:"¤#,##0.00;(¤#,##0.00)",cgg:"¤#,##0.00",chr:"¤#,##0.00;(¤#,##0.00)",ckb:"¤ #,##0.00","ckb-IR":"¤ #,##0.00",cs:"#,##0.00 ¤",cy:"¤#,##0.00;(¤#,##0.00)",da:"#,##0.00 ¤","da-GL":"#,##0.00 ¤",dav:"¤#,##0.00;(¤#,##0.00)",de:"#,##0.00 ¤","de-AT":"#,##0.00 ¤","de-BE":"#,##0.00 ¤","de-CH":"#,##0.00 ¤","de-IT":"#,##0.00 ¤","de-LI":"#,##0.00 ¤","de-LU":"#,##0.00 ¤",dje:"#,##0.00¤",doi:"¤#,##0.00",dsb:"#,##0.00 ¤",dua:"#,##0.00 ¤",dyo:"#,##0.00 ¤",dz:"¤#,##,##0.00",ebu:"¤#,##0.00;(¤#,##0.00)",ee:"¤#,##0.00;(¤#,##0.00)","ee-TG":"¤#,##0.00;(¤#,##0.00)",el:"#,##0.00 ¤","el-CY":"#,##0.00 ¤",en:"¤#,##0.00;(¤#,##0.00)","en-001":"¤#,##0.00;(¤#,##0.00)","en-150":"#,##0.00 ¤","en-AE":"¤#,##0.00;(¤#,##0.00)","en-AG":"¤#,##0.00;(¤#,##0.00)","en-AI":"¤#,##0.00;(¤#,##0.00)","en-AS":"¤#,##0.00;(¤#,##0.00)","en-AT":"¤ #,##0.00","en-AU":"¤#,##0.00;(¤#,##0.00)","en-BB":"¤#,##0.00;(¤#,##0.00)","en-BE":"#,##0.00 ¤","en-BI":"¤#,##0.00;(¤#,##0.00)","en-BM":"¤#,##0.00;(¤#,##0.00)","en-BS":"¤#,##0.00;(¤#,##0.00)","en-BW":"¤#,##0.00;(¤#,##0.00)","en-BZ":"¤#,##0.00;(¤#,##0.00)","en-CA":"¤#,##0.00;(¤#,##0.00)","en-CC":"¤#,##0.00;(¤#,##0.00)","en-CH":"¤ #,##0.00;¤-#,##0.00","en-CK":"¤#,##0.00;(¤#,##0.00)","en-CM":"¤#,##0.00;(¤#,##0.00)","en-CX":"¤#,##0.00;(¤#,##0.00)","en-CY":"¤#,##0.00;(¤#,##0.00)","en-DE":"#,##0.00 ¤","en-DG":"¤#,##0.00;(¤#,##0.00)","en-DK":"#,##0.00 ¤","en-DM":"¤#,##0.00;(¤#,##0.00)","en-ER":"¤#,##0.00;(¤#,##0.00)","en-FI":"#,##0.00 ¤","en-FJ":"¤#,##0.00;(¤#,##0.00)","en-FK":"¤#,##0.00;(¤#,##0.00)","en-FM":"¤#,##0.00;(¤#,##0.00)","en-GB":"¤#,##0.00;(¤#,##0.00)","en-GD":"¤#,##0.00;(¤#,##0.00)","en-GG":"¤#,##0.00;(¤#,##0.00)","en-GH":"¤#,##0.00;(¤#,##0.00)","en-GI":"¤#,##0.00;(¤#,##0.00)","en-GM":"¤#,##0.00;(¤#,##0.00)","en-GU":"¤#,##0.00;(¤#,##0.00)","en-GY":"¤#,##0.00;(¤#,##0.00)","en-HK":"¤#,##0.00;(¤#,##0.00)","en-IE":"¤#,##0.00;(¤#,##0.00)","en-IL":"¤#,##0.00;(¤#,##0.00)","en-IM":"¤#,##0.00;(¤#,##0.00)","en-IN":"¤#,##0.00;(¤#,##0.00)","en-IO":"¤#,##0.00;(¤#,##0.00)","en-JE":"¤#,##0.00;(¤#,##0.00)","en-JM":"¤#,##0.00;(¤#,##0.00)","en-KE":"¤#,##0.00;(¤#,##0.00)","en-KI":"¤#,##0.00;(¤#,##0.00)","en-KN":"¤#,##0.00;(¤#,##0.00)","en-KY":"¤#,##0.00;(¤#,##0.00)","en-LC":"¤#,##0.00;(¤#,##0.00)","en-LR":"¤#,##0.00;(¤#,##0.00)","en-LS":"¤#,##0.00;(¤#,##0.00)","en-MG":"¤#,##0.00;(¤#,##0.00)","en-MH":"¤#,##0.00;(¤#,##0.00)","en-MO":"¤#,##0.00;(¤#,##0.00)","en-MP":"¤#,##0.00;(¤#,##0.00)","en-MS":"¤#,##0.00;(¤#,##0.00)","en-MT":"¤#,##0.00;(¤#,##0.00)","en-MU":"¤#,##0.00;(¤#,##0.00)","en-MW":"¤#,##0.00;(¤#,##0.00)","en-MY":"¤#,##0.00;(¤#,##0.00)","en-NA":"¤#,##0.00;(¤#,##0.00)","en-NF":"¤#,##0.00;(¤#,##0.00)","en-NG":"¤#,##0.00;(¤#,##0.00)","en-NL":"¤ #,##0.00;(¤ #,##0.00)","en-NR":"¤#,##0.00;(¤#,##0.00)","en-NU":"¤#,##0.00;(¤#,##0.00)","en-NZ":"¤#,##0.00;(¤#,##0.00)","en-PG":"¤#,##0.00;(¤#,##0.00)","en-PH":"¤#,##0.00;(¤#,##0.00)","en-PK":"¤#,##0.00;(¤#,##0.00)","en-PN":"¤#,##0.00;(¤#,##0.00)","en-PR":"¤#,##0.00;(¤#,##0.00)","en-PW":"¤#,##0.00;(¤#,##0.00)","en-RW":"¤#,##0.00;(¤#,##0.00)","en-SB":"¤#,##0.00;(¤#,##0.00)","en-SC":"¤#,##0.00;(¤#,##0.00)","en-SD":"¤#,##0.00;(¤#,##0.00)","en-SE":"#,##0.00 ¤","en-SG":"¤#,##0.00;(¤#,##0.00)","en-SH":"¤#,##0.00;(¤#,##0.00)","en-SI":"#,##0.00 ¤;(#,##0.00 ¤)","en-SL":"¤#,##0.00;(¤#,##0.00)","en-SS":"¤#,##0.00;(¤#,##0.00)","en-SX":"¤#,##0.00;(¤#,##0.00)","en-SZ":"¤#,##0.00;(¤#,##0.00)","en-TC":"¤#,##0.00;(¤#,##0.00)","en-TK":"¤#,##0.00;(¤#,##0.00)","en-TO":"¤#,##0.00;(¤#,##0.00)","en-TT":"¤#,##0.00;(¤#,##0.00)","en-TV":"¤#,##0.00;(¤#,##0.00)","en-TZ":"¤#,##0.00;(¤#,##0.00)","en-UG":"¤#,##0.00;(¤#,##0.00)","en-UM":"¤#,##0.00;(¤#,##0.00)","en-VC":"¤#,##0.00;(¤#,##0.00)","en-VG":"¤#,##0.00;(¤#,##0.00)","en-VI":"¤#,##0.00;(¤#,##0.00)","en-VU":"¤#,##0.00;(¤#,##0.00)","en-WS":"¤#,##0.00;(¤#,##0.00)","en-ZA":"¤#,##0.00;(¤#,##0.00)","en-ZM":"¤#,##0.00;(¤#,##0.00)","en-ZW":"¤#,##0.00;(¤#,##0.00)",eo:"¤ #,##0.00",es:"#,##0.00 ¤","es-419":"¤#,##0.00","es-AR":"¤ #,##0.00;(¤ #,##0.00)","es-BO":"¤#,##0.00","es-BR":"¤#,##0.00","es-BZ":"¤#,##0.00","es-CL":"¤#,##0.00","es-CO":"¤#,##0.00","es-CR":"¤#,##0.00","es-CU":"¤#,##0.00","es-DO":"¤#,##0.00;(¤#,##0.00)","es-EA":"#,##0.00 ¤","es-EC":"¤#,##0.00","es-GQ":"#,##0.00 ¤","es-GT":"¤#,##0.00","es-HN":"¤#,##0.00","es-IC":"#,##0.00 ¤","es-MX":"¤#,##0.00","es-NI":"¤#,##0.00","es-PA":"¤#,##0.00","es-PE":"¤#,##0.00","es-PH":"#,##0.00 ¤","es-PR":"¤#,##0.00","es-PY":"¤#,##0.00","es-SV":"¤#,##0.00","es-US":"¤#,##0.00","es-UY":"¤ #,##0.00;(¤ #,##0.00)","es-VE":"¤#,##0.00",et:"#,##0.00 ¤;(#,##0.00 ¤)",eu:"#,##0.00 ¤;(#,##0.00 ¤)",ewo:"#,##0.00 ¤",fa:"‎¤ #,##0.00;‎(¤ #,##0.00)","fa-AF":"¤ #,##0.00;‎(¤ #,##0.00)",ff:"#,##0.00 ¤","ff-Adlm":"¤ #,##0.00","ff-Adlm-BF":"¤ #,##0.00","ff-Adlm-CM":"¤ #,##0.00","ff-Adlm-GH":"¤ #,##0.00","ff-Adlm-GM":"¤ #,##0.00","ff-Adlm-GW":"¤ #,##0.00","ff-Adlm-LR":"¤ #,##0.00","ff-Adlm-MR":"¤ #,##0.00","ff-Adlm-NE":"¤ #,##0.00","ff-Adlm-NG":"¤ #,##0.00","ff-Adlm-SL":"¤ #,##0.00","ff-Adlm-SN":"¤ #,##0.00","ff-Latn":"#,##0.00 ¤","ff-Latn-BF":"#,##0.00 ¤","ff-Latn-CM":"#,##0.00 ¤","ff-Latn-GH":"#,##0.00 ¤","ff-Latn-GM":"#,##0.00 ¤","ff-Latn-GN":"#,##0.00 ¤","ff-Latn-GW":"#,##0.00 ¤","ff-Latn-LR":"#,##0.00 ¤","ff-Latn-MR":"#,##0.00 ¤","ff-Latn-NE":"#,##0.00 ¤","ff-Latn-NG":"#,##0.00 ¤","ff-Latn-SL":"#,##0.00 ¤",fi:"#,##0.00 ¤",fil:"¤#,##0.00;(¤#,##0.00)",fo:"#,##0.00 ¤;(#,##0.00 ¤)","fo-DK":"#,##0.00 ¤;(#,##0.00 ¤)",fr:"#,##0.00 ¤;(#,##0.00 ¤)","fr-BE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BI":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BJ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BL":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CD":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CH":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CI":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-DJ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-DZ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GP":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GQ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-HT":"#,##0.00 ¤;(#,##0.00 ¤)","fr-KM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-LU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-ML":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MQ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MR":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-NC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-NE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-PF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-PM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-RE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-RW":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SY":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TD":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-VU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-WF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-YT":"#,##0.00 ¤;(#,##0.00 ¤)",fur:"¤ #,##0.00",fy:"¤ #,##0.00;(¤ #,##0.00)",ga:"¤#,##0.00;(¤#,##0.00)","ga-GB":"¤#,##0.00;(¤#,##0.00)",gd:"¤#,##0.00;(¤#,##0.00)",gl:"#,##0.00 ¤",gsw:"#,##0.00 ¤","gsw-FR":"#,##0.00 ¤","gsw-LI":"#,##0.00 ¤",gu:"¤#,##,##0.00;(¤#,##,##0.00)",guz:"¤#,##0.00;(¤#,##0.00)",gv:"¤#,##0.00",ha:"¤ #,##0.00","ha-GH":"¤ #,##0.00","ha-NE":"¤ #,##0.00",haw:"¤#,##0.00;(¤#,##0.00)",he:"#,##0.00 ¤",hi:"¤#,##,##0.00",hr:"#,##0.00 ¤","hr-BA":"#,##0.00 ¤",hsb:"#,##0.00 ¤",hu:"#,##0.00 ¤",hy:"#,##0.00 ¤",ia:"¤ #,##0.00;(¤ #,##0.00)",id:"¤#,##0.00",ig:"¤#,##0.00;(¤#,##0.00)",ii:"¤ #,##0.00",is:"#,##0.00 ¤",it:"#,##0.00 ¤","it-CH":"#,##0.00 ¤","it-SM":"#,##0.00 ¤","it-VA":"#,##0.00 ¤",ja:"¤#,##0.00;(¤#,##0.00)",jgo:"¤ #,##0.00",jmc:"¤#,##0.00",jv:"¤ #,##0.00",ka:"#,##0.00 ¤",kab:"#,##0.00¤",kam:"¤#,##0.00;(¤#,##0.00)",kde:"¤#,##0.00;(¤#,##0.00)",kea:"#,##0.00 ¤;(#,##0.00 ¤)",kgp:"¤ #,##0.00",khq:"#,##0.00¤",ki:"¤#,##0.00;(¤#,##0.00)",kk:"#,##0.00 ¤",kkj:"¤ #,##0.00",kl:"¤#,##0.00;¤-#,##0.00",kln:"¤#,##0.00;(¤#,##0.00)",km:"#,##0.00¤;(#,##0.00¤)",kn:"¤#,##0.00;(¤#,##0.00)",ko:"¤#,##0.00;(¤#,##0.00)","ko-KP":"¤#,##0.00;(¤#,##0.00)",kok:"¤#,##0.00;(¤#,##0.00)",ks:"¤ #,##,##0.00","ks-Arab":"¤ #,##,##0.00",ksb:"#,##0.00¤",ksf:"#,##0.00 ¤",ksh:"#,##0.00 ¤",ku:"#,##0.00 ¤;(#,##0.00 ¤)",kw:"¤#,##0.00",ky:"#,##0.00 ¤",lag:"¤ #,##0.00",lb:"#,##0.00 ¤",lg:"#,##0.00¤",lkt:"¤ #,##0.00",ln:"#,##0.00 ¤","ln-AO":"#,##0.00 ¤","ln-CF":"#,##0.00 ¤","ln-CG":"#,##0.00 ¤",lo:"¤#,##0.00;¤-#,##0.00",lrc:"¤ #,##0.00","lrc-IQ":"¤ #,##0.00",lt:"#,##0.00 ¤",lu:"#,##0.00¤",luo:"#,##0.00¤",luy:"¤#,##0.00;¤- #,##0.00",lv:"#,##0.00 ¤",mai:"¤ #,##0.00",mas:"¤#,##0.00;(¤#,##0.00)","mas-TZ":"¤#,##0.00;(¤#,##0.00)",mer:"¤#,##0.00;(¤#,##0.00)",mfe:"¤ #,##0.00",mg:"¤#,##0.00",mgh:"¤ #,##0.00",mgo:"¤ #,##0.00",mi:"¤ #,##0.00",mk:"#,##0.00 ¤",ml:"¤#,##0.00;(¤#,##0.00)",mn:"¤ #,##0.00",mni:"¤ #,##0.00","mni-Beng":"¤ #,##0.00",mr:"¤#,##0.00;(¤#,##0.00)",ms:"¤#,##0.00;(¤#,##0.00)","ms-BN":"¤#,##0.00;(¤#,##0.00)","ms-ID":"¤#,##0.00","ms-SG":"¤#,##0.00;(¤#,##0.00)",mt:"¤#,##0.00",mua:"¤#,##0.00;(¤#,##0.00)",my:"¤ #,##0.00",mzn:"¤ #,##0.00",naq:"¤#,##0.00",nb:"¤ #,##0.00;(¤ #,##0.00)","nb-SJ":"¤ #,##0.00;(¤ #,##0.00)",nd:"¤#,##0.00;(¤#,##0.00)",nds:"¤ #,##0.00","nds-NL":"¤ #,##0.00",ne:"¤ #,##,##0.00","ne-IN":"¤ #,##,##0.00",nl:"¤ #,##0.00;(¤ #,##0.00)","nl-AW":"¤ #,##0.00;(¤ #,##0.00)","nl-BE":"¤ #,##0.00;(¤ #,##0.00)","nl-BQ":"¤ #,##0.00;(¤ #,##0.00)","nl-CW":"¤ #,##0.00;(¤ #,##0.00)","nl-SR":"¤ #,##0.00;(¤ #,##0.00)","nl-SX":"¤ #,##0.00;(¤ #,##0.00)",nmg:"#,##0.00 ¤",nn:"#,##0.00 ¤",nnh:"¤ #,##0.00",no:"¤ #,##0.00;(¤ #,##0.00)",nus:"¤#,##0.00;(¤#,##0.00)",nyn:"¤#,##0.00",om:"¤#,##0.00","om-KE":"¤#,##0.00",or:"¤#,##0.00;(¤#,##0.00)",os:"¤ #,##0.00","os-RU":"¤ #,##0.00",pa:"¤ #,##0.00","pa-Arab":"¤ #,##0.00","pa-Guru":"¤ #,##0.00",pcm:"¤#,##0.00",pl:"#,##0.00 ¤;(#,##0.00 ¤)",ps:"¤#,##0.00;(¤#,##0.00)","ps-PK":"¤#,##0.00;(¤#,##0.00)",pt:"¤ #,##0.00","pt-AO":"#,##0.00 ¤;(#,##0.00 ¤)","pt-CH":"#,##0.00 ¤;(#,##0.00 ¤)","pt-CV":"#,##0.00 ¤;(#,##0.00 ¤)","pt-GQ":"#,##0.00 ¤;(#,##0.00 ¤)","pt-GW":"#,##0.00 ¤;(#,##0.00 ¤)","pt-LU":"#,##0.00 ¤;(#,##0.00 ¤)","pt-MO":"#,##0.00 ¤;(#,##0.00 ¤)","pt-MZ":"#,##0.00 ¤;(#,##0.00 ¤)","pt-PT":"#,##0.00 ¤;(#,##0.00 ¤)","pt-ST":"#,##0.00 ¤;(#,##0.00 ¤)","pt-TL":"#,##0.00 ¤;(#,##0.00 ¤)",qu:"¤ #,##0.00","qu-BO":"¤ #,##0.00","qu-EC":"¤ #,##0.00",rm:"#,##0.00 ¤",rn:"#,##0.00¤",ro:"#,##0.00 ¤;(#,##0.00 ¤)","ro-MD":"#,##0.00 ¤;(#,##0.00 ¤)",rof:"¤#,##0.00",ru:"#,##0.00 ¤","ru-BY":"#,##0.00 ¤","ru-KG":"#,##0.00 ¤","ru-KZ":"#,##0.00 ¤","ru-MD":"#,##0.00 ¤","ru-UA":"#,##0.00 ¤",rw:"¤ #,##0.00",rwk:"#,##0.00¤",sa:"¤ #,##0.00",sah:"#,##0.00 ¤",saq:"¤#,##0.00;(¤#,##0.00)",sat:"¤ #,##0.00","sat-Olck":"¤ #,##0.00",sbp:"#,##0.00¤",sc:"#,##0.00 ¤",sd:"¤ #,##0.00","sd-Arab":"¤ #,##0.00","sd-Deva":"¤ #,##0.00",se:"#,##0.00 ¤","se-FI":"#,##0.00 ¤","se-SE":"#,##0.00 ¤",seh:"#,##0.00¤",ses:"#,##0.00¤",sg:"¤#,##0.00;¤-#,##0.00",shi:"#,##0.00¤","shi-Latn":"#,##0.00¤","shi-Tfng":"#,##0.00¤",si:"¤#,##0.00;(¤#,##0.00)",sk:"#,##0.00 ¤;(#,##0.00 ¤)",sl:"#,##0.00 ¤;(#,##0.00 ¤)",smn:"#,##0.00 ¤",sn:"¤#,##0.00;(¤#,##0.00)",so:"¤#,##0.00;(¤#,##0.00)","so-DJ":"¤#,##0.00;(¤#,##0.00)","so-ET":"¤#,##0.00;(¤#,##0.00)","so-KE":"¤#,##0.00;(¤#,##0.00)",sq:"#,##0.00 ¤;(#,##0.00 ¤)","sq-MK":"#,##0.00 ¤;(#,##0.00 ¤)","sq-XK":"#,##0.00 ¤;(#,##0.00 ¤)",sr:"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-BA":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-ME":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-XK":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-BA":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-ME":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-XK":"#,##0.00 ¤;(#,##0.00 ¤)",su:"¤#,##0.00","su-Latn":"¤#,##0.00",sv:"#,##0.00 ¤","sv-AX":"#,##0.00 ¤","sv-FI":"#,##0.00 ¤",sw:"¤ #,##0.00","sw-CD":"¤ #,##0.00","sw-KE":"¤ #,##0.00","sw-UG":"¤ #,##0.00",ta:"¤#,##0.00;(¤#,##0.00)","ta-LK":"¤#,##0.00;(¤#,##0.00)","ta-MY":"¤#,##0.00;(¤#,##0.00)","ta-SG":"¤#,##0.00;(¤#,##0.00)",te:"¤#,##0.00;(¤#,##0.00)",teo:"¤#,##0.00;(¤#,##0.00)","teo-KE":"¤#,##0.00;(¤#,##0.00)",tg:"#,##0.00 ¤",th:"¤#,##0.00;(¤#,##0.00)",ti:"¤#,##0.00","ti-ER":"¤#,##0.00",tk:"#,##0.00 ¤",to:"¤ #,##0.00",tr:"¤#,##0.00;(¤#,##0.00)","tr-CY":"¤#,##0.00;(¤#,##0.00)",tt:"#,##0.00 ¤",twq:"#,##0.00¤",tzm:"#,##0.00 ¤",ug:"¤#,##0.00;(¤#,##0.00)",uk:"#,##0.00 ¤",und:"¤ #,##0.00",ur:"¤#,##0.00;(¤#,##0.00)","ur-IN":"¤#,##0.00;(¤#,##0.00)",uz:"#,##0.00 ¤","uz-Arab":"¤ #,##0.00","uz-Cyrl":"#,##0.00 ¤","uz-Latn":"#,##0.00 ¤",vai:"¤#,##0.00;(¤#,##0.00)","vai-Latn":"¤#,##0.00;(¤#,##0.00)","vai-Vaii":"¤#,##0.00;(¤#,##0.00)",vi:"#,##0.00 ¤",vun:"¤#,##0.00",wae:"¤ #,##0.00",wo:"¤ #,##0.00",xh:"¤#,##0.00",xog:"#,##0.00 ¤",yav:"#,##0.00 ¤;(#,##0.00 ¤)",yi:"¤ #,##0.00",yo:"¤#,##0.00;(¤#,##0.00)","yo-BJ":"¤#,##0.00;(¤#,##0.00)",yrl:"¤ #,##0.00","yrl-CO":"¤ #,##0.00","yrl-VE":"¤ #,##0.00",yue:"¤#,##0.00;(¤#,##0.00)","yue-Hans":"¤#,##0.00;(¤#,##0.00)","yue-Hant":"¤#,##0.00;(¤#,##0.00)",zgh:"#,##0.00¤",zh:"¤#,##0.00;(¤#,##0.00)","zh-Hans":"¤#,##0.00;(¤#,##0.00)","zh-Hans-HK":"¤#,##0.00;(¤#,##0.00)","zh-Hans-MO":"¤#,##0.00;(¤#,##0.00)","zh-Hans-SG":"¤#,##0.00;(¤#,##0.00)","zh-Hant":"¤#,##0.00;(¤#,##0.00)","zh-Hant-HK":"¤#,##0.00;(¤#,##0.00)","zh-Hant-MO":"¤#,##0.00;(¤#,##0.00)",zu:"¤#,##0.00;(¤#,##0.00)"};var W2=["standard","accounting"],z2=/([^\s0]+)?(\s*)0*[.,]*0*(\s*)([^\s0]+)?/,Qf={},m0=e=>{var t=Cn.locale()+"/"+JSON.stringify(e);return Qf[t]||(Qf[t]=new Intl.NumberFormat(Cn.locale(),e).format),Qf[t]},G2=e=>new Intl.NumberFormat(Cn.locale(),{style:"currency",currency:e});const U2={engine:function(){return"intl"},_formatNumberCore:function(e,t,i){return t==="exponential"?this.callBase.apply(this,arguments):m0(this._normalizeFormatConfig(t,i,e))(e)},_normalizeFormatConfig:function(e,t,i){var n;if(e==="decimal"?n={minimumIntegerDigits:t.precision||void 0,useGrouping:!1,maximumFractionDigits:String(i).length,round:i<0?"ceil":"floor"}:n=this._getPrecisionConfig(t.precision),e==="percent")n.style="percent";else if(e==="currency"){var r,a=(r=t.useCurrencyAccountingStyle)!==null&&r!==void 0?r:At().defaultUseCurrencyAccountingStyle;n.style="currency",n.currency=t.currency||At().defaultCurrency,n.currencySign=W2[+a]}return n},_getPrecisionConfig:function(e){var t;return e===null?t={minimumFractionDigits:0,maximumFractionDigits:20}:t={minimumFractionDigits:e||0,maximumFractionDigits:e||0},t},format:function(e,t){return typeof e!="number"?e:(t=this._normalizeFormat(t),t.currency==="default"&&(t.currency=At().defaultCurrency),!t||typeof t!="function"&&!t.type&&!t.formatter?m0(t)(e):this.callBase.apply(this,arguments))},_getCurrencySymbolInfo:function(e){var t=G2(e);return this._extractCurrencySymbolInfo(t.format(0))},_extractCurrencySymbolInfo:function(e){var t=z2.exec(e)||[],i=t[1]?"before":"after",n=t[1]||t[4]||"",r=t[2]||t[3]||"";return{position:i,symbol:n,delimiter:r}},getCurrencySymbol:function(e){e||(e=At().defaultCurrency);var t=this._getCurrencySymbolInfo(e);return{symbol:t.symbol}},getOpenXmlCurrencyFormat:function(e){var t=e||At().defaultCurrency,i=this._getCurrencySymbolInfo(t).symbol,n=Cn.getValueByClosestLocale(r=>H2[r]);return $2(i,n)}};var K2=typeof Intl<"u",j2=4,Sd=10,g0=["currency","fixedpoint","exponential","percent","decimal"],ep={1:"K",2:"M",3:"B",4:"T"},C0={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},St=Fn({engine:function(){return"base"},numericFormats:g0,defaultLargeNumberFormatPostfixes:ep,_parseNumberFormatString:function(e){var t={};if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(" ");if(V(i,(n,r)=>{g0.includes(r)?t.formatType=r:r in C0&&(t.power=C0[r])}),t.power&&!t.formatType&&(t.formatType="fixedpoint"),t.formatType)return t}},_calculateNumberPower:function(e,t,i,n){var r=Math.abs(e),a=0;if(r>1)for(;r&&r>=t&&(n===void 0||a<n);)a++,r/=t;else if(r>0&&r<1)for(;r<1&&(i===void 0||a>i);)a--,r*=t;return a},_getNumberByPower:function(e,t,i){for(var n=e;t>0;)n/=i,t--;for(;t<0;)n*=i,t++;return n},_formatNumber:function(e,t,i){t.power==="auto"&&(t.power=this._calculateNumberPower(e,1e3,0,j2)),t.power&&(e=this._getNumberByPower(e,t.power,1e3));var n=this.defaultLargeNumberFormatPostfixes[t.power]||"",r=this._formatNumberCore(e,t.formatType,i);return r=r.replace(/(\d|.$)(\D*)$/,"$1"+n+"$2"),r},_formatNumberExponential:function(e,t){var i=this._calculateNumberPower(e,Sd),n=this._getNumberByPower(e,i,Sd);t.precision===void 0&&(t.precision=1),n.toFixed(t.precision||0)>=Sd&&(i++,n/=Sd);var r=(i>=0?"+":"")+i.toString();return this._formatNumberCore(n,"fixedpoint",t)+"E"+r},_addZeroes:function(e,t){var i=Math.pow(10,t),n=e<0?"-":"";e=(Math.abs(e)*i>>>0)/i;for(var r=e.toString();r.length<t;)r="0"+r;return n+r},_addGroupSeparators:function(e){var t=e.toString().split(".");return t[0].replace(/\B(?=(\d{3})+(?!\d))/g,At().thousandsSeparator)+(t[1]?At().decimalSeparator+t[1]:"")},_formatNumberCore:function(e,t,i){return t==="exponential"?this._formatNumberExponential(e,i):(t!=="decimal"&&i.precision!==null&&(i.precision=i.precision||0),t==="percent"&&(e*=100),i.precision!==void 0&&(t==="decimal"?e=this._addZeroes(e,i.precision):e=i.precision===null?e.toPrecision():CA(e,i.precision)),t!=="decimal"?e=this._addGroupSeparators(e):e=e.toString().replace(".",At().decimalSeparator),t==="percent"&&(e+="%"),e)},_normalizeFormat:function(e){return e?(typeof e=="function"||Ye(e)||(e={type:e}),e):{}},_getSeparators:function(){return{decimalSeparator:this.getDecimalSeparator(),thousandsSeparator:this.getThousandsSeparator()}},getThousandsSeparator:function(){return this.format(1e4,"fixedPoint")[2]},getDecimalSeparator:function(){return this.format(1.2,{type:"fixedPoint",precision:1})[1]},convertDigits:function(e,t){var i=this.format(90,"decimal");if(typeof e!="string"||i[1]==="0")return e;var n=t?i[1]:"0",r=t?"0":i[1],a=t?i[0]:"9",o=new RegExp("["+n+"-"+a+"]","g");return e.replace(o,s=>String.fromCharCode(s.charCodeAt(0)+(r.charCodeAt(0)-n.charCodeAt(0))))},getNegativeEtalonRegExp:function(e){var t=this._getSeparators(),i=new RegExp("[0-9"+Fr(t.decimalSeparator+t.thousandsSeparator)+"]+","g"),n=this.format(-1,e).replace(i,"1");return["\\","(",")","[","]","*","+","$","^","?","|","{","}"].forEach(r=>{n=n.replaceAll(r,"\\".concat(r))}),n=n.replaceAll(" ","\\s"),n=n.replaceAll("1",".+"),new RegExp(n,"g")},getSign:function(e,t){if(!t)return e.replace(/[^0-9-]/g,"").charAt(0)==="-"?-1:1;var i=this.getNegativeEtalonRegExp(t);return e.match(i)?-1:1},format:function(e,t){if(typeof e!="number"||typeof t=="number")return e;if(t=t&&t.formatter||t,typeof t=="function")return t(e);t=this._normalizeFormat(t),t.type||(t.type="decimal");var i=this._parseNumberFormatString(t.type);if(!i){var n=this._getSeparators();return n.unlimitedIntegerDigits=t.unlimitedIntegerDigits,this.convertDigits(M2(t.type,n)(e))}return this._formatNumber(e,i,t)},parse:function(e,t){if(e){if(t&&t.parser)return t.parser(e);e=this.convertDigits(e,!0),t&&typeof t!="string"&&xt.log("W0011");var i=this.getDecimalSeparator(),n=new RegExp("[^0-9"+Fr(i)+"]","g"),r=e.replace(n,"").replace(i,".").replace(/\.$/g,"");if(r==="."||r==="")return null;if(this._calcSignificantDigits(r)>15)return NaN;var a=+r*this.getSign(e,t);t=this._normalizeFormat(t);var o=this._parseNumberFormatString(t.type),s=o==null?void 0:o.power;if(s){if(s==="auto"){var l=e.match(/\d(K|M|B|T)/);l&&(s=Object.keys(ep).find(u=>ep[u]===l[1]))}a*=Math.pow(10,3*s)}return(o==null?void 0:o.formatType)==="percent"&&(a/=100),a}},_calcSignificantDigits:function(e){var[t,i]=e.split("."),n=a=>{for(var o=-1,s=0;s<a.length;s++)if(a[s]!=="0"){o=s;break}return o>-1?a.length-o:0},r=0;return t&&(r+=n(t.split(""))),i&&(r+=n(i.split("").reverse())),r}});St.inject(N2);K2&&St.inject(U2);function En(e,t){for(;e.length<t;)e="0"+e;return e}var hl={3:"abbreviated",4:"wide",5:"narrow"},q_={y:function(e,t,i){var n=e[i?"getUTCFullYear":"getFullYear"]();return t===2&&(n%=100),En(n.toString(),t)},M:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=hl[t];return a?n.getMonthNames(a,"format")[r]:En((r+1).toString(),Math.min(t,2))},L:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=hl[t];return a?n.getMonthNames(a,"standalone")[r]:En((r+1).toString(),Math.min(t,2))},Q:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=Math.floor(r/3),o=hl[t];return o?n.getQuarterNames(o)[a]:En((a+1).toString(),Math.min(t,2))},E:function(e,t,i,n){var r=e[i?"getUTCDay":"getDay"](),a=hl[t<3?3:t];return n.getDayNames(a)[r]},a:function(e,t,i,n){var r=e[i?"getUTCHours":"getHours"](),a=r<12?0:1,o=hl[t];return n.getPeriodNames(o)[a]},d:function(e,t,i){return En(e[i?"getUTCDate":"getDate"]().toString(),Math.min(t,2))},H:function(e,t,i){return En(e[i?"getUTCHours":"getHours"]().toString(),Math.min(t,2))},h:function(e,t,i){var n=e[i?"getUTCHours":"getHours"]();return En((n%12||12).toString(),Math.min(t,2))},m:function(e,t,i){return En(e[i?"getUTCMinutes":"getMinutes"]().toString(),Math.min(t,2))},s:function(e,t,i){return En(e[i?"getUTCSeconds":"getSeconds"]().toString(),Math.min(t,2))},S:function(e,t,i){return En(e[i?"getUTCMilliseconds":"getMilliseconds"]().toString(),3).substr(0,t)},x:function(e,t,i){var n=i?0:e.getTimezoneOffset(),r=n>0?"-":"+",a=Math.abs(n),o=Math.floor(a/60),s=a%60,l=En(o.toString(),2),u=En(s.toString(),2);return r+l+(t>=3?":":"")+(t>1||s?u:"")},X:function(e,t,i){return i||!e.getTimezoneOffset()?"Z":q_.x(e,t,i)},Z:function(e,t,i){return q_.X(e,t>=5?3:2,i)}},xA=function(e,t){return function(i){var n,r,a,o=0,s=!1,l,u="";if(!i)return null;if(!e)return i;var d=e[e.length-1]==="Z"||e.slice(-3)==="'Z'";for(n=0;n<e.length;n++)a=e[n],r=q_[a],l=a===e[n+1],o++,l||(r&&!s&&(u+=r(i,o,d,t)),o=0),a==="'"&&!l?s=!s:(s||!r)&&(u+=a),a==="'"&&l&&n++;return u}},q2="،",bA=" .,:;/\\<>()-[]"+q2,Y2=". m.",ya=function(e){var t=e&&St.convertDigits(e,!1).charCodeAt(0),i=St.convertDigits("0",!1).charCodeAt(0);return i<=t&&t<i+10},X2=function(e,t,i,n){var r=e[i],a=e[i+1];if(!n&&(r==="."||r===" "&&e.slice(i-1,i+3)===Y2||r==="-"&&!ya(a)))return!0;var o=n&&t.some(s=>e[i]!==s[i]);return bA.indexOf(r)<0&&n===ya(r)&&(!n||o)},Z2=function(e,t){if(!ya(e[t]))for(;t>0&&!ya(e[t-1])&&(e[t-1]==="."||bA.indexOf(e[t-1])<0);)t--;return t},J2=function(e,t,i,n){var r=0,a=[],o=function(s){return e[r]!==s[r]&&(n===void 0||ya(e[r])===n)};for(Array.isArray(t)||(t=[t]),r=0;r<e.length;r++)if(i.indexOf(r)<0&&t.filter(o).length){r=Z2(e,r);do{if(n=ya(e[r]),!a.length&&!n&&ya(t[0][r]))break;a.push(r),i.unshift(r),r++}while(e[r]&&X2(e,t,r,n));break}return a.length===1&&(e[i[0]-1]==="0"||e[i[0]-1]==="٠")&&i.unshift(i[0]-1),a},Q2=function(e,t,i,n){var r=t[0],a=r<n.length?n[r]:r;return t.forEach(function(o,s){e=e.substr(0,a+s)+(i.length>1?i[s]:i)+e.substr(a+s+1)}),t.length===1&&(e=e.replace("0"+i,i+i),e=e.replace("٠"+i,i+i)),e},e4=function(e,t,i,n){var r,a,o;if(!ya(e[t[0]]||"0")){for(var s=Math.max(t.length<=3?3:4,i.length);t.length>s;){for(a=t.pop(),o=n[a],n[a]=-1,r=a+1;r<n.length;r++)n[r]--;e=e.substr(0,o)+e.substr(o+1)}for(a=t[t.length-1]+1,o=a<n.length?n[a]:a;t.length<s;){for(t.push(t[t.length-1]+1),r=a;r<n.length;r++)n[r]++;e=e.substr(0,o)+" "+e.substr(o)}}return e=Q2(e,t,i,n),e},y0=function(e,t){return Array.isArray(e)?e.map(function(i){return(t(i)||"").toString()}):(t(e)||"").toString()},t4=/[a-zA-Z]/g,i4=function(e,t,i,n){var r=t.split("").map(function(a,o){return i.indexOf(o)<0&&(a.match(t4)||a==="'")?n[o]:-1});return e=e.split("").map(function(a,o){var s=a,l=r.indexOf(o)>=0,u=o>0&&r.indexOf(o-1)>=0,d=r.indexOf(o+1)>=0;return l&&(u||(s="'"+s),d||(s+="'")),s}).join(""),e},Bg=function(e){var t=[],i=y0(new Date(2009,8,8,6,5,4),e),n=i.split("").map(function(s,l){return l}),r=i,a={},o=[{date:new Date(2009,8,8,6,5,4,111),pattern:"S"},{date:new Date(2009,8,8,6,5,2),pattern:"s"},{date:new Date(2009,8,8,6,2,4),pattern:"m"},{date:new Date(2009,8,8,18,5,4),pattern:"H",isDigit:!0},{date:new Date(2009,8,8,2,5,4),pattern:"h",isDigit:!0},{date:new Date(2009,8,8,18,5,4),pattern:"a",isDigit:!1},{date:new Date(2009,8,1,6,5,4),pattern:"d"},{date:[new Date(2009,8,2,6,5,4),new Date(2009,8,3,6,5,4),new Date(2009,8,4,6,5,4)],pattern:"E"},{date:new Date(2009,9,6,6,5,4),pattern:"M"},{date:new Date(1998,8,8,6,5,4),pattern:"y"}];if(r&&(o.forEach(function(s){var l=J2(i,y0(s.date,e),t,s.isDigit),u=s.pattern==="M"&&!a.d?"L":s.pattern;r=e4(r,l,u,n),a[u]=l.length}),r=i4(r,i,t,n),t.length))return r},$r={3:"abbreviated",4:"wide",5:"narrow"},x0=function(e,t){return e>2?Object.keys($r).map(function(i){return["format","standalone"].map(function(n){return t.getMonthNames($r[i],n).join("|")}).join("|")}).join("|"):e===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},n4={":":function(e,t){var i=e>1?"{".concat(e,"}"):"",n=Fr(t.getTimeSeparator());return n!==":"&&(n="".concat(n,"|:")),"".concat(n).concat(i)},y:function(e){return e===2?"[0-9]{".concat(e,"}"):"[0-9]+?"},M:x0,L:x0,Q:function(e,t){return e>2?t.getQuarterNames($r[e],"format").join("|"):"0?[1-4]"},E:function(e,t){return"\\D*"},a:function(e,t){return t.getPeriodNames($r[e<3?3:e],"format").join("|")},d:function(e){return e===2?"3[01]|[12][0-9]|0?[1-9]":"0??[1-9]|[12][0-9]|3[01]"},H:function(e){return e===2?"2[0-3]|1[0-9]|0?[0-9]":"0??[0-9]|1[0-9]|2[0-3]"},h:function(e){return e===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},m:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},s:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},S:function(e){return"[0-9]{1,".concat(e,"}")},w:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"}},Or=Number,Y_=function(e,t){return e.map(i=>i.toLowerCase()).indexOf(t.toLowerCase())},b0=function(e,t,i){return t>2?["format","standalone"].map(function(n){return Object.keys($r).map(function(r){var a=i.getMonthNames($r[r],n);return Y_(a,e)})}).reduce(function(n,r){return n.concat(r)}).filter(function(n){return n>=0})[0]:Or(e)-1},r4={y:function(e,t){var i=Or(e);return t===2?i<30?2e3+i:1900+i:i},M:b0,L:b0,Q:function(e,t,i){return t>2?i.getQuarterNames($r[t],"format").indexOf(e):Or(e)-1},E:function(e,t,i){var n=i.getDayNames($r[t<3?3:t],"format");return Y_(n,e)},a:function(e,t,i){var n=i.getPeriodNames($r[t<3?3:t],"format");return Y_(n,e)},d:Or,H:Or,h:Or,m:Or,s:Or,S:function(e,t){for(t=Math.max(t,3),e=e.slice(0,3);t<3;)e+="0",t++;return Or(e)}},sh=["y","M","d","h","m","s","S"],Lg={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(e,t,i){var n=e.getHours(),r=i.h;r!==void 0&&r!==n&&n--,!t&&n===12?n=0:t&&n!==12&&(n+=12),e.setHours(n)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},a4=function(e,t){var i=e[t];if(!i)return 0;var n=0;do t++,n++;while(e[t]===i);return n},o4=function(e,t){for(var i="",n=0;n<t;n++)i+=e;return i},SA=function(e,t){for(var i="",n="",r,a=[],o=function(){n&&(a.push("'".concat(n,"'")),i+="".concat(Fr(n),")"),n="")},s=0;s<e.length;s++){var l=e[s],u=l==="'",d=n4[l];if(!(u&&(r=!r,e[s-1]!=="'")))if(d&&!r){var c=a4(e,s),h=o4(l,c);o(),a.push(h),i+="(".concat(d(c,t),")"),s+=c-1}else n||(i+="("),n+=l}return o(),l4(a)||Bu.warn("The following format may be parsed incorrectly: ".concat(e,".")),{patterns:a,regexp:new RegExp("^".concat(i,"$"),"i")}},s4=["d","H","h","m","s","w","M","L","Q"],l4=function(e){var t=r=>{if(!r)return!1;var a=r[0];return["y","S"].includes(a)||s4.includes(a)&&r.length<3},i=!0,n=0;return e.every((r,a,o)=>(t(r)&&((s=>s[0]!=="S"&&s.length!==2)(r)&&(i=++n<2),t(o[a+1])||(n=0)),i))},u4=function(){return Lg},d4=function(e,t,i,n,r){var a=t[0],o=Lg[a],s=r4[a];if(o&&s){var l=s(i,t.length,n);r[t]=l,e[o]?e[o](l):o(e,l,r)}},c4=function(e,t,i){var n=Lg[t],r="g"+n.substr(1),a=i[r]();e[n](a)},h4=function(e){return e.map(function(t){return t[0]==="'"?"":t[0]==="H"?"h":t[0]})},f4=function(e){var t=e.map(function(i){return sh.indexOf(i)});return Math.max.apply(Math,t)},p4=function(e){var t=e.filter(function(i){return sh.indexOf(i)<0});return sh.concat(t)},v4=function(e,t){var i=SA(e,t);return function(n){var r=i.regexp.exec(n);if(r){var a=new Date,o=new Date(a.getFullYear(),0,1),s=h4(i.patterns),l=f4(s),u=p4(s),d={};return u.forEach(function(c,h){if(!(!c||h<sh.length&&h>l)){var f=s.indexOf(c);if(f>=0){var p=i.patterns[f],m=r[f+1];d4(o,p,m,t,d)}else c4(o,c,a)}}),o}return null}},_4=["January","February","March","April","May","June","July","August","September","October","November","December"],m4=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g4=["AM","PM"],C4=["Q1","Q2","Q3","Q4"],S0=(e,t)=>{var i={abbreviated:3,short:2,narrow:1};return ti(e,n=>n.substr(0,i[t]))};const Hl={getMonthNames:function(e){return S0(_4,e)},getDayNames:function(e){return S0(m4,e)},getQuarterNames:function(e){return C4},getPeriodNames:function(e){return g4}},y4={"af-NA":1,agq:1,ak:1,ar:6,"ar-EH":1,"ar-ER":1,"ar-KM":1,"ar-LB":1,"ar-MA":1,"ar-MR":1,"ar-PS":1,"ar-SO":1,"ar-SS":1,"ar-TD":1,"ar-TN":1,asa:1,ast:1,az:1,"az-Cyrl":1,bas:1,be:1,bem:1,bez:1,bg:1,bm:1,br:1,bs:1,"bs-Cyrl":1,ca:1,ce:1,cgg:1,ckb:6,cs:1,cy:1,da:1,de:1,dje:1,dsb:1,dua:1,dyo:1,ee:1,el:1,"en-001":1,"en-AE":6,"en-BI":1,"en-MP":1,"en-SD":6,eo:1,es:1,et:1,eu:1,ewo:1,fa:6,ff:1,"ff-Adlm":1,fi:1,fo:1,fr:1,"fr-DJ":6,"fr-DZ":6,"fr-SY":6,fur:1,fy:1,ga:1,gd:1,gl:1,gsw:1,gv:1,ha:1,hr:1,hsb:1,hu:1,hy:1,ia:1,ig:1,is:1,it:1,jgo:1,jmc:1,ka:1,kab:6,kde:1,kea:1,khq:1,kk:1,kkj:1,kl:1,"ko-KP":1,ksb:1,ksf:1,ksh:1,ku:1,kw:1,ky:1,lag:1,lb:1,lg:1,ln:1,lrc:6,lt:1,lu:1,lv:1,"mas-TZ":1,mfe:1,mg:1,mgo:1,mi:1,mk:1,mn:1,ms:1,mua:1,mzn:6,naq:1,nds:1,nl:1,nmg:1,nnh:1,no:1,nus:1,nyn:1,os:1,pcm:1,pl:1,ps:6,"pt-AO":1,"pt-CH":1,"pt-CV":1,"pt-GQ":1,"pt-GW":1,"pt-LU":1,"pt-ST":1,"pt-TL":1,"qu-BO":1,"qu-EC":1,rm:1,rn:1,ro:1,rof:1,ru:1,rw:1,rwk:1,sah:1,sbp:1,sc:1,se:1,ses:1,sg:1,shi:1,"shi-Latn":1,si:1,sk:1,sl:1,smn:1,so:1,"so-DJ":6,sq:1,sr:1,"sr-Latn":1,sv:1,sw:1,"ta-LK":1,"ta-MY":1,teo:1,tg:1,"ti-ER":1,tk:1,to:1,tr:1,tt:1,twq:1,tzm:1,uk:1,uz:1,"uz-Arab":6,"uz-Cyrl":1,vai:1,"vai-Latn":1,vi:1,vun:1,wae:1,wo:1,xog:1,yav:1,yi:1,yo:1,zgh:1};var x4=/[\u200E\u200F]/g,Ja=e=>t=>{if(!e.timeZoneName){var i=t.getFullYear(),n=String(i).length<3,r=n?i+400:i,a=new Date(Date.UTC(r,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));n&&a.setFullYear(i);var o=k({timeZone:"UTC"},e);return X_(a,o)}return X_(t,e)},tp={},b4=e=>{var t=Cn.locale()+"/"+JSON.stringify(e);return tp[t]||(tp[t]=new Intl.DateTimeFormat(Cn.locale(),e).format),tp[t]};function X_(e,t){return b4(t)(e).replace(x4,"")}var Z_=e=>new Intl.NumberFormat(Cn.locale()).format(e),S4=(()=>{var e={};return t=>{if(!(t in e)){if(Z_(0)==="0")return e[t]=!1,!1;e[t]={};for(var i=0;i<10;++i)e[t][Z_(i)]=i}return e[t]}})(),Ed=e=>{var t=S4(Cn.locale());return t?e.split("").map(i=>i in t?String(t[i]):i).join(""):e},E0=e=>e.replace(/(\D)0+(\d)/g,"$1$2"),E4=(e,t)=>E0(e)===E0(t),J_=e=>e.replace("d’","de "),Pg={day:{day:"numeric"},dayofweek:{weekday:"long"},longdate:{weekday:"long",year:"numeric",month:"long",day:"numeric"},longdatelongtime:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},longtime:{hour:"numeric",minute:"numeric",second:"numeric"},month:{month:"long"},monthandday:{month:"long",day:"numeric"},monthandyear:{year:"numeric",month:"long"},shortdate:{},shorttime:{hour:"numeric",minute:"numeric"},shortyear:{year:"2-digit"},year:{year:"numeric"}};Object.defineProperty(Pg,"shortdateshorttime",{get:function(){var e=Intl.DateTimeFormat(Cn.locale()).resolvedOptions();return{year:e.year,month:e.month,day:e.day,hour:"numeric",minute:"numeric"}}});var w4=e=>typeof e=="string"&&Pg[e.toLowerCase()],EA={standalone:function(e,t){var i=new Date(1999,e,13,1),n=Ja({month:t})(i);return n},format:function(e,t){var i=new Date(0,e,13,1),n=J_(Ja({day:"numeric",month:t})(i)),r=n.split(" ").filter(a=>a.indexOf("13")<0);return r.length===1?r[0]:r.length===2?r[0].length>r[1].length?r[0]:r[1]:EA.standalone(e,t)}};const I4={engine:function(){return"intl"},getMonthNames:function(e,t){var i={wide:"long",abbreviated:"short",narrow:"narrow"}[e||"wide"];return t=t==="format"?t:"standalone",Array.apply(null,new Array(12)).map((n,r)=>EA[t](r,i))},getDayNames:function(e){var t=(i=>Array.apply(null,new Array(7)).map((n,r)=>Ja({weekday:i})(new Date(0,0,r))))({wide:"long",abbreviated:"short",short:"narrow",narrow:"narrow"}[e||"wide"]);return t},getPeriodNames:function(){var e=Ja({hour:"numeric",hour12:!0});return[1,13].map(t=>{var i=Z_(1),n=e(new Date(0,0,1,t)).split(i);if(n.length!==2)return"";var r=n[0].length>n[1].length?n[0]:n[1];return r.trim()})},format:function(e,t){if(e){if(!t)return e;typeof t!="function"&&!t.formatter&&(t=t.type||t);var i=w4(t);if(i)return Ja(i)(e);var n=typeof t;return t.formatter||n==="function"||n==="string"?this.callBase.apply(this,arguments):Ja(t)(e)}},parse:function(e,t){var i;return t&&!t.parser&&typeof e=="string"&&(e=J_(e),i=n=>J_(this.format(n,t))),this.callBase(e,i||t)},_parseDateBySimpleFormat:function(e,t){e=Ed(e);var i=this.getFormatParts(t),n=e.split(/\D+/).filter(o=>o.length>0);if(i.length===n.length){var r=this._generateDateArgs(i,n),a=o=>{var s=((l,u)=>{var d=u?12:0;return new Date(l.year,l.month,l.day,(l.hours+d)%24,l.minutes,l.seconds)})(r,o);if(E4(Ed(this.format(s,t)),e))return s};return a(!1)||a(!0)}},_generateDateArgs:function(e,t){var i=new Date,n={year:i.getFullYear(),month:i.getMonth(),day:i.getDate(),hours:0,minutes:0,seconds:0};return e.forEach((r,a)=>{var o=t[a],s=parseInt(o,10);r==="month"&&(s-=1),n[r]=s}),n},formatUsesMonthName:function(e){return typeof e=="object"&&!(e.type||e.format)?e.month==="long":this.callBase.apply(this,arguments)},formatUsesDayName:function(e){return typeof e=="object"&&!(e.type||e.format)?e.weekday==="long":this.callBase.apply(this,arguments)},getTimeSeparator:function(){return Ed(X_(new Date(2001,1,1,11,11),{hour:"numeric",minute:"numeric",hour12:!1})).replace(/\d/g,"")},getFormatParts:function(e){if(typeof e=="string")return this.callBase(e);var t=k({},Pg[e.toLowerCase()]),i=new Date(2001,2,4,5,6,7),n=Ja(t)(i);return n=Ed(n),[{name:"year",value:1},{name:"month",value:3},{name:"day",value:4},{name:"hours",value:5},{name:"minutes",value:6},{name:"seconds",value:7}].map(r=>({name:r.name,index:n.indexOf(r.value)})).filter(r=>r.index>-1).sort((r,a)=>r.index-a.index).map(r=>r.name)}};var T4=0,A4=typeof Intl<"u",ip={shortdate:"M/d/y",shorttime:"h:mm a",longdate:"EEEE, MMMM d, y",longtime:"h:mm:ss a",monthandday:"MMMM d",monthandyear:"MMMM y",quarterandyear:"QQQ y",day:"d",year:"y",shortdateshorttime:"M/d/y, h:mm a",longdatelongtime:"EEEE, MMMM d, y, h:mm:ss a",month:"LLLL",shortyear:"yy",dayofweek:"EEEE",quarter:"QQQ",hour:"HH",minute:"mm",second:"ss",millisecond:"SSS","datetime-local":"yyyy-MM-ddTHH':'mm':'ss"},D4={year:["y","yy","yyyy"],day:["d","dd"],month:["M","MM","MMM","MMMM"],hours:["H","HH","h","hh","ah"],minutes:["m","mm"],seconds:["s","ss"],milliseconds:["S","SS","SSS"]},Xe=Fn({engine:function(){return"base"},_getPatternByFormat:function(e){return ip[e.toLowerCase()]},_expandPattern:function(e){return this._getPatternByFormat(e)||e},formatUsesMonthName:function(e){return this._expandPattern(e).indexOf("MMMM")!==-1},formatUsesDayName:function(e){return this._expandPattern(e).indexOf("EEEE")!==-1},getFormatParts:function(e){var t=this._getPatternByFormat(e)||e,i=[];return V(t.split(/\W+/),(n,r)=>{V(D4,(a,o)=>{o.includes(r)&&i.push(a)})}),i},getMonthNames:function(e){return Hl.getMonthNames(e)},getDayNames:function(e){return Hl.getDayNames(e)},getQuarterNames:function(e){return Hl.getQuarterNames(e)},getPeriodNames:function(e){return Hl.getPeriodNames(e)},getTimeSeparator:function(){return":"},is24HourFormat:function(e){for(var t=new Date(2017,0,20,11,0,0,0),i=new Date(2017,0,20,23,0,0,0),n=this.format(t,e),r=this.format(i,e),a=0;a<n.length;a++)if(n[a]!==r[a])return!isNaN(parseInt(n[a]))},format:function(e,t){if(e){if(!t)return e;var i;if(typeof t=="function")i=t;else if(t.formatter)i=t.formatter;else if(t=t.type||t,Ve(t))return t=ip[t.toLowerCase()]||t,St.convertDigits(xA(t,this)(e));if(i)return i(e)}},parse:function(e,t){var i=this,n,r;if(e){if(!t)return this.parse(e,"shortdate");if(t.parser)return t.parser(e);if(typeof t=="string"&&!ip[t.toLowerCase()])n=t;else{r=o=>{var s=i.format(o,t);return St.convertDigits(s,!0)};try{n=Bg(r)}catch{}}if(n)return e=St.convertDigits(e,!0),v4(n,this)(e);xt.log("W0012");var a=new Date(e);if(!(!a||isNaN(a.getTime())))return a}},firstDayOfWeekIndex:function(){var e=Cn.getValueByClosestLocale(t=>y4[t]);return e===void 0?T4:e}});A4&&Xe.inject(I4);const wA=Fn({format:function(e,t){var i=Ve(t)&&t!==""||Ye(t)||Ie(t),n=Et(e)||Wi(e);if(!i||!n)return E(e)?e.toString():"";if(Ie(t))return t(e);if(Ve(t)&&(t={type:t}),Et(e))return St.format(e,t);if(Wi(e))return Xe.format(e,t)},getTimeFormat:function(e){return e?"longtime":"shorttime"},_normalizeFormat:function(e){return Array.isArray(e)?e.length===1?e[0]:function(t){return e.map(function(i){return Xe.format(t,i)}).join(" ")}:e},getDateFormatByDifferences:function(e,t){var i=[],n=t&&e.millisecond&&!(e.year||e.month||e.day);return n?i.push(function(r){return r.getSeconds()+r.getMilliseconds()/1e3+"s"}):e.millisecond&&i.push("millisecond"),(e.hour||e.minute||!n&&e.second)&&i.unshift(this.getTimeFormat(e.second)),e.year&&e.month&&e.day?t&&t==="month"?"monthandyear":(i.unshift("shortdate"),this._normalizeFormat(i)):e.year&&e.month?"monthandyear":e.year&&e.quarter?"quarterandyear":e.year?"year":e.quarter?"quarter":e.month&&e.day?(t?i.unshift(function(r){return Xe.getMonthNames("abbreviated")[r.getMonth()]+" "+Xe.format(r,"day")}):i.unshift("monthandday"),this._normalizeFormat(i)):e.month?"month":e.day?(t?i.unshift("day"):i.unshift(function(r){return Xe.format(r,"dayofweek")+", "+Xe.format(r,"day")}),this._normalizeFormat(i)):this._normalizeFormat(i)},getDateFormatByTicks:function(e){var t,i,n;if(e.length>1)for(t=Fe.getDatesDifferences(e[0],e[1]),n=1;n<e.length-1;n++)i=Fe.getDatesDifferences(e[n],e[n+1]),t.count<i.count&&(t=i);else t={year:!0,month:!0,day:!0,hour:e[0].getHours()>0,minute:e[0].getMinutes()>0,second:e[0].getSeconds()>0,millisecond:e[0].getMilliseconds()>0};var r=this.getDateFormatByDifferences(t);return r},getDateFormatByTickInterval:function(e,t,i){var n,r=function(s,l,u){switch(l){case"year":case"quarter":s.month=u;case"month":s.day=u;case"week":case"day":s.hour=u;case"hour":s.minute=u;case"minute":s.second=u;case"second":s.millisecond=u}};i=Ve(i)?i.toLowerCase():i;var a=Fe.getDatesDifferences(e,t);e!==t&&function(s,l,u){!u.getMilliseconds()&&u.getSeconds()?u.getSeconds()-l.getSeconds()===1&&(s.millisecond=!0,s.second=!1):!u.getSeconds()&&u.getMinutes()?u.getMinutes()-l.getMinutes()===1&&(s.second=!0,s.minute=!1):!u.getMinutes()&&u.getHours()?u.getHours()-l.getHours()===1&&(s.minute=!0,s.hour=!1):!u.getHours()&&u.getDate()>1?u.getDate()-l.getDate()===1&&(s.hour=!0,s.day=!1):u.getDate()===1&&u.getMonth()?u.getMonth()-l.getMonth()===1&&(s.day=!0,s.month=!1):!u.getMonth()&&u.getFullYear()&&u.getFullYear()-l.getFullYear()===1&&(s.month=!0,s.year=!1)}(a,e>t?t:e,e>t?e:t),n=Fe.getDateUnitInterval(a),r(a,n,!0),n=Fe.getDateUnitInterval(i||"second"),r(a,n,!1),a[{week:"day"}[n]||n]=!0;var o=this.getDateFormatByDifferences(a);return o}});var oi=jm(xt.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with a duplicated key",E4009:"Data item cannot be found",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown data type is specified for ODataStore: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter",E4017:"Keys cannot be modified",E4018:"The server has returned a non-numeric value in a response to an item count request",E4019:"Mixing of group operators inside a single group of filter expression is not allowed",E4020:"Unknown store type is detected: {0}",E4021:"The server response does not provide the totalCount value",E4022:"The server response does not provide the groupCount value",E4023:"Could not parse the following XML: {0}",E4024:"String function {0} cannot be used with the data field {1} of type {2}.",W4000:"Data returned from the server has an incorrect structure",W4001:'The {0} field is listed in both "keyType" and "fieldTypes". The value of "fieldTypes" is used.',W4002:"Data loading has failed for some cells due to the following error: {0}"}),O4=null,Fg=function(e){var t;(t=O4)===null||t===void 0||t(e)};function R4(e,t){for(var i,n=typeof t=="string"?t.split():t.slice();n.length;)if(i=n.shift(),i in e)return!0;return!1}function IA(e,t,i,n){var r,a;if(n){for(var o=0;o<t.length;o++)if(r=t[o].items||t[o].collapsedItems||[],a=IA(e,r||[],i,n-1),a)return a}else if(bo(e,t,i)>=0)return t}function k4(e,t,i,n){return n?IA(e,t,i,n)||[]:t}function B4(e,t){if(e.key()&&(!t._dataByKeyMap||t._dataByKeyMapLength!==t.length)){for(var i={},n=t.length,r=0;r<n;r++)i[JSON.stringify(e.keyOf(t[r]))]=t[r];t._dataByKeyMap=i,t._dataByKeyMapLength=n}}function L4(e,t){if(e._dataByKeyMap)return e._dataByKeyMap[JSON.stringify(t)]}function P4(e,t){return e._dataByKeyMap?e._dataByKeyMap[JSON.stringify(t)]:!0}function TA(e,t,i){e._dataByKeyMap&&(e._dataByKeyMap[JSON.stringify(t)]=i,e._dataByKeyMapLength+=i?1:-1)}function AA(e,t){t=t||new WeakMap;var i=e?Object.create(Object.getPrototypeOf(e)):{};e&&t.set(e,i);var n=RI({},e);for(var r in n){var a=n[r];$e(a)&&!Ye(a)&&!t.has(a)&&(n[r]=AA(a,t))}rr(i,n,!0,!0);for(var o in i){var s=i[o];$e(s)&&t.has(s)&&(i[o]=t.get(s))}return i}function va(e,t){var i=AA(e);return rr(i,t,!0,!0)}function Rs(e){var{keyInfo:t,data:i,changes:n,groupCount:r,useInsertIndex:a,immutable:o,disableCache:s,logError:l}=e,u=o===!0?[...i]:i;return n.forEach(d=>{var c=d.type==="insert"?u:k4(t,u,d.key,r);switch(!s&&B4(t,c),d.type){case"update":Mg(t,c,d.key,d.data,!0,o,l);break;case"insert":Vg(t,c,d.data,a&&E(d.index)?d.index:-1,!0,l);break;case"remove":DA(t,c,d.key,!0,l)}}),u}function lh(e,t,i){return e?t&&oi.log(i):aA(oi.Error(i))}function Mg(e,t,i,n,r,a,o){var s,l=e.key();if(l){if(R4(n,l)&&!Gu(l,i,e.keyOf(n)))return lh(r,o,"E4017");if(s=L4(t,i),!s){var u=bo(e,t,i);if(u<0)return lh(r,o,"E4009");if(s=t[u],a===!0&&E(s)){var d=va(s,n);return t[u]=d,!r&&Os(d,i)}}}else s=i;if(rr(s,n,!0),!r)return At().useLegacyStoreResult?Os(i,n):Os(s,i)}function Vg(e,t,i,n,r,a){var o,s=e.key(),l=Ye(i)?k({},i):i;if(s){if(o=e.keyOf(l),o===void 0||typeof o=="object"&&Pn(o)){if(Array.isArray(s))throw oi.Error("E4007");o=l[s]=String(new si)}else if(t[bo(e,t,o)]!==void 0)return lh(r,a,"E4008")}else o=l;if(n>=0?t.splice(n,0,l):t.push(l),TA(t,o,l),!r)return Os(At().useLegacyStoreResult?i:l,o)}function DA(e,t,i,n,r){var a=bo(e,t,i);if(a>-1&&(t.splice(a,1),TA(t,i,null)),n){if(a<0)return lh(n,r,"E4009")}else return Os(i)}function bo(e,t,i){var n=e.key();if(!P4(t,i))return-1;for(var r=0,a=t.length;r<a;r++)if(Gu(n,e.keyOf(t[r]),i))return r;return-1}var ju=it.inherit({toArray:function(){var e=[];for(this.reset();this.next();)e.push(this.current());return e},countable:function(){return!1}}),Ng=ju.inherit({ctor:function(e){this.array=e,this.index=-1},next:function(){return this.index+1<this.array.length?(this.index++,!0):!1},current:function(){return this.array[this.index]},reset:function(){this.index=-1},toArray:function(){return this.array.slice(0)},countable:function(){return!0},count:function(){return this.array.length}}),Yh=ju.inherit({ctor:function(e){this.iter=e},next:function(){return this.iter.next()},current:function(){return this.iter.current()},reset:function(){return this.iter.reset()}}),np=Yh.inherit({ctor:function(e,t){this.callBase(e),this.index=-1,this.mapper=t},current:function(){return this.mapper(this.callBase(),this.index)},next:function(){var e=this.callBase();return e&&this.index++,e}}),F4=function(e,t){return e=qt(e),t=qt(t),e===null&&t!==null?-1:e!==null&&t===null||e===void 0&&t!==void 0?1:e!==void 0&&t===void 0||e<t?-1:e>t?1:0},Q_=ju.inherit({ctor:function(e,t,i,n){e instanceof np||(e=new np(e,this._wrap)),this.iter=e,this.rules=[{getter:t,desc:i,compare:n}]},thenBy:function(e,t,i){var n=new Q_(this.sortedIter||this.iter,e,t,i);return this.sortedIter||(n.rules=this.rules.concat(n.rules)),n},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){var e=this;e.sortedIter||(V(e.rules,function(){this.getter=bt(this.getter)}),e.sortedIter=new np(new Ng(this.iter.toArray().sort(function(t,i){return e._compare(t,i)})),e._unwrap))},_wrap:function(e,t){return{index:t,value:e}},_unwrap:function(e){return e.value},_compare:function(e,t){var i=e.index,n=t.index;if(e=e.value,t=t.value,e===t)return i-n;for(var r=0,a=this.rules.length;r<a;r++){var o=this.rules[r],s=o.getter(e),l=o.getter(t),u=o.compare||F4,d=u(s,l);if(d)return o.desc?-d:d}return i-n}}),em=function(){var e=function(i){return E(i)?i.toString():""};function t(i,n,r){return function(a){a=qt(i(a));var o=function(s){return s===""||s===0||s===!1}(n)?a===n:a==n;return r&&(o=!o),o}}return function(i){return Ie(i)?i:YH(i)?function(n){var r=[],a=!1,o=!1;return V(n,function(){if(Array.isArray(this)||Ie(this)){if(r.length>1&&a!==o)throw new oi.Error("E4019");r.push(em(this)),a=o,o=!0}else o=KH(this)}),function(s){for(var l=a,u=0;u<r.length;u++)if(r[u](s)!==a){l=!a;break}return l}}(i):jH(i)?function(n){var r=n[0],a=em(n[1]);if(r==="!")return function(o){return!a(o)};throw oi.Error("E4003",r)}(i):function(n){n=zH(n);var r=bt(n[0]),a=n[1],o=n[2];switch(o=qt(o),a.toLowerCase()){case"=":return t(r,o);case"<>":return t(r,o,!0);case">":return function(s){return qt(r(s))>o};case"<":return function(s){return qt(r(s))<o};case">=":return function(s){return qt(r(s))>=o};case"<=":return function(s){return qt(r(s))<=o};case"startswith":return function(s){return qt(e(r(s))).indexOf(o)===0};case"endswith":return function(s){var l=qt(e(r(s))),u=e(o);if(l.length<u.length)return!1;var d=l.lastIndexOf(o);return d!==-1&&d===l.length-o.length};case"contains":return function(s){return qt(e(r(s))).indexOf(o)>-1};case"notcontains":return function(s){return qt(e(r(s))).indexOf(o)===-1}}throw oi.Error("E4003",a)}(i)}}(),M4=Yh.inherit({ctor:function(e,t){this.callBase(e),this.criteria=em(t)},next:function(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),V4=ju.inherit({ctor:function(e,t){this.iter=e,this.getter=t},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){if(!this.groupedIter){var e={},t=[],i=this.iter,n=bt(this.getter);for(i.reset();i.next();){var r=i.current(),a=n(r);a in e?e[a].push(r):(e[a]=[r],t.push(a))}this.groupedIter=new Ng(ti(t,function(o){return{key:o,items:e[o]}}))}}}),N4=Yh.inherit({ctor:function(e,t){this.callBase(e),this.getter=bt(t)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),$4=Yh.inherit({ctor:function(e,t,i){this.callBase(e),this.skip=Math.max(0,t),this.take=Math.max(0,i),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;for(;this.pos<this.skip&&this.iter.next();)this.pos++;return this.pos++,this.iter.next()},reset:function(){this.callBase(),this.pos=0},countable:function(){return this.iter.countable()},count:function(){return Math.min(this.iter.count()-this.skip,this.take)}}),Xh=function e(t,i){i=i||{},t instanceof ju||(t=new Ng(t));var n=function(u){var d=i.errorHandler;d&&d(u),Fg(u)},r=function(u){var d=new se().fail(n),c,h=u.step,f=u.finalize;try{t.reset(),"seed"in u?c=u.seed:c=t.next()?t.current():NaN;for(var p=c;t.next();)p=h(p,t.current());d.resolve(f?f(p):p)}catch(m){d.reject(m)}return d.promise()},a=function(u){return r(Rg[u])},o=function(u){return!Ie(u)&&!Array.isArray(u)&&(u=[].slice.call(arguments)),l(new N4(t,u))},s=function(u){return o(bt(u))};function l(u){return e(u,i)}return{toArray:function(){return t.toArray()},enumerate:function(){var u=new se().fail(n);try{u.resolve(t.toArray())}catch(d){u.reject(d)}return u.promise()},sortBy:function(u,d,c){return l(new Q_(t,u,d,c))},thenBy:function(u,d,c){if(t instanceof Q_)return l(t.thenBy(u,d,c));throw oi.Error("E4004")},filter:function(u){return Array.isArray(u)||(u=[].slice.call(arguments)),l(new M4(t,u))},slice:function(u,d){return d===void 0&&(d=Number.MAX_VALUE),l(new $4(t,u,d))},select:o,groupBy:function(u){return l(new V4(t,u))},aggregate:function(u,d,c){return arguments.length<2?r({step:arguments[0]}):r({seed:u,step:d,finalize:c})},count:function(){if(t.countable()){var u=new se().fail(n);try{u.resolve(t.count())}catch(d){u.reject(d)}return u.promise()}return a("count")},sum:function(u){return u?s(u).sum():a("sum")},min:function(u){return u?s(u).min():a("min")},max:function(u){return u?s(u).max():a("max")},avg:function(u){return u?s(u).avg():a("avg")}}};function $g(e,t){return e=e.groupBy(t[0].selector),t.length>1&&(e=e.select(function(i){return k({},i,{items:$g(Xh(i.items),t.slice(1)).toArray()})})),e}function OA(e,t){var i=[];return V(e,function(n,r){var a=zi(t,function(o){return r.selector===o.selector});a.length<1&&i.push(r)}),i.concat(t)}function H4(e,t,i){t=t||{};var n=t.filter;if(n&&(e=e.filter(n)),i)return e;var r=t.sort,a=t.select,o=t.group,s=t.skip,l=t.take;return o&&(o=jr(o),o.keepInitialKeyOrder=!!t.group.keepInitialKeyOrder),(r||o)&&(r=jr(r||[]),o&&!o.keepInitialKeyOrder&&(r=OA(o,r)),V(r,function(u){e=e[u?"thenBy":"sortBy"](this.selector,this.desc,this.compare)})),a&&(e=e.select(a)),o&&(e=$g(e,o)),(l||s)&&(e=e.slice(s||0,l)),e}const qr={multiLevelGroup:$g,arrangeSortingInfo:OA,queryByOptions:H4};var fl=it.abstract,w0=qr.queryByOptions,tm={},cr=it.inherit({ctor:function(e){var t=this;e=e||{},this._eventsStrategy=new Oo(this),V(["onLoaded","onLoading","onInserted","onInserting","onUpdated","onUpdating","onPush","onRemoved","onRemoving","onModified","onModifying"],function(i,n){n in e&&t.on(n.slice(2).toLowerCase(),e[n])}),this._key=e.key,this._errorHandler=e.errorHandler,this._useDefaultSearch=!0},_customLoadOptions:function(){return null},key:function(){return this._key},keyOf:function(e){return this._keyGetter||(this._keyGetter=bt(this.key())),this._keyGetter(e)},_requireKey:function(){if(!this.key())throw oi.Error("E4005")},load:function(e){var t=this;return e=e||{},this._eventsStrategy.fireEvent("loading",[e]),this._withLock(this._loadImpl(e)).done(function(i){t._eventsStrategy.fireEvent("loaded",[i,e])})},_loadImpl:function(e){return w0(this.createQuery(e),e).enumerate()},_withLock:function(e){var t=new se;return e.done(function(){var i=this,n=arguments;UH.promise().done(function(){t.resolveWith(i,n)})}).fail(function(){t.rejectWith(this,arguments)}),t},createQuery:fl,totalCount:function(e){return this._totalCountImpl(e)},_totalCountImpl:function(e){return w0(this.createQuery(e),e,!0).count()},byKey:function(e,t){return this._addFailHandlers(this._withLock(this._byKeyImpl(e,t)))},_byKeyImpl:fl,insert:function(e){var t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("inserting",[e]),t._addFailHandlers(t._insertImpl(e).done(function(i,n){t._eventsStrategy.fireEvent("inserted",[i,n]),t._eventsStrategy.fireEvent("modified")}))},_insertImpl:fl,update:function(e,t){var i=this;return i._eventsStrategy.fireEvent("modifying"),i._eventsStrategy.fireEvent("updating",[e,t]),i._addFailHandlers(i._updateImpl(e,t).done(function(){i._eventsStrategy.fireEvent("updated",[e,t]),i._eventsStrategy.fireEvent("modified")}))},_updateImpl:fl,push:function(e){var t={changes:e,waitFor:[]};this._eventsStrategy.fireEvent("beforePush",[t]),De(...t.waitFor).done(()=>{this._pushImpl(e),this._eventsStrategy.fireEvent("push",[e])})},_pushImpl:re,remove:function(e){var t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("removing",[e]),t._addFailHandlers(t._removeImpl(e).done(function(i){t._eventsStrategy.fireEvent("removed",[i]),t._eventsStrategy.fireEvent("modified")}))},_removeImpl:fl,_addFailHandlers:function(e){return e.fail(this._errorHandler).fail(Fg)},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}});cr.create=function(e,t){if(!(e in tm))throw oi.Error("E4020",e);return new tm[e](t)};cr.registerClass=function(e,t){return t&&(tm[t]=e),e};cr.inherit=function(e){return function(t,i){var n=e.apply(this,[t]);return cr.registerClass(n,i),n}}(cr.inherit);var RA="totalCount",im="load",kA="byKey",I0="insert",T0="update",A0="remove";function ks(e){return e&&Ie(e.then)}function co(e){return new se().resolve(e).promise()}function tu(e,t){if(!Ie(t))throw oi.Error("E4011",e)}function BA(e){throw oi.Error("E4012",e)}function Za(e){function t(i){var n=i[0],r=i[1];return!n||!n.getResponseHeader?null:GH(n,r)}return function(i){var n;i instanceof Error?n=i:n=new Error(t(arguments)||i&&String(i)||"Unknown error"),n.message!==rA&&e.reject(n)}}function LA(e,t){var i=e._loadFunc,n;return tu(im,i),n=i.apply(e,[t]),Array.isArray(n)?n=co(n):n==null?n=co([]):ks(n)||BA(im),yi(n)}function W4(e,t){var i=e._totalCountFunc,n;if(!Ie(i))throw oi.Error("E4021");return n=i.apply(e,[t]),ks(n)||(n=Number(n),isFinite(n)||BA(RA),n=co(n)),yi(n)}function z4(e,t,i){var n=e._byKeyFunc,r;return tu(kA,n),r=n.apply(e,[t,i]),ks(r)||(r=co(r)),yi(r)}function PA(e,t,i,n){if(t.__rawData)n(t.__rawData);else{var r=t.__rawDataPromise||LA(t,i);t._cacheRawData&&(t.__rawDataPromise=r),r.always(function(){delete t.__rawDataPromise}).done(function(a){t._cacheRawData&&(t.__rawData=a),n(a)}).fail(Za(e))}}function D0(e,t,i,n){i=i||{};var r={};"userData"in i&&(r.userData=i.userData),PA(e,t,r,function(a){var o=Xh(a,{errorHandler:t._errorHandler}),s,l,u=[],d,c;n||(s=qr.queryByOptions(o,i),s===o?d=a.slice(0):u.push(s.enumerate().done(function(h){d=h}))),(i.requireTotalCount||n)&&(l=qr.queryByOptions(o,i,!0),l===o?c=a.length:u.push(l.count().done(function(h){c=h}))),De.apply(v,u).done(function(){n?e.resolve(c):i.requireTotalCount?e.resolve(d,{totalCount:c}):e.resolve(d)}).fail(function(h){e.reject(h)})})}function G4(e,t,i){PA(e,t,{},function(n){for(var r=t.key(),a,o=0,s=n.length;o<s;o++)if(a=n[o],Gu(r,t.keyOf(n[o]),i)){e.resolve(a);return}e.reject(oi.Error("E4009"))})}var Ws=cr.inherit({ctor:function(e){e=e||{},this.callBase(e),this._useDefaultSearch=!!e.useDefaultSearch||e.loadMode==="raw",this._loadMode=e.loadMode,this._cacheRawData=e.cacheRawData!==!1,this._loadFunc=e[im],this._totalCountFunc=e[RA],this._byKeyFunc=e[kA],this._insertFunc=e[I0],this._updateFunc=e[T0],this._removeFunc=e[A0]},createQuery:function(){throw oi.Error("E4010")},clearRawDataCache:function(){delete this.__rawData},_totalCountImpl:function(e){var t=new se;return this._loadMode==="raw"&&!this._totalCountFunc?D0(t,this,e,!0):(W4(this,e).done(function(i){t.resolve(Number(i))}).fail(Za(t)),t=this._addFailHandlers(t)),t.promise()},_pushImpl:function(e){this.__rawData&&Rs({keyInfo:this,data:this.__rawData,changes:e})},_loadImpl:function(e){var t=new se;return this._loadMode==="raw"?D0(t,this,e,!1):(LA(this,e).done(function(i,n){t.resolve(i,n)}).fail(Za(t)),t=this._addFailHandlers(t)),t.promise()},_byKeyImpl:function(e,t){var i=new se;return this._byKeyViaLoad()?(this._requireKey(),G4(i,this,e)):z4(this,e,t).done(function(n){i.resolve(n)}).fail(Za(i)),i.promise()},_byKeyViaLoad:function(){return this._loadMode==="raw"&&!this._byKeyFunc},_insertImpl:function(e){var t=this,i=t._insertFunc,n,r=new se;return tu(I0,i),n=i.apply(t,[e]),ks(n)||(n=co(n)),yi(n).done(function(a){At().useLegacyStoreResult?r.resolve(e,a):r.resolve(a||e,t.keyOf(a))}).fail(Za(r)),r.promise()},_updateImpl:function(e,t){var i=this._updateFunc,n,r=new se;return tu(T0,i),n=i.apply(this,[e,t]),ks(n)||(n=co(n)),yi(n).done(function(a){At().useLegacyStoreResult?r.resolve(e,t):r.resolve(a||t,e)}).fail(Za(r)),r.promise()},_removeImpl:function(e){var t=this._removeFunc,i,n=new se;return tu(A0,t),i=t.apply(this,[e]),ks(i)||(i=co()),yi(i).done(function(){n.resolve(e)}).fail(Za(n)),n.promise()}});function FA(e){var t=[],i=!1;function n(){for(;t.length;){i=!0;var r=t.shift(),a=r();if(a!==void 0){if(a.then){De(a).always(n);return}throw xt.Error("E0015")}}i=!1}return{add:function(r,a){t.push(r),i||n()},busy:function(){return i}}}FA().add;function Pt(e,t){if(e==null)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;i[n]=e[n]}return i}var U4=je(),K4={getXhr:function(){return new U4.XMLHttpRequest}};const j4=Fn(K4);var Hg=je(),iu="success",rp="error",q4="timeout",Y4="nocontent",X4="parsererror",Z4=function(e){return 200<=e&&e<300},J4=function(e){return e!==204},Q4=function(e){var t=[];for(var i in e){var n=e[i];n!==void 0&&(n===null&&(n=""),typeof n=="function"&&(n=n()),t.push(encodeURIComponent(i)+"="+encodeURIComponent(n)))}return t.join("&")},MA=function(e){var t=me.createElement("script");for(var i in e)t[i]=e[i];return t},VA=function(e){e.parentNode.removeChild(e)},NA=function(e){return me.getHead().appendChild(e)},O0=function(e){var t=MA({text:e});NA(t),VA(t)},eW=function(e){var t=MA({src:e});return new Promise(function(i,n){var r={load:i,error:n},a=function(s){r[s.type](),VA(t)};for(var o in r)me.listen(t,o,a);NA(t)})},tW=function(e){var t=e.dataType||"*",i="text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",n={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",jsonp:i,script:i};return RI(n,e.accepts,!0),n[t]?n[t]+(t!=="*"?", */*; q=0.01":""):n["*"]},iW=function(e){var t;return e.data&&!e.upload&&Wg(e)!=="GET"&&(t="application/x-www-form-urlencoded;charset=utf-8"),e.contentType||t},nW=function(e){return e.responseType&&e.responseType!=="text"||typeof e.responseText!="string"?e.response:e.responseText},rW=function(e,t,i){var n=nW(t);switch(i){case"jsonp":O0(n);break;case"script":O0(n),e.resolve(n,iu,t);break;case"json":try{e.resolve(JSON.parse(n),iu,t)}catch(r){e.reject(t,X4,r)}break;default:e.resolve(n,iu,t)}},aW=function(e){if(!Ue())return!0;var t=!1,i=me.createElement("a"),n=me.createElement("a");i.href=Hg.location.href;try{n.href=e,n.href=n.href,t=i.protocol+"//"+i.host!=n.protocol+"//"+n.host}catch{t=!0}return t},oW=function(e,t){return e&&setTimeout(function(){t.customStatus=q4,t.abort()},e)},sW=function(e){if(e.dataType==="jsonp"){var t=Math.random().toString().replace(/\D/g,""),i=e.jsonpCallback||"dxCallback"+Date.now()+"_"+t,n=e.jsonp||"callback";return e.data=e.data||{},e.data[n]=i,i}},lW=function(e,t){var i=e.data,n=typeof i=="string",r=e.url||Hg.location.href;return!n&&!e.cache&&(i=i||{},i._=Date.now()),i&&!e.upload&&(n||(i=Q4(i)),Wg(e)==="GET"?(i!==""&&(r+=(r.indexOf("?")>-1?"&":"?")+i),i=null):t["Content-Type"]&&t["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(i=i.replace(/%20/g,"+"))),{url:r,parameters:i}};function Wg(e){return(e.method||"GET").toUpperCase()}var uW=function(e){var t=e.headers||{};return t["Content-Type"]=t["Content-Type"]||iW(e),t.Accept=t.Accept||tW(e),!e.crossDomain&&!t["X-Requested-With"]&&(t["X-Requested-With"]="XMLHttpRequest"),t},dW=function(e){var t=j4.getXhr(),i=new se,n=i.promise(),r=E(e.async)?e.async:!0,a=e.dataType,o=e.timeout||0,s;e.crossDomain=aW(e.url);var l=a==="jsonp"||a==="script";e.cache===void 0&&(e.cache=!l);var u=sW(e),d=uW(e),c=lW(e,d),h=c.url,f=c.parameters;if(u&&(Hg[u]=function(g){i.resolve(g,iu,t)}),e.crossDomain&&l)return eW(h).then(function(){a!=="jsonp"&&i.resolve(null,iu,t)},function(){i.reject(t,rp)}),n;if(e.crossDomain&&!("withCredentials"in t))return i.reject(t,rp),n;if(t.open(Wg(e),h,r,e.username,e.password),r&&(t.timeout=o,s=oW(o,t)),t.onreadystatechange=function(g){t.readyState===4&&(clearTimeout(s),Z4(t.status)?J4(t.status)?rW(i,t,a):i.resolve(null,Y4,t):i.reject(t,t.customStatus||rp))},e.upload&&(t.upload.onprogress=e.upload.onprogress,t.upload.onloadstart=e.upload.onloadstart,t.upload.onabort=e.upload.onabort),e.xhrFields)for(var p in e.xhrFields)t[p]=e.xhrFields[p];e.responseType==="arraybuffer"&&(t.responseType=e.responseType);for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&E(d[m])&&t.setRequestHeader(m,d[m]);return e.beforeSend&&e.beforeSend(t),t.send(f),n.abort=function(){t.abort()},n};const cW=Fn({sendRequest:dW}),hW={};var fW=function e(t,i,n){n=n||[],i=i||{};var r=function(s,l){return{name:s,args:l}},a=function(s){var l=new se,u,d,c,h,f,p=function(C){var b=i.errorHandler;b&&b(C),Fg(C),l.reject(C)};function m(C){switch(C.name){case"sortBy":return f=[C.args],!0;case"thenBy":if(!f)throw oi.Error("E4004");return f.push(C.args),!0}return!1}try{u=i.adapter,Ie(u)||(u=hW[u]),d=u(i),c=[].concat(n).concat(s);var g=d.optimize;for(g&&g(c);c.length;){if(h=c[0],!m(h)){if(f){c.unshift(r("multiSort",[f])),f=null;continue}if(String(h.name)!=="enumerate"&&(!d[h.name]||d[h.name].apply(d,h.args)===!1))break}c.shift()}(function(){var C=c[0],b=[];C&&C.name==="multiSort"&&(c.shift(),V(C.args[0],function(){b.push(r(b.length?"thenBy":"sortBy",this))})),c=b.concat(c)})(),d.exec(t).done(function(C,b){if(!c.length)l.resolve(C,b);else{var A=Xh(C,{errorHandler:i.errorHandler});V(c,function(){A=A[this.name].apply(A,this.args)}),A.done(l.resolve).fail(l.reject)}}).fail(p)}catch(C){p(C)}return l.promise()},o={};return V(["sortBy","thenBy","filter","slice","select","groupBy"],function(){var s=String(this);o[s]=function(){return e(t,i,n.concat(r(s,arguments)))}}),V(["count","min","max","sum","avg","aggregate","enumerate"],function(){var s=String(this);o[s]=function(){return a.call(this,r(s,arguments))}}),o},pW={array:Xh,remote:fW},Yi=function(){var e=Array.isArray(arguments[0])?"array":"remote";return pW[e].apply(this,arguments)},Qs=cr.inherit({ctor:function(e){Array.isArray(e)?e={data:e}:e=e||{},this.callBase(e);var t=e.data;if(t&&!Array.isArray(t))throw oi.Error("E4006");this._array=t||[]},createQuery:function(){return Yi(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(e){var t=bo(this,this._array,e);return t===-1?aA(oi.Error("E4009")):Os(this._array[t])},_insertImpl:function(e){return Vg(this,this._array,e)},_pushImpl:function(e){Rs({keyInfo:this,data:this._array,changes:e})},_updateImpl:function(e,t){return Mg(this,this._array,e,t)},_removeImpl:function(e){return DA(this,this._array,e)},clear:function(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array"),vW=["items"],$A="canceled",R0=e=>e.state()==="pending",k0=e=>{switch(e.length){case 0:return;case 1:return e[0]}return[].slice.call(e)},_W=(e,t,i)=>ti(e,n=>{var r=Pt(n,vW);return Se({},r,{items:HA(n.items,t-1,i)})}),HA=(e,t,i)=>Array.isArray(e)?t?_W(e,t,i):ti(e,i):e,mW=(e,t,i)=>{var n=i?jr(i).length:0;return HA(e,n,t)},WA=(e,t)=>{var i;return(i=e)!==null&&i!==void 0&&i.data&&(t=e,e=e.data),Array.isArray(e)||(e=[e]),{data:e,extra:t}},gW=e=>{var t={};return V(["useDefaultSearch","key","load","loadMode","cacheRawData","byKey","lookup","totalCount","insert","update","remove"],function(){t[this]=e[this],delete e[this]}),new Ws(t)},CW=e=>{var t=e.type;return delete e.type,cr.create(t,e)},yW=(e,t)=>new Ws({load:()=>cW.sendRequest({url:e,dataType:"json"}),loadMode:t==null?void 0:t.fromUrlLoadMode}),el=(e,t)=>{var i;return typeof e=="string"&&(e={paginate:!1,store:yW(e,t)}),e===void 0&&(e=[]),Array.isArray(e)||e instanceof cr?e={store:e}:e=k({},e),e.store===void 0&&(e.store=[]),i=e.store,"load"in e?i=gW(e):Array.isArray(i)?i=new Qs(i):Ye(i)&&(i=CW(k({},i))),e.store=i,e};class xW{constructor(){this._counter=-1,this._deferreds={}}add(t){return this._counter++,this._deferreds[this._counter]=t,this._counter}remove(t){return delete this._deferreds[t]}cancel(t){return t in this._deferreds?(this._deferreds[t].reject($A),!0):!1}cancelAll(){for(;this._counter>-1;)this.cancel(this._counter),this._counter--}}var fr=it.inherit({ctor(e){var t;e=el(e),this._eventsStrategy=new Oo(this,{syncStrategy:!0}),this._store=e.store,this._changedTime=0;var i=e.pushAggregationTimeout!==0;if(i){var n=e.pushAggregationTimeout===void 0?()=>5*this._changedTime:e.pushAggregationTimeout,r,a,o=ZH(s=>{r.resolve();var l=De(...a);l.done(()=>this._onPush(s)),a=void 0,r=void 0},n);this._onPushHandler=s=>{this._aggregationTimeoutId=o(s.changes),r||(r=new se),a=s.waitFor,s.waitFor.push(r.promise())},this._store.on("beforePush",this._onPushHandler)}else this._onPushHandler=s=>this._onPush(s),this._store.on("push",this._onPushHandler);this._storeLoadOptions=this._extractLoadOptions(e),this._mapFunc=e.map,this._postProcessFunc=e.postProcess,this._pageIndex=e.pageIndex!==void 0?e.pageIndex:0,this._pageSize=e.pageSize!==void 0?e.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in e?e.searchValue:null,this._searchOperation=e.searchOperation||"contains",this._searchExpr=e.searchExpr,this._paginate=e.paginate,this._reshapeOnPush=(t=e.reshapeOnPush)!==null&&t!==void 0?t:!1,V(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],(s,l)=>{l in e&&this.on(l.substr(2,1).toLowerCase()+l.substr(3),e[l])}),this._operationManager=new xW,this._init()},_init(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,E(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose(){var e;this._store.off("beforePush",this._onPushHandler),this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),(e=this._delayedLoadTask)===null||e===void 0||e.abort(),this._operationManager.cancelAll(),delete this._store,delete this._items,delete this._delayedLoadTask,this._disposed=!0},_extractLoadOptions(e){var t={},i=["sort","filter","select","group","requireTotalCount"],n=this._store._customLoadOptions();return n&&(i=i.concat(n)),V(i,function(){t[this]=e[this]}),t},loadOptions(){return this._storeLoadOptions},items(){return this._items},pageIndex(e){if(!Et(e))return this._pageIndex;this._pageIndex=e,this._isLastPage=!this._paginate},paginate(e){if(!Ps(e))return this._paginate;this._paginate!==e&&(this._paginate=e,this.pageIndex(0))},pageSize(e){if(!Et(e))return this._pageSize;this._pageSize=e},isLastPage(){return this._isLastPage},generateStoreLoadOptionAccessor(e){return t=>{var i=k0(t);if(i===void 0)return this._storeLoadOptions[e];this._storeLoadOptions[e]=i}},sort(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("sort")(t)},filter(){var e=k0(arguments);if(e===void 0)return this._storeLoadOptions.filter;this._storeLoadOptions.filter=e,this.pageIndex(0)},group(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("group")(t)},select(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("select")(t)},requireTotalCount(e){if(!Ps(e))return this._storeLoadOptions.requireTotalCount;this._storeLoadOptions.requireTotalCount=e},searchValue(e){if(arguments.length<1)return this._searchValue;this._searchValue=e,this.pageIndex(0)},searchOperation(e){if(!Ve(e))return this._searchOperation;this._searchOperation=e,this.pageIndex(0)},searchExpr(e){var t=arguments.length;if(t===0)return this._searchExpr;t>1&&(e=[].slice.call(arguments)),this._searchExpr=e,this.pageIndex(0)},store(){return this._store},key(){var e;return(e=this._store)===null||e===void 0?void 0:e.key()},totalCount(){return this._totalCount},isLoaded(){return this._isLoaded},isLoading(){return this._loadingCount>0},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_createLoadQueue:()=>FA(),_changeLoadingCount(e){var t=this.isLoading();this._loadingCount+=e;var i=this.isLoading();t^i&&this._eventsStrategy.fireEvent("loadingChanged",[i])},_scheduleLoadCallbacks(e){this.beginLoading(),e.always(()=>{this.endLoading()})},_scheduleFailCallbacks(e){var t=this;e.fail(function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n[0]!==$A&&t._eventsStrategy.fireEvent("loadError",n)})},_fireChanged(e){var t=new Date;this._eventsStrategy.fireEvent("changed",e),this._changedTime=new Date-t},_scheduleChangedCallbacks(e){e.done(()=>this._fireChanged())},loadSingle(e,t){var i=new se,n=this.key(),r=this._store,a=this._createStoreLoadOptions();return this._scheduleFailCallbacks(i),arguments.length<2&&(t=e,e=n),delete a.skip,delete a.group,delete a.refresh,delete a.pageIndex,delete a.searchString,(e===n||r instanceof Ws&&!r._byKeyViaLoad()?r.byKey(t,a):(a.take=1,a.filter=a.filter?[a.filter,[e,t]]:[e,t],r.load(a))).fail(i.reject).done(o=>{var s=Array.isArray(o)&&!o.length;!E(o)||s?i.reject(new oi.Error("E4009")):(Array.isArray(o)||(o=[o]),i.resolve(this._applyMapFunction(o)[0]))}),i.promise()},load(){var e=new se,t=()=>{if(!this._disposed&&R0(e))return this._loadFromStore(i,e)};this._scheduleLoadCallbacks(e),this._scheduleFailCallbacks(e),this._scheduleChangedCallbacks(e);var i=this._createLoadOperation(e);return this._eventsStrategy.fireEvent("customizeStoreLoadOptions",[i]),this._loadQueue.add(()=>(typeof i.delay=="number"?this._delayedLoadTask=Lh(t,i.delay):t(),e.promise())),e.promise({operationId:i.operationId})},_onPush(e){if(this._reshapeOnPush)this.load();else{this._eventsStrategy.fireEvent("changing",[{changes:e}]);var t=this.group(),i=this.items(),n=0,r=this.paginate()||t?e.filter(a=>a.type==="update"):e;t&&(n=Array.isArray(t)?t.length:1),this._mapFunc&&r.forEach(a=>{a.type==="insert"&&(a.data=this._mapFunc(a.data))}),Rs({keyInfo:this.store(),data:i,changes:r,groupCount:n,useInsertIndex:!0}),this._fireChanged([{changes:e}])}},_createLoadOperation(e){var t=this._operationManager.add(e),i=this._createStoreLoadOptions();return e.always(()=>this._operationManager.remove(t)),{operationId:t,storeLoadOptions:i}},reload(){var e=this.store();return e instanceof Ws&&e.clearRawDataCache(),this._init(),this.load()},cancel(e){return this._operationManager.cancel(e)},cancelAll(){return this._operationManager.cancelAll()},_addSearchOptions(e){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(e):(e.searchOperation=this._searchOperation,e.searchValue=this._searchValue,e.searchExpr=this._searchExpr))},_createStoreLoadOptions(){var e=k({},this._storeLoadOptions);return this._addSearchOptions(e),this._paginate&&this._pageSize&&(e.skip=this._pageIndex*this._pageSize,e.take=this._pageSize),e.userData=this._userData,e},_addSearchFilter(e){var t=this._searchValue,i=this._searchOperation,n=this._searchExpr,r=[];t&&(n||(n="this"),Array.isArray(n)||(n=[n]),V(n,function(a,o){r.length&&r.push("or"),r.push([o,i,t])}),e.filter?e.filter=[r,e.filter]:e.filter=r)},_loadFromStore(e,t){var i=(n,r)=>{if(!this._disposed&&R0(t)){var a=k(WA(n,r),e);this._eventsStrategy.fireEvent("customizeLoadResult",[a]),De(a.data).done(o=>{a.data=o,this._processStoreLoadResult(a,t)}).fail(t.reject)}};return e.data?new se().resolve(e.data).done(i):this.store().load(e.storeLoadOptions).done(i).fail(t.reject)},_processStoreLoadResult(e,t){var i=e.data,n=e.extra,r=e.storeLoadOptions,a=()=>(this._isLoaded=!0,this._totalCount=isFinite(n.totalCount)?n.totalCount:-1,t.resolve(i,n));this._disposed||(i=this._applyPostProcessFunction(this._applyMapFunction(i)),Ye(n)||(n={}),this._items=i,(!i.length||!this._paginate||this._pageSize&&i.length<this._pageSize)&&(this._isLastPage=!0),r.requireTotalCount&&!isFinite(n.totalCount)?this.store().totalCount(r).done(function(o){n.totalCount=o,a()}).fail(t.reject):a())},_applyMapFunction(e){return this._mapFunc?mW(e,this._mapFunc,this.group()):e},_applyPostProcessFunction(e){return this._postProcessFunc?this._postProcessFunc(e):e},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}}),bW="dx-selection-disabled",SW="dx-datagrid-group-opened",EW="dx-datagrid-group-closed",wW="dx-datagrid-expand",IW="nodata",TW="infinite",B0="virtual",AW="scrolling.legacyMode",L0="scrolling.mode",DW="scrolling.rowRenderingMode",OW={year:function(e){return e&&e.getFullYear()},month:function(e){return e&&e.getMonth()+1},day:function(e){return e&&e.getDate()},quarter:function(e){return e&&Math.floor(e.getMonth()/3)+1},hour:function(e){return e&&e.getHours()},minute:function(e){return e&&e.getMinutes()},second:function(e){return e&&e.getSeconds()}},RW=function(){var e=arguments[1],t=this.calculateCellValue(e);if(E(t)){if(zA(this.dataType)){var i=arguments[0];return OW[i](t)}else if(this.dataType==="number"){var n=arguments[0];return Math.floor(Number(t)/n)*n}}else return null},kW=function(e,t){return Ie(e)&&Ie(t)&&e.originalCallback&&t.originalCallback?e.originalCallback===t.originalCallback&&e.columnIndex===t.columnIndex:e===t};function zA(e){return e==="date"||e==="datetime"}var P0=function(e){e.get(0).textContent=" "},ap=function(e){e=e||[];for(var t=jr(e),i=0;i<e.length;i++)e&&e[i]&&e[i].isExpanded!==void 0&&(t[i].isExpanded=e[i].isExpanded),e&&e[i]&&e[i].groupInterval!==void 0&&(t[i].groupInterval=e[i].groupInterval);return t},GA=function(e,t){var i=wA.format(e,t.format)||e&&e.toString()||"",n={value:e,valueText:t.getDisplayFormat?t.getDisplayFormat(i):i,target:t.target||"row",groupInterval:t.groupInterval};return t.customizeText?t.customizeText.call(t,n):n.valueText},F0=function(e,t){var i=e.displayFormat||e.columnCaption&&t[e.summaryType+"OtherColumn"]||t[e.summaryType];return GA(e.value,{format:e.valueFormat,getDisplayFormat:function(n){return i?Kr(i,n,e.columnCaption):n},customizeText:e.customizeText})},M0=function(e){var t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]},BW=function e(t,i){if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(var n=0;n<t.length;n++)if(!e(t[n],i[n]))return!1;return!0}else return Ie(t)&&t.columnIndex>=0&&Ie(i)&&i.columnIndex>=0?t.columnIndex===i.columnIndex&&qt(t.filterValue)===qt(i.filterValue):qt(t)==qt(i)};const be={renderNoDataText:function(e){if(e=e||this.element(),!!e){var t=this.addWidgetPrefix(IW),i=e.find("."+t).last(),n=this._dataController.isEmpty(),r=this._dataController.isLoading();i.length||(i=v("<span>").addClass(t).appendTo(e)),n&&!r?i.removeClass("dx-hidden").text(this._getNoDataText()):i.addClass("dx-hidden")}},renderLoadPanel:function(e,t,i){var n;this._loadPanel&&this._loadPanel.$element().remove(),n=this.option("loadPanel"),n&&(n.enabled==="auto"?!i:n.enabled)?(n=k({shading:!1,message:n.text,container:t},n),this._loadPanel=this._createComponent(v("<div>").appendTo(t),Og,n)):this._loadPanel=null},calculateLoadPanelPosition(e){var t=v(je());return Ke(e)>Ke(t)?{of:t,boundary:e,collision:"fit"}:{of:e}},getIndexByKey:function(e,t,i){var n=-1;if(e!==void 0&&Array.isArray(t)){i=arguments.length<=2?"key":i;for(var r=0;r<t.length;r++){var a=E(i)?t[r][i]:t[r];if(Bt(e,a)){n=r;break}}}return n},combineFilters:function(e,t){var i=[];t=t||"and";for(var n=0;n<e.length;n++){var r;if(e[n]){if(((r=e[n])===null||r===void 0?void 0:r.length)===1&&e[n][0]==="!"){if(t==="and")return["!"];if(t==="or")continue}i.length&&i.push(t),i.push(e[n])}}if(i.length===1&&(i=i[0]),i.length)return i},checkChanges:function(e,t){for(var i=0,n=0;n<t.length;n++)e[t[n]]&&i++;return e.length&&e.length===i},equalFilterParameters:BW,proxyMethod:function(e,t,i){e[t]||(e[t]=function(){var n=this._dataSource;return n?n[t].apply(n,arguments):i})},formatValue:GA,getFormatOptionsByColumn:function(e,t){return{format:e.format,getDisplayFormat:e.getDisplayFormat,customizeText:e.customizeText,target:t,trueText:e.trueText,falseText:e.falseText}},getDisplayValue:function(e,t,i,n){return e.displayValueMap&&e.displayValueMap[t]!==void 0?e.displayValueMap[t]:e.calculateDisplayValue&&i&&n!=="group"?e.calculateDisplayValue(i):e.lookup&&!(n==="group"&&(e.calculateGroupValue||e.calculateDisplayValue))?e.lookup.calculateCellValue(t):t},getGroupRowSummaryText:function(e,t){for(var i="(",n=0;n<e.length;n++){var r=e[n];i+=(n>0?", ":"")+F0(r,t)}return i+")"},getSummaryText:F0,normalizeSortingInfo:ap,getFormatByDataType:function(e){switch(e){case"date":return"shortDate";case"datetime":return"shortDateShortTime"}},getHeaderFilterGroupParameters:function(e,t){var i=[],n=e.dataField||e.name,r=$s.getGroupInterval(e);return r?(V(r,function(a,o){i.push(t?{selector:n,groupInterval:o,isExpanded:a<r.length-1}:RW.bind(e,o))}),i):(t?i=[{selector:n,isExpanded:!1}]:(i=function(a){var o=e.calculateCellValue(a);return(o===void 0||o==="")&&(o=null),o},e.sortingMethod&&(i=[{selector:i,compare:e.sortingMethod.bind(e)}])),i)},equalSortParameters(e,t,i){if(e=ap(e),t=ap(t),Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!kW(e[n].selector,t[n].selector)||e[n].desc!==t[n].desc||e[n].groupInterval!==t[n].groupInterval||!i&&!!e[n].isExpanded!=!!t[n].isExpanded)return!1;return!0}else return(!e||!e.length)==(!t||!t.length)},getPointsByColumns:function(e,t,i,n){for(var r=e.length,a=!1,o,s,l=n||0,u=[],d,c=0;c<=r;c++){c<r&&(o=e.eq(c),s=o.offset(),d=o.css("direction")==="rtl");var h={index:l,x:s?s.left+(!i&&d^c===r?Ut(o[0]).width:0):0,y:s?s.top+(i&&c===r?Ut(o[0]).height:0):0,columnIndex:l};if(!i&&c>0){var f=e.eq(c-1).offset();f.top<h.y&&(h.y=f.top)}t&&(a=t(h)),a||u.push(h),l++}return u},getExpandCellTemplate:function(){return{allowRenderToDetachedContainer:!0,render:function(e,t){var i=v(e);if(E(t.value)&&!(t.data&&t.data.isContinuation)&&!t.row.isNewRow){var n=t.component.getView("rowsView");i.addClass(wW).addClass(bW),v("<div>").addClass(t.value?SW:EW).appendTo(i),n.setAria("label",t.value?n.localize("dxDataGrid-ariaCollapse"):n.localize("dxDataGrid-ariaExpand"),i)}else P0(i)}}},setEmptyText:P0,isDateType:zA,getSelectionRange:function(e){try{if(e)return{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}catch{}return{}},setSelectionRange:function(e,t){try{e&&e.setSelectionRange&&e.setSelectionRange(t.selectionStart,t.selectionEnd)}catch{}},focusAndSelectElement:function(e,t){var i=t.is(":focus");R.trigger(t,"focus");var n=e.option("editing.selectTextOnEditStart"),r=t.get(0);if(!i&&n&&t.is(".dx-texteditor-input")&&!t.is("[readonly]")){var a=M0(t.closest(".dx-texteditor"));De(a&&a._loadItemDeferred).done(function(){r.select()})}},getWidgetInstance:M0,getLastResizableColumnIndex:function(e,t){var i=e.some(s=>s&&!s.command&&!s.fixed&&s.allowResizing!==!1),n;for(n=e.length-1;e[n];n--){var r=e[n],a=t&&t[n],o=!i||r.allowResizing!==!1;if(!r.command&&!r.fixed&&a!=="adaptiveHidden"&&o)break}return n},isElementInCurrentGrid:function(e,t){if(t&&t.length){var i=t.closest("."+e.getWidgetContainerClass()).parent();return i.is(e.component.$element())}return!1},isVirtualRowRendering:function(e){var t=e.option(DW),i=e.option(L0)===B0,n=e.option(L0)===TW;return e.option(AW)===!1&&(i||n)?!0:t===B0},getPixelRatio:function(e){return e.devicePixelRatio||1},getContentHeightLimit(e){return e.mozilla?8e6:15e6/this.getPixelRatio(je())},normalizeLookupDataSource(e){var t;return e.items?t=e.items:(t=e.dataSource,Ie(t)&&!Hi.isWrapped(t)&&(t=t({}))),el(t)},getWrappedLookupDataSource(e,t,i){var n=this.normalizeLookupDataSource(e.lookup),r=e.displayField&&Ve(e.displayField),a=r?[e.dataField,e.displayField]:e.dataField,o={load:s=>{var l=new se;return t.load({filter:i,group:a,isExpanded:!1}).done(u=>{if(u.length===0&&l.resolve([]),r){var d=u.map(f=>{var p;return{[e.lookup.valueExpr]:f.key,[e.lookup.displayExpr]:(p=e.displayValueMap[f.key])!==null&&p!==void 0?p:f.items[0].key}}),c=new fr(Se({},s,{store:new Qs({data:d,key:e.lookup.valueExpr})}));c.load(s).done(l.resolve).fail(l.fail)}else{var h=this.combineFilters(u.map(f=>[e.lookup.valueExpr,f.key]),"or");new fr(Se({},n,s,{filter:this.combineFilters([h,s.filter],"and")})).load(s).done(l.resolve).fail(l.fail)}}).fail(l.fail),l},key:e.lookup.valueExpr,byKey(s){var l=se();return this.load({filter:[e.lookup.valueExpr,"=",s]}).done(u=>{l.resolve(u[0])}),l.promise()}};return o}};var LW="dxDataGrid",UA=it.inherit({_endUpdateCore:function(){},ctor:function(e){var t=this;t._updateLockCount=0,t.component=e,t._actions={},t._actionConfigs={},V(this.callbackNames()||[],function(i,n){var r=t.callbackFlags(n)||{};r.unique=!0,r.syncStrategy=!0,t[this]=dt(r)})},init:function(){},callbackNames:function(){},callbackFlags:function(){},publicMethods:function(){},beginUpdate:function(){this._updateLockCount++},endUpdate:function(){this._updateLockCount>0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())},option:function(e){var t=this.component,i=t._optionCache;return arguments.length===1&&i?(e in i||(i[e]=t.option(e)),i[e]):t.option.apply(t,arguments)},_silentOption:function(e,t){var i=this.component,n=i._optionCache;return n&&(n[e]=t),i._setOptionWithoutOptionChange(e,t)},localize:function(e){var t=this.component._optionCache;return t?(e in t||(t[e]=fe.format(e)),t[e]):fe.format(e)},on:function(){return this.component.on.apply(this.component,arguments)},off:function(){return this.component.off.apply(this.component,arguments)},optionChanged:function(e){e.name in this._actions&&(this.createAction(e.name,this._actionConfigs[e.name]),e.handled=!0)},getAction:function(e){return this._actions[e]},setAria:function(e,t,i){var n=i.get(0),r=e!=="role"&&e!=="id"?"aria-":"";n.setAttribute?n.setAttribute(r+e,t):i.attr(r+e,t)},_createComponent:function(){return this.component._createComponent.apply(this.component,arguments)},getController:function(e){return this.component._controllers[e]},createAction:function(e,t){if(Ie(e)){var i=this.component._createAction(e.bind(this),t);return function(n){i({event:n})}}else this._actions[e]=this.component._createActionByOption(e,t),this._actionConfigs[e]=t},executeAction:function(e,t){var i=this._actions[e];return i&&i(t)},dispose:function(){var e=this;V(e.callbackNames()||[],function(){e[this].empty()})},addWidgetPrefix:function(e){var t=this.component.NAME;return"dx-"+t.slice(2).toLowerCase()+(e?"-"+e:"")},getWidgetContainerClass:function(){var e=this.component.NAME===LW?null:"container";return this.addWidgetPrefix(e)},elementIsInsideGrid:function(e){var t=e.closest("."+this.getWidgetContainerClass()).parent();return t.is(this.component.$element())}}),uh=UA,PW=uh.inherit({getView:function(e){return this.component._views[e]},getViews:function(){return this.component._views}}),KA=UA.inherit({_isReady:function(){return this.component.isReady()},_endUpdateCore:function(){this.callBase(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))},_invalidate:function(e,t){this._requireRender=!0,this.component._requireResize=Ue()&&(this.component._requireResize||e),this._requireReady=this._requireReady||t},_renderCore:function(){},_resizeCore:function(){},_parentElement:function(){return this._$parent},ctor:function(e){this.callBase(e),this.renderCompleted=dt(),this.resizeCompleted=dt()},element:function(){return this._$element},getElementHeight:function(){var e=this.element();if(!e)return 0;var t=parseFloat(e.css("marginTop"))||0,i=parseFloat(e.css("marginBottom"))||0,n=e.get(0).offsetHeight;return n+t+i},isVisible:function(){return!0},getTemplate:function(e){return this.component._getTemplate(e)},render:function(e,t){var i=this._$element,n=this.isVisible();!i&&!e||(this._requireReady=!1,i||(i=this._$element=v("<div>").appendTo(e),this._$parent=e),i.toggleClass("dx-hidden",!n),n&&(this.component._optionCache={},this._renderCore(t),this.component._optionCache=void 0,this.renderCompleted.fire(t)))},resize:function(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1},focus:function(){R.trigger(this.element(),"focus")}}),V0=1e6,FW=function(e,t){var i=t.modules,n=t.modulesOrder,r=t.controllerTypes||{},a=t.viewTypes||{};t.controllerTypes||(n&&i.sort(function(s,l){var u=n.indexOf(s.name),d=n.indexOf(l.name);return u<0&&(u=V0),d<0&&(d=V0),u-d}),V(i,function(){var s=this.controllers,l=this.name,u=this.views;s&&V(s,function(d,c){if(r[d])throw Qe.Error("E1001",l,d);if(!(c&&c.subclassOf&&c.subclassOf(uh)))throw c.subclassOf(uh),Qe.Error("E1002",l,d);r[d]=c}),u&&V(u,function(d,c){if(a[d])throw Qe.Error("E1003",l,d);if(!(c&&c.subclassOf&&c.subclassOf(KA)))throw Qe.Error("E1004",l,d);a[d]=c})}),V(i,function(){var s=this.extenders;s&&(s.controllers&&V(s.controllers,function(l,u){r[l]&&(r[l]=r[l].inherit(u))}),s.views&&V(s.views,function(l,u){a[l]&&(a[l]=a[l].inherit(u))}))}),t.controllerTypes=r,t.viewTypes=a);var o=function(s){var l={};return V(s,function(u,d){var c=new d(e);c.name=u,function(h,f,p){var m=p.publicMethods();m&&V(m,function(g,C){if(p[C])if(!h[C])h[C]=function(){return p[C].apply(p,arguments)};else throw Qe.Error("E1005",C);else throw Qe.Error("E1006",f,C)})}(e,u,c),l[u]=c}),l};e._controllers=o(r),e._views=o(a)},MW=function(e,t,i){i=i||[],e._controllers&&V(e._controllers,function(){this[t]&&this[t].apply(this,i)}),e._views&&V(e._views,function(){this[t]&&this[t].apply(this,i)})};const Dt={modules:[],View:KA,ViewController:PW,Controller:uh,registerModule:function(e,t){for(var i=this.modules,n=0;n<i.length;n++)if(i[n].name===e)return;t.name=e,i.push(t),delete this.controllerTypes,delete this.viewTypes},registerModulesOrder:function(e){this.modulesOrder=e},unregisterModule:function(e){this.modules=zi(this.modules,function(t){return t.name!==e}),delete this.controllerTypes,delete this.viewTypes},processModules:FW,callModuleItemsMethod:MW},Oe=Se({},Dt,be,{modules:[]});var qu="dxdblclick",VW="dxDblClick",N0=ye(vt,VW),NW=300,$W=it.inherit({ctor:function(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick:function(){this._firstClickTarget=null,this._lastClickTimeStamp=-300},add:function(){this._handlerCount<=0&&R.on(me.getDocument(),N0,this._clickHandler.bind(this)),this._handlerCount++},_clickHandler:function(e){var t=e.timeStamp||Date.now(),i=t-this._lastClickTimeStamp,n=i<0,r=!n&&i<NW;r?(Da({type:qu,target:XV(this._firstClickTarget,e.target),originalEvent:e}),this._forgetLastClick()):(this._firstClickTarget=e.target,this._lastClickTimeStamp=t)},remove:function(){this._handlerCount--,this._handlerCount<=0&&(this._forgetLastClick(),R.off(me.getDocument(),N0))}});Mn(qu,new $W);var $0="dx-column-indicators",HW="dx-group-panel-item";const WW={_applyColumnState:function(e){var t,i=this.option("rtlEnabled"),n=this._getColumnAlignment(e.column.alignment,i),r=k(!0,{columnAlignment:n},e),a=r.rootElement.hasClass(HW),o=this._createIndicatorContainer(r,a),s=v("<span>").addClass(this._getIndicatorClassName(e.name)),l=(t=this.component)===null||t===void 0?void 0:t.getController("columns"),u=(l==null?void 0:l.getHeaderContentAlignment(n))||n;return r.container=o,r.indicator=s,this._renderIndicator(r),o[(a||!e.showColumnLines)&&u==="left"?"appendTo":"prependTo"](e.rootElement),s},_getIndicatorClassName:re,_getColumnAlignment:function(e,t){return t=t||this.option("rtlEnabled"),e&&e!=="center"?e:Ra(t)},_createIndicatorContainer:function(e,t){var i=this._getIndicatorContainer(e.rootElement),n=e.columnAlignment==="left"?"right":"left";return i.length||(i=v("<div>").addClass($0)),this.setAria("role","presentation",i),i.css("float",e.showColumnLines&&!t?n:null)},_getIndicatorContainer:function(e){return e&&e.find("."+$0)},_getIndicatorElements:function(e){var t=this._getIndicatorContainer(e);return t&&t.children()},_renderIndicator:function(e){var t=e.container,i=e.indicator;t&&i&&t.append(i)},_updateIndicators:function(e){var t=this.getColumns(),i=this.getColumnElements(),n;if(!(!i||t.length!==i.length))for(var r=0;r<t.length;r++){n=i.eq(r),this._updateIndicator(n,t[r],e);var a=n.parent().data("options");a&&a.cells&&(a.cells[n.index()].column=t[r])}},_updateIndicator:function(e,t,i){if(!t.command)return this._applyColumnState({name:i,rootElement:e,column:t,showColumnLines:this.option("showColumnLines")})}};var H0="scroll-container",zW="scrollable-simulated",GW="group-space",UW="content",KW="table",jW="table-fixed",qW="content-fixed",pl="dx-row",op="dx-group-row",YW="dx-group-cell",sp="dx-master-detail-row",XW="filter-row",ZW="dx-error-row",JW="cell-updated-animation",W0="0.0001px",lp="dxCellHintVisible",QW="dx-field-item-content",ez={render:function(e){e.container.append(e.content)}},tz=function(e,t){var i,n,r;function a(o){return setTimeout(function(){i=n=null},o)}R.on(t,"touchstart touchend",".dx-row",function(o){clearTimeout(r),o.type==="touchstart"?(i=o.target,n=o.currentTarget,r=a(1e3)):r=a()}),R.on(t,[vt,qu,lt.down].join(" "),".dx-row",e.createAction(function(o){var s=o.event;i&&(s.target=i,s.currentTarget=n),v(s.target).closest("a").length||(o.rowIndex=e.getRowIndex(s.currentTarget),o.rowIndex>=0&&(o.rowElement=Me(v(s.currentTarget)),o.columns=e.getColumns(),s.type===lt.down?e._rowPointerDown(o):s.type===vt?e._rowClick(o):e._rowDblClick(o)))}))},wd=function(e){return e==="auto"?"":Et(e)?e+"px":e},z0=function(e,t,i){e.style.width=e.style.maxWidth=t.width==="auto"?"":i},iz=function(e,t){if(!(!e||!t)){var i=e.attributes,n=t.attributes,r;for(r=0;r<i.length;r++){var a=i[r].nodeName;t.hasAttribute(a)||e.removeAttribute(a)}for(r=0;r<n.length;r++)e.setAttribute(n[r].nodeName,n[r].nodeValue)}},Yu=Dt.View.inherit(WW).inherit({_createScrollableOptions:function(){var e=this.option("scrolling"),t=this.option("scrolling.useNative"),i=k({},e,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return t===void 0&&(t=!0),t==="auto"?(delete i.useNative,delete i.useSimulatedScrollbar):(i.useNative=!!t,i.useSimulatedScrollbar=!t),i},_updateCell:function(e,t){t.rowType&&this._cellPrepared(e,t)},_createCell:function(e){var t=e.column,i=t.alignment||Ra(this.option("rtlEnabled")),n=me.createElement("td");n.style.textAlign=i;var r=v(n);return e.rowType==="data"&&t.headerId&&!t.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",t.headerId,r),t.cssClass&&r.addClass(t.cssClass),t.command==="expand"&&(r.addClass(t.cssClass),r.addClass(this.addWidgetPrefix(GW))),t.colspan>1?r.attr("colSpan",t.colspan):!t.isBand&&t.visibleWidth!=="auto"&&this.option("columnAutoWidth")&&((t.width||t.minWidth)&&(n.style.minWidth=wd(t.minWidth||t.width)),t.width&&z0(n,t,wd(t.width))),r},_createRow:function(e,t){t=t||"tr";var i=v("<".concat(t,">")).addClass(pl);return this.setAria("role","row",i),i},_isAltRow:function(e){return e&&e.dataIndex%2===1},_createTable:function(e,t){var i=this,n=v("<table>").addClass(i.addWidgetPrefix(KW)).addClass(i.addWidgetPrefix(jW));if(e&&!t?(n.append(i._createColGroup(e)),Lt.safari&&n.append(v("<thead>").append("<tr>")),i.setAria("role","presentation",n)):i.setAria("hidden",!0,n),this.setAria("role","presentation",v("<tbody>").appendTo(n)),t)return n;Lt.mozilla&&R.on(n,"mousedown","td",function(a){a.ctrlKey&&a.preventDefault()}),i.option("cellHintEnabled")&&R.on(n,"mousemove",".dx-row > td",this.createAction(function(a){var o=a.event,s=v(o.target),l=v(o.currentTarget),u=l.parent(),d=u.hasClass("dx-data-row"),c=u.hasClass("dx-header-row"),h=u.hasClass(op),f=u.hasClass(sp),p=u.hasClass(i.addWidgetPrefix(XW)),m=i._columnsController.getVisibleColumns(),g=u.data("options"),C=l.index(),b=g&&g.cells&&g.cells[C],A=b?b.column:m[C];if(!f&&!p&&(!d||d&&A&&!A.cellTemplate)&&(!c||c&&A&&!A.headerCellTemplate)&&(!h||h&&A&&(A.groupIndex===void 0||!A.groupCellTemplate))){s.data(lp)&&(s.removeAttr("title"),s.data(lp,!1));var B=s[0].scrollWidth-s[0].clientWidth;B>0&&!E(s.attr("title"))&&(s.attr("title",s.text()),s.data(lp,!0))}}));var r=function(a){var o=v(a.currentTarget),s=v(a.target).closest("."+QW),l=o.parent(),u=l.data("options"),d=u&&u.cells&&u.cells[o.index()];if(o.closest("table").is(a.delegateTarget)){var c=k({},d,{cellElement:Me(o),event:a,eventType:a.type});if(c.rowIndex=i.getRowIndex(l),s.length){var h=s.data("dx-form-item");h.column&&(c.column=h.column,c.columnIndex=i._columnsController.getVisibleIndex(c.column.index))}return c}};return R.on(n,"mouseover",".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellHoverChanged",o)}),R.on(n,"mouseout",".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellHoverChanged",o)}),R.on(n,vt,".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellClick",o)}),R.on(n,qu,".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellDblClick",o)}),tz(i,n),n},_rowPointerDown:re,_rowClick:re,_rowDblClick:re,_createColGroup:function(e){for(var t=v("<colgroup>"),i=0;i<e.length;i++)for(var n=e[i].colspan||1,r=0;r<n;r++)t.append(this._createCol(e[i]));return t},_createCol:function(e){var t=e.visibleWidth||e.width;t==="adaptiveHidden"&&(t=W0);var i=v("<col>");return Df(i,t),i},renderDelayedTemplates:function(e){var t=this._delayedTemplates,i=t.filter(r=>!r.async),n=t.filter(r=>r.async);this._delayedTemplates=[],this._renderDelayedTemplatesCore(i,!1,e),this._renderDelayedTemplatesCoreAsync(n)},_renderDelayedTemplatesCoreAsync:function(e){var t=this;e.length&&je().setTimeout(function(){t._renderDelayedTemplatesCore(e,!0)})},_renderDelayedTemplatesCore:function(e,t,i){for(var n=new Date;e.length;){var r=e.shift(),a=r.options,o=me.getDocument();if((!t||v(a.container).closest(o).length)&&(i&&(a.change=i),r.template.render(a)),t&&new Date-n>30){this._renderDelayedTemplatesCoreAsync(e);break}}!e.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()},_processTemplate:function(e){var t;if(e&&e.render&&!mn(e))t={allowRenderToDetachedContainer:e.allowRenderToDetachedContainer,render:function(n){e.render(n.container,n.model,n.change),n.deferred&&n.deferred.resolve()}};else if(Ie(e))t={render:function(n){var r=e(Me(n.container),n.model,n.change);r&&(r.nodeType||mn(r))&&n.container.append(r),n.deferred&&n.deferred.resolve()}};else{var i=Ve(e)?e:v(e).attr("id");i?(this._templatesCache[i]||(this._templatesCache[i]=this.getTemplate(e)),t=this._templatesCache[i]):t=this.getTemplate(e)}return t},renderTemplate:function(e,t,i,n,r){var a=this._processTemplate(t,i),o=i.column,s=i.rowType==="data",l=new se,u={container:e,model:i,deferred:l,onRendered:()=>{l.resolve()}};if(a){i.component=this.component;var d=o&&(o.renderAsync&&s||this.option("renderAsync")&&(o.renderAsync!==!1&&(o.command||o.showEditorAlways)&&s||i.rowType==="filter"));(a.allowRenderToDetachedContainer||n)&&!d?a.render(u):this._delayedTemplates.push({template:a,options:u,async:d}),r&&(r.templateDeferreds=r.templateDeferreds||[],r.templateDeferreds.push(l))}else l.reject();return l.promise()},_getBodies:function(e){return v(e).children("tbody").not(".dx-header").not(".dx-footer")},_wrapRowIfNeed:function(e,t,i){var n=this.option().rowTemplate||this.option("dataRowTemplate"),r=i?e||this._tableElement:this._tableElement||e,a=n&&this._getBodies(r);if(a&&a.filter("."+pl).length){var o=v("<tbody>").addClass(t.attr("class"));return this.setAria("role","presentation",o),o.append(t)}return t},_appendRow:function(e,t,i){i=i||ez,i.render({content:t,container:e})},_resizeCore:function(){var e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))},_renderCore:function(e){var t=this.element().parent();(!t||t.parent().length)&&this.renderDelayedTemplates(e)},_renderTable:function(e){e=e||{},e.columns=this._columnsController.getVisibleColumns();var t=e.change&&e.change.changeType,i=this._createTable(e.columns,t==="append"||t==="prepend"||t==="update");return this._renderRows(i,e),i},_renderRows:function(e,t){for(var i=this._getRows(t.change),n=t.change&&t.change.columnIndices||[],r=t.change&&t.change.changeTypes||[],a=0;a<i.length;a++)this._renderRow(e,k({row:i[a],columnIndices:n[a],changeType:r[a]},t))},_renderRow:function(e,t){t.columnIndices||(t.row.cells=[]);var i=this._createRow(t.row),n=this._wrapRowIfNeed(e,i);t.changeType!=="remove"&&this._renderCells(i,t),this._appendRow(e,n);var r=k({columns:t.columns},t.row);this._addWatchMethod(r,t.row),this._rowPrepared(n,r,t.row)},_needRenderCell:function(e,t){return!t||t.indexOf(e)>=0},_renderCells:function(e,t){for(var i=0,n=t.row,r=t.columns,a=0;a<r.length;a++)this._needRenderCell(a,t.columnIndices)&&this._renderCell(e,k({column:r[a],columnIndex:i,value:n.values&&n.values[i],oldValue:n.oldValues&&n.oldValues[i]},t)),r[a].colspan>1?i+=r[a].colspan:i++},_updateCells:function(e,t,i){var n=e.children(),r=t.children(),a=this.option("highlightChanges"),o=this.addWidgetPrefix(JW);i.forEach(function(s,l){var u=n.eq(s),d=r.eq(l);u.replaceWith(d),a&&!d.hasClass("dx-command-expand")&&d.addClass(o)}),iz(e.get(0),t.get(0))},_setCellAriaAttributes:function(e,t){if(t.rowType!=="freeSpace"){this.setAria("role","gridcell",e);var i=this._columnsController.getColumnIndexOffset(),n=t.columnIndex+i+1;this.setAria("colindex",n,e)}},_renderCell:function(e,t){var i=this._getCellOptions(t);if(t.columnIndices){if(t.row.cells){var n=t.row.cells.findIndex(a=>a.columnIndex===i.columnIndex);t.row.cells[n]=i}}else t.row.cells.push(i);var r=this._createCell(i);return this._setCellAriaAttributes(r,i),this._renderCellContent(r,i),e.get(0).appendChild(r.get(0)),r},_renderCellContent:function(e,t){var i=this._getCellTemplate(t);De(!i||this.renderTemplate(e,i,t)).done(()=>{this._updateCell(e,t)})},_getCellTemplate:function(){},_getRows:function(){return[]},_getCellOptions:function(e){var t={column:e.column,columnIndex:e.columnIndex,rowType:e.row.rowType,isAltRow:this._isAltRow(e.row)};return this._addWatchMethod(t),t},_addWatchMethod:function(e,t){if(this.option("repaintChangesOnly")){var i=[];return t=t||e,t.watch=t.watch||function(n,r,a){var o=n(t.data),s=function(l){l&&a&&a(l);var u=n(t.data);JSON.stringify(o)!==JSON.stringify(u)&&(l&&r(u),o=u)};return i.push(s),function(){var l=i.indexOf(s);l>=0&&i.splice(l,1)}},t.update=t.update||function(n,r){n&&(this.data=e.data=n.data,this.rowIndex=e.rowIndex=n.rowIndex,this.dataIndex=e.dataIndex=n.dataIndex,this.isExpanded=e.isExpanded=n.isExpanded,e.row&&!r&&(e.row=n)),i.forEach(function(a){a(n)})},t!==e&&(e.watch=t.watch.bind(t)),e}},_cellPrepared:function(e,t){t.cellElement=Me(v(e)),this.executeAction("onCellPrepared",t)},_rowPrepared:function(e,t){Vt(e.get(0),"options",t),t.rowElement=Me(e),this.executeAction("onRowPrepared",t)},_columnOptionChanged:function(e){var t=e.optionNames;if(be.checkChanges(t,["width","visibleWidth"])){var i=this._columnsController.getVisibleColumns(),n=ti(i,function(r){var a=r.visibleWidth||r.width;return E(a)?a:"auto"});this.setColumnWidths({widths:n,optionNames:t});return}this._requireReady||this.render()},getCellIndex:function(e){var t=e.length?e[0].cellIndex:-1;return t},getTableElements:function(){return this._tableElement||v()},getTableElement:function(){return this._tableElement},setTableElement:function(e){this._tableElement=e},optionChanged:function(e){switch(this.callBase(e),e.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),e.handled=!0}},init:function(){var e=this;e._scrollLeft=-1,e._columnsController=e.getController("columns"),e._dataController=e.getController("data"),e._delayedTemplates=[],e._templatesCache={},e.createAction("onCellClick"),e.createAction("onRowClick"),e.createAction("onCellDblClick"),e.createAction("onRowDblClick"),e.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),e.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),e.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:function(t){e._afterRowPrepared(t)}}),e._columnsController.columnsChanged.add(e._columnOptionChanged.bind(e)),e._dataController&&e._dataController.changed.add(e._handleDataChanged.bind(e))},_afterRowPrepared:re,_handleDataChanged:function(){},callbackNames:function(){return["scrollChanged"]},_updateScrollLeftPosition:function(){var e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))},scrollTo:function(e){var t=this.element(),i=t&&t.children("."+this.addWidgetPrefix(H0)).not("."+this.addWidgetPrefix(qW));E(e)&&E(e.left)&&this._scrollLeft!==e.left&&(this._scrollLeft=e.left,i&&i.scrollLeft(e.left))},_wrapTableInScrollContainer:function(e){var t=v("<div>"),i=this.option("scrolling.useNative");return(i===!1||i==="auto"&&!Co)&&t.addClass(this.addWidgetPrefix(zW)),R.on(t,"scroll",()=>{var n=t.scrollLeft();n!==this._scrollLeft&&this.scrollChanged.fire({left:n},this.name)}),t.addClass(this.addWidgetPrefix(UW)).addClass(this.addWidgetPrefix(H0)).append(e).appendTo(this.element()),this.setAria("role","presentation",t),t},_updateContent:function(e){this.setTableElement(e),this._wrapTableInScrollContainer(e)},_findContentElement:re,_getWidths:function(e){var t=[],i;return e&&V(e,function(n,r){if(i=r.offsetWidth,r.getBoundingClientRect){var a=Ut(r);a.width>i-1&&(i=a.width)}t.push(i)}),t},getColumnWidths:function(e){var t=[],i,n;if((this.option("forceApplyBindings")||re)(),e=e||this.getTableElement(),e){i=e.children("tbody:not(.dx-header)").children();for(var r=0;r<i.length;r++){var a=i.eq(r),o=a.get(0).style.display!=="none"&&!a.hasClass("dx-state-invisible");if(!a.is("."+op)&&!a.is("."+sp)&&!a.is("."+ZW)&&o){n=a.children("td");break}}t=this._getWidths(n)}return t},getVisibleColumnIndex:function(e,t){return e},setColumnWidths:function(e){var{widths:t,$tableElement:i,columns:n,fixed:r}=e,a,o,s,l,u=this.option("columnAutoWidth");if(i=i||this.getTableElement(),i&&i.length&&t){l=0,a=i.children("colgroup").children("col"),Df(a,"auto"),n=n||this.getColumns(null,i);for(var d=0;d<n.length;d++){if(u&&!r&&(o=n[d].width,o&&!n[d].command)){o=n[d].visibleWidth||o,o=wd(o),s=wd(n[d].minWidth||o);for(var c=c||i.children().children(".dx-row").not("."+sp),h=0;h<c.length;h++){var f=c[h],p=void 0,m=this.getVisibleColumnIndex(d,h);f.classList.contains(op)?p=f.querySelector("td[aria-colindex='".concat(m+1,"']:not(.").concat(YW,")")):p=f.cells[m],p&&(z0(p,n[d],o),p.style.minWidth=s)}}if(n[d].colspan){l+=n[d].colspan;continue}o=t[l],o==="adaptiveHidden"&&(o=W0),typeof o=="number"&&(o=o.toFixed(3)+"px"),Df(a.eq(l),E(o)?o:"auto"),l++}}},getCellElements:function(e){return this._getCellElementsCore(e)},_getCellElementsCore:function(e){var t=this._getRowElements().eq(e);return t.children()},_getCellElement:function(e,t){var i,n=this.getCellElements(e),r=this._getVisibleColumnIndex(n,e,t);if(n.length&&r>=0&&(i=n.eq(r)),i&&i.length)return i},_getRowElement:function(e){var t=this,i=v(),n=t.getTableElements();if(V(n,function(r,a){i=i.add(t._getRowElements(v(a)).eq(e))}),i.length)return i},getCellElement:function(e,t){return Me(this._getCellElement(e,t))},getRowElement:function(e){var t=this._getRowElement(e),i=[];if(t&&!Me(t).get)for(var n=0;n<t.length;n++)i.push(t[n]);else i=t;return i},_getVisibleColumnIndex:function(e,t,i){if(Ve(i)){var n=this._columnsController.columnOption(i,"index");return this._columnsController.getVisibleIndex(n)}return i},getColumnElements:function(){},getColumns:function(e){return this._columnsController.getVisibleColumns(e)},getCell:function(e,t){var i=t||this._getRowElements(),n;if(i.length>0&&e.rowIndex>=0&&(this.option("scrolling.mode")!=="virtual"&&this.option("scrolling.rowRenderingMode")!=="virtual"&&(e.rowIndex=e.rowIndex<i.length?e.rowIndex:i.length-1),n=this.getCellElements(e.rowIndex),n&&n.length>0))return n.eq(n.length>e.columnIndex?e.columnIndex:n.length-1)},getRowsCount:function(){var e=this.getTableElement();return e&&e.length===1?e[0].rows.length:0},_getRowElementsCore:function(e){if(e=e||this.getTableElement(),e){var t=this.option().rowTemplate||this.option("dataRowTemplate"),i=t&&e.find("> tbody."+pl);return i&&i.length?i:e.find("> tbody > ."+pl+", > ."+pl)}return v()},_getRowElements:function(e){return this._getRowElementsCore(e)},getRowIndex:function(e){return this._getRowElements().index(e)},getBoundingRect:function(){},getName:function(){},setScrollerSpacing:function(e){var t=this.element(),i=this.option("rtlEnabled");t&&t.css({paddingLeft:i?e:"",paddingRight:i?"":e})},isScrollbarVisible:function(e){var t=this.element(),i=this._tableElement;return t&&i?e?ot(i)-He(t)>0:nt(i)-Ke(t)>0:!1}}),nm="dx-state-focused",nz="dx-cell-focus-disabled",rz=".dx-row-focused",jA=".dx-datagrid-rowsview .dx-row",G0="".concat(jA," > td"),qA=".dx-treelist-rowsview .dx-row",U0="".concat(qA," > td"),K0={groupPanel:[".dx-datagrid-group-panel .dx-group-panel-item[tabindex]"],columnHeaders:[".dx-datagrid-headers .dx-header-row > td.dx-datagrid-action",".dx-treelist-headers .dx-header-row > td.dx-treelist-action"],filterRow:[".dx-datagrid-headers .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor-input",".dx-treelist-headers .dx-treelist-filter-row .dx-editor-cell .dx-texteditor-input"],rowsView:["".concat(rz),"".concat(jA,"[tabindex]"),"".concat(G0,"[tabindex]"),"".concat(G0),"".concat(qA,"[tabindex]"),"".concat(U0,"[tabindex]"),"".concat(U0)],footer:[".dx-datagrid-total-footer .dx-datagrid-summary-item",".dx-treelist-total-footer .dx-treelist-summary-item"],filterPanel:[".dx-datagrid-filter-panel .dx-icon-filter",".dx-treelist-filter-panel .dx-icon-filter"],pager:[".dx-datagrid-pager [tabindex]",".dx-treelist-pager [tabindex]"]},up=!1,dh=!1,xs=null;function az(e,t,i,n,r,a){var o=lz(t,i.originalEvent,a);if(!o){var s=$t(i);s==="enter"||s==="space"?(oz(i.target,t),n&&n({event:i})):s==="tab"?r.addClass(nm):Gg(e,t,i)}}function oz(e,t){var i=v(e),n=i.attr("aria-label"),r=YA(n,t.element()),a=r.index(i);xs=k({},{ariaLabel:n,index:a},{viewInstance:t})}function YA(e,t){var i=v(t),n;return e?n=i.find('[aria-label="'.concat(e,'"][tabindex]')):n=i.find("[tabindex]"),n}function sz(e){for(var t in e){var i=e[t],n=v(i).first();if(n.length)return n}}function lz(e,t,i){var n={event:t,handled:!1};return i?i(n):e._createActionByOption("onKeyDown")(n),n.handled}function XA(){dh=me.getDocument().visibilityState==="visible"}function uz(){R.on(me.getDocument(),"visibilitychange",XA)}function dz(){R.off(me.getDocument(),"visibilitychange",XA)}function cz(e){dh=!0,e.focus(),dh=!1}function ZA(e,t,i,n,r,a){if(t.option("useLegacyKeyboardNavigation"))return re;var o=()=>v(t.element()),s=d=>az(e,t,d,r,o(),a),l=()=>{up=!0,o().removeClass(nm)},u=()=>{var d=!up&&!dh;d&&o().addClass(nm),up=!1};return R.on(i,"keydown",n,s),R.on(i,"mousedown",n,l),R.on(i,"focusin",n,u),()=>{R.off(i,"keydown",n,s),R.off(i,"mousedown",n,l),R.off(i,"focusin",n,u)}}function zg(e){if(!e.option("useLegacyKeyboardNavigation")&&xs){var t=xs.viewInstance;if(t){var i=YA(xs.ariaLabel,t.element()),n=i.eq(xs.index);xs=null,R.trigger(n,"focus")}}}function Gg(e,t,i){var n=$t(i);if(i.ctrlKey&&(n==="upArrow"||n==="downArrow"))for(var r=Object.keys(K0),a=r.indexOf(e);a>=0&&a<r.length;){a=n==="upArrow"?--a:++a;var o=r[a],s=K0[o],l=sz(s);if(l&&l.length){l.attr("tabindex",t.option("tabindex")||0),R.trigger(l,"focus"),l.removeClass(nz);break}}}function hz(e,t){e.option("useLegacyKeyboardnavigation")||t.attr("tabindex",e.option("tabindex")||0)}var nu=function(e,t,i,n,r){var a=t.getController("keyboardNavigation");t.option("useLegacyKeyboardNavigation")||a&&!a.isKeyboardEnabled()||(t.createAction("onKeyDown"),ZA(e,t,i,n,r,o=>{t.executeAction("onKeyDown",o)}))},dp="text-content",fz="headers",pz="nowrap",vz=".dx-row",j0="dx-header-row",_z="dx-column-lines",mz="context-menu-sort-asc",gz="context-menu-sort-desc",Cz="context-menu-sort-none",yz="dx-cell-focus-disabled",cp="dx-visibility-hidden",q0="dx-text-content-alignment-",xz="dx-sort-indicator",bz="dx-sort-index-indicator",Sz=".dx-header-filter",Ez="dx-header-filter-indicator",wz="dx-header-multi-row",JA={defaultOptions:function(){return{showColumnHeaders:!0,cellHintEnabled:!0}},views:{columnHeadersView:Yu.inherit(function(){var e=function(i,n,r){var a=v("<div>").addClass(i.addWidgetPrefix(dp));i.setAria("role","presentation",a),t(i,n,r.column,a);var o=i.option("showColumnLines"),s=i.getController("columns").getHeaderContentAlignment(r.column.alignment);return a[o||s==="right"?"appendTo":"prependTo"](n)};function t(i,n,r,a){var o=i._getIndicatorElements(n,!0),s=i._getIndicatorElements(n),l=o&&o.length,u=i._getColumnAlignment(r.alignment),d=".".concat(i._getIndicatorClassName("sort")),c=".".concat(i._getIndicatorClassName("sortIndex")),h=s.filter(d),f=s.children().filter(c);a=a||n.children("."+i.addWidgetPrefix(dp)),a.toggleClass(q0+u,l>0).toggleClass(q0+(u==="left"?"right":"left"),l>0&&r.alignment==="center").toggleClass(xz,!!h.length).toggleClass(bz,!!f.length).toggleClass(Ez,!!s.filter("."+i._getIndicatorClassName("headerFilter")).length)}return{_createTable:function(){var i=this.callBase.apply(this,arguments);return R.on(i,"mousedown selectstart",this.createAction(function(n){var r=n.event;r.shiftKey&&r.preventDefault()})),i},_isLegacyKeyboardNavigation(){return this.option("useLegacyKeyboardNavigation")},_getDefaultTemplate:function(i){var n=this;return function(r,a){var o=i.command?r:e(n,r,a),s=i.command!=="expand"&&i.caption;s?o.text(s):i.command&&r.html("&nbsp;")}},_getHeaderTemplate:function(i){return i.headerCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(i)}},_processTemplate:function(i,n){var r=this,a,o=n.column,s=r.callBase(i);return n.rowType==="header"&&s&&o.headerCellTemplate&&!o.command?a={render:function(l){var u=e(r,l.container,l.model);s.render(k({},l,{container:u}))}}:a=s,a},_handleDataChanged:function(i){i.changeType==="refresh"&&(this._isGroupingChanged||this._requireReady)&&(this._isGroupingChanged=!1,this.render())},_renderCell:function(i,n){var r=this.callBase(i,n);return n.row.rowType==="header"&&(r.addClass(yz),this._isLegacyKeyboardNavigation()||n.column&&!n.column.type&&r.attr("tabindex",this.option("tabindex")||0)),r},_setCellAriaAttributes:function(i,n){this.callBase(i,n),n.rowType==="header"&&(this.setAria("role","columnheader",i),n.column&&!n.column.command&&!n.column.isBand&&(i.attr("id",n.column.headerId),this.setAria("label",fe.format("dxDataGrid-ariaColumn")+" "+n.column.caption,i)))},_createRow:function(i){var n=this.callBase.apply(this,arguments);return n.toggleClass(_z,this.option("showColumnLines")),i.rowType==="header"&&(n.addClass(j0),this._isLegacyKeyboardNavigation()||nu("columnHeaders",this,n,"td",this._handleActionKeyDown.bind(this))),n},_handleActionKeyDown:function(i){var n=i.event,r=v(n.target);if(this._lastActionElement=n.target,r.is(Sz)){var a=this.getController("headerFilter"),o=r.closest("td"),s=this.getColumnIndexByElement(o);s>=0&&a.showHeaderFilterMenu(s,!1)}else{var l=r.closest(vz);this._processHeaderAction(n,l)}n.preventDefault()},_renderCore:function(){var i=this,n=i.element();i._tableElement&&!i._dataController.isLoaded()&&!i._hasRowElements||(n.addClass(i.addWidgetPrefix(fz)).toggleClass(i.addWidgetPrefix(pz),!i.option("wordWrapEnabled")).empty(),i.setAria("role","presentation",n),i._updateContent(i._renderTable()),i.getRowCount()>1&&n.addClass(wz),i.callBase.apply(i,arguments))},_renderRows:function(){var i=this;(i._dataController.isLoaded()||i._hasRowElements)&&(i.callBase.apply(i,arguments),i._hasRowElements=!0)},_getRowVisibleColumns:function(i){return this._columnsController.getVisibleColumns(i)},_renderRow:function(i,n){n.columns=this._getRowVisibleColumns(n.row.rowIndex),this.callBase(i,n)},_createCell:function(i){var n=i.column,r=this.callBase.apply(this,arguments);return n.rowspan>1&&i.rowType==="header"&&r.attr("rowSpan",n.rowspan),r},_getRows:function(){var i=[],n=this.getRowCount();if(this.option("showColumnHeaders"))for(var r=0;r<n;r++)i.push({rowType:"header",rowIndex:r});return i},_getCellTemplate:function(i){if(i.rowType==="header")return this._getHeaderTemplate(i.column)},_columnOptionChanged:function(i){var n=i.changeTypes,r=i.optionNames;if(n.grouping||n.groupExpanding){n.grouping&&(this._isGroupingChanged=!0);return}this.callBase(i),(r.width||r.visible)&&this.resizeCompleted.fire()},_isElementVisible:function(i){return i&&i.visible},_alignCaptionByCenter:function(i){var n=this._getIndicatorContainer(i,!0);n&&n.length&&(n.filter("."+cp).remove(),n=this._getIndicatorContainer(i),n.clone().addClass(cp).css("float","").insertBefore(i.children("."+this.addWidgetPrefix(dp))))},_updateCell:function(i,n){n.rowType==="header"&&n.column.alignment==="center"&&this._alignCaptionByCenter(i),this.callBase.apply(this,arguments)},_updateIndicator:function(i,n,r){var a=this.callBase.apply(this,arguments);return n.alignment==="center"&&this._alignCaptionByCenter(i),t(this,i,n),a},_getIndicatorContainer:function(i,n){var r=this.callBase(i);return n?r:r.filter(":not(."+cp+")")},_isSortableElement:function(){return!0},getHeadersRowHeight:function(){var i=this.getTableElement(),n=i&&i.find("."+j0);return n&&n.toArray().reduce(function(r,a){return r+Ke(a)},0)||0},getHeaderElement:function(i){var n=this.getColumnElements();return n&&n.eq(i)},getColumnElements:function(i,n){var r=this,a,o=r._columnsController,s=r.getRowCount();if(r.option("showColumnHeaders")){if(s>1&&(!E(i)||E(n))){var l=[],u=E(n)?o.getChildrenByBandColumn(n,!0):o.getVisibleColumns();return V(u,function(d,c){var h=E(i)?i:o.getRowIndex(c.index);a=r._getCellElement(h,o.getVisibleIndex(c.index,h)),a&&l.push(a.get(0))}),v(l)}else if(!i||i<s)return r.getCellElements(i||0)}},getColumnIndexByElement:function(i){var n=this.getCellIndex(i),r=i.closest(".dx-row"),a=r[0].rowIndex,o=this.getColumns(a)[n];return o?o.index:-1},getVisibleColumnIndex:function(i,n){var r=this.getColumns()[i];return r?this._columnsController.getVisibleIndex(r.index,n):-1},getColumnWidths:function(){var i=this.getColumnElements();return i&&i.length?this._getWidths(i):this.callBase.apply(this,arguments)},allowDragging:function(i,n,r){var a,o=0,s=i&&this._columnsController.getRowIndex(i.index),l=this.getColumns(s===0?0:null),u=(i==null?void 0:i.allowHiding)&&l.length>1,d=function(h){return h.allowReordering||h.allowGrouping||h.allowHiding};for(a=0;a<l.length;a++)d(l[a])&&o++;if(o<=1&&!u)return!1;if(!r)return(this.option("allowColumnReordering")||this._columnsController.isColumnOptionUsed("allowReordering"))&&i&&i.allowReordering;for(a=0;a<r.length;a++){var c=r[a];if(c&&c.allowDragging(i,n))return!0}return!1},getBoundingRect:function(){var i=this.getColumnElements();if(i&&i.length){var n=this.getTableElement().offset();return{top:n.top}}return null},getName:function(){return"headers"},getColumnCount:function(){var i=this.getColumnElements();return i?i.length:0},isVisible:function(){return this.option("showColumnHeaders")},optionChanged:function(i){switch(i.name){case"showColumnHeaders":case"wordWrapEnabled":case"showColumnLines":this._invalidate(!0,!0),i.handled=!0;break;default:this.callBase(i)}},getHeight:function(){return this.getElementHeight()},getContextMenuItems:function(i){var n=this,r=i.column;if(i.row&&(i.row.rowType==="header"||i.row.rowType==="detailAdaptive")){var a=n.option("sorting");if(a&&a.mode!=="none"&&r&&r.allowSorting){var o=function(s){setTimeout(function(){n._columnsController.changeSortOrder(r.index,s.itemData.value)})};return[{text:a.ascendingText,value:"asc",disabled:r.sortOrder==="asc",icon:mz,onItemClick:o},{text:a.descendingText,value:"desc",disabled:r.sortOrder==="desc",icon:gz,onItemClick:o},{text:a.clearText,value:"none",disabled:!r.sortOrder,icon:Cz,onItemClick:o}]}}},getRowCount:function(){return this._columnsController&&this._columnsController.getRowCount()},setRowsOpacity:function(i,n,r){var a=this,o,s,l=a.getRowCount(),u=a._columnsController.getColumns(),d=u&&u[i],c=d&&d.isBand&&d.index,h=function(f,p){p.ownerBand===c&&(s.eq(f).css({opacity:n}),p.isBand&&a.setRowsOpacity(p.index,n,o+1))};if(E(c))for(r=r||0,o=r;o<l;o++)s=a.getCellElements(o),V(a.getColumns(o),h)}}}())}};JA.views.columnHeadersView;Oe.registerModule("columnHeaders",JA);var QA="number",eD="yyyy/MM/dd",Iz="yyyy/MM/dd HH:mm:ss",tD=/^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/,iD=/^(\d{2}):(\d{2})(:(\d{2}))?$/,Y0=["","yyyy","","MM","","dd","THH","","mm","","ss",".SSS"],Tz=/^(\d{4})\/(\d{2})\/(\d{2})$/,Az=3,nD=function(e,t){var i;return Ve(e)&&!t&&(i=Oz(e)),i||Dz(e)};function Ni(e){return+e||0}function Dz(e){var t=rD(e)===eD,i=!Wi(e)&&Date.parse(e);if(!i&&t){var n=e.match(Tz);if(n){var r=new Date(Ni(n[1]),Ni(n[2]),Ni(n[3]));return r.setFullYear(Ni(n[1])),r.setMonth(Ni(n[2])-1),r.setDate(Ni(n[3])),r}}return Et(i)?new Date(i):e}function Oz(e){var t=e.match(tD);if(!t)return t=e.match(iD),t?new Date(0,0,0,Ni(t[1]),Ni(t[2]),Ni(t[4])):void 0;var i=Ni(t[1]),n=--t[3],r=t[5],a=0,o=0,s=h=>(i<100&&h.setFullYear(i),h);a=Ni(t[14]),o=Ni(t[16]),t[13]==="-"&&(a=-a,o=-o);var l=Ni(t[6])-a,u=Ni(t[8])-o,d=Ni(t[10]),c=function(h){return h=h||"",Ni(h)*Math.pow(10,Az-h.length)}(t[11]);return t[12]?s(new Date(Date.UTC(i,n,r,l,u,d,c))):s(new Date(i,n,r,l,u,d,c))}var Rz=function(e,t){var i=e.match(tD),n="";if(!i)return i=e.match(iD),i?i[3]?"HH:mm:ss":"HH:mm":void 0;for(var r=1;r<Y0.length;r++)i[r]&&(n+=Y0[r]||i[r]);return i[12]==="Z"&&(n+="'Z'"),i[14]&&(i[15]?n+="xxx":i[16]?n+="xx":n+="x"),n},kz=function(e){return typeof e=="number"?new Date(e):nD(e,!At().forceIsoDateParsing)},Bz=function(e,t){return t?Wi(e)?t===QA?e&&e.valueOf?e.valueOf():null:xA(t,Hl)(e):null:e},rD=function(e){if(typeof e=="number")return QA;if(Ve(e)){var t;return At().forceIsoDateParsing&&(t=Rz(e)),t||(e.indexOf(":")>=0?Iz:eD)}else if(e)return null};const ci={dateParser:nD,deserializeDate:kz,serializeDate:Bz,getDateSerializationFormat:rD};var aD=["filterValues","filterType","fixed","fixedPosition"],Id=["visibleIndex","dataField","name","dataType","width","visible","sortOrder","lastSortOrder","sortIndex","groupIndex","filterValue","selectedFilterOperation","added"].concat(aD),Lz={visibleWidth:!0,bestFitWidth:!0,bufferedFilterValue:!0},Pz="dx-command-expand",X0=Number.MAX_SAFE_INTEGER||9007199254740991,ta="groupExpand",hp=/columns\[(\d+)\]\.?/gi,Fz=1,Z0={defaultOptions:function(){return{commonColumnSettings:{allowFiltering:!0,allowHiding:!0,allowSorting:!0,allowEditing:!0,encodeHtml:!0,trueText:fe.format("dxDataGrid-trueText"),falseText:fe.format("dxDataGrid-falseText")},allowColumnReordering:!1,allowColumnResizing:!1,columnResizingMode:"nextColumn",columnMinWidth:void 0,columnWidth:void 0,adaptColumnWidthByRatio:!0,columns:void 0,regenerateColumnsByVisibleItems:!1,customizeColumns:null,dateSerializationFormat:void 0}},controllers:{columns:Dt.Controller.inherit(function(){var e={visible:!0,showInColumnChooser:!0},t={number:["=","<>","<",">","<=",">=","between"],string:["contains","notcontains","startswith","endswith","=","<>"],date:["=","<>","<",">","<=",">=","between"],datetime:["=","<>","<",">","<=",">=","between"]},i={visibleIndex:!0,groupIndex:!0,grouped:!0,sortIndex:!0,sortOrder:!0},n=function(y){y.filterOperations=y.defaultFilterOperations},r=function(y,T,S,O){var P={};if(T){Ve(T)&&(T={dataField:T}),y.setName(T);var M={};if(T.command)M=rr(P,T);else{P=y.getCommonSettings(T),S&&S.name&&S.dataField&&(T=k({},T,{dataField:S.dataField}));var $=y._createCalculatedColumnOptions(T,O);T.type||(M={headerId:"dx-col-".concat(Fz++)}),M=rr(M,e),rr(M,P),rr(M,$),rr(M,T),rr(M,{selector:null})}return T.filterOperations===T.defaultFilterOperations&&n(M),M}},a=function y(T,S,O){var P=[];return S&&V(S,function(M,$){var Q=T._columnsUserState&&b($,T._columnsUserState[M])&&T._columnsUserState[M],oe=r(T,$,Q,O);oe&&(O&&(oe.ownerBand=O),P.push(oe),oe.columns&&(P=P.concat(y(T,oe.columns,oe)),delete oe.columns,oe.hasColumns=!0))}),P},o=function(y,T){for(var S=[],O=T[y];O;)S.unshift(O),y=O.index,O=T[y];return S},s=function(y,T,S){var O=[],P=T[y];if(P)for(var M=0;M<P.length;M++){var $=P[M];(!E($.groupIndex)||$.showWhenGrouped)&&(O.push($),S&&$.isBand&&(O=O.concat(s($.index,T,S))))}return O},l=function(y,T){var S=[],O,P=y.getBandColumnsCache(),M=function(Q){return Q.ownerBand===T.ownerBand};if(P.isPlain){var $=y._columns.indexOf(T);$>=0&&(S=["columns[".concat($,"]")])}else for(O=y._columns.filter(M);O.length&&O.indexOf(T)!==-1;)S.unshift("columns[".concat(O.indexOf(T),"]")),T=P.columnParentByIndex[T.index],O=T?y._columns.filter(M):[];return S.join(".")},u=function y(T,S){var O=0,P=T.getChildrenByBandColumn(S,!0);return V(P,function(M,$){$.isBand?($.colspan=$.colspan||y(T,$.index),O+=$.colspan||1):O+=1}),O},d=function(y){var T=Ln(y);return T!=="string"&&T!=="boolean"&&T!=="number"&&T!=="date"&&T!=="object"&&(T=void 0),T},c=function(y,T){switch(y){case"date":case"datetime":return ci.getDateSerializationFormat(T);case"number":if(Ve(T))return"string";if(Et(T))return null}},h=function(y,T){y.deserializeValue||(be.isDateType(T)&&(y.deserializeValue=function(S){return ci.deserializeDate(S)},y.serializeValue=function(S){return Ve(S)?S:ci.serializeDate(S,this.serializationFormat)}),T==="number"&&(y.deserializeValue=function(S){var O=parseFloat(S);return isNaN(O)?S:O},y.serializeValue=function(S,O){return O==="filter"?S:E(S)&&this.serializationFormat==="string"?S.toString():S}))},f=function(y){return y.value===!0?this.trueText||"true":y.value===!1?this.falseText||"false":y.valueText||""},p=function(y){if(y==="boolean")return f},m=function(y){V(y._columns,function(T,S){S.index=T}),V(y._columns,function(T,S){$e(S.ownerBand)&&(S.ownerBand=S.ownerBand.index)}),V(y._commandColumns,function(T,S){S.index=-(T+1)})},g=function(y,T){Ml(y._columns,"groupIndex",T,function(S){var O=S.grouped;return delete S.grouped,O})},C=function(y,T,S){var O=$e(T)?T.rowIndex:null,P=S==="group"?y.getGroupColumns():S==="columnChooser"?y.getChooserColumns():y.getVisibleColumns(O),M;return T=$e(T)?T.columnIndex:T,M=P[T],M&&M.type===ta&&(M=y._columns.filter($=>M.type===$.type)[0]||M),M&&E(M.index)?M.index:-1};function b(y,T){return y&&T&&T.name===(y.name||y.dataField)&&(T.dataField===y.dataField||y.name)}var A=function(y){var T=y._columnsUserState,S=y._ignoreColumnOptionNames||[],O=y._columns,P={},M=[],$=!0,Q=[],oe,ge,ee;function xe(F,L){if(L)for(var X=0;X<Id.length;X++){var ce=Id[X];S.includes(ce)||(ce==="dataType"?F[ce]=F[ce]||L[ce]:aD.includes(ce)?ce in L&&(F[ce]=L[ce]):(ce==="selectedFilterOperation"&&L[ce]&&(F.defaultSelectedFilterOperation=F[ce]||null),F[ce]=L[ce]))}}function w(F,L){for(var X=L.name||L.dataField,ce=P[X]||0,_e=0;_e<F.length;_e++)if(b(L,F[_e]))if(ce)ce--;else return P[X]=P[X]||0,P[X]++,_e;return-1}if(T){for(ee=0;ee<O.length;ee++)ge=w(T,O[ee]),$=$&&ge>=0,Q.push(ge);for(ee=0;ee<O.length;ee++)oe=O[ee],ge=Q[ee],(y._hasUserState||$)&&xe(oe,T[ge]),ge>=0&&E(T[ge].initialIndex)?M[ge]=oe:M.push(oe);var he=!1;for(ee=0;ee<T.length;ee++){var de=T[ee];de.added&&w(O,de)<0&&(oe=r(y,de.added),xe(oe,de),M.push(oe),de.added.columns&&(he=!0))}he&&(m(y),M=a(y,M)),U(y,M)}},B=function(y,T){m(y),g(y,T),function(S,O){V(S._columns,function(P,M){E(M.sortIndex)&&!N(M.sortOrder)&&delete M.sortIndex}),Ml(S._columns,"sortIndex",O,function(P){return!E(P.groupIndex)&&N(P.sortOrder)})}(y,T),J(y),function(S,O){for(var P,M,$={},Q=[],oe=S.getBandColumnsCache(),ge=S._columns.filter(he=>!he.command),ee=0;ee<ge.length;ee++){M=ge[ee];var xe=o(ee,oe.columnParentByIndex);if(xe.length){var w=xe[xe.length-1].index;$[w]=$[w]||[],$[w].push(M)}else Q.push(M)}for(P in $)Ml($[P],"visibleIndex",O);Ml(Q,"visibleIndex",O)}(y,T)},D=function(y){y.resetColumnsCache()};function U(y,T){y._columns=T,D(y),y.updateColumnDataTypes()}var H=function(y,T,S,O){var P=y._columnChanges||{optionNames:{length:0},changeTypes:{length:0},columnIndex:O};S=S||"all",S=S.split(".")[0];var M=P.changeTypes;T&&!M[T]&&(M[T]=!0,M.length++);var $=P.optionNames;S&&!$[S]&&($[S]=!0,$.length++),(O===void 0||O!==P.columnIndex)&&delete P.columnIndex,y._columnChanges=P,D(y)},W=function(y){var T=y.option("onColumnsChanging"),S=y._columnChanges,O=["dataField","lookup","dataType","columns"];y.isInitialized()&&!y._updateLockCount&&S&&(T&&(y._updateLockCount++,T(k({component:y.component},S)),y._updateLockCount--),y._columnChanges=void 0,P=S.optionNames,P&&O.some(M=>P[M])?y.reinit():y.columnsChanged.fire(S));var P},G=function(y,T,S,O){var P=O>=0;if(S>=0)P||(T.lastSortOrder=T.sortOrder);else{var M=y.option("sorting.mode"),$=T.lastSortOrder;if(M==="single"){var Q=y._columns.some(oe=>oe!==T&&E(oe.sortIndex));Q&&($=void 0)}T.sortOrder=$}},j=function(y,T){var S=T.value,O=T.optionName,P=T.prevValue,M=T.fullOptionName,$="".concat(M,".").concat(O);!Lz[O]&&y._skipProcessingColumnsChange!==$&&(y._skipProcessingColumnsChange=$,y.component._notifyOptionChanged($,S,P),y._skipProcessingColumnsChange=!1)},te=function(y,T,S,O,P){var M=bt(S),$=T.index,Q,oe,ge;if(arguments.length===3)return M(T,{functionsAsIs:!0});var ee=M(T,{functionsAsIs:!0});if(ee!==O){S==="groupIndex"||S==="calculateGroupValue"?(oe="grouping",G(y,T,O,ee)):S==="sortIndex"||S==="sortOrder"||S==="calculateSortValue"?oe="sorting":oe="columns";var xe=qm(S);xe(T,O,{functionsAsIs:!0});var w=l(y,T);i[S]&&(B(y,T),O=M(T)),(S==="name"||S==="allowEditing")&&y._checkColumns(),!E(ee)&&!E(O)&&S.indexOf("buffer")!==0&&(P=!0),P?D(y):(!Id.includes(S)&&S!=="visibleWidth"&&(Q=y.option("columns"),ge=y.getColumnByPath(w,Q),Ve(ge)&&(ge=Q[$]={dataField:ge}),ge&&b(ge,T)&&xe(ge,O,{functionsAsIs:!0})),H(y,oe,S,$)),w&&j(y,{fullOptionName:w,optionName:S,value:O,prevValue:ee})}};function N(y){return y==="asc"||y==="desc"}var Y=function(y,T){var S=this.dataField.split("."),O=S.length-1;this.serializeValue&&(T=this.serializeValue(T));for(var P=0;P<O;P++){var M=S[P];y=y[M]=y[M]||{}}y[S[O]]=T},x=(y,T)=>!!y._columns.filter(S=>S.type===T.type).length,z=function(y,T){var S=y.option("rtlEnabled");return T.command&&!x(y,T)||!T.fixedPosition?S?"right":"left":T.fixedPosition},ie=function(y,T,S,O){var P,M=this.getRowCount(),$=y[O]&&y[O].rowspan,Q=T.filter(oe=>oe.type===S);return y.forEach((oe,ge)=>{oe.type===S&&(P=ge,$=y[ge+1]?y[ge+1].rowspan:M)}),$>1&&(Q=ti(Q,function(oe){return k({},oe,{rowspan:$})})),Q.unshift.apply(Q,E(P)?[P,1]:[O,0]),y.splice.apply(y,Q),$||1},ne=function(y,T){for(var S=y?y.toString():"0";S.length<T;)S="0"+S;return S},pe=(y,T,S,O)=>{for(var P,M,$=T.slice().map(he=>k({},he)),Q=y._isColumnFixing(),oe=S.slice().map(he=>k({fixed:Q},he)),ge=he=>S.reduce((de,F,L)=>{var X=O&&he.type===ta?"expand":he.type;return F.type===X||F.command===he.command?L:de},-1),ee=he=>he.command!==S[M].command,xe=0;xe<T.length;xe++)if(P=T[xe],M=P&&(P.type||P.command)?ge(P):-1,M>=0)if(O)$[xe]=k({fixed:Q},S[M],P),P.type!==ta&&(oe=oe.filter(ee));else{var w={visibleIndex:P.visibleIndex,index:P.index,headerId:P.headerId,allowFixing:P.groupIndex===0,allowReordering:P.groupIndex===0,groupIndex:P.groupIndex};$[xe]=k({},P,S[M],P.type===ta&&w)}return T.length&&O&&oe.length&&($=$.concat(oe)),$},le=(y,T)=>E(T.fixed)||!T.type?T.fixed:y._isColumnFixing(),J=y=>{y._bandColumnsCache=void 0},K=(y,T)=>{var S=Ve(T)&&T.substr(0,T.indexOf(":")),O;if(T!==void 0)return S&&(T=T.substr(S.length+1)),S?O=y.filter(P=>""+P[S]===T)[0]:["index","name","dataField","caption"].some(P=>(O=y.filter(M=>M[P]===T)[0],!!O)),O};return{_getExpandColumnOptions:function(){return{type:"expand",command:"expand",width:"auto",cssClass:Pz,allowEditing:!1,allowGrouping:!1,allowSorting:!1,allowResizing:!1,allowReordering:!1,allowHiding:!1}},_getFirstItems:function(y){var T,S=[];return y&&y.items().length>0&&(T=be.normalizeSortingInfo(y.group()).length,S=function O(P,M){if(!P||!M)return P;for(var $=0;$<P.length;$++){var Q=O(P[$].items||P[$].collapsedItems,M-1);if(Q&&Q.length)return Q}}(y.items(),T)||[]),S},_endUpdateCore:function(){!this._skipProcessingColumnsChange&&W(this)},init:function(){var y=this.option("columns");this._commandColumns=this._commandColumns||[],this._columns=this._columns||[],this._isColumnsFromOptions=!!y,this._isColumnsFromOptions?(U(this,y?a(this,y):[]),A(this)):U(this,this._columnsUserState?a(this,this._columnsUserState):this._columns),function(T){var S=T._getExpandColumnOptions();T.addCommandColumn(S)}(this),this._dataSourceApplied?this.applyDataSource(this._dataSource,!0):B(this),this._checkColumns()},callbackNames:function(){return["columnsChanged"]},getColumnByPath:function(y,T){var S,O=[];return y.replace(hp,function(P,M){return O.push(parseInt(M)),""}),O.length&&(T?S=O.reduce(function(P,M){return P&&P.columns&&P.columns[M]},{columns:T}):S=function(P,M){var $,Q,oe=P.getBandColumnsCache(),ge=function(xe){var w=$?$.index:void 0;return xe.ownerBand===w};if(oe.isPlain)$=P._columns[M[0]];else{Q=P._columns.filter(ge);for(var ee=0;ee<M.length;ee++)$=Q[M[ee]],$&&(Q=P._columns.filter(ge))}return $}(this,O)),S},optionChanged:function(y){var T;switch(y.name){case"adaptColumnWidthByRatio":y.handled=!0;break;case"dataSource":y.value!==y.previousValue&&!this.option("columns")&&(!Array.isArray(y.value)||!Array.isArray(y.previousValue))&&(this._columns=[]);break;case"columns":T=this._skipProcessingColumnsChange,y.handled=!0,this._skipProcessingColumnsChange||(y.name===y.fullName?(this._columnsUserState=null,this._ignoreColumnOptionNames=null,this.init()):(this._columnOptionChanged(y),T=!0)),T&&this._updateRequireResize(y);break;case"commonColumnSettings":case"columnAutoWidth":case"allowColumnResizing":case"allowColumnReordering":case"columnFixing":case"grouping":case"groupPanel":case"regenerateColumnsByVisibleItems":case"customizeColumns":case"columnHidingEnabled":case"dateSerializationFormat":case"columnResizingMode":case"columnMinWidth":case"columnWidth":y.handled=!0;var S=y.fullName==="columnWidth"&&["width"];this.reinit(S);break;case"rtlEnabled":this.reinit();break;default:this.callBase(y)}},_columnOptionChanged:function(y){var T={},S=this.getColumnByPath(y.fullName),O=y.fullName.replace(hp,"");S&&(O?T[O]=y.value:T=y.value,this._skipProcessingColumnsChange=y.fullName,this.columnOption(S.index,T),this._skipProcessingColumnsChange=!1)},_updateRequireResize:function(y){var T=this.component;y.fullName.replace(hp,"")==="width"&&T._updateLockCount&&(T._requireResize=!0)},publicMethods:function(){return["addColumn","deleteColumn","columnOption","columnCount","clearSorting","clearGrouping","getVisibleColumns","getVisibleColumnIndex"]},applyDataSource:function(y,T){var S=y&&y.isLoaded();if(this._dataSource=y,!this._dataSourceApplied||this._dataSourceColumnsCount===0||T||this.option("regenerateColumnsByVisibleItems"))if(S){if(!this._isColumnsFromOptions){var O=function(P,M){for(var $=P._getFirstItems(M),Q,oe={},ge=[],ee=0;ee<$.length;ee++)if($[ee])for(Q in $[ee])(!Ie($[ee][Q])||Hi.isWrapped($[ee][Q]))&&(oe[Q]=!0);for(Q in oe)if(Q.indexOf("__")!==0){var xe=r(P,Q);ge.push(xe)}return ge}(this,y);O.length&&(U(this,O),this._dataSourceColumnsCount=this._columns.length,A(this))}return this.updateColumns(y,T)}else this._dataSourceApplied=!1,B(this);else if(S&&!this.isAllDataTypesDefined(!0)&&this.updateColumnDataTypes(y))return H(this,"columns"),W(this),new se().reject().promise()},reset:function(){this._dataSource=null,this._dataSourceApplied=!1,this._dataSourceColumnsCount=void 0,this.reinit()},resetColumnsCache:function(){this._visibleColumns=void 0,this._fixedColumns=void 0,this._rowCount=void 0,J(this)},reinit:function(y){this._columnsUserState=this.getUserState(),this._ignoreColumnOptionNames=y||null,this.init(),y&&(this._ignoreColumnOptionNames=null)},isInitialized:function(){return!!this._columns.length||!!this.option("columns")},isDataSourceApplied:function(){return this._dataSourceApplied},getCommonSettings:function(y){var T=(!y||!y.type)&&this.option("commonColumnSettings")||{},S=this.option("grouping")||{},O=this.option("groupPanel")||{};return k({allowFixing:this.option("columnFixing.enabled"),allowResizing:this.option("allowColumnResizing")||void 0,allowReordering:this.option("allowColumnReordering"),minWidth:this.option("columnMinWidth"),width:this.option("columnWidth"),autoExpandGroup:S.autoExpandAll,allowCollapsing:S.allowCollapsing,allowGrouping:O.allowColumnDragging&&O.visible||S.contextMenuEnabled},T)},isColumnOptionUsed:function(y){for(var T=0;T<this._columns.length;T++)if(this._columns[T][y])return!0},isAllDataTypesDefined:function(y){var T=this._columns;if(!T.length)return!1;for(var S=0;S<T.length;S++)if(!(!T[S].dataField&&T[S].calculateCellValue===T[S].defaultCalculateCellValue)&&(!T[S].dataType||y&&T[S].deserializeValue&&T[S].serializationFormat===void 0))return!1;return!0},getColumns:function(){return this._columns},isBandColumnsUsed:function(){return this.getColumns().some(function(y){return y.isBand})},getGroupColumns:function(){var y=[];return V(this._columns,function(){E(this.groupIndex)&&(y[this.groupIndex]=this)}),y},getVisibleColumns:function(y){return this._visibleColumns=this._visibleColumns||this._getVisibleColumnsCore(),y=E(y)?y:this._visibleColumns.length-1,this._visibleColumns[y]||[]},getFixedColumns:function(y){return this._fixedColumns=this._fixedColumns||this._getFixedColumnsCore(),y=E(y)?y:this._fixedColumns.length-1,this._fixedColumns[y]||[]},getFilteringColumns:function(){return this.getColumns().filter(y=>(y.dataField||y.name)&&(y.allowFiltering||y.allowHeaderFiltering)).map(y=>{var T=k(!0,{},y);return E(T.dataField)||(T.dataField=T.name),T.filterOperations=y.filterOperations!==y.defaultFilterOperations?T.filterOperations:null,T})},getColumnIndexOffset:function(){return 0},_getFixedColumnsCore:function(){var y=[],T=this.getRowCount(),S=this._isColumnFixing(),O={command:"transparent"},P=0,M,$,Q;if(S)for(var oe=0;oe<=T;oe++){M=0,Q=null,$=null;for(var ge=this.getVisibleColumns(oe,!0),ee=0;ee<ge.length;ee++){var xe=ge[ee-1],w=ge[ee];w.fixed?xe&&xe.fixed&&z(this,xe)!==z(this,w)?E($)||($=ee):Q=w.fixedPosition:(oe===0&&(w.isBand&&w.colspan?P+=w.colspan:P++),M++,E($)||($=ee))}if(oe===0&&(M===0||M>=ge.length))return[];E($)||($=Q==="right"?0:ge.length),y[oe]=ge.slice(0),O.colspan||(O.colspan=P),y[oe].splice($,M,O)}return y.map(he=>he.map(de=>{var F=Se({},de);return F.headerId&&(F.headerId+="-fixed"),F}))},_isColumnFixing:function(){var y=this.option("columnFixing.enabled");return!y&&V(this._columns,function(T,S){if(S.fixed)return y=!0,!1}),y},_getExpandColumnsCore:function(){return this.getGroupColumns()},getExpandColumns:function(){var y=this._getExpandColumnsCore(),T,S=y.filter($=>$.groupIndex===0)[0],O=S&&S.fixed,P=this._isColumnFixing(),M=this.option("rtlEnabled");return y.length&&(T=this.columnOption("command:expand")),y=ti(y,$=>k({},$,{visibleWidth:null,minWidth:null,cellTemplate:E($.groupIndex)?null:$.cellTemplate,headerCellTemplate:null,fixed:!E($.groupIndex)||!O?P:!0,fixedPosition:M?"right":"left"},T,{index:$.index,type:$.type||ta})),y},getBandColumnsCache:function(){if(!this._bandColumnsCache){var y=this._columns,T={},S={},O=!0;y.forEach(function(P){var M=P.ownerBand,$=$e(M)?M.index:M,Q=y[$];P.hasColumns&&(O=!1),P.colspan&&(P.colspan=void 0),P.rowspan&&(P.rowspan=void 0),Q?S[P.index]=Q:$=-1,T[$]=T[$]||[],T[$].push(P)}),this._bandColumnsCache={isPlain:O,columnChildrenByIndex:T,columnParentByIndex:S}}return this._bandColumnsCache},_isColumnVisible:function(y){return y.visible&&this.isParentColumnVisible(y.index)},_getVisibleColumnsCore:function(){var y=this,T,S=[],O=0,P=0,M=y.getRowCount(),$=[],Q=[],oe=0,ge,ee=y.option("rtlEnabled"),xe=y.getBandColumnsCache(),w=pe(y,y.getExpandColumns(),y._columns),he=pe(y,y._columns,y._commandColumns,!0),de=function(F){var L;for(L=0;F>1;L++)F/=10;return L}(he.length);for(function(F,L,X){for(var ce,_e=0;_e<L.length;_e++){var ae=L[_e];(ae.visible||ae.command)&&(ae.isBand&&(ae.colspan=ae.colspan||u(F,ae.index)),(!ae.isBand||!ae.colspan)&&(ce=F.getRowCount(),!ae.command&&(!E(ae.groupIndex)||ae.showWhenGrouped)&&(ce-=o(ae.index,X.columnParentByIndex).length),ce>1&&(ae.rowspan=ce)))}}(y,he,xe),T=0;T<M;T++)S[T]=[],Q[T]=[{}],$[T]=[{},{},{}];return V(he,function(){var F=this.visibleIndex,L,X=o(this.index,xe.columnParentByIndex),ce=y._isColumnVisible(this);if(ce&&(!E(this.groupIndex)||this.showWhenGrouped)){var _e=X.length;if(F<0?(F=-F,L=Q[_e]):(this.fixed=X.length?X[0].fixed:this.fixed,this.fixedPosition=X.length?X[0].fixedPosition:this.fixedPosition,this.fixed?(ge=this.fixedPosition==="right",ee&&(!this.command||x(y,this))&&(ge=!ge),ge?L=$[_e][2]:L=$[_e][0]):L=$[_e][1]),X.length)for(F=ne(F,de),T=X.length-1;T>=0;T--)F=ne(X[T].visibleIndex,de)+F;L[F]=L[F]||[],L[F].push(this),oe++}}),V(S,function(F){m_(Q[F],function(X,ce){S[F].unshift.apply(S[F],ce)});var L=S[F].length;V($[F],function(X,ce){m_(ce,function(_e,ae){S[F].push.apply(S[F],ae)})}),P<F+1&&(P+=ie.call(y,S[F],w,"detailExpand",L)),O<F+1&&(O+=ie.call(y,S[F],w,ta,L))}),S.push(function F(L,X,ce){var _e=[];return X=X||0,L[X]&&V(L[X],function(ae,we){(we.ownerBand===ce||we.type===ta)&&(!we.isBand||!we.colspan?(!we.command||X<1)&&_e.push(we):_e.push.apply(_e,F(L,X+1,we.index)))}),_e}(S)),!oe&&y._columns.length&&S[M].push({command:"empty"}),S},getInvisibleColumns:function(y,T){var S=this,O=[],P;return y=y||S._columns,V(y,function(M,$){if($.ownerBand===T){if($.isBand){$.visible?P=S.getInvisibleColumns(S.getChildrenByBandColumn($.index),$.index):P=S.getChildrenByBandColumn($.index),P.length&&(O.push($),O=O.concat(P));return}$.visible||O.push($)}}),O},getChooserColumns:function(y){var T=y?this.getColumns():this.getInvisibleColumns(),S=T.filter(P=>P.showInColumnChooser),O=this.option("columnChooser.sortOrder");return((P,M)=>{if(M!=="asc"&&M!=="desc")return P;var $=M==="asc"?1:-1;return P.sort(function(Q,oe){var ge=Q.caption||"",ee=oe.caption||"";return $*ge.localeCompare(ee)}),P})(S,O)},allowMoveColumn:function(y,T,S,O){var P=C(this,y,S),M=this._columns[P];return M&&(M.allowReordering||M.allowGrouping||M.allowHiding)?S===O?S==="columnChooser"?!1:(y=$e(y)?y.columnIndex:y,T=$e(T)?T.columnIndex:T,y!==T&&y+1!==T):S==="group"&&O!=="columnChooser"||O==="group"?M&&M.allowGrouping:S==="columnChooser"||O==="columnChooser"?M&&M.allowHiding:!0:!1},moveColumn:function(y,T,S,O){var P={},M,$=C(this,y,S),Q=C(this,T,O),oe;if($>=0){var ge=this._columns[$];if(T=$e(T)?T.columnIndex:T,oe=Q>=0?this._columns[Q].groupIndex:-1,E(ge.groupIndex)&&S==="group"&&(oe>ge.groupIndex&&oe--,O!=="group"?P.groupIndex=void 0:(M=ge.groupIndex,delete ge.groupIndex,g(this))),O==="group")P.groupIndex=function(w,he,de){var F=w.getGroupColumns(),L;if(de>=0)for(L=0;L<F.length;L++)F[L].groupIndex>=de&&F[L].groupIndex++;else for(de=0,L=0;L<F.length;L++)de=Math.max(de,F[L].groupIndex+1);return de}(this,0,oe),ge.groupIndex=M;else if(T>=0){var ee=this._columns[Q];!ee||ge.ownerBand!==ee.ownerBand||le(this,ge)^le(this,ee)?P.visibleIndex=X0:P.visibleIndex=ee.visibleIndex}var xe=O!=="columnChooser";ge.visible!==xe&&(P.visible=xe),this.columnOption(ge.index,P)}},changeSortOrder:function(y,T){var S={},O=this.option("sorting"),P=O&&O.mode,M=P==="single"||!T,$=P==="single"||P==="multiple",Q=this._columns[y];$&&Q&&Q.allowSorting&&(M&&!E(Q.groupIndex)&&V(this._columns,function(oe){oe!==y&&this.sortOrder&&(E(this.groupIndex)||delete this.sortOrder,delete this.sortIndex)}),N(T)?Q.sortOrder!==T&&(S.sortOrder=T):T==="none"?Q.sortOrder&&(S.sortIndex=void 0,S.sortOrder=void 0):function(oe){if(T==="ctrl"){if(!("sortOrder"in oe&&"sortIndex"in oe))return!1;S.sortOrder=void 0,S.sortIndex=void 0}else E(oe.groupIndex)||E(oe.sortIndex)?S.sortOrder=oe.sortOrder==="desc"?"asc":"desc":S.sortOrder="asc";return!0}(Q)),this.columnOption(Q.index,S)},getSortDataSourceParameters:function(y){var T=[],S=[];return V(this._columns,function(){(this.dataField||this.selector||this.calculateCellValue)&&E(this.sortIndex)&&!E(this.groupIndex)&&(T[this.sortIndex]=this)}),V(T,function(){var O=this&&this.sortOrder;if(N(O)){var P={selector:this.calculateSortValue||this.displayField||this.calculateDisplayValue||y&&this.selector||this.dataField||this.calculateCellValue,desc:this.sortOrder==="desc"};this.sortingMethod&&(P.compare=this.sortingMethod.bind(this)),S.push(P)}}),S.length>0?S:null},getGroupDataSourceParameters:function(y){var T=[];return V(this.getGroupColumns(),function(){var S=this.calculateGroupValue||this.displayField||this.calculateDisplayValue||y&&this.selector||this.dataField||this.calculateCellValue;if(S){var O={selector:S,desc:this.sortOrder==="desc",isExpanded:!!this.autoExpandGroup};this.sortingMethod&&(O.compare=this.sortingMethod.bind(this)),T.push(O)}}),T.length>0?T:null},refresh:function(y){var T=[];return V(this._columns,function(){var S=this.lookup;if(S&&!this.calculateDisplayValue){if(y&&S.valueMap)return;S.update&&T.push(S.update())}}),De.apply(v,T).done(D.bind(null,this))},_updateColumnOptions:function(y,T){y.selector=y.selector||function(P){return y.calculateCellValue(P)},V(["calculateSortValue","calculateGroupValue","calculateDisplayValue"],function(P,M){var $=y[M];if(Ie($))if($.originalCallback)y[M].context.column=y;else{var Q={column:y};y[M]=function(oe){return $.call(Q.column,oe)},y[M].originalCallback=$,y[M].columnIndex=T,y[M].context=Q}}),Ve(y.calculateDisplayValue)&&(y.displayField=y.calculateDisplayValue,y.calculateDisplayValue=bt(y.displayField)),y.calculateDisplayValue&&(y.displayValueMap=y.displayValueMap||{}),h(y,y.dataType);var S=y.lookup;S&&h(S,S.dataType);var O=S?S.dataType:y.dataType;O&&(y.alignment=y.alignment||function(P,M){switch(P){case"number":return"right";case"boolean":return"center";default:return Ra(M)}}(O,this.option("rtlEnabled")),y.format=y.format||be.getFormatByDataType(O),y.customizeText=y.customizeText||p(O),y.defaultFilterOperations=y.defaultFilterOperations||!S&&t[O]||[],E(y.filterOperations)||n(y),y.defaultFilterOperation=y.filterOperations&&y.filterOperations[0]||"=",y.showEditorAlways=E(y.showEditorAlways)?y.showEditorAlways:O==="boolean"&&!y.cellTemplate&&!y.lookup)},updateColumnDataTypes:function(y){var T=this,S=T.option("dateSerializationFormat"),O=T._getFirstItems(y),P=!1;return V(T._columns,function(M,$){var Q,oe,ge,ee,xe,w=$.lookup;if(be.isDateType($.dataType)&&$.serializationFormat===void 0&&($.serializationFormat=S),w&&be.isDateType(w.dataType)&&$.serializationFormat===void 0&&(w.serializationFormat=S),$.calculateCellValue&&O.length){if(!$.dataType||w&&!w.dataType){for(Q=0;Q<O.length;Q++)oe=$.calculateCellValue(O[Q]),$.dataType||(xe=d(oe),ge=ge||xe,ge&&xe&&ge!==xe&&(ge="string")),w&&!w.dataType&&(xe=d(be.getDisplayValue($,oe,O[Q])),ee=ee||xe,ee&&xe&&ee!==xe&&(ee="string"));(ge||ee)&&(ge&&($.dataType=ge),w&&ee&&(w.dataType=ee),P=!0)}if($.serializationFormat===void 0||w&&w.serializationFormat===void 0)for(Q=0;Q<O.length;Q++)oe=$.calculateCellValue(O[Q],!0),$.serializationFormat===void 0&&($.serializationFormat=c($.dataType,oe)),w&&w.serializationFormat===void 0&&(w.serializationFormat=c(w.dataType,w.calculateCellValue(oe,!0)))}T._updateColumnOptions($,M)}),P},_customizeColumns:function(y){var T=this.option("customizeColumns");if(T){var S=y.some(function(O){return $e(O.ownerBand)});S&&B(this),T(y),U(this,a(this,y))}},updateColumns:function(y,T){if(T||this.updateSortingGrouping(y),!y||y.isLoaded()){var S=y?y.sort()||[]:this.getSortDataSourceParameters(),O=y?y.group()||[]:this.getGroupDataSourceParameters(),P=y==null?void 0:y.lastLoadOptions().filter;this._customizeColumns(this._columns),B(this);var M=this._columns;return De(this.refresh(!0)).always(()=>{this._columns===M&&(this._updateChanges(y,{sorting:S,grouping:O,filtering:P}),W(this))})}},_updateChanges:function(y,T){y&&(this.updateColumnDataTypes(y),this._dataSourceApplied=!0),be.equalSortParameters(T.sorting,this.getSortDataSourceParameters())||H(this,"sorting"),be.equalSortParameters(T.grouping,this.getGroupDataSourceParameters())||H(this,"grouping");var S=this.getController("data");S&&!be.equalFilterParameters(T.filtering,S.getCombinedFilter())&&H(this,"filtering"),H(this,"columns")},updateSortingGrouping:function(y,T){var S=this,O,P,M=function(xe,w,he){V(xe,function(de,F){if(delete F[he],w)for(var L=0;L<w.length;L++){var X=w[L].selector,ce=w[L].isExpanded;if(X===F.dataField||X===F.name||X===F.selector||X===F.calculateCellValue||X===F.calculateGroupValue||X===F.calculateDisplayValue){F.sortOrder=F.sortOrder||(w[L].desc?"desc":"asc"),ce!==void 0&&(F.autoExpandGroup=ce),F[he]=L;break}}})};if(y){O=be.normalizeSortingInfo(y.sort());var $=be.normalizeSortingInfo(y.group()),Q=S.getGroupDataSourceParameters(),oe=S.getSortDataSourceParameters(),ge=!be.equalSortParameters($,Q,!0),ee=!ge&&!be.equalSortParameters($,Q);S._columns.length||(V($,function(xe,w){S._columns.push(w.selector)}),V(O,function(xe,w){Ie(w.selector)||S._columns.push(w.selector)}),U(S,a(S,S._columns))),(T||!Q&&!S._hasUserState)&&(ge||ee)&&(M(S._columns,$,"groupIndex"),T&&(ge&&H(S,"grouping"),ee&&H(S,"groupExpanding"),P=!0)),(T||!oe&&!S._hasUserState)&&!be.equalSortParameters(O,oe)&&(M(S._columns,O,"sortIndex"),T&&(H(S,"sorting"),P=!0)),P&&W(S)}},updateFilter:function(y,T,S,O){if(!Array.isArray(y))return y;if(y=k([],y),S=y.columnIndex!==void 0?y.columnIndex:S,O=y.filterValue!==void 0?y.filterValue:O,Ve(y[0])&&y[0]!=="!"){var P=this.columnOption(y[0]);T?At().forceIsoDateParsing&&P&&P.serializeValue&&y.length>1&&(y[y.length-1]=P.serializeValue(y[y.length-1],"filter")):P&&P.selector&&(y[0]=P.selector,y[0].columnIndex=P.index)}else Ie(y[0])&&(y[0].columnIndex=S,y[0].filterValue=O);for(var M=0;M<y.length;M++)y[M]=this.updateFilter(y[M],T,S,O);return y},columnCount:function(){return this._columns?this._columns.length:0},columnOption:function(y,T,S,O){var P=this,M=P._columns.concat(P._commandColumns),$=K(M,y);if($){if(arguments.length===1)return k({},$);if(Ve(T)){if(arguments.length===2)return te(P,$,T);te(P,$,T,S,O)}else $e(T)&&V(T,function(Q,oe){te(P,$,Q,oe,O)});W(P)}},clearSorting:function(){var y=this.columnCount();this.beginUpdate();for(var T=0;T<y;T++)this.columnOption(T,"sortOrder",void 0);this.endUpdate()},clearGrouping:function(){var y=this.columnCount();this.beginUpdate();for(var T=0;T<y;T++)this.columnOption(T,"groupIndex",void 0);this.endUpdate()},getVisibleIndex:function(y,T){for(var S=this.getVisibleColumns(T),O=S.length-1;O>=0;O--)if(S[O].index===y)return O;return-1},getVisibleIndexByColumn:function(y,T){var S=this.getVisibleColumns(T),O=S.filter(P=>P.index===y.index&&P.command===y.command)[0];return S.indexOf(O)},getVisibleColumnIndex:function(y,T){var S=this.columnOption(y,"index");return this.getVisibleIndex(S,T)},addColumn:function(y){var T=r(this,y),S=this._columns.length;this._columns.push(T),T.isBand&&(this._columns=a(this,this._columns),T=this._columns[S]),T.added=y,B(this,T),this.updateColumns(this._dataSource),this._checkColumns()},deleteColumn:function(y){var T=this.columnOption(y);if(T&&T.index>=0){if(O=this._columns,O.forEach(P=>{E(P.ownerBand)&&(P.ownerBand=O[P.ownerBand])}),this._columns.splice(T.index,1),T.isBand){var S=this.getChildrenByBandColumn(T.index).map(P=>P.index);this._columns=this._columns.filter(P=>S.indexOf(P.index)<0)}B(this),this.updateColumns(this._dataSource)}var O},addCommandColumn:function(y){var T=this._commandColumns.filter(S=>S.command===y.command)[0];T||(T=y,this._commandColumns.push(T))},getUserState:function(){var y=this._columns,T=[],S;function O(P,M){y[S][M]!==void 0&&(T[S][M]=y[S][M])}for(S=0;S<y.length;S++)T[S]={},V(Id,O);return T},setName:function(y){y.name=y.name||y.dataField||y.type},setUserState:function(y){var T=this._dataSource,S=this.option("stateStoring.ignoreColumnOptionNames");if(y==null||y.forEach(this.setName),!S){S=[];var O=this.getCommonSettings();this.option("columnChooser.enabled")||S.push("visible"),this.option("sorting.mode")==="none"&&S.push("sortIndex","sortOrder"),O.allowGrouping||S.push("groupIndex"),O.allowFixing||S.push("fixed","fixedPosition"),O.allowResizing||S.push("width","visibleWidth");var P=!this.option("filterPanel.visible");!this.option("filterRow.visible")&&P&&S.push("filterValue","selectedFilterOperation"),!this.option("headerFilter.visible")&&P&&S.push("filterValues","filterType")}this._columnsUserState=y,this._ignoreColumnOptionNames=S,this._hasUserState=!!y,H(this,"filtering"),this.init(),T&&(T.sort(this.getSortDataSourceParameters()),T.group(this.getGroupDataSourceParameters()))},_checkColumns:function(){var y={},T=!1,S=[];this._columns.forEach(O=>{var P,M=O.name,$=(P=O.columns)===null||P===void 0?void 0:P.length,Q=O.allowEditing&&(O.dataField||O.setCellValue)&&!$;M?(y[M]&&S.push('"'.concat(M,'"')),y[M]=!0):Q&&(T=!0)}),S.length&&Qe.log("E1059",S.join(", ")),T&&Qe.log("E1060")},_createCalculatedColumnOptions:function(y,T){var S={},O=y.dataField;if((Array.isArray(y.columns)&&y.columns.length||y.isBand)&&(S.isBand=!0,O=null),O){if(Ve(O)){var P=bt(O);S={caption:vo(O),calculateCellValue:function(M,$){var Q=P(M);return this.deserializeValue&&!$?this.deserializeValue(Q):Q},setCellValue:Y,parseValue:function(M){var $,Q;return this.dataType==="number"?Ve(M)&&this.format?$=function(oe,ge){var ee=St.parse(oe);if(Et(ee)){var xe=St.format(ee,ge),w=St.format(ee,"decimal");if(xe===oe||w===oe)return ee}}(M.trim(),this.format):E(M)&&Et(M)&&($=Number(M)):this.dataType==="boolean"?M===this.trueText?$=!0:M===this.falseText&&($=!1):be.isDateType(this.dataType)?(Q=Xe.parse(M,this.format),Q&&($=Q)):$=M,$}}}S.allowFiltering=!0}else S.allowFiltering=!!y.calculateFilterExpression;return S.calculateFilterExpression=function(){return $s.defaultCalculateFilterExpression.apply(this,arguments)},S.createFilterExpression=function(M){var $;return this.calculateFilterExpression&&($=this.calculateFilterExpression.apply(this,arguments)),Ie($)&&($=[$,"=",!0]),$&&($.columnIndex=this.index,$.filterValue=M),$},(!O||!Ve(O))&&k(!0,S,{allowSorting:!1,allowGrouping:!1,calculateCellValue:function(){return null}}),T&&(S.allowFixing=!1),y.dataType&&(S.userDataType=y.dataType),y.selectedFilterOperation&&!("defaultSelectedFilterOperation"in S)&&(S.defaultSelectedFilterOperation=y.selectedFilterOperation),y.lookup&&(S.lookup={calculateCellValue:function(M,$){return this.valueExpr&&(M=this.valueMap&&this.valueMap[M]),this.deserializeValue&&!$?this.deserializeValue(M):M},updateValueMap:function(){if(this.valueMap={},this.items)for(var M=bt(this.valueExpr),$=bt(this.displayExpr),Q=0;Q<this.items.length;Q++){var oe=this.items[Q],ge=$(oe);this.valueMap[M(oe)]=ge,this.dataType=this.dataType||d(ge)}},update:function(){var M=this,$=M.dataSource;if($)if(Ie($)&&!Hi.isWrapped($)&&($=$({})),Ye($)||$ instanceof cr||Array.isArray($)){if(M.valueExpr){var Q=el($);return Q.paginate=!1,$=new fr(Q),$.load().done(function(oe){M.items=oe,M.updateValueMap&&M.updateValueMap()})}}else Qe.log("E1016");else M.updateValueMap&&M.updateValueMap()}}),S.resizedCallbacks=dt(),y.resized&&S.resizedCallbacks.add(y.resized.bind(y)),V(S,function(M){if(Ie(S[M])&&M.indexOf("default")!==0){var $="default"+M.charAt(0).toUpperCase()+M.substr(1);S[$]=S[M]}}),S},getRowCount:function(){return this._rowCount=this._rowCount||function(y){var T=1,S=y.getBandColumnsCache(),O=S.columnParentByIndex;return y._columns.forEach(function(P){var M=o(P.index,O),$=M.filter(function(Q){return!Q.visible});P.visible&&!$.length&&(T=Math.max(T,M.length+1))}),T}(this),this._rowCount},getRowIndex:function(y,T){var S=this._columns[y],O=this.getBandColumnsCache();return S&&(T||S.visible&&!(S.command||E(S.groupIndex)))?o(y,O.columnParentByIndex).length:0},getChildrenByBandColumn:function(y,T){var S=this.getBandColumnsCache(),O=s(y,S.columnChildrenByIndex,!T);return T?O.filter(function(P){return P.visible&&!P.command}).sort(function(P,M){return P.visibleIndex-M.visibleIndex}):O},isParentBandColumn:function(y,T){var S=!1,O=this._columns[y],P=this.getBandColumnsCache(),M=O&&o(y,P.columnParentByIndex);return M&&V(M,function($,Q){if(Q.index===T)return S=!0,!1}),S},isParentColumnVisible:function(y){var T=!0,S=this.getBandColumnsCache(),O=y>=0&&o(y,S.columnParentByIndex);return O&&V(O,function(P,M){return T=T&&M.visible,T}),T},getColumnId:function(y){return y.command&&y.type===ta?x(this,y)?"type:"+y.type:"command:"+y.command:y.index},getCustomizeTextByDataType:p,getHeaderContentAlignment:function(y){var T=this.option("rtlEnabled");return T?y==="left"?"right":"left":y}}}())}};Oe.registerModule("columns",{defaultOptions:function(){return k(!0,{},Z0.defaultOptions(),{commonColumnSettings:{allowExporting:!0}})},controllers:Z0.controllers});const Mz=Oe.Controller.inherit(function(){function e(o,s){if(o&&(o=o.slice(0),s))for(var l=0;l<o.length;l++)o[l]=k({key:o[l].key},o[l]),o[l].items=e(o[l].items,s-1);return o}function t(o,s,l){var u={reload:!0,fullReload:!0};return s&&(u={sorting:!Oe.equalSortParameters(o.sort,s.sort),grouping:!Oe.equalSortParameters(o.group,s.group,!0),groupExpanding:!Oe.equalSortParameters(o.group,s.group)||s.groupExpand,filtering:!Oe.equalFilterParameters(o.filter,s.filter),pageIndex:o.pageIndex!==s.pageIndex,skip:o.skip!==s.skip,take:o.take!==s.take,pageSize:o.pageSize!==s.pageSize,fullReload:l},u.reload=l||u.sorting||u.grouping||u.filtering,u.paging=u.pageIndex||u.pageSize||u.take),u}function i(o,s){var l=Oe.normalizeSortingInfo(o.group||o.storeLoadOptions.group||o.loadOptions.group).length,u=[];if(n(u,o,l))return u;s&&function(d,c,h){var f=d.length,{storeLoadOptions:p}=c;if(p.skip!==void 0&&p.take&&!h){var m=[];n(m,c,h,!0);var g=m.length;if(f||g){var C,b;c.skip=(C=c.skip)!==null&&C!==void 0?C:p.skip,c.take=(b=c.take)!==null&&b!==void 0?b:p.take}f&&(p.skip+=f,p.take-=f,c.cachedDataPartBegin=d),g&&(p.take-=g,c.cachedDataPartEnd=m.reverse())}}(u,o,l)}function n(o,s,l,u){var d,c,h,{storeLoadOptions:f}=s,p=(d=(c=s.take)!==null&&c!==void 0?c:f.take)!==null&&d!==void 0?d:0,m=(h=s.cachedData)===null||h===void 0?void 0:h.items;if(p&&m){for(var g,C,b=(g=(C=s.skip)!==null&&C!==void 0?C:f.skip)!==null&&g!==void 0?g:0,A=0;A<p;A++){var B=u?p-1-A:A,D=B+b,U=m[D];if(U===void 0&&D in m)return!0;var H=r(s,U,l,B,p);if(H)o.push(H);else return!1}return!0}return!1}function r(o,s,l,u,d){if(l&&s){var c=u===0&&o.skips||[],h=u===d-1&&o.takes||[];return function f(p,m,g,C){if(m&&p){var b=Se({},p),A=g[0]||0,B=C[0],D=p.items;if(D){if(B===void 0&&!D[A])return;b.items=[],g.length&&(b.isContinuation=!0),C.length&&(b.isContinuationOnNextPage=!0);for(var U=0;B===void 0?D[U+A]:U<B;U++){var H=D[U+A],W=U+1===B,G=f(H,m-1,U===0?g.slice(1):[],W?C.slice(1):[]);if(G!==void 0)b.items.push(G);else return}}return b}return p}(s,l,c,h)}else return s}function a(o,s,l,u){if(l&&s){var d=Se({},s);delete d.isContinuation,delete d.isContinuationOnNextPage;var c=u[0]||0;return s.items&&(d.items=(o==null?void 0:o.items)||{},s.items.forEach((h,f)=>{var p=f+c,m=f===0?u.slice(1):[];d.items[p]=a(d.items[p],h,l-1,m)})),d}return s}return{init:function(o,s){var l=this;l._dataSource=o,l._remoteOperations=s||{},l._isLastPage=!o.isLastPage(),l._hasLastPage=!1,l._currentTotalCount=0,l._cachedData={items:{}},l._lastOperationTypes={},l._eventsStrategy=o._eventsStrategy,l._totalCountCorrection=0,l._isLoadingAll=!1,l.changed=dt(),l.loadingChanged=dt(),l.loadError=dt(),l.customizeStoreLoadOptions=dt(),l.changing=dt(),l.pushed=dt(),l._dataChangedHandler=l._handleDataChanged.bind(l),l._customizeStoreLoadOptionsHandler=l._handleCustomizeStoreLoadOptions.bind(l),l._dataLoadedHandler=l._handleDataLoaded.bind(l),l._loadingChangedHandler=l._handleLoadingChanged.bind(l),l._loadErrorHandler=l._handleLoadError.bind(l),l._pushHandler=l._handlePush.bind(l),l._changingHandler=l._handleChanging.bind(l),o.on("changed",l._dataChangedHandler),o.on("customizeStoreLoadOptions",l._customizeStoreLoadOptionsHandler),o.on("customizeLoadResult",l._dataLoadedHandler),o.on("loadingChanged",l._loadingChangedHandler),o.on("loadError",l._loadErrorHandler),o.on("changing",l._changingHandler),o.store().on("beforePush",l._pushHandler),V(o,function(u,d){!l[u]&&Ie(d)&&(l[u]=function(){return this._dataSource[u].apply(this._dataSource,arguments)})})},remoteOperations:function(){return this._remoteOperations},dispose:function(o){var s=this._dataSource,l=s.store();s.off("changed",this._dataChangedHandler),s.off("customizeStoreLoadOptions",this._customizeStoreLoadOptionsHandler),s.off("customizeLoadResult",this._dataLoadedHandler),s.off("loadingChanged",this._loadingChangedHandler),s.off("loadError",this._loadErrorHandler),s.off("changing",this._changingHandler),l&&l.off("beforePush",this._pushHandler),o||s.dispose()},refresh:function(o,s){var l=this._dataSource;s.reload&&(this.resetCurrentTotalCount(),this._isLastPage=!l.paginate(),this._hasLastPage=this._isLastPage)},resetCurrentTotalCount:function(){this._currentTotalCount=0,this._totalCountCorrection=0},resetCache:function(){this._cachedStoreData=void 0,this._cachedPagingData=void 0},resetPagesCache:function(){this._cachedData={items:{}}},_needClearStoreDataCache:function(){var o=this.remoteOperations(),s=t(this._lastLoadOptions||{},{}),l=Object.keys(o).every(u=>!s[u]||!o[u]);return!l},push:function(o,s){var l=this.store();this._needClearStoreDataCache()&&(this._cachedStoreData=void 0),this._cachedPagingData=void 0,this.resetPagesCache(!0),this._cachedStoreData&&Rs({keyInfo:l,data:this._cachedStoreData,changes:o}),s||this._applyBatch(o),this.pushed.fire(o)},getDataIndexGetter:function(){if(!this._dataIndexGetter){var o,s,l=this.store();this._dataIndexGetter=u=>{var d=s&&s!==this._cachedStoreData;if(!o||d){s=this._cachedStoreData||[],o={};for(var c=0;c<s.length;c++)o[jn(l.keyOf(s[c]))]=c}return o[jn(l.keyOf(u))]}}return this._dataIndexGetter},_getKeyInfo:function(){return this.store()},_applyBatch:function(o){var s=this._getKeyInfo(),l=this._dataSource,u=Oe.normalizeSortingInfo(this.group()).length,d=this.totalCount(),c=this.option("scrolling.mode")==="virtual";o=o.filter(function(p){return!l.paginate()||p.type!=="insert"||p.index!==void 0});var h=()=>u?this.itemsCount():this.items().length,f=h();Rs({keyInfo:s,data:this._items,changes:o,groupCount:u,useInsertIndex:!0}),Rs({keyInfo:s,data:l.items(),changes:o,groupCount:u,useInsertIndex:!0}),(this._currentTotalCount>0||c&&d===f)&&(this._totalCountCorrection+=h()-f),o.splice(0,o.length)},_handlePush:function(o){var{changes:s}=o;this.push(s,!0)},_handleChanging:function(o){this.changing.fire(o),this._applyBatch(o.changes)},_needCleanCacheByOperation:function(o,s){var l=["filtering","sorting","paging"],u=l.indexOf(o),d=u>=0?l.slice(u):[o];return d.some(c=>s[c])},_customizeRemoteOperations:function(o,s){var l=this._cachedStoreData,u=this._cachedPagingData,d=this._cachedData;(o.storeLoadOptions.filter&&!o.remoteOperations.filtering||o.storeLoadOptions.sort&&!o.remoteOperations.sorting)&&(o.remoteOperations={filtering:o.remoteOperations.filtering,summary:o.remoteOperations.summary}),s.fullReload?(l=void 0,u=void 0,d={items:{}}):(s.reload?(u=void 0,d={items:{}}):s.groupExpanding&&(d={items:{}}),V(s,(c,h)=>{h&&this._needCleanCacheByOperation(c,o.remoteOperations)&&(l=void 0,u=void 0)})),u&&(o.remoteOperations.paging=!1),o.cachedStoreData=l,o.cachedPagingData=u,o.cachedData=d,o.isCustomLoading||(this._cachedStoreData=l,this._cachedPagingData=u,this._cachedData=d)},_handleCustomizeStoreLoadOptions(o){var s;this._handleDataLoading(o),((s=o.data)===null||s===void 0?void 0:s.length)!==0&&(o.data=i(o,!0)||o.cachedStoreData)},_handleDataLoading:function(o){var s=this._dataSource,l=this._lastLoadOptions;this.customizeStoreLoadOptions.fire(o),o.delay=this.option("loadingTimeout"),o.originalStoreLoadOptions=o.storeLoadOptions,o.remoteOperations=k({},this.remoteOperations());var u=!this.isLoaded()&&!this._isRefreshing;this.option("integrationOptions.renderedOnServer")&&!this.isLoaded()&&(o.delay=void 0);var d=k({pageIndex:this.pageIndex(),pageSize:this.pageSize()},o.storeLoadOptions),c=t(d,l,u);if(this._customizeRemoteOperations(o,c),!o.isCustomLoading){var h=this._isRefreshing;o.pageIndex=s.pageIndex(),o.lastLoadOptions=d,o.operationTypes=c,this._loadingOperationTypes=c,this._isRefreshing=!0,De(h||this._isRefreshed||this.refresh(o,c)).done(()=>{this._lastOperationId===o.operationId&&(this._isRefreshed=!0,this.load().always(()=>{this._isRefreshed=!1}))}).fail(()=>{s.cancel(o.operationId)}).always(()=>{this._isRefreshing=!1}),s.cancel(this._lastOperationId),this._lastOperationId=o.operationId,this._isRefreshing&&s.cancel(this._lastOperationId)}this._handleDataLoadingCore(o)},_handleDataLoadingCore:function(o){var s=o.remoteOperations;o.loadOptions={};var l=o.cachedData.extra,u={filter:!s.filtering,sort:!s.sorting,group:!s.grouping,summary:!s.summary,skip:!s.paging,take:!s.paging,requireTotalCount:l&&"totalCount"in l||!s.paging};V(o.storeLoadOptions,function(d,c){u[d]&&(o.loadOptions[d]=c,delete o.storeLoadOptions[d])}),l&&(o.extra=l)},_handleDataLoaded:function(o){var s=o.loadOptions,l=o.remoteOperations&&!o.remoteOperations.paging,u=o.cachedData,d=o.storeLoadOptions,c=this.option("cacheEnabled")!==!1&&d,h=c&&!o.isCustomLoading&&u&&(!l||d.group),f=c&&l,p=f&&!o.isCustomLoading;if(!s){this._dataSource.cancel(o.operationId);return}l&&(o.skip=s.skip,o.take=s.take,delete s.skip,delete s.take),s.group&&(s.group=o.group||s.group);var m=Oe.normalizeSortingInfo(o.group||d.group||s.group).length;o.cachedDataPartBegin&&(o.data=o.cachedDataPartBegin.concat(o.data)),o.cachedDataPartEnd&&(o.data=o.data.concat(o.cachedDataPartEnd)),(!h||!i(o))&&(f&&o.cachedPagingData?o.data=e(o.cachedPagingData,m):(p&&(this._cachedStoreData?o.mergeStoreLoadData&&(o.data=this._cachedStoreData=this._cachedStoreData.concat(o.data)):this._cachedStoreData=e(o.data,Oe.normalizeSortingInfo(d.group).length)),new Qs(o.data).load(s).done(g=>{o.data=g,p&&(this._cachedPagingData=e(o.data,m))}).fail(g=>{o.data=new se().reject(g)})),s.requireTotalCount&&l&&(o.extra=Ye(o.extra)?o.extra:{},o.extra.totalCount=o.data.length),o.extra&&o.extra.totalCount>=0&&(d.requireTotalCount===!1||s.requireTotalCount===!1)&&(o.extra.totalCount=-1),this._handleDataLoadedCore(o),h&&(u.extra=u.extra||k({},o.extra),De(o.data).done(g=>{(function(C,b,A){for(var B,D,U,H,{storeLoadOptions:W}=C,G=(B=(D=C.skip)!==null&&D!==void 0?D:W.skip)!==null&&B!==void 0?B:0,j=(U=(H=C.take)!==null&&H!==void 0?H:W.take)!==null&&U!==void 0?U:0,te=0;te<j;te++){var N=te+G,Y=C.cachedData.items,x=te===0&&C.skips||[];Y[N]=a(Y[N],b[te],A,x)}})(o,g,m)}))),De(o.data).done(()=>{o.lastLoadOptions&&(this._lastLoadOptions=o.lastLoadOptions,Object.keys(o.operationTypes).forEach(g=>{this._lastOperationTypes[g]=this._lastOperationTypes[g]||o.operationTypes[g]}))}),o.storeLoadOptions=o.originalStoreLoadOptions},_handleDataLoadedCore:function(o){o.remoteOperations&&!o.remoteOperations.paging&&Array.isArray(o.data)&&(o.skip!==void 0&&(o.data=o.data.slice(o.skip)),o.take!==void 0&&(o.data=o.data.slice(0,o.take)))},_handleLoadingChanged:function(o){this.loadingChanged.fire(o)},_handleLoadError:function(o){this.loadError.fire(o),this.changed.fire({changeType:"loadError",error:o})},_loadPageSize:function(){return this.pageSize()},_handleDataChanged:function(o){var s,l=this._dataSource,u=!1,d=!o||E(o.changeType),c=this.itemsCount();d&&(this._isLastPage=!c||!this._loadPageSize()||c<this._loadPageSize(),this._isLastPage&&(this._hasLastPage=!0)),l.totalCount()>=0?l.pageIndex()>=this.pageCount()&&(l.pageIndex(this.pageCount()-1),this.pageIndex(l.pageIndex()),this.resetPagesCache(),l.load(),u=!0):d&&(s=l.pageIndex()*this.pageSize()+c,s>this._currentTotalCount&&(this._currentTotalCount=s,(l.pageIndex()===0||!this.option("scrolling.legacyMode"))&&(this._totalCountCorrection=0)),c===0&&l.pageIndex()>=this.pageCount()&&(l.pageIndex(this.pageCount()-1),this.option("scrolling.mode")!=="infinite"&&(l.load(),u=!0))),u||(this._operationTypes=this._lastOperationTypes,this._lastOperationTypes={},this.component._optionCache={},this.changed.fire(o),this.component._optionCache=void 0)},_scheduleCustomLoadCallbacks:function(o){var s=this;s._isCustomLoading=!0,o.always(function(){s._isCustomLoading=!1})},loadingOperationTypes:function(){return this._loadingOperationTypes},operationTypes:function(){return this._operationTypes},lastLoadOptions:function(){return this._lastLoadOptions||{}},isLastPage:function(){return this._isLastPage},_dataSourceTotalCount:function(){return this._dataSource.totalCount()},totalCount:function(){return parseInt((this._currentTotalCount||this._dataSourceTotalCount())+this._totalCountCorrection)},totalCountCorrection:function(){return this._totalCountCorrection},itemsCount:function(){return this._dataSource.items().length},totalItemsCount:function(){return this.totalCount()},pageSize:function(){var o=this._dataSource;return!arguments.length&&!o.paginate()?0:o.pageSize.apply(o,arguments)},pageCount:function(){var o=this.totalItemsCount()-this._totalCountCorrection,s=this.pageSize();return s&&o>0?Math.max(1,Math.ceil(o/s)):1},hasKnownLastPage:function(){return this._hasLastPage||this._dataSource.totalCount()>=0},loadFromStore:function(o,s){var l=this._dataSource,u=new se;if(l)return s=s||l.store(),s.load(o).done(function(d,c){d&&!Array.isArray(d)&&Array.isArray(d.data)&&(c=d,d=d.data),u.resolve(d,c)}).fail(u.reject),u},isCustomLoading:function(){return!!this._isCustomLoading},load:function(o){var s=this,l=s._dataSource,u=new se;if(o){var d=l.store(),c=l.loadOptions(),h={storeLoadOptions:o,isCustomLoading:!0};return V(d._customLoadOptions()||[],function(f,p){p in h.storeLoadOptions||(h.storeLoadOptions[p]=c[p])}),this._isLoadingAll=o.isLoadingAll,s._scheduleCustomLoadCallbacks(u),l._scheduleLoadCallbacks(u),s._handleCustomizeStoreLoadOptions(h),function(f,p){E(p)?Lh(f,p):f()}(function(){if(!l.store())return u.reject("canceled");De(h.data||s.loadFromStore(h.storeLoadOptions)).done(function(f,p){h.data=f,h.extra=p||{},s._handleDataLoaded(h),o.requireTotalCount&&h.extra.totalCount===void 0&&(h.extra.totalCount=d.totalCount(h.storeLoadOptions)),De(h.data,h.extra.totalCount).done(function(m,g){h.extra.totalCount=g,u.resolve(m,h.extra)}).fail(u.reject)}).fail(u.reject)},s.option("loadingTimeout")),u.fail(function(){s._eventsStrategy.fireEvent("loadError",arguments)}).always(()=>{this._isLoadingAll=!1}).promise()}else return l.load()},reload:function(o){return o?this._dataSource.reload():this._dataSource.load()},getCachedStoreData:function(){return this._cachedStoreData}}}());var fp=Mz;const Xu={extend:function(e){fp=fp.inherit(e)},create:function(e){return new fp(e)}};var J0="_dataSourceOptions",Q0="_dataSourceChangedHandler",ex="_dataSourceLoadErrorHandler",tx="_dataSourceLoadingChangedHandler",ix="_dataSourceFromUrlLoadMode",nx="_getSpecificDataSourceOption",rx="_normalizeDataSource",Zu={postCtor:function(){this.on("disposing",(function(){this._disposeDataSource()}).bind(this))},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){var e=nx in this?this[nx]():this.option("dataSource"),t,i;this._disposeDataSource(),e&&(e instanceof fr?(this._isSharedDataSource=!0,this._dataSource=e):(t=J0 in this?this[J0]():{},i=this._dataSourceType?this._dataSourceType():fr,e=el(e,{fromUrlLoadMode:ix in this&&this[ix]()}),this._dataSource=new i(k(!0,{},t,e))),rx in this&&(this._dataSource=this[rx](this._dataSource)),this._addDataSourceHandlers())},_addDataSourceHandlers:function(){Q0 in this&&this._addDataSourceChangeHandler(),ex in this&&this._addDataSourceLoadErrorHandler(),tx in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this._dataSource.on("loadingChanged",(function(e){this._ready&&this._ready(!e)}).bind(this))},_addDataSourceChangeHandler:function(){var e=this._dataSource;this._proxiedDataSourceChangedHandler=(function(t){this[Q0](e.items(),t)}).bind(this),e.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=this[ex].bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=this[tx].bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){if(this._dataSource){var e=this._dataSource;e.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():e.load()}},_loadSingle:function(e,t){return e=e==="this"?this._dataSource.key()||"this":e,this._dataSource.loadSingle(e,t)},_isLastPage:function(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize},_isDataSourceLoading:function(){return this._dataSource&&this._dataSource.isLoading()},_disposeDataSource:function(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)},getDataSource:function(){return this._dataSource||null}},Ac=function(e,t){var i=t(e);if($e(i))try{return JSON.stringify(i)}catch{return i}return i},Vz=function(e,t,i,n){var r=Ac(e,n);return t[i[r]]},Nz=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0},oD=function(e,t,i,n){var r={},a={},o=0,s=0,l=[];e.forEach(function(b,A){var B=Ac(b,i);r[B]=A}),t.forEach(function(b,A){var B=Ac(b,i);a[B]=A});for(var u=Math.max(e.length,t.length),d=0;d<u+o;d++){var c=t[d],h=d-o+s,f=e[h],p=!c||f&&!Vz(f,t,a,i);if(p)f&&(l.push({type:"remove",key:i(f),index:d,oldItem:f}),s++,d--);else{var m=Ac(c,i),g=r[m],C=e[g];if(!C)o++,l.push({type:"insert",data:c,index:d});else if(g===h)n(C,c)||l.push({type:"update",data:c,key:i(c),index:d,oldItem:C});else return}}return l},sD={defaultOptions:function(){return{loadingTimeout:0,dataSource:null,cacheEnabled:!0,repaintChangesOnly:!1,highlightChanges:!1,onDataErrorOccurred:null,remoteOperations:"auto",paging:{enabled:!0,pageSize:void 0,pageIndex:void 0}}},controllers:{data:Dt.Controller.inherit({}).include(Zu).inherit(function(){var e=function(i,n,r){var a=i._dataSource;if(a){if(r!==void 0){var o=i._getPagingOptionValue(n);if(o!==r){n==="pageSize"&&a.pageIndex(0),a[n](r),i._skipProcessingPagingChange=!0,i.option("paging."+n,r),i._skipProcessingPagingChange=!1;var s=a.pageIndex();return i._isPaging=n==="pageIndex",a[n==="pageIndex"?"load":"reload"]().done(()=>{i._isPaging=!1,i.pageChanged.fire(s)})}return se().resolve().promise()}return a[n]()}return 0},t={init:function(){var i=this;i._items=[],i._cachedProcessedItems=null,i._columnsController=i.getController("columns"),i._isPaging=!1,i._currentOperationTypes=null,i._dataChangedHandler=n=>{i._currentOperationTypes=this._dataSource.operationTypes(),i._handleDataChanged(n),i._currentOperationTypes=null},i._columnsChangedHandler=i._handleColumnsChanged.bind(i),i._loadingChangedHandler=i._handleLoadingChanged.bind(i),i._loadErrorHandler=i._handleLoadError.bind(i),i._customizeStoreLoadOptionsHandler=i._handleCustomizeStoreLoadOptions.bind(i),i._changingHandler=i._handleChanging.bind(i),i._dataPushedHandler=i._handleDataPushed.bind(i),i._columnsController.columnsChanged.add(i._columnsChangedHandler),i._isLoading=!1,i._isCustomLoading=!1,i._repaintChangesOnly=void 0,i._changes=[],i.createAction("onDataErrorOccurred"),i.dataErrorOccurred.add(function(n){return i.executeAction("onDataErrorOccurred",{error:n})}),i._refreshDataSource()},_getPagingOptionValue:function(i){return this._dataSource[i]()},callbackNames:function(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]},callbackFlags:function(i){if(i==="dataErrorOccurred")return{stopOnFalse:!0}},publicMethods:function(){return["beginCustomLoading","endCustomLoading","refresh","filter","clearFilter","getCombinedFilter","keyOf","byKey","getDataByKeys","pageIndex","pageSize","pageCount","totalCount","_disposeDataSource","getKeyByRowIndex","getRowIndexByKey","getDataSource","getVisibleRows","repaintRows"]},reset:function(){this._columnsController.reset(),this._items=[],this._refreshDataSource()},_handleDataSourceChange(i){if(i.value===i.previousValue||this.option("columns")&&Array.isArray(i.value)&&Array.isArray(i.previousValue)){var n=i.value!==i.previousValue;if(n){var r=this.store();r&&(r._array=i.value)}return this.needToRefreshOnDataSourceChange(i)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1},needToRefreshOnDataSourceChange:function(i){return!0},optionChanged:function(i){var n=this,r;function a(){i.handled=!0}if(i.name==="dataSource"&&i.name===i.fullName&&this._handleDataSourceChange(i)){a();return}switch(i.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":a();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":a(),n.reset();break;case"paging":if(r=n.dataSource(),r&&n._setPagingOptions(r)){var o=r.pageIndex();r.load().done(()=>n.pageChanged.fire(o))}a();break;case"rtlEnabled":n.reset();break;case"columns":r=n.dataSource(),r&&r.isLoading()&&i.name===i.fullName&&(this._useSortingGroupingFromColumns=!0,r.load());break;default:n.callBase(i)}},isReady:function(){return!this._isLoading},getDataSource:function(){return this._dataSource&&this._dataSource._dataSource},getCombinedFilter:function(i){return this.combinedFilter(void 0,i)},combinedFilter:function(i,n){var r=this._dataSource,a=this._columnsController;if(r){i===void 0&&(i=r.filter());var o=this._calculateAdditionalFilter();o&&(a.isDataSourceApplied()||a.isAllDataTypesDefined())&&(i=be.combineFilters([o,i])),i=a.updateFilter(i,n||r.remoteOperations().filtering)}return i},waitReady:function(){return this._updateLockCount?(this._readyDeferred=new se,this._readyDeferred):De()},_endUpdateCore:function(){var i=this._changes;if(i.length){this._changes=[];var n=i.every(r=>r.repaintChangesOnly);this.updateItems(i.length===1?i[0]:{repaintChangesOnly:n})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)},_handleCustomizeStoreLoadOptions:function(i){var n,r=this._columnsController,a=this._dataSource,o=i.storeLoadOptions;i.isCustomLoading&&!o.isLoadingAll||(o.filter=this.combinedFilter(o.filter),((n=o.filter)===null||n===void 0?void 0:n.length)===1&&o.filter[0]==="!"&&(i.data=[],i.extra=i.extra||{},i.extra.totalCount=0),r.isDataSourceApplied()||r.updateColumnDataTypes(a),this._columnsUpdating=!0,r.updateSortingGrouping(a,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,o.sort=r.getSortDataSourceParameters(),o.group=r.getGroupDataSourceParameters(),a.sort(o.sort),a.group(o.group),o.sort=r.getSortDataSourceParameters(!a.remoteOperations().sorting),i.group=r.getGroupDataSourceParameters(!a.remoteOperations().grouping))},_handleColumnsChanged:function(i){var n=this,r=i.changeTypes,a=i.optionNames,o,s,l;if(r.sorting||r.grouping)n._dataSource&&!n._columnsUpdating&&(n._dataSource.group(n._columnsController.getGroupDataSourceParameters()),n._dataSource.sort(n._columnsController.getSortDataSourceParameters()),n.reload());else if(r.columns&&(s=n._columnsController.columnOption(i.columnIndex,"filterValues"),(a.filterValues||a.filterType&&Array.isArray(s)||a.filterValue||a.selectedFilterOperation||a.allowFiltering)&&(o=n._columnsController.columnOption(i.columnIndex,"filterValue"),(Array.isArray(s)||i.columnIndex===void 0||E(o)||!a.selectedFilterOperation||a.filterValue)&&(n._applyFilter(),l=!0)),!n._needApplyFilter&&!be.checkChanges(a,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])&&n._columnsController.columnsChanged.add(function d(c){var h;n._columnsController.columnsChanged.remove(d),n.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:c==null||(h=c.changeTypes)===null||h===void 0?void 0:h.virtualColumnsScrolling})}),E(a.visible))){var u=n._columnsController.columnOption(i.columnIndex);u&&(E(u.filterValue)||E(u.filterValues))&&(n._applyFilter(),l=!0)}!l&&r.filtering&&n.reload()},_handleDataChanged:function(i){var n=this,r=n._dataSource,a=n._columnsController,o=!1;this._useSortingGroupingFromColumns=!1,r&&!n._isDataSourceApplying&&(n._isDataSourceApplying=!0,De(n._columnsController.applyDataSource(r)).done(function(){n._isLoading&&n._handleLoadingChanged(!1),o&&i&&i.isDelayed&&(i.isDelayed=!1),n._isDataSourceApplying=!1;var s=n._needApplyFilter;n._needApplyFilter=!1,s&&!n._isAllDataTypesDefined&&(l=n._calculateAdditionalFilter(),l&&l.length)?(Qe.log("W1005",n.component.NAME),n._applyFilter()):n.updateItems(i,!0);var l}).fail(function(){n._isDataSourceApplying=!1}),n._isDataSourceApplying&&(o=!0,n._handleLoadingChanged(!0)),n._needApplyFilter=!n._columnsController.isDataSourceApplied(),n._isAllDataTypesDefined=a.isAllDataTypesDefined())},_handleLoadingChanged:function(i){this._isLoading=i,this._fireLoadingChanged()},_handleLoadError:function(i){this.dataErrorOccurred.fire(i)},_handleDataPushed:function(i){this.pushed.fire(i)},fireError:function(){this.dataErrorOccurred.fire(Qe.Error.apply(Qe,arguments))},_setPagingOptions:function(i){var n=this.option("paging.pageIndex"),r=this.option("paging.pageSize"),a=this.option("paging.enabled"),o=this.option("scrolling.mode"),s=o==="infinite",l=o==="virtual",u=a||l||s,d=!1;return i.requireTotalCount(!s),a!==void 0&&i.paginate()!==u&&(i.paginate(u),d=!0),r!==void 0&&i.pageSize()!==r&&(i.pageSize(r),d=!0),n!==void 0&&i.pageIndex()!==n&&(i.pageIndex(n),d=!0),d},_getSpecificDataSourceOption:function(){var i=this.option("dataSource");return Array.isArray(i)?{store:{type:"array",data:i,key:this.option("keyExpr")}}:i},_initDataSource:function(){var i=this.option("dataSource"),n=this._dataSource;this.callBase(),i=this._dataSource,this._useSortingGroupingFromColumns=!0,this._cachedProcessedItems=null,i?(this._setPagingOptions(i),this.setDataSource(i)):n&&this.updateItems()},_loadDataSource:function(){var i=this._dataSource,n=new se;return De(this._columnsController.refresh(!0)).always(function(){i?i.load().done(n.resolve).fail(n.reject):n.resolve()}),n.promise()},_beforeProcessItems:function(i){return i.slice(0)},getRowIndexDelta:function(){return 0},_processItems:function(i,n){var r=this,a=r.getRowIndexDelta(),o=n.changeType,s=r._columnsController.getVisibleColumns(null,o==="loadingAll"),l=r._items,u=o==="append"&&l.length>0?l[l.length-1]:null,d=E(u==null?void 0:u.dataIndex)?u.dataIndex+1:0,c={visibleColumns:s,dataIndex:d},h=[];return V(i,function(f,p){E(p)&&(c.rowIndex=f-a,p=r._processItem(p,c),h.push(p))}),h},_processItem:function(i,n){return i=this._generateDataItem(i,n),i=this._processDataItem(i,n),i.dataIndex=n.dataIndex++,i},_generateDataItem:function(i){return{rowType:"data",data:i,key:this.keyOf(i)}},_processDataItem:function(i,n){return i.values=this.generateDataValues(i.data,n.visibleColumns),i},generateDataValues:function(i,n,r){for(var a=[],o,s=0;s<n.length;s++){var l=n[s];o=r?void 0:null,l.command||(l.calculateCellValue?o=l.calculateCellValue(i):l.dataField&&(o=i[l.dataField])),a.push(o)}return a},_applyChange:function(i){i.changeType==="update"?this._applyChangeUpdate(i):this.items().length&&i.repaintChangesOnly&&i.changeType==="refresh"?this._applyChangesOnly(i):i.changeType==="refresh"&&this._applyChangeFull(i)},_applyChangeFull:function(i){this._items=i.items.slice(0)},_getRowIndices:function(i){var n=i.rowIndices.slice(0),r=this.getRowIndexDelta();n.sort(function(s,l){return s-l});for(var a=0;a<n.length;a++){var o=n[a];i.allowInvisibleRowIndices&&(o+=r),o<0&&(n.splice(a,1),a--)}return n},_applyChangeUpdate:function(i){var n=this,r=i.items,a=n._getRowIndices(i),o=n.getRowIndexDelta(),s=n.option("repaintChangesOnly"),l=-1,u=0,d;i.items=[],i.rowIndices=[],i.columnIndices=[],i.changeTypes=[];var c=function(h,f,p){var m=h&&f&&Bt(h.key,f.key);return m&&p&&(m=h.rowType===f.rowType&&(f.rowType!=="detail"||h.isEditing===f.isEditing)),m};V(a,function(h,f){var p;if(f+=u+o,l!==f){l=f;var m=n._items[f],g=n._items[f+1],C=r[f],b=r[f+1],A=c(m,g)||c(C,b);if(C&&(C.rowIndex=f,i.items.push(C)),m&&C&&c(m,C,A))d="update",n._items[f]=C,m.visible!==C.visible?i.items.splice(-1,1,{visible:C.visible}):s&&!i.isFullUpdate&&(p=n._partialUpdateRow(m,C,f-o));else if(C&&!m||b&&c(m,b,A))d="insert",n._items.splice(f,0,C),u++;else if(m&&!C||g&&c(C,g,A))d="remove",n._items.splice(f,1),u--,l=-1;else if(C)d="update",n._items[f]=C;else return;i.rowIndices.push(f-o),i.changeTypes.push(d),i.columnIndices.push(p)}})},_isCellChanged:function(i,n,r,a,o){if(JSON.stringify(i.values[a])!==JSON.stringify(n.values[a]))return!0;function s(l,u){return l.modifiedValues?l.modifiedValues[u]!==void 0:!1}return s(i,a)!==s(n,a)},_getChangedColumnIndices:function(i,n,r,a){var o;if(i.rowType===n.rowType){if(n.rowType!=="group"&&n.rowType!=="groupFooter"&&(o=[],n.rowType!=="detail"))for(var s=0;s<i.values.length;s++)this._isCellChanged(i,n,r,s,a)&&o.push(s);n.rowType==="group"&&n.isExpanded===i.isExpanded&&i.cells&&(o=i.cells.map((l,u)=>{var d;return((d=l.column)===null||d===void 0?void 0:d.type)!=="groupExpand"?u:-1}).filter(l=>l>=0))}return o},_partialUpdateRow:function(i,n,r,a){var o,s=this._getChangedColumnIndices(i,n,r,a);return(o=s)!==null&&o!==void 0&&o.length&&this.option("dataRowTemplate")&&(s=void 0),s&&(i.cells&&i.cells.forEach(function(l,u){var d=s.indexOf(u)>=0;!d&&l&&l.update&&l.update(n)}),n.update=i.update,n.watch=i.watch,n.cells=i.cells,a&&(n.oldValues=i.values),i.update&&i.update(n)),s},_isItemEquals:function(i,n){if(JSON.stringify(i.values)!==JSON.stringify(n.values)||["modified","isNewRow","removed","isEditing"].some(c=>i[c]!==n[c]))return!1;if(i.rowType==="group"||i.rowType==="groupFooter"){var r,a,o,s,l=i.isExpanded===n.isExpanded,u=JSON.stringify(i.summaryCells)===JSON.stringify(n.summaryCells),d=((r=i.data)===null||r===void 0?void 0:r.isContinuation)===((a=n.data)===null||a===void 0?void 0:a.isContinuation)&&((o=i.data)===null||o===void 0?void 0:o.isContinuationOnNextPage)===((s=n.data)===null||s===void 0?void 0:s.isContinuationOnNextPage);if(!l||!u||!d)return!1}return!0},_applyChangesOnly:function(i){var n,r=[],a=[],o=[],s=[],l={},u=(n=i==null?void 0:i.isLiveUpdate)!==null&&n!==void 0?n:!0;function d(p){if(p)return p.rowType+","+JSON.stringify(p.key)}var c=this._items,h=c.slice();i.items.forEach(function(p,m){var g=d(p);l[g]=m,p.rowIndex=m});var f=oD(h,i.items,d,(p,m)=>this._isItemEquals(p,m)?(p.cells&&(p.update&&p.update(m),p.cells.forEach(function(g){g&&g.update&&g.update(m,!0)})),!0):!1);if(!f){this._applyChangeFull(i);return}f.forEach(p=>{switch(p.type){case"update":var m=p.index,g=p.data,C=p.oldItem,b=this._partialUpdateRow(C,g,m,u);r.push(m),o.push("update"),s.push(g),c[m]=g,a.push(b);break;case"insert":r.push(p.index),o.push("insert"),s.push(p.data),a.push(void 0),c.splice(p.index,0,p.data);break;case"remove":r.push(p.index),o.push("remove"),c.splice(p.index,1),s.push(p.oldItem),a.push(void 0)}}),i.repaintChangesOnly=!0,i.changeType="update",i.rowIndices=r,i.columnIndices=a,i.changeTypes=o,i.items=s,h.length&&(i.isLiveUpdate=!0),this._correctRowIndices(p=>{var m=this._rowIndexOffset||0,g=this.getRowIndexOffset(),C=h[p-m],b=d(C),A=l[b];return A>=0?A+g-p:0})},_correctRowIndices:re,_afterProcessItems:function(i){return i},_updateItemsCore:function(i){var n,r=this._dataSource,a=i.changeType||"refresh";if(i.changeType=a,r){var o=this._cachedProcessedItems;i.useProcessedItemsCache&&o?n=o:(n=i.items||r.items(),n=this._beforeProcessItems(n),n=this._processItems(n,i),this._cachedProcessedItems=n),n=this._afterProcessItems(n,i),i.items=n;var s=this._items.length===n.length&&this._items;this._applyChange(i);var l=this.getRowIndexDelta();V(this._items,(u,d)=>{d.rowIndex=u-l,s&&(d.cells=s[u].cells||[]);var c=n[u];c&&(d.loadIndex=c.loadIndex)}),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]},_handleChanging:function(i){var n=this.getVisibleRows(),r=this.dataSource();r&&i.changes.forEach(function(a){if(a.type==="insert"&&a.index>=0){for(var o=0,s=0;s<a.index;s++){var l=n[s];l&&(l.rowType==="data"||l.rowType==="group")&&o++}a.index=o}})},updateItems:function(i,n){if(i=i||{},this._repaintChangesOnly!==void 0){var r;i.repaintChangesOnly=(r=i.repaintChangesOnly)!==null&&r!==void 0?r:this._repaintChangesOnly,i.needUpdateDimensions=i.needUpdateDimensions||this._needUpdateDimensions}else if(i.changes)i.repaintChangesOnly=this.option("repaintChangesOnly");else if(n){var a=this.dataSource().operationTypes();i.repaintChangesOnly=a&&!a.grouping&&!a.filtering&&this.option("repaintChangesOnly"),i.isDataChanged=!0,a&&(a.reload||a.paging||a.groupExpanding)&&(i.needUpdateDimensions=!0)}if(this._updateLockCount&&!i.cancel){this._changes.push(i);return}this._updateItemsCore(i),!i.cancel&&this._fireChanged(i)},loadingOperationTypes:function(){var i=this.dataSource();return i&&i.loadingOperationTypes()||{}},_fireChanged:function(i){this._currentOperationTypes&&(i.operationTypes=this._currentOperationTypes,this._currentOperationTypes=null),Qt(()=>{this.changed.fire(i)})},isLoading:function(){return this._isLoading||this._isCustomLoading},_fireLoadingChanged:function(){this.loadingChanged.fire(this.isLoading(),this._loadingText)},_calculateAdditionalFilter:function(){return null},_applyFilter:function(){var i=this._dataSource;if(i)return i.pageIndex(0),this._isFilterApplying=!0,this.reload().done(()=>{this._isFilterApplying&&this.pageChanged.fire()})},resetFilterApplying:function(){this._isFilterApplying=!1},filter:function(i){var n=this._dataSource,r=n&&n.filter();if(arguments.length===0)return r;i=arguments.length>1?Array.prototype.slice.call(arguments,0):i,!be.equalFilterParameters(r,i)&&(n&&n.filter(i),this._applyFilter())},clearFilter:function(i){var n=this,r=n._columnsController,a=function(o){for(var s=r.columnCount(),l=0;l<s;l++)r.columnOption(l,o,void 0)};if(n.component.beginUpdate(),arguments.length>0)switch(i){case"dataSource":n.filter(null);break;case"search":n.searchByText("");break;case"header":a("filterValues");break;case"row":a("filterValue")}else n.filter(null),n.searchByText(""),a("filterValue"),a("bufferedFilterValue"),a("filterValues");n.component.endUpdate()},_fireDataSourceChanged:function(){var i=this;i.changed.add(function n(){i.changed.remove(n),i.dataSourceChanged.fire()})},_getDataSourceAdapter:re,_createDataSourceAdapterCore:function(i,n){var r=this._getDataSourceAdapter(),a=r.create(this.component);return a.init(i,n),a},isLocalStore:function(i){return i=i||this.store(),i instanceof Qs},isCustomStore:function(i){return i=i||this.store(),i instanceof Ws},_createDataSourceAdapter:function(i){var n=this.option("remoteOperations"),r=i.store(),a={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return n&&n.groupPaging&&(n=k({},a,n)),n==="auto"&&(n=this.isLocalStore(r)||this.isCustomStore(r)?{}:{filtering:!0,sorting:!0,paging:!0}),n===!0&&(n=a),this._createDataSourceAdapterCore(i,n)},setDataSource:function(i){var n=this._dataSource;!i&&n&&(n.cancelAll(),n.changed.remove(this._dataChangedHandler),n.loadingChanged.remove(this._loadingChangedHandler),n.loadError.remove(this._loadErrorHandler),n.customizeStoreLoadOptions.remove(this._customizeStoreLoadOptionsHandler),n.changing.remove(this._changingHandler),n.pushed.remove(this._dataPushedHandler),n.dispose(this._isSharedDataSource)),i&&(i=this._createDataSourceAdapter(i)),this._dataSource=i,i&&(this._fireDataSourceChanged(),this._isLoading=!i.isLoaded(),this._needApplyFilter=!0,this._isAllDataTypesDefined=this._columnsController.isAllDataTypesDefined(),i.changed.add(this._dataChangedHandler),i.loadingChanged.add(this._loadingChangedHandler),i.loadError.add(this._loadErrorHandler),i.customizeStoreLoadOptions.add(this._customizeStoreLoadOptionsHandler),i.changing.add(this._changingHandler),i.pushed.add(this._dataPushedHandler))},items:function(){return this._items},isEmpty:function(){return!this.items().length},pageCount:function(){return this._dataSource?this._dataSource.pageCount():1},dataSource:function(){return this._dataSource},store:function(){var i=this._dataSource;return i&&i.store()},loadAll:function(i){var n=this,r=new se,a=n._dataSource;if(a)if(i){var o={data:i,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:n.getCombinedFilter(),group:a.group(),sort:a.sort()}};a._handleDataLoaded(o),De(o.data).done(function(l){l=n._beforeProcessItems(l),r.resolve(n._processItems(l,{changeType:"loadingAll"}),o.extra&&o.extra.summary)}).fail(r.reject)}else if(a.isLoading())r.reject();else{var s=k({},a.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});a.load(s).done(function(l,u){l=n._beforeProcessItems(l),l=n._processItems(l,{changeType:"loadingAll"}),r.resolve(l,u&&u.summary)}).fail(r.reject)}else r.resolve([]);return r},getKeyByRowIndex:function(i,n){var r=this.items(n)[i];if(r)return r.key},getRowIndexByKey:function(i,n){return be.getIndexByKey(i,this.items(n))},keyOf:function(i){var n=this.store();if(n)return n.keyOf(i)},byKey:function(i){var n=this.store(),r=this.getRowIndexByKey(i),a;if(n)return r>=0&&(a=new se().resolve(this.items()[r].data)),a||n.byKey(i)},key:function(){var i=this.store();if(i)return i.key()},getRowIndexOffset:function(){return 0},getDataByKeys:function(i){var n=this,r=new se,a=[],o=[];return V(i,function(s,l){a.push(n.byKey(l).done(function(u){o[s]=u}))}),De.apply(v,a).always(function(){r.resolve(o)}),r},pageIndex:function(i){return e(this,"pageIndex",i)},pageSize:function(i){return e(this,"pageSize",i)},beginCustomLoading:function(i){this._isCustomLoading=!0,this._loadingText=i||"",this._fireLoadingChanged()},endCustomLoading:function(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()},refresh:function(i){i===!0?i={reload:!0,changesOnly:!0}:i||(i={lookup:!0,selection:!0,reload:!0});var n=this,r=n.getDataSource(),a=i.changesOnly,o=new se,s=function(){n._repaintChangesOnly=!!a};return De(!i.lookup||n._columnsController.refresh()).always(function(){i.load||i.reload?(r&&r.on("customizeLoadResult",s),De(n.reload(i.reload,a)).always(function(){r&&r.off("customizeLoadResult",s),n._repaintChangesOnly=void 0}).done(o.resolve).fail(o.reject)):(n.updateItems({repaintChangesOnly:i.changesOnly}),o.resolve())}),o.promise()},getVisibleRows:function(){return this.items()},_disposeDataSource:function(){this.setDataSource(null)},dispose:function(){this._disposeDataSource(),this.callBase.apply(this,arguments)},repaintRows:function(i,n){i=Array.isArray(i)?i:[i],(i.length>1||E(i[0]))&&this.updateItems({changeType:"update",rowIndices:i,isFullUpdate:!n})},skipProcessingPagingChange:function(i){return this._skipProcessingPagingChange&&(i==="paging.pageIndex"||i==="paging.pageSize")},getUserState:function(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}},getCachedStoreData:function(){return this._dataSource&&this._dataSource.getCachedStoreData()},isLastPageLoaded:function(){var i=this.pageIndex(),n=this.pageCount();return i===n-1}};return be.proxyMethod(t,"load"),be.proxyMethod(t,"reload"),be.proxyMethod(t,"push"),be.proxyMethod(t,"itemsCount",0),be.proxyMethod(t,"totalItemsCount",0),be.proxyMethod(t,"hasKnownLastPage",!0),be.proxyMethod(t,"isLoaded",!0),be.proxyMethod(t,"totalCount",0),t}())}},$z=sD.controllers.data.inherit({_getDataSourceAdapter:function(){return Xu},_getSpecificDataSourceOption:function(){var e=this.option("dataSource");return e&&!Array.isArray(e)&&this.option("keyExpr")&&Qe.log("W1011"),this.callBase()}});Oe.registerModule("data",{defaultOptions:sD.defaultOptions,controllers:{data:$z}});var ax="dx-sort",ox="dx-sort-none",Hz="dx-sort-up",Wz="dx-sort-down",zz="dx-sort-index",sx="dx-sort-index-icon",Gz="action";const lD={_applyColumnState:function(e){var t,i,n=this.option("sorting.mode"),r=e.rootElement,a=e.column,o=this._getIndicatorContainer(r);if(e.name==="sort"){r.find("."+ax).remove(),!o.children().length&&o.remove();var s=n!=="none"&&a.allowSorting;if(!E(a.groupIndex)&&(s||E(a.sortOrder))){t=a.sortOrder==="asc"?"ascending":"descending",i=this.callBase(e).toggleClass(Hz,a.sortOrder==="asc").toggleClass(Wz,a.sortOrder==="desc");var l=this.getController&&!!this.getController("columns").columnOption("sortIndex:1");l&&this.option("sorting.showSortIndexes")&&a.sortIndex>=0&&(v("<span>").addClass(sx).text(a.sortIndex+1).appendTo(i),i.addClass(zz)),s&&e.rootElement.addClass(this.addWidgetPrefix(Gz))}return E(a.sortOrder)?this.setAria("sort",t,r):this.setAria("sort","none",r),i}else return this.callBase(e)},_getIndicatorClassName:function(e){return e==="sort"?ax:e==="sortIndex"?sx:this.callBase(e)},_renderIndicator:function(e){var t=e.column,i=e.container,n=e.indicator;if(e.name==="sort"){var r=this.option("rtlEnabled");if(E(t.sortOrder)||n&&n.addClass(ox),i.children().length&&(!r&&e.columnAlignment==="left"||r&&e.columnAlignment==="right")){i.prepend(n);return}}this.callBase(e)},_updateIndicator:function(e,t,i){if(!(i==="sort"&&E(t.groupIndex)))return this.callBase.apply(this,arguments)},_getIndicatorElements:function(e,t){var i=this.callBase(e);return t?i:i&&i.not("."+ox)}};var Uz="dxDataGridColumnHeadersView",Kz=k({},lD,{_createRow(e){var t=this.callBase(e);return e.rowType==="header"&&R.on(t,ye(vt,Uz),"td",this.createAction(i=>{this._processHeaderAction(i.event,t)})),t},_processHeaderAction:function(e,t){if(v(e.currentTarget).parent().get(0)===t.get(0)){var i=this,n=null,r=v(e.currentTarget),a=r.parent().index(),o=-1;[].slice.call(i.getCellElements(a)).some((h,f)=>{if(h===r.get(0))return o=f,!0});var s=i._columnsController.getVisibleColumns(a),l=s[o],u=i.getController("editing"),d=i.option("editing.mode"),c=u&&u.isEditing()&&(d==="batch"||d==="cell");c||!i._isSortableElement(v(e.target))||l&&!E(l.groupIndex)&&!l.command&&(e.shiftKey?n="shift":vi(e)&&(n="ctrl"),setTimeout(()=>{i._columnsController.changeSortOrder(l.index,n)}))}},_renderCellContent(e,t){var i=t.column;!i.command&&t.rowType==="header"&&this._applyColumnState({name:"sort",rootElement:e,column:i,showColumnLines:this.option("showColumnLines")}),this.callBase(e,t)},_columnOptionChanged(e){var t=e.changeTypes;if(t.length===1&&t.sorting){this._updateIndicators("sort");return}this.callBase(e)},optionChanged(e){switch(e.name){case"sorting":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),jz=k({},lD,{_createGroupPanelItem(e,t){var i=this,n=i.callBase(...arguments);return R.on(n,ye(vt,"dxDataGridHeaderPanel"),i.createAction(()=>{i._processGroupItemAction(t.index)})),i._applyColumnState({name:"sort",rootElement:n,column:{alignment:i.option("rtlEnabled")?"right":"left",allowSorting:t.allowSorting,sortOrder:t.sortOrder==="desc"?"desc":"asc"},showColumnLines:!0}),n},_processGroupItemAction(e){setTimeout(()=>this.getController("columns").changeSortOrder(e))},optionChanged(e){switch(e.name){case"sorting":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),qz={defaultOptions:()=>({sorting:{mode:"single",ascendingText:fe.format("dxDataGrid-sortingAscendingText"),descendingText:fe.format("dxDataGrid-sortingDescendingText"),clearText:fe.format("dxDataGrid-sortingClearText"),showSortIndexes:!0}}),extenders:{views:{columnHeadersView:Kz,headerPanel:jz}}};Oe.registerModule("sorting",qz);var Yz=it.abstract,Xz=Re.real(),Zz="scroll",Ug="dxscrollinit",Kg="dxscrollstart",jg="dxscroll",qg="dxscrollend",Yg="dxscrollstop",Xg="dxscrollcancel",uD=it.inherit(function(){var e=ye(Zz,"dxScrollEmitter");return{ctor:function(t){this._element=t,this._locked=!1,this._proxiedScroll=i=>{this._disposed||this._scroll(i)},R.on(this._element,e,this._proxiedScroll)},_scroll:Yz,check:function(t,i){this._locked&&i()},dispose:function(){this._disposed=!0,R.off(this._element,e,this._proxiedScroll)}}}()),dD=uD.inherit({ctor:function(e,t){this.callBase(e),this._timeout=t},_scroll:function(){this._prepare(),this._forget()},_prepare:function(){this._timer&&this._clearTimer(),this._locked=!0},_clearTimer:function(){clearTimeout(this._timer),this._locked=!1,this._timer=null},_forget:function(){var e=this;this._timer=setTimeout(function(){e._clearTimer()},this._timeout)},dispose:function(){this.callBase(),this._clearTimer()}}),lx=dD.inherit({ctor:function(e){this.callBase(e,400),this._lastWheelDirection=null},check:function(e,t){this._checkDirectionChanged(e),this.callBase(e,t)},_checkDirectionChanged:function(e){if(!qi(e)){this._lastWheelDirection=null;return}var t=e.shiftKey||!1,i=this._lastWheelDirection!==null&&t!==this._lastWheelDirection;this._lastWheelDirection=t,this._locked=this._locked&&!i}}),rm=dD.inherit({ctor:function(e){this.callBase(e,400)}});(function(){var{ios:e,android:t}=Xz;(e||t)&&(rm=uD.inherit({_scroll:function(){this._locked=!0;var i=this;ur(this._scrollFrame),this._scrollFrame=pu(function(){i._locked=!1})},check:function(i,n){ur(this._scrollFrame),ur(this._checkFrame);var r=this,a=this.callBase;this._checkFrame=pu(function(){a.call(r,i,n),r._locked=!1})},dispose:function(){this.callBase(),ur(this._scrollFrame),ur(this._checkFrame)}}))})();var Jz=zu.inherit(function(){var e=Math.round(16.666666666666668);return{ctor:function(t){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new rm(t),this._wheelLocker=new lx(t)},validate:function(){return!0},configure:function(t){t.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new rm(t.scrollTarget),this._wheelLocker=new lx(t.scrollTarget)),this.callBase(t)},_init:function(t){this._wheelLocker.check(t,(function(){qi(t)&&this._accept(t)}).bind(this)),this._pointerLocker.check(t,(function(){var i=this.isNative&&mo(t);!qi(t)&&!i&&this._accept(t)}).bind(this)),this._fireEvent(Ug,t),this._prevEventData=Gt(t)},move:function(t){this.callBase.apply(this,arguments),t.isScrollingEvent=this.isNative||t.isScrollingEvent},_start:function(t){this._savedEventData=Gt(t),this._fireEvent(Kg,t),this._prevEventData=Gt(t)},_move:function(t){var i=Gt(t);this._fireEvent(jg,t,{delta:to(this._prevEventData,i)});var n=to(this._savedEventData,i);n.time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=Gt(t)},_end:function(t){var i=to(this._prevEventData,Gt(t)),n={x:0,y:0};if(!qi(t)&&i.time<100){var r=to(this._savedEventData,this._prevEventData),a=e/r.time;n={x:r.x*a,y:r.y*a}}this._fireEvent(qg,t,{velocity:n})},_stop:function(t){this._fireEvent(Yg,t)},cancel:function(t){this.callBase.apply(this,arguments),this._fireEvent(Xg,t)},dispose:function(){this.callBase.apply(this,arguments),this._pointerLocker.dispose(),this._wheelLocker.dispose()},_clearSelection:function(){if(!this.isNative)return this.callBase.apply(this,arguments)},_toggleGestureCover:function(){if(!this.isNative)return this.callBase.apply(this,arguments)}}}());Js({emitter:Jz,events:[Ug,Kg,jg,qg,Yg,Xg]});const es={init:Ug,start:Kg,move:jg,end:qg,stop:Yg,cancel:Xg};var Qz=it.abstract,cD=it.inherit({ctor:function(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start:function(){this._stopped=!1,this._finished=!1,this._stepCore()},stop:function(){this._stopped=!0,ur(this._stepAnimationFrame)},_stepCore:function(){if(this._isStopped()){this._stop();return}if(this._isFinished()){this._finished=!0,this._complete();return}this._step(),this._stepAnimationFrame=pu(this._proxiedStepCore)},_step:Qz,_isFinished:re,_stop:re,_complete:re,_isStopped:function(){return this._stopped},inProgress:function(){return!(this._stopped||this._finished)}}),am="dxScrollbar",hD="dx-scrollable-scrollbar",ux="".concat(hD,"-active"),e3="dx-scrollable-scroll",t3="dx-scrollable-scroll-content",i3="dx-scrollbar-hoverable",dx="horizontal",n3=15,Sr={onScroll:"onScroll",onHover:"onHover",always:"always",never:"never"},ws=null,fD=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:Sr.onScroll,containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init:function(){this.callBase(),this._isHovered=!1},_initMarkup:function(){this._renderThumb(),this.callBase()},_render:function(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass(i3,this.option("hoverStateEnabled"))},_renderThumb:function(){this._$thumb=v("<div>").addClass(e3),v("<div>").addClass(t3).appendTo(this._$thumb),this.$element().addClass(hD).append(this._$thumb)},isThumb:function(e){return!!this.$element().find(e).length},_isHoverMode:function(){var e=this.option("visibilityMode");return(e===Sr.onHover||e===Sr.always)&&this.option("expandable")},_renderDirection:function(){var e=this.option("direction");this.$element().addClass("dx-scrollbar-"+e),this._dimension=e===dx?"width":"height",this._prop=e===dx?"left":"top"},_attachPointerDownHandler:function(){R.on(this._$thumb,ye(lt.down,am),this.feedbackOn.bind(this))},feedbackOn:function(){this.$element().addClass(ux),ws=this},feedbackOff:function(){this.$element().removeClass(ux),ws=null},cursorEnter:function(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave:function(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions:function(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility:function(e){this.option("visibilityMode")===Sr.onScroll&&this._$thumb.css("opacity"),e=this._adjustVisibility(e),this.option().visible=e,this._$thumb.toggleClass("dx-state-invisible",!e)},_adjustVisibility:function(e){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case Sr.onScroll:break;case Sr.onHover:e=e||!!this._isHovered;break;case Sr.never:e=!1;break;case Sr.always:e=!0}return e},moveTo:function(e){if(!this._isHidden()){Ye(e)&&(e=e[this._prop]||0);var t={};t[this._prop]=this._calculateScrollBarPosition(e),ri(this._$thumb,t)}},_calculateScrollBarPosition:function(e){return-e*this._thumbRatio},_update:function(){var e=Math.round(this.option("containerSize")),t=Math.round(this.option("contentSize")),i=Math.round(this.option("baseContainerSize")),n=Math.round(this.option("baseContentSize"));isNaN(i)&&(i=e,n=t),this._baseContainerToContentRatio=n?i/n:i,this._realContainerToContentRatio=t?e/t:e;var r=Math.round(Math.max(Math.round(e*this._realContainerToContentRatio),n3));this._thumbRatio=(e-r)/(this.option("scaleRatio")*(t-e)),this.option(this._dimension,r/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden:function(){return this.option("visibilityMode")===Sr.never},_needScrollbar:function(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio:function(){return this._realContainerToContentRatio},_normalizeSize:function(e){return Ye(e)?e[this._dimension]||0:e},_clean:function(){this.callBase(),this===ws&&(ws=null),R.off(this._$thumb,"."+am)},_optionChanged:function(e){if(!this._isHidden())switch(e.name){case"containerSize":case"contentSize":this.option()[e.name]=this._normalizeSize(e.value),this._update();break;case"baseContentSize":case"baseContainerSize":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;case"scaleRatio":this._update();break;default:this.callBase.apply(this,arguments)}},update:oo(function(){this._adjustVisibility()&&this.option("visible",!0)})});_r.add(function(){R.subscribeGlobal(me.getDocument(),ye(lt.up,am),function(){ws&&ws.feedbackOff()})});var pD="dxSimulatedScrollable",r3="dxScrollableStrategy",Td=pD+"Cursor",pp=pD+"Keyboard",vp="dx-scrollable-simulated",a3="dx-scrollable-scrollbars-alwaysvisible",o3="dx-scrollable-scrollbar",Jn="vertical",Mi="horizontal",ch=.92,vD=.5,_D=1,s3=Math.round(1e3/60),l3=40,u3=500,d3=_D/5,c3=400,h3=c3/s3,f3=(1-Math.pow(ch,h3))/(1-ch),Er={PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home",LEFT:"leftArrow",UP:"upArrow",RIGHT:"rightArrow",DOWN:"downArrow",TAB:"tab"},mD=cD.inherit({ctor:function(e){this.callBase(),this.scroller=e},VELOCITY_LIMIT:_D,_isFinished:function(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step:function(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration:function(){return this.scroller._inBounds()?ch:vD},_complete:function(){this.scroller._scrollComplete()}}),p3=mD.inherit({VELOCITY_LIMIT:d3,_isFinished:function(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:function(){return ch},_complete:function(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),gD=it.inherit({ctor:function(e){this._initOptions(e),this._initAnimators(),this._initScrollbar()},_initOptions:function(e){this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=e.direction===Mi?"x":"y",this._prop=e.direction===Mi?"left":"top",this._dimension=e.direction===Mi?"width":"height",this._scrollProp=e.direction===Mi?"scrollLeft":"scrollTop",V(e,(t,i)=>{this["_"+t]=i})},_initAnimators:function(){this._inertiaAnimator=new mD(this),this._bounceAnimator=new p3(this)},_initScrollbar:function(){this._scrollbar=new fD(v("<div>").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:function(e){return e===!0?"onScroll":e===!1?"never":e},_scrollStep:function(e){var t=this._location;this._location+=e,this._suppressBounce(),this._move(),!(Math.abs(t-this._location)<1)&&R.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce:function(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation:function(e){return e=e!==void 0?e:this._location,Math.max(Math.min(e,this._maxOffset),this._minOffset)},_move:function(e){this._location=e!==void 0?e*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent:function(){var e=this._location;this._$container[this._scrollProp](-e/this._getScaleRatio()),this._moveContentByTranslator(e)},_getScaleRatio:function(){if(Ue()&&!this._scaleRatio){var e=this._$element.get(0),t=this._getRealDimension(e,this._dimension),i=this._getBaseDimension(e,this._dimension);this._scaleRatio=Math.round(t/i*100)/100}return this._scaleRatio||1},_getRealDimension:function(e,t){return Math.round(Ut(e)[t])},_getBaseDimension:function(e,t){var i="offset"+Yc(t);return e[i]},_moveContentByTranslator:function(e){var t,i=-this._maxScrollPropValue;if(e>0?t=e:e<=i?t=e-i:t=e%1,this._translateOffset!==t){var n={};if(n[this._prop]=t,this._translateOffset=t,t===0){Wu(this._$content);return}ri(this._$content,n)}},_moveScrollbar:function(){this._scrollbar.moveTo(this._location)},_scrollComplete:function(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds:function(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce:function(){var e=this._bounceLocation=this._boundLocation(),t=e-this._location;this._velocity=t/f3},_inBounds:function(e){return e=e!==void 0?e:this._location,this._boundLocation(e)===e},_crossBoundOnNextStep:function(){var e=this._location,t=e+this._velocity;return e<this._minOffset&&t>=this._minOffset||e>this._maxOffset&&t<=this._maxOffset},_initHandler:function(e){this._stopScrolling(),this._prepareThumbScrolling(e)},_stopScrolling:oo(function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()}),_prepareThumbScrolling:function(e){if(!qi(e.originalEvent)){var t=v(e.originalEvent.target),i=this._isScrollbar(t);i&&this._moveToMouseLocation(e),this._thumbScrolling=i||this._isThumb(t),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(t),this._thumbScrolling&&this._scrollbar.feedbackOn()}},_isThumbScrollingHandler:function(e){return this._isThumb(e)},_moveToMouseLocation:function(e){var t=e["page"+this._axis.toUpperCase()]-this._$element.offset()[this._prop],i=this._location+t/this._containerToContentRatio()-Ke(this._$container)/2;this._scrollStep(-Math.round(i))},_startHandler:function(){this._showScrollbar()},_moveHandler:function(e){this._crossThumbScrolling||(this._thumbScrolling&&(e[this._axis]=-Math.round(e[this._axis]/this._containerToContentRatio())),this._scrollBy(e))},_scrollBy:function(e){e=e[this._axis],this._inBounds()||(e*=vD),this._scrollStep(e)},_scrollByHandler:function(e){this._scrollBy(e),this._scrollComplete()},_containerToContentRatio:function(){return this._scrollbar.containerToContentRatio()},_endHandler:function(e){return this._completeDeferred=new se,this._velocity=e[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler:function(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia:function(){(!this._inertiaEnabled||this._thumbScrolling)&&(this._velocity=0)},_resetThumbScrolling:function(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler:function(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler:function(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler:function(){this._update(),this._moveToBounds()},_update:function(){return this._stopScrolling(),Vi(()=>{this._resetScaleRatio(),this._updateLocation(),this._updateBounds(),this._updateScrollbar(),Qt(()=>{this._moveScrollbar(),this._scrollbar.update()})})},_resetScaleRatio:function(){this._scaleRatio=null},_updateLocation:function(){this._location=(On(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds:function(){this._maxOffset=this._getMaxOffset(),this._minOffset=this._getMinOffset()},_getMaxOffset:function(){return 0},_getMinOffset:function(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:g_(function(){var e=this._containerSize(),t=this._contentSize(),i=this._getBaseDimension(this._$container.get(0),this._dimension),n=this._getBaseDimension(this._$content.get(0),this._dimension);Qt(()=>{this._scrollbar.option({containerSize:e,contentSize:t,baseContainerSize:i,baseContentSize:n,scaleRatio:this._getScaleRatio()})})}),_moveToBounds:oo(g_(oo(function(){var e=this._boundLocation(),t=e!==this._location;this._location=e,this._move(),t&&this._scrollAction()}))),_createActionsHandler:function(e){this._scrollAction=e.scroll,this._bounceAction=e.bounce},_showScrollbar:function(){this._scrollbar.option("visible",!0)},_hideScrollbar:function(){this._scrollbar.option("visible",!1)},_containerSize:function(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize:function(){var e=this._$content.css("overflow"+this._axis.toUpperCase())==="hidden",t=this._getRealDimension(this._$content.get(0),this._dimension);if(!e){var i=this._$content[0]["scroll"+Yc(this._dimension)]*this._getScaleRatio();t=Math.max(i,t)}return t},_validateEvent:function(e){var t=v(e.originalEvent.target);return this._isThumb(t)||this._isScrollbar(t)},_isThumb:function(e){return this._scrollByThumb&&this._scrollbar.isThumb(e)},_isScrollbar:function(e){return this._scrollByThumb&&e&&e.is(this._$scrollbar)},_reachedMin:function(){return Math.round(this._location-this._minOffset)<=0},_reachedMax:function(){return Math.round(this._location-this._maxOffset)>=0},_cursorEnterHandler:function(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler:function(){this._scrollbar.cursorLeave()},dispose:re}),$n,ts,CD=it.inherit({ctor:function(e){this._init(e)},_init:function(e){this._component=e,this._$element=e.$element(),this._$container=v(e.container()),this._$wrapper=e._$wrapper,this._$content=e.$content(),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e)},render:function(){this._$element.addClass(vp),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers:function(){this._scrollers={},this._isDirection(Mi)&&this._createScroller(Mi),this._isDirection(Jn)&&this._createScroller(Jn),this._$element.toggleClass(a3,this.option("showScrollbar")==="always")},_createScroller:function(e){this._scrollers[e]=new gD(this._scrollerOptions(e))},_scrollerOptions:function(e){return{direction:e,$content:this._$content,$container:this._$container,$wrapper:this._$wrapper,$element:this._$element,scrollByThumb:this.option("scrollByThumb"),scrollbarVisible:this.option("showScrollbar"),bounceEnabled:this.option("bounceEnabled"),inertiaEnabled:this.option("inertiaEnabled"),isAnyThumbScrolling:this._isAnyThumbScrolling.bind(this)}},_applyScaleRatio:function(e){for(var t in this._scrollers){var i=this._getPropByDirection(t);if(E(e[i])){var n=this._scrollers[t];e[i]*=n._getScaleRatio()}}return e},_isAnyThumbScrolling:function(e){var t=!1;return this._eventHandler("isThumbScrolling",e).done(function(i,n){t=i||n}),t},handleInit:function(e){this._suppressDirections(e),this._eventForUserAction=e,this._eventHandler("init",e)},_suppressDirections:function(e){if(qi(e.originalEvent)){this._prepareDirections(!0);return}this._prepareDirections(),this._eachScroller(function(t,i){var n=v(e.originalEvent.target),r=t._validateEvent(e)||this.option("scrollByContent")&&this._isContent(n);this._validDirections[i]=r})},_isContent:function(e){return!!e.closest(this._$element).length},_prepareDirections:function(e){e=e||!1,this._validDirections={},this._validDirections[Mi]=e,this._validDirections[Jn]=e},_eachScroller:function(e){e=e.bind(this),V(this._scrollers,function(t,i){e(i,t)})},handleStart:function(e){this._eventForUserAction=e,this._eventHandler("start").done(this._startAction)},_saveActive:function(){ts=this},_resetActive:function(){ts===this&&(ts=null)},handleMove:function(e){if(this._isLocked()){e.cancel=!0,this._resetActive();return}this._saveActive(),e.preventDefault&&e.preventDefault(),this._adjustDistance(e,e.delta),this._eventForUserAction=e,this._eventHandler("move",e.delta)},_adjustDistance:function(e,t){t.x*=this._validDirections[Mi],t.y*=this._validDirections[Jn];var i=this._tryGetDevicePixelRatio();i&&qi(e.originalEvent)&&(t.x=Math.round(t.x/i*100)/100,t.y=Math.round(t.y/i*100)/100)},_tryGetDevicePixelRatio:function(){if(Ue())return je().devicePixelRatio},handleEnd:function(e){return this._resetActive(),this._refreshCursorState(e.originalEvent&&e.originalEvent.target),this._adjustDistance(e,e.velocity),this._eventForUserAction=e,this._eventHandler("end",e.velocity).done(this._endAction)},handleCancel:function(e){return this._resetActive(),this._eventForUserAction=e,this._eventHandler("end",{x:0,y:0})},handleStop:function(){this._resetActive(),this._eventHandler("stop")},handleScroll:function(){this._updateRtlConfig(),this._scrollAction()},_attachKeyboardHandler:function(){R.off(this._$element,".".concat(pp)),!this.option("disabled")&&this.option("useKeyboard")&&R.on(this._$element,ye("keydown",pp),this._keyDownHandler.bind(this))},_keyDownHandler:function(e){if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout(()=>{$t(e)===Er.TAB&&this._eachScroller(i=>{i._updateHandler()})}),!!this._$container.is(me.getActiveElement())){var t=!0;switch($t(e)){case Er.DOWN:this._scrollByLine({y:1});break;case Er.UP:this._scrollByLine({y:-1});break;case Er.RIGHT:this._scrollByLine({x:1});break;case Er.LEFT:this._scrollByLine({x:-1});break;case Er.PAGE_DOWN:this._scrollByPage(1);break;case Er.PAGE_UP:this._scrollByPage(-1);break;case Er.HOME:this._scrollToHome();break;case Er.END:this._scrollToEnd();break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())}},_scrollByLine:function(e){var t=this._tryGetDevicePixelRatio(),i=l3;t&&(i=Math.abs(i/t*100)/100),this.scrollBy({top:(e.y||0)*-i,left:(e.x||0)*-i})},_scrollByPage:function(e){var t=this._wheelProp(),i=this._dimensionByProp(t),n={},r=i==="width"?He:Ke;n[t]=e*-r(this._$container),this.scrollBy(n)},_dimensionByProp:function(e){return e==="left"?"width":"height"},_getPropByDirection:function(e){return e===Mi?"left":"top"},_scrollToHome:function(){var e=this._wheelProp(),t={};t[e]=0,this._component.scrollTo(t)},_scrollToEnd:function(){var e=this._wheelProp(),t=this._dimensionByProp(e),i={},n=t==="width"?He:Ke;i[e]=n(this._$content)-n(this._$container),this._component.scrollTo(i)},createActions:function(){this._startAction=this._createActionHandler("onStart"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions:function(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler:function(e){var t=this._createActionByOption(e);return()=>{t(k(this._createActionArgs(),arguments))}},_createActionArgs:function(){var{horizontal:e,vertical:t}=this._scrollers,i=this._getScrollOffset();return this._scrollOffset={top:t&&i.top,left:e&&i.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:e&&e._reachedMax(),reachedRight:e&&e._reachedMin(),reachedTop:t&&t._reachedMax(),reachedBottom:t&&t._reachedMin()}},_getScrollOffset(){return{top:-this.location().top,left:-this.location().left}},_eventHandler:function(e){var t=[].slice.call(arguments).slice(1),i=ti(this._scrollers,n=>n["_"+e+"Handler"].apply(n,t));return De.apply(v,i).promise()},location:function(){var e=On(this._$content);return e.top-=this._$container.scrollTop(),e.left-=this._$container.scrollLeft(),e},disabledChanged:function(){this._attachCursorHandlers()},_attachCursorHandlers:function(){R.off(this._$element,".".concat(Td)),!this.option("disabled")&&this._isHoverMode()&&(R.on(this._$element,ye("mouseenter",Td),this._cursorEnterHandler.bind(this)),R.on(this._$element,ye("mouseleave",Td),this._cursorLeaveHandler.bind(this)))},_isHoverMode:function(){return this.option("showScrollbar")==="onHover"},_cursorEnterHandler:function(e){e=e||{},e.originalEvent=e.originalEvent||{},!(ts||e.originalEvent._hoverHandled)&&($n&&$n._cursorLeaveHandler(),$n=this,this._eventHandler("cursorEnter"),e.originalEvent._hoverHandled=!0)},_cursorLeaveHandler:function(e){$n!==this||ts===$n||(this._eventHandler("cursorLeave"),$n=null,this._refreshCursorState(e&&e.relatedTarget))},_refreshCursorState:function(e){if(!(!this._isHoverMode()&&(!e||ts))){var t=v(e),i=t.closest(".".concat(vp,":not(.dx-state-disabled)")),n=i.length&&i.data(r3);$n&&$n!==n&&$n._cursorLeaveHandler(),n&&n._cursorEnterHandler()}},update:function(){var e=this._eventHandler("update").done(this._updateAction);return De(e,Vi(()=>{var t=this._allowedDirections();return Qt(()=>{var i=t.vertical?"pan-x":"";i=t.horizontal?"pan-y":i,i=t.vertical&&t.horizontal?"none":i,this._$container.css("touchAction",i)}),De().promise()}))},_allowedDirections:function(){var e=this.option("bounceEnabled"),t=this._scrollers[Jn],i=this._scrollers[Mi];return{vertical:t&&(t._minOffset<0||e),horizontal:i&&(i._minOffset<0||e)}},_updateBounds:function(){this._scrollers[Mi]&&this._scrollers[Mi]._updateBounds()},_isHorizontalAndRtlEnabled:function(){return this.option("rtlEnabled")&&this.option("direction")!==Jn},updateRtlPosition:function(e){e&&(this._rtlConfig={scrollRight:0,clientWidth:this._$container.get(0).clientWidth,windowPixelRatio:this._getWindowDevicePixelRatio()}),this._updateBounds(),this._isHorizontalAndRtlEnabled()&&Vi(()=>{var t=this._getMaxOffset().left-this._rtlConfig.scrollRight;t<=0&&(t=0,this._rtlConfig.scrollRight=this._getMaxOffset().left),Qt(()=>{this._getScrollOffset().left!==t&&(this._rtlConfig.skipUpdating=!0,this._component.scrollTo({left:t}),this._rtlConfig.skipUpdating=!1)})})},_updateRtlConfig:function(){if(this._isHorizontalAndRtlEnabled()&&!this._rtlConfig.skipUpdating){var{clientWidth:e,scrollLeft:t}=this._$container.get(0),i=this._getWindowDevicePixelRatio();this._rtlConfig.windowPixelRatio===i&&this._rtlConfig.clientWidth===e&&(this._rtlConfig.scrollRight=this._getMaxOffset().left-t),this._rtlConfig.clientWidth=e,this._rtlConfig.windowPixelRatio=i}},_getWindowDevicePixelRatio:function(){return Ue()?je().devicePixelRatio:1},scrollBy:function(e){var t=this._scrollers[Jn],i=this._scrollers[Mi];t&&(e.top=t._boundLocation(e.top+t._location)-t._location),i&&(e.left=i._boundLocation(e.left+i._location)-i._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:e.left,y:e.top}),this._endAction(),this._updateRtlConfig()},validate:function(e){return qi(e)&&vi(e)||this.option("disabled")?!1:this.option("bounceEnabled")?!0:qi(e)?this._validateWheel(e):this._validateMove(e)},_validateWheel:function(e){var t=this._scrollers[this._wheelDirection(e)],i=t._reachedMin(),n=t._reachedMax(),r=!i||!n,a=!i&&!n,o=i&&e.delta>0,s=n&&e.delta<0,l=r&&(a||o||s);return l=l||this._validateWheelTimer!==void 0,l&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout(()=>{this._validateWheelTimer=void 0},u3)),l},_validateMove:function(e){return!this.option("scrollByContent")&&!v(e.target).closest(".".concat(o3)).length?!1:this._allowedDirection()},getDirection:function(e){return qi(e)?this._wheelDirection(e):this._allowedDirection()},_wheelProp:function(){return this._wheelDirection()===Mi?"left":"top"},_wheelDirection:function(e){switch(this.option("direction")){case Mi:return Mi;case Jn:return Jn;default:return e&&e.shiftKey?Mi:Jn}},dispose:function(){this._resetActive(),$n===this&&($n=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass(vp),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers:function(){R.off(this._$element,".".concat(Td)),R.off(this._$container,".".concat(pp))}}),cx="dxNativeScrollable",_p="dx-scrollable-native",v3="dx-scrollable-scrollbar-simulated",_3="dx-scrollable-scrollbars-hidden",vl="vertical",Ad="horizontal",m3=500,Zg=it.inherit({ctor:function(e){this._init(e)},_init:function(e){this._component=e,this._$element=e.$element(),this._$container=v(e.container()),this._$content=e.$content(),this._direction=e.option("direction"),this._useSimulatedScrollbar=e.option("useSimulatedScrollbar"),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e),this._isRtlNativeStrategy=e._isRtlNativeStrategy.bind(e)},render:function(){var e=Re.real(),t=e.platform;this._$element.addClass(_p).addClass(_p+"-"+t).toggleClass(_3,!this._isScrollbarVisible()),this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateRtlPosition:function(e){e&&this.option("rtlEnabled")&&this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._moveScrollbars()},_renderScrollbars:function(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass(v3),this._renderScrollbar(vl),this._renderScrollbar(Ad)},_renderScrollbar:function(e){this._isDirection(e)&&(this._scrollbars[e]=new fD(v("<div>").appendTo(this._$element),{direction:e,expandable:this._component.option("scrollByThumb")}))},handleInit:re,handleStart:re,handleMove:function(e){if(this._isLocked()){e.cancel=!0;return}this._allowedDirection()&&(e.originalEvent.isScrollingEvent=!0)},handleEnd:re,handleCancel:re,handleStop:re,_eachScrollbar:function(e){e=e.bind(this),V(this._scrollbars||{},function(t,i){e(i,t)})},createActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs:function(){var{left:e,top:t}=this.location();return{event:this._eventForUserAction,scrollOffset:this._getScrollOffset(),reachedLeft:this._isRtlNativeStrategy()?this._isReachedRight(-e):this._isReachedLeft(e),reachedRight:this._isRtlNativeStrategy()?this._isReachedLeft(-Math.abs(e)):this._isReachedRight(e),reachedTop:this._isDirection(vl)?Math.round(t)>=0:void 0,reachedBottom:this._isDirection(vl)?Math.round(Math.abs(t)-this._getMaxOffset().top)>=0:void 0}},_getScrollOffset:function(){var{top:e,left:t}=this.location();return{top:-e,left:this._normalizeOffsetLeft(-t)}},_normalizeOffsetLeft(e){return this._isRtlNativeStrategy()?this._getMaxOffset().left+e:e},_isReachedLeft:function(e){return this._isDirection(Ad)?Math.round(e)>=0:void 0},_isReachedRight:function(e){return this._isDirection(Ad)?Math.round(Math.abs(e)-this._getMaxOffset().left)>=0:void 0},_isScrollbarVisible:function(){var{showScrollbar:e}=this.option();return e!=="never"&&e!==!1},handleScroll:function(e){this._eventForUserAction=e,this._moveScrollbars(),this._scrollAction(this._createActionArgs())},_moveScrollbars:function(){var{top:e,left:t}=this._getScrollOffset();this._eachScrollbar(function(i){i.moveTo({top:-e,left:-t}),i.option("visible",!0)}),this._hideScrollbars()},_hideScrollbars:function(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout((function(){this._eachScrollbar(function(e){e.option("visible",!1)})}).bind(this),m3)},location:function(){return{left:-this._$container.scrollLeft(),top:-this._$container.scrollTop()}},disabledChanged:re,update:function(){this._update(),this._updateAction(this._createActionArgs())},_update:function(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions:function(){this._containerSize={height:Ke(this._$container),width:He(this._$container)},this._componentContentSize={height:Ke(this._component.$content()),width:He(this._component.$content())},this._contentSize={height:Ke(this._$content),width:He(this._$content)}},_updateScrollbars:function(){this._eachScrollbar(function(e,t){var i=t===vl?"height":"width";e.option({containerSize:this._containerSize[i],contentSize:this._componentContentSize[i]}),e.update()})},_allowedDirections:function(){return{vertical:this._isDirection(vl)&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection(Ad)&&this._contentSize.width>this._containerSize.width}},dispose:function(){var e=this._$element.get(0).className,t=new RegExp(_p+"\\S*","g");t.test(e)&&this._$element.removeClass(e.match(t).join(" ")),R.off(this._$element,"."+cx),R.off(this._$container,"."+cx),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars:function(){this._eachScrollbar(function(e){e.$element().remove()})},scrollBy:function(e){var t=this.location();this._$container.scrollTop(Math.round(-t.top-e.top)),this._$container.scrollLeft(Math.round(-t.left-e.left))},validate:function(e){return this.option("disabled")||qi(e)&&this._isScrolledInMaxDirection(e)?!1:!!this._allowedDirection()},_isScrolledInMaxDirection(e){var t=this._$container.get(0),i;return e.delta>0?i=e.shiftKey?!t.scrollLeft:!t.scrollTop:e.shiftKey?i=t.scrollLeft>=this._getMaxOffset().left:i=t.scrollTop>=this._getMaxOffset().top,i},getDirection:function(){return this._allowedDirection()}}),yD=function(){return[{device:function(){return!Co},options:{useNative:!1}},{device:function(e){return!Re.isSimulator()&&Re.real().deviceType==="desktop"&&e.platform==="generic"},options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:go,showScrollbar:"onHover"}}]};function xD(e,t){for(var i={left:0,top:0},n=t;(r=n)!==null&&r!==void 0&&r.offsetParent&&!n.classList.contains(e);){var r,a=n.offsetParent,o=n.getBoundingClientRect(),s=a.getBoundingClientRect();i.left+=o.left-s.left,i.top+=o.top-s.top,n=n.offsetParent}return i}var hh="vertical",bD="horizontal",mp="both",SD="dx-scrollable-content";function g3(e,t,i,n,r){var a=Se({top:0,left:0,right:0,bottom:0},r),o=t===hh,s=o?"top":"left",l=o?"bottom":"right",u=o?"height":"width",d=i["offset".concat(Yc(u))],c=i["client".concat(Yc(u))],h=i.getBoundingClientRect()[u],f=e.getBoundingClientRect()[u],p=1;Math.abs(h-d)>1&&(p=h/d);var m=xD(SD,e)[s]/p,g=n[s],C=g-m+a[s],b=g-m-f/p+c-a[l];return C<=0&&b>=0?g:g-(Math.abs(C)>Math.abs(b)?b:C)}var tr="dxScrollable",C3="dxScrollableStrategy",hx="dx-scrollable",y3="dx-scrollable-disabled",x3="dx-scrollable-container",b3="dx-scrollable-wrapper",fx="dx-scrollable-content",Qn="vertical",wr="horizontal",gp="both",_n=mr.inherit({_getDefaultOptions:function(){return k(this.callBase(),{disabled:!1,onScroll:null,direction:Qn,showScrollbar:"onScroll",useNative:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,onUpdated:null,onStart:null,onEnd:null,onBounce:null,useSimulatedScrollbar:!1,useKeyboard:!0,inertiaEnabled:!0,updateManually:!1})},_defaultOptionsRules:function(){return this.callBase().concat(yD(),[{device:function(){return Co&&Re.real().platform==="android"&&!Lt.mozilla},options:{useSimulatedScrollbar:!0}}])},_initOptions:function(e){this.callBase(e),"useSimulatedScrollbar"in e||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar:function(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init:function(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged:function(e){e?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup:function(){var e=this.$element().addClass(hx),t=this._$container=v("<div>").addClass(x3),i=this._$wrapper=v("<div>").addClass(b3),n=this._$content=v("<div>").addClass(fx);n.append(e.contents()).appendTo(t),t.appendTo(i),i.appendTo(e)},_dimensionChanged:function(){this.update(),this._updateRtlPosition()},_initMarkup:function(){this.callBase(),this._renderDirection()},_render:function(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition(!0)},_updateRtlPosition:function(e){this._strategy.updateRtlPosition(e)},_getMaxOffset:function(){var{scrollWidth:e,clientWidth:t,scrollHeight:i,clientHeight:n}=v(this.container()).get(0);return{left:e-t,top:i-n}},_attachEventHandlers:function(){var e=this._strategy,t={getDirection:e.getDirection.bind(e),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};R.off(this._$wrapper,"."+tr),R.on(this._$wrapper,ye(es.init,tr),t,this._initHandler.bind(this)),R.on(this._$wrapper,ye(es.start,tr),e.handleStart.bind(e)),R.on(this._$wrapper,ye(es.move,tr),e.handleMove.bind(e)),R.on(this._$wrapper,ye(es.end,tr),e.handleEnd.bind(e)),R.on(this._$wrapper,ye(es.cancel,tr),e.handleCancel.bind(e)),R.on(this._$wrapper,ye(es.stop,tr),e.handleStop.bind(e)),R.off(this._$container,"."+tr),R.on(this._$container,ye("scroll",tr),e.handleScroll.bind(e))},_validate:function(e){return this._isLocked()?!1:(this._updateIfNeed(),this._moveIsAllowed(e))},_moveIsAllowed(e){return this._strategy.validate(e)},handleMove(e){this._strategy.handleMove(e)},_prepareDirections(e){this._strategy._prepareDirections(e)},_initHandler:function(){var e=this._strategy;e.handleInit.apply(e,arguments)},_renderDisabledState:function(){this.$element().toggleClass(y3,this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection:function(){this.$element().removeClass("dx-scrollable-"+wr).removeClass("dx-scrollable-"+Qn).removeClass("dx-scrollable-"+gp).addClass("dx-scrollable-"+this.option("direction"))},_renderStrategy:function(){this._createStrategy(),this._strategy.render(),this.$element().data(C3,this._strategy)},_createStrategy:function(){this._strategy=this.option("useNative")?new Zg(this):new CD(this)},_createActions:function(){this._strategy&&this._strategy.createActions()},_clean:function(){this._strategy&&this._strategy.dispose()},_optionChanged:function(e){switch(e.name){case"onStart":case"onEnd":case"onUpdated":case"onScroll":case"onBounce":this._createActions();break;case"direction":this._resetInactiveDirection(),this._invalidate();break;case"useNative":this._setUseSimulatedScrollbar(),this._invalidate();break;case"inertiaEnabled":case"scrollByThumb":case"bounceEnabled":case"useKeyboard":case"showScrollbar":case"useSimulatedScrollbar":this._invalidate();break;case"disabled":this._renderDisabledState(),this._strategy&&this._strategy.disabledChanged();break;case"updateManually":case"scrollByContent":break;case"width":this.callBase(e),this._updateRtlPosition();break;default:this.callBase(e)}},_resetInactiveDirection:function(){var e=this._getInactiveProp();if(!(!e||!Ue())){var t=this.scrollOffset();t[e]=0,this.scrollTo(t)}},_getInactiveProp:function(){var e=this.option("direction");if(e===Qn)return"left";if(e===wr)return"top"},_location:function(){return this._strategy.location()},_normalizeLocation:function(e){if(Ye(e)){var t=Mt(e.left,e.x),i=Mt(e.top,e.y);return{left:E(t)?-t:void 0,top:E(i)?-i:void 0}}else{var n=this.option("direction");return{left:n!==Qn?-e:void 0,top:n!==wr?-e:void 0}}},_isLocked:function(){return this._locked},_lock:function(){this._locked=!0},_unlock:function(){this.option("disabled")||(this._locked=!1)},_isDirection:function(e){var t=this.option("direction");return e===Qn?t!==wr:e===wr?t!==Qn:t===e},_updateAllowedDirection:function(){var e=this._strategy._allowedDirections();this._isDirection(gp)&&e.vertical&&e.horizontal?this._allowedDirectionValue=gp:this._isDirection(wr)&&e.horizontal?this._allowedDirectionValue=wr:this._isDirection(Qn)&&e.vertical?this._allowedDirectionValue=Qn:this._allowedDirectionValue=null},_allowedDirection:function(){return this._allowedDirectionValue},$content:function(){return this._$content},content:function(){return Me(this._$content)},container:function(){return Me(this._$container)},scrollOffset:function(){return this._strategy._getScrollOffset()},_isRtlNativeStrategy:function(){var{useNative:e,rtlEnabled:t}=this.option();return e&&t},scrollTop:function(){return this.scrollOffset().top},scrollLeft:function(){return this.scrollOffset().left},clientHeight:function(){return Ke(this._$container)},scrollHeight:function(){return nt(this.$content())},clientWidth:function(){return He(this._$container)},scrollWidth:function(){return ot(this.$content())},update:function(){if(this._strategy)return De(this._strategy.update()).done((function(){this._updateAllowedDirection()}).bind(this))},scrollBy:function(e){e=this._normalizeLocation(e),!(!e.top&&!e.left)&&(this._updateIfNeed(),this._strategy.scrollBy(e))},scrollTo:function(e){e=this._normalizeLocation(e),this._updateIfNeed();var t=this._location();this.option("useNative")||(e=this._strategy._applyScaleRatio(e),t=this._strategy._applyScaleRatio(t)),this._isRtlNativeStrategy()&&(t.left=t.left-this._getMaxOffset().left);var i=this._normalizeLocation({left:t.left-Mt(e.left,t.left),top:t.top-Mt(e.top,t.top)});!i.top&&!i.left||this._strategy.scrollBy(i)},scrollToElement:function(e,t){var i=v(e),n=this.$content().find(e).length,r=i.parents("."+hx).length-i.parents("."+fx).length===0;if(!(!n||!r)){var a={top:0,left:0},o=this.option("direction");o!==Qn&&(a.left=this.getScrollElementPosition(i,wr,t)),o!==wr&&(a.top=this.getScrollElementPosition(i,Qn,t)),this.scrollTo(a)}},getScrollElementPosition:function(e,t,i){var n=this.scrollOffset();return g3(e.get(0),t,v(this.container()).get(0),n,i)},_updateIfNeed:function(){this.option("updateManually")||this.update()},_useTemplates:function(){return!1},isRenovated:function(){return!!_n.IS_RENOVATED_WIDGET}});tt(tr,_n);var S3="rowsview",E3="content",w3="nowrap",Cp="dx-group-row",px="dx-group-cell",I3="dx-data-row",Dd="dx-freespace-row",T3="dx-row-lines",vx="dx-column-lines",_x="dx-row-alt",mx="dx-last-row-border",A3="dx-empty",D3="row-inserted-animation",O3=200;function gx(e){return e?Math.round(e.scrollWidth()-e.clientWidth()):0}var ED={defaultOptions:function(){return{hoverStateEnabled:!1,scrolling:{useNative:"auto"},loadPanel:{enabled:"auto",text:fe.format("Loading"),width:200,height:90,showIndicator:!0,indicatorSrc:"",showPane:!0},dataRowTemplate:null,columnAutoWidth:!1,noDataText:fe.format("dxDataGrid-noDataText"),wordWrapEnabled:!1,showColumnLines:!0,showRowLines:!1,rowAlternationEnabled:!1,activeStateEnabled:!1,twoWayBindingEnabled:!0}},views:{rowsView:Yu.inherit(function(){var e=function(t,i){var n=Jl(i.text)&&i.rowType==="data",r=i.text,a=t.get(0);n?be.setEmptyText(t):i.column.encodeHtml?a.textContent=r:a.innerHTML=r};return{_getDefaultTemplate:function(t){switch(t.command){case"empty":return function(i){i.html("&nbsp;")};default:return e}},_getDefaultGroupTemplate:function(t){var i=this.option("summary.texts");return function(n,r){var a=r.data,o=r.column.caption+": "+r.text,s=n.get(0);r.summaryItems&&r.summaryItems.length&&(o+=" "+be.getGroupRowSummaryText(r.summaryItems,i)),a&&(r.groupContinuedMessage&&r.groupContinuesMessage?o+=" ("+r.groupContinuedMessage+". "+r.groupContinuesMessage+")":r.groupContinuesMessage?o+=" ("+r.groupContinuesMessage+")":r.groupContinuedMessage&&(o+=" ("+r.groupContinuedMessage+")")),n.addClass(px),t.encodeHtml?s.textContent=o:s.innerHTML=o}},_update:function(){},_getCellTemplate:function(t){var i=t.column,n;return t.rowType==="group"&&E(i.groupIndex)&&!i.showWhenGrouped&&!i.command?n=i.groupCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultGroupTemplate(i)}:(t.rowType==="data"||i.command)&&i.cellTemplate?n=i.cellTemplate:n={allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(i)},n},_createRow:function(t){var i=this.callBase.apply(this,arguments);if(t){var n=t.rowType==="group",r=t.rowType==="data";if(r&&i.addClass(I3),r&&this.option("showRowLines")&&i.addClass(T3),this.option("showColumnLines")&&i.addClass(vx),t.visible===!1&&i.hide(),n){i.addClass(Cp);var a=t.isExpanded;this.setAria("role","row",i),this.setAria("expanded",E(a)&&a.toString(),i)}}return i},_rowPrepared:function(t,i,n){i.rowType==="data"&&(this.option("rowAlternationEnabled")&&(this._isAltRow(n)&&t.addClass(_x),i.watch&&i.watch(()=>this._isAltRow(n),r=>{t.toggleClass(_x,r)})),this._setAriaRowIndex(i,t),i.watch&&i.watch(()=>i.rowIndex,()=>this._setAriaRowIndex(i,t))),this.callBase.apply(this,arguments)},_setAriaRowIndex:function(t,i){var n=this.component,r=n.option("scrolling.mode")==="standard"&&!be.isVirtualRowRendering(n),a=t.rowIndex+1;r?a=n.pageIndex()*n.pageSize()+a:a+=this._dataController.getRowIndexOffset(),this.setAria("rowindex",a,i)},_afterRowPrepared:function(t){var i=t.args[0],n=this._dataController,r=n.getVisibleRows()[i.rowIndex],a=this.option("integrationOptions.watchMethod");if(!(!i.data||i.rowType!=="data"||i.isNewRow||!this.option("twoWayBindingEnabled")||!a||!r)){var o=a(()=>n.generateDataValues(i.data,i.columns),()=>{n.repaintRows([r.rowIndex],this.option("repaintChangesOnly"))},{deep:!0,skipImmediate:!0});R.on(i.rowElement,vr,o)}},_renderScrollable:function(t){var i=this.element();if(i.children().length||i.append("<div>"),(t||!this._loadPanel)&&this._renderLoadPanel(i,i.parent(),this._dataController.isLocalStore()),(t||!this.getScrollable())&&this._dataController.isLoaded()){for(var n=this.getColumns(),r=!0,a=0;a<n.length;a++)if(!n[a].width&&!n[a].minWidth){r=!1;break}(this.option("columnAutoWidth")||this._hasHeight||r||this._columnsController._isColumnFixing())&&this._renderScrollableCore(i)}},_handleScroll:function(t){var i=this.option("rtlEnabled"),n=t.component.option("useNative");this._scrollTop=t.scrollOffset.top,this._scrollLeft=t.scrollOffset.left;var r=t.scrollOffset.left;i&&(this._scrollRight=gx(t.component)-this._scrollLeft,n&&(r=-this._scrollRight),this.isScrollbarVisible(!0)||(this._scrollLeft=-1)),this.scrollChanged.fire(Se({},t.scrollOffset,{left:r}),this.name)},_renderScrollableCore:function(t){var i=this._createScrollableOptions(),n=this._handleScroll.bind(this);i.onScroll=n,this._scrollable=this._createComponent(t,_n,i),this._scrollableContainer=this._scrollable&&v(this._scrollable.container())},_renderLoadPanel:be.renderLoadPanel,_renderContent:function(t,i){return t.empty().append(i),this._findContentElement()},_updateContent:function(t,i){var n=this,r=n.getTableElement(),a=n._findContentElement(),o=i&&i.changeType,s=[],l=this.option("highlightChanges"),u=this.addWidgetPrefix(D3);switch(o){case"update":V(i.rowIndices,function(d,c){var h=n._getRowElements(t).eq(d),f=i.changeTypes&&i.changeTypes[d],p=i.items&&i.items[d];s.push(function(){var m=n._getRowElements(),g=m.eq(c);switch(f){case"update":if(p){var C=i.columnIndices&&i.columnIndices[d];E(p.visible)&&p.visible!==g.is(":visible")?g.toggle(p.visible):C?n._updateCells(g,h,C):g.replaceWith(h)}break;case"insert":if(m.length)g.length?h.insertBefore(g):h.insertAfter(m.last());else if(r){var b=h.is("tbody")?r:r.children("tbody");h.prependTo(b)}l&&i.isLiveUpdate&&h.addClass(u);break;case"remove":g.remove()}})}),V(s,function(){this()}),t.remove();break;default:n.setTableElement(t),a.addClass(n.addWidgetPrefix(E3)),n._renderContent(a,t)}},_createEmptyRow:function(t,i,n){var r,a=this._createRow(),o=i?this.getFixedColumns():this.getColumns();a.addClass(t).toggleClass(vx,this.option("showColumnLines"));for(var s=0;s<o.length;s++)r=this._createCell({column:o[s],rowType:"freeSpace",columnIndex:s,columns:o}),Et(n)&&r.css("height",n),a.append(r);return this.setAria("role","presentation",a),a},_appendEmptyRow:function(t,i,n){var r=this._getBodies(t),a=!r.length||i.is("tbody"),o=a?t:r;if(n==="top"){if(o.first().prepend(i),a){var s=o.children("colgroup");o.prepend(s)}}else o.last().append(i)},_renderFreeSpaceRow:function(t,i){var n=this._createEmptyRow(Dd);n=this._wrapRowIfNeed(t,n,(i==null?void 0:i.changeType)==="refresh"),this._appendEmptyRow(t,n)},_checkRowKeys:function(t){var i=this,n=i._getRows(t),r=i._dataController.store()&&i._dataController.store().key();r&&n.some(function(a){if(a.rowType==="data"&&a.key===void 0)return i._dataController.fireError("E1046",r),!0})},_needUpdateRowHeight:function(t){return t>0&&!this._rowHeight},_getRowsHeight:function(t){var i=t.children("tbody").children().not(".dx-virtual-row").not("."+Dd);return i.toArray().reduce(function(n,r){return n+Ut(r).height},0)},_updateRowHeight:function(){var t=this.getTableElement(),i=this._dataController.items().length;if(t&&this._needUpdateRowHeight(i)){var n=this._getRowsHeight(t);this._rowHeight=n/i}},_findContentElement:function(){var t=this.element(),i=this.getScrollable();if(t)return i&&(t=v(i.content())),t.children().first()},_getRowElements:function(t){var i=this.callBase(t);return i&&i.not("."+Dd)},_getFreeSpaceRowElements:function(t){var i=t||this.getTableElements();return i&&i.children("tbody").children("."+Dd)},_getNoDataText:function(){return this.option("noDataText")},_rowClick:function(t){var i=this._dataController.items()[t.rowIndex]||{};this.executeAction("onRowClick",k({evaluate:function(n){var r=bt(n);return r(i.data)}},t,i))},_rowDblClick:function(t){var i=this._dataController.items()[t.rowIndex]||{};this.executeAction("onRowDblClick",k({},t,i))},_getColumnsCountBeforeGroups:function(t){for(var i=0;i<t.length;i++)if(t[i].type==="groupExpand")return i;return 0},_getGroupCellOptions:function(t){var i=this._getColumnsCountBeforeGroups(t.columns),n=(t.row.groupIndex||0)+i;return{columnIndex:n,colspan:t.columns.length-n-1}},_renderCells:function(t,i){i.row.rowType==="group"?this._renderGroupedCells(t,i):i.row.values&&this.callBase(t,i)},_renderGroupedCells:function(t,i){for(var n=i.row,r,a=i.columns,o=n.rowIndex,s,l=this._getGroupCellOptions(i),u=0;u<=l.columnIndex;u++)u===l.columnIndex&&a[u].allowCollapsing&&i.scrollingMode!=="infinite"?(s=!!n.isExpanded,r=a[u]):(s=null,r={command:"expand",cssClass:a[u].cssClass}),this._needRenderCell(u,i.columnIndices)&&this._renderCell(t,{value:s,row:n,rowIndex:o,column:r,columnIndex:u,columnIndices:i.columnIndices});var d=Ra(this.option("rtlEnabled")),c=k({},a[l.columnIndex],{command:null,type:null,cssClass:null,width:null,showWhenGrouped:!1,alignment:d});l.colspan>1&&(c.colspan=l.colspan),this._needRenderCell(l.columnIndex+1,i.columnIndices)&&this._renderCell(t,{value:n.values[n.groupIndex],row:n,rowIndex:o,column:c,columnIndex:l.columnIndex+1,columnIndices:i.columnIndices})},_renderRows:function(t,i){var n=this.option("scrolling.mode");this.callBase(t,k({scrollingMode:n},i)),this._checkRowKeys(i.change),this._renderFreeSpaceRow(t,i.change),this._hasHeight||this.updateFreeSpaceRowHeight(t)},_renderDataRowByTemplate(t,i,n){var r=i.row,a=k({columns:i.columns},r),o=this._createRow(r,"tbody");o.appendTo(t),this.renderTemplate(o,n,a,!0,i.change),this._rowPrepared(o,a,i.row)},_renderRow:function(t,i){var n=i.row,r=this.option().rowTemplate,a=this.option("dataRowTemplate");n.rowType==="data"&&a?this._renderDataRowByTemplate(t,i,a):(n.rowType==="data"||n.rowType==="group")&&!E(n.groupIndex)&&r?this.renderTemplate(t,r,k({columns:i.columns},n),!0):this.callBase(t,i)},_renderTable:function(t){var i=this,n=i.callBase(t);return E(i.getTableElement())?i._renderScrollable():(i.setTableElement(n),i._renderScrollable(!0),i.resizeCompleted.add(function r(){var a=i.getScrollable();a&&i.element().closest(je().document).length&&(i.resizeCompleted.remove(r),a._visibilityChanged(!0))})),n},_createTable:function(){var t=this.callBase.apply(this,arguments);return(this.option().rowTemplate||this.option().dataRowTemplate)&&t.appendTo(this.component.$element()),t},_renderCore:function(t){var i=this.element();i.addClass(this.addWidgetPrefix(S3)).toggleClass(this.addWidgetPrefix(w3),!this.option("wordWrapEnabled")),i.toggleClass(A3,this._dataController.isEmpty()),this.setAria("role","presentation",i);var n=this._renderTable({change:t});this._updateContent(n,t),this.callBase(t),this._lastColumnWidths=null},_getRows:function(t){return t&&t.items||this._dataController.items()},_getCellOptions:function(t){var i=t.column,n=t.row,r=n.data,a=n&&n.summaryCells,o=t.value,s=be.getDisplayValue(i,o,r,n.rowType),l=this.callBase(t);if(l.value=o,l.oldValue=t.oldValue,l.displayValue=s,l.row=n,l.key=n.key,l.data=r,l.rowType=n.rowType,l.values=n.values,l.text=i.command?"":be.formatValue(s,i),l.rowIndex=n.rowIndex,l.summaryItems=a&&a[t.columnIndex],l.resized=i.resizedCallbacks,E(i.groupIndex)&&!i.command){var u=this.option("grouping.texts"),d=this.option("scrolling.mode");d!=="virtual"&&d!=="infinite"&&(l.groupContinuesMessage=r&&r.isContinuationOnNextPage&&u&&u.groupContinuesMessage,l.groupContinuedMessage=r&&r.isContinuation&&u&&u.groupContinuedMessage)}return l},_setRowsOpacityCore:function(t,i,n,r){var a=this._columnsController,o=a.getColumns(),s=o&&o[n],l=s&&s.isBand&&s.index;V(t,function(u,d){if(!v(d).hasClass(Cp))for(var c=0;c<i.length&&!((Et(l)&&a.isParentBandColumn(i[c].index,l)||i[c].index===n)&&(t.eq(u).children().eq(c).css({opacity:r}),!Et(l)));c++);})},_getDevicePixelRatio:function(){return je().devicePixelRatio},renderNoDataText:be.renderNoDataText,getCellOptions:function(t,i){var n=this._dataController.items()[t],r,a;return n&&(Ve(i)?a=this._columnsController.columnOption(i):a=this._columnsController.getVisibleColumns()[i],a&&(r=this._getCellOptions({value:a.calculateCellValue(n.data),rowIndex:n.rowIndex,row:n,column:a}))),r},getRow:function(t){if(t>=0){var i=this._getRowElements();if(i.length>t)return v(i[t])}},updateFreeSpaceRowHeight:function(t){var i=this._dataController,n=i.items(!0).length,r=this._findContentElement(),a=this._getFreeSpaceRowElements(t);if(a&&r&&i.totalCount()>=0){var o=!1;if(n>0)if(this._hasHeight)a.hide(),Vi(()=>{var u=this.getScrollbarWidth(!0),d=Ke(this.element())-u,c=nt(r),h=d-c>0,f=this._getRowsHeight(r.children().first()),p=t||this.getTableElements(),m=Math.ceil(parseFloat(p.css("borderTopWidth"))),g=this._getHeightCorrection(),C=d-f-m-g;h&&Qt(()=>{a.css("height",C),o=!0,a.show()}),Qt(()=>this._updateLastRowBorder(o))});else{var s=i.pageSize()-n,l=this.option("scrolling.mode");s>0&&i.pageCount()>1&&l!=="virtual"&&l!=="infinite"&&(Of(a,s*this._rowHeight),o=!0),!o&&t?Of(a,0):a.toggle(o),this._updateLastRowBorder(o)}else a.css("height",0),a.show(),this._updateLastRowBorder(!0)}},_getHeightCorrection:function(){var t=Lt.webkit&&this._getDevicePixelRatio()>=2,i=Lt.chrome&&Lt.version>=91,n=Lt.mozilla&&Lt.version>=70&&!this.option("showRowLines");return t||n||i?1:0},_columnOptionChanged:function(t){var i=t.optionNames;t.changeTypes.grouping||(i.width||i.visibleWidth)&&(this.callBase(t),this._fireColumnResizedCallbacks())},getScrollable:function(){return this._scrollable},init:function(){var t=this,i=t.getController("data");t.callBase(),t._editorFactoryController=t.getController("editorFactory"),t._rowHeight=0,t._scrollTop=0,t._scrollLeft=-1,t._scrollRight=0,t._hasHeight=!1,i.loadingChanged.add(function(n,r){t.setLoading(n,r)}),i.dataSourceChanged.add(function(){t._scrollLeft>=0&&t._handleScroll({component:t.getScrollable(),scrollOffset:{top:t._scrollTop,left:t._scrollLeft}})})},_handleDataChanged:function(t){switch(t.changeType){case"refresh":case"prepend":case"append":case"update":this.render(null,t);break;default:this._update(t)}},publicMethods:function(){return["isScrollbarVisible","getTopVisibleRowData","getScrollbarWidth","getCellElement","getRowElement","getScrollable"]},contentWidth:function(){return He(this.element())-this.getScrollbarWidth()},getScrollbarWidth:function(t){var i=this._scrollableContainer&&this._scrollableContainer.get(0),n=0;i&&(t?(n=i.clientHeight?i.offsetHeight-i.clientHeight:0,n+=(r=this,a=r.getScrollable(),a?Math.ceil(parseFloat(v(a.content()).css("paddingBottom"))):0)):n=i.clientWidth?i.offsetWidth-i.clientWidth:0);var r,a;return n>0?n:0},_fireColumnResizedCallbacks:function(){for(var t=this._lastColumnWidths||[],i=[],n=this.getColumns(),r=0;r<n.length;r++)i[r]=n[r].visibleWidth,n[r].resizedCallbacks&&!E(n[r].groupIndex)&&t[r]!==i[r]&&n[r].resizedCallbacks.fire(i[r]);this._lastColumnWidths=i},_updateLastRowBorder:function(t){this.option("showBorders")&&this.option("showRowLines")&&!t?this.element().addClass(mx):this.element().removeClass(mx)},_updateScrollable:function(){var t=_n.getInstance(this.element());t&&(t.update(),this._updateHorizontalScrollPosition())},_updateHorizontalScrollPosition:function(){var t=this.getScrollable(),i=t&&t.scrollOffset().left,n=this.option("rtlEnabled");if(n){var r=gx(t),a=r-i;a!==this._scrollRight&&(this._scrollLeft=r-this._scrollRight)}this._scrollLeft>=0&&i!==this._scrollLeft&&t.scrollTo({x:this._scrollLeft})},_resizeCore:function(){var t=this;t._fireColumnResizedCallbacks(),t._updateRowHeight(),Qt(function(){t._renderScrollable(),t.renderNoDataText(),t.updateFreeSpaceRowHeight(),Vi(function(){t._updateScrollable()})})},scrollTo:function(t){var i=this.element(),n=i&&_n.getInstance(i);n&&n.scrollTo(t)},height:function(t,i){var n=this,r=this.element();if(arguments.length===0)return r?nt(r,!0):0;n._hasHeight=i===void 0?t!=="auto":i,E(t)&&r&&Of(r,t)},setLoading:function(t,i){var n=this._loadPanel,r=this._dataController,a=this.option("loadPanel")||{},o=r.isLoaded()?a.animation:null,s=this.element();if(Ue()&&(!n&&i!==void 0&&r.isLocalStore()&&a.enabled==="auto"&&s&&(this._renderLoadPanel(s,s.parent()),n=this._loadPanel),n)){var l={message:i||a.text,animation:o,visible:t};t&&(l.position=be.calculateLoadPanelPosition(s)),clearTimeout(this._hideLoadingTimeoutID),n.option("visible")&&!t?this._hideLoadingTimeoutID=setTimeout(function(){n.option(l)},O3):n.option(l)}},setRowsOpacity:function(t,i){var n=this._getRowElements().not("."+Cp)||[];this._setRowsOpacityCore(n,this.getColumns(),t,i)},_getCellElementsCore:function(t){var i=this.callBase.apply(this,arguments);if(i){var n=i.filter("."+px).index();if(n>=0&&i.length>n+1)return i.slice(0,n+1)}return i},_getBoundaryVisibleItemIndex:function(t,i){var n=0,r=0,a=0,o=this._scrollTop,s=this._findContentElement(),l=s&&s.offset().top,u=this.getController("data"),d=u.items(),c=this.getTableElement();if(d.length&&c){var h=this._getRowElements(c).filter(":visible");if(!t){var f=nt(this._hasHeight?this.element():je());o+=f}for(n=0;n<d.length;n++){r=a;var p=v(h).eq(n);if(p.length&&(a=p.offset(),a=(t?a.top:a.top+nt(p))-l,a>o)){n&&(i||2*o<Math.round(a+r))&&n--;break}}n&&n===d.length&&n--}return n},getTopVisibleItemIndex:function(t){return this._getBoundaryVisibleItemIndex(!0,t)},getBottomVisibleItemIndex:function(t){return this._getBoundaryVisibleItemIndex(!1,t)},getTopVisibleRowData:function(){var t=this.getTopVisibleItemIndex(),i=this._dataController.items();if(i[t])return i[t].data},_scrollToElement:function(t,i){var n=this.getScrollable();n&&n.scrollToElement(t,i)},optionChanged:function(t){switch(this.callBase(t),t.name){case"wordWrapEnabled":case"showColumnLines":case"showRowLines":case"rowAlternationEnabled":case"rowTemplate":case"dataRowTemplate":case"twoWayBindingEnabled":this._invalidate(!0,!0),t.handled=!0;break;case"scrolling":this._rowHeight=null,this._tableElement=null,t.handled=!0;break;case"rtlEnabled":this._rowHeight=null,this._tableElement=null;break;case"loadPanel":this._tableElement=null,this._invalidate(!0,t.fullName!=="loadPanel.enabled"),t.handled=!0;break;case"noDataText":this.renderNoDataText(),t.handled=!0}},dispose:function(){clearTimeout(this._hideLoadingTimeoutID),this._scrollable&&this._scrollable.dispose()},setScrollerSpacing:function(){},_restoreErrorRow:function(){}}}())}};ED.views.rowsView;Oe.registerModule("rows",ED);var Cx="dx-inkripple",yx="dx-inkripple-wave",wD="dx-inkripple-showing",ID="dx-inkripple-hiding",R3=2,k3=4e3,yp=300,B3=1e3,TD=0,AD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{useHoldAnimation:t,waveSizeCoefficient:i,isCentered:n,wavesNumber:r}=e;return{waveSizeCoefficient:i||R3,isCentered:n||!1,wavesNumber:r||1,durations:M3(t??!0)}},Jg=function(e){var t=AD(e);return{showWave:OD.bind(this,t),hideWave:kD.bind(this,t)}},L3=function(e){var t=e.children("."+Cx);return t.length===0&&(t=v("<div>").addClass(Cx).appendTo(e)),t},DD=function(e,t){for(var i=L3(v(e)),n=i.children("."+yx).toArray(),r=n.length;r<t;r++){var a=v("<div>").appendTo(i).addClass(yx);n.push(a[0])}return v(n)},P3=function(e,t){var i=v(t.element),n=ot(i),r=nt(i),a=parseInt(Math.sqrt(n*n+r*r)),o=Math.min(k3,parseInt(a*e.waveSizeCoefficient)),s,l;if(e.isCentered)s=(n-o)/2,l=(r-o)/2;else{var u=t.event,d=i.offset(),c=u.pageX-d.left,h=u.pageY-d.top;s=c-o/2,l=h-o/2}return{left:s,top:l,height:o,width:o}};function OD(e,t){var i=DD(t.element,e.wavesNumber).eq(t.wave||TD);e.hidingTimeout&&clearTimeout(e.hidingTimeout),RD(i),i.css(P3(e,t)),e.showingTimeout=setTimeout(F3.bind(this,e,i),0)}function F3(e,t){var i=e.durations.showingScale+"ms";t.addClass(wD).css("transitionDuration",i)}function M3(e){return{showingScale:e?B3:yp,hidingScale:yp,hidingOpacity:yp}}function RD(e){e.removeClass(ID).css("transitionDuration","")}function kD(e,t){e.showingTimeout&&clearTimeout(e.showingTimeout);var i=DD(t.element,t.wavesNumber).eq(t.wave||TD),n=e.durations,r=n.hidingScale+"ms, "+n.hidingOpacity+"ms";i.addClass(ID).removeClass(wD).css("transitionDuration",r);var a=Math.max(n.hidingScale,n.hidingOpacity);e.hidingTimeout=setTimeout(RD.bind(this,i),a)}var _l="dx-icon",V3="dx-svg-icon",Ju=e=>!e||typeof e!="string"?!1:/^\s*<svg[^>]*>(.|\r?\n)*?<\/svg>\s*$/i.test(e)?"svg":/data:.*base64|\.|[^<\s]\//.test(e)?"image":/^[\w-_]+$/.test(e)?"dxIcon":/^\s?([\w-_]\s?)+$/.test(e)?"fontIcon":!1,So=e=>{switch(Ju(e)){case"image":return v("<img>").attr("src",e).addClass(_l);case"fontIcon":return v("<i>").addClass("".concat(_l," ").concat(e));case"dxIcon":return v("<i>").addClass("".concat(_l," ").concat(_l,"-").concat(e));case"svg":return v("<i>").addClass("".concat(_l," ").concat(V3)).append(e);default:return null}};function N3(e){return class{constructor(){throw new Error("Module '".concat(e,"' not found"))}static getInstance(){}}}var xx=N3("TextBox");const Eo={_getDefaultOptions:function(){return k(this.callBase(),{searchMode:"",searchExpr:null,searchValue:"",searchEnabled:!1,searchEditorOptions:{}})},_initMarkup:function(){this._renderSearch(),this.callBase()},_renderSearch:function(){var e=this.$element(),t=this.option("searchEnabled"),i=this._addWidgetPrefix("search"),n=this._addWidgetPrefix("with-search");if(!t){e.removeClass(n),this._removeSearchBox();return}var r=this._getSearchEditorOptions();this._searchEditor?this._searchEditor.option(r):(e.addClass(n),this._$searchEditorElement=v("<div>").addClass(i).prependTo(e),this._searchEditor=this._createComponent(this._$searchEditorElement,xx,r))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){var e=this,t=e.option("searchEditorOptions"),i=fe.format("Search");return k({mode:"search",placeholder:i,tabIndex:e.option("tabIndex"),value:e.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":i},onValueChanged:function(n){var r=e.option("searchTimeout");e._valueChangeDeferred=new se,clearTimeout(e._valueChangeTimeout),e._valueChangeDeferred.done((function(){this.option("searchValue",n.value)}).bind(e)),n.event&&n.event.type==="input"&&r?e._valueChangeTimeout=setTimeout(function(){e._valueChangeDeferred.resolve()},r):e._valueChangeDeferred.resolve()}},t)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.$element()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(e,t){this.option("searchEnabled")&&this._toggleFocusClass(t,this.$element()),this.callBase(e,t)},getOperationBySearchMode:function(e){return e==="equals"?"=":e},_cleanAria:function(e){this.setAria({role:null,activedescendant:null},e),e.attr("tabIndex",null)},_optionChanged:function(e){switch(e.name){case"searchEnabled":case"searchEditorOptions":this._cleanAria(this.option("searchEnabled")?this.$element():this._itemContainer()),this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource){Qe.log("W1009");return}e.name==="searchMode"?this._dataSource.searchOperation(this.getOperationBySearchMode(e.value)):this._dataSource[e.name](e.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(e)}},focus:function(){if(!this.option("focusedElement")&&this.option("searchEnabled")){this._searchEditor&&this._searchEditor.focus();return}this.callBase()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()},setEditorClass:function(e){xx=e}};var{ios:$3,mac:H3}=Re.real(),W3=$3||H3,z3=function(e){var t;try{t={start:e.selectionStart,end:e.selectionEnd}}catch{t={start:0,end:0}}return t},G3=function(e,t){if(me.getBody().contains(e))try{e.selectionStart=t.start,e.selectionEnd=t.end}catch{}},BD=function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e=v(e).get(0),!E(t))return z3(e);!i&&W3&&me.getActiveElement()!==e||G3(e,t)};function U3(){var{android:e,version:t}=Re.real();return e&&t[0]>4}function K3(){return"onbeforeinput"in me.createElement("input")||U3()}var bs=" ",LD=it.inherit({ctor:function(e){this._value=bs,k(this,e)},next:function(e){if(!arguments.length)return this._next;this._next=e},text:re,value:re,rawValue:re,handle:re,_prepareHandlingArgs:function(e,t){var i,n,r;t=t||{};var a=Object.prototype.hasOwnProperty.call(e,"value")?"value":"text";return e[a]=(i=t.str)!==null&&i!==void 0?i:e[a],e.start=(n=t.start)!==null&&n!==void 0?n:e.start,e.length=(r=t.length)!==null&&r!==void 0?r:e.length,e.index=e.index+1,e},reset:re,clear:re,first:function(e){return e=e||0,this.next().first(e+1)},isAccepted:function(){return!1},adjustedCaret:function(e,t,i){return t?this._adjustedForward(e,0,i):this._adjustedBackward(e,0,i)},_adjustedForward:re,_adjustedBackward:re,isValid:re}),j3=LD.inherit({next:re,handle:function(){return 0},text:function(){return""},value:function(){return""},first:function(){return 0},rawValue:function(){return""},adjustedCaret:function(){return 0},isValid:function(){return!0}}),PD=LD.inherit({text:function(){return(this._value!==bs?this._value:this.maskChar)+this.next().text()},value:function(){return this._value+this.next().value()},rawValue:function(){return this._value+this.next().rawValue()},handle:function(e){var t=Object.prototype.hasOwnProperty.call(e,"value")?e.value:e.text;if(!t||!t.length||!e.length)return 0;if(e.start)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start-1}));var i=t[0],n=t.substring(1);return this._tryAcceptChar(i,e),this._accepted()?this.next().handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))+1:this.handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))},clear:function(e){this._tryAcceptChar(bs,e),this.next().clear(this._prepareHandlingArgs(e))},reset:function(){this._accepted(!1),this.next().reset()},_tryAcceptChar:function(e,t){if(this._accepted(!1),!!this._isAllowed(e,t)){var i=e===bs?this.maskChar:e;t.fullText=t.fullText.substring(0,t.index)+i+t.fullText.substring(t.index+1),this._accepted(!0),this._value=e}},_accepted:function(e){if(!arguments.length)return!!this._isAccepted;this._isAccepted=!!e},first:function(e){return this._value===bs?e||0:this.callBase(e)},_isAllowed:function(e,t){return e===bs?!0:this._isValid(e,t)},_isValid:function(e,t){var i=this.allowedChars;return i instanceof RegExp?i.test(e):Ie(i)?i(e,t.index,t.fullText):Array.isArray(i)?i.includes(e):i===e},isAccepted:function(e){return e===0?this._accepted():this.next().isAccepted(e-1)},_adjustedForward:function(e,t,i){return t>=e?t:this.next()._adjustedForward(e,t+1,i)||t+1},_adjustedBackward:function(e,t){return t>=e-1?e:this.next()._adjustedBackward(e,t+1)||t+1},isValid:function(e){return this._isValid(this._value,e)&&this.next().isValid(this._prepareHandlingArgs(e))}}),bx=PD.inherit({value:function(){return this.next().value()},handle:function(e){var t=Object.prototype.hasOwnProperty.call(e,"value"),i=t?e.value:e.text;if(!i.length||!e.length)return 0;if(e.start||t)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start&&e.start-1}));var n=i[0],r=i.substring(1);this._tryAcceptChar(n);var a=this._isAllowed(n)?this._prepareHandlingArgs(e,{str:r,length:e.length-1}):e;return this.next().handle(a)+1},clear:function(e){this._accepted(!1),this.next().clear(this._prepareHandlingArgs(e))},_tryAcceptChar:function(e){this._accepted(this._isValid(e))},_isValid:function(e){return e===this.maskChar},first:function(e){return e=e||0,this.next().first(e+1)},_adjustedForward:function(e,t,i){return t>=e&&i===this.maskChar?t:e===t+1&&this._accepted()?e:this.next()._adjustedForward(e,t+1,i)},_adjustedBackward:function(e,t){return t>=e-1?0:this.next()._adjustedBackward(e,t+1)},isValid:function(e){return this.next().isValid(this._prepareHandlingArgs(e))}}),ni={valid:"valid",invalid:"invalid",pending:"pending"};class ka{constructor(){this.NAME="base"}defaultMessage(t){return fe.getFormatter("validation-".concat(this.NAME))(t)}defaultFormattedMessage(t){return fe.getFormatter("validation-".concat(this.NAME,"-formatted"))(t)}_isValueEmpty(t){return!Qu.required.validate(t,{})}validate(t,i){var n=Array.isArray(t)?t:[t],r=!0;return n.length?n.every(a=>(r=this._validate(a,i),r)):r=this._validate(null,i),r}}class q3 extends ka{constructor(){super(),this.NAME="required"}_validate(t,i){return!E(t)||t===!1?!1:(t=String(t),(i.trim||!E(i.trim))&&(t=t.trim()),t!=="")}}class Y3 extends ka{constructor(){super(),this.NAME="numeric"}_validate(t,i){return i.ignoreEmptyValue!==!1&&this._isValueEmpty(t)?!0:i.useCultureSettings&&Ve(t)?!isNaN(St.parse(t)):Et(t)}}class X3 extends ka{constructor(){super(),this.NAME="range"}_validate(t,i){if(i.ignoreEmptyValue!==!1&&this._isValueEmpty(t))return!0;var n=Qu.numeric.validate(t,i),r=E(t)&&t!=="",a=n?parseFloat(t):r&&t.valueOf(),o=i.min,s=i.max;if(!(n||Wi(t))&&!r)return!1;if(E(o))return E(s)?a>=o&&a<=s:a>=o;if(E(s))return a<=s;throw xt.Error("E0101")}}class Z3 extends ka{constructor(){super(),this.NAME="stringLength"}_validate(t,i){var n;return t=String((n=t)!==null&&n!==void 0?n:""),(i.trim||!E(i.trim))&&(t=t.trim()),i.ignoreEmptyValue&&this._isValueEmpty(t)?!0:Qu.range.validate(t.length,k({},i))}}class FD extends ka{constructor(){super(),this.NAME="custom"}validate(t,i){if(i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=i.validator,r=n&&Ie(n.option)&&n.option("dataGetter"),a=Ie(r)&&r(),o={value:t,validator:n,rule:i};return a&&k(o,a),i.validationCallback(o)}}class J3 extends FD{constructor(){super(),this.NAME="async"}validate(t,i){if(E(i.reevaluate)||k(i,{reevaluate:!0}),i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=i.validator,r=n&&Ie(n.option)&&n.option("dataGetter"),a=Ie(r)&&r(),o={value:t,validator:n,rule:i};a&&k(o,a);var s=i.validationCallback(o);if(!ku(s))throw xt.Error("E0103");return this._getWrappedPromise(yi(s).promise())}_getWrappedPromise(t){var i=new se;return t.then(function(n){i.resolve(n)},function(n){var r={isValid:!1};E(n)&&(Ve(n)?r.message=n:$e(n)&&E(n.message)&&Ve(n.message)&&(r.message=n.message)),i.resolve(r)}),i.promise()}}class Q3 extends ka{constructor(){super(),this.NAME="compare"}_validate(t,i){if(!i.comparisonTarget)throw xt.Error("E0102");if(i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;k(i,{reevaluate:!0});var n=i.comparisonTarget(),r=i.comparisonType||"==";switch(r){case"==":return t==n;case"!=":return t!=n;case"===":return t===n;case"!==":return t!==n;case">":return t>n;case">=":return t>=n;case"<":return t<n;case"<=":return t<=n}}}class e6 extends ka{constructor(){super(),this.NAME="pattern"}_validate(t,i){if(i.ignoreEmptyValue!==!1&&this._isValueEmpty(t))return!0;var n=i.pattern;return Ve(n)&&(n=new RegExp(n)),n.test(t)}}class t6 extends ka{constructor(){super(),this.NAME="email"}_validate(t,i){return i.ignoreEmptyValue!==!1&&this._isValueEmpty(t)?!0:Qu.pattern.validate(t,k({},i,{pattern:/^[\d\w._-]+@[\d\w._-]+\.[\w]+$/i}))}}var Qu={required:new q3,numeric:new Y3,range:new X3,stringLength:new Z3,custom:new FD,async:new J3,compare:new Q3,pattern:new e6,email:new t6},i6=it.inherit({ctor(e){this.group=e,this.validators=[],this._pendingValidators=[],this._onValidatorStatusChanged=this._onValidatorStatusChanged.bind(this),this._resetValidationInfo(),this._eventsStrategy=new Oo(this)},validate(){var e={isValid:!0,brokenRules:[],validators:[],status:ni.valid,complete:null};return this._unsubscribeFromAllChangeEvents(),this._pendingValidators=[],this._resetValidationInfo(),V(this.validators,(t,i)=>{var n=i.validate();e.isValid=e.isValid&&n.isValid,n.brokenRules&&(e.brokenRules=e.brokenRules.concat(n.brokenRules)),e.validators.push(i),n.status===ni.pending&&this._addPendingValidator(i),this._subscribeToChangeEvents(i)}),this._pendingValidators.length?e.status=ni.pending:(e.status=e.isValid?ni.valid:ni.invalid,this._unsubscribeFromAllChangeEvents(),this._raiseValidatedEvent(e)),this._updateValidationInfo(e),k({},this._validationInfo.result)},_subscribeToChangeEvents(e){e.on("validating",this._onValidatorStatusChanged),e.on("validated",this._onValidatorStatusChanged)},_unsubscribeFromChangeEvents(e){e.off("validating",this._onValidatorStatusChanged),e.off("validated",this._onValidatorStatusChanged)},_unsubscribeFromAllChangeEvents(){V(this.validators,(e,t)=>{this._unsubscribeFromChangeEvents(t)})},_updateValidationInfo(e){this._validationInfo.result=e,e.status===ni.pending&&(this._validationInfo.deferred||(this._validationInfo.deferred=new se,this._validationInfo.result.complete=this._validationInfo.deferred.promise()))},_addPendingValidator(e){var t=zi(this._pendingValidators,function(i){return i===e})[0];t||this._pendingValidators.push(e)},_removePendingValidator(e){var t=this._pendingValidators.indexOf(e);t>=0&&this._pendingValidators.splice(t,1)},_orderBrokenRules(e){var t=[];return V(this.validators,function(i,n){var r=zi(e,function(a){return a.validator===n});r.length&&(t=t.concat(r))}),t},_updateBrokenRules(e){if(this._validationInfo.result){var t=this._validationInfo.result.brokenRules,i=zi(t,function(n){return n.validator!==e.validator});e.brokenRules&&(t=i.concat(e.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(t)}},_onValidatorStatusChanged(e){if(e.status===ni.pending){this._addPendingValidator(e.validator);return}this._resolveIfComplete(e)},_resolveIfComplete(e){if(this._removePendingValidator(e.validator),this._updateBrokenRules(e),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=this._validationInfo.result.brokenRules.length===0?ni.valid:ni.invalid,this._validationInfo.result.isValid=this._validationInfo.result.status===ni.valid;var t=k({},this._validationInfo.result,{complete:null}),i=this._validationInfo.deferred;this._validationInfo.deferred=null,this._raiseValidatedEvent(t),i&&setTimeout(()=>{i.resolve(t)})}},_raiseValidatedEvent(e){this._eventsStrategy.fireEvent("validated",[e])},_resetValidationInfo(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator(e){var t=this.validators.indexOf(e);t>-1&&(this.validators.splice(t,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:e}))},registerValidator(e){this.validators.includes(e)||(this.validators.push(e),this._synchronizeValidationInfo())},reset(){V(this.validators,function(e,t){t.reset()}),this._pendingValidators=[],this._resetValidationInfo()},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}}),Ct={groups:[],getGroupConfig(e){var t=zi(this.groups,function(i){return i.group===e});if(t.length)return t[0]},findGroup(e,t){var i=e.parents(".dx-validationgroup").first();return i.length?i.dxValidationGroup("instance"):t},initGroups(){this.groups=[],this.addGroup()},addGroup(e){var t=this.getGroupConfig(e);return t||(t=new i6(e),this.groups.push(t)),t},removeGroup(e){var t=this.getGroupConfig(e),i=this.groups.indexOf(t);return i>-1&&this.groups.splice(i,1),t},_setDefaultMessage(e){var{rule:t,validator:i,name:n}=e;E(t.message)||(i.defaultFormattedMessage&&E(n)?t.message=i.defaultFormattedMessage(n):t.message=i.defaultMessage())},_addBrokenRule(e){var{result:t,rule:i}=e;t.brokenRule||(t.brokenRule=i),t.brokenRules||(t.brokenRules=[]),t.brokenRules.push(i)},validate(e,t,i){var n,r={name:i,value:e,brokenRule:null,brokenRules:null,isValid:!0,validationRules:t,pendingRules:null,status:ni.valid,complete:null},a=t==null||(n=t[0])===null||n===void 0?void 0:n.validator,o=[];return V(t||[],(s,l)=>{var u=Qu[l.type],d;if(u){if(E(l.isValid)&&l.value===e&&!l.reevaluate)return l.isValid?!0:(r.isValid=!1,this._addBrokenRule({result:r,rule:l}),!1);if(l.value=e,l.type==="async")return o.push({rule:l,ruleValidator:u}),!0;if(d=u.validate(e,l),l.isValid=d,d||(r.isValid=!1,this._setDefaultMessage({rule:l,validator:u,name:i}),this._addBrokenRule({result:r,rule:l})),!l.isValid)return!1}else throw xt.Error("E0100")}),r.isValid&&!r.brokenRules&&o.length&&(r=this._validateAsyncRules({value:e,items:o,result:r,name:i})),this._synchronizeGroupValidationInfo(a,r),r.status=r.pendingRules?ni.pending:r.isValid?ni.valid:ni.invalid,r},_synchronizeGroupValidationInfo(e,t){var i;if(e){var n=Ct.getGroupConfig(e._validationGroup);n._updateBrokenRules.call(n,{validator:e,brokenRules:(i=t.brokenRules)!==null&&i!==void 0?i:[]})}},_validateAsyncRules(e){var{result:t,value:i,items:n,name:r}=e,a=[];return V(n,(o,s)=>{var l=s.ruleValidator.validate(i,s.rule);if(!ku(l))this._updateRuleConfig({rule:s.rule,ruleResult:this._getPatchedRuleResult(l),validator:s.ruleValidator,name:r});else{t.pendingRules||(t.pendingRules=[]),t.pendingRules.push(s.rule);var u=l.then(d=>{var c=this._getPatchedRuleResult(d);return this._updateRuleConfig({rule:s.rule,ruleResult:c,validator:s.ruleValidator,name:r}),c});a.push(u)}}),a.length&&(t.complete=Promise.all(a).then(o=>this._getAsyncRulesResult({result:t,values:o}))),t},_updateRuleConfig(e){var{rule:t,ruleResult:i,validator:n,name:r}=e;t.isValid=i.isValid,i.isValid||(E(i.message)&&Ve(i.message)&&i.message.length?t.message=i.message:this._setDefaultMessage({rule:t,validator:n,name:r}))},_getPatchedRuleResult(e){var t;return $e(e)?(t=k({},e),E(t.isValid)||(t.isValid=!0)):t={isValid:Ps(e)?e:!0},t},_getAsyncRulesResult(e){var{values:t,result:i}=e;return V(t,(n,r)=>{if(r.isValid===!1){i.isValid=r.isValid;var a=i.pendingRules[n];this._addBrokenRule({result:i,rule:a})}}),i.pendingRules=null,i.complete=null,i.status=i.isValid?ni.valid:ni.invalid,i},registerValidatorInGroup(e,t){var i=Ct.addGroup(e);i.registerValidator.call(i,t)},_shouldRemoveGroup(e,t){var i=e===void 0,n=e&&e.NAME==="dxValidationGroup";return!i&&!n&&!t.length},removeRegisteredValidator(e,t){var i=Ct.getGroupConfig(e);if(i){i.removeRegisteredValidator.call(i,t);var n=i.validators;this._shouldRemoveGroup(e,n)&&this.removeGroup(e)}},initValidationOptions(e){var t={};return e&&["isValid","validationStatus","validationError","validationErrors"].forEach(i=>{i in e&&k(t,this.synchronizeValidationOptions({name:i,value:e[i]},e))}),t},synchronizeValidationOptions(e,t){var{name:i,value:n}=e;switch(i){case"validationStatus":var r=n===ni.valid||n===ni.pending;return t.isValid!==r?{isValid:r}:{};case"isValid":var{validationStatus:a}=t,o=a;return n&&a===ni.invalid?o=ni.valid:!n&&a!==ni.invalid&&(o=ni.invalid),o!==a?{validationStatus:o}:{};case"validationErrors":var s=!n||!n.length?null:n[0];return t.validationError!==s?{validationError:s}:{};case"validationError":var{validationErrors:l}=t;if(!n&&l)return{validationErrors:null};if(n&&!l)return{validationErrors:[n]};if(n&&l&&n!==l[0])return l[0]=n,{validationErrors:l.slice()}}return{}},validateGroup(e){var t=Ct.getGroupConfig(e);if(!t)throw xt.Error("E0110");return t.validate()},resetGroup(e){var t=Ct.getGroupConfig(e);if(!t)throw xt.Error("E0110");return t.reset()}};Ct.initGroups();var Od="dx-invalid-message",n6="dx-invalid-message-auto",r6="dx-invalid-message-always",a6="dx-invalid-message-content",o6=100,Qg=qn.inherit({_getDefaultOptions(){return k(this.callBase(),{integrationOptions:{},templatesRenderAsynchronously:!1,shading:!1,width:"auto",height:"auto",hideOnOutsideClick:!1,animation:null,visible:!0,propagateOutsideClick:!0,_checkParentVisibility:!1,rtlEnabled:!1,contentTemplate:this._renderInnerHtml,maxWidth:"100%",container:this.$element(),target:void 0,mode:"auto",validationErrors:void 0,positionRequest:void 0,boundary:void 0,offset:{h:0,v:0},contentId:void 0})},_init(){this.callBase(),this.updateMaxWidth(),this._updatePosition()},_initMarkup(){this.callBase(),this._ensureMessageNotEmpty(),this._updatePositionByTarget(),this._toggleModeClass(),this._updateContentId()},_updatePositionByTarget:function(){var{target:e}=this.option();this.option("position.of",e)},_ensureMessageNotEmpty:function(){this._textMarkup=this._getTextMarkup();var e=this.option("visible")&&this._textMarkup;this._toggleVisibilityClasses(e)},_toggleVisibilityClasses:function(e){e?(this.$element().addClass(Od),this.$wrapper().addClass(Od)):(this.$element().removeClass(Od),this.$wrapper().removeClass(Od))},_updateContentId(){var{container:e,contentId:t}=this.option(),i=t??v(e).attr("aria-describedby");this.$content().addClass(a6).attr("id",i)},_renderInnerHtml(e){var t=e&&v(e);t==null||t.html(this._textMarkup)},_getTextMarkup(){var e,t=(e=this.option("validationErrors"))!==null&&e!==void 0?e:[],i="";return t.forEach(n=>{var r,a=i?"<br />":"";i+=a+Km((r=n==null?void 0:n.message)!==null&&r!==void 0?r:"")}),i},_toggleModeClass(){var e=this.option("mode");this.$wrapper().toggleClass(n6,e==="auto").toggleClass(r6,e==="always")},updateMaxWidth(){var e=this.option("target"),t=ot(e),i="100%";t&&(i=Math.max(t,o6)),this.option({maxWidth:i})},_updatePosition:function(){var{positionRequest:e,rtlEnabled:t,offset:i,boundary:n}=this.option(),r=Ra(t),a=e==="below"?[" top"," bottom"]:[" bottom"," top"];t&&(i.h=-i.h),e!=="below"&&(i.v=-i.v),this.option("position",{offset:i,boundary:n,my:r+a[0],at:r+a[1],collision:"none flip"})},_optionChanged(e){var{name:t,value:i}=e;switch(t){case"target":this._updatePositionByTarget(),this.updateMaxWidth(),this.callBase(e);break;case"boundary":this.option("position.boundary",i);break;case"mode":this._toggleModeClass(i);break;case"rtlEnabled":case"offset":case"positionRequest":this._updatePosition();break;case"container":this._updateContentId(),this.callBase(e);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(e)}}});tt("dxValidationMessage",Qg);var Sx="dx-invalid-message-auto",s6="dx-state-readonly",l6="dx-invalid",u6="dx-show-invalid-badge",Ex="dx-validation-target",d6="valid",wx="invalid",c6="editorReadOnly",h6=["outlined","filled","underlined"],Ix={validationMessageMode:"mode",validationMessageOffset:"offset",validationBoundary:"boundary"},Yn=_i.inherit({ctor:function(){this.showValidationMessageTimeout=null,this.validationRequest=dt(),this.callBase.apply(this,arguments)},_createElement:function(e){this.callBase(e);var t=this.$element();t&&Vt(t[0],Ex,this)},_initOptions:function(e){this.callBase.apply(this,arguments),this.option(Ct.initValidationOptions(e))},_init:function(){this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions"));var e=this.$element();e.addClass(u6)},_getDefaultOptions:function(){return k(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:d6,validationMessageMode:"auto",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})},_attachKeyboardEvents:function(){this.option("readOnly")||this.callBase()},_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{validationError:!0})},_createValueChangeAction:function(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction:function(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction:function(){this._valueChangeActionSuppressed=!1},_initMarkup:function(){var e;this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState(),(e=this.option("_onMarkupRendered"))===null||e===void 0||e()},_raiseValueChangeAction:function(e,t){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(e,t))},_valueChangeArgs:function(e,t){return{value:e,previousValue:t,event:this._valueChangeEventInstance}},_saveValueChangeEvent:function(e){this._valueChangeEventInstance=e},_focusInHandler:function(e){var t=this.option("validationMessageMode")==="auto";if(this._canValueBeChangedByClick()&&t){var i,n=(i=this._validationMessage)===null||i===void 0?void 0:i.$wrapper();n==null||n.removeClass(Sx),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>n==null?void 0:n.addClass(Sx),150)}return this.callBase(e)},_canValueBeChangedByClick:function(){return!1},_getStylingModePrefix:function(){return"dx-editor-"},_renderStylingMode:function(){var e=this.option("stylingMode"),t=this._getStylingModePrefix(),i=h6.map(o=>t+o);i.forEach(o=>this.$element().removeClass(o));var n=t+e;if(i.indexOf(n)===-1){var r=this._getDefaultOptions().stylingMode,a=this._convertRulesToOptions(this._defaultOptionsRules()).stylingMode;n=t+(a||r)}this.$element().addClass(n)},_getValidationErrors:function(){var e=this.option("validationErrors");return!e&&this.option("validationError")&&(e=[this.option("validationError")]),e},_disposeValidationMessage:function(){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=void 0,this._validationMessage=void 0)},_toggleValidationClasses:function(e){this.$element().toggleClass(l6,e),this.setAria(wx,e||void 0)},_renderValidationState:function(){var e=this.option("isValid")&&this.option("validationStatus")!==wx,t=this._getValidationErrors(),i=this.$element();if(this._toggleValidationClasses(!e),!!Ue()&&(this._disposeValidationMessage(),!e&&t)){var{validationMessageMode:n,validationMessageOffset:r,validationBoundary:a,rtlEnabled:o}=this.option();this._$validationMessage=v("<div>").appendTo(i);var s="dx-".concat(new si);this.setAria("describedby",s),this._validationMessage=new Qg(this._$validationMessage,k({validationErrors:t,rtlEnabled:o,target:this._getValidationMessageTarget(),visualContainer:i,mode:n,positionRequest:"below",offset:r,boundary:a,contentId:s},this._options.cache("validationTooltipOptions"))),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}},_getValidationMessageTarget:function(){return this.$element()},_toggleReadOnlyState:function(){var e=this.option("readOnly");this._toggleBackspaceHandler(e),this.$element().toggleClass(s6,!!e),this.setAria("readonly",e||void 0)},_toggleBackspaceHandler:function(e){var t=this._keyboardEventBindingTarget(),i=ye("keydown",c6);R.off(t,i),e&&R.on(t,i,n=>{$t(n)==="backspace"&&n.preventDefault()})},_dispose:function(){var e=this.$element()[0];Vt(e,Ex,null),clearTimeout(this.showValidationMessageTimeout),this._disposeValidationMessage(),this.callBase()},_setSubmitElementName:function(e){var t=this._getSubmitElement();t&&(e.length>0?t.attr("name",e):t.removeAttr("name"))},_getSubmitElement:function(){return null},_setValidationMessageOption:function(e){var t,{name:i,value:n}=e,r=Ix[i]?Ix[i]:i;(t=this._validationMessage)===null||t===void 0||t.option(r,n)},_hasActiveElement:re,_optionChanged:function(e){var t;switch(e.name){case"onValueChanged":this._createValueChangeAction();break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":e.value!=e.previousValue&&this.validationRequest.fire({value:e.value,editor:this}),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(e.value,e.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(e),(t=this._validationMessage)===null||t===void 0||t.updateMaxWidth();break;case"name":this._setSubmitElementName(e.value);break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(Ct.synchronizeValidationOptions(e,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":case"validationMessageOffset":this._setValidationMessageOption(e);break;case"rtlEnabled":this._setValidationMessageOption(e),this.callBase(e);break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,e);break;default:this.callBase(e)}},blur:function(){this._hasActiveElement()&&Zs()},reset:function(){var e=this._getDefaultOptions();this.option("value",e.value)}});Yn.isEditor=e=>e instanceof Yn;class Zh{constructor(t,i,n){this.instance=null,this.$container=null,this.$placeMarker=null,this.editor=i,this.name=t,this.options=n||{}}_addPlaceMarker(t){this.$placeMarker=v("<div>").appendTo(t)}_addToContainer(t){var{$placeMarker:i,$container:n}=this;i?i.replaceWith(t):t.appendTo(n)}_attachEvents(){throw"Not implemented"}_create(){throw"Not implemented"}_isRendered(){return!!this.instance}_isVisible(){var{editor:t,options:i}=this;return i.visible||!t.option("readOnly")}_isDisabled(){throw"Not implemented"}_shouldRender(){return this._isVisible()&&!this._isRendered()}dispose(){var{instance:t,$placeMarker:i}=this;t&&(t.dispose?t.dispose():t.remove(),this.instance=null),i&&i.remove()}render(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.$container;if(this.$container=t,this._isVisible()){var{instance:i,$element:n}=this._create();this.instance=i,this._attachEvents(i,n)}else this._addPlaceMarker(t)}update(){return this._shouldRender()&&this.render(),!!this.instance}}var f6=lt.down,p6="dx-state-invisible",v6="dx-clear-button-area",_6="dx-icon-clear",m6="dx-icon",g6="dx-show-clear-button";class C6 extends Zh{_create(){var t=v("<span>").addClass(v6).append(v("<span>").addClass(m6).addClass(_6));return this._addToContainer(t),this.update(!0),{instance:t,$element:t}}_isVisible(){var{editor:t}=this;return t._isClearButtonVisible()}_attachEvents(t,i){var{editor:n}=this,r=n.NAME;R.on(i,ye(f6,r),a=>{a.preventDefault(),a.pointerType!=="mouse"&&n._clearValueHandler(a)}),R.on(i,ye(vt,r),a=>n._clearValueHandler(a))}_legacyRender(t,i){t.toggleClass(g6,i)}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!t&&super.update();var{editor:i,instance:n}=this,r=i.$element(),a=this._isVisible();n&&n.toggleClass(p6,!a),this._legacyRender(r,a)}}var gu=Array.isArray;function fh(e){var t=typeof e;return t==="string"||t==="number"}function yt(e){return e==null}function Cu(e){return e===null||e===!1||e===!0||e===void 0}function Kt(e){return typeof e=="function"}function yu(e){return typeof e=="string"}function y6(e){return typeof e=="number"}function Xi(e){return e===null}function x6(e){return e===void 0}function Ba(e,t){var i={};if(e)for(var n in e)i[n]=e[n];if(t)for(var r in t)i[r]=t[r];return i}function eC(e){return!Xi(e)&&typeof e=="object"}var bi={},b6="$F";function tC(e){return e.substr(2).toLowerCase()}function MD(e,t){e.appendChild(t)}function iC(e,t,i){Xi(i)?MD(e,t):e.insertBefore(t,i)}function S6(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function E6(e,t,i){e.replaceChild(t,i)}function VD(e,t){e.removeChild(t)}function ND(e){for(var t=0;t<e.length;t++)e[t]()}function w6(e,t,i){var n=e.children;return i&4?n.$LI:i&8192?e.childFlags===2?n:n[t?0:n.length-1]:n}function kn(e,t){for(var i;e;){if(i=e.flags,i&2033)return e.dom;e=w6(e,t,i)}return null}function ed(e,t){do{var i=e.flags;if(i&2033){VD(t,e.dom);return}var n=e.children;if(i&4&&(e=n.$LI),i&8&&(e=n),i&8192)if(e.childFlags===2)e=n;else{for(var r=0,a=n.length;r<a;++r)ed(n[r],t);return}}while(e)}function $D(e,t,i){do{var n=e.flags;if(n&2033){iC(t,e.dom,i);return}var r=e.children;if(n&4&&(e=r.$LI),n&8&&(e=r),n&8192)if(e.childFlags===2)e=r;else{for(var a=0,o=r.length;a<o;++a)$D(r[a],t,i);return}}while(e)}function HD(e,t,i){return e.constructor.getDerivedStateFromProps?Ba(i,e.constructor.getDerivedStateFromProps(t,i)):i}var xu={v:!1},Tx={componentComparator:null,createVNode:null,renderComplete:null};function ru(e,t){e.textContent=t}function WD(e,t){return eC(e)&&e.event===t.event&&e.data===t.data}function zD(e,t){for(var i in t)x6(e[i])&&(e[i]=t[i]);return e}function nC(e,t){return!!Kt(e)&&(e(t),!0)}var au="$";function Jh(e,t,i,n,r,a,o,s){this.childFlags=e,this.children=t,this.className=i,this.dom=null,this.flags=n,this.key=r===void 0?null:r,this.props=a===void 0?null:a,this.ref=o===void 0?null:o,this.type=s}function Yt(e,t,i,n,r,a,o,s){var l=r===void 0?1:r,u=new Jh(l,n,i,e,o,a,s,t);return l===0&&UD(u,u.children),u}function I6(e,t,i){if(e&4)return i;var n=(e&32768?t.render:t).defaultHooks;return yt(n)?i:yt(i)?n:zD(i,n)}function T6(e,t,i){var n=(e&32768?t.render:t).defaultProps;return yt(n)?i:yt(i)?Ba(n,null):zD(i,n)}function A6(e,t){return e&12?e:t.prototype&&t.prototype.render?4:t.render?32776:8}function Tt(e,t,i,n,r){e=A6(e,t);var a=new Jh(1,null,null,e,n,T6(e,t,i),I6(e,t,r),t);return a}function td(e,t){return new Jh(1,yt(e)||e===!0||e===!1?"":e,null,16,t,null,null,null)}function Qr(e,t,i){var n=Yt(8192,8192,null,e,t,null,i,null);switch(n.childFlags){case 1:n.children=Qh(),n.childFlags=2;break;case 16:n.children=[td(e)],n.childFlags=4;break}return n}function ln(e){var t=e.props;if(t){var i=e.flags;i&481&&(t.children!==void 0&&yt(e.children)&&UD(e,t.children),t.className!==void 0&&(yt(e.className)&&(e.className=t.className||null),t.className=void 0)),t.key!==void 0&&(e.key=t.key,t.key=void 0),t.ref!==void 0&&(i&8?e.ref=Ba(e.ref,t.ref):e.ref=t.ref,t.ref=void 0)}return e}function D6(e){var t=e.children,i=e.childFlags;return Qr(i===2?Si(t):t.map(Si),i,e.key)}function Si(e){var t=e.flags&-16385,i=e.props;if(t&14&&!Xi(i)){var n=i;i={};for(var r in n)i[r]=n[r]}return t&8192?D6(e):new Jh(e.childFlags,e.children,e.className,t,e.key,i,e.ref,e.type)}function Qh(){return td("",null)}function GD(e,t,i,n){for(var r=e.length;i<r;i++){var a=e[i];if(!Cu(a)){var o=n+au+i;if(gu(a))GD(a,t,0,o);else{if(fh(a))a=td(a,o);else{var s=a.key,l=yu(s)&&s[0]===au;(a.flags&81920||l)&&(a=Si(a)),a.flags|=65536,l?s.substring(0,n.length)!==n&&(a.key=n+s):Xi(s)?a.key=o:a.key=n+s}t.push(a)}}}}function O6(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case b6:return 8192;default:return 1}}function UD(e,t){var i,n=1;if(Cu(t))i=t;else if(fh(t))n=16,i=t;else if(gu(t)){for(var r=t.length,a=0;a<r;++a){var o=t[a];if(Cu(o)||gu(o)){i=i||t.slice(0,a),GD(t,i,a,"");break}else if(fh(o))i=i||t.slice(0,a),i.push(td(o,au+a));else{var s=o.key,l=(o.flags&81920)>0,u=Xi(s),d=yu(s)&&s[0]===au;l||u||d?(i=i||t.slice(0,a),(l||d)&&(o=Si(o)),(u||d)&&(o.key=au+a),i.push(o)):i&&i.push(o),o.flags|=65536}}i=i||t,i.length===0?n=1:n=8}else i=t,i.flags|=65536,t.flags&81920&&(i=Si(t)),n=2;return e.children=i,e.childFlags=n,e}function ef(e){return Cu(e)||fh(e)?td(e,null):gu(e)?Qr(e,0,null):e.flags&16384?Si(e):e}var Ha="http://www.w3.org/1999/xlink",xp="http://www.w3.org/XML/1998/namespace",Ax={"xlink:actuate":Ha,"xlink:arcrole":Ha,"xlink:href":Ha,"xlink:role":Ha,"xlink:show":Ha,"xlink:title":Ha,"xlink:type":Ha,"xml:base":xp,"xml:lang":xp,"xml:space":xp};function tf(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var KD=tf(0),om=tf(null),jD=tf(!0);function Dx(e,t){var i=t.$EV;return i||(i=t.$EV=tf(null)),i[e]||++KD[e]===1&&(om[e]=V6(e)),i}function qD(e,t){var i=t.$EV;i&&i[e]&&(--KD[e]===0&&(document.removeEventListener(tC(e),om[e]),om[e]=null),i[e]=null)}function R6(e,t,i,n){if(Kt(i))Dx(e,n)[e]=i;else if(eC(i)){if(WD(t,i))return;Dx(e,n)[e]=i}else qD(e,n)}function k6(e){return Kt(e.composedPath)?e.composedPath()[0]:e.target}function YD(e,t,i,n){var r=k6(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var o=a[i];if(o&&(n.dom=r,o.event?o.event(o.data,e):o(e),e.cancelBubble))return}r=r.parentNode}while(!Xi(r))}function B6(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function L6(){return this.defaultPrevented}function P6(){return this.cancelBubble}function XD(e){var t={dom:document};return e.isDefaultPrevented=L6,e.isPropagationStopped=P6,e.stopPropagation=B6,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function F6(e){return function(t){if(t.button!==0){t.stopPropagation();return}YD(t,!0,e,XD(t))}}function M6(e){return function(t){YD(t,!1,e,XD(t))}}function V6(e){var t=e==="onClick"||e==="onDblClick"?F6(e):M6(e);return document.addEventListener(tC(e),t),t}function N6(e,t){var i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}function Ox(e,t,i){if(e[t]){var n=e[t];n.event?n.event(n.data,i):n(i)}else{var r=t.toLowerCase();e[r]&&e[r](i)}}function id(e,t){var i=function(n){var r=this.$V;if(r){var a=r.props||bi,o=r.dom;if(yu(e))Ox(a,e,n);else for(var s=0;s<e.length;++s)Ox(a,e[s],n);if(Kt(t)){var l=this.$V,u=l.props||bi;t(u,o,!1,l)}}};return Object.defineProperty(i,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),i}function ho(e,t,i){var n="$"+t,r=e[n];if(r){if(r[1].wrapped)return;e.removeEventListener(r[0],r[1]),e[n]=null}Kt(i)&&(e.addEventListener(t,i),e[n]=[t,i])}function rC(e){return e==="checkbox"||e==="radio"}var $6=id("onInput",aC),H6=id(["onClick","onChange"],aC);function ZD(e){e.stopPropagation()}ZD.wrapped=!0;function W6(e,t){rC(t.type)?(ho(e,"change",H6),ho(e,"click",ZD)):ho(e,"input",$6)}function aC(e,t){var i=e.type,n=e.value,r=e.checked,a=e.multiple,o=e.defaultValue,s=!yt(n);i&&i!==t.type&&t.setAttribute("type",i),!yt(a)&&a!==t.multiple&&(t.multiple=a),!yt(o)&&!s&&(t.defaultValue=o+""),rC(i)?(s&&(t.value=n),yt(r)||(t.checked=r)):s&&t.value!==n?(t.defaultValue=n,t.value=n):yt(r)||(t.checked=r)}function Wl(e,t){if(e.type==="option")z6(e,t);else{var i=e.children,n=e.flags;if(n&4)Wl(i.$LI,t);else if(n&8)Wl(i,t);else if(e.childFlags===2)Wl(i,t);else if(e.childFlags&12)for(var r=0,a=i.length;r<a;++r)Wl(i[r],t)}}function z6(e,t){var i=e.props||bi,n=e.dom;n.value=i.value,i.value===t||gu(t)&&t.indexOf(i.value)!==-1?n.selected=!0:(!yt(t)||!yt(i.selected))&&(n.selected=i.selected||!1)}var G6=id("onChange",JD);function U6(e){ho(e,"change",G6)}function JD(e,t,i,n){var r=!!e.multiple;!yt(e.multiple)&&r!==t.multiple&&(t.multiple=r);var a=e.selectedIndex;a===-1&&(t.selectedIndex=-1);var o=n.childFlags;if(o!==1){var s=e.value;y6(a)&&a>-1&&t.options[a]&&(s=t.options[a].value),i&&yt(s)&&(s=e.defaultValue),Wl(n,s)}}var K6=id("onInput",QD),j6=id("onChange");function q6(e,t){ho(e,"input",K6),t.onChange&&ho(e,"change",j6)}function QD(e,t,i){var n=e.value,r=t.value;if(yt(n)){if(i){var a=e.defaultValue;!yt(a)&&a!==r&&(t.defaultValue=a,t.value=a)}}else r!==n&&(t.defaultValue=n,t.value=n)}function eO(e,t,i,n,r,a){e&64?aC(n,i):e&256?JD(n,i,r,t):e&128&&QD(n,i,r),a&&(i.$V=t)}function Y6(e,t,i){e&64?W6(t,i):e&256?U6(t):e&128&&q6(t,i)}function tO(e){return e.type&&rC(e.type)?!yt(e.checked):!yt(e.value)}function Ei(){return{current:null}}function ph(e){e&&!nC(e,null)&&e.current&&(e.current=null)}function nd(e,t,i){e&&(Kt(e)||e.current!==void 0)&&i.push(function(){!nC(e,t)&&e.current!==void 0&&(e.current=t)})}function Un(e,t){Hr(e),ed(e,t)}function Hr(e){var t=e.flags,i=e.children,n;if(t&481){n=e.ref;var r=e.props;ph(n);var a=e.childFlags;if(!Xi(r))for(var o=Object.keys(r),s=0,l=o.length;s<l;s++){var u=o[s];jD[u]&&qD(u,e.dom)}a&12?bu(i):a===2&&Hr(i)}else i&&(t&4?(Kt(i.componentWillUnmount)&&i.componentWillUnmount(),ph(e.ref),i.$UN=!0,Hr(i.$LI)):t&8?(n=e.ref,!yt(n)&&Kt(n.onComponentWillUnmount)&&n.onComponentWillUnmount(kn(e,!0),e.props||bi),Hr(i)):t&1024?Un(i,e.ref):t&8192&&e.childFlags&12&&bu(i))}function bu(e){for(var t=0,i=e.length;t<i;++t)Hr(e[t])}function Dc(e){e.textContent=""}function Oc(e,t,i){bu(i),t.flags&8192?ed(t,e):Dc(e)}function X6(e){var t=e.event;return function(i){t(e.data,i)}}function Z6(e,t,i,n){if(eC(i)){if(WD(t,i))return;i=X6(i)}ho(n,tC(e),i)}function J6(e,t,i){if(yt(t)){i.removeAttribute("style");return}var n=i.style,r,a;if(yu(t)){n.cssText=t;return}if(!yt(e)&&!yu(e)){for(r in t)a=t[r],a!==e[r]&&n.setProperty(r,a);for(r in e)yt(t[r])&&n.removeProperty(r)}else for(r in t)a=t[r],n.setProperty(r,a)}function Q6(e,t,i,n){var r=e&&e.__html||"",a=t&&t.__html||"";r!==a&&!yt(a)&&!N6(n,a)&&(Xi(i)||(i.childFlags&12?bu(i.children):i.childFlags===2&&Hr(i.children),i.children=null,i.childFlags=1),n.innerHTML=a)}function sm(e,t,i,n,r,a,o){switch(e){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":n.autofocus=!!i;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":n[e]=!!i;break;case"defaultChecked":case"value":case"volume":if(a&&e==="value")break;var s=yt(i)?"":i;n[e]!==s&&(n[e]=s);break;case"style":J6(t,i,n);break;case"dangerouslySetInnerHTML":Q6(t,i,o,n);break;default:jD[e]?R6(e,t,i,n):e.charCodeAt(0)===111&&e.charCodeAt(1)===110?Z6(e,t,i,n):yt(i)?n.removeAttribute(e):r&&Ax[e]?n.setAttributeNS(Ax[e],e,i):n.setAttribute(e,i);break}}function iO(e,t,i,n,r){var a=!1,o=(t&448)>0;o&&(a=tO(i),a&&Y6(t,n,i));for(var s in i)sm(s,null,i[s],n,r,a,null);o&&eO(t,e,n,i,!0,a)}function nO(e,t,i){var n=ef(e.render(t,e.state,i)),r=i;return Kt(e.getChildContext)&&(r=Ba(i,e.getChildContext())),e.$CX=r,n}function rO(e,t,i,n,r,a){var o=new t(i,n),s=o.$N=!!(t.getDerivedStateFromProps||o.getSnapshotBeforeUpdate);if(o.$SVG=r,o.$L=a,e.children=o,o.$BS=!1,o.context=n,o.props===bi&&(o.props=i),s)o.state=HD(o,i,o.state);else if(Kt(o.componentWillMount)){o.$BR=!0,o.componentWillMount();var l=o.$PS;if(!Xi(l)){var u=o.state;if(Xi(u))o.state=l;else for(var d in l)u[d]=l[d];o.$PS=null}o.$BR=!1}return o.$LI=nO(o,i,n),o}function oC(e,t){var i=e.props||bi;return e.flags&32768?e.type.render(i,e.ref,t):e.type(i,t)}function wi(e,t,i,n,r,a){var o=e.flags|=16384;o&481?oO(e,t,i,n,r,a):o&4?iG(e,t,i,n,r,a):o&8?(nG(e,t,i,n,r,a),lO(e,a)):o&512||o&16?aO(e,t,r):o&8192?tG(e,i,t,n,r,a):o&1024&&eG(e,i,t,r,a)}function eG(e,t,i,n,r){wi(e.children,e.ref,t,!1,null,r);var a=Qh();aO(a,i,n),e.dom=a.dom}function tG(e,t,i,n,r,a){var o=e.children,s=e.childFlags;s&12&&o.length===0&&(s=e.childFlags=2,o=e.children=Qh()),s===2?wi(o,i,t,n,r,a):fo(o,i,t,n,r,a)}function aO(e,t,i){var n=e.dom=document.createTextNode(e.children);Xi(t)||iC(t,n,i)}function oO(e,t,i,n,r,a){var o=e.flags,s=e.props,l=e.className,u=e.childFlags,d=e.dom=S6(e.type,n=n||(o&32)>0),c=e.children;if(!yt(l)&&l!==""&&(n?d.setAttribute("class",l):d.className=l),u===16)ru(d,c);else if(u!==1){var h=n&&e.type!=="foreignObject";u===2?(c.flags&16384&&(e.children=c=Si(c)),wi(c,d,i,h,null,a)):(u===8||u===4)&&fo(c,d,i,h,null,a)}Xi(t)||iC(t,d,r),Xi(s)||iO(e,o,s,d,n),nd(e.ref,d,a)}function fo(e,t,i,n,r,a){for(var o=0;o<e.length;++o){var s=e[o];s.flags&16384&&(e[o]=s=Si(s)),wi(s,t,i,n,r,a)}}function iG(e,t,i,n,r,a){var o=rO(e,e.type,e.props||bi,i,n,a);wi(o.$LI,t,o.$CX,n,r,a),sO(e.ref,o,a)}function nG(e,t,i,n,r,a){wi(e.children=ef(oC(e,i)),t,i,n,r,a)}function rG(e){return function(){e.componentDidMount()}}function sO(e,t,i){nd(e,t,i),Kt(t.componentDidMount)&&i.push(rG(t))}function aG(e,t){return function(){e.onComponentDidMount(kn(t,!0),t.props||bi)}}function lO(e,t){var i=e.ref;yt(i)||(nC(i.onComponentWillMount,e.props||bi),Kt(i.onComponentDidMount)&&t.push(aG(i,e)))}function oG(e,t,i,n,r,a){Hr(e),t.flags&e.flags&2033?(wi(t,null,n,r,null,a),E6(i,t.dom,e.dom)):(wi(t,i,n,r,kn(e,!0),a),ed(e,i))}function Yr(e,t,i,n,r,a,o){var s=t.flags|=16384;e.flags!==s||e.type!==t.type||e.key!==t.key||s&2048?e.flags&16384?oG(e,t,i,n,r,o):wi(t,i,n,r,a,o):s&481?cG(e,t,n,r,s,o):s&4?pG(e,t,i,n,r,a,o):s&8?vG(e,t,i,n,r,a,o):s&16?_G(e,t):s&512?t.dom=e.dom:s&8192?uG(e,t,i,n,r,o):dG(e,t,n,o)}function sG(e,t,i){e!==t&&(e!==""?i.firstChild.nodeValue=t:ru(i,t))}function lG(e,t){e.textContent!==t&&(e.textContent=t)}function uG(e,t,i,n,r,a){var o=e.children,s=t.children,l=e.childFlags,u=t.childFlags,d=null;u&12&&s.length===0&&(u=t.childFlags=2,s=t.children=Qh());var c=(u&2)!==0;if(l&12){var h=o.length;(l&8&&u&8||c||!c&&s.length>h)&&(d=kn(o[h-1],!1).nextSibling)}sC(l,u,o,s,i,n,r,d,e,a)}function dG(e,t,i,n){var r=e.ref,a=t.ref,o=t.children;if(sC(e.childFlags,t.childFlags,e.children,o,r,i,!1,null,e,n),t.dom=e.dom,r!==a&&!Cu(o)){var s=o.dom;VD(r,s),MD(a,s)}}function cG(e,t,i,n,r,a){var o=t.dom=e.dom,s=e.props,l=t.props,u=!1,d=!1,c;if(n=n||(r&32)>0,s!==l){var h=s||bi;if(c=l||bi,c!==bi){u=(r&448)>0,u&&(d=tO(c));for(var f in c){var p=h[f],m=c[f];p!==m&&sm(f,p,m,o,n,d,e)}}if(h!==bi)for(var g in h)yt(c[g])&&!yt(h[g])&&sm(g,h[g],null,o,n,d,e)}var C=t.children,b=t.className;e.className!==b&&(yt(b)?o.removeAttribute("class"):n?o.setAttribute("class",b):o.className=b),r&4096?lG(o,C):sC(e.childFlags,t.childFlags,e.children,C,o,i,n&&t.type!=="foreignObject",null,e,a),u&&eO(r,t,o,c,!1,d);var A=t.ref,B=e.ref;B!==A&&(ph(B),nd(A,o,a))}function hG(e,t,i,n,r,a){Hr(e),fo(t,i,n,r,kn(e,!0),a),ed(e,i)}function sC(e,t,i,n,r,a,o,s,l,u){switch(e){case 2:switch(t){case 2:Yr(i,n,r,a,o,s,u);break;case 1:Un(i,r);break;case 16:Hr(i),ru(r,n);break;default:hG(i,n,r,a,o,u);break}break;case 1:switch(t){case 2:wi(n,r,a,o,s,u);break;case 1:break;case 16:ru(r,n);break;default:fo(n,r,a,o,s,u);break}break;case 16:switch(t){case 16:sG(i,n,r);break;case 2:Dc(r),wi(n,r,a,o,s,u);break;case 1:Dc(r);break;default:Dc(r),fo(n,r,a,o,s,u);break}break;default:switch(t){case 16:bu(i),ru(r,n);break;case 2:Oc(r,l,i),wi(n,r,a,o,s,u);break;case 1:Oc(r,l,i);break;default:var d=i.length|0,c=n.length|0;d===0?c>0&&fo(n,r,a,o,s,u):c===0?Oc(r,l,i):t===8&&e===8?gG(i,n,r,a,o,d,c,s,l,u):mG(i,n,r,a,o,d,c,s,u);break}break}}function fG(e,t,i,n,r){r.push(function(){e.componentDidUpdate(t,i,n)})}function uO(e,t,i,n,r,a,o,s,l){var u=e.state,d=e.props,c=!!e.$N,h=Kt(e.shouldComponentUpdate);if(c&&(t=HD(e,i,t!==u?Ba(u,t):t)),o||!h||h&&e.shouldComponentUpdate(i,t,r)){!c&&Kt(e.componentWillUpdate)&&e.componentWillUpdate(i,t,r),e.props=i,e.state=t,e.context=r;var f=null,p=nO(e,i,r);c&&Kt(e.getSnapshotBeforeUpdate)&&(f=e.getSnapshotBeforeUpdate(d,u)),Yr(e.$LI,p,n,e.$CX,a,s,l),e.$LI=p,Kt(e.componentDidUpdate)&&fG(e,d,u,f,l)}else e.props=i,e.state=t,e.context=r}function pG(e,t,i,n,r,a,o){var s=t.children=e.children;if(!Xi(s)){s.$L=o;var l=t.props||bi,u=t.ref,d=e.ref,c=s.state;if(!s.$N){if(Kt(s.componentWillReceiveProps)){if(s.$BR=!0,s.componentWillReceiveProps(l,n),s.$UN)return;s.$BR=!1}Xi(s.$PS)||(c=Ba(c,s.$PS),s.$PS=null)}uO(s,c,l,i,n,r,!1,a,o),d!==u&&(ph(d),nd(u,s,o))}}function vG(e,t,i,n,r,a,o){var s=!0,l=t.props||bi,u=t.ref,d=e.props,c=!yt(u),h=e.children;if(c&&Kt(u.onComponentShouldUpdate)&&(s=u.onComponentShouldUpdate(d,l)),s!==!1){c&&Kt(u.onComponentWillUpdate)&&u.onComponentWillUpdate(d,l);var f=ef(oC(t,n));Yr(h,f,i,n,r,a,o),t.children=f,c&&Kt(u.onComponentDidUpdate)&&u.onComponentDidUpdate(d,l)}else t.children=h}function _G(e,t){var i=t.children,n=t.dom=e.dom;i!==e.children&&(n.nodeValue=i)}function mG(e,t,i,n,r,a,o,s,l){for(var u=a>o?o:a,d=0,c,h;d<u;++d)c=t[d],h=e[d],c.flags&16384&&(c=t[d]=Si(c)),Yr(h,c,i,n,r,s,l),e[d]=c;if(a<o)for(d=u;d<o;++d)c=t[d],c.flags&16384&&(c=t[d]=Si(c)),wi(c,i,n,r,s,l);else if(a>o)for(d=u;d<a;++d)Un(e[d],i)}function gG(e,t,i,n,r,a,o,s,l,u){var d=a-1,c=o-1,h=0,f=e[h],p=t[h],m,g;e:{for(;f.key===p.key;){if(p.flags&16384&&(t[h]=p=Si(p)),Yr(f,p,i,n,r,s,u),e[h]=p,++h,h>d||h>c)break e;f=e[h],p=t[h]}for(f=e[d],p=t[c];f.key===p.key;){if(p.flags&16384&&(t[c]=p=Si(p)),Yr(f,p,i,n,r,s,u),e[d]=p,d--,c--,h>d||h>c)break e;f=e[d],p=t[c]}}if(h>d){if(h<=c)for(m=c+1,g=m<o?kn(t[m],!0):s;h<=c;)p=t[h],p.flags&16384&&(t[h]=p=Si(p)),++h,wi(p,i,n,r,g,u)}else if(h>c)for(;h<=d;)Un(e[h++],i);else CG(e,t,n,a,o,d,c,h,i,r,s,l,u)}function CG(e,t,i,n,r,a,o,s,l,u,d,c,h){var f,p,m,g=0,C=s,b=s,A=a-s+1,B=o-s+1,D=new Int32Array(B+1),U=A===n,H=!1,W=0,G=0;if(r<4||(A|B)<32)for(g=C;g<=a;++g)if(f=e[g],G<B){for(s=b;s<=o;s++)if(p=t[s],f.key===p.key){if(D[s-b]=g+1,U)for(U=!1;C<g;)Un(e[C++],l);W>s?H=!0:W=s,p.flags&16384&&(t[s]=p=Si(p)),Yr(f,p,l,i,u,d,h),++G;break}!U&&s>o&&Un(f,l)}else U||Un(f,l);else{var j={};for(g=b;g<=o;++g)j[t[g].key]=g;for(g=C;g<=a;++g)if(f=e[g],G<B)if(s=j[f.key],s!==void 0){if(U)for(U=!1;g>C;)Un(e[C++],l);D[s-b]=g+1,W>s?H=!0:W=s,p=t[s],p.flags&16384&&(t[s]=p=Si(p)),Yr(f,p,l,i,u,d,h),++G}else U||Un(f,l);else U||Un(f,l)}if(U)Oc(l,c,e),fo(t,l,i,u,d,h);else if(H){var te=yG(D);for(s=te.length-1,g=B-1;g>=0;g--)D[g]===0?(W=g+b,p=t[W],p.flags&16384&&(t[W]=p=Si(p)),m=W+1,wi(p,l,i,u,m<r?kn(t[m],!0):d,h)):s<0||g!==te[s]?(W=g+b,p=t[W],m=W+1,$D(p,l,m<r?kn(t[m],!0):d)):s--}else if(G!==B)for(g=B-1;g>=0;g--)D[g]===0&&(W=g+b,p=t[W],p.flags&16384&&(t[W]=p=Si(p)),m=W+1,wi(p,l,i,u,m<r?kn(t[m],!0):d,h))}var Ir,Rd,Rx=0;function yG(e){var t=0,i=0,n=0,r=0,a=0,o=0,s=0,l=e.length;for(l>Rx&&(Rx=l,Ir=new Int32Array(l),Rd=new Int32Array(l));i<l;++i)if(t=e[i],t!==0){if(n=Ir[r],e[n]<t){Rd[i]=n,Ir[++r]=i;continue}for(a=0,o=r;a<o;)s=a+o>>1,e[Ir[s]]<t?a=s+1:o=s;t<e[Ir[a]]&&(a>0&&(Rd[i]=Ir[a-1]),Ir[a]=i)}a=r+1;var u=new Int32Array(a);for(o=Ir[a-1];a-- >0;)u[a]=o,o=Rd[o],Ir[a]=0;return u}var xG=typeof document<"u";xG&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);function bG(e,t,i,n){var r=[],a=t.$V;xu.v=!0,yt(a)?yt(e)||(e.flags&16384&&(e=Si(e)),wi(e,t,n,!1,null,r),t.$V=e,a=e):yt(e)?(Un(a,t),t.$V=null):(e.flags&16384&&(e=Si(e)),Yr(a,e,t,n,!1,null,r),a=t.$V=e),ND(r),xu.v=!1,Kt(i)&&i(),Kt(Tx.renderComplete)&&Tx.renderComplete(a,t)}function nf(e,t,i,n){i===void 0&&(i=null),n===void 0&&(n=bi),bG(e,t,i,n)}var Rc=[],SG=typeof Promise<"u"?Promise.resolve().then.bind(Promise.resolve()):function(e){window.setTimeout(e,0)},lm=!1;function dO(e,t,i,n){var r=e.$PS;if(Kt(t)&&(t=t(r?Ba(e.state,r):e.state,e.props,e.context)),yt(r))e.$PS=t;else for(var a in t)r[a]=t[a];if(e.$BR)Kt(i)&&e.$L.push(i.bind(e));else{if(!xu.v&&Rc.length===0){hO(e,n),Kt(i)&&i.call(e);return}if(Rc.indexOf(e)===-1&&Rc.push(e),n&&(e.$F=!0),lm||(lm=!0,SG(cO)),Kt(i)){var o=e.$QU;o||(o=e.$QU=[]),o.push(i)}}}function EG(e){for(var t=e.$QU,i=0;i<t.length;++i)t[i].call(e);e.$QU=null}function cO(){var e;for(lm=!1;e=Rc.shift();)if(!e.$UN){var t=e.$F;e.$F=!1,hO(e,t),e.$QU&&EG(e)}}function hO(e,t){if(t||!e.$BR){var i=e.$PS;e.$PS=null;var n=[];xu.v=!0,uO(e,Ba(e.state,i),e.props,kn(e.$LI,!0).parentNode,e.context,e.$SVG,t,null,n),ND(n),xu.v=!1}else e.state=e.$PS,e.$PS=null}var rd=function(t,i){this.state=null,this.$BR=!1,this.$BS=!0,this.$PS=null,this.$LI=null,this.$UN=!1,this.$CX=null,this.$QU=null,this.$N=!1,this.$L=null,this.$SVG=!1,this.$F=!1,this.props=t||bi,this.context=i||bi};rd.prototype.forceUpdate=function(t){this.$UN||dO(this,{},t,!0)};rd.prototype.setState=function(t,i){this.$UN||this.$BS||dO(this,t,i,!1)};rd.prototype.render=function(t,i,n){return null};process.env.NODE_ENV!=="production"&&console.warn("You are running production build of Inferno in development mode. Use dev:module entry point.");const da={lockCount:0,lock(){this.lockCount++},callbacks:[],callEffects(){if(this.lockCount--,this.lockCount<0)throw new Error("Unexpected Effect Call");if(this.lockCount===0){const e=this.callbacks;this.callbacks=[],e.forEach(t=>t())}}},bp=(e,t)=>{if(!(e instanceof Object&&t instanceof Object))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(o=>e[o]!==t[o])};class Vn extends rd{constructor(){super(...arguments),this._pendingContext=this.context}componentWillReceiveProps(t,i){this._pendingContext=i??{}}shouldComponentUpdate(t,i){return!bp(this.props,t)||!bp(this.state,i)||!bp(this.context,this._pendingContext)}}class gr extends Vn{constructor(){super(...arguments),this._effects=[]}createEffects(){return[]}updateEffects(){}componentWillMount(){da.lock()}componentWillUpdate(t,i,n){da.lock()}componentDidMount(){da.callbacks.push(()=>{this._effects=this.createEffects()}),da.callEffects()}componentDidUpdate(){da.callbacks.push(()=>this.updateEffects()),da.callEffects()}destroyEffects(){this._effects.forEach(t=>t.dispose())}componentWillUnmount(){this.destroyEffects()}}class ad extends gr{constructor(){super(...arguments),this.vDomElement=null}vDomUpdateClasses(){const t=this.vDomElement,i=t.className.length?t.className.split(" "):[],n=i.filter(a=>t.dxClasses.previous.indexOf(a)<0),r=t.dxClasses.previous.filter(a=>i.indexOf(a)<0);n.forEach(a=>{const o=t.dxClasses.removed.indexOf(a);o>-1?t.dxClasses.removed.splice(o,1):t.dxClasses.added.includes(a)||t.dxClasses.added.push(a)}),r.forEach(a=>{const o=t.dxClasses.added.indexOf(a);o>-1?t.dxClasses.added.splice(o,1):t.dxClasses.removed.includes(a)||t.dxClasses.removed.push(a)})}componentDidMount(){const t=kn(this.$LI,!0);this.vDomElement=t,super.componentDidMount(),t.dxClasses=t.dxClasses||{removed:[],added:[],previous:[]},t.dxClasses.previous=t!=null&&t.className.length?t.className.split(" "):[]}componentDidUpdate(){super.componentDidUpdate();const t=this.vDomElement;t!==null&&(t.dxClasses.added.forEach(i=>t.classList.add(i)),t.dxClasses.removed.forEach(i=>t.classList.remove(i)),t.dxClasses.previous=t.className.length?t.className.split(" "):[])}shouldComponentUpdate(t,i){const n=super.shouldComponentUpdate(t,i);return n&&this.vDomUpdateClasses(),n}}let wG=0;const fO=function(e){const t=wG++;return{id:t,defaultValue:e,Provider:class extends rd{getChildContext(){return Object.assign(Object.assign({},this.context),{[t]:this.props.value||e})}render(){return this.props.children}}}};class kt{constructor(t,i){this.dependency=i,this.effect=t,this.destroy=t()}update(t){const i=this.dependency;t&&(this.dependency=t),(!t||t.some((n,r)=>i[r]!==n))&&(this.dispose(),this.destroy=this.effect())}dispose(){this.destroy&&this.destroy()}}const od=()=>new kt(()=>{cO()},[]),IG="a runtime error occured! Use Inferno in development environment to find the error.";function TG(e){return e==null}function AG(e){return e===null||e===!1||e===!0||e===void 0}function Is(e){return e===null}function DG(e){throw e||(e=IG),new Error(`Inferno Error: ${e}`)}function OG(e,t){const i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}function RG(e){let t,i;for(;e;){if(t=e.flags,t&2033)return e.dom;i=e.children,t&8192?e=e.childFlags===2?i:i[i.length-1]:t&4?e=i.$LI:e=i}return null}function kG(e,t){return!!(t&&t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html&&OG(e,t.dangerouslySetInnerHTML.__html))}function BG(e,t,i,n,r,a,o){const s=e.type,l=e.ref,u=e.props||bi;let d;if(a){const c=rO(e,s,u,n,r,o),h=c.$LI;d=Su(h,t,i,c.$CX,r,o),sO(l,c,o)}else{const c=ef(oC(e,n));d=Su(c,t,i,n,r,o),e.children=c,lO(e,o)}return d}function pO(e,t,i,n,r,a){const o=e.childFlags,s=e.children,l=e.props,u=e.flags;if(o!==1){if(o===2)Is(i)?wi(s,t,n,r,null,a):(i=Su(s,t,i,n,r,a),i=i?i.nextSibling:null);else if(o===16)Is(i)?t.appendChild(document.createTextNode(s)):t.childNodes.length!==1||i.nodeType!==3?t.textContent=s:i.nodeValue!==s&&(i.nodeValue=s),i=null;else if(o&12){let d=!1;for(let c=0,h=s.length;c<h;++c){const f=s[c];Is(i)||d&&(f.flags&16)>0?wi(f,t,n,r,i,a):(i=Su(f,t,i,n,r,a),i=i?i.nextSibling:null),d=(f.flags&16)>0}}if(!(u&8192)){let d=null;for(;i;)d=i.nextSibling,t.removeChild(i),i=d}}else!Is(t.firstChild)&&!kG(t,l)&&(t.textContent="",u&448&&(t.defaultValue=""))}function LG(e,t,i,n,r,a){const o=e.props,s=e.className,l=e.flags,u=e.ref;return r=r||(l&32)>0,i.nodeType!==1?(oO(e,null,n,r,null,a),t.replaceChild(e.dom,i)):(e.dom=i,pO(e,i,i.firstChild,n,r,a),Is(o)||iO(e,l,o,i,r),TG(s)?i.className!==""&&i.removeAttribute("class"):r?i.setAttribute("class",s):i.className=s,nd(u,i,a)),e.dom}function vO(e,t,i){if(i.nodeType!==3)t.replaceChild(e.dom=document.createTextNode(e.children),i);else{const n=e.children;i.nodeValue!==n&&(i.nodeValue=n),e.dom=i}return e.dom}function PG(e,t,i,n,r,a){const o=e.children;return e.childFlags===2?(vO(o,t,i),o.dom):(pO(e,t,i,n,r,a),RG(o[o.length-1]))}function Su(e,t,i,n,r,a){const o=e.flags|=16384;return o&14?BG(e,t,i,n,r,(o&4)>0,a):o&481?LG(e,t,i,n,r,a):o&16?vO(e,t,i):o&512?e.dom=i:o&8192?PG(e,t,i,n,r,a):(DG(),null)}function FG(e,t,i){let n=t.firstChild;if(Is(n))nf(e,t,i);else{const r=[];for(AG(e)||(n=Su(e,t,n,{},!1,r));n&&(n=n.nextSibling);)t.removeChild(n);if(r.length>0){let a;for(;(a=r.shift())!==void 0;)a()}}t.$V=e}function kx(e){return e==null}function MG(e){return typeof e=="string"}function Bx(e){return e===void 0}var VG={onComponentDidMount:1,onComponentDidUpdate:1,onComponentShouldUpdate:1,onComponentWillMount:1,onComponentWillUnmount:1,onComponentWillUpdate:1};function kc(e,t,i){var n=arguments,r,a=null,o=null,s=null,l=0,u,d=arguments.length-2;if(d===1)r=i;else if(d>1)for(r=[];d-- >0;)r[d]=n[d+2];if(MG(e)){if(l=O6(e),!kx(t)){u={};for(var c in t)c==="className"||c==="class"?s=t[c]:c==="key"?o=t.key:c==="children"&&Bx(r)?r=t.children:c==="ref"?a=t.ref:(c==="contenteditable"&&(l|=4096),u[c]=t[c])}}else{if(l=2,Bx(r)||(t||(t={}),t.children=r),!kx(t)){u={};for(var h in t)h==="key"?o=t.key:h==="ref"?a=t.ref:VG[h]===1?(a||(a={}),a[h]=t[h]):u[h]=t[h]}return Tt(l,e,u,o,a)}return l&8192?Qr(d===1?[r]:r,0,o):Yt(l,e,s,r,0,u,o,a)}const NG=e=>{var t,i;return((t=e.container)===null||t===void 0?void 0:t.get(0))||((i=e.item)===null||i===void 0?void 0:i.get(0))};function $G(e,t,i){setTimeout(()=>{nf(kc(e,t),NG(t))},0)}const HG=(e,t,i)=>{const n=t[e];return!!n&&typeof n!="string"},WG=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","border-imageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","fillOpacity","flex","flexGrow","flexNegative","flexOrder","flexPositive","flexShrink","floodOpacity","fontWeight","gridColumn","gridRow","lineClamp","lineHeight","opacity","order","orphans","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),zG=e=>typeof e=="number"?!0:!Number.isNaN(Number(e)),GG=(e,t)=>WG.has(e)?t:`${t}px`,UG=/[A-Z]/g,KG=e=>e.replace(UG,"-$&").toLowerCase();function lC(e){if(e instanceof Object)return Object.entries(e).reduce((t,[i,n])=>(t[KG(i)]=zG(n)?GG(i,n):n,t),{})}var Lx=e=>{var{parentNode:t}=e;t&&(Pu(e),t.$V=e.$V,nf(null,t),t.appendChild(e),e.innerHTML="",delete t.$V),delete e.$V};const is=Fn({createElement:(e,t)=>kc(e,t),remove:Lx,onAfterRender:()=>{da.callEffects()},onPreRender:()=>{da.lock()},render:(e,t,i,n)=>{if(n)nf(kc(e,t),i);else{var{parentNode:r}=i,a=i==null?void 0:i.nextSibling,o=me.createElement("div");o.appendChild(i);var s=me.createDocumentFragment().appendChild(o),l=!!i.$V;l&&Lx(i),FG(kc(e,t),s),i.$V=s.$V,r&&r.insertBefore(i,a)}}});var jG=(e,t)=>Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>e[i]===t[i]),qG=(e,t)=>{V(t,(i,n)=>{var r=!1;V(e,(a,o)=>{n===o&&(r=!0)}),!r&&n.parentNode&&n.parentNode.removeChild(n)})};class Px extends gr{constructor(t){super(t),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){var t,i=kn(this.$LI,!0),n=i.parentNode,r=v(n),a=r.contents(),{data:o,index:s}=(t=this.props.model)!==null&&t!==void 0?t:{data:{}};o&&Object.keys(o).forEach(u=>{o[u]&&me.isNode(o[u])&&(o[u]=Me(v(o[u])))});var l=v(this.props.template.render(Se({container:Me(r),transclude:this.props.transclude},{renovated:this.props.renovated},this.props.transclude?{}:{model:o},!this.props.transclude&&Number.isFinite(s)?{index:s}:{})));return QV(v(i),l),()=>{qG(a,r.contents()),n.appendChild(i)}}shouldComponentUpdate(t){var{model:i,template:n}=this.props,{model:r,template:a}=t,o=n===a;if(!o)return!0;if(E(i)&&E(r)){var{data:s,index:l}=i,{data:u,index:d}=r;return l!==d||!jG(s,u)}var c=i===r;return!c}createEffects(){return[new kt(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}}function Sp(e){return Array.isArray(e)?[...e]:Se({},e)}function _O(e,t,i){var n=i.length>0&&t&&e!==t?Sp(t):Sp(e),r=i[0];return i.length>1?n[r]=_O(e[r],t==null?void 0:t[r],i.slice(1)):r&&(Ye(e[r])?n[r]=Sp(e[r]):n[r]=e[r]),n}function YG(e,t,i,n){var r=t[i],a=e[i],o=e;Ye(r)||i!==n&&Array.isArray(r)?o[i]=_O(r,a,Ao(n).slice(1)):o[i]=r}var Ep=(e,t)=>i=>{Object.prototype.hasOwnProperty.call(e,i)&&e[i]===void 0&&(e[i]=t(i))};class sd extends mr{constructor(t,i){super(t,i),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}validateKeyDownHandler(){var t=this.getSupportedKeyNames(),i=t.length>0,n=typeof this._viewComponent.prototype.keyDown=="function";if(i&&!n)throw Error("Component's declaration must have 'keyDown' method.")}get viewRef(){var t;return(t=this._viewRef)===null||t===void 0?void 0:t.current}_checkContentReadyOption(t){var i=this._getContentReadyOptions().reduce((n,r)=>(n[r]=!0,n),{});return this._checkContentReadyOption=n=>!!i[n],this._checkContentReadyOption(t)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){return k(!0,super._getDefaultOptions(),this._viewComponent.defaultProps,this._propsInfo.twoWay.reduce((t,i)=>{var[n,r,a]=i;return Se({},t,{[n]:this._viewComponent.defaultProps[r],[a]:o=>this.option(n,o)})},{}),this._propsInfo.templates.reduce((t,i)=>Se({},t,{[i]:null}),{}))}_initializeComponent(){var t;super._initializeComponent(),(t=this._templateManager)===null||t===void 0||t.addDefaultTemplates(this.getDefaultTemplates()),this._props=this._optionsWithDefaultTemplates(this.option()),this._propsInfo.templates.forEach(i=>{this._componentTemplates[i]=this._createTemplateComponent(this._props[i])}),Object.keys(this._getActionConfigsFull()).forEach(i=>this._addAction(i)),this._viewRef=Ei(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){var t=this.getProps();this._renderWrapper(t)}_renderWrapper(t){var i=this.$element()[0];this._isNodeReplaced||is.onPreRender(),is.render(this._viewComponent,t,i,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,is.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(t,i){this._options.silent(t,i)}_render(){}_removeWidget(){is.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){if(!this._elementAttr){var{attributes:t}=this.$element()[0],i=Array.from(t).filter(o=>{var s;return!this._propsInfo.templates.includes(o.name)&&((s=t[o.name])===null||s===void 0?void 0:s.specified)}).reduce((o,s)=>{var{name:l,value:u}=s,d=o;return d[l]=u===""?"true":u,d},{});this._elementAttr=i,this._storedClasses=this.$element()[0].getAttribute("class")||""}for(var n=this.$element()[0].style,r={},a=0;a<n.length;a+=1)r[n[a]]=n.getPropertyValue(n[a]);return this._elementAttr.style=r,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(t){var{allowNull:i,elements:n,props:r,twoWay:a}=this._propsInfo,o=Object.keys(this._viewComponent.defaultProps),s=this._getDefaultOptions(),{children:l,onKeyboardHandled:u,ref:d}=t,c=u?(f,p)=>{u(p)}:void 0,h={ref:d,children:l,onKeyDown:c};return[...r,...this._getAdditionalProps()].forEach(f=>{Object.prototype.hasOwnProperty.call(t,f)&&(h[f]=t[f])}),i.forEach(Ep(h,()=>null)),o.forEach(Ep(h,f=>s[f])),a.forEach(f=>{var[p,m]=f;Ep(h,()=>s[m])(p)}),n.forEach(f=>{if(f in h){var p=h[f];mn(p)&&(h[f]=this._patchElementParam(p))}}),h}getSupportedKeyNames(){return[]}prepareStyleProp(t){return typeof t.style=="string"?Se({},t,{style:{},cssText:t.style}):t}getProps(){var t,i,{elementAttr:n}=this.option(),r=this._patchOptionValues(Se({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach(a=>{r[a]=this._componentTemplates[a]}),this.prepareStyleProp(Se({},r,this.elementAttr,n,{className:[...((t=this.elementAttr.class)!==null&&t!==void 0?t:"").split(" "),...((i=n==null?void 0:n.class)!==null&&i!==void 0?i:"").split(" ")].filter((a,o,s)=>a&&s.indexOf(a)===o).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return Se({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){var t=Object.values(this._templatesInfo),i={};return t.forEach(n=>{i[n]="dx-renovation-template-mock"}),i}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(t){var i=Object.entries(this._templatesInfo).reduce((n,r)=>{var a,[o,s]=r;return Se({},n,{[o]:(a=t[o])!==null&&a!==void 0?a:s})},{});return Se({},t,i)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){var t={},i=this.getSupportedKeyNames();return i.forEach(n=>{t[n]=r=>this.viewRef.keyDown(fg.createKeyDownOptions(r))}),t}_addAction(t,i){var n=i;if(!n){var r=this._createActionByOption(t,this._getActionConfigsFull()[t]);n=a=>(Object.keys(a).forEach(o=>{E(a[o])&&me.isNode(a[o])&&(a[o]=Me(v(a[o])))}),r(a))}this._actionsMap[t]=n}_optionChanged(t){var{fullName:i,name:n,previousValue:r,value:a}=t;YG(this._props,this.option(),n,i),this._propsInfo.templates.includes(n)&&a!==r&&(this._componentTemplates[n]=this._createTemplateComponent(a)),n&&this._getActionConfigsFull()[n]&&this._addAction(n),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(i),super._optionChanged(t),this._invalidate()}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?is.createElement(Px,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(t){if(t){var i=this._getTemplate(t);if(!(Ve(i)&&i==="dx-renovation-template-mock"))return n=>is.createElement(Px,{template:i,model:n})}}_wrapKeyDownHandler(t){return i=>{var{keyName:n,originalEvent:r,which:a}=i,o=this.customKeyHandlers,s=o[n]||o[a];if(s!==void 0){var l=s.bind(this),u=l(r,i);if(!u)return r.cancel=!0,r}return t==null?void 0:t(r,i)}}_toPublicElement(t){return Me(v(t))}_patchElementParam(t){try{var i=v(t),n=i==null?void 0:i.get(0);return n!=null&&n.nodeType?n:t}catch{return t}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return Se({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(t,i){this.customKeyHandlers[t]=i}setAria(t,i){this._aria[t]=i,this._initMarkup()}}sd.IS_RENOVATED_WIDGET=!1;sd.IS_RENOVATED_WIDGET=!0;class XG extends sd{get _validationGroupConfig(){return Ct.getGroupConfig(this._findGroup())}getDefaultTemplateNames(){return["content"]}getSupportedKeyNames(){return["space","enter"]}getProps(){var t=super.getProps();t.onClick=n=>{var{event:r}=n;this._clickAction({event:r,validationGroup:this._validationGroupConfig})};var i=Ju(t.icon);return i==="svg"&&(t.iconTemplate=this._createTemplateComponent(()=>t.icon)),t}get _templatesInfo(){return{template:"content"}}_toggleActiveState(t,i){var n=this.viewRef;i?n.activate():n.deactivate()}_getSubmitAction(){var t=!0,i="valid";return this._createAction(n=>{var{event:r,submitInput:a}=n;if(t){var o=this._validationGroupConfig;if(o!==void 0&&o!==""){var s=o.validate();i=s.status,s.status==="pending"&&(t=!1,this.option("disabled",!0),s.complete.then(l=>{var{status:u}=l;this.option("disabled",!1),i=u,i==="valid"&&a.click(),t=!0}))}}i!=="valid"&&r.preventDefault(),r.stopPropagation()})}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();var t=this.$element().find(".dx-button-content"),i=t.children().filter(".dx-template-wrapper"),n=t.children().filter(".dx-button-submit-input");i.length&&(i.addClass("dx-button-content"),i.append(n),t.replaceWith(i))}_patchOptionValues(t){return super._patchOptionValues(Se({},t,{templateData:t._templateData}))}_findGroup(){var t=this.$element(),i=this.option("validationGroup");return i!==void 0&&i!==""?i:Ct.findGroup(t,this._modelByElement(t))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(t){switch(t.name){case"onClick":this._clickAction=this._createClickAction()}super._optionChanged(t)}}function Rn(e){return Object.keys(e).filter(t=>e[t]).join(" ")}var ZG=["iconTemplate","position","source"],JG=e=>{var{iconClassName:t,props:{iconTemplate:i,source:n},sourceType:r}=e;return Qr([r==="dxIcon"&&Yt(1,"i",t),r==="fontIcon"&&Yt(1,"i",t),r==="image"&&Yt(1,"img",t,null,1,{alt:"",src:n}),i&&Yt(1,"i",t,i({}),0)],0)},QG={position:"left",source:""},e5=e=>e&&(e.defaultProps?t=>ln(Tt(2,e,Se({},t))):e);class mO extends Vn{constructor(t){super(t),this.state={}}get sourceType(){return Ju(this.props.source)}get cssClass(){return this.props.position!=="left"?"dx-icon-right":""}get iconClassName(){var t={"dx-icon":!0,[this.cssClass]:!!this.cssClass},{source:i}=this.props;return this.sourceType==="dxIcon"?Rn(Se({},t,{["dx-icon-".concat(i)]:!0})):this.sourceType==="fontIcon"?Rn(Se({},t,{[String(i)]:!!i})):this.sourceType==="image"?Rn(t):this.sourceType==="svg"?Rn(Se({},t,{"dx-svg-icon":!0})):""}get restAttributes(){var t=this.props,i=Pt(t,ZG);return i}render(){var t=this.props;return JG({props:Se({},t,{iconTemplate:e5(t.iconTemplate)}),sourceType:this.sourceType,cssClass:this.cssClass,iconClassName:this.iconClassName,restAttributes:this.restAttributes})}}mO.defaultProps=QG;var t5=["config"],i5=e=>ln(Yt(1,"div","dx-inkripple",null,1,Se({},e.restAttributes))),n5={config:Object.freeze({})};class gO extends Vn{constructor(t){super(t),this.state={},this.__getterCache={},this.hideWave=this.hideWave.bind(this),this.showWave=this.showWave.bind(this)}get getConfig(){return this.__getterCache.getConfig!==void 0?this.__getterCache.getConfig:this.__getterCache.getConfig=(()=>{var{config:t}=this.props;return AD(t)})()}get restAttributes(){var t=this.props,i=Pt(t,t5);return i}hideWave(t){kD(this.getConfig,t)}showWave(t){OD(this.getConfig,t)}componentWillUpdate(t,i,n){this.props.config!==t.config&&(this.__getterCache.getConfig=void 0)}render(){var t=this.props;return i5({props:Se({},t),getConfig:this.getConfig,restAttributes:this.restAttributes})}}gO.defaultProps=n5;function Bo(e){return(t,i,n,r)=>{var a=r?ye(e,r):e;if(i)return R.on(t,a,n,i),()=>{R.off(t,a,i)}}}var r5=Bo(vt),a5=Bo("dxactive"),o5=Bo("dxinactive"),s5=Bo("dxhoverstart"),l5=Bo("dxhoverend"),u5=Bo("focusin"),d5=Bo("focusout"),rf={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0},af=fO(void 0),c5=["children","rtlEnabled"],h5=e=>e.props.children,f5={};class CO extends Vn{constructor(t){super(t),this.state={},this.__getterCache={}}getChildContext(){return Se({},this.context,{ConfigContext:this.config})}get config(){return this.__getterCache.config!==void 0?this.__getterCache.config:this.__getterCache.config={rtlEnabled:this.props.rtlEnabled}}get restAttributes(){var t=this.props,i=Pt(t,c5);return i}componentWillUpdate(t,i,n){this.props.rtlEnabled!==t.rtlEnabled&&(this.__getterCache.config=void 0)}render(){var t=this.props;return h5({props:Se({},t),config:this.config,restAttributes:this.restAttributes})}}CO.defaultProps=f5;function p5(e,t){return e!==void 0?e:(t==null?void 0:t.rtlEnabled)!==void 0?t.rtlEnabled:At().rtlEnabled}function v5(e,t){var i=E(e),n=E(At().rtlEnabled)&&!i&&!E(t==null?void 0:t.rtlEnabled);return i&&e!==(t==null?void 0:t.rtlEnabled)||n}var _5=["_feedbackHideTimeout","_feedbackShowTimeout","accessKey","activeStateEnabled","activeStateUnit","addWidgetClass","aria","children","className","classes","cssText","disabled","focusStateEnabled","height","hint","hoverStateEnabled","name","onActive","onClick","onDimensionChanged","onFocusIn","onFocusOut","onHoverEnd","onHoverStart","onInactive","onKeyDown","onRootElementRendered","onVisibilityChange","rootElementRef","rtlEnabled","tabIndex","visible","width"],m5=400,g5=30,C5=e=>Object.keys(e).reduce((t,i)=>e[i]?Se({},t,{[i==="role"||i==="id"?i:"aria-".concat(i)]:String(e[i])}):t,{}),y5=e=>{var t=ln(Yt(1,"div",e.cssClasses,e.props.children,0,Se({},e.attributes,{tabIndex:e.tabIndex,title:e.props.hint,style:lC(e.styles)}),null,e.widgetElementRef));return e.shouldRenderConfigProvider?Tt(2,CO,{rtlEnabled:e.rtlEnabled,children:t}):t},vh=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(rf),Object.getOwnPropertyDescriptors({_feedbackHideTimeout:m5,_feedbackShowTimeout:g5,cssText:"",aria:Object.freeze({}),classes:"",name:"",addWidgetClass:!0})));class of extends ad{constructor(t){super(t),this.widgetElementRef=Ei(),this.state={active:!1,focused:!1,hovered:!1},this.setRootElementRef=this.setRootElementRef.bind(this),this.activeEffect=this.activeEffect.bind(this),this.inactiveEffect=this.inactiveEffect.bind(this),this.clickEffect=this.clickEffect.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.focusInEffect=this.focusInEffect.bind(this),this.focusOutEffect=this.focusOutEffect.bind(this),this.hoverStartEffect=this.hoverStartEffect.bind(this),this.hoverEndEffect=this.hoverEndEffect.bind(this),this.keyboardEffect=this.keyboardEffect.bind(this),this.resizeEffect=this.resizeEffect.bind(this),this.windowResizeEffect=this.windowResizeEffect.bind(this),this.visibilityEffect=this.visibilityEffect.bind(this),this.checkDeprecation=this.checkDeprecation.bind(this),this.applyCssTextEffect=this.applyCssTextEffect.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:af}createEffects(){return[new kt(this.setRootElementRef,[]),new kt(this.activeEffect,[this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),new kt(this.inactiveEffect,[this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),new kt(this.clickEffect,[this.props.disabled,this.props.name,this.props.onClick]),new kt(this.focusInEffect,[this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),new kt(this.focusOutEffect,[this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),new kt(this.hoverStartEffect,[this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),new kt(this.hoverEndEffect,[this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),new kt(this.keyboardEffect,[this.props.focusStateEnabled,this.props.onKeyDown]),new kt(this.resizeEffect,[this.props.name,this.props.onDimensionChanged]),new kt(this.windowResizeEffect,[this.props.onDimensionChanged]),new kt(this.visibilityEffect,[this.props.name,this.props.onVisibilityChange]),new kt(this.checkDeprecation,[this.props.height,this.props.width]),new kt(this.applyCssTextEffect,[this.props.cssText]),od()]}updateEffects(){var t,i,n,r,a,o,s,l,u,d,c,h,f;(t=this._effects[1])===null||t===void 0||t.update([this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),(i=this._effects[2])===null||i===void 0||i.update([this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),(n=this._effects[3])===null||n===void 0||n.update([this.props.disabled,this.props.name,this.props.onClick]),(r=this._effects[4])===null||r===void 0||r.update([this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),(a=this._effects[5])===null||a===void 0||a.update([this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),(o=this._effects[6])===null||o===void 0||o.update([this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),(s=this._effects[7])===null||s===void 0||s.update([this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),(l=this._effects[8])===null||l===void 0||l.update([this.props.focusStateEnabled,this.props.onKeyDown]),(u=this._effects[9])===null||u===void 0||u.update([this.props.name,this.props.onDimensionChanged]),(d=this._effects[10])===null||d===void 0||d.update([this.props.onDimensionChanged]),(c=this._effects[11])===null||c===void 0||c.update([this.props.name,this.props.onVisibilityChange]),(h=this._effects[12])===null||h===void 0||h.update([this.props.height,this.props.width]),(f=this._effects[13])===null||f===void 0||f.update([this.props.cssText])}setRootElementRef(){var{onRootElementRendered:t,rootElementRef:i}=this.props;i&&(i.current=this.widgetElementRef.current),t==null||t(this.widgetElementRef.current)}activeEffect(){var{_feedbackShowTimeout:t,activeStateEnabled:i,activeStateUnit:n,disabled:r,onActive:a}=this.props,o=n;if(i&&!r)return a5(this.widgetElementRef.current,s=>{this.setState(l=>({active:!0})),a==null||a(s)},{timeout:t,selector:o},"UIFeedback")}inactiveEffect(){var{_feedbackHideTimeout:t,activeStateEnabled:i,activeStateUnit:n,onInactive:r}=this.props,a=n;if(i)return o5(this.widgetElementRef.current,o=>{this.state.active&&(this.setState(s=>({active:!1})),r==null||r(o))},{timeout:t,selector:a},"UIFeedback")}clickEffect(){var{disabled:t,name:i,onClick:n}=this.props,r=i;if(n&&!t)return Oy.on(this.widgetElementRef.current,n,{namespace:r}),()=>Oy.off(this.widgetElementRef.current,{namespace:r})}focusInEffect(){var{disabled:t,focusStateEnabled:i,name:n,onFocusIn:r}=this.props,a="".concat(n,"Focus");if(i&&!t)return u5(this.widgetElementRef.current,o=>{o.isDefaultPrevented()||(this.setState(s=>({focused:!0})),r==null||r(o))},null,a)}focusOutEffect(){var{focusStateEnabled:t,name:i,onFocusOut:n}=this.props,r="".concat(i,"Focus");if(t)return d5(this.widgetElementRef.current,a=>{!a.isDefaultPrevented()&&this.state.focused&&(this.setState(o=>({focused:!1})),n==null||n(a))},null,r)}hoverStartEffect(){var{activeStateUnit:t,disabled:i,hoverStateEnabled:n,onHoverStart:r}=this.props,a=t;if(n&&!i)return s5(this.widgetElementRef.current,o=>{!this.state.active&&this.setState(s=>({hovered:!0})),r==null||r(o)},{selector:a},"UIFeedback")}hoverEndEffect(){var{activeStateUnit:t,hoverStateEnabled:i,onHoverEnd:n}=this.props,r=t;if(i)return l5(this.widgetElementRef.current,a=>{this.state.hovered&&(this.setState(o=>({hovered:!1})),n==null||n(a))},{selector:r},"UIFeedback")}keyboardEffect(){var{focusStateEnabled:t,onKeyDown:i}=this.props;if(t&&i){var n=ga.on(this.widgetElementRef.current,this.widgetElementRef.current,r=>i(r));return()=>ga.off(n)}}resizeEffect(){var t="".concat(this.props.name,"VisibilityChange"),{onDimensionChanged:i}=this.props;if(i)return eh.on(this.widgetElementRef.current,i,{namespace:t}),()=>eh.off(this.widgetElementRef.current,{namespace:t})}windowResizeEffect(){var{onDimensionChanged:t}=this.props;if(t)return _o.add(t),()=>{_o.remove(t)}}visibilityEffect(){var{name:t,onVisibilityChange:i}=this.props,n="".concat(t,"VisibilityChange");if(i)return th.on(this.widgetElementRef.current,()=>i(!0),()=>i(!1),{namespace:n}),()=>th.off(this.widgetElementRef.current,{namespace:n})}checkDeprecation(){var{height:t,width:i}=this.props;Ie(i)&&xt.log("W0017","width"),Ie(t)&&xt.log("W0017","height")}applyCssTextEffect(){var{cssText:t}=this.props;t!==""&&(this.widgetElementRef.current.style.cssText=t)}get shouldRenderConfigProvider(){var{rtlEnabled:t}=this.props;return v5(t,this.config)}get rtlEnabled(){var{rtlEnabled:t}=this.props;return p5(t,this.config)}get attributes(){var{aria:t,disabled:i,focusStateEnabled:n,visible:r}=this.props,a=n&&!i&&this.props.accessKey;return Se({},k({},this.restAttributes,a&&{accessKey:a}),C5(Se({},t,{disabled:i,hidden:!r})))}get styles(){var{height:t,width:i}=this.props,n=this.restAttributes.style||{},r=Ms("width",Ie(i)?i():i),a=Ms("height",Ie(t)?t():t);return Se({},n,{height:a??n.height,width:r??n.width})}get cssClasses(){var{activeStateEnabled:t,addWidgetClass:i,className:n,classes:r,disabled:a,focusStateEnabled:o,hoverStateEnabled:s,onVisibilityChange:l,visible:u}=this.props,d=!!o&&!a,c=!!s&&!a,h=!!t&&!a,f={"dx-widget":!!i,[String(r)]:!!r,[String(n)]:!!n,"dx-state-disabled":!!a,"dx-state-invisible":!u,"dx-state-focused":!!this.state.focused&&d,"dx-state-active":!!this.state.active&&h,"dx-state-hover":!!this.state.hovered&&c&&!this.state.active,"dx-rtl":!!this.rtlEnabled,"dx-visibility-change-handler":!!l};return Rn(f)}get tabIndex(){var{disabled:t,focusStateEnabled:i,tabIndex:n}=this.props,r=i&&!t;return r?n:void 0}get restAttributes(){var t=this.props,i=Pt(t,_5);return i}focus(){wc.trigger(this.widgetElementRef.current)}blur(){var t=me.getActiveElement();this.widgetElementRef.current===t&&t.blur()}activate(){this.setState(t=>({active:!0}))}deactivate(){this.setState(t=>({active:!1}))}render(){var t=this.props;return y5({props:Se({},t),active:this.state.active,focused:this.state.focused,hovered:this.state.hovered,widgetElementRef:this.widgetElementRef,config:this.config,shouldRenderConfigProvider:this.shouldRenderConfigProvider,rtlEnabled:this.rtlEnabled,attributes:this.attributes,styles:this.styles,cssClasses:this.cssClasses,tabIndex:this.tabIndex,restAttributes:this.restAttributes})}}of.defaultProps=vh;var x5=["accessKey","activeStateEnabled","children","className","disabled","focusStateEnabled","height","hint","hoverStateEnabled","icon","iconPosition","iconTemplate","onClick","onKeyDown","onSubmit","pressed","rtlEnabled","stylingMode","tabIndex","template","templateData","text","type","useInkRipple","useSubmitBehavior","visible","width"],b5=["outlined","text","contained"],S5=e=>{var{icon:t,iconPosition:i,stylingMode:n,text:r,type:a}=e,o=n&&b5.includes(n),s={"dx-button":!0,["dx-button-mode-".concat(o?n:"contained")]:!0,["dx-button-".concat(a??"normal")]:!0,"dx-button-has-text":!!r,"dx-button-has-icon":!!t,"dx-button-icon-right":i!=="left"};return Rn(s)},E5=e=>{var{children:t,iconPosition:i,iconTemplate:n,template:r,text:a}=e.props,o=!e.props.template&&!t&&a!=="",s=i==="left",l=!e.props.template&&!t&&(e.iconSource||e.props.iconTemplate)&&Tt(2,mO,{source:e.iconSource,position:i,iconTemplate:n});return ln(Tt(2,of,Se({accessKey:e.props.accessKey,activeStateEnabled:e.props.activeStateEnabled,aria:e.aria,className:e.props.className,classes:e.cssClasses,disabled:e.props.disabled,focusStateEnabled:e.props.focusStateEnabled,height:e.props.height,hint:e.props.hint,hoverStateEnabled:e.props.hoverStateEnabled,onActive:e.onActive,onClick:e.onWidgetClick,onInactive:e.onInactive,onKeyDown:e.keyDown,rtlEnabled:e.props.rtlEnabled,tabIndex:e.props.tabIndex,visible:e.props.visible,width:e.props.width},e.restAttributes,{children:Yt(1,"div","dx-button-content",[e.props.template&&r({data:e.buttonTemplateData}),!e.props.template&&t,s&&l,o&&Yt(1,"span","dx-button-text",a,0),!s&&l,e.props.useSubmitBehavior&&Yt(64,"input","dx-button-submit-input",null,1,{type:"submit",tabIndex:-1},null,e.submitInputRef),e.props.useInkRipple&&Tt(2,gO,{config:e.inkRippleConfig},null,e.inkRippleRef)],0,null,null,e.contentRef)}),null,e.widgetRef))},w5=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(rf),Object.getOwnPropertyDescriptors({activeStateEnabled:!0,hoverStateEnabled:!0,icon:"",iconPosition:"left",stylingMode:"contained",text:"",type:"normal",useInkRipple:!1,useSubmitBehavior:!1,templateData:Object.freeze({})}))),yO=GV([{device:()=>Re.real().deviceType==="desktop"&&!Re.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>ei(Xn()),options:{useInkRipple:!0}}]),Fx=e=>e&&(e.defaultProps?t=>ln(Tt(2,e,Se({},t))):e);let _h=class extends ad{constructor(t){super(t),this.state={},this.contentRef=Ei(),this.inkRippleRef=Ei(),this.submitInputRef=Ei(),this.widgetRef=Ei(),this.__getterCache={},this.focus=this.focus.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.submitEffect=this.submitEffect.bind(this),this.onActive=this.onActive.bind(this),this.onInactive=this.onInactive.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[new kt(this.submitEffect,[this.props.onSubmit,this.props.useSubmitBehavior]),od()]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.onSubmit,this.props.useSubmitBehavior])}submitEffect(){var{onSubmit:t,useSubmitBehavior:i}=this.props;if(i&&t)return Ry.on(this.submitInputRef.current,n=>t({event:n,submitInput:this.submitInputRef.current}),{namespace:"UIFeedback"}),()=>Ry.off(this.submitInputRef.current,{namespace:"UIFeedback"})}onActive(t){var{useInkRipple:i}=this.props;i&&this.inkRippleRef.current.showWave({element:this.contentRef.current,event:t})}onInactive(t){var{useInkRipple:i}=this.props;i&&this.inkRippleRef.current.hideWave({element:this.contentRef.current,event:t})}onWidgetClick(t){var{onClick:i,useSubmitBehavior:n}=this.props;i==null||i({event:t}),n&&this.submitInputRef.current.click()}keyDown(t){var{onKeyDown:i}=this.props,{keyName:n,originalEvent:r,which:a}=t,o=i==null?void 0:i(t);if(o!=null&&o.cancel)return o;(n==="space"||a==="space"||n==="enter"||a==="enter")&&(r.preventDefault(),this.onWidgetClick(r))}get aria(){var{icon:t,text:i}=this.props,n=(i??"")||t;return!i&&t&&Ju(t)==="image"&&(n=t.includes("base64")?"Base64":t.replace(/.+\/([^.]+)\..+$/,"$1")),Se({role:"button"},n?{label:n}:{})}get cssClasses(){return S5(this.props)}get iconSource(){var{icon:t,type:i}=this.props;return t||i==="back"?(t??"")||"back":""}get inkRippleConfig(){return this.__getterCache.inkRippleConfig!==void 0?this.__getterCache.inkRippleConfig:this.__getterCache.inkRippleConfig=(()=>{var{icon:t,text:i,type:n}=this.props;return!i&&t||n==="back"?{isCentered:!0,useHoldAnimation:!1,waveSizeCoefficient:1}:{}})()}get buttonTemplateData(){var{icon:t,templateData:i,text:n}=this.props;return Se({icon:t,text:n},i)}get restAttributes(){var t=this.props,i=Pt(t,x5);return i}focus(){this.widgetRef.current.focus()}activate(){this.widgetRef.current.activate()}deactivate(){this.widgetRef.current.deactivate()}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props.icon!==t.icon||this.props.text!==t.text||this.props.type!==t.type)&&(this.__getterCache.inkRippleConfig=void 0)}render(){var t=this.props;return E5({props:Se({},t,{template:Fx(t.template),iconTemplate:Fx(t.iconTemplate)}),contentRef:this.contentRef,submitInputRef:this.submitInputRef,inkRippleRef:this.inkRippleRef,widgetRef:this.widgetRef,onActive:this.onActive,onInactive:this.onInactive,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,aria:this.aria,cssClasses:this.cssClasses,iconSource:this.iconSource,inkRippleConfig:this.inkRippleConfig,buttonTemplateData:this.buttonTemplateData,restAttributes:this.restAttributes})}};_h.defaultProps=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(w5),Object.getOwnPropertyDescriptors(Se({},Vs(yO)))));var Mx=[];function I5(e){Mx.push(e),_h.defaultProps=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(_h.defaultProps),Object.getOwnPropertyDescriptors(Vs(yO)),Object.getOwnPropertyDescriptors(Vs(Mx))))}let Ii=class extends XG{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}focus(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.focus(...arguments)}activate(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.activate(...arguments)}deactivate(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.deactivate(...arguments)}_getActionConfigs(){return{onClick:{excludeValidators:["readOnly"]},onSubmit:{}}}get _propsInfo(){return{twoWay:[],allowNull:[],elements:["onSubmit"],templates:["template","iconTemplate"],props:["activeStateEnabled","hoverStateEnabled","icon","iconPosition","onClick","onSubmit","pressed","stylingMode","template","iconTemplate","text","type","useInkRipple","useSubmitBehavior","templateData","className","accessKey","disabled","focusStateEnabled","height","hint","onKeyDown","rtlEnabled","tabIndex","visible","width"]}}get _viewComponent(){return _h}};tt("dxButton",Ii);Ii.defaultOptions=I5;var Vx="dx-custom-button-hovered";class T5 extends Zh{_attachEvents(t,i){var{editor:n}=this;R.on(i,Cg,()=>{n.$element().addClass(Vx)}),R.on(i,Gh,()=>{n.$element().removeClass(Vx)}),R.on(i,vt,r=>{r.stopPropagation()})}_create(){var{editor:t}=this,i=v("<div>");this._addToContainer(i);var n=t._createComponent(i,Ii,k({},this.options,{ignoreParentReadOnly:!0,disabled:this._isDisabled(),integrationOptions:this._prepareIntegrationOptions(t)}));return{$element:i,instance:n}}_prepareIntegrationOptions(t){return k({},t.option("integrationOptions"),{skipTemplates:["content"]})}update(){var t=super.update();return this.instance&&this.instance.option("disabled",this._isDisabled()),t}_isVisible(){var{editor:t}=this;return t.option("visible")}_isDisabled(){var t=this.options.disabled!==void 0;return t?this.instance?this.instance.option("disabled"):this.options.disabled:this.editor.option("readOnly")}}var A5="dx-texteditor-buttons-container";function D5(e){(()=>{if(!e||typeof e!="object"||Array.isArray(e))throw Qe.Error("E1053")})(),(()=>{if(!("name"in e))throw Qe.Error("E1054")})(),(()=>{var{name:t}=e;if(typeof t!="string")throw Qe.Error("E1055")})(),(()=>{var{location:t}=e;"location"in e&&t!=="after"&&t!=="before"&&(e.location="after")})()}function Nx(e,t){if(e.indexOf(t)!==-1)throw Qe.Error("E1055",t);e.push(t)}function O5(e,t){return!!t.find(i=>i.name===e)}class R5{constructor(t,i){this.buttons=[],this.defaultButtonsInfo=i,this.editor=t}_compileButtonInfo(t){var i=[];return t.map(n=>{var r=typeof n=="string";r||D5(n);var a=r||O5(n.name,this.defaultButtonsInfo);if(a){var o=this.defaultButtonsInfo.find(l=>{var{name:u}=l;return u===n||u===n.name});if(!o)throw Qe.Error("E1056",this.editor.NAME,n);return Nx(i,n),o}else{var{name:s}=n;return Nx(i,s),k(n,{Ctor:T5})}})}_createButton(t){var{Ctor:i,options:n,name:r}=t,a=new i(r,this.editor,n);return this.buttons.push(a),a}_renderButtons(t,i,n){var r=null,a=t?this._compileButtonInfo(t):this.defaultButtonsInfo;return a.forEach(o=>{var{location:s="after"}=o;s===n&&this._createButton(o).render((r=r||v("<div>").addClass(A5),n==="before"?i.prepend(r):i.append(r),r))}),r}clean(){this.buttons.forEach(t=>t.dispose()),this.buttons=[]}getButton(t){var i=this.buttons.find(n=>{var{name:r}=n;return r===t});return i&&i.instance}renderAfterButtons(t,i){return this._renderButtons(t,i,"after")}renderBeforeButtons(t,i){return this._renderButtons(t,i,"before")}updateButtons(t){this.buttons.forEach(i=>{(!t||t.indexOf(i.name)!==-1)&&i.update()})}}var $x="dx-texteditor-label",Hx="dx-texteditor-with-label",Wx="dx-texteditor-with-floating-label",zx="dx-texteditor-with-before-buttons",k5="dx-label-before",B5="dx-label",L5="dx-label-after";class P5{constructor(t){var{$editor:i,text:n,mode:r,mark:a,containsButtonsBefore:o,containerWidth:s,beforeWidth:l}=t;this._props={$editor:i,text:n,mode:r,mark:a,containsButtonsBefore:o,containerWidth:s,beforeWidth:l},this._id="".concat($x,"-").concat(new si),this._render(),this._toggleMarkupVisibility()}_isVisible(){return!!this._props.text&&this._props.mode!=="hidden"}_render(){this._$before=v("<div>").addClass(k5),this._$labelSpan=v("<span>"),this._$label=v("<div>").addClass(B5).append(this._$labelSpan),this._$after=v("<div>").addClass(L5),this._$root=v("<div>").addClass($x).attr("id",this._id).append(this._$before).append(this._$label).append(this._$after),this._updateMark(),this._updateText(),this._updateBeforeWidth(),this._updateMaxWidth()}_toggleMarkupVisibility(){var t=this._isVisible();this._updateEditorBeforeButtonsClass(t),this._updateEditorLabelClass(t),t?this._$root.appendTo(this._props.$editor):this._$root.detach()}_updateEditorLabelClass(t){if(this._props.$editor.removeClass(Wx).removeClass(Hx),t){var i=this._props.mode==="floating"?Wx:Hx;this._props.$editor.addClass(i)}}_updateEditorBeforeButtonsClass(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._isVisible();if(this._props.$editor.removeClass(zx),t){var i=this._props.containsButtonsBefore?zx:"";this._props.$editor.addClass(i)}}_updateMark(){this._$labelSpan.attr("data-mark",this._props.mark)}_updateText(){this._$labelSpan.text(this._props.text)}_updateBeforeWidth(){this._$before.css({width:this._props.beforeWidth})}_updateMaxWidth(){this._$label.css({maxWidth:this._props.containerWidth})}$element(){return this._$root}isVisible(){return this._isVisible()}getId(){if(this._isVisible())return this._id}updateMode(t){this._props.mode=t,this._toggleMarkupVisibility()}updateText(t){this._props.text=t,this._updateText(),this._toggleMarkupVisibility()}updateMark(t){this._props.mark=t,this._updateMark()}updateContainsButtonsBefore(t){this._props.containsButtonsBefore=t,this._updateEditorBeforeButtonsClass()}updateBeforeWidth(t){this._props.beforeWidth=t,this._updateBeforeWidth()}updateMaxWidth(t){this._props.containerWidth=t,this._updateMaxWidth()}}var Gx=je(),F5={observe:re,unobserve:re,disconnect:re};class M5{constructor(){if(!Ue()||!Gx.ResizeObserver)return F5;this._callbacksMap=new Map,this._observer=new Gx.ResizeObserver(t=>{t.forEach(i=>{var n;(n=this._callbacksMap.get(i.target))===null||n===void 0||n(i)})})}observe(t,i){this._callbacksMap.set(t,i),this._observer.observe(t)}unobserve(t){this._callbacksMap.delete(t),this._observer.unobserve(t)}disconnect(){this._callbacksMap.clear(),this._observer.disconnect()}}var mh=new M5,V5="dx-texteditor",N5="dx-texteditor-input-container",xO="dx-texteditor-input",$5="."+xO,H5="dx-texteditor-container",W5="dx-texteditor-buttons-container",Ux="dx-placeholder",z5="dx-texteditor-empty",G5="dx-state-invisible",U5="dx-pending-indicator",Kx="dx-validation-pending",K5="dx-valid",kd=["KeyDown","KeyPress","KeyUp","Change","Cut","Copy","Paste","Input"],j5=["tab","enter","shift","control","alt","escape","pageUp","pageDown","end","home","leftArrow","upArrow","rightArrow","downArrow"],q5=P5;function jx(e){if(E(e)&&!Array.isArray(e))throw Qe.Error("E1053")}var Y5=Yn.inherit({ctor:function(e,t){t&&jx(t.buttons),this._buttonCollection=new R5(this,this._getDefaultButtons()),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._labelContainerElement=null,this.callBase.apply(this,arguments)},_getDefaultOptions:function(){return k(this.callBase(),{buttons:void 0,value:"",spellcheck:!1,showClearButton:!1,valueChangeEvent:"change",placeholder:"",inputAttr:{},onFocusIn:null,onFocusOut:null,onKeyDown:null,onKeyUp:null,onChange:null,onInput:null,onCut:null,onCopy:null,onPaste:null,onEnterKey:null,mode:"text",hoverStateEnabled:!0,focusStateEnabled:!0,text:void 0,displayValueFormatter:function(e){return E(e)&&e!==!1?e:""},stylingMode:At().editorStylingMode||"outlined",showValidationMark:!0,label:"",labelMode:"static",labelMark:""})},_defaultOptionsRules:function(){var e=Xn();return this.callBase().concat([{device:function(){return ei(e)},options:{stylingMode:At().editorStylingMode||"filled",labelMode:"floating"}}])},_getDefaultButtons:function(){return[{name:"clear",Ctor:C6}]},_isClearButtonVisible:function(){return this.option("showClearButton")&&!this.option("readOnly")},_input:function(){return this.$element().find($5).first()},_isFocused:function(){return ba(this._input())||this.callBase()},_inputWrapper:function(){return this.$element()},_buttonsContainer:function(){return this._inputWrapper().find("."+W5).eq(0)},_isControlKey:function(e){return j5.indexOf(e)!==-1},_renderStylingMode:function(){this.callBase(),this._updateButtonsStyling(this.option("stylingMode"))},_initMarkup:function(){this.$element().addClass(V5),this._renderInput(),this._renderStylingMode(),this._renderInputType(),this._renderPlaceholder(),this._renderProps(),this.callBase(),this._renderValue(),this._renderLabel()},_render:function(){this.callBase(),this._refreshValueChangeEvent(),this._renderEvents(),this._renderEnterKeyAction(),this._renderEmptinessEvent()},_renderInput:function(){this._$buttonsContainer=this._$textEditorContainer=v("<div>").addClass(H5).appendTo(this.$element()),this._$textEditorInputContainer=v("<div>").addClass(N5).appendTo(this._$textEditorContainer),this._$textEditorInputContainer.append(this._createInput()),this._renderButtonContainers()},_getInputContainer(){return this._$textEditorInputContainer},_renderPendingIndicator:function(){this.$element().addClass(Kx);var e=this._getInputContainer(),t=v("<div>").addClass(U5).appendTo(e);this._pendingIndicator=this._createComponent(t,vn)},_disposePendingIndicator:function(){this._pendingIndicator&&(this._pendingIndicator.dispose(),this._pendingIndicator.$element().remove(),this._pendingIndicator=null,this.$element().removeClass(Kx))},_renderValidationState:function(){this.callBase();var e=this.option("validationStatus")==="pending",t=this.$element();e?(!this._pendingIndicator&&this._renderPendingIndicator(),this._showValidMark=!1):(this.option("validationStatus")==="invalid"&&(this._showValidMark=!1),!this._showValidMark&&this.option("showValidationMark")===!0&&(this._showValidMark=this.option("validationStatus")==="valid"&&!!this._pendingIndicator),this._disposePendingIndicator()),t.toggleClass(K5,!!this._showValidMark)},_renderButtonContainers:function(){var e=this.option("buttons");this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(e,this._$buttonsContainer),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(e,this._$buttonsContainer)},_cleanButtonContainers:function(){var e,t;(e=this._$beforeButtonsContainer)===null||e===void 0||e.remove(),(t=this._$afterButtonsContainer)===null||t===void 0||t.remove(),this._buttonCollection.clean()},_clean(){this._buttonCollection.clean(),this._disposePendingIndicator(),this._unobserveLabelContainerResize(),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._$textEditorContainer=null,this._$buttonsContainer=null,this.callBase()},_createInput:function(){var e=v("<input>");return this._applyInputAttributes(e,this.option("inputAttr")),e},_setSubmitElementName:function(e){var t=this.option("inputAttr.name");return this.callBase(e||t||"")},_applyInputAttributes:function(e,t){var i=k(this._getDefaultAttributes(),t);e.attr(i).addClass(xO).css("minHeight",this.option("height")?"0":"")},_getDefaultAttributes:function(){var e={autocomplete:"off"},{ios:t,mac:i}=Re.real();return(t||i)&&(e.placeholder=" "),e},_updateButtons:function(e){this._buttonCollection.updateButtons(e)},_updateButtonsStyling:function(e){V(this.option("buttons"),(t,i)=>{var{options:n,name:r}=i;if(n&&!n.stylingMode&&this.option("visible")){var a=this.getButton(r);a.option&&a.option("stylingMode",e==="underlined"?"text":"contained")}})},_renderValue:function(){var e=this._renderInputValue();return e.promise()},_renderInputValue:function(e){var t;e=(t=e)!==null&&t!==void 0?t:this.option("value");var i=this.option("text"),n=this.option("displayValue"),r=this.option("displayValueFormatter");return n!==void 0&&e!==null?i=r(n):E(i)||(i=r(e)),this.option("text",i),this._input().val()!==(E(i)?i:"")?this._renderDisplayText(i):this._toggleEmptinessEventHandler(),new se().resolve()},_renderDisplayText:function(e){this._input().val(e),this._toggleEmptinessEventHandler()},_isValueValid:function(){if(this._input().length){var e=this._input().get(0).validity;if(e)return e.valid}return!0},_toggleEmptiness:function(e){this.$element().toggleClass(z5,e),this._togglePlaceholder(e)},_togglePlaceholder:function(e){this.$element().find(".".concat(Ux)).eq(0).toggleClass(G5,!e)},_renderProps:function(){this._toggleReadOnlyState(),this._toggleSpellcheckState(),this._toggleTabIndex()},_toggleDisabledState:function(e){this.callBase.apply(this,arguments);var t=this._input();t.prop("disabled",e)},_toggleTabIndex:function(){var e=this._input(),t=this.option("disabled"),i=this.option("focusStateEnabled");t||!i?e.attr("tabIndex",-1):e.removeAttr("tabIndex")},_toggleReadOnlyState:function(){this._input().prop("readOnly",this._readOnlyPropValue()),this.callBase()},_readOnlyPropValue:function(){return this.option("readOnly")},_toggleSpellcheckState:function(){this._input().prop("spellcheck",this.option("spellcheck"))},_unobserveLabelContainerResize:function(){this._labelContainerElement&&(mh.unobserve(this._labelContainerElement),this._labelContainerElement=null)},_getLabelContainer:function(){return this._input()},_getLabelContainerWidth:function(){return He(this._getLabelContainer())},_getLabelBeforeWidth:function(){var e=this._$beforeButtonsContainer&&He(this._$beforeButtonsContainer);return e??0},_updateLabelWidth:function(){this._label.updateBeforeWidth(this._getLabelBeforeWidth()),this._label.updateMaxWidth(this._getLabelContainerWidth())},_setLabelContainerAria:function(){this.setAria("labelledby",this._label.getId(),this._getLabelContainer())},_renderLabel:function(){this._unobserveLabelContainerResize(),this._labelContainerElement=v(this._getLabelContainer()).get(0);var{label:e,labelMode:t,labelMark:i}=this.option(),n={$editor:this.$element(),text:e,mark:i,mode:t,containsButtonsBefore:!!this._$beforeButtonsContainer,containerWidth:this._getLabelContainerWidth(),beforeWidth:this._getLabelBeforeWidth()};this._label=new q5(n),this._setLabelContainerAria(),this._labelContainerElement&&mh.observe(this._labelContainerElement,this._updateLabelWidth.bind(this))},_renderPlaceholder:function(){this._renderPlaceholderMarkup(),this._attachPlaceholderEvents()},_renderPlaceholderMarkup:function(){this._$placeholder&&(this._$placeholder.remove(),this._$placeholder=null);var e=this._input(),t=this.option("placeholder"),i=this._$placeholder=v("<div>").attr("data-dx_placeholder",t);i.insertAfter(e),i.addClass(Ux)},_attachPlaceholderEvents:function(){var e=ye(lt.up,this.NAME);R.on(this._$placeholder,e,()=>{R.trigger(this._input(),"focus")}),this._toggleEmptinessEventHandler()},_placeholder:function(){return this._$placeholder||v()},_clearValueHandler:function(e){var t=this._input();e.stopPropagation(),this._saveValueChangeEvent(e),this._clearValue(),!this._isFocused()&&R.trigger(t,"focus"),R.trigger(t,"input")},_clearValue:function(){this.reset()},_renderEvents:function(){var e=this._input();V(kd,(t,i)=>{if(this.hasActionSubscription("on"+i)){var n=this._createActionByOption("on"+i,{excludeValidators:["readOnly"]});R.on(e,ye(i.toLowerCase(),this.NAME),r=>{this._disposed||n({event:r})})}})},_refreshEvents:function(){var e=this._input();V(kd,(t,i)=>{R.off(e,ye(i.toLowerCase(),this.NAME))}),this._renderEvents()},_keyPressHandler:function(){this.option("text",this._input().val())},_keyDownHandler:function(e){var t=this._input(),i=e.ctrlKey&&$t(e)==="enter",n=t.val()!==this.option("value");i&&n&&R.trigger(t,"change")},_renderValueChangeEvent:function(){var e=ye(this._renderValueEventName(),"".concat(this.NAME,"TextChange")),t=ye(this.option("valueChangeEvent"),"".concat(this.NAME,"ValueChange")),i=ye("keydown","".concat(this.NAME,"TextChange")),n=this._input();R.on(n,e,this._keyPressHandler.bind(this)),R.on(n,t,this._valueChangeEventHandler.bind(this)),R.on(n,i,this._keyDownHandler.bind(this))},_cleanValueChangeEvent:function(){var e=".".concat(this.NAME,"ValueChange"),t=".".concat(this.NAME,"TextChange");R.off(this._input(),e),R.off(this._input(),t)},_refreshValueChangeEvent:function(){this._cleanValueChangeEvent(),this._renderValueChangeEvent()},_renderValueEventName:function(){return"input change keypress"},_focusTarget:function(){return this._input()},_focusEventTarget:function(){return this.element()},_isInput:function(e){return e===this._input().get(0)},_preventNestedFocusEvent:function(e){if(e.isDefaultPrevented())return!0;var t=this._isNestedTarget(e.relatedTarget);return e.type==="focusin"?t=t&&this._isNestedTarget(e.target)&&!this._isInput(e.target):t||this._toggleFocusClass(!1,this.$element()),t&&e.preventDefault(),t},_isNestedTarget:function(e){return!!this.$element().find(e).length},_focusClassTarget:function(){return this.$element()},_focusInHandler:function(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_focusOutHandler:function(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_toggleFocusClass:function(e,t){this.callBase(e,this._focusClassTarget(t))},_hasFocusClass:function(e){return this.callBase(v(e||this.$element()))},_renderEmptinessEvent:function(){var e=this._input();R.on(e,"input blur",this._toggleEmptinessEventHandler.bind(this))},_toggleEmptinessEventHandler:function(){var e=this._input().val(),t=(e===""||e===null)&&this._isValueValid();this._toggleEmptiness(t)},_valueChangeEventHandler:function(e,t){this.option("readOnly")||(this._saveValueChangeEvent(e),this.option("value",arguments.length>1?t:this._input().val()),this._saveValueChangeEvent(void 0))},_renderEnterKeyAction:function(){this._enterKeyAction=this._createActionByOption("onEnterKey",{excludeValidators:["readOnly"]}),R.off(this._input(),"keyup.onEnterKey.dxTextEditor"),R.on(this._input(),"keyup.onEnterKey.dxTextEditor",this._enterKeyHandlerUp.bind(this))},_enterKeyHandlerUp:function(e){this._disposed||$t(e)==="enter"&&this._enterKeyAction({event:e})},_updateValue:function(){this._options.silent("text",null),this._renderValue()},_dispose:function(){this._enterKeyAction=void 0,this.callBase()},_getSubmitElement:function(){return this._input()},_hasActiveElement:function(){return this._input().is(me.getActiveElement())},_optionChanged:function(e){var{name:t,fullName:i,value:n}=e,r=t.replace("on","");if(kd.includes(r)){this._refreshEvents();return}switch(t){case"valueChangeEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onValueChanged":this._createValueChangeAction();break;case"focusStateEnabled":this.callBase(e),this._toggleTabIndex();break;case"spellcheck":this._toggleSpellcheckState();break;case"mode":this._renderInputType();break;case"onEnterKey":this._renderEnterKeyAction();break;case"placeholder":this._renderPlaceholder();break;case"label":this._label.updateText(n),this._setLabelContainerAria();break;case"labelMark":this._label.updateMark(n);break;case"labelMode":this._label.updateMode(n),this._setLabelContainerAria();break;case"width":this.callBase(e),this._label.updateMaxWidth(this._getLabelContainerWidth());break;case"readOnly":case"disabled":this._updateButtons(),this.callBase(e);break;case"showClearButton":this._updateButtons(["clear"]);break;case"text":break;case"value":this._updateValue(),this.callBase(e);break;case"inputAttr":this._applyInputAttributes(this._input(),this.option(t));break;case"stylingMode":this._renderStylingMode(),this._updateLabelWidth();break;case"buttons":i===t&&jx(n),this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")),this._updateLabelWidth(),this._label.updateContainsButtonsBefore(!!this._$beforeButtonsContainer);break;case"visible":this.callBase(e),n&&this.option("buttons")&&(this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")));break;case"displayValueFormatter":this._invalidate();break;case"showValidationMark":break;default:this.callBase(e)}},_renderInputType:function(){this._setInputType(this.option("mode"))},_setInputType:function(e){var t=this._input();e==="search"&&(e="text");try{t.prop("type",e)}catch{t.prop("type","text")}},getButton(e){return this._buttonCollection.getButton(e)},focus:function(){R.trigger(this._input(),"focus")},reset:function(){this._showValidMark&&(this._showValidMark=!1,this._renderValidationState());var e=this._getDefaultOptions();this.option("value")===e.value?(this._options.silent("text",""),this._renderValue()):this.option("value",e.value)},on:function(e,t){var i=this.callBase(e,t),n=e.charAt(0).toUpperCase()+e.substr(1);return kd.indexOf(n)>=0&&this._refreshEvents(),i}}),wp="dxMask",X5="blur beforedeactivate",Z5=" ";class bO{constructor(t){this.editor=t,this.DIRECTION={FORWARD:"forward",BACKWARD:"backward"},this.NAME=this._getStrategyName()}_getStrategyName(){return"base"}editorOption(){return this.editor.option(...arguments)}editorInput(){return this.editor._input()}editorCaret(t){if(!t)return this.editor._caret();this.editor._caret(t)}getHandler(t){var i=this["_".concat(t,"Handler")]||function(){};return i.bind(this)}attachEvents(){var t=this.editorInput();this.getHandleEventNames().forEach(i=>{var n=ye(i.toLowerCase(),wp);R.on(t,n,this.getEventHandler(i))}),this._attachChangeEventHandlers()}getHandleEventNames(){return["focusIn","focusOut","keyDown","input","paste","cut","drop"]}getEventHandler(t){return this["_".concat(t,"Handler")].bind(this)}detachEvents(){R.off(this.editorInput(),".".concat(wp))}_attachChangeEventHandlers(){this.editorOption("valueChangeEvent").split(" ").includes("change")&&R.on(this.editorInput(),ye(X5,wp),(function(t){this._suppressCaretChanging(this._changeHandler,[t]),this._changeHandler(t)}).bind(this.editor))}_focusInHandler(){if(this.editor._showMaskPlaceholder(),this.editor._direction(this.DIRECTION.FORWARD),!this.editor._isValueEmpty()&&this.editorOption("isValid"))this.editor._adjustCaret();else{var t=this.editor._maskRulesChain.first();this._caretTimeout=setTimeout((function(){this._caret({start:t,end:t})}).bind(this.editor),0)}}_focusOutHandler(t){this.editor._changeHandler(t),this.editorOption("showMaskMode")==="onFocus"&&this.editor._isValueEmpty()&&(this.editorOption("text",""),this.editor._renderDisplayText(""))}_cutHandler(t){var i=this.editorCaret(),n=this.editorInput().val().substring(i.start,i.end);this.editor._maskKeyHandler(t,()=>I_(t,n))}_dropHandler(){this._clearDragTimer(),this._dragTimer=setTimeout((function(){this.option("value",this._convertToValue(this._input().val()))}).bind(this.editor))}_clearDragTimer(){clearTimeout(this._dragTimer)}_keyDownHandler(){this._keyPressHandled=!1}_pasteHandler(t){var{editor:i}=this;this._keyPressHandled=!0;var n=this.editorCaret();i._maskKeyHandler(t,()=>{var r=I_(t),a=i._maskRulesChain.text().substring(n.end),o=i._handleChain({text:r,start:n.start,length:r.length}),s=n.start+o;i._handleChain({text:a,start:s,length:a.length}),i._caret({start:s,end:s})})}_autoFillHandler(t){var{editor:i}=this,n=this.editorInput().val();this._inputHandlerTimer=setTimeout(()=>{this._keyPressHandled=!0,this._isAutoFill()&&(this._keyPressHandled=!0,i._maskKeyHandler(t,()=>{i._handleChain({text:n,start:0,length:n.length})}),i._validateMask())})}_isAutoFill(){var t=this.editor._input(),i=!1;if(Lt.webkit){var n=t.get(0);i=n&&n.matches(":-webkit-autofill")}return i}runWithoutEventProcessing(t){var i=this._keyPressHandled;this._keyPressHandled=!0,t(),this._keyPressHandled=i}_backspaceHandler(){}_delHandler(t){var{editor:i}=this;this._keyPressHandled=!0,i._maskKeyHandler(t,()=>!i._hasSelection()&&i._handleKey(Z5))}clean(){this._clearDragTimer(),clearTimeout(this._backspaceHandlerTimeout),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}}var J5="deleteContentBackward",Q5=" ";class eU extends bO{_getStrategyName(){return"default"}getHandleEventNames(){return[...super.getHandleEventNames(),"keyPress"]}_keyPressHandler(t){if(!this._keyPressHandled&&(this._keyPressHandled=!0,!this.editor._isControlKeyFired(t))){var{editor:i}=this;i._maskKeyHandler(t,()=>i._handleKey(Qc(t)))}}_inputHandler(t){if(this._backspaceInputHandled(t.originalEvent&&t.originalEvent.inputType)&&this._handleBackspaceInput(t),t.originalEvent&&this._autoFillHandler(t),!this._keyPressHandled){this._keyPressHandled=!0;var i=this.editorInput().val(),n=this.editorCaret();if(n.end){n.start=n.end-1;var r=i.substring(0,n.start)+i.substring(n.end),a=i[n.start],{editor:o}=this;this.editorInput().val(r),o._caret({start:n.start,end:n.start}),o._maskKeyHandler(t,()=>o._handleKey(a))}}}_backspaceHandler(t){var{editor:i}=this;this._keyPressHandled=!0;var n=(r,a)=>{r&&(i._direction(this.DIRECTION.FORWARD),i._adjustCaret());var o=this.editorCaret();return new Promise(s=>{clearTimeout(this._backspaceHandlerTimeout),this._backspaceHandlerTimeout=setTimeout(function(){a(o),s()})})};i._maskKeyHandler(t,()=>i._hasSelection()?n(!0,r=>{i._displayMask(r),i._maskRulesChain.reset()}):i._tryMoveCaretBackward()?n(!1,r=>{this.editorCaret(r)}):(i._handleKey(Q5,this.DIRECTION.BACKWARD),n(!0,r=>{i._displayMask(r),i._maskRulesChain.reset()})))}_backspaceInputHandled(t){return t===J5&&!this._keyPressHandled}_handleBackspaceInput(t){var{start:i,end:n}=this.editorCaret();this.editorCaret({start:i+1,end:n+1}),this._backspaceHandler(t)}}var tU="deleteContentBackward";class iU extends bO{_getStrategyName(){return"inputEvents"}getHandleEventNames(){return[...super.getHandleEventNames(),"beforeInput"]}_beforeInputHandler(){this._prevCaret=this.editorCaret()}_inputHandler(t){var{originalEvent:i}=t;if(i){var{inputType:n,data:r}=i,a=this.editorCaret();if(n===tU){var o=this._prevCaret.end-this._prevCaret.start||1;this.editor.setBackwardDirection(),this._updateEditorMask({start:a.start,length:o,text:this._getEmptyString(o)})}else{var s,l,u;if(!a.end)return;this._autoFillHandler(i),this.editorCaret(a);var d=((s=this._prevCaret)===null||s===void 0?void 0:s.end)-((l=this._prevCaret)===null||l===void 0?void 0:l.start),c=r+(d?this._getEmptyString(d-r.length):"");this.editor.setForwardDirection();var h=this._updateEditorMask({start:(u=this._prevCaret)===null||u===void 0?void 0:u.start,length:d||c.length,text:c});h||this.editorCaret(this._prevCaret)}}}_getEmptyString(t){return Array(t+1).join(" ")}_updateEditorMask(t){var i=t.text.length,n=this.editor._handleChain(t);if(this.editor.isForwardDirection()){var{start:r,end:a}=this.editorCaret(),o=n-i;r<=n&&n>1&&this.editorCaret({start:r+o,end:a+o}),this.editor.isForwardDirection()&&this.editor._adjustCaret()}return this.editor._displayMask(),!!n}}var nU=function(){return{}},Bd=BD,qx=" ",rU="\\",Yx="dx-texteditor-masked",Ip="forward",aU="backward",oU={0:/[0-9]/,9:/[0-9\s]/,"#":/[-+0-9\s]/,L:function(e){return Ld(e)},l:function(e){return Ld(e)||Zx(e)},C:/\S/,c:/./,A:function(e){return Ld(e)||Xx(e)},a:function(e){return Ld(e)||Xx(e)||Zx(e)}};function Xx(e){return/[0-9]/.test(e)}function Ld(e){var t=e.charCodeAt();return 64<t&&t<91||96<t&&t<123||t>127}function Zx(e){return e===" "}var uC=Y5.inherit({_getDefaultOptions:function(){return k(this.callBase(),{mask:"",maskChar:"_",maskRules:{},maskInvalidMessage:fe.format("validation-mask"),useMaskedValue:!1,showMaskMode:"always"})},_supportedKeys:function(){var e=this,t={backspace:e._maskStrategy.getHandler("backspace"),del:e._maskStrategy.getHandler("del"),enter:e._changeHandler},i=e.callBase();return V(t,function(n,r){var a=i[n];i[n]=function(o){e.option("mask")&&r.call(e,o),a&&a(o)}}),i},_getSubmitElement:function(){return this.option("mask")?this._$hiddenElement:this.callBase()},_init:function(){this.callBase(),this._initMaskStrategy()},_initMaskStrategy:function(){this._maskStrategy=K3()?new iU(this):new eU(this)},_initMarkup:function(){this._renderHiddenElement(),this.callBase()},_attachMouseWheelEventHandlers:function(){var e=this._onMouseWheel!==re;if(e){var t=this._input(),i=ye($u,this.NAME),n=this._createAction((function(r){var{event:a}=r;ba(t)&&!vi(a)&&(this._onMouseWheel(a),a.preventDefault(),a.stopPropagation())}).bind(this));R.off(t,i),R.on(t,i,function(r){n({event:r})})}},_onMouseWheel:re,_render:function(){this._renderMask(),this.callBase(),this._attachMouseWheelEventHandlers()},_renderHiddenElement:function(){this.option("mask")&&(this._$hiddenElement=v("<input>").attr("type","hidden").appendTo(this._inputWrapper()))},_removeHiddenElement:function(){this._$hiddenElement&&this._$hiddenElement.remove()},_renderMask:function(){this.$element().removeClass(Yx),this._maskRulesChain=null,this._maskStrategy.detachEvents(),this.option("mask")&&(this.$element().addClass(Yx),this._maskStrategy.attachEvents(),this._parseMask(),this._renderMaskedValue())},_suppressCaretChanging:function(e,t){Bd=nU;try{e.apply(this,t)}finally{Bd=BD}},_changeHandler:function(e){var t=this._input(),i=t.val();if(i!==this._changedValue){this._changedValue=i;var n=uo(e,{type:"change"});R.trigger(t,n)}},_parseMask:function(){this._maskRules=k({},oU,this.option("maskRules")),this._maskRulesChain=this._parseMaskRule(0)},_parseMaskRule:function(e){var t=this.option("mask");if(e>=t.length)return new j3;var i=t[e],n=i===rU,r=n?new bx({maskChar:t[e+1]}):this._getMaskRule(i);return r.next(this._parseMaskRule(e+1+n)),r},_getMaskRule:function(e){var t;return V(this._maskRules,function(i,n){if(i===e)return t={pattern:i,allowedChars:n},!1}),E(t)?new PD(k({maskChar:this.option("maskChar")},t)):new bx({maskChar:e})},_renderMaskedValue:function(){if(this._maskRulesChain){var e=this.option("value")||"";this._maskRulesChain.clear(this._normalizeChainArguments());var t={length:e.length};t[this._isMaskedValueMode()?"text":"value"]=e,this._handleChain(t),this._displayMask()}},_replaceSelectedText:function(e,t,i){if(i===void 0)return e;var n=e.slice(0,t.start),r=e.slice(t.end),a=n+i+r;return a},_isMaskedValueMode:function(){return this.option("useMaskedValue")},_displayMask:function(e){e=e||this._caret(),this._renderValue(),this._caret(e)},_isValueEmpty:function(){return Jl(this._value)},_shouldShowMask:function(){var e=this.option("showMaskMode");return e==="onFocus"?ba(this._input())||!this._isValueEmpty():!0},_showMaskPlaceholder:function(){if(this._shouldShowMask()){var e=this._maskRulesChain.text();this.option("text",e),this.option("showMaskMode")==="onFocus"&&this._renderDisplayText(e)}},_renderValue:function(){if(this._maskRulesChain&&(this._showMaskPlaceholder(),this._$hiddenElement)){var e=this._maskRulesChain.value(),t=Jl(e)?"":this._getPreparedValue();this._$hiddenElement.val(t)}return this.callBase()},_getPreparedValue:function(){return this._convertToValue().replace(/\s+$/,"")},_valueChangeEventHandler:function(e){if(!this._maskRulesChain){this.callBase.apply(this,arguments);return}this._saveValueChangeEvent(e),this.option("value",this._getPreparedValue())},_isControlKeyFired:function(e){return this._isControlKey($t(e))||vi(e)},_handleChain:function(e){var t=this._maskRulesChain.handle(this._normalizeChainArguments(e));return this._value=this._maskRulesChain.value(),this._textValue=this._maskRulesChain.text(),t},_normalizeChainArguments:function(e){return e=e||{},e.index=0,e.fullText=this._maskRulesChain.text(),e},_convertToValue:function(e){return this._isMaskedValueMode()?e=this._replaceMaskCharWithEmpty(e||this._textValue||""):e=e||this._value||"",e},_replaceMaskCharWithEmpty:function(e){return e.replace(new RegExp(this.option("maskChar"),"g"),qx)},_maskKeyHandler:function(e,t){if(!this.option("readOnly")){this.setForwardDirection(),e.preventDefault(),this._handleSelection();var i=this._input().val(),n=()=>{i!==this._input().val()&&this._maskStrategy.runWithoutEventProcessing(()=>R.trigger(this._input(),"input"))},r=t();r?r.then(n):(this.setForwardDirection(),this._adjustCaret(),this._displayMask(),this._maskRulesChain.reset(),n())}},_handleKey:function(e,t){this._direction(t||Ip),this._adjustCaret(e),this._handleKeyChain(e),this._moveCaret()},_handleSelection:function(){if(this._hasSelection()){var e=this._caret(),t=new Array(e.end-e.start+1).join(qx);this._handleKeyChain(t)}},_handleKeyChain:function(e){var t=this._caret(),i=this.isForwardDirection()?t.start:t.start-1,n=this.isForwardDirection()?t.end:t.end-1,r=i===n?1:n-i;this._handleChain({text:e,start:i,length:r})},_tryMoveCaretBackward:function(){this.setBackwardDirection();var e=this._caret().start;return this._adjustCaret(),!e||e!==this._caret().start},_adjustCaret:function(e){var t=this._caret().start,i=this.isForwardDirection(),n=this._maskRulesChain.adjustedCaret(t,i,e);this._caret({start:n,end:n})},_moveCaret:function(){var e=this._caret().start,t=e+(this.isForwardDirection()?0:-1),i=this._maskRulesChain.isAccepted(t)?e+(this.isForwardDirection()?1:-1):e;this._caret({start:i,end:i})},_caret:function(e,t){var i=this._input();if(i.length){if(!arguments.length)return Bd(i);Bd(i,e,t)}},_hasSelection:function(){var e=this._caret();return e.start!==e.end},_direction:function(e){if(!arguments.length)return this._typingDirection;this._typingDirection=e},setForwardDirection:function(){this._direction(Ip)},setBackwardDirection:function(){this._direction(aU)},isForwardDirection:function(){return this._direction()===Ip},_clean:function(){this._maskStrategy&&this._maskStrategy.clean(),this.callBase()},_validateMask:function(){if(this._maskRulesChain){var e=Jl(this.option("value"))||this._maskRulesChain.isValid(this._normalizeChainArguments());this.option({isValid:e,validationError:e?null:{editorSpecific:!0,message:this.option("maskInvalidMessage")}})}},_updateHiddenElement:function(){this._removeHiddenElement(),this.option("mask")&&(this._input().removeAttr("name"),this._renderHiddenElement()),this._setSubmitElementName(this.option("name"))},_updateMaskOption:function(){this._updateHiddenElement(),this._renderMask(),this._validateMask()},_processEmptyMask:function(e){if(!e){var t=this.option("value");this.option({text:t,isValid:!0}),this.validationRequest.fire({value:t,editor:this}),this._renderValue()}},_optionChanged:function(e){switch(e.name){case"mask":this._updateMaskOption(),this._processEmptyMask(e.value);break;case"maskChar":case"maskRules":case"useMaskedValue":this._updateMaskOption();break;case"value":this._renderMaskedValue(),this._validateMask(),this.callBase(e),this._changedValue=this._input().val();break;case"maskInvalidMessage":break;case"showMaskMode":this.option("text",""),this._renderValue();break;default:this.callBase(e)}}});tt("dxTextEditor",uC);var sU=je(),lU=["backspace","tab","enter","pageUp","pageDown","end","home","leftArrow","rightArrow","downArrow","upArrow","del"],uU="dx-textbox",Jx="dx-searchbox",dU="dx-icon",cU="dx-icon-search",ld=uC.inherit({ctor:function(e,t){t&&(this._showClearButton=t.showClearButton),this.callBase.apply(this,arguments)},_getDefaultOptions:function(){return k(this.callBase(),{value:"",mode:"text",maxLength:null})},_initMarkup:function(){this.$element().addClass(uU),this.callBase(),this.setAria("role","textbox")},_renderInputType:function(){this.callBase(),this._renderSearchMode()},_useTemplates:function(){return!1},_renderProps:function(){this.callBase(),this._toggleMaxLengthProp()},_toggleMaxLengthProp:function(){var e=this._getMaxLength();e&&e>0?this._input().attr("maxLength",e):this._input().removeAttr("maxLength")},_renderSearchMode:function(){var e=this._$element;this.option("mode")==="search"?(e.addClass(Jx),this._renderSearchIcon(),this._showClearButton===void 0&&(this._showClearButton=this.option("showClearButton"),this.option("showClearButton",!0))):(e.removeClass(Jx),this._$searchIcon&&this._$searchIcon.remove(),this.option("showClearButton",this._showClearButton===void 0?this.option("showClearButton"):this._showClearButton),delete this._showClearButton)},_renderSearchIcon:function(){var e=v("<div>").addClass(dU).addClass(cU);e.prependTo(this._input().parent()),this._$searchIcon=e},_getLabelContainerWidth:function(){if(this._$searchIcon){var e=this._input().parent();return He(e)-this._getLabelBeforeWidth()}return this.callBase()},_getLabelBeforeWidth:function(){var e=this.callBase();return this._$searchIcon&&(e+=ot(this._$searchIcon)),e},_optionChanged:function(e){switch(e.name){case"maxLength":this._toggleMaxLengthProp();break;case"mode":this.callBase(e),this._updateLabelWidth();break;case"mask":this.callBase(e),this._toggleMaxLengthProp();break;default:this.callBase(e)}},_onKeyDownCutOffHandler:function(e){var t=this._getMaxLength();if(t&&!e.ctrlKey&&!this._hasSelection()){var i=v(e.target),n=$t(e);return this._cutOffExtraChar(i),i.val().length<t||lU.includes(n)||sU.getSelection().toString()!==""}else return!0},_onChangeCutOffHandler:function(e){var t=v(e.target);this.option("maxLength")&&this._cutOffExtraChar(t)},_cutOffExtraChar:function(e){var t=this._getMaxLength(),i=e.val();t&&i.length>t&&e.val(i.substr(0,t))},_getMaxLength:function(){var e=!!this.option("mask");return e?null:this.option("maxLength")}});tt("dxTextBox",ld);var hU=it.inherit({ctor:function(){this._dataStructure=[],this._itemsCount=0,this._visibleItemsCount=0},_indexByKey:{},_convertItemsToNodes:function(e,t){var i=this;V(e,function(n,r){var a=E(t)?t:i._getParentId(r),o=i._convertItemToNode(r,a);i._dataStructure.push(o),i._checkForDuplicateId(o.internalFields.key),i._indexByKey[o.internalFields.key]=i._dataStructure.length-1,i._itemHasChildren(r)&&i._convertItemsToNodes(i._dataAccessors.getters.items(r),o.internalFields.key)})},_checkForDuplicateId:function(e){if(E(this._indexByKey[e]))throw Qe.Error("E1040",e)},_getParentId:function(e){return this._dataType==="plain"?this._dataAccessors.getters.parentKey(e):void 0},_itemHasChildren:function(e){if(this._dataType!=="plain"){var t=this._dataAccessors.getters.items(e);return t&&t.length}},_getUniqueKey:function(e){var t=this._dataAccessors.getters.key,i=t(e),n=t&&(i||i===0)&&Zl(i);return n?i:this.getItemsCount()},_convertItemToNode:function(e,t){this._itemsCount++,e.visible!==!1&&this._visibleItemsCount++;var i={internalFields:{disabled:this._dataAccessors.getters.disabled(e,{defaultValue:!1}),expanded:this._dataAccessors.getters.expanded(e,{defaultValue:!1}),selected:this._dataAccessors.getters.selected(e,{defaultValue:!1}),key:this._getUniqueKey(e),parentKey:E(t)?t:this._rootValue,item:this._makeObjectFromPrimitive(e),childrenKeys:[]}};return k(i,e),delete i.items,i},setChildrenKeys:function(){var e=this;V(this._dataStructure,function(t,i){if(i.internalFields.parentKey!==e._rootValue){var n=e.getParentNode(i);n&&n.internalFields.childrenKeys.push(i.internalFields.key)}})},_makeObjectFromPrimitive:function(e){if(Zl(e)){var t=e;e={},this._dataAccessors.setters.key(e,t)}return e},_convertToPublicNode:function(e,t){if(!e)return null;var i={text:this._dataAccessors.getters.display(e),key:e.internalFields.key,selected:e.internalFields.selected,expanded:e.internalFields.expanded,disabled:e.internalFields.disabled,parent:t||null,itemData:e.internalFields.item,children:[],items:[]};return i.parent&&(i.parent.children.push(i),i.parent.items.push(i)),i},convertToPublicNodes:function(e,t){if(!e.length)return[];var i=this,n=[];return V(e,function(r,a){a=Zl(a)?i._getByKey(a):a;var o=i._convertToPublicNode(a,t);o.children=i.convertToPublicNodes(a.internalFields.childrenKeys,o),n.push(o),a.internalFields.publicNode=o}),n},setDataAccessors:function(e){this._dataAccessors=e},_getByKey:function(e){return this._dataStructure[this.getIndexByKey(e)]||null},getParentNode:function(e){return this._getByKey(e.internalFields.parentKey)},getByKey:function(e,t){if(t==null)return null;var i=null,n=this,r=function(a,o){return V(a,function(s,l){var u=l.internalFields&&l.internalFields.key||n._dataAccessors.getters.key(l);if(u.toString()===o.toString())return i=l,!1}),i};return r(e,t)},getItemsCount:function(){return this._itemsCount},getVisibleItemsCount:function(){return this._visibleItemsCount},updateIndexByKey:function(){var e=this;this._indexByKey={},V(this._dataStructure,function(t,i){e._checkForDuplicateId(i.internalFields.key),e._indexByKey[i.internalFields.key]=t})},updateChildrenKeys:function(){this._indexByKey={},this.removeChildrenKeys(),this.updateIndexByKey(),this.setChildrenKeys()},removeChildrenKeys:function(){this._indexByKey={},V(this._dataStructure,function(e,t){t.internalFields.childrenKeys=[]})},getIndexByKey:function(e){return this._indexByKey[e]},createPlainStructure:function(e,t,i){return this._itemsCount=0,this._visibleItemsCount=0,this._rootValue=t,this._dataType=i,this._indexByKey={},this._convertItemsToNodes(e),this.setChildrenKeys(),this._dataStructure}}),ns="expanded",Wa="selected",fU="disabled";Eo.setEditorClass(ld);var pU=it.inherit({ctor:function(e){this.options={},k(this.options,this._defaultOptions(),e),this.options.dataConverter.setDataAccessors(this.options.dataAccessors),this._selectedNodesKeys=[],this._expandedNodesKeys=[],this._dataStructure=[],this._createInternalDataStructure(),this.getTreeNodes()},setOption:function(e,t){this.options[e]=t,e==="recursiveSelection"&&this._updateSelection()},_defaultOptions:function(){return{dataAccessors:void 0,items:[],multipleSelection:!0,recursiveSelection:!1,recursiveExpansion:!1,rootValue:0,searchValue:"",dataType:"tree",searchMode:"contains",dataConverter:new hU,onNodeChanged:re,sort:null}},_createInternalDataStructure:function(){this._initialDataStructure=this.options.dataConverter.createPlainStructure(this.options.items,this.options.rootValue,this.options.dataType),this._dataStructure=this.options.searchValue.length?this.search(this.options.searchValue):this._initialDataStructure,this.options.dataConverter._dataStructure=this._dataStructure,this._updateSelection(),this._updateExpansion()},_updateSelection:function(){this.options.recursiveSelection&&(this._setChildrenSelection(),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Wa)},_updateExpansion:function(e){this.options.recursiveExpansion&&(e?this._updateOneBranch(e):this._setParentExpansion()),this._expandedNodesKeys=this._updateNodesKeysArray(ns)},_updateNodesKeysArray:function(e){var t=this,i=[];return V(t._getDataBySelectionMode(),function(n,r){t._isNodeVisible(r)&&r.internalFields[e]&&(e===ns||t.options.multipleSelection?i.push(r.internalFields.key):(i.length&&t.toggleSelection(i[0],!1,!0),i=[r.internalFields.key]))}),i},_getDataBySelectionMode:function(){return this.options.multipleSelection?this.getData():this.getFullData()},_isNodeVisible:function(e){return e.internalFields.item.visible!==!1},_getByKey:function(e,t){return e===this._dataStructure?this.options.dataConverter._getByKey(t):this.options.dataConverter.getByKey(e,t)},_setChildrenSelection:function(){var e=this;V(this._dataStructure,function(t,i){if(i.internalFields.childrenKeys.length){var n=i.internalFields.selected;n===!0&&e._toggleChildrenSelection(i,n)}})},_setParentSelection:function(){var e=this;V(this._dataStructure,function(t,i){var n=e.options.dataConverter.getParentNode(i);n&&i.internalFields.parentKey!==e.options.rootValue&&e._iterateParents(i,function(r){var a=e._calculateSelectedState(r);e._setFieldState(r,Wa,a)})})},_setParentExpansion:function(){var e=this;V(this._dataStructure,function(t,i){i.internalFields.expanded&&e._updateOneBranch(i.internalFields.key)})},_updateOneBranch:function(e){var t=this,i=this.getNodeByKey(e);t._iterateParents(i,function(n){t._setFieldState(n,ns,!0)})},_iterateChildren:function(e,t,i,n){if(Ie(i)){var r=this,a=e.internalFields.key;n=n||[],n.indexOf(a)===-1&&(n.push(a),V(e.internalFields.childrenKeys,function(o,s){var l=r.getNodeByKey(s);i(l),l.internalFields.childrenKeys.length&&t&&r._iterateChildren(l,t,i,n)}))}},_iterateParents:function(e,t,i){if(!(e.internalFields.parentKey===this.options.rootValue||!Ie(t))){i=i||[];var n=e.internalFields.key;if(i.indexOf(n)===-1){i.push(n);var r=this.options.dataConverter.getParentNode(e);r&&(t(r),r.internalFields.parentKey!==this.options.rootValue&&this._iterateParents(r,t,i))}}},_calculateSelectedState:function(e){for(var t=e.internalFields.childrenKeys.length,i=0,n=0,r=!1,a=0;a<=t-1;a++){var o=this.getNodeByKey(e.internalFields.childrenKeys[a]),s=o.internalFields.item.visible===!1,l=o.internalFields.selected;if(s){n++;continue}l?i++:l===void 0&&(i+=.5)}return i&&(r=i===t-n?!0:void 0),r},_toggleChildrenSelection:function(e,t){var i=this;this._iterateChildren(e,!0,function(n){i._isNodeVisible(n)&&i._setFieldState(n,Wa,t)})},_setFieldState:function(e,t,i){e.internalFields[t]!==i&&(e.internalFields[t]=i,e.internalFields.publicNode&&(e.internalFields.publicNode[t]=i),this.options.dataAccessors.setters[t](e.internalFields.item,i),this.options.onNodeChanged(e))},_markChildren:function(e){var t=this;V(e,function(i,n){var r=t.getIndexByKey(n),a=t.getNodeByKey(n);t._dataStructure[r]=0,a.internalFields.childrenKeys.length&&t._markChildren(a.internalFields.childrenKeys)})},_removeNode:function(e){var t=this.getNodeByKey(e);this._dataStructure[this.getIndexByKey(e)]=0,this._markChildren(t.internalFields.childrenKeys);var i=this,n=0,r=k([],this._dataStructure);V(r,function(a,o){o||(i._dataStructure.splice(a-n,1),n++)})},_addNode:function(e){var t=this.options.dataConverter,i=t._convertItemToNode(e,this.options.dataAccessors.getters.parentKey(e));this._dataStructure=this._dataStructure.concat(i),this._initialDataStructure=this._initialDataStructure.concat(i),t._dataStructure=t._dataStructure.concat(i)},_updateFields:function(){this.options.dataConverter.updateChildrenKeys(),this._updateSelection(),this._updateExpansion()},getSelectedNodesKeys:function(){return this._selectedNodesKeys},getExpandedNodesKeys:function(){return this._expandedNodesKeys},getData:function(){return this._dataStructure},getFullData:function(){return this._initialDataStructure},getNodeByItem:function(e){var t=null;return V(this._dataStructure,function(i,n){if(n.internalFields.item===e)return t=n,!1}),t},getNodesByItems:function(e){var t=this,i=[];return V(e,function(n,r){var a=t.getNodeByItem(r);a&&i.push(a)}),i},getNodeByKey:function(e,t){return this._getByKey(t||this._getDataBySelectionMode(),e)},getTreeNodes:function(){return this.options.dataConverter.convertToPublicNodes(this.getRootNodes())},getItemsCount:function(){return this.options.dataConverter.getItemsCount()},getVisibleItemsCount:function(){return this.options.dataConverter.getVisibleItemsCount()},getPublicNode:function(e){return e.internalFields.publicNode},getRootNodes:function(){return this.getChildrenNodes(this.options.rootValue)},getChildrenNodes:function(e){return Yi(this._dataStructure).filter(["internalFields.parentKey",e]).toArray()},getIndexByKey:function(e){return this.options.dataConverter.getIndexByKey(e)},addItem:function(e){this._addNode(e),this._updateFields()},removeItem:function(e){this._removeNode(e),this._updateFields()},toggleSelection:function(e,t,i){var n=this._isSingleModeUnselect(t),r=this._getByKey(i||n?this._initialDataStructure:this._dataStructure,e);this._setFieldState(r,Wa,t),this.options.recursiveSelection&&!i&&(t?this._setChildrenSelection():this._toggleChildrenSelection(r,t),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Wa)},_isSingleModeUnselect:function(e){return!this.options.multipleSelection&&!e},toggleNodeDisabledState:function(e,t){var i=this.getNodeByKey(e);this._setFieldState(i,fU,t)},toggleSelectAll:function(e){if(E(e)){var t=this,i=t._selectedNodesKeys[t._selectedNodesKeys.length-1],n=t._isSingleModeUnselect(e)?this._initialDataStructure:this._dataStructure;V(n,function(r,a){t._isNodeVisible(a)&&t._setFieldState(a,Wa,e)}),t._selectedNodesKeys=t._updateNodesKeysArray(Wa),!e&&t.options.selectionRequired&&t.toggleSelection(i,!0)}},isAllSelected:function(){return this.getSelectedNodesKeys().length?this.getSelectedNodesKeys().length===this.getVisibleItemsCount()?!0:void 0:!1},toggleExpansion:function(e,t){var i=this.getNodeByKey(e);this._setFieldState(i,ns,t),t&&this._updateExpansion(e),this._expandedNodesKeys=this._updateNodesKeysArray(ns)},isFiltered:function(e){return!this.options.searchValue.length||!!this._filterDataStructure(this.options.searchValue,[e]).length},_createCriteria:function(e,t,i){var n=[];return Array.isArray(e)?(V(e,function(r,a){n.push([a,i,t],"or")}),n.pop(),n):[e,i,t]},_filterDataStructure:function(e,t){var i=this.options.searchExpr||this.options.dataAccessors.getters.display,n=Eo.getOperationBySearchMode(this.options.searchMode),r=this._createCriteria(i,e,n);return t=t||this._initialDataStructure,Yi(t).filter(r).toArray()},search:function(e){var t=this,i=this._filterDataStructure(e),n=this.options.dataConverter;return function r(a,o){for(var s=a.length;o<s;){var l=a[o];if(l.internalFields.parentKey===t.options.rootValue){o++;continue}var u=n.getParentNode(l);if(!u){Qe.log("W1007",l.internalFields.parentKey,l.internalFields.key),o++;continue}if(u.internalFields.expanded||t._setFieldState(u,ns,!0),a.includes(u)){o++;continue}a.splice(o,0,u),r(a,o)}}(i,0),this.options.sort&&(i=qr.queryByOptions(Yi(i),{sort:this.options.sort}).toArray()),n._indexByKey={},V(i,function(r,a){a.internalFields.childrenKeys=[],n._indexByKey[a.internalFields.key]=r}),n._dataStructure=i,n.setChildrenKeys(),n._dataStructure}}),vU="dx-state-invisible",_U="dx-state-disabled",mU="dx-item-content-placeholder",gU=function(e,t,i){var n=function(a){r!==a&&(i(a,r),r=a)},r;return{dispose:e(t,n),force:function(){n(t())}}},Lo=it.inherit({ctor:function(e,t,i){this._$element=e,this._options=t,this._rawData=i,rT(e,this,this._dispose),this._render()},_render:function(){var e=v("<div>").addClass(mU);this._$element.append(e),this._watchers=[],this._renderWatchers()},_renderWatchers:function(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher:function(e,t){var i=this._rawData,n=this._options.fieldGetter(e),r=gU(this._options.watchMethod(),function(){return n(i)},(function(a,o){this._dirty=!0,t(a,o)}).bind(this));this._watchers.push(r)},setDataField:function(){if(this._dirty=!1,V(this._watchers,function(e,t){t.force()}),this._dirty)return!0},_renderDisabled:function(e,t){this._$element.toggleClass(_U,!!e),this._updateOwnerFocus(e)},_updateOwnerFocus:function(e){var t=this._options.owner;t&&e&&t._resetItemFocus(this._$element)},_renderVisible:function(e,t){this._$element.toggleClass(vU,e!==void 0&&!e)},_dispose:function(){V(this._watchers,function(e,t){t.dispose()})}});Lo.getInstance=function(e){return aT(e,this)};var Qx=Math.abs,dC="dxhold",CU=750,eb=5,yU=zh.inherit({start:function(e){this._startEventData=Gt(e),this._startTimer(e)},_startTimer:function(e){var t="timeout"in this?this.timeout:CU;this._holdTimer=setTimeout((function(){this._requestAccept(e),this._fireEvent(dC,e,{target:e.target}),this._forgetAccept()}).bind(this),t)},move:function(e){this._touchWasMoved(e)&&this._cancel(e)},_touchWasMoved:function(e){var t=to(this._startEventData,Gt(e));return Qx(t.x)>eb||Qx(t.y)>eb},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()},dispose:function(){this._stopTimer()}});Js({emitter:yU,bubble:!0,events:[dC]});const Ea={name:dC};var cC="dxContexMenu",xU=ye("contextmenu",cC),bU=ye(Ea.name,cC),hC="dxcontextmenu",SU=it.inherit({setup:function(e){var t=v(e);R.on(t,xU,this._contextMenuHandler.bind(this)),(go||Re.isSimulator())&&R.on(t,bU,this._holdHandler.bind(this))},_holdHandler:function(e){mo(e)&&!Re.isSimulator()||this._fireContextMenu(e)},_contextMenuHandler:function(e){this._fireContextMenu(e)},_fireContextMenu:function(e){return Da({type:hC,originalEvent:e})},teardown:function(e){R.off(e,"."+cC)}});Mn(hC,new SU);var SO=hC,EU=function(e,t,i,n,r){var a,o=((s,l,u)=>l(()=>s,u))(e,t,function(s){if(a&&a(),Zl(s)){r(s);return}a=function(l,u,d,c,h){var f={},p=d.slice(),m=d.map(function(g){var C=c[g];return u(C?()=>C(l):()=>l[g],function(b){if(f[g]=b,p.length){var A=p.indexOf(g);A>=0&&p.splice(A,1)}p.length||h(f)})});return function(){m.forEach(g=>g())}}(s,t,i,n,r)});return function(){a&&a(),o&&o()}};class Po extends ko{constructor(t,i,n,r){super(),this._render=t,this._fields=i,this._fieldsMap=r||{},this._watchMethod=n}_renderCore(t){var i=v(t.container),n=EU(t.model,this._watchMethod,this._fields,this._fieldsMap,r=>{i.empty(),this._render(i,r,t.model)});return R.on(i,vr,n),i.contents()}}var wU="dx-collection",Pd="dx-item",tb="-content",ib="dx-item-content-placeholder",IU="dxItemData",TU="dxItemIndex",AU="tmpl-",DU="dxItem",OU="dx-item-selected",RU="dx-item-response-wait",kU="dx-empty-collection",nb="dx-template-wrapper",BU=/^([^.]+\[\d+\]\.)+([\w.]+)$/,LU="item",Tp="up",Ap="down",rb="left",ab="right",PU="pageup",FU="pagedown",ob="last",sb="first",EO=_i.inherit({_activeStateUnit:"."+Pd,_supportedKeys:function(){var e=function(i){var n=v(this.option("focusedElement"));n.length&&this._itemClickHandler(k({},i,{target:n.get(0),currentTarget:n.get(0)}))},t=function(i,n){vi(n)||(n.preventDefault(),n.stopPropagation(),this._moveFocus(i,n))};return k(this.callBase(),{space:function(i){i.preventDefault(),e.call(this,i)},enter:e,leftArrow:t.bind(this,rb),rightArrow:t.bind(this,ab),upArrow:t.bind(this,Tp),downArrow:t.bind(this,Ap),pageUp:t.bind(this,Tp),pageDown:t.bind(this,Ap),home:t.bind(this,sb),end:t.bind(this,ob)})},_getDefaultOptions:function(){return k(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:fe.format("dxCollectionWidget-noDataText"),dataSource:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:function(e){return e?e.disabled:void 0},visibleExpr:function(e){return e?e.visible:void 0}})},_init:function(){this._compileDisplayGetter(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter:function(){var e=this.option("displayExpr");this._displayGetter=e?bt(this.option("displayExpr")):void 0},_initTemplates:function(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:function(){return LU},_initDefaultItemTemplate:function(){var e=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new Po((function(t,i){Ye(i)?this._prepareDefaultItemTemplate(i,t):(e&&Ie(e.text)&&(i=e.text(i)),t.text(String(Mt(i,""))))}).bind(this),this._getBindableFields(),this.option("integrationOptions.watchMethod"),e)})},_getBindableFields:function(){return["text","html"]},_getFieldsMap:function(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate:function(e,t){E(e.text)&&t.text(e.text),E(e.html)&&t.html(e.html)},_initItemsFromMarkup:function(){var e=hT(this.$element(),DU);if(!(!e.length||this.option("items").length)){var t=e.map(i=>{var{element:n,options:r}=i,a=/\S/.test(n.innerHTML)&&!r.template;return a?r.template=this._prepareItemTemplate(n):v(n).remove(),r});this.option("items",t)}},_prepareItemTemplate:function(e){var t=AU+new si,i=v(e).detach().clone().removeAttr("data-options").addClass(nb);return this._saveTemplate(t,i),t},_dataSourceOptions:function(){return{paginate:!1}},_cleanRenderedItems:function(){this._renderedItemsCount=0},_focusTarget:function(){return this.$element()},_focusInHandler:function(e){if(this.callBase.apply(this,arguments),!!this._isFocusTarget(e.target)){var t=v(this.option("focusedElement"));if(t.length)this._setFocusedItem(t);else{var i=this._getActiveItem();i.length&&this.option("focusedElement",Me(i))}}},_focusOutHandler:function(){this.callBase.apply(this,arguments);var e=v(this.option("focusedElement"));this._updateFocusedItemState(e,!1)},_getActiveItem:function(e){var t=v(this.option("focusedElement"));if(t.length)return t;var i=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0,n=this._getActiveElement(),r=n.length-1;return i<0&&(i=e?r:0),n.eq(i)},_moveFocus:function(e){var t=this._getAvailableItems(),i;switch(e){case PU:case Tp:i=this._prevItem(t);break;case FU:case Ap:i=this._nextItem(t);break;case ab:i=this.option("rtlEnabled")?this._prevItem(t):this._nextItem(t);break;case rb:i=this.option("rtlEnabled")?this._nextItem(t):this._prevItem(t);break;case sb:i=t.first();break;case ob:i=t.last();break;default:return!1}i.length!==0&&this.option("focusedElement",Me(i))},_getVisibleItems:function(e){return e=e||this._itemElements(),e.filter(":visible")},_getAvailableItems:function(e){return this._getVisibleItems(e).not(".dx-state-disabled")},_prevItem:function(e){var t=this._getActiveItem(),i=e.index(t),n=e.last(),r=v(e[i-1]),a=this.option("loopItemFocus");return r.length===0&&a&&(r=n),r},_nextItem:function(e){var t=this._getActiveItem(!0),i=e.index(t),n=e.first(),r=v(e[i+1]),a=this.option("loopItemFocus");return r.length===0&&a&&(r=n),r},_selectFocusedItem:function(e){this.selectItem(e)},_updateFocusedItemState:function(e,t,i){var n=v(e);n.length&&(this._refreshActiveDescendant(),this._refreshItemId(n,i),this._toggleFocusClass(t,n)),this._updateParentActiveDescendant()},_refreshActiveDescendant:function(e){this.setAria("activedescendant",E(this.option("focusedElement"))?this.getFocusedItemId():null,e)},_refreshItemId:function(e,t){!t&&this.option("focusedElement")?this.setAria("id",this.getFocusedItemId(),e):this.setAria("id",null,e)},_setFocusedItem:function(e){!e||!e.length||(this._updateFocusedItemState(e,!0),this.onFocusedItemChanged(this.getFocusedItemId()),this.option("selectOnFocus")&&this._selectFocusedItem(e))},_findItemElementByItem:function(e){var t=v(),i=this;return this.itemElements().each(function(){var n=v(this);if(n.data(i._itemDataKey())===e)return t=n,!1}),t},_getIndexByItem:function(e){return this.option("items").indexOf(e)},_itemOptionChanged:function(e,t,i,n){var r=this._findItemElementByItem(e);if(r.length){this.constructor.ItemClass.getInstance(r).setDataField(t,i)||this._refreshItem(r,e);var a=t==="disabled"&&i;a&&this._resetItemFocus(r)}},_resetItemFocus(e){e.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem:function(e){var t=this._getItemData(e),i=e.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+i,t,null,e)},_updateParentActiveDescendant:re,_optionChanged:function(e){if(e.name==="items"){var t=e.fullName.match(BU);if(t&&t.length){var i=t[t.length-1],n=e.fullName.replace("."+i,""),r=this.option(n);this._itemOptionChanged(r,i,e.value,e.previousValue);return}}switch(e.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":this._renderEmptyMessage();break;case"itemTemplate":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"focusedElement":this._updateFocusedItemState(e.previousValue,!1,!0),this._setFocusedItem(v(e.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;case"visibleExpr":case"disabledExpr":this._invalidate();break;default:this.callBase(e)}},_invalidate:function(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage:function(){var e=this._dataSource;return this._expectNextPageLoading(),e.pageIndex(1+e.pageIndex()),e.load()},_expectNextPageLoading:function(){this._startIndexForAppendedItems=0},_expectLastItemLoading:function(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading:function(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler:function(e){var t=this.option("items");this._initialized&&t&&this._shouldAppendItems()?(this._renderedItemsCount=t.length,(!this._isLastPage()||this._startIndexForAppendedItems!==-1)&&(this.option().items=t.concat(e.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",e.slice())},_refreshContent:function(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems:function(){return this._startIndexForAppendedItems!=null&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:function(){return!1},_clean:function(){this._cleanFocusState(),this._cleanItemContainer()},_cleanItemContainer:function(){v(this._itemContainer()).empty()},_dispose:function(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh:function(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer:function(){return this.$element()},_itemClass:function(){return Pd},_itemContentClass:function(){return this._itemClass()+tb},_selectedItemClass:function(){return OU},_itemResponseWaitClass:function(){return RU},_itemSelector:function(){return"."+this._itemClass()},_itemDataKey:function(){return IU},_itemIndexKey:function(){return TU},_itemElements:function(){return this._itemContainer().find(this._itemSelector())},_initMarkup:function(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass(wU),this._prepareContent()},_prepareContent:oo(function(){this._renderContentImpl()}),_renderContent:function(){this._fireContentReadyAction()},_render:function(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_attachClickEvent:function(){var e=this._itemSelector(),t=ye(vt,this.NAME),i=ye(lt.down,this.NAME),n=this,r=new on(function(a){var o=a.event;n._itemPointerDownHandler(o)});R.off(this._itemContainer(),t,e),R.off(this._itemContainer(),i,e),R.on(this._itemContainer(),t,e,(function(a){this._itemClickHandler(a)}).bind(this)),R.on(this._itemContainer(),i,e,function(a){r.execute({element:v(a.target),event:a})})},_itemClickHandler:function(e,t,i){this._itemDXEventHandler(e,"onItemClick",t,i)},_itemPointerDownHandler:function(e){this.option("focusStateEnabled")&&(this._itemFocusHandler=(function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,!e.isDefaultPrevented()){var t=v(e.target),i=t.closest(this._itemElements()),n=this._closestFocusable(t);i.length&&this._isFocusTarget(n==null?void 0:n.get(0))&&this.option("focusedElement",Me(i))}}).bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable:function(e){if(e.is(A_))return e;for(e=e.parent();e.length&&!me.isDocument(e.get(0));){if(e.is(A_))return e;e=e.parent()}},_forcePointerDownFocus:function(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState:function(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),i=ye(Ea.name,this.NAME);R.off(e,i,t),R.on(e,i,t,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout:function(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent:function(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler:function(e){this._shouldFireHoldEvent()?this._itemDXEventHandler(e,"onItemHold"):e.cancel=!0},_attachContextMenuEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),i=ye(SO,this.NAME);R.off(e,i,t),R.on(e,i,t,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent:function(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler:function(e){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(e,"onItemContextMenu"):e.cancel=!0},_renderContentImpl:function(){var e=this.option("items")||[];this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e)},_renderItems:function(e){e.length&&V(e,(function(t,i){this._renderItem(this._renderedItemsCount+t,i)}).bind(this)),this._renderEmptyMessage()},_renderItem:function(e,t,i,n){var r,a=(r=e==null?void 0:e.item)!==null&&r!==void 0?r:e;i=i||this._itemContainer();var o=this._renderItemFrame(a,t,i,n);this._setElementData(o,t,a),o.attr(this.option("_itemAttributes")),this._attachItemClickEvent(t,o);var s=this._getItemContent(o),l=this._renderItemContent({index:a,itemData:t,container:Me(s),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),u=this;return De(l).done(function(d){u._postprocessRenderItem({itemElement:o,itemContent:d,itemData:t,itemIndex:a}),u._executeItemRenderAction(e,t,Me(o))}),o},_getItemContent:function(e){var t=e.find("."+ib);return t.removeClass(ib),t},_attachItemClickEvent:function(e,t){!e||!e.onClick||R.on(t,vt,(function(i){this._itemEventHandlerByHandler(t,e.onClick,{event:i})}).bind(this))},_renderItemContent:function(e){var t=this._getItemTemplateName(e),i=this._getTemplate(t);this._addItemContentClasses(e);var n=v(this._createItemByTemplate(i,e));return n.hasClass(nb)?this._renderItemContentByNode(e,n):e.container},_renderItemContentByNode:function(e,t){return v(e.container).replaceWith(t),e.container=Me(t),this._addItemContentClasses(e),t},_addItemContentClasses:function(e){var t=[Pd+tb,e.contentClass];v(e.container).addClass(t.join(" "))},_appendItemToContainer:function(e,t,i){t.appendTo(e)},_renderItemFrame:function(e,t,i,n){var r=v("<div>");if(new this.constructor.ItemClass(r,this._itemOptions(),t||{}),n&&n.length?n.replaceWith(r):this._appendItemToContainer.call(this,i,r,e),this.option("useItemTextAsTitle")){var a=this._displayGetter?this._displayGetter(t):t;r.attr("title",a)}return r},_itemOptions:function(){var e=this;return{watchMethod:function(){return e.option("integrationOptions.watchMethod")},owner:e,fieldGetter:function(t){var i=e.option(t+"Expr"),n=bt(i);return n}}},_postprocessRenderItem:re,_executeItemRenderAction:function(e,t,i){this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t})},_setElementData:function(e,t,i){e.addClass([Pd,this._itemClass()].join(" ")).data(this._itemDataKey(),t).data(this._itemIndexKey(),i)},_createItemRenderAction:function(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction:function(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName:function(e){var t=e.itemData,i=e.templateProperty||this.option("itemTemplateProperty"),n=t&&t[i];return n||e.defaultTemplateName},_createItemByTemplate:function(e,t){return e.render({model:t.itemData,container:t.container,index:t.index})},_emptyMessageContainer:function(){return this._itemContainer()},_renderEmptyMessage:function(e){e=e||this.option("items");var t=this.option("noDataText"),i=!t||e&&e.length||this._isDataSourceLoading();i&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),i||(this._$noData=this._$noData||v("<div>").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()).html(t),this.setAria("label",t)),this.$element().toggleClass(kU,!i)},_itemDXEventHandler:function(e,t,i,n){this._itemEventHandler(e.target,t,k(i,{event:e}),n)},_itemEventHandler:function(e,t,i,n){var r=this._createActionByOption(t,k({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,r,i)},_itemEventHandlerByHandler:function(e,t,i,n){var r=this._createAction(t,k({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,r,i)},_itemEventHandlerImpl:function(e,t,i){var n=this._closestItemElement(v(e)),r=k({},i);return t(k(i,this._extendActionArgs(n),r))},_extendActionArgs:function(e){return{itemElement:Me(e),itemIndex:this._itemElements().index(e),itemData:this._getItemData(e)}},_closestItemElement:function(e){return v(e).closest(this._itemSelector())},_getItemData:function(e){return v(e).data(this._itemDataKey())},_getSummaryItemsWidth:function(e,t){var i=0;return e&&V(e,function(n,r){i+=ot(r,t||!1)}),i},getFocusedItemId:function(){return this._focusedItemId||(this._focusedItemId="dx-"+new si),this._focusedItemId},itemElements:function(){return this._itemElements()},itemsContainer:function(){return this._itemContainer()}}).include(Zu);EO.ItemClass=Lo;var Qi=it.abstract,MU=it.inherit({ctor:function(e){this._collectionWidget=e},getIndexByItemData:Qi,getItemDataByIndex:Qi,getKeysByItems:Qi,getItemsByKeys:Qi,itemsGetter:Qi,getKeyByIndex:function(e){var t=this._denormalizeItemIndex(e);return this.getKeysByItems([this.getItemDataByIndex(t)])[0]},_equalKeys:function(e,t){return this._collectionWidget._isKeySpecified()?Bt(e,t):e===t},beginCache:function(){this._cache={}},endCache:function(){this._cache=null},getIndexByKey:Qi,getNormalizedIndex:function(e){return this._isNormalizedItemIndex(e)?e:this._isItemIndex(e)?this._normalizeItemIndex(e):this._isNode(e)?this._getNormalizedItemIndex(e):this._normalizeItemIndex(this.getIndexByItemData(e))},getIndex:function(e){return this._isNormalizedItemIndex(e)?this._denormalizeItemIndex(e):this._isItemIndex(e)?e:this._isNode(e)?this._denormalizeItemIndex(this._getNormalizedItemIndex(e)):this.getIndexByItemData(e)},getItemElement:function(e){if(this._isNormalizedItemIndex(e))return this._getItemByNormalizedIndex(e);if(this._isItemIndex(e))return this._getItemByNormalizedIndex(this._normalizeItemIndex(e));if(this._isNode(e))return v(e);var t=this._normalizeItemIndex(this.getIndexByItemData(e));return this._getItemByNormalizedIndex(t)},_isNode:e=>me.isNode(e&&mn(e)?e.get(0):e),deleteItemAtIndex:Qi,itemPlacementFunc:function(e,t){return this._itemsFromSameParent(e,t)&&e<t?"after":"before"},moveItemAtIndexToIndex:Qi,_isNormalizedItemIndex:function(e){return typeof e=="number"&&Math.round(e)===e},_isItemIndex:Qi,_getNormalizedItemIndex:Qi,_normalizeItemIndex:Qi,_denormalizeItemIndex:Qi,_getItemByNormalizedIndex:Qi,_itemsFromSameParent:Qi}),fC=MU.inherit({_getPlainItems:function(){return this._collectionWidget.option("items")||[]},getIndexByItemData:function(e){var t=this._collectionWidget.keyOf.bind(this._collectionWidget);return t?this.getIndexByKey(t(e)):this._getPlainItems().indexOf(e)},getItemDataByIndex:function(e){return this._getPlainItems()[e]},deleteItemAtIndex:function(e){this._getPlainItems().splice(e,1)},itemsGetter:function(){return this._getPlainItems()},getKeysByItems:function(e){var t=this._collectionWidget.keyOf.bind(this._collectionWidget),i=e;if(t){i=[];for(var n=0;n<e.length;n++)i.push(t(e[n]))}return i},getIndexByKey:function(e){var t=this._cache,i=t&&t.keys||this.getKeysByItems(this._getPlainItems());if(t&&!t.keys&&(t.keys=i),typeof e=="object"){for(var n=0,r=i.length;n<r;n++)if(this._equalKeys(e,i[n]))return n}else return i.indexOf(e);return-1},getItemsByKeys:function(e,t){return(t||e).slice()},moveItemAtIndexToIndex:function(e,t){var i=this._getPlainItems(),n=i[e];i.splice(e,1),i.splice(t,0,n)},_isItemIndex:function(e){return typeof e=="number"&&Math.round(e)===e},_getNormalizedItemIndex:function(e){return this._collectionWidget._itemElements().index(e)},_normalizeItemIndex:function(e){return e},_denormalizeItemIndex:function(e){return e},_getItemByNormalizedIndex:function(e){return e>-1?this._collectionWidget._itemElements().eq(e):null},_itemsFromSameParent:function(){return!0}});const wO=it.inherit({ctor:function(e){this.options=e,this._setOption("disabledItemKeys",[]),this._clearItemKeys()},_clearItemKeys:function(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])},validate:re,_setOption:function(e,t){this.options[e]=t},onSelectionChanged:function(){var e=this.options.addedItemKeys,t=this.options.removedItemKeys,i=this.options.addedItems,n=this.options.removedItems,r=this.options.selectedItems,a=this.options.selectedItemKeys,o=this.options.onSelectionChanged||re;this._clearItemKeys(),o({selectedItems:r,selectedItemKeys:a,addedItemKeys:e,removedItemKeys:t,addedItems:i,removedItems:n})},equalKeys:function(e,t){return this.options.equalByReference&&$e(e)&&$e(t)?e===t:Bt(e,t)},getSelectableItems:function(e){return e.filter(function(t){return!(t!=null&&t.disabled)})},_clearSelection:function(e,t,i,n){return e=e||[],e=Array.isArray(e)?e:[e],this.validate(),this.selectedItemKeys(e,t,i,n)},_removeTemplateProperty:function(e){return Array.isArray(e)?e.map(t=>this._removeTemplateProperty(t)):($e(e)&&delete e.template,e)},_loadFilteredData:function(e,t,i,n){var r=encodeURI(JSON.stringify(this._removeTemplateProperty(e))).length,a=this.options.maxFilterLengthInRequest&&r>this.options.maxFilterLengthInRequest,o=new se,s={filter:a?void 0:e,select:a?this.options.dataFields():i||this.options.dataFields()};return e&&e.length===0?o.resolve([]):this.options.load(s).done(function(l){var u=Ye(l)?l.data:l;t&&!n?u=u.filter(t):a&&(u=Yi(u).filter(e).toArray()),o.resolve(u)}).fail(o.reject.bind(o)),o},updateSelectedItemKeyHash:function(e){for(var t=0;t<e.length;t++){var i=jn(e[t]);if(!$e(i)){this.options.keyHashIndices[i]=this.options.keyHashIndices[i]||[];var n=this.options.keyHashIndices[i];n.push(t)}}},_isAnyItemSelected:function(e){for(var t=0;t<e.length;t++)if(this.options.isItemSelected(e[t]))return;return!1},_getFullSelectAllState:function(){var e=this.options.plainItems(),t=this.options.filter(),i=this.options.ignoreDisabledItems?this.options.selectedItems:this.options.selectedItems.filter(a=>!(a!=null&&a.disabled));t&&(i=Yi(i).filter(t).toArray());var n=i.length,r=e.length-this.getSelectableItems(e).length;if(!n)return this._isAnyItemSelected(e);if(n>=this.options.totalCount()-r)return!0},_getVisibleSelectAllState:function(){for(var e=this.getSelectableItems(this.options.plainItems()),t=!1,i=!1,n=0;n<e.length;n++){var r=e[n],a=this.options.getItemData(r),o=this.options.keyOf(a);this.options.isSelectableItem(r)&&(this.isItemKeySelected(o)?t=!0:i=!0)}return t?i?void 0:!0:!1}}),VU=wO.inherit({getSelectedItems:function(){return this._loadFilteredData(this.options.selectionFilter)},getSelectedItemKeys:function(){var e=new se,t=this,i=this.options.key(),n=Ve(i)?[i]:i;return this._loadFilteredData(this.options.selectionFilter,null,n).done(function(r){var a=r.map(function(o){return t.options.keyOf(o)});e.resolve(a)}).fail(e.reject),e.promise()},selectedItemKeys:function(e,t,i,n){if(n){var r=this.options.filter(),a=!r||JSON.stringify(r)===JSON.stringify(this.options.selectionFilter)&&i;a?this._setOption("selectionFilter",i?[]:null):this._addSelectionFilter(i,r,n)}else{t||this._setOption("selectionFilter",[]);for(var o=0;o<e.length;o++)i?this.removeSelectedItem(e[o]):this.addSelectedItem(e[o])}return this.onSelectionChanged(),new se().resolve()},setSelectedItems:function(e){this._setOption("selectionFilter",null);for(var t=0;t<e.length;t++)this.addSelectedItem(e[t])},isItemDataSelected:function(e){return this.isItemKeySelected(e)},isItemKeySelected:function(e){var t=this.options.selectionFilter;return t?!!Yi([e]).filter(t).toArray().length:!0},_getKeyExpr:function(){var e=this.options.key();return Array.isArray(e)&&e.length===1?e[0]:e},_normalizeKey:function(e){var t=this.options.key();return Array.isArray(t)&&t.length===1?e[t[0]]:e},_getFilterByKey:function(e){var t=this._getKeyExpr(),i=[t,"=",this._normalizeKey(e)];if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i.push([t[n],"=",e[t[n]]]),n!==t.length-1&&i.push("and")}return i},addSelectedItem:function(e){var t=this._getFilterByKey(e);this._addSelectionFilter(!1,t)},removeSelectedItem:function(e){var t=this._getFilterByKey(e);this._addSelectionFilter(!0,t)},validate:function(){var e=this.options.key;if(e&&e()===void 0)throw Qe.Error("E1042","Deferred selection")},_findSubFilter:function(e,t){if(!e)return-1;for(var i=JSON.stringify(t),n=0;n<e.length;n++){var r=e[n];if(r&&JSON.stringify(r)===i)return n}return-1},_isLastSubFilter:function(e,t){return e&&t?this._findSubFilter(e,t)===e.length-1||this._findSubFilter([e],t)===0:!1},_addFilterOperator:function(e,t){return e.length>1&&Ve(e[1])&&e[1]!==t&&(e=[e]),e.length&&e.push(t),e},_denormalizeFilter:function(e){return e&&Ve(e[0])&&(e=[e]),e},_isOnlyNegativeFiltersLeft:function(e){return e.every((t,i)=>i%2===0?Array.isArray(t)&&t[0]==="!":t==="and")},_addSelectionFilter:function(e,t,i){var n=e?["!",t]:t,r=e?"and":"or",a=!0,o=this.options.selectionFilter||[];if(o=this._denormalizeFilter(o),o&&o.length){var s=this._removeSameFilter(o,t,e,i),l=this._removeSameFilter(o,t,!e),u=e&&(s!==-1||l!==-1)&&this._isOnlyNegativeFiltersLeft(o);u&&(o=[]);var d=this._isKeyFilter(t)&&this._hasKeyFiltersOnlyStartingFromIndex(o,l);a=t.length&&!d,a&&(o=this._addFilterOperator(o,r))}a&&o.push(n),o=this._normalizeFilter(o),this._setOption("selectionFilter",!e&&!o.length?null:o)},_normalizeFilter:function(e){return e&&e.length===1&&(e=e[0]),e},_removeFilterByIndex:function(e,t,i){var n=e[1];t>0?e.splice(t-1,2):e.splice(t,2),i&&n==="and"&&e.splice(0,e.length)},_isSimpleKeyFilter:function(e,t){return e.length===3&&e[0]===t&&e[1]==="="},_isKeyFilter:function(e){if(e.length===2&&e[0]==="!")return this._isKeyFilter(e[1]);var t=this._getKeyExpr();if(Array.isArray(t)){if(e.length!==2*t.length-1)return!1;for(var i=0;i<t.length;i++)if(i>0&&e[2*i-1]!=="and"||!this._isSimpleKeyFilter(e[2*i],t[i]))return!1;return!0}return this._isSimpleKeyFilter(e,t)},_hasKeyFiltersOnlyStartingFromIndex:function(e,t){if(t>=0){for(var i=t;i<e.length;i++)if(typeof e[i]!="string"&&!this._isKeyFilter(e[i]))return!1;return!0}return!1},_removeSameFilter:function(e,t,i,n){if(t=i?["!",t]:t,JSON.stringify(t)===JSON.stringify(e))return e.splice(0,e.length),0;var r=this._findSubFilter(e,t);if(r>=0)return this._removeFilterByIndex(e,r,n),r;for(var a=0;a<e.length;a++)if(Array.isArray(e[a])&&e[a].length>2){var o=this._removeSameFilter(e[a],t,!1,n);if(o>=0)return e[a].length?e[a].length===1&&(e[a]=e[a][0]):this._removeFilterByIndex(e,a,n),o}return-1},getSelectAllState:function(){var e=this.options.filter(),t=this.options.selectionFilter;if(!t)return!0;if(!t.length)return!1;if(!(!e||!e.length)){if(t=this._denormalizeFilter(t),this._isLastSubFilter(t,e))return!0;if(this._isLastSubFilter(t,["!",e]))return!1}}});var NU=function(e,t){this.getLocalFilter=function(o,s,l,u){return s=s===void 0?Bt:s,r.bind(this,s,o,l,u)},this.getExpr=function(o){if(o){var s;return e.forEach(function(l,u){s=s||[];var d;u>0&&s.push(t?"and":"or"),Ve(o)?d=a(o,l):d=function(c,h){for(var f=[],p=0,m=c.length;p<m;p++){var g=c[p],C=h&&h[g],b=a(g,C);if(!b)break;p>0&&f.push(t?"or":"and"),f.push(b)}return f}(o,l),s.push(d)}),s&&s.length===1&&(s=s[0]),s}},this.getCombinedFilter=function(o,s){var l=this.getExpr(o),u=l;return t&&s&&(l?(u=[],u.push(l),u.push(s)):u=s),u};var i,n=function(o,s,l){return Array.isArray(l)?o.map(u=>s(u)):o};function r(o,s,l,u,d){var c=s(d),h,f;if(!l&&(h=jn(c),!$e(h))){var p=function(m,g){if(!i){i={};for(var C=n(e,m,g),b=0;b<C.length;b++)i[jn(C[b])]=!0}return i}(s,u);return p[h]?!t:!!t}for(f=0;f<e.length;f++)if(o(e[f],c))return!t;return!!t}function a(o,s){if(s!==void 0)return[o,t?"<>":"=",s]}};const $U=wO.inherit({ctor:function(e){this.callBase(e),this._initSelectedItemKeyHash()},_initSelectedItemKeyHash:function(){this._setOption("keyHashIndices",this.options.equalByReference?null:{})},getSelectedItemKeys:function(){return this.options.selectedItemKeys.slice(0)},getSelectedItems:function(){return this.options.selectedItems.slice(0)},_preserveSelectionUpdate:function(e,t){var i=this.options.keyOf,n,r,a;if(i){var o=t&&e.length>1&&!this.options.equalByReference;for(o&&(n={}),a=0;a<e.length;a++){var s=e[a],l=i(s);t?(r=this.removeSelectedItem(l,n,s==null?void 0:s.disabled),n&&r>=0&&(n[r]=!0)):this.addSelectedItem(l,s)}o&&this._batchRemoveSelectedItems(n)}},_batchRemoveSelectedItems:function(e){var t=this.options.selectedItemKeys.slice(0),i=this.options.selectedItems.slice(0);this.options.selectedItemKeys.length=0,this.options.selectedItems.length=0;for(var n=0;n<t.length;n++)e[n]||(this.options.selectedItemKeys.push(t[n]),this.options.selectedItems.push(i[n]));this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(this.options.selectedItemKeys)},_loadSelectedItemsCore:function(e,t,i,n){var r=new se,a=this.options.key();if(!e.length&&!i)return r.resolve([]),r;if(i&&t&&!n)return r.resolve(this.getSelectedItems()),r;var o=new NU(e,i),s=o.getCombinedFilter(a,n),l=[];if(t){var u=this.options.selectedItems;l=s&&e.length!==u.length?Yi(u).filter(s).toArray():u.slice(0)}var d=l.length?l:this.options.plainItems(!0).filter(this.options.isSelectableItem).map(this.options.getItemData),c=o.getLocalFilter(this.options.keyOf,this.equalKeys.bind(this),this.options.equalByReference,a);return d=d.filter(c),l.length||!i&&d.length===e.length?r.resolve(d):r=this._loadFilteredData(s,c,null,i),r},_replaceSelectionUpdate:function(e){var t=[],i=this.options.keyOf;if(i){for(var n=0;n<e.length;n++){var r=e[n],a=i(r);t.push(a)}this.setSelectedItems(t,e)}},_warnOnIncorrectKeys:function(e){for(var t=this.options.allowNullValue,i=0;i<e.length;i++){var n=e[i];(!t||n!==null)&&!this.isItemKeySelected(n)&&Qe.log("W1002",n)}},_isMultiSelectEnabled:function(){var e=this.options.mode;return e==="all"||e==="multiple"},_requestInProgress:function(){var e;return((e=this._lastLoadDeferred)===null||e===void 0?void 0:e.state())==="pending"},_concatRequestsItems:function(e,t,i,n){var r,a=t?e:[];return n?r=n:r=by(e,this.options.selectedItemKeys),{addedItems:i.added.concat(r),removedItems:i.removed.concat(a),keys:e}},_collectLastRequestData:function(e,t,i,n){var r=t&&i,a={added:[],removed:[]},o=this._isMultiSelectEnabled(),s=o?this._lastRequestData:{};return o&&(this._shouldMergeWithLastRequest&&(r?(this._lastLoadDeferred.reject(),s={}):Nz(e,this.options.selectedItemKeys)||(a.added=s.addedItems,a.removed=s.removedItems,t||this._lastLoadDeferred.reject())),s=this._concatRequestsItems(e,t,a,this._shouldMergeWithLastRequest?void 0:n)),s},_updateKeysByLastRequestData:function(e,t,i){var n=e;if(this._isMultiSelectEnabled()&&this._shouldMergeWithLastRequest&&!t&&!i){var r,a;n=by(e.concat((r=this._lastRequestData)===null||r===void 0?void 0:r.addedItems),(a=this._lastRequestData)===null||a===void 0?void 0:a.removedItems),n=aN(n)}return n},_loadSelectedItems:function(e,t,i,n){var r=this,a=new se,o=r.options.filter();return this._shouldMergeWithLastRequest=this._requestInProgress(),this._lastRequestData=this._collectLastRequestData(e,t,i,n),De(r._lastLoadDeferred).always(function(){var s=r._updateKeysByLastRequestData(e,t,i);r._shouldMergeWithLastRequest=!1,r._loadSelectedItemsCore(s,t,i,o).done(a.resolve).fail(a.reject)}),r._lastLoadDeferred=a,a},selectedItemKeys:function(e,t,i,n,r){var a=this,o=a._loadSelectedItems(e,i,n,r);return o.done(function(s){t?a._preserveSelectionUpdate(s,i):a._replaceSelectionUpdate(s),a.onSelectionChanged()}),o},addSelectedItem:function(e,t){if(E(t)&&!this.options.ignoreDisabledItems&&t.disabled){this.options.disabledItemKeys.indexOf(e)===-1&&this.options.disabledItemKeys.push(e);return}var i=this._getKeyHash(e);this._indexOfSelectedItemKey(i)===-1&&(!$e(i)&&this.options.keyHashIndices&&(this.options.keyHashIndices[i]=[this.options.selectedItemKeys.length]),this.options.selectedItemKeys.push(e),this.options.addedItemKeys.push(e),this.options.addedItems.push(t),this.options.selectedItems.push(t))},_getSelectedIndexByKey:function(e,t){for(var i=this.options.selectedItemKeys,n=0;n<i.length;n++)if((!t||!t[n])&&this.equalKeys(i[n],e))return n;return-1},_getSelectedIndexByHash:function(e,t){var i=this.options.keyHashIndices[e];return i&&i.length>1&&t&&(i=i.filter(function(n){return!t[n]})),i&&i[0]>=0?i[0]:-1},_indexOfSelectedItemKey:function(e,t){var i;return this.options.equalByReference?i=this.options.selectedItemKeys.indexOf(e):$e(e)?i=this._getSelectedIndexByKey(e,t):i=this._getSelectedIndexByHash(e,t),i},_shiftSelectedKeyIndices:function(e){for(var t=e;t<this.options.selectedItemKeys.length;t++){var i=this.options.selectedItemKeys[t],n=jn(i),r=this.options.keyHashIndices[n];if(r)for(var a=0;a<r.length;a++)r[a]>e&&r[a]--}},removeSelectedItem:function(e,t,i){if(!(!this.options.ignoreDisabledItems&&i)){var n=this._getKeyHash(e),r=!!t,a=this._indexOfSelectedItemKey(n,t);if(a<0||(this.options.removedItemKeys.push(e),this.options.removedItems.push(this.options.selectedItems[a]),r)||(this.options.selectedItemKeys.splice(a,1),this.options.selectedItems.splice(a,1),$e(n)||!this.options.keyHashIndices))return a;var o=this.options.keyHashIndices[n];return o&&(o.shift(),o.length||delete this.options.keyHashIndices[n],this._shiftSelectedKeyIndices(a)),a}},_updateAddedItemKeys:function(e,t){for(var i=0;i<e.length;i++)this.isItemKeySelected(e[i])||(this.options.addedItemKeys.push(e[i]),this.options.addedItems.push(t[i]))},_updateRemovedItemKeys:function(e,t,i){for(var n=0;n<t.length;n++)this.isItemKeySelected(t[n])||(this.options.removedItemKeys.push(t[n]),this.options.removedItems.push(i[n]))},_isItemSelectionInProgress:function(e,t){var i=t&&this._lastRequestData&&this._requestInProgress();if(i){var n,r=(n=this._lastRequestData.addedItems)!==null&&n!==void 0?n:[];return r.includes(e)}else return!1},_getKeyHash:function(e){return this.options.equalByReference?e:jn(e)},setSelectedItems:function(e,t){this._updateAddedItemKeys(e,t);var i=this.options.selectedItemKeys,n=this.options.selectedItems;this.options.equalByReference||(this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(e)),this._setOption("selectedItemKeys",e),this._setOption("selectedItems",t),this._updateRemovedItemKeys(e,i,n)},isItemDataSelected:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.options.keyOf(e);return this.isItemKeySelected(i,t)},isItemKeySelected:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this._isItemSelectionInProgress(e,t.checkPending);if(!i){var n=this._getKeyHash(e),r=this._indexOfSelectedItemKey(n);i=r!==-1}return i},getSelectAllState:function(e){return e?this._getVisibleSelectAllState():this._getFullSelectAllState()}}),IO=it.inherit({ctor:function(e){this.options=k(this._getDefaultOptions(),e,{selectedItemKeys:e.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new VU(this.options):new $U(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)},_getDefaultOptions:function(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:re,key:re,keyOf:function(e){return e},load:function(){return new se().resolve([])},totalCount:function(){return-1},isSelectableItem:function(){return!0},isItemSelected:function(){return!1},getItemData:function(e){return e},dataFields:re,filter:re}},validate:function(){this._selectionStrategy.validate()},getSelectedItemKeys:function(){return this._selectionStrategy.getSelectedItemKeys()},getSelectedItems:function(){return this._selectionStrategy.getSelectedItems()},selectionFilter:function(e){if(e===void 0)return this.options.selectionFilter;var t=this.options.selectionFilter!==e&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(e);this.options.selectionFilter=e,t&&this.onSelectionChanged()},setSelection:function(e,t){return this.selectedItemKeys(e,!1,!1,!1,t)},select:function(e){return this.selectedItemKeys(e,!0)},deselect:function(e){return this.selectedItemKeys(e,!0,!0)},selectedItemKeys:function(e,t,i,n,r){var a;return e=(a=e)!==null&&a!==void 0?a:[],e=Array.isArray(e)?e:[e],this.validate(),this._selectionStrategy.selectedItemKeys(e,t,i,n,r)},clearSelection:function(){return this.selectedItemKeys([])},_addSelectedItem:function(e,t){this._selectionStrategy.addSelectedItem(t,e)},_removeSelectedItem:function(e){this._selectionStrategy.removeSelectedItem(e)},_setSelectedItems:function(e,t){this._selectionStrategy.setSelectedItems(e,t)},onSelectionChanged:function(){this._selectionStrategy.onSelectionChanged()},changeItemSelection:function(e,t,i){var n,r,a,o=this.options.plainItems(),s=o[e],l,u=(n=(r=this.options).allowLoadByRange)===null||n===void 0?void 0:n.call(r),d,c=!1,h=!1,f=b=>b>=0&&!o.filter(A=>A.loadIndex===b).length;if(u&&(d=s.loadIndex-e,e=s.loadIndex,c=f(this._focusedItemIndex),E(this._shiftFocusedItemIndex)&&(h=f(this._shiftFocusedItemIndex))),!this.isSelectable()||!this.isDataItem(s))return!1;var p=this.options.getItemData(s),m=this.options.keyOf(p);if(t=t||{},t.shift&&this.options.mode==="multiple"&&this._focusedItemIndex>=0)c||h?(a=e!==this._shiftFocusedItemIndex||this._focusedItemIndex!==this._shiftFocusedItemIndex,a&&(l=this.changeItemSelectionWhenShiftKeyInVirtualPaging(e))):a=this.changeItemSelectionWhenShiftKeyPressed(e,o,d);else if(t.control){if(this._resetItemSelectionWhenShiftKeyPressed(),!i){var g=this._selectionStrategy.isItemDataSelected(p);this.options.mode==="single"&&this.clearSelectedItems(),g?this._removeSelectedItem(m):this._addSelectedItem(p,m)}a=!0}else{this._resetItemSelectionWhenShiftKeyPressed();var C=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],m);(this.options.selectedItemKeys.length!==1||!C)&&(this._setSelectedItems([m],[p]),a=!0)}if(a)return De(l).done(()=>{this._focusedItemIndex=e,!i&&this.onSelectionChanged()}),!0},isDataItem:function(e){return this.options.isSelectableItem(e)},isSelectable:function(){return this.options.mode==="single"||this.options.mode==="multiple"},isItemDataSelected:function(e){return this._selectionStrategy.isItemDataSelected(e,{checkPending:!0})},isItemSelected:function(e,t){return this._selectionStrategy.isItemKeySelected(e,t)},_resetItemSelectionWhenShiftKeyPressed:function(){delete this._shiftFocusedItemIndex},_resetFocusedItemIndex:function(){this._focusedItemIndex=-1},changeItemSelectionWhenShiftKeyInVirtualPaging:function(e){var t=this.options.getLoadOptions(e,this._focusedItemIndex,this._shiftFocusedItemIndex),i=new se,n=t.skip;return this.options.load(t).done(r=>{this.changeItemSelectionWhenShiftKeyPressed(e,r,n),i.resolve()}),i.promise()},changeItemSelectionWhenShiftKeyPressed:function(e,t,i){var n=!1,r,a=E(i),o=a?this._focusedItemIndex-i:this._focusedItemIndex,s=this.options.keyOf,l=t[o],u=this.options.getItemData(l),d=s(u),c=l&&this.isItemDataSelected(u);E(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex);var h,f,p,m;if(this._shiftFocusedItemIndex!==this._focusedItemIndex)for(r=this._focusedItemIndex<this._shiftFocusedItemIndex?1:-1,p=a?this._focusedItemIndex-i:this._focusedItemIndex,m=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,o=p;o!==m;o+=r)(a||this.isDataItem(t[o]))&&(f=s(this.options.getItemData(t[o])),this._removeSelectedItem(f),n=!0);if(e!==this._shiftFocusedItemIndex)for(r=e<this._shiftFocusedItemIndex?1:-1,p=a?e-i:e,m=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,o=p;o!==m;o+=r)(a||this.isDataItem(t[o]))&&(h=this.options.getItemData(t[o]),f=s(h),this._addSelectedItem(h,f),n=!0);return(a||this.isDataItem(l))&&!c&&(this._addSelectedItem(u,d),n=!0),n},clearSelectedItems:function(){this._setSelectedItems([],[])},selectAll:function(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!1):this.selectedItemKeys([],!0,!1,!0)},deselectAll:function(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!0):this.selectedItemKeys([],!0,!0,!0)},_onePageSelectAll:function(e){for(var t=this._selectionStrategy.getSelectableItems(this.options.plainItems()),i=0;i<t.length;i++){var n=t[i];if(this.isDataItem(n)){var r=this.options.getItemData(n),a=this.options.keyOf(r),o=this.isItemSelected(a);!o&&!e&&this._addSelectedItem(r,a),o&&e&&this._removeSelectedItem(a)}}return this.onSelectionChanged(),new se().resolve()},getSelectAllState:function(e){return this._selectionStrategy.getSelectAllState(e)}});var Dp="dxItemDeleting",Bc=-1,Hn=function(e){return e!==Bc},Fo=EO.inherit({_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions:function(){return k(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectionByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:Bc,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor:function(e,t){this._userOptions=t||{},this.callBase(e,t)},_init:function(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initSelectionModule()},_initKeyGetter:function(){this._keyGetter=bt(this.option("keyExpr"))},_getKeysByItems:function(e){return this._editStrategy.getKeysByItems(e)},_getItemsByKeys:function(e,t){return this._editStrategy.getItemsByKeys(e,t)},_getKeyByIndex:function(e){return this._editStrategy.getKeyByIndex(e)},_getIndexByKey:function(e){return this._editStrategy.getIndexByKey(e)},_getIndexByItemData:function(e){return this._editStrategy.getIndexByItemData(e)},_isKeySpecified:function(){return!!(this._dataSource&&this._dataSource.key())},_getCombinedFilter:function(){return this._dataSource&&this._dataSource.filter()},key:function(){return this.option("keyExpr")?this.option("keyExpr"):this._dataSource&&this._dataSource.key()},keyOf:function(e){var t=e,i=this._dataSource&&this._dataSource.store();return this.option("keyExpr")?t=this._keyGetter(e):i&&(t=i.keyOf(e)),t},_nullValueSelectionSupported:function(){return!1},_initSelectionModule:function(){var e=this,t=e._editStrategy.itemsGetter;this._selection=new IO({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanged:function(i){(i.addedItemKeys.length||i.removedItemKeys.length)&&(e.option("selectedItems",e._getItemsByKeys(i.selectedItemKeys,i.selectedItems)),e._updateSelectedItems(i))},filter:e._getCombinedFilter.bind(e),totalCount:function(){var i=e.option("items"),n=e._dataSource;return n&&n.totalCount()>=0?n.totalCount():e._getItemsCount(i)},key:e.key.bind(e),keyOf:e.keyOf.bind(e),load:function(i){if(e._dataSource){var n=e._dataSource.loadOptions();i.customQueryParams=n.customQueryParams,i.userData=e._dataSource._userData}var r=e._dataSource&&e._dataSource.store();return r?r.load(i).done(function(a){if(!e._disposed){var o=WA(a).data;e._dataSource._applyMapFunction(o)}}):new se().resolve(this.plainItems())},dataFields:function(){return e._dataSource&&e._dataSource.select()},plainItems:t.bind(e._editStrategy)})},_getItemsCount:function(e){return e.reduce((t,i)=>t+(i.items?this._getItemsCount(i.items):1),0)},_initEditStrategy:function(){var e=fC;this._editStrategy=new e(this)},_getSelectedItemIndices:function(e){var t=this,i=[];return e=e||this._selection.getSelectedItemKeys(),t._editStrategy.beginCache(),V(e,function(n,r){var a=t._getIndexByKey(r);Hn(a)&&i.push(a)}),t._editStrategy.endCache(),i},_initMarkup:function(){this._rendering=!0,(!this._dataSource||!this._dataSource.isLoading())&&this._syncSelectionOptions().done(()=>this._normalizeSelectedItems()),this.callBase()},_render:function(){this.callBase(),this._rendering=!1},_fireContentReadyAction:function(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions:function(e){e=e||this._chooseSelectOption();var t,i,n,r;switch(e){case"selectedIndex":t=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),E(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedItem",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(r=this.option("selectedItems")||[],i=r.length?this._editStrategy.getIndexByItemData(r[0]):Bc,this.option("selectionRequired")&&!Hn(i))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",r[0]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(r));break;case"selectedItem":if(t=this.option("selectedItem"),i=this._editStrategy.getIndexByItemData(t),this.option("selectionRequired")&&!Hn(i))return this._syncSelectionOptions("selectedIndex");E(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",Bc));break;case"selectedItemKeys":if(n=this.option("selectedItemKeys"),this.option("selectionRequired")){var a=this._getIndexByKey(n[0]);if(!Hn(a))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(n)}return new se().resolve().promise()},_chooseSelectOption:function(){var e="selectedIndex",t=(function(i){var n=this.option(i),r=E(n)&&n.length;return r||i in this._userOptions}).bind(this);return t("selectedItems")?e="selectedItems":t("selectedItem")?e="selectedItem":t("selectedItemKeys")&&(e="selectedItemKeys"),e},_compareKeys:function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0},_normalizeSelectedItems:function(){if(this.option("selectionMode")==="none")this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems");else if(this.option("selectionMode")==="single"){var e=this.option("selectedItems");if(e.length>1||!e.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){var t=this._selection.getSelectedItems(),i=e[0]===void 0?t[0]:e[0];return i===void 0&&(i=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&i&&i.items&&(i.items=[i.items[0]]),this._selection.setSelection(this._getKeysByItems([i])),this._setOptionWithoutOptionChange("selectedItems",[i]),this._syncSelectionOptions("selectedItems")}else this._selection.setSelection(this._getKeysByItems(e))}else{var n=this._getKeysByItems(this.option("selectedItems")),r=this._selection.getSelectedItemKeys();this._compareKeys(r,n)||this._selection.setSelection(n)}return new se().resolve().promise()},_itemClickHandler:function(e){var t=new se().resolve(),i=this.callBase;this._createAction((function(n){var r;t=(r=this._itemSelectHandler(n.event))!==null&&r!==void 0?r:t}).bind(this),{validatingTargetName:"itemElement"})({itemElement:v(e.currentTarget),event:e}),t.always(()=>{i.apply(this,arguments)})},_itemSelectHandler:function(e){var t,i;if(this.option("selectionByClick")){var n=e.currentTarget;return this.isItemSelected(n)?this.unselectItem(e.currentTarget):i=this.selectItem(e.currentTarget),(t=i)===null||t===void 0?void 0:t.promise()}},_selectedItemElement:function(e){return this._itemElements().eq(e)},_postprocessRenderItem:function(e){if(this.option("selectionMode")!=="none"){var t=v(e.itemElement),i=this._editStrategy.getNormalizedIndex(t),n=this._isItemSelected(i);this._processSelectableItem(t,n)}},_processSelectableItem:function(e,t){e.toggleClass(this._selectedItemClass(),t),this._setAriaSelected(e,String(t))},_updateSelectedItems:function(e){var t=this,i=e.addedItemKeys,n=e.removedItemKeys;if(t._rendered&&(i.length||n.length)){var r=t._selectionChangePromise;if(!t._rendering){var a=[],o,s=[];t._editStrategy.beginCache();for(var l=0;l<i.length;l++)o=t._getIndexByKey(i[l]),a.push(o),t._addSelection(o);for(var u=0;u<n.length;u++)o=t._getIndexByKey(n[u]),s.push(o),t._removeSelection(o);t._editStrategy.endCache(),t._updateSelection(a,s)}De(r).done(function(){t._fireSelectionChangeEvent(e.addedItems,e.removedItems)})}},_fireSelectionChangeEvent:function(e,t){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:e,removedItems:t})},_updateSelection:re,_setAriaSelected:function(e,t){this.setAria("selected",t,e)},_removeSelection:function(e){var t=this._editStrategy.getItemElement(e);Hn(e)&&(this._processSelectableItem(t,!1),R.triggerHandler(t,"stateChanged",!1))},_addSelection:function(e){var t=this._editStrategy.getItemElement(e);Hn(e)&&(this._processSelectableItem(t,!0),R.triggerHandler(t,"stateChanged",!0))},_isItemSelected:function(e){var t=this._getKeyByIndex(e);return this._selection.isItemSelected(t,{checkPending:!0})},_optionChanged:function(e){switch(e.name){case"selectionMode":this._invalidate();break;case"dataSource":(!e.value||Array.isArray(e.value)&&!e.value.length)&&this.option("selectedItemKeys",[]),this.callBase(e);break;case"selectedIndex":case"selectedItem":case"selectedItems":case"selectedItemKeys":this._syncSelectionOptions(e.name).done(()=>this._normalizeSelectedItems());break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"selectionByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(e)}},_clearSelectedItems:function(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare:function(e){if(e.data(Dp))return new se().resolve().promise();e.data(Dp,!0);var t=new se,i={cancel:!1},n=this._itemEventHandler(e,"onItemDeleting",i,{excludeValidators:["disabled","readOnly"]});return De(n).always((function(r){var a=!n,o=!a&&n.state()==="resolved",s=!!arguments.length,l=a||o&&!s||o&&r;De(yi(i.cancel)).always(function(){e.data(Dp,!1)}).done(function(u){l&&!u?t.resolve():t.reject()}).fail(t.reject)}).bind(this)),t.promise()},_deleteItemFromDS:function(e){if(!this._dataSource)return new se().resolve().promise();var t=new se,i=this.option("disabled"),n=this._dataSource.store();if(this.option("disabled",!0),!n.remove)throw Qe.Error("E1011");return n.remove(n.keyOf(this._getItemData(e))).done(function(r){r!==void 0?t.resolve():t.reject()}).fail(function(){t.reject()}),t.always((function(){this.option("disabled",i)}).bind(this)),t},_tryRefreshLastPage:function(){var e=new se;return this._isLastPage()||this.option("grouped")?e.resolve():this._refreshLastPage().done(function(){e.resolve()}),e.promise()},_refreshLastPage:function(){return this._expectLastItemLoading(),this._dataSource.load()},_updateSelectionAfterDelete:function(e){var t=this._getKeyByIndex(e);this._selection.deselect([t])},_updateIndicesAfterIndex:function(e){for(var t=this._itemElements(),i=e+1;i<t.length;i++)v(t[i]).data(this._itemIndexKey(),i-1)},_simulateOptionChange:function(e){var t=this.option(e);t instanceof fr||this._optionChangedAction({name:e,fullName:e,value:t})},isItemSelected:function(e){return this._isItemSelected(this._editStrategy.getNormalizedIndex(e))},selectItem:function(e){if(this.option("selectionMode")!=="none"){var t=this._editStrategy.getNormalizedIndex(e);if(Hn(t)){var i=this._getKeyByIndex(t);if(!this._selection.isItemSelected(i)){if(this.option("selectionMode")==="single")return this._selection.setSelection([i]);var n=this.option("selectedItemKeys")||[];return this._selection.setSelection([...n,i],[i])}}}},unselectItem:function(e){var t=this._editStrategy.getNormalizedIndex(e);if(Hn(t)){var i=this._selection.getSelectedItemKeys();if(!(this.option("selectionRequired")&&i.length<=1)){var n=this._getKeyByIndex(t);this._selection.isItemSelected(n,{checkPending:!0})&&this._selection.deselect([n])}}},_deleteItemElementByIndex:function(e){this._updateSelectionAfterDelete(e),this._updateIndicesAfterIndex(e),this._editStrategy.deleteItemAtIndex(e)},_afterItemElementDeleted:function(e,t){var i=this._dataSource?"dataSource":"items";this._simulateOptionChange(i),this._itemEventHandler(e,"onItemDeleted",t,{beforeExecute:function(){e.remove()},excludeValidators:["disabled","readOnly"]}),this._renderEmptyMessage()},deleteItem:function(e){var t=this,i=new se,n=this._editStrategy.getItemElement(e),r=this._editStrategy.getNormalizedIndex(e),a=this._itemResponseWaitClass();return Hn(r)?this._waitDeletingPrepare(n).done(function(){n.addClass(a);var o=t._extendActionArgs(n);t._deleteItemFromDS(n).done(function(){t._deleteItemElementByIndex(r),t._afterItemElementDeleted(n,o),t._tryRefreshLastPage().done(function(){i.resolveWith(t)})}).fail(function(){n.removeClass(a),i.rejectWith(t)})}).fail(function(){i.rejectWith(t)}):i.rejectWith(t),i.promise()},reorderItem:function(e,t){var i=new se,n=this,r=this._editStrategy,a=r.getItemElement(e),o=r.getItemElement(t),s=r.getNormalizedIndex(e),l=r.getNormalizedIndex(t),u=this._dataSource?"dataSource":"items",d=Hn(s)&&Hn(l)&&s!==l;return d?i.resolveWith(this):i.rejectWith(this),i.promise().done(function(){o[r.itemPlacementFunc(s,l)](a),r.moveItemAtIndexToIndex(s,l),this._updateIndicesAfterIndex(s),n.option("selectedItems",n._getItemsByKeys(n._selection.getSelectedItemKeys(),n._selection.getSelectedItems())),u==="items"&&n._simulateOptionChange(u),n._itemEventHandler(a,"onItemReordered",{fromIndex:r.getIndex(s),toIndex:r.getIndex(l)},{excludeValidators:["disabled","readOnly"]})})}}),HU="dx-state-disabled",TO=Fo.inherit({_getDefaultOptions:function(){return k(this.callBase(),{keyExpr:"id",displayExpr:"text",selectedExpr:"selected",disabledExpr:"disabled",itemsExpr:"items",hoverStateEnabled:!0,parentIdExpr:"parentId",expandedExpr:"expanded"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}}])},_init:function(){this.callBase(),this._initAccessors(),this._initDataAdapter(),this._initDynamicTemplates()},_initDataSource:function(){this.callBase(),this._dataSource&&this._dataSource.paginate(!1)},_initDataAdapter:function(){var e=this._createDataAdapterAccessors();this._dataAdapter=new pU(k({dataAccessors:{getters:e.getters,setters:e.setters},items:this.option("items")},this._getDataAdapterOptions()))},_getDataAdapterOptions:re,_initDynamicTemplates:function(){var e=this;this._templateManager.addDefaultTemplates({item:new Po((function(t,i){t.html(i.html).append(this._getIconContainer(i)).append(this._getTextContainer(i)).append(this._getPopoutContainer(i)),e._addContentClasses(i,t.parent())}).bind(this),["text","html","items","icon"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter,items:this._itemsGetter})})},_getIconContainer:function(e){return e.icon?So(e.icon):void 0},_getTextContainer:function(e){return v("<span>").text(e.text)},_getPopoutContainer:re,_addContentClasses:re,_initAccessors:function(){var e=this;V(this._getAccessors(),function(t,i){e._compileAccessor(i)}),this._compileDisplayGetter()},_getAccessors:function(){return["key","selected","items","disabled","parentId","expanded"]},_getChildNodes:function(e){var t=this,i=[];return V(e.internalFields.childrenKeys,function(n,r){var a=t._dataAdapter.getNodeByKey(r);i.push(a)}),i},_hasChildren:function(e){return e&&e.internalFields.childrenKeys.length},_compileAccessor:function(e){var t="_"+e+"Getter",i="_"+e+"Setter",n=this.option(e+"Expr");if(n){if(Ie(n)){this[i]=function(r,a){r[n()]=a},this[t]=function(r){return r[n()]};return}}else{this[t]=re,this[i]=re;return}this[t]=bt(n),this[i]=qm(n)},_createDataAdapterAccessors:function(){var e=this,t={getters:{},setters:{}};return V(this._getAccessors(),function(i,n){var r="_"+n+"Getter",a="_"+n+"Setter",o=n==="parentId"?"parentKey":n;t.getters[o]=e[r],t.setters[o]=e[a]}),t.getters.display=this._displayGetter?this._displayGetter:i=>i.text,t},_initMarkup:function(){this.callBase(),this._addWidgetClass()},_addWidgetClass:function(){this._focusTarget().addClass(this._widgetClass())},_widgetClass:re,_renderItemFrame:function(e,t){var i=this.callBase.apply(this,arguments);return i.toggleClass(HU,!!this._disabledGetter(t)),i},_optionChanged:function(e){switch(e.name){case"displayExpr":case"keyExpr":this._initAccessors(),this._initDynamicTemplates(),this.repaint();break;case"itemsExpr":case"selectedExpr":case"disabledExpr":case"expandedExpr":case"parentIdExpr":this._initAccessors(),this._initDataAdapter(),this.repaint();break;case"items":this._initDataAdapter(),this.callBase(e);break;default:this.callBase(e)}}});class WU extends fC{_getPlainItems(){return ti(this._collectionWidget.option("items"),function t(i){return i.items?[i].concat(ti(i.items,t)):i})}_stringifyItem(t){return JSON.stringify(t,(i,n)=>i==="template"?this._getTemplateString(n):n)}_getTemplateString(t){var i;return typeof t=="object"?i=v(t).text():i=t.toString(),i}}var ud="dx-menu",zU=ud+"-no-icons",GU="dx-menu-base",Bn=ud+"-item",UU=Bn+"-content",Op=Bn+"-selected",lb=Bn+"-wrapper",KU=ud+"-items-container",jU=Bn+"-expanded",qU=ud+"-separator",YU=ud+"-last-group-item",XU=Bn+"-has-text",ZU=Bn+"-has-icon",JU=Bn+"-has-submenu",AO=Bn+"-popout",QU=AO+"-container",eK=Bn+"-text",tK="single",iK={show:50,hide:300};class pC extends TO{_getDefaultOptions(){return k(super._getDefaultOptions(),{items:[],cssClass:"",activeStateEnabled:!0,showSubmenuMode:{name:"onHover",delay:{show:50,hide:300}},animation:{show:{type:"fade",from:0,to:1,duration:100},hide:{type:"fade",from:1,to:0,duration:100}},selectByClick:!1,focusOnSelectedItem:!1,keyExpr:null,_itemAttributes:{role:"menuitem"},useInkRipple:!1})}_itemDataKey(){return"dxMenuItemDataKey"}_itemClass(){return Bn}_setAriaSelected(){}_selectedItemClass(){return Op}_widgetClass(){return GU}_focusTarget(){return this._itemContainer()}_clean(){this.option("focusedElement",null),super._clean()}_supportedKeys(){return k(super._supportedKeys(),{space:()=>{var t=v(this.option("focusedElement"));!t.length||!this._isSelectionEnabled()||this.selectItem(t[0])},pageUp:re,pageDown:re})}_isSelectionEnabled(){return this.option("selectionMode")===tK}_init(){this._activeStateUnit=".".concat(Bn),super._init(),this._renderSelectedItem(),this._initActions()}_getTextContainer(t){var i=t.text,n=v("<span>").addClass(eK),r=Ye(t)?i:String(t);return i&&n.text(r)}_getPopoutContainer(t){var i=t.items,n;if(i&&i.length){var r=v("<div>").addClass(AO);n=v("<span>").addClass(QU).append(r)}return n}_getDataAdapterOptions(){return{rootValue:0,multipleSelection:!1,recursiveSelection:!1,recursiveExpansion:!1,searchValue:""}}_selectByItem(t){if(t){var i=this._dataAdapter.getNodeByItem(t);this._dataAdapter.toggleSelection(i.internalFields.key,!0)}}_renderSelectedItem(){var t=this._dataAdapter.getSelectedNodesKeys(),i=t.length&&t[0],n=this.option("selectedItem");if(!i){this._selectByItem(n);return}var r=this._dataAdapter.getNodeByKey(i);if(r.selectable!==!1){if(!n){this.option("selectedItem",r.internalFields.item);return}n!==r.internalFields.item&&(this._dataAdapter.toggleSelection(i,!1),this._selectByItem(n))}}_initActions(){}_initMarkup(){super._initMarkup(),this.option("useInkRipple")&&this._renderInkRipple()}_renderInkRipple(){this._inkRipple=Jg()}_toggleActiveState(t,i,n){if(super._toggleActiveState.apply(this,arguments),!!this._inkRipple){var r={element:t,event:n};i?this._inkRipple.showWave(r):this._inkRipple.hideWave(r)}}_getShowSubmenuMode(){var t=this.option("showSubmenuMode");return t=$e(t)?t.name:t,this._isDesktopDevice()?t:"onClick"}_initSelectedItems(){}_isDesktopDevice(){return Re.real().deviceType==="desktop"}_initEditStrategy(){var t=WU;this._editStrategy=new t(this)}_addCustomCssClass(t){t.addClass(this.option("cssClass"))}_itemWrapperSelector(){return".".concat(lb)}_hoverStartHandler(t){var i=this._getItemElementByEventArgs(t);!i||this._isItemDisabled(i)||(t.stopPropagation(),this._getShowSubmenuMode()==="onHover"&&(clearTimeout(this._showSubmenusTimeout),this._showSubmenusTimeout=setTimeout(this._showSubmenu.bind(this,i),this._getSubmenuDelay("show"))))}_getAvailableItems(t){return super._getAvailableItems(t).filter(function(){return v(this).css("visibility")!=="hidden"})}_isItemDisabled(t){return this._disabledGetter(t.data(this._itemDataKey()))}_showSubmenu(t){this._addExpandedClass(t)}_addExpandedClass(t){v(t).addClass(jU)}_getSubmenuDelay(t){var{delay:i}=this.option("showSubmenuMode");return E(i)?$e(i)?i[t]:i:iK[t]}_getItemElementByEventArgs(t){var i=v(t.target);if(i.hasClass(this._itemClass())||i.get(0)===t.currentTarget)return i;for(;!i.hasClass(this._itemClass());)if(i=i.parent(),i.hasClass("dx-submenu"))return null;return i}_hoverEndHandler(){clearTimeout(this._showSubmenusTimeout)}_hasSubmenu(t){return t&&t.internalFields.childrenKeys.length}_renderContentImpl(){this._renderItems(this._dataAdapter.getRootNodes())}_renderItems(t,i){if(t.length){this.hasIcons=!1;var n=this._renderContainer(this.$element(),i),r=-1,a=-1;V(t,(o,s)=>{var l=s.visible!==!1;l&&r<0&&(r=o);var u=r<o&&(s.beginGroup||o===a);u&&(a=l?o:o+1),o===a&&r<o&&this._renderSeparator(n),this._renderItem(o,s,n)}),this.hasIcons||n.addClass(zU)}}_renderContainer(t){var i=v("<ul>");return this.setAria("role","none",i),i.appendTo(t).addClass(KU)}_createDOMElement(t){var i=v("<li>");return this.setAria("role","none",i),i.appendTo(t).addClass(lb)}_renderItem(t,i,n,r){var a=this.option("items"),o=r||this._createDOMElement(n);a[t+1]&&a[t+1].beginGroup&&o.addClass(YU);var s=super._renderItem(t,i.internalFields.item,o);i.internalFields.item===this.option("selectedItem")&&s.addClass(Op),s.attr("tabIndex",-1),this._hasSubmenu(i)&&this.setAria("haspopup","true",s)}_renderItemFrame(t,i,n){var r=n.children(".".concat(Bn));return r.length?r:super._renderItemFrame.apply(this,arguments)}_refreshItem(t,i){var n=this._dataAdapter.getNodeByItem(i),r=t.data(this._itemIndexKey()),a=t.closest("ul"),o=t.closest("li");this._renderItem(r,n,a,o)}_addContentClasses(t,i){var n=t.text?!!t.text.length:!1,r=!!t.icon,a=t.items?!!t.items.length:!1;i.toggleClass(XU,n),i.toggleClass(ZU,r),this.hasIcons||(this.hasIcons=r),i.toggleClass(JU,a)}_getItemContent(t){var i=super._getItemContent(t);return i.length||(i=t.children(".".concat(UU))),i}_postprocessRenderItem(t){var i=v(t.itemElement),n=this._dataAdapter.getSelectedNodesKeys();if(!n.length||!this._selectedGetter(t.itemData)||!this._isItemSelectable(t.itemData)){this._setAriaSelected(i,"false");return}var r=this._dataAdapter.getNodeByItem(t.itemData);r.internalFields.key===n[0]?(i.addClass(this._selectedItemClass()),this._setAriaSelected(i,"true")):this._setAriaSelected(i,"false")}_isItemSelectable(t){return t.selectable!==!1}_renderSeparator(t){v("<li>").appendTo(t).addClass(qU)}_itemClickHandler(t){if(!t._skipHandling){var i=this._createAction(this._updateSubmenuVisibilityOnClick.bind(this));this._itemDXEventHandler(t,"onItemClick",{},{afterExecute:i.bind(this)}),t._skipHandling=!0}}_updateSubmenuVisibilityOnClick(t){this._updateSelectedItemOnClick(t),this._getShowSubmenuMode()==="onClick"&&this._addExpandedClass(t.args[0].itemElement)}_updateSelectedItemOnClick(t){var i=t.args?t.args[0]:t;if(this._isItemSelectionAllowed(i.itemData)){var n=this._dataAdapter.getSelectedNodesKeys(),r=n.length&&this._dataAdapter.getNodeByKey(n[0]);r&&this._toggleItemSelection(r,!1),!r||r.internalFields.item!==i.itemData?this.selectItem(i.itemData):(this._fireSelectionChangeEvent(null,this.option("selectedItem")),this._setOptionWithoutOptionChange("selectedItem",null))}}_isItemSelectionAllowed(t){var i=this._isSelectionEnabled()&&this.option("selectByClick");return!this._isContainerEmpty()&&i&&this._isItemSelectable(t)&&!this._itemsGetter(t)}_isContainerEmpty(){return this._itemContainer().is(":empty")}_syncSelectionOptions(){return Xm()}_optionChanged(t){switch(t.name){case"showSubmenuMode":break;case"selectedItem":var i=this._dataAdapter.getNodeByItem(t.value),n=this._dataAdapter.getSelectedNodesKeys()[0];if(i&&i.internalFields.key!==n){if(i.selectable===!1)break;n&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(n),!1),this._toggleItemSelection(i,!0),this._updateSelectedItems()}break;case"cssClass":case"position":case"selectByClick":case"animation":case"useInkRipple":this._invalidate();break;default:super._optionChanged(t)}}_toggleItemSelection(t,i){var n=this._getElementByItem(t.internalFields.item);n&&v(n).toggleClass(Op),this._dataAdapter.toggleSelection(t.internalFields.key,i)}_getElementByItem(t){var i;return V(this._itemElements(),(n,r)=>v(r).data(this._itemDataKey())!==t?!0:(i=r,!1)),i}_updateSelectedItems(t,i){(t||i)&&this._fireSelectionChangeEvent(i,t)}_fireSelectionChangeEvent(t,i){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:[t],removedItems:[i]})}selectItem(t){var i=t.nodeType?this._getItemData(t):t,n=this._dataAdapter.getSelectedNodesKeys()[0],r=this.option("selectedItem"),a=this._dataAdapter.getNodeByItem(i);a.internalFields.key!==n&&(n&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(n),!1),this._toggleItemSelection(a,!0),this._updateSelectedItems(r,i),this._setOptionWithoutOptionChange("selectedItem",i))}unselectItem(t){var i=t.nodeType?this._getItemData(t):t,n=this._dataAdapter.getNodeByItem(i),r=this.option("selectedItem");n.internalFields.selected&&(this._toggleItemSelection(n,!1),this._updateSelectedItems(r,null),this._setOptionWithoutOptionChange("selectedItem",null))}}pC.ItemClass=Lo;var DO="dx-menu",ou=DO+"-item",rs=ou+"-expanded",nK="dx-menu-phone-overlay",Fd=DO+"-items-container",ub=ou+"-wrapper",en="dx-submenu",rK="dx-context-menu",aK="dx-has-context-menu",oK="dx-state-disabled",sK="dx-state-focused",db="dx-state-hover",lK="dx-overlay-content",OO="up",RO="down",uK="left",dK="right",kO="first",BO="last",cb=["onShowing","onShown","onSubmenuCreated","onHiding","onHidden","onPositioning","onLeftFirstItem","onLeftLastItem","onCloseRootSubmenu","onExpandLastSubmenu"],cK=[OO,RO,kO,BO],hb="dxcontextmenu";class vC extends pC{getShowEvent(t){var i=null;return $e(t)?t.name!==null&&(i=t.name||hb):i=t,i}getShowDelay(t){return $e(t)&&t.delay}_getDefaultOptions(){return k(super._getDefaultOptions(),{showEvent:hb,hideOnOutsideClick:!0,position:{at:"top left",my:"top left"},onShowing:null,onShown:null,onSubmenuCreated:null,onHiding:null,onHidden:null,onPositioning:null,submenuDirection:"auto",visible:!1,target:void 0,onLeftFirstItem:null,onLeftLastItem:null,onCloseRootSubmenu:null,onExpandLastSubmenu:null})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>!Ue(),options:{animation:null}}])}_setDeprecatedOptions(){super._setDeprecatedOptions(),k(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.2",alias:"hideOnOutsideClick"}})}_initActions(){this._actions={},V(cb,(t,i)=>{this._actions[i]=this._createActionByOption(i)||re})}_setOptionsByReference(){super._setOptionsByReference(),k(this._optionsByReference,{animation:!0,selectedItem:!0})}_focusInHandler(){}_itemContainer(){return this._overlay?this._overlay.$content():v()}_eventBindingTarget(){return this._itemContainer()}itemsContainer(){return this._overlay?this._overlay.$content():void 0}_supportedKeys(){return k(super._supportedKeys(),{space:()=>{var t=v(this.option("focusedElement"));this.hide(),!(!t.length||!this._isSelectionEnabled())&&this.selectItem(t[0])},escape:this.hide})}_getActiveItem(){var t=this._getAvailableItems(),i=t.filter(".".concat(sK)),n=t.filter(".".concat(db)),r=n.closest(".".concat(Fd));return r.find(".".concat(ou)).index(i)>=0?i:n.length?n:super._getActiveItem()}_moveFocus(t){var i=this._getItemsByLocation(t),n=this._getActiveItem(!0),r=this.itemsContainer().find(".".concat(db)),a=v(this.option("focusedElement")),o=!!(a.length||r.length),s;switch(t){case OO:s=o?this._prevItem(i):n,this._setFocusedElement(s),n.is(i.first())&&this._actions.onLeftFirstItem(n);break;case RO:s=o?this._nextItem(i):n,this._setFocusedElement(s),n.is(i.last())&&this._actions.onLeftLastItem(n);break;case dK:s=this.option("rtlEnabled")?this._hideSubmenuHandler():this._expandSubmenuHandler(i,t),this._setFocusedElement(s);break;case uK:s=this.option("rtlEnabled")?this._expandSubmenuHandler(i,t):this._hideSubmenuHandler(),this._setFocusedElement(s);break;case kO:s=i.first(),this._setFocusedElement(s);break;case BO:s=i.last(),this._setFocusedElement(s);break;default:return super._moveFocus(t)}}_setFocusedElement(t){t&&t.length!==0&&this.option("focusedElement",Me(t))}_getItemsByLocation(t){var i=this._getActiveItem(!0),n;return cK.includes(t)&&(n=i.closest(".".concat(Fd)).children().children()),n=this._getAvailableItems(n),n}_getAriaTarget(){return this.$element()}_refreshActiveDescendant(){if(E(this._overlay)){var t=this._overlay.$content();super._refreshActiveDescendant(t)}}_hideSubmenuHandler(){var t=this._getActiveItem(!0),i=t.parents(".".concat(rs)).first();return i.length?(this._hideSubmenusOnSameLevel(i),this._hideSubmenu(t.closest(".".concat(en))),i):(this._actions.onCloseRootSubmenu(t),t)}_expandSubmenuHandler(t,i){var n=this._getActiveItem(!0),r=this._getItemData(n),a=this._dataAdapter.getNodeByItem(r),o=this._hasSubmenu(a),s=n.children(".".concat(en));if(o&&!n.hasClass(oK))return(!s.length||s.css("visibility")==="hidden")&&this._showSubmenu(n),this._nextItem(this._getItemsByLocation(i));this._actions.onExpandLastSubmenu(n)}_clean(){this._overlay&&(this._overlay.$element().remove(),this._overlay=null),this._detachShowContextMenuEvents(this._getTarget()),super._clean()}_initMarkup(){this.$element().addClass(aK),super._initMarkup()}_render(){super._render(),this._renderVisibility(this.option("visible")),this._addWidgetClass()}_renderContentImpl(){this._detachShowContextMenuEvents(this._getTarget()),this._attachShowContextMenuEvents()}_attachKeyboardEvents(){!this._keyboardListenerId&&this._focusTarget().length&&super._attachKeyboardEvents()}_renderContextMenuOverlay(){if(!this._overlay){var t=this._getOverlayOptions();this._overlay=this._createComponent(v("<div>").appendTo(this._$element),qn,t);var i=this._overlay.$content();i.addClass(rK),this._addCustomCssClass(i),this._addPlatformDependentClass(i),this._attachContextMenuEvent()}}preventShowingDefaultContextMenuAboveOverlay(){var t=this._itemContainer(),i=ye(SO,this.NAME);R.off(t,i,".".concat(en)),R.on(t,i,".".concat(en),(n=>{n.stopPropagation(),n.preventDefault(),R.off(t,i,".".concat(en))}).bind(this))}_itemContextMenuHandler(t){super._itemContextMenuHandler(t),t.stopPropagation()}_addPlatformDependentClass(t){Re.current().phone&&t.addClass(nK)}_detachShowContextMenuEvents(t){var i=this.getShowEvent(this.option("showEvent"));if(i){var n=ye(i,this.NAME);this._showContextMenuEventHandler?R.off(me.getDocument(),n,t,this._showContextMenuEventHandler):R.off(v(t),n)}}_attachShowContextMenuEvents(){var t=this._getTarget(),i=this.getShowEvent(this.option("showEvent"));if(i){var n=ye(i,this.NAME),r=this._createAction(o=>{var s=this.getShowDelay(this.option("showEvent"));s?setTimeout(()=>this._show(o.event),s):this._show(o.event)},{validatingTargetName:"target"}),a=o=>r({event:o,target:v(o.currentTarget)});r=this._createAction(r),mn(t)||t.nodeType||Xt(t)?(this._showContextMenuEventHandler=void 0,R.on(t,n,a)):(this._showContextMenuEventHandler=a,R.on(me.getDocument(),n,t,this._showContextMenuEventHandler))}}_hoverEndHandler(t){super._hoverEndHandler(t),t.stopPropagation()}_renderDimensions(){}_renderContainer(t,i){var n=i||this._itemContainer();t=v("<div>"),t.appendTo(n).addClass(en).css("visibility",i?"hidden":"visible"),t.parent().hasClass(lK)||this._addCustomCssClass(t);var r=super._renderContainer(t);return i?r:this.option("width")?r.css("minWidth",this.option("width")):this.option("height")?r.css("minHeight",this.option("height")):r}_renderSubmenuItems(t,i){this._renderItems(this._getChildNodes(t),i),this._actions.onSubmenuCreated({itemElement:Me(i),itemData:t.internalFields.item,submenuElement:Me(i.children(".".concat(en)))})}_getOverlayOptions(){var t=this.option("position"),i={focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),innerOverlay:!0,hideOnOutsideClick:n=>this._hideOnOutsideClickHandler(n),propagateOutsideClick:!0,hideOnParentScroll:!0,deferRendering:!1,position:{at:t.at,my:t.my,of:this._getTarget(),collision:"flipfit"},shading:!1,showTitle:!1,height:"auto",width:"auto",onShown:this._overlayShownActionHandler.bind(this),onHiding:this._overlayHidingActionHandler.bind(this),onHidden:this._overlayHiddenActionHandler.bind(this)};return i}_overlayShownActionHandler(t){this._actions.onShown(t)}_overlayHidingActionHandler(t){this._actions.onHiding(t),t.cancel||(this._hideAllShownSubmenus(),this._setOptionWithoutOptionChange("visible",!1))}_overlayHiddenActionHandler(t){this._actions.onHidden(t)}_shouldHideOnOutsideClick(t){var{closeOnOutsideClick:i,hideOnOutsideClick:n}=this.option();return Ie(n)?n(t):Ie(i)?i(t):n||i}_hideOnOutsideClickHandler(t){if(!this._shouldHideOnOutsideClick(t))return!1;if(me.isDocument(t.target))return!0;var i=this._getActiveItemsContainer(t.target),n=this._getItemsContainers(),r=this._searchActiveItem(t.target),a=this.$element().parents(".".concat(ou)),o=r[0]===a[0]&&r.length&&a.length,s=this._isIncludeOverlay(i,n)&&r.length;return s||o?(this._getShowSubmenuMode()==="onClick"&&this._hideAllShownChildSubmenus(r),!1):!0}_getActiveItemsContainer(t){return v(t).closest(".".concat(Fd))}_getItemsContainers(){return this._overlay.$content().find(".".concat(Fd))}_searchActiveItem(t){return v(t).closest(".".concat(ou)).eq(0)}_isIncludeOverlay(t,i){var n=!1;return V(i,(r,a)=>{t.is(a)&&!n&&(n=!0)}),n}_hideAllShownChildSubmenus(t){var i=t.find(".".concat(en)),n=k([],this._shownSubmenus);i.length>0&&V(n,(r,a)=>{var o=this._searchActiveItem(a.context).parent();o.parent().is(t.parent().parent())&&!o.is(t.parent())&&this._hideSubmenu(a)})}_showSubmenu(t){var i=this._dataAdapter.getNodeByItem(this._getItemData(t));if(this._hideSubmenusOnSameLevel(t),!!this._hasSubmenu(i)){var n=t.children(".".concat(en)),r=n.length;super._showSubmenu(t),r||this._renderSubmenuItems(i,t),this._isSubmenuVisible(n)||this._drawSubmenu(t)}}_hideSubmenusOnSameLevel(t){var i=t.parent(".".concat(ub)).siblings().find(".".concat(rs));i.length&&(i.removeClass(rs),this._hideSubmenu(i.find(".".concat(en))))}_hideSubmenuGroup(t){this._isSubmenuVisible(t)&&this._hideSubmenuCore(t)}_isSubmenuVisible(t){return t.css("visibility")==="visible"}_drawSubmenu(t){var i=this.option("animation")?this.option("animation").show:{},n=t.children(".".concat(en)),r=this._getSubmenuPosition(t);this._overlay&&this._overlay.option("visible")&&(E(this._shownSubmenus)||(this._shownSubmenus=[]),this._shownSubmenus.includes(n)||this._shownSubmenus.push(n),i&&zt.stop(n),xi.setup(n,r),i&&(Ye(i.to)&&(i.to.position=r),this._animate(n,i)),n.css("visibility","visible"))}_animate(t,i){zt.animate(t,i)}_getSubmenuPosition(t){var i=this.option("submenuDirection").toLowerCase(),n=t.parent(".".concat(ub)),r={collision:"flip",of:n,offset:{h:0,v:-1}};switch(i){case"left":r.at="left top",r.my="right top";break;case"right":r.at="right top",r.my="left top";break;default:this.option("rtlEnabled")?(r.at="left top",r.my="right top"):(r.at="right top",r.my="left top")}return r}_updateSubmenuVisibilityOnClick(t){if(t.args.length){var i=t.args[0].itemData,n=this._dataAdapter.getNodeByItem(i);if(n){var r=v(t.args[0].itemElement),a=r.find(".".concat(en)),o=this._hasSubmenu(n)&&!a.length;if(o&&(this._renderSubmenuItems(n,r),a=r.find(".".concat(en))),!(r.context===a.context&&a.css("visibility")==="visible")){this._updateSelectedItemOnClick(t);var s=i&&i.closeMenuOnClick===!1;if(!(!i||i.disabled||s))if(a.length===0){var l=v(r.parents(".".concat(en))[0]);this._hideSubmenu(l),!t.canceled&&this._overlay&&this._overlay.option("visible")&&this.option("visible",!1)}else this._shownSubmenus&&this._shownSubmenus.length>0&&this._shownSubmenus[0].is(a)&&this._hideSubmenu(a),this._showSubmenu(r)}}}}_hideSubmenu(t){var i=k([],this._shownSubmenus);V(i,(n,r)=>{(t.is(r)||ma(t[0],r[0]))&&(r.parent().removeClass(rs),this._hideSubmenuCore(r))})}_hideSubmenuCore(t){var i=this._shownSubmenus.indexOf(t),n=this.option("animation")?this.option("animation").hide:null;i>=0&&this._shownSubmenus.splice(i,1),this._stopAnimate(t),n&&this._animate(t,n),t.css("visibility","hidden")}_stopAnimate(t){zt.stop(t,!0)}_hideAllShownSubmenus(){var t=k([],this._shownSubmenus),i=this._overlay.$content().find(".".concat(rs));i.removeClass(rs),V(t,(n,r)=>{this._hideSubmenu(r)})}_visibilityChanged(t){t&&this._renderContentImpl()}_optionChanged(t){if(cb.includes(t.name)){this._initActions();return}switch(t.name){case"visible":this._renderVisibility(t.value);break;case"showEvent":case"position":case"submenuDirection":this._invalidate();break;case"target":t.previousValue&&this._detachShowContextMenuEvents(t.previousValue),this._invalidate();break;case"closeOnOutsideClick":case"hideOnOutsideClick":break;default:super._optionChanged(t)}}_renderVisibility(t){return t?this._show():this._hide()}_toggleVisibility(){}_show(t){var i={jQEvent:t},n=new se().reject().promise();if(this._actions.onShowing(i),i.cancel)return n;var r=this._positionContextMenu(t);if(r){var a;this._overlay||(this._renderContextMenuOverlay(),this._overlay.$content().addClass(this._widgetClass()),this._renderFocusState(),this._attachHoverEvents(),this._attachClickEvent(),this._renderItems(this._dataAdapter.getRootNodes())),this._setOptionWithoutOptionChange("visible",!0),this._overlay.option("position",r),n=this._overlay.show(),t&&t.stopPropagation(),this._setAriaAttributes(),(t==null||(a=t.originalEvent)===null||a===void 0?void 0:a.type)===Ea.name&&this.preventShowingDefaultContextMenuAboveOverlay()}return n}_setAriaAttributes(){this._overlayContentId="dx-".concat(new si),this.setAria("owns",this._overlayContentId),this.setAria({id:this._overlayContentId,role:"menu"},this._overlay.$content())}_cleanAriaAttributes(){this._overlay&&this.setAria("id",null,this._overlay.$content()),this.setAria("owns",void 0)}_getTarget(){return this.option("target")||this.option("position").of||v(me.getDocument())}_getContextMenuPosition(){return k({},this.option("position"),{of:this._getTarget()})}_positionContextMenu(t){var i=this._getContextMenuPosition(),n=this._isInitialOptionValue("position"),r=this._createActionByOption("onPositioning",a);t&&t.preventDefault&&n&&(i.of=t);var a={position:i,event:t};return r(a),a.cancel?i=null:a.event&&(a.event.cancel=!0,t.preventDefault()),i}_refresh(){if(!Ue())super._refresh();else if(this._overlay){var t=this._overlay.option("position");super._refresh(),this._overlay&&this._overlay.option("position",t)}else super._refresh()}_hide(){var t;return this._overlay&&(t=this._overlay.hide(),this._setOptionWithoutOptionChange("visible",!1)),this._cleanAriaAttributes(),this.option("focusedElement",null),t||new se().reject().promise()}toggle(t){var i=this.option("visible");return t=t===void 0?!i:t,this._renderVisibility(t)}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}}tt("dxContextMenu",vC);var hK="dx-context-menu",fK={columnHeadersView:"header",rowsView:"content",footerView:"footer",headerPanel:"headerPanel"},pK=["columnHeadersView","rowsView","footerView","headerPanel"],vK=Dt.ViewController.inherit({init:function(){this.createAction("onContextMenuPreparing")},getContextMenuItems:function(e){if(!e)return!1;var t=this,i=v(e.target),n,r,a,o;return V(pK,function(){var s=t.getView(this);if(n=s&&s.element(),n&&(n.is(i)||n.find(i).length)){var l,u;a=i.closest(".dx-row > td, .dx-row > tr"),r=a.parent();var d=s.getRowIndex(r),c=a[0]&&a[0].cellIndex,h=r.data("options"),f={event:e,targetElement:Me(i),target:fK[this],rowIndex:d,row:s._getRows()[d],columnIndex:c,column:h==null||(l=h.cells)===null||l===void 0||(u=l[c])===null||u===void 0?void 0:u.column};if(f.items=s.getContextMenuItems&&s.getContextMenuItems(f),t.executeAction("onContextMenuPreparing",f),t._contextMenuPrepared(f),o=f.items,o)return!1}}),o},_contextMenuPrepared:re}),_K=Dt.View.inherit({_renderCore:function(){var e=this,t=e.element().addClass(hK);this.setAria("role","presentation",t),this._createComponent(t,vC,{onPositioning:function(i){var n=i.event,r=i.component,a=e.getController("contextMenu").getContextMenuItems(n);a?(r.option("items",a),n.stopPropagation()):i.cancel=!0},onItemClick:function(i){i.itemData.onItemClick&&i.itemData.onItemClick(i)},cssClass:e.getWidgetContainerClass(),target:e.component.$element()})}}),mK={defaultOptions:function(){return{onContextMenuPreparing:null}},controllers:{contextMenu:vK},views:{contextMenuView:_K}};Oe.registerModule("contextMenu",mK);var ml="dx-error-row",fb="dx-error-message",gK="dx-closebutton",CK="action",yK=Dt.ViewController.inherit({init:function(){this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView")},_createErrorRow:function(e,t){var i=this,n,r,a=this._renderErrorMessage(e);return t?(n=v("<tr>").addClass(ml),r=v("<div>").addClass(gK).addClass(i.addWidgetPrefix(CK)),R.on(r,vt,i.createAction(function(o){var s=o.event,l,u=v(s.currentTarget).closest("."+ml).index();s.stopPropagation(),V(t,function(d,c){l=v(c).children("tbody").children("tr").eq(u),i.removeErrorRow(l)}),i.getController("resizing")&&i.getController("resizing").fireContentReadyAction()})),v("<td>").attr({colSpan:i.getController("columns").getVisibleColumns().length,role:"presentation"}).prepend(r).append(a).appendTo(n),n):a},_renderErrorMessage:function(e){var t=e.url?e.message.replace(e.url,""):e.message||e,i=v("<div>").addClass(fb).text(t);return e.url&&v("<a>").attr("href",e.url).text(e.url).appendTo(i),i},renderErrorRow:function(e,t,i){var n=this,r,a;if(i)return i.find("."+fb).remove(),r=n._createErrorRow(e),i.prepend(r),r;var o=t>=0||!n._columnHeadersView.isVisible()?n._rowsView:n._columnHeadersView,s=o.getTableElements();V(s,function(u,d){if(r=n._createErrorRow(e,s),a=a||r,t>=0){var c=o._getRowElements(v(d)).eq(t);n.removeErrorRow(c.next()),r.insertAfter(c)}else{var h=v(d).children("tbody"),f=h.children("tr");n._columnHeadersView.isVisible()?(n.removeErrorRow(f.last()),v(d).append(r)):(n.removeErrorRow(f.first()),h.first().prepend(r))}});var l=n.getController("resizing");return l&&l.fireContentReadyAction(),a},removeErrorRow:function(e){if(!e){var t=this._columnHeadersView&&this._columnHeadersView.element();if(e=t&&t.find("."+ml),!e||!e.length){var i=this._rowsView.element();e=i&&i.find("."+ml)}}e&&e.hasClass(ml)&&e.remove()},optionChanged:function(e){switch(e.name){case"errorRowEnabled":e.handled=!0;break;default:this.callBase(e)}}}),xK={defaultOptions:function(){return{errorRowEnabled:!0}},controllers:{errorHandling:yK},extenders:{controllers:{data:{init:function(){var e=this,t=e.getController("errorHandling");e.callBase(),e.dataErrorOccurred.add(function(i,n){e.option("errorRowEnabled")&&t.renderErrorRow(i,void 0,n)}),e.changed.add(function(i){if(!(i&&i.changeType==="loadError")){var n=e.getController("errorHandling"),r=e.getController("editing");r&&!r.hasChanges()&&n&&n.removeErrorRow()}})}}}}};Oe.registerModule("errorHandling",xK);var pb="borders",bK="table-fixed",SK="important-margin",LO="dx-gridbase-container",Md="adaptiveHidden",_C=["columnsSeparatorView","blockSeparatorView","trackerView","headerPanel","columnHeadersView","rowsView","footerView","columnChooserView","filterPanelView","pagerView","draggingHeaderView","contextMenuView","errorView","headerFilterView","filterBuilderView"],gl=function(e){return Ve(e)&&e.slice(-1)==="%"},EK=function(e){return Ve(e)&&e.slice(-2)==="px"},wK=function(e){var t=e.get(0).clientHeight,i=parseFloat(e.css("paddingTop")),n=parseFloat(e.css("paddingBottom"));return t-i-n},PO=function(e,t){var i=e._rowsView.contentWidth(),n=e._getTotalWidth(t,i);return i-n},IK=function(e,t,i,n){return PO(e,n.map(function(r,a){return a===t?i:r}))},TK=function(e,t){cz(e),be.setSelectionRange(e,t)},AK=Dt.ViewController.inherit({_initPostRenderHandlers:function(){var e=this._dataController;this._refreshSizesHandler||(this._refreshSizesHandler=t=>{e.changed.remove(this._refreshSizesHandler);var i=t&&t.templateDeferreds||[];De.apply(this,i).done(()=>{this._refreshSizes(t)})},e.changed.add(()=>{e.changed.add(this._refreshSizesHandler)}))},_refreshSizes:function(e){var t,i=this,n=e&&e.changeType,r=e&&e.isDelayed,a=i._dataController.items();if(!e||n==="refresh"||n==="prepend"||n==="append")r||(t=i.resize());else if(n==="update"){var o;if(((o=e.changeTypes)===null||o===void 0?void 0:o.length)===0)return;(a.length>1||e.changeTypes[0]!=="insert")&&!(a.length===0&&e.changeTypes[0]==="remove")&&!e.needUpdateDimensions?Vi(()=>Qt(()=>Vi(()=>{i._setScrollerSpacing(i._hasHeight),i._rowsView.resize()}))):t=i.resize()}n&&n!=="updateSelection"&&n!=="updateFocusedRow"&&n!=="pageIndex"&&!r&&De(t).done(function(){i._setAriaRowColCount(),i.fireContentReadyAction()})},fireContentReadyAction:function(){this.component._fireContentReadyAction()},_setAriaRowColCount:function(){var e=this.component;e.setAria({rowCount:this._dataController.totalItemsCount(),colCount:e.columnCount()},e.$element().children("."+LO))},_getBestFitWidths:function(){var e,t=this._rowsView,i=this._columnHeadersView,n=t.getColumnWidths();if(!((e=n)!==null&&e!==void 0&&e.length)){var r,a=i.getTableElement();i.setTableElement((r=t.getTableElement())===null||r===void 0?void 0:r.children(".dx-header")),n=i.getColumnWidths(),i.setTableElement(a)}return n},_setVisibleWidths:function(e,t){var i=this._columnsController;i.beginUpdate(),V(e,function(n,r){var a=i.getColumnId(r);i.columnOption(a,"visibleWidth",t[n])}),i.endUpdate()},_toggleBestFitModeForView:function(e,t,i){if(!(!e||!e.isVisible())){var n=this._rowsView.getTableElements(),r=e.getTableElements();V(n,(a,o)=>{var s,l=v(o),u=r.eq(a);u&&u.length&&(i?s=u.children("tbody").appendTo(l):s=l.children("."+t).appendTo(u),s.toggleClass(t,i),s.toggleClass(this.addWidgetPrefix("best-fit"),i))})}},_toggleBestFitMode:function(e){var t=this._rowsView.getTableElement(),i=this._rowsView.getTableElements().eq(1);t&&(t.css("tableLayout",e?"auto":"fixed"),t.children("colgroup").css("display",e?"none":""),i.toggleClass(this.addWidgetPrefix(bK),!e),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",e),this._toggleBestFitModeForView(this._footerView,"dx-footer",e),this._toggleContentMinHeight(e),this._needStretch()&&(t.get(0).style.width=e?"auto":""))},_toggleContentMinHeight:function(e){if(this.option("wordWrapEnabled")){var t=this._rowsView.getScrollable(),i=this._rowsView._findContentElement();(t==null?void 0:t.option("useNative"))===!1&&i.css({minHeight:e?be.getContentHeightLimit(Lt):""})}},_synchronizeColumns:function(){var e=this._columnsController,t=e.getVisibleColumns(),i=this.option("columnAutoWidth"),n=this._needBestFit(),r=!1,a,o=!1,s=[],l,u;!n&&V(t,function(c,h){if(h.width==="auto")return n=!0,!1}),V(t,function(c,h){if(h.minWidth)return r=!0,!1}),this._setVisibleWidths(t,[]),n&&(l=me.getActiveElement(),u=be.getSelectionRange(l),this._toggleBestFitMode(!0),a=!0);var d=this.component.$element();d&&d[0]&&this._maxWidth&&(delete this._maxWidth,d[0].style.maxWidth=""),Vi(()=>{if(n?(s=this._getBestFitWidths(),V(t,function(h,f){var p=e.getColumnId(f);e.columnOption(p,"bestFitWidth",s[h],!0)})):r&&(s=this._getBestFitWidths()),V(t,function(h){var f=this.width;f!=="auto"&&(E(f)?s[h]=Et(f)||EK(f)?parseFloat(f):f:i||(s[h]=void 0))}),a&&(this._toggleBestFitMode(!1),a=!1,l&&l!==me.getActiveElement())){var c=Ut(l).bottom<0;c||TK(l,u)}o=this._correctColumnWidths(s,t),i&&(function(){var h;V(t,function(f,p){p.type==="groupExpand"&&(h=s[f])}),V(t,function(f,p){p.type==="groupExpand"&&h&&(s[f]=h)})}(),this._needStretch()&&this._processStretch(s,t)),Qt(()=>{(n||o)&&this._setVisibleWidths(t,s)})})},_needBestFit:function(){return this.option("columnAutoWidth")},_needStretch:function(){return this._columnsController.getVisibleColumns().some(e=>e.width==="auto"&&!e.command)},_getAverageColumnsWidth:function(e){var t=PO(this,e),i=e.filter(function(n){return n===void 0}).length;return t/i},_correctColumnWidths:function(e,t){var i=this,n,r=!1,a=!1,o=!1,s=i.component.$element(),l=i._hasWidth,u=function(){var g=n,C=t[g],b=e[g]===Md,A=e[g],B=C.minWidth;if(B){if(A===void 0){var D=i._getAverageColumnsWidth(e);A=D}else if(gl(A)){var U=IK(i,g,B,e);U<0&&(A=-1)}}var H=i._getRealColumnWidth(g,e.map(function(W,G){return g===G?A:W}));B&&!b&&H<B&&(e[g]=B,o=!0,n=-1),E(C.width)||(a=!0),gl(C.width)&&(r=!0)};for(n=0;n<t.length;n++)u();if(!a&&e.length){var d=i._rowsView.element(),c=i._rowsView.contentWidth(),h=i._rowsView.getScrollbarWidth(),f=i._getTotalWidth(e,c);if(f<c){var p=be.getLastResizableColumnIndex(t,e);if(p>=0&&(e[p]="auto",o=!0,l===!1&&!r)){var m=i.option("showBorders")?Math.ceil(ot(d)-b_(d)):0;i._maxWidth=f+h+m,s.css("maxWidth",i._maxWidth)}}}return o},_processStretch:function(e,t){var i=this._rowsView.contentWidth(),n=this._getTotalWidth(e,i),r={length:0};if(e.length){V(t,function(u){(this.width||e[u]===Md)&&(r[u]=!0,r.length++)});var a=i-n,o=Math.floor(a/(e.length-r.length)),s=a-o*(e.length-r.length);if(a>=0)for(var l=0;l<e.length;l++)r[l]||(e[l]+=o,s>0&&(s<1?(e[l]+=s,s=0):(e[l]++,s--)))}},_getRealColumnWidth:function(e,t,i){var n=1,r=t[e];if(!gl(r))return parseFloat(r);var a=t.reduce((u,d,c)=>gl(d)?u+parseFloat(d):u,0),o=t.reduce((u,d)=>!d||d===Md||gl(d)?u:u+parseFloat(d),0);i=i||this._rowsView.contentWidth();var s=i-o,l=a*i/100;return o>0&&l+o>=i&&(n=l>s?s/l:1),parseFloat(r)*i*n/100},_getTotalWidth:function(e,t){for(var i=0,n=0;n<e.length;n++){var r=e[n];r&&r!==Md&&(i+=this._getRealColumnWidth(n,e,t))}return Math.ceil(i)},updateSize:function(e){var t,i,n=v(e),r=this.addWidgetPrefix(SK);this._hasHeight===void 0&&n&&n.is(":visible")&&He(n)&&(t=n.children("."+this.getWidgetContainerClass()),t.length&&t.detach(),this._hasHeight=!!wK(n),i=He(n),n.addClass(r),this._hasWidth=He(n)===i,n.removeClass(r),t.length&&t.appendTo(n))},publicMethods:function(){return["resize","updateDimensions"]},resize:function(){return!this.component._requireResize&&this.updateDimensions()},updateDimensions:function(e){var t=this;if(t._initPostRenderHandlers(),!!t._checkSize(e)){var i=t._resizeDeferred,n=t._resizeDeferred=new se;return De(i).always(function(){Qt(function(){t._dataController.isLoaded()&&t._synchronizeColumns(),t._resetGroupElementHeight(),Vi(function(){Qt(function(){Vi(function(){t._updateDimensionsCore()})})})}).done(n.resolve).fail(n.reject)}),n.promise()}},_resetGroupElementHeight:function(){var e=this.component.$element().children().get(0),t=this._rowsView.getScrollable();e&&e.style.height&&(!t||!t.scrollTop())&&(e.style.height="")},_checkSize:function(e){var t=this.component.$element();return!(e&&(this._lastWidth===He(t)&&this._lastHeight===Ke(t)&&this._devicePixelRatio===je().devicePixelRatio||!t.is(":visible")))},_setScrollerSpacingCore:function(e){var t=this,i=e?t._rowsView.getScrollbarWidth():0,n=t._rowsView.getScrollbarWidth(!0);Qt(function(){t._columnHeadersView&&t._columnHeadersView.setScrollerSpacing(i),t._footerView&&t._footerView.setScrollerSpacing(i),t._rowsView.setScrollerSpacing(i,n)})},_setScrollerSpacing:function(e){this.option("scrolling.useNative")===!0?Qt(()=>{Vi(()=>{this._setScrollerSpacingCore(e)})}):this._setScrollerSpacingCore(e)},_updateDimensionsCore:function(){var e=this,t=e._dataController,i=e._rowsView,n=e.component.$element(),r=n.children().get(0),a=n&&(n.get(0).clientHeight||Ke(n)),o=parseInt(n.css("maxHeight")),s=o&&a>=o,l=e.option("height")||n.get(0).style.height,u=e.getController("editorFactory"),d=s&&r.scrollHeight===r.offsetHeight,c;e.updateSize(n);var h=e._hasHeight||s;l&&e._hasHeight^l!=="auto"&&(c=v("<div>"),gn(c,l),c.appendTo(n),e._hasHeight=!!Ke(c),c.remove()),Qt(function(){if(i.height(null,h),s&&!d&&v(r).css("height",o),!t.isLoaded()){i.setLoading(t.isLoading());return}Vi(function(){e._updateLastSizes(n),e._setScrollerSpacing(h),V(_C,function(f,p){var m=e.getView(p);m&&m.resize()}),u&&u.resize()})})},_updateLastSizes:function(e){this._lastWidth=He(e),this._lastHeight=Ke(e),this._devicePixelRatio=je().devicePixelRatio},optionChanged:function(e){switch(e.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":e.handled=!0;return;default:this.callBase(e)}},init:function(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView")}}),DK=Dt.ViewController.inherit({_scrollChangedHandler:function(e,t,i){for(var n=0;n<e.length;n++)e[n]&&e[n].name!==i&&e[n].scrollTo({left:t.left,top:t.top})},init:function(){for(var e=[this.getView("columnHeadersView"),this.getView("footerView"),this.getView("rowsView")],t=0;t<e.length;t++){var i=e[t];i&&i.scrollChanged.add(this._scrollChangedHandler.bind(this,e))}}}),OK=Dt.View.inherit({_endUpdateCore:function(){this.component._requireResize&&(this.component._requireResize=!1,this._resizingController.resize())},_getWidgetAriaLabel:function(){return"dxDataGrid-ariaDataGrid"},init:function(){this._resizingController=this.getController("resizing"),this._dataController=this.getController("data")},getView:function(e){return this.component._views[e]},element:function(){return this._groupElement},optionChanged:function(e){E(this._groupElement)&&e.name==="showBorders"?(this._groupElement.toggleClass(this.addWidgetPrefix(pb),!!e.value),e.handled=!0):this.callBase(e)},_renderViews:function(e){var t=this;V(_C,function(i,n){var r=t.getView(n);r&&r.render(e)})},_getTableRoleName:function(){return"grid"},render:function(e){var t=!this._groupElement,i=this._groupElement||v("<div>").addClass(this.getWidgetContainerClass());i.addClass(LO),i.toggleClass(this.addWidgetPrefix(pb),!!this.option("showBorders")),this.setAria("role","presentation",e),this.component.setAria({role:this._getTableRoleName(),label:fe.format(this._getWidgetAriaLabel())},i),this._rootElement=e||this._rootElement,t&&(this._groupElement=i,Ue()&&this.getController("resizing").updateSize(e),i.appendTo(e)),this._renderViews(i)},update:function(){var e=this._rootElement,t=this._groupElement,i=this.getController("resizing");e&&t&&(i.resize(),this._dataController.isLoaded()&&this._resizingController.fireContentReadyAction())}}),RK={defaultOptions:function(){return{showBorders:!1,renderAsync:!1}},controllers:{resizing:AK,synchronizeScrolling:DK},views:{gridView:OK},VIEW_NAMES:_C};Oe.registerModule("gridView",RK);var sf="dxswipestart",lf="dxswipe",dd="dxswipeend",kK={defaultItemSizeFunc:function(){return He(this.getElement())},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(e){var t=Gt(e);return(t.x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,e)},isFastSwipe:function(e){var t=Gt(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.x-this._tickData.x)>=t.time-this._tickData.time}},BK={defaultItemSizeFunc:function(){return Ke(this.getElement())},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(e){var t=Gt(e);return(t.y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,e)},isFastSwipe:function(e){var t=Gt(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.y-this._tickData.y)>=t.time-this._tickData.time}},LK={horizontal:kK,vertical:BK},PK=zu.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor:function(e){this.callBase(e),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return LK[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init:function(e){this._tickData=Gt(e)},_start:function(e){this._savedEventData=Gt(e),e=this._fireEvent(sf,e),e.cancel||(this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset)},_move:function(e){var t=this._getStrategy(),i=Gt(e),n=t.calcOffsetRatio.call(this,e);n=this._fitOffset(n,this.elastic),i.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=i),this._fireEvent(lf,e,{offset:n}),e.preventDefault()},_end:function(e){var t=this._getStrategy(),i=t.calcOffsetRatio.call(this,e),n=t.isFastSwipe.call(this,e),r=i,a=this._calcTargetOffset(i,n);r=this._fitOffset(r,this.elastic),a=this._fitOffset(a,!1),this._fireEvent(dd,e,{offset:r,targetOffset:a})},_fitOffset:function(e,t){var i=this._getStrategy(),n=i.getBounds.call(this);return e<-n[0]?t?(-2*n[0]+e)/3:-n[0]:e>n[1]?t?(2*n[1]+e)/3:n[1]:e},_calcTargetOffset:function(e,t){var i;return t?(i=Math.ceil(Math.abs(e)),e<0&&(i=-i)):i=Math.round(e),i}});Js({emitter:PK,events:[sf,lf,dd]});var vb="dx-list-item-badge-container",FK="dx-list-item-badge",MK="dx-badge",Rp="dx-list-item-chevron-container",VK="dx-list-item-chevron",NK=Lo.inherit({_renderWatchers:function(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this)),this._startWatcher("showChevron",this._renderShowChevron.bind(this))},_renderBadge:function(e){if(this._$element.children("."+vb).remove(),!!e){var t=v("<div>").addClass(vb).append(v("<div>").addClass(FK).addClass(MK).text(e)),i=this._$element.children("."+Rp).first();i.length>0?t.insertBefore(i):t.appendTo(this._$element)}},_renderShowChevron:function(e){if(this._$element.children("."+Rp).remove(),!!e){var t=v("<div>").addClass(Rp),i=v("<div>").addClass(VK);t.append(i).appendTo(this._$element)}}}),_b="dx-scrollview-pull-down-loading",kp="dx-scrollview-pull-down-ready",$K="dx-scrollview-pull-down-image",HK="dx-scrollview-pull-down-indicator",WK="dx-scrollview-pull-down-text",zK="dx-scrollview-pull-down-text-visible",Vd=0,Cl=1,Nd=2,Bp=3,GK=400,UK=Zg.inherit({_init:function(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$refreshingText=e._$refreshingText,this._$scrollViewContent=v(e.content()),this._$container=v(e.container()),this._initCallbacks()},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown:function(){var e=v("<div>").addClass($K),t=v("<div>").addClass(HK),i=new vn(v("<div>")).$element(),n=this._$pullDownText=v("<div>").addClass(WK);this._$pullingDownText=v("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=v("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=v("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(e).append(t.append(i)).append(n)},_releaseState:function(){this._state=Vd,this._refreshPullDownText()},_refreshPullDownText:function(){var e=this,t=[{element:this._$pullingDownText,visibleState:Vd},{element:this._$pulledDownText,visibleState:Cl},{element:this._$refreshingText,visibleState:Nd}];V(t,function(i,n){var r=e._state===n.visibleState?"addClass":"removeClass";n.element[r](zK)})},update:function(){this.callBase(),this._setTopPocketOffset()},_updateDimensions:function(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;var e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections:function(){var e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},_setTopPocketOffset:function(){this._$topPocket.css({top:-this._topPocketSize})},handleEnd:function(){this.callBase(),this._complete()},handleStop:function(){this.callBase(),this._complete()},_complete:function(){this._state===Cl&&(this._setPullDownOffset(this._topPocketSize),clearTimeout(this._pullDownRefreshTimeout),this._pullDownRefreshTimeout=setTimeout((function(){this._pullDownRefreshing()}).bind(this),400))},_setPullDownOffset:function(e){ri(this._$topPocket,{top:e}),ri(this._$scrollViewContent,{top:e})},handleScroll:function(e){if(this.callBase(e),this._state!==Nd){var t=this.location().top,i=(this._location||0)-t;this._location=t,this._isPullDown()?this._pullDownReady():i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()}},_isPullDown:function(){return this._pullDownEnabled&&this._location>=this._topPocketSize},_isReachBottom:function(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom:function(){this._state!==Bp&&(this._state=Bp,this.reachBottomCallbacks.fire())},_pullDownReady:function(){this._state!==Cl&&(this._state=Cl,this._$pullDown.addClass(kp),this._refreshPullDownText())},_stateReleased:function(){this._state!==Vd&&(this._$pullDown.removeClass(_b).removeClass(kp),this._releaseState())},_pullDownRefreshing:function(){this._state!==Nd&&(this._state=Nd,this._$pullDown.addClass(_b).removeClass(kp),this._refreshPullDownText(),this.pullDownCallbacks.fire())},pullDownEnable:function(e){e&&(this._updateDimensions(),this._setTopPocketOffset()),this._pullDownEnabled=e},reachBottomEnable:function(e){this._reachBottomEnabled=e},pendingRelease:function(){this._state=Cl},release:function(){var e=new se;return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._state===Bp&&(this._state=Vd),this._releaseTimeout=setTimeout((function(){this._setPullDownOffset(0),this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}).bind(this),GK),e.promise()},dispose:function(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),mb="dx-scrollview-pull-down-loading",KK="dx-scrollview-pull-down-indicator",jK="dx-scrollview-pull-down-refreshing",qK="dx-icon-pulldown",Lp=0,YK=1,gb=2,Pp=4,$d=5,XK=Zg.inherit({_init:function(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$scrollViewContent=v(e.content()),this._$container=v(e.container()),this._initCallbacks(),this._location=0},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown:function(){var e=v("<div>").addClass(KK),t=new vn(v("<div>")).$element();this._$icon=v("<div>").addClass(qK),this._$pullDown.empty().append(this._$icon).append(e.append(t))},_releaseState:function(){this._state=Lp,this._releasePullDown(),this._updateDimensions()},_releasePullDown:function(){this._$pullDown.css({opacity:0})},_updateDimensions:function(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;var e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections:function(){var e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},handleInit:function(e){this.callBase(e),this._state===Lp&&this._location===0&&(this._startClientY=Gt(e.originalEvent).y,this._state=Pp)},handleMove:function(e){this.callBase(e),this._deltaY=Gt(e.originalEvent).y-this._startClientY,this._state===Pp&&(this._pullDownEnabled&&this._deltaY>0?this._state=$d:this._complete()),this._state===$d&&(e.preventDefault(),this._movePullDown())},_movePullDown:function(){var e=this._getPullDownHeight(),t=Math.min(3*e,this._deltaY+this._getPullDownStartPosition()),i=180*t/e/3;this._$pullDown.css({opacity:1}).toggleClass(jK,t<e),ri(this._$pullDown,{top:t}),this._$icon.css({transform:"rotate("+i+"deg)"})},_isPullDown:function(){return this._pullDownEnabled&&this._state===$d&&this._deltaY>=this._getPullDownHeight()-this._getPullDownStartPosition()},_getPullDownHeight:function(){return Math.round(.05*nt(this._$element))},_getPullDownStartPosition:function(){return-Math.round(1.5*nt(this._$pullDown))},handleEnd:function(){this._isPullDown()&&this._pullDownRefreshing(),this._complete()},handleStop:function(){this._complete()},_complete:function(){(this._state===Pp||this._state===$d)&&this._releaseState()},handleScroll:function(e){if(this.callBase(e),this._state!==gb){var t=this.location().top,i=this._location-t;this._location=t,i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()}},_isReachBottom:function(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom:function(){this.reachBottomCallbacks.fire()},_stateReleased:function(){this._state!==Lp&&(this._$pullDown.removeClass(mb),this._releaseState())},_pullDownRefreshing:function(){this._state=gb,this._pullDownRefreshHandler()},_pullDownRefreshHandler:function(){this._refreshPullDown(),this.pullDownCallbacks.fire()},_refreshPullDown:function(){this._$pullDown.addClass(mb),ri(this._$pullDown,{top:this._getPullDownHeight()})},pullDownEnable:function(e){this._$topPocket.toggle(e),this._pullDownEnabled=e},reachBottomEnable:function(e){this._reachBottomEnabled=e},pendingRelease:function(){this._state=YK},release:function(){var e=new se;return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._releaseTimeout=setTimeout((function(){this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}).bind(this),800),e.promise()},dispose:function(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),ZK=Math,Cb="dx-scrollview-pull-down-loading",Fp="dx-scrollview-pull-down-ready",JK="dx-scrollview-pull-down-image",QK="dx-scrollview-pull-down-indicator",e8="dx-scrollview-pull-down-text",t8="dx-scrollview-pull-down-text-visible",yl=0,xl=1,Mp=2,Vp=3,i8=gD.inherit({ctor:function(){this._topPocketSize=0,this._bottomPocketSize=0,this.callBase.apply(this,arguments),this._initCallbacks(),this._releaseState()},_releaseState:function(){this._state=yl,this._refreshPullDownText()},_refreshPullDownText:function(){var e=this,t=[{element:this._$pullingDownText,visibleState:yl},{element:this._$pulledDownText,visibleState:xl},{element:this._$refreshingText,visibleState:Mp}];V(t,function(i,n){var r=e._state===n.visibleState?"addClass":"removeClass";n.element[r](t8)})},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},_updateBounds:function(){var e=this._direction!=="horizontal";if(e){this._topPocketSize=this._$topPocket.get(0).clientHeight,this._bottomPocketSize=this._$bottomPocket.get(0).clientHeight;var t=this._$container.get(0),i=this._$content.get(0),n=Math.max(i.clientHeight-t.clientHeight,0);this._bottomBoundary=n-this._topPocketSize-this._bottomPocketSize}this.callBase()},_updateScrollbar:function(){this._scrollbar.option({containerSize:this._containerSize(),contentSize:this._contentSize()-this._topPocketSize-this._bottomPocketSize,scaleRatio:this._getScaleRatio()})},_moveContent:function(){this.callBase(),this._isPullDown()?this._pullDownReady():this._isReachBottom()?this._reachBottomReady():this._state!==yl&&this._stateReleased()},_moveScrollbar:function(){this._scrollbar.moveTo(this._topPocketSize+this._location)},_isPullDown:function(){return this._pullDownEnabled&&this._location>=0},_isReachBottom:function(){var e=this._$container.get(0);return this._reachBottomEnabled&&Math.round(this._bottomBoundary-Math.ceil(e.scrollTop))<=1},_scrollComplete:function(){this._inBounds()&&this._state===xl?this._pullDownRefreshing():this._inBounds()&&this._state===Vp?this._reachBottomLoading():this.callBase()},_reachBottomReady:function(){this._state!==Vp&&(this._state=Vp,this._minOffset=this._getMinOffset())},_getMaxOffset:function(){return-this._topPocketSize},_getMinOffset:function(){return ZK.min(this.callBase(),-this._topPocketSize)},_reachBottomLoading:function(){this.reachBottomCallbacks.fire()},_pullDownReady:function(){this._state!==xl&&(this._state=xl,this._maxOffset=0,this._$pullDown.addClass(Fp),this._refreshPullDownText())},_stateReleased:function(){this._state!==yl&&(this._releaseState(),this._updateBounds(),this._$pullDown.removeClass(Cb).removeClass(Fp),this.releaseCallbacks.fire())},_pullDownRefreshing:function(){this._state!==Mp&&(this._state=Mp,this._$pullDown.addClass(Cb).removeClass(Fp),this._refreshPullDownText(),this.pullDownCallbacks.fire())},_releaseHandler:function(){return this._state===yl&&this._moveToBounds(),this._update(),this._releaseTask&&this._releaseTask.abort(),this._releaseTask=Lh(this._release.bind(this)),this._releaseTask.promise},_release:function(){this._stateReleased(),this._scrollComplete()},_reachBottomEnablingHandler:function(e){this._reachBottomEnabled!==e&&(this._reachBottomEnabled=e,this._updateBounds())},_pullDownEnablingHandler:function(e){this._pullDownEnabled!==e&&(this._pullDownEnabled=e,this._considerTopPocketChange(),this._updateHandler())},_considerTopPocketChange:function(){this._location-=Ke(this._$topPocket)||-this._topPocketSize,this._maxOffset=0,this._move()},_pendingReleaseHandler:function(){this._state=xl},dispose:function(){this._releaseTask&&this._releaseTask.abort(),this.callBase()}}),n8=CD.inherit({_init:function(e){this.callBase(e),this._$pullDown=e._$pullDown,this._$topPocket=e._$topPocket,this._$bottomPocket=e._$bottomPocket,this._initCallbacks()},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this._renderPullDown(),this.callBase()},_renderPullDown:function(){var e=v("<div>").addClass(JK),t=v("<div>").addClass(QK),i=new vn(v("<div>")).$element(),n=this._$pullDownText=v("<div>").addClass(e8);this._$pullingDownText=v("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=v("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=v("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(e).append(t.append(i)).append(n)},pullDownEnable:function(e){this._eventHandler("pullDownEnabling",e)},reachBottomEnable:function(e){this._eventHandler("reachBottomEnabling",e)},_createScroller:function(e){var t=this,i=t._scrollers[e]=new i8(t._scrollerOptions(e));i.pullDownCallbacks.add(function(){t.pullDownCallbacks.fire()}),i.releaseCallbacks.add(function(){t.releaseCallbacks.fire()}),i.reachBottomCallbacks.add(function(){t.reachBottomCallbacks.fire()})},_scrollerOptions:function(e){return k(this.callBase(e),{$topPocket:this._$topPocket,$bottomPocket:this._$bottomPocket,$pullDown:this._$pullDown,$pullDownText:this._$pullDownText,$pullingDownText:this._$pullingDownText,$pulledDownText:this._$pulledDownText,$refreshingText:this._$refreshingText})},pendingRelease:function(){this._eventHandler("pendingRelease")},release:function(){return this._eventHandler("release").done(this._updateAction)},location:function(){var e=this.callBase();return e.top+=Ke(this._$topPocket),e},dispose:function(){V(this._scrollers,function(){this.dispose()}),this.callBase()}}),Mo="dx-scrollview",r8=Mo+"-content",a8=Mo+"-top-pocket",o8=Mo+"-bottom-pocket",s8=Mo+"-pull-down",mC=Mo+"-scrollbottom",l8=mC+"-indicator",u8=mC+"-text",d8=Mo+"-loadpanel",c8={pullDown:UK,swipeDown:XK,simulated:n8},h8=!Ue(),f8={finishLoading:re,release:re,refresh:re,_optionChanged:function(e){if(e.name!=="onUpdated")return this.callBase.apply(this,arguments)}},gC=_n.inherit(h8?f8:{_getDefaultOptions:function(){return k(this.callBase(),{pullingDownText:fe.format("dxScrollView-pullingDownText"),pulledDownText:fe.format("dxScrollView-pulledDownText"),refreshingText:fe.format("dxScrollView-refreshingText"),reachBottomText:fe.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){var e=Re.real();return e.platform==="android"},options:{refreshStrategy:"swipeDown"}},{device:function(){return ei()},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init:function(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup:function(){this.callBase(),this.$element().addClass(Mo),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent:function(){var e=v("<div>").addClass(r8);this._$content.wrapInner(e)},_initTopPocket:function(){var e=this._$topPocket=v("<div>").addClass(a8),t=this._$pullDown=v("<div>").addClass(s8);e.append(t),this._$content.prepend(e)},_initBottomPocket:function(){var e=this._$bottomPocket=v("<div>").addClass(o8),t=this._$reachBottom=v("<div>").addClass(mC),i=v("<div>").addClass(l8),n=new vn(v("<div>")).$element(),r=this._$reachBottomText=v("<div>").addClass(u8);this._updateReachBottomText(),t.append(i.append(n)).append(r),e.append(t),this._$content.append(e)},_initLoadPanel:function(){var e=v("<div>").addClass(d8).appendTo(this.$element()),t={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(e,Og,t)},_updateReachBottomText:function(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy:function(){var e=this.option("useNative")?this.option("refreshStrategy"):"simulated",t=c8[e];this._strategy=new t(this),this._strategy.pullDownCallbacks.add(this._pullDownHandler.bind(this)),this._strategy.releaseCallbacks.add(this._releaseHandler.bind(this)),this._strategy.reachBottomCallbacks.add(this._reachBottomHandler.bind(this))},_createActions:function(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState:function(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on:function(e){var t=this.callBase.apply(this,arguments);return(e==="pullDown"||e==="reachBottom")&&this._tryRefreshPocketState(),t},_pullDownEnable:function(e){if(arguments.length===0)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(e),this._strategy.pullDownEnable(e),this._pullDownEnabled=e)},_reachBottomEnable:function(e){if(arguments.length===0)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(e),this._strategy.reachBottomEnable(e),this._reachBottomEnabled=e)},_pullDownHandler:function(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator:function(e){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=e},_pullDownLoading:function(){this.startLoading(),this._pullDownAction()},_reachBottomHandler:function(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading:function(){this.startLoading(),this._reachBottomAction()},_releaseHandler:function(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged:function(e){switch(e.name){case"onPullDown":case"onReachBottom":this._createActions();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"refreshStrategy":this._invalidate();break;case"reachBottomText":this._updateReachBottomText();break;default:this.callBase(e)}},content:function(){return Me(this._$content.children().eq(1))},release:function(e){return e!==void 0&&this.toggleLoading(!e),this._strategy.release()},toggleLoading:function(e){this._reachBottomEnable(e)},refresh:function(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading:function(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading:function(){this._loadPanel.hide(),this._unlock()},_dispose:function(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});tt("dxScrollView",gC);var Hd="__dx_key__";const CC=Fo.inherit({_getDefaultOptions:function(){return k(this.callBase(),{repaintChangesOnly:!1})},ctor:function(){this.callBase.apply(this,arguments),this._customizeStoreLoadOptions=e=>{var t=this._dataSource;t&&!t.isLoaded()&&(this._correctionIndex=0),this._correctionIndex&&e.storeLoadOptions&&(e.storeLoadOptions.skip+=this._correctionIndex)},this._dataSource&&this._dataSource.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions)},reload:function(){this._correctionIndex=0},_init:function(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0},_findItemElementByKey:function(e){var t=v(),i=this.key();return this.itemElements().each((n,r)=>{var a=v(r),o=this._getItemData(a);if(i?Gu(i,this.keyOf(o),e):this._isItemEquals(o,e))return t=a,!1}),t},_dataSourceChangedHandler:function(e,t){t!=null&&t.changes?this._modifyByChanges(t.changes):(this.callBase(e,t),this._refreshItemsCache())},_isItemEquals:function(e,t){e&&e[Hd]&&(e=e.data);try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}},_isItemStrictEquals:function(e,t){return this._isItemEquals(e,t)},_shouldAddNewGroup:function(e,t){var i=!1;return this.option("grouped")&&(e.length||(i=!0),V(e,(n,r)=>{r.type==="insert"&&(i=!0,V(t,(a,o)=>{if(r.data.key!==void 0&&r.data.key===o.key)return i=!1,!1}))})),i},_partialRefresh:function(){if(this.option("repaintChangesOnly")){var e=oD(this._itemsCache,this._editStrategy.itemsGetter(),t=>t&&t[Hd]!==void 0?t[Hd]:this.keyOf(t),this._isItemStrictEquals.bind(this));if(e&&this._itemsCache.length&&!this._shouldAddNewGroup(e,this._itemsCache))return this._modifyByChanges(e,!0),this._renderEmptyMessage(),!0;this._refreshItemsCache()}return!1},_refreshItemsCache:function(){if(this.option("repaintChangesOnly")){var e=this._editStrategy.itemsGetter();try{this._itemsCache=k(!0,[],e),this.key()||(this._itemsCache=this._itemsCache.map((t,i)=>({[Hd]:e[i],data:t})))}catch{this._itemsCache=k([],e)}}},_dispose:function(){this._dataSource&&this._dataSource.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions),this.callBase()},_updateByChange:function(e,t,i,n){if(n)this._renderItem(i.index,i.data,null,this._findItemElementByKey(i.key));else{var r=t[bo(e,t,i.key)];r&&Mg(e,t,i.key,i.data).done(()=>{this._renderItem(t.indexOf(r),r,null,this._findItemElementByKey(i.key))})}},_insertByChange:function(e,t,i,n){De(n||Vg(e,t,i.data,i.index)).done(()=>{var r;this._beforeItemElementInserted(i);var a=this._getItemContainer(i.data);this._renderItem((r=i.index)!==null&&r!==void 0?r:t.length,i.data,a),this._afterItemElementInserted(),this._correctionIndex++})},_getItemContainer:function(e){return this._itemContainer()},_updateSelectionAfterRemoveByChange:function(e){var t=this.option("selectedIndex");t>e?this.option("selectedIndex",t-1):t===e&&this.option("selectedItems").length===1?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted:function(e){var t=this.option("selectedIndex");e.index<=t&&this.option("selectedIndex",t+1)},_afterItemElementInserted:re,_removeByChange:function(e,t,i,n){var r=n?i.index:bo(e,t,i.key),a=n?i.oldItem:t[r];if(a){var o=this._findItemElementByKey(i.key),s=this._extendActionArgs(o);this._waitDeletingPrepare(o).done(()=>{n?(this._updateIndicesAfterIndex(r-1),this._afterItemElementDeleted(o,s),this._updateSelectionAfterRemoveByChange(r)):(this._deleteItemElementByIndex(r),this._afterItemElementDeleted(o,s))}),this._correctionIndex--}},_modifyByChanges:function(e,t){var i=this._editStrategy.itemsGetter(),n={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},r=this._dataSource,a=r&&r.paginate(),o=r&&r.group();(a||o)&&(e=e.filter(s=>s.type!=="insert"||s.index!==void 0)),e.forEach(s=>this["_".concat(s.type,"ByChange")](n,i,s,t)),this._renderedItemsCount=i.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer:function(e,t,i){var n=e.children(this._itemSelector()).get(i);me.insertElement(e.get(0),t.get(0),n)},_optionChanged:function(e){switch(e.name){case"items":var t=this._partialRefresh(e.value);t||this.callBase(e);break;case"dataSource":(!this.option("repaintChangesOnly")||!e.value)&&this.option("items",[]),this.callBase(e);break;case"repaintChangesOnly":break;default:this.callBase(e)}}});var p8=e=>Array.isArray(e)&&e.every(t=>{var i=Object.keys(t).length===2,n="key"in t&&"items"in t;return i&&n&&Array.isArray(t.items)});const FO={_getSpecificDataSourceOption:function(){var e=this.option("dataSource"),t=!1,i={};return this._getGroupedOption()&&p8(e)&&(i=e.reduce((n,r)=>{var a=r.items.map(o=>($e(o)||(o={text:o},t=!0),"key"in o||(o.key=r.key),o));return n.concat(a)},[]),e={store:{type:"array",data:i},group:{selector:"key",keepInitialKeyOrder:!0}},t&&(e.searchExpr="text")),e}};var v8="dx-list",Lc="dx-list-item",_8="."+Lc,m8="dx-list-item-icon-container",g8="dx-list-item-icon",as="dx-list-group",Np="dx-list-group-header",Wd="dx-list-group-body",C8="dx-list-collapsible-groups",yb="dx-list-group-collapsed",y8="dx-list-group-header-indicator",x8="dx-has-next",b8="dx-list-next-button",xb="dx-wrap-item-text",S8=".dx-list-select-all",E8="dxListItemData",bb=70,w8=bt("items"),yC=CC.inherit({_activeStateUnit:[_8,S8].join(","),_supportedKeys:function(){var e=this,t=function(n){var r=i(n),a=r.is(e.option("focusedElement"));a&&(function(o,s){var l=o.position().top;s==="prev"&&(l=o.position().top-Ke(e.$element())+nt(o)),e.scrollTo(l)}(r,n),r=i(n)),e.option("focusedElement",Me(r)),e.scrollToItem(r)};function i(n){var r=e.scrollTop(),a=Ke(e.$element()),o=v(e.option("focusedElement")),s=!0;if(!o.length)return v();for(;s;){var l=o[n]();if(!l.length)break;var u=l.position().top+nt(l)/2;s=u<a+r&&u>r,s&&(o=l)}return o}return k(this.callBase(),{leftArrow:re,rightArrow:re,pageUp:function(){return t("prev"),!1},pageDown:function(){return t("next"),!1}})},_getDefaultOptions:function(){return k(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:fe.format("dxList-pullingDownText"),pulledDownText:fe.format("dxList-pulledDownText"),refreshingText:fe.format("dxList-refreshingText"),pageLoadingText:fe.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:fe.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},_listAttributes:{role:"listbox"},useInkRipple:!1,wrapItemText:!1,_swipeEnabled:!0,_revertPageOnEmptyLoad:!1,showChevronExpr:function(e){return e?e.showChevron:void 0},badgeExpr:function(e){return e?e.badge:void 0}})},_defaultOptionsRules:function(){var e=Xn();return this.callBase().concat(yD(),[{device:function(){return!Co},options:{useNativeScrolling:!1}},{device:function(t){return!Co&&!Re.isSimulator()&&Re.real().deviceType==="desktop"&&t.platform==="generic"},options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return ei(e)},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:"",useInkRipple:!0}}])},_visibilityChanged:function(e){e&&this._updateLoadingState(!0)},_itemClass:function(){return Lc},_itemDataKey:function(){return E8},_itemContainer:function(){return this._$container},_saveSelectionChangeEvent:function(e){this._selectionChangeEventInstance=e},_getSelectionChangeEvent:function(){return this._selectionChangeEventInstance},_refreshItemElements:function(){this.option("grouped")?this._itemElementsCache=this._itemContainer().children("."+as).children("."+Wd).children(this._itemSelector()):this._itemElementsCache=this._itemContainer().children(this._itemSelector())},_modifyByChanges:function(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},reorderItem:function(e,t){var i=this.callBase(e,t);return i.done(function(){this._refreshItemElements()})},deleteItem:function(e){var t=this.callBase(e);return t.done(function(){this._refreshItemElements()})},_itemElements:function(){return this._itemElementsCache},_itemSelectHandler:function(e){if(!(this.option("selectionMode")==="single"&&this.isItemSelected(e.currentTarget)))return this.callBase(e)},_allowDynamicItemsAppend:function(){return!0},_resetDataSourcePageIndex:function(){var e=this.getDataSource();e&&e.pageIndex()!==0&&(e.pageIndex(0),e.load())},_init:function(){this.callBase(),this._resetDataSourcePageIndex(),this._$container=this.$element(),this._initScrollView(),this._feedbackShowTimeout=bb,this._createGroupRenderAction()},_scrollBottomMode:function(){return this.option("pageLoadMode")==="scrollBottom"},_nextButtonMode:function(){return this.option("pageLoadMode")==="nextButton"},_dataSourceOptions:function(){var e=this._scrollBottomMode(),t=this._nextButtonMode();return k(this.callBase(),{paginate:Mt(e||t,!0)})},_getGroupedOption:function(){return this.option("grouped")},_getGroupContainerByIndex:function(e){return this._itemContainer().find(".".concat(as)).eq(e).find(".".concat(Wd))},_dataSourceFromUrlLoadMode:function(){return"raw"},_initScrollView:function(){var e=this.option("scrollingEnabled"),t=e&&this.option("pullRefreshEnabled"),i=e&&this._scrollBottomMode()&&!!this._dataSource;this._scrollView=this._createComponent(this.$element(),I8(),{height:this.option("height"),width:this.option("width"),disabled:this.option("disabled")||!e,onScroll:this._scrollHandler.bind(this),onPullDown:t?this._pullDownHandler.bind(this):null,onReachBottom:i?this._scrollBottomHandler.bind(this):null,showScrollbar:this.option("showScrollbar"),useNative:this.option("useNativeScrolling"),bounceEnabled:this.option("bounceEnabled"),scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),reachBottomText:this.option("pageLoadingText"),useKeyboard:!1}),this._$container=v(this._scrollView.content()),this.option("wrapItemText")&&this._$container.addClass(xb),this._createScrollViewActions()},_createScrollViewActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler:function(e){this._scrollAction&&this._scrollAction(e)},_initTemplates:function(){this._templateManager.addDefaultTemplates({group:new Po(function(e,t){Ye(t)?t.key&&e.text(t.key):e.text(String(t))},["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate:function(e,t){if(this.callBase(e,t),e.icon){var i=So(e.icon).addClass(g8),n=v("<div>").addClass(m8);n.append(i),t.prepend(n)}},_getBindableFields:function(){return["text","html","icon"]},_updateLoadingState:function(e){var t=!e||this._isLastPage(),i=this._scrollBottomMode(),n=t||!i,r=n&&!this._isDataSourceLoading();n||this._scrollViewIsFull()?(this._scrollView.release(r),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1)):this._infiniteDataLoading()},_shouldRenderNextButton:function(){return this._nextButtonMode()&&this._dataSource&&this._dataSource.isLoaded()},_isDataSourceFirstLoadCompleted:function(e){return E(e)&&(this._isFirstLoadCompleted=e),this._isFirstLoadCompleted},_dataSourceLoadingChangedHandler:function(e){this._loadIndicationSuppressed()||(e&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout((function(){var t=!this._itemElements().length,i=!t||this._isDataSourceFirstLoadCompleted();if(i){var n;(n=this._scrollView)===null||n===void 0||n.startLoading()}}).bind(this)):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()),e||this._isDataSourceFirstLoadCompleted(!1))},_dataSourceChangedHandler:function(){!this._shouldAppendItems()&&Ue()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments),this._isDataSourceFirstLoadCompleted(!0)},_refreshContent:function(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff:function(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed:function(e){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=e},_scrollViewIsFull:function(){var e=this._scrollView;return!e||Ke(e.content())>Ke(e.container())},_pullDownHandler:function(e){this._pullRefreshAction(e),this._dataSource&&!this._isDataSourceLoading()?(this._clearSelectedItems(),this._dataSource.pageIndex(0),this._dataSource.reload()):this._updateLoadingState()},_infiniteDataLoading:function(){var e=this.$element().is(":visible");e&&!this._scrollViewIsFull()&&!this._isDataSourceLoading()&&!this._isLastPage()&&(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout(()=>{this._loadNextPage().done(this._setPreviousPageIfNewIsEmpty.bind(this))}))},_setPreviousPageIfNewIsEmpty:function(e){if(this.option("_revertPageOnEmptyLoad")){var t=this.getDataSource(),i=t==null?void 0:t.pageIndex();(e==null?void 0:e.length)===0&&i>0&&(this._fireContentReadyAction(),t.pageIndex(i-1))}},_scrollBottomHandler:function(e){this._pageLoadingAction(e),!this._isDataSourceLoading()&&!this._isLastPage()?this._loadNextPage():this._updateLoadingState()},_renderItems:function(e){this.option("grouped")?(V(e,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),ei()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_attachGroupCollapseEvent:function(){var e=ye(vt,this.NAME),t="."+Np,i=this.$element(),n=this.option("collapsibleGroups");i.toggleClass(C8,n),R.off(i,e,t),n&&R.on(i,e,t,(function(r){this._createAction((function(a){var o=v(a.event.currentTarget).parent();this._collapseGroupHandler(o),this.option("focusStateEnabled")&&this.option("focusedElement",Me(o.find("."+Lc).eq(0)))}).bind(this),{validatingTargetName:"element"})({event:r})}).bind(this))},_collapseGroupHandler:function(e,t){var i=new se;if(e.hasClass(yb)===t)return i.resolve();var n=e.children("."+Wd),r=nt(n),a=0;return r===0&&(gn(n,"auto"),a=nt(n)),e.toggleClass(yb,t),zt.animate(n,{type:"custom",from:{height:r},to:{height:a},duration:200,complete:(function(){this.updateDimensions(),this._updateLoadingState(),i.resolve()}).bind(this)}),i.promise()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup:function(){this._itemElementsCache=v(),this.$element().addClass(v8),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.setAria("role",this.option("_listAttributes").role)},_renderInkRipple:function(){this._inkRipple=Jg()},_toggleActiveState:function(e,t,i){this.callBase.apply(this,arguments);var n=this;if(this._inkRipple){var r={element:e,event:i};t?ei()?this._inkRippleTimer=setTimeout(function(){n._inkRipple.showWave(r)},bb/2):n._inkRipple.showWave(r):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(r))}},_postprocessRenderItem:function(e){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("_swipeEnabled")&&this._attachSwipeEvent(v(e.itemElement))},_attachSwipeEvent:function(e){var t=ye(dd,this.NAME);R.on(e,t,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler:function(e){this._itemDXEventHandler(e,"onItemSwipe",{direction:e.offset<0?"left":"right"})},_nextButtonHandler:function(e){this._pageLoadingAction(e);var t=this._dataSource;t&&!t.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_renderGroup:function(e,t){var i=v("<div>").addClass(as).appendTo(this._itemContainer()),n=v("<div>").addClass(Np).appendTo(i),r=this.option("groupTemplate"),a=this._getTemplate(t.template||r,t,e,n),o={index:e,itemData:t,container:Me(n)};this._createItemByTemplate(a,o),ei()&&v("<div>").addClass(y8).prependTo(n),this._renderingGroupIndex=e;var s=v("<div>").addClass(Wd).appendTo(i);V(w8(t)||[],(function(l,u){this._renderItem({group:e,item:l},u,s)}).bind(this)),this._groupRenderAction({groupElement:Me(i),groupIndex:e,groupData:t})},downInkRippleHandler:function(e){this._toggleActiveState(v(e.currentTarget),!0,e)},upInkRippleHandler:function(e){this._toggleActiveState(v(e.currentTarget),!1)},attachGroupHeaderInkRippleEvents:function(){var e="."+Np,t=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);var i=[t,"dxpointerdown",e,this._downInkRippleHandler],n=[t,"dxpointerup dxpointerout",e,this._upInkRippleHandler];R.off(...i),R.on(...i),R.off(...n),R.on(...n)},_createGroupRenderAction:function(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean:function(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),delete this._inkRipple,this.callBase.apply(this,arguments)},_dispose:function(){this._isDataSourceFirstLoadCompleted(!1),clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState:function(e){this.callBase(e),this._scrollView.option("disabled",e||!this.option("scrollingEnabled"))},_toggleNextButton:function(e){var t=this._dataSource,i=this._getNextButton();this.$element().toggleClass(x8,e),e&&t&&t.isLoaded()&&i.appendTo(this._itemContainer()),e||i.detach()},_getNextButton:function(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton:function(){var e=v("<div>").addClass(b8),t=v("<div>").appendTo(e);return this._createComponent(t,Ii,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:ei()?"default":void 0,integrationOptions:{}}),e},_moveFocus:function(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh:function(){if(!Ue())this.callBase();else{var e=this._scrollView.scrollTop();this.callBase(),e&&this._scrollView.scrollTo(e)}},_optionChanged:function(e){switch(e.name){case"pageLoadMode":this._toggleNextButton(e.value),this._initScrollView();break;case"dataSource":this.callBase(e),this._initScrollView(),this._isDataSourceFirstLoadCompleted(!1);break;case"items":this.callBase(e),this._isDataSourceFirstLoadCompleted(!1);break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"showScrollbar":case"bounceEnabled":case"scrollByContent":case"scrollByThumb":case"useNativeScrolling":case"scrollingEnabled":case"pullRefreshEnabled":this._initScrollView(),this._updateLoadingState();break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions();break;case"grouped":case"collapsibleGroups":case"groupTemplate":this._invalidate();break;case"wrapItemText":this._$container.toggleClass(xb,e.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(e),this._scrollView.option(e.name,e.value),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(e),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(e);break;case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"_swipeEnabled":case"_revertPageOnEmptyLoad":case"_listAttributes":break;default:this.callBase(e)}},_extendActionArgs:function(e){if(!this.option("grouped"))return this.callBase(e);var t=e.closest("."+as),i=t.find("."+Lc);return k(this.callBase(e),{itemIndex:{group:t.index(),item:i.index(e)}})},expandGroup:function(e){var t=new se,i=this._itemContainer().find("."+as).eq(e);return this._collapseGroupHandler(i,!1).done((function(){t.resolveWith(this)}).bind(this)),t.promise()},collapseGroup:function(e){var t=new se,i=this._itemContainer().find("."+as).eq(e);return this._collapseGroupHandler(i,!0).done((function(){t.resolveWith(this)}).bind(this)),t},updateDimensions:function(){var e=this,t=new se;return e._scrollView?e._scrollView.update().done(function(){!e._scrollViewIsFull()&&e._updateLoadingState(!0),t.resolveWith(e)}):t.resolveWith(e),t.promise()},reload:function(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint:function(){this.scrollTo(0),this.callBase()},scrollTop:function(){return this._scrollView.scrollOffset().top},clientHeight:function(){return this._scrollView.clientHeight()},scrollHeight:function(){return this._scrollView.scrollHeight()},scrollBy:function(e){this._scrollView.scrollBy(e)},scrollTo:function(e){this._scrollView.scrollTo(e)},scrollToItem:function(e){var t=this._editStrategy.getItemElement(e);this._scrollView.scrollToElement(t==null?void 0:t.get(0))},_dimensionChanged:function(){this.updateDimensions()}}).include(FO);yC.ItemClass=NK;function I8(){return gC}var $p="dx-toolbar-menu-action",T8="dx-toolbar-hidden-button",A8="dx-toolbar-hidden-button-group",Sb="dx-toolbar-menu-section",Eb="dx-toolbar-menu-last-section",MO=yC.inherit({_activeStateUnit:"."+$p,_initMarkup:function(){this._renderSections(),this.callBase()},_getSections:function(){return this._itemContainer().children()},_itemElements:function(){return this._getSections().children(this._itemSelector())},_renderSections:function(){var e=this,t=this._itemContainer();V(["before","center","after","menu"],function(){var i="_$"+this+"Section",n=e[i];n||(e[i]=n=v("<div>").addClass(Sb)),n.appendTo(t)})},_renderItems:function(){this.callBase.apply(this,arguments),this._updateSections()},_updateSections:function(){var e=this.$element().find("."+Sb);e.removeClass(Eb),e.not(":empty").eq(-1).addClass(Eb)},_renderItem:function(e,t,i,n){var r=t.location||"menu",a=this["_$"+r+"Section"],o=this.callBase(e,t,a,n);return this._getItemTemplateName({itemData:t})&&o.addClass("dx-toolbar-menu-custom"),(r==="menu"||t.widget==="dxButton"||t.widget==="dxButtonGroup"||t.isAction)&&o.addClass($p),t.widget==="dxButton"&&o.addClass(T8),t.widget==="dxButtonGroup"&&o.addClass(A8),o.addClass(t.cssClass),o},_getItemTemplateName:function(e){var t=this.callBase(e),i=e.itemData,n=i&&i.menuItemTemplate;return n||t},_itemClickHandler:function(e,t,i){v(e.target).closest("."+$p).length&&this.callBase(e,t,i)},_clean:function(){this._getSections().empty(),this.callBase()}});tt("dxToolbarMenu",MO);var wb=5;class D8{constructor(t){this.init(t)}init(t){var{dragEnabled:i,handle:n,draggableElement:r,positionController:a}=t;this._positionController=a,this._draggableElement=r,this._handle=n,this._dragEnabled=i,this.unsubscribe(),i&&this.subscribe()}moveDown(t){this._moveTo(wb,0,t)}moveUp(t){this._moveTo(-5,0,t)}moveLeft(t){this._moveTo(0,-5,t)}moveRight(t){this._moveTo(0,wb,t)}subscribe(){var t=this._getEventNames();R.on(this._handle,t.startEventName,i=>{this._dragStartHandler(i)}),R.on(this._handle,t.updateEventName,i=>{this._dragUpdateHandler(i)}),R.on(this._handle,t.endEventName,i=>{this._dragEndHandler(i)})}unsubscribe(){var t=this._getEventNames();R.off(this._handle,t.startEventName),R.off(this._handle,t.updateEventName),R.off(this._handle,t.endEventName)}_getEventNames(){var t=ye(yo,"overlayDrag"),i=ye(Sa,"overlayDrag"),n=ye(xo,"overlayDrag");return{startEventName:t,updateEventName:i,endEventName:n}}_dragStartHandler(t){var i=this._getAllowedOffsets();this._prevOffset={x:0,y:0},t.targetElements=[],t.maxTopOffset=i.top,t.maxBottomOffset=i.bottom,t.maxLeftOffset=i.left,t.maxRightOffset=i.right}_dragUpdateHandler(t){var i={top:t.offset.y-this._prevOffset.y,left:t.offset.x-this._prevOffset.x};this._moveByOffset(i),this._prevOffset=t.offset}_dragEndHandler(t){this._positionController.dragHandled(),this._positionController.detectVisualPositionChange(t)}_moveTo(t,i,n){if(this._dragEnabled){n.preventDefault(),n.stopPropagation();var r=this._fitOffsetIntoAllowedRange(t,i);this._moveByOffset(r),this._dragEndHandler(n)}}_fitOffsetIntoAllowedRange(t,i){var n=this._getAllowedOffsets();return{top:ki(t,-n.top,n.bottom),left:ki(i,-n.left,n.right)}}_getContainerDimensions(){var t=me.getDocument(),i=this._positionController.$dragResizeContainer.get(0),n=ot(i),r=nt(i);return Xt(i)&&(r=Math.max(t.body.clientHeight,r),n=Math.max(t.body.clientWidth,n)),{width:n,height:r}}_getContainerPosition(){var t=this._positionController.$dragResizeContainer.get(0);return Xt(t)?{top:0,left:0}:S_(t)}_getElementPosition(){return S_(this._draggableElement)}_getInnerDelta(){var t=this._getContainerDimensions(),i=this._getElementDimensions();return{x:t.width-i.width,y:t.height-i.height}}_getOuterDelta(){var{width:t,height:i}=this._getElementDimensions(),n=this._positionController.outsideDragFactor;return{x:t*n,y:i*n}}_getFullDelta(){var t=this._getInnerDelta(),i=this._getOuterDelta();return{x:t.x+i.x,y:t.y+i.y}}_getElementDimensions(){return{width:this._draggableElement.offsetWidth,height:this._draggableElement.offsetHeight}}_getAllowedOffsets(){var t=this._getFullDelta(),i=t.y>=0&&t.x>=0;if(!i)return{top:0,bottom:0,left:0,right:0};var n=this._getElementPosition(),r=this._getContainerPosition(),a=this._getOuterDelta();return{top:n.top-r.top+a.y,bottom:-n.top+r.top+t.y,left:n.left-r.left+a.x,right:-n.left+r.left+t.x}}_moveByOffset(t){var i=On(this._draggableElement),n={left:i.left+t.left,top:i.top+t.top};ri(this._draggableElement,n)}}var uf="dxResizable",O8="dx-resizable",R8="dx-resizable-resizing",zd="dx-resizable-handle",k8="dx-resizable-handle-top",B8="dx-resizable-handle-bottom",L8="dx-resizable-handle-left",P8="dx-resizable-handle-right",Gd="dx-resizable-handle-corner",F8=ye(yo,uf),M8=ye(Sa,uf),V8=ye(xo,uf),N8={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},VO=mr.inherit({_getDefaultOptions:function(){return k(this.callBase(),{handles:"all",step:"1",stepPrecision:"simple",area:void 0,minWidth:30,maxWidth:1/0,minHeight:30,maxHeight:1/0,onResizeStart:null,onResize:null,onResizeEnd:null,roundStepValue:!0,keepAspectRatio:!0})},_init:function(){this.callBase(),this.$element().addClass(O8)},_initMarkup:function(){this.callBase(),this._renderHandles()},_render:function(){this.callBase(),this._renderActions()},_renderActions:function(){this._resizeStartAction=this._createActionByOption("onResizeStart"),this._resizeEndAction=this._createActionByOption("onResizeEnd"),this._resizeAction=this._createActionByOption("onResize")},_renderHandles:function(){this._handles=[];var e=this.option("handles");if(!(e==="none"||!e)){var t=e==="all"?["top","bottom","left","right"]:e.split(" "),i={};V(t,(n,r)=>{i[r]=!0,this._renderHandle(r)}),i.bottom&&i.right&&this._renderHandle("corner-bottom-right"),i.bottom&&i.left&&this._renderHandle("corner-bottom-left"),i.top&&i.right&&this._renderHandle("corner-top-right"),i.top&&i.left&&this._renderHandle("corner-top-left"),this._attachEventHandlers()}},_renderHandle:function(e){var t=v("<div>").addClass(zd).addClass(zd+"-"+e).appendTo(this.$element());this._handles.push(t)},_attachEventHandlers:function(){if(!this.option("disabled")){var e={};e[F8]=this._dragStartHandler.bind(this),e[M8]=this._dragHandler.bind(this),e[V8]=this._dragEndHandler.bind(this),this._handles.forEach(t=>{R.on(t,e,{direction:"both",immediate:!0})})}},_detachEventHandlers:function(){this._handles.forEach(e=>{R.off(e)})},_toggleEventHandlers:function(e){e?this._attachEventHandlers():this._detachEventHandlers()},_getElementSize:function(){var e=this.$element();return e.css("boxSizing")==="border-box"?{width:ot(e),height:nt(e)}:{width:He(e),height:Ke(e)}},_dragStartHandler:function(e){var t=this.$element();if(t.is(".dx-state-disabled, .dx-state-disabled *")){e.cancel=!0;return}this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(e),this._elementLocation=On(t),this._elementSize=this._getElementSize(),this._renderDragOffsets(e),this._resizeStartAction({event:e,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),e.targetElements=null},_toggleResizingClass:function(e){this.$element().toggleClass(R8,e)},_renderDragOffsets:function(e){var t=this._getArea();if(t){var i=v(e.target).closest("."+zd),n=ot(i),r=nt(i),a=i.offset(),o=t.offset,s=this._getAreaScrollOffset();e.maxLeftOffset=this._leftMaxOffset=a.left-o.left-s.scrollX,e.maxRightOffset=this._rightMaxOffset=o.left+t.width-a.left-n+s.scrollX,e.maxTopOffset=this._topMaxOffset=a.top-o.top-s.scrollY,e.maxBottomOffset=this._bottomMaxOffset=o.top+t.height-a.top-r+s.scrollY}},_getBorderWidth:function(e,t){if(Xt(e.get(0)))return 0;var i=e.css(N8[t]);return parseInt(i)||0},_proportionate:function(e,t){var i=this._elementSize,n=e==="x"?i.width/i.height:i.height/i.width;return t*n},_getProportionalDelta:function(e){var{x:t,y:i}=e,n=this._proportionate("y",t);if(n>=i)return{x:t,y:n};var r=this._proportionate("x",i);return r>=t?{x:r,y:i}:{x:0,y:0}},_getDirectionName:function(e){var t=this._movingSides;return e==="x"?t.left?"left":"right":t.top?"top":"bottom"},_fitIntoArea:function(e,t){var i,n=this._getDirectionName(e);return Math.min(t,(i=this["_".concat(n,"MaxOffset")])!==null&&i!==void 0?i:1/0)},_fitDeltaProportionally:function(e){var t=Se({},e),i=this._elementSize,{minWidth:n,minHeight:r,maxWidth:a,maxHeight:o}=this.option(),s=()=>i.width+t.x,l=()=>i.height+t.y,u=p=>t[p]===this._fitIntoArea(p,t[p]),d=()=>Nr(s(),n,a)&&u("x"),c=()=>Nr(l(),r,o)&&u("y");if(!d()){var h=this._fitIntoArea("x",ki(s(),n,a)-i.width);t={x:h,y:this._proportionate("y",h)}}if(!c()){var f=this._fitIntoArea("y",ki(l(),r,o)-i.height);t={x:this._proportionate("x",f),y:f}}return d()&&c()?t:{x:0,y:0}},_fitDelta:function(e){var{x:t,y:i}=e,n=this._elementSize,{minWidth:r,minHeight:a,maxWidth:o,maxHeight:s}=this.option();return{x:ki(n.width+t,r,o)-n.width,y:ki(n.height+i,a,s)-n.height}},_getDeltaByOffset:function(e){var t=this._movingSides,i=this._isCornerHandler(t)&&this.option("keepAspectRatio"),n={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)};if(i){var r=this._getProportionalDelta(n),a=this._fitDeltaProportionally(r);n=a}else{var o=this._fitDelta(n),s=this._roundByStep(o);n=s}return n},_updatePosition:function(e,t){var{width:i,height:n}=t,r=this._elementLocation,a=this._movingSides,o=this.$element(),s=this._getElementSize(),l=e.y*(a.top?-1:1)-((s.height||n)-n),u=e.x*(a.left?-1:1)-((s.width||i)-i);ri(o,{top:r.top+(a.top?l:0),left:r.left+(a.left?u:0)})},_dragHandler:function(e){var t=this._getOffset(e),i=this._getDeltaByOffset(t),n=this._updateDimensions(i);this._updatePosition(i,n),this._triggerResizeAction(e,n)},_updateDimensions:function(e){var t=u=>u.substring(u.length-2)==="px",i=this.option("stepPrecision")==="strict",n=this._elementSize,r=n.width+e.x,a=n.height+e.y,o=this.$element().get(0).style,s=e.x||i||t(o.width),l=e.y||i||t(o.height);return s&&this.option({width:r}),l&&this.option({height:a}),{width:s?r:n.width,height:l?a:n.height}},_triggerResizeAction:function(e,t){var{width:i,height:n}=t;this._resizeAction({event:e,width:this.option("width")||i,height:this.option("height")||n,handles:this._movingSides}),lr(this.$element())},_isCornerHandler:e=>Object.values(e).reduce((t,i)=>t^i,0)===0,_getOffset:function(e){var t=e.offset,i=this._movingSides;return!i.left&&!i.right&&(t.x=0),!i.top&&!i.bottom&&(t.y=0),t},_roundByStep:function(e){return this.option("stepPrecision")==="strict"?this._roundStrict(e):this._roundNotStrict(e)},_getSteps:function(){return Fh(this.option("step"),!this.option("roundStepValue"))},_roundNotStrict:function(e){var t=this._getSteps();return{x:e.x-e.x%t.h,y:e.y-e.y%t.v}},_roundStrict:function(e){var t=this._movingSides,i={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)},n=this._getSteps(),r=this._elementLocation,a=this._elementSize,o=t.left?r.left:r.left+a.width,s=t.top?r.top:r.top+a.height,l=(o+i.x)%n.h,u=(s+i.y)%n.v,d=Math.sign||(C=>(C=+C,C===0||isNaN(C)?C:C>0?1:-1)),c=(C,b)=>(1+.2*d(b))%1*C,h=(C,b)=>Math.abs(C)<.2*b,f=i.x-l,p=i.y-u;l>c(n.h,i.x)&&(f+=n.h),u>c(n.v,i.y)&&(p+=n.v);var m=(t.left||t.right)&&!h(i.x,n.h)?f:0,g=(t.top||t.bottom)&&!h(i.y,n.v)?p:0;return{x:m*(t.left?-1:1),y:g*(t.top?-1:1)}},_getMovingSides:function(e){var t=v(e.target),i=t.hasClass(Gd+"-top-left"),n=t.hasClass(Gd+"-top-right"),r=t.hasClass(Gd+"-bottom-left"),a=t.hasClass(Gd+"-bottom-right");return{top:t.hasClass(k8)||i||n,left:t.hasClass(L8)||i||r,bottom:t.hasClass(B8)||r||a,right:t.hasClass(P8)||n||a}},_getArea:function(){var e=this.option("area");return Ie(e)&&(e=e.call(this)),Ye(e)?this._getAreaFromObject(e):this._getAreaFromElement(e)},_getAreaScrollOffset:function(){var e=this.option("area"),t=!Ie(e)&&!Ye(e),i={scrollY:0,scrollX:0};if(t){var n=v(e)[0];Xt(n)&&(i.scrollX=n.pageXOffset,i.scrollY=n.pageYOffset)}return i},_getAreaFromObject:function(e){var t={width:e.right-e.left,height:e.bottom-e.top,offset:{left:e.left,top:e.top}};return this._correctAreaGeometry(t),t},_getAreaFromElement:function(e){var t=v(e),i;return t.length&&(i={width:b_(t),height:Zc(t),offset:k({top:0,left:0},Xt(t[0])?{}:t.offset())},this._correctAreaGeometry(i,t)),i},_correctAreaGeometry:function(e,t){var i=t?this._getBorderWidth(t,"left"):0,n=t?this._getBorderWidth(t,"top"):0;e.offset.left+=i+this._getBorderWidth(this.$element(),"left"),e.offset.top+=n+this._getBorderWidth(this.$element(),"top"),e.width-=ot(this.$element())-b_(this.$element()),e.height-=nt(this.$element())-Zc(this.$element())},_dragEndHandler:function(e){var t=this.$element();this._resizeEndAction({event:e,width:ot(t),height:nt(t),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth:function(e){this.option("width",ki(e,this.option("minWidth"),this.option("maxWidth")))},_renderHeight:function(e){this.option("height",ki(e,this.option("minHeight"),this.option("maxHeight")))},_optionChanged:function(e){switch(e.name){case"disabled":this._toggleEventHandlers(!e.value),this.callBase(e);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":Ue()&&this._renderWidth(ot(this.$element()));break;case"minHeight":case"maxHeight":Ue()&&this._renderHeight(nt(this.$element()));break;case"onResize":case"onResizeStart":case"onResizeEnd":this._renderActions();break;case"area":case"stepPrecision":case"step":case"roundStepValue":case"keepAspectRatio":break;default:this.callBase(e)}},_clean:function(){this.$element().find("."+zd).remove()},_useTemplates:function(){return!1}});tt(uf,VO);var $8=Fo.inherit({_initMarkup(){this._deferredItems=[],this.callBase()},_renderItemContent(e){var t=new se,i=new se;this._deferredItems[e.index]=i;var n=this.callBase.call(this,e);return i.done(()=>{t.resolve(n)}),t.promise()},_createItemByTemplate(e,t){return e.render({model:t.itemData,container:t.container,index:t.index,onRendered:()=>{this._deferredItems[t.index].resolve()}})},_postProcessRenderItems:re,_renderItemsAsync(){var e=new se;return De.apply(this,this._deferredItems).done(()=>{this._postProcessRenderItems(),e.resolve()}),e.promise()},_clean(){this.callBase(),this._deferredItems=[]}}),NO="dx-toolbar",Hp="dx-toolbar-before",H8="dx-toolbar-center",Ib="dx-toolbar-after",W8="dx-toolbar-mini",z8="dx-toolbar-item",$O="dx-toolbar-label",G8="dx-toolbar-button",U8="dx-toolbar-items-container",K8="dx-toolbar-group",Tb="dx-toolbar-compact",Ud="."+$O,Ab="dx-toolbar-multiline",Db="text",j8="default",q8="contained",Y8="dxToolbarItemDataKey",HO=$8.inherit({compactMode:!1,ctor:function(e,t){this._userOptions=t||{},this.callBase(e,t),"height"in this._userOptions&&xt.log("W0001",this.NAME,"height","20.1","Functionality associated with this option is not intended for the Toolbar widget.")},_getSynchronizableOptionsForCreateComponent:function(){return this.callBase().filter(e=>e!=="disabled")},_initTemplates:function(){this.callBase();var e=new Po((function(t,i,n){Ye(i)?(i.text&&t.text(i.text).wrapInner("<div>"),i.html&&t.html(i.html),i.widget==="dxDropDownButton"&&(i.options=i.options||{},E(i.options.stylingMode)||(i.options.stylingMode=this.option("useFlatButtons")?Db:q8)),i.widget==="dxButton"&&(this.option("useFlatButtons")&&(i.options=i.options||{},i.options.stylingMode=i.options.stylingMode||Db),this.option("useDefaultButtons")&&(i.options=i.options||{},i.options.type=i.options.type||j8))):t.text(String(i)),this._getTemplate("dx-polymorph-widget").render({container:t,model:n,parent:this})}).bind(this),["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:e,menuItem:e})},_getDefaultOptions:function(){return k(this.callBase(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1,multiline:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return ei()},options:{useFlatButtons:!0}}])},_itemContainer:function(){return this._$toolbarItemsContainer.find(["."+Hp,"."+H8,"."+Ib].join(","))},_itemClass:function(){return z8},_itemDataKey:function(){return Y8},_buttonClass:function(){return G8},_dimensionChanged:function(){this._arrangeItems(),this._applyCompactMode()},_initMarkup:function(){this._renderToolbar(),this._renderSections(),this.callBase(),this.setAria("role","toolbar")},_waitParentAnimationFinished:function(){var e=this.$element();return new Promise(t=>{var i=()=>{clearTimeout(this._waitParentAnimationTimeout),this._waitParentAnimationTimeout=setTimeout(()=>(()=>{var n=!0;return e.parents().each((r,a)=>{if(zt.isAnimating(v(a)))return n=!1,!1}),n&&t(),n})()||i(),15)};i()})},_render:function(){this.callBase(),this._renderItemsAsync(),ei()&&Promise.all([this._waitParentAnimationFinished(),this._checkWebFontForLabelsLoaded()]).then(this._dimensionChanged.bind(this))},_postProcessRenderItems:function(){this._arrangeItems()},_renderToolbar:function(){this.$element().addClass(NO).toggleClass(Ab,this.option("multiline")),this._$toolbarItemsContainer=v("<div>").addClass(U8).appendTo(this.$element())},_renderSections:function(){var e=this._$toolbarItemsContainer,t=this;V(["before","center","after"],function(){var i="dx-toolbar-"+this,n=e.find("."+i);n.length||(t["_$"+this+"Section"]=n=v("<div>").addClass(i).appendTo(e))})},_checkWebFontForLabelsLoaded:function(){var e=this.$element().find(Ud),t=[];return e.each((i,n)=>{var r=v(n).text(),a=v(n).css("fontWeight");t.push(b$(r,a))}),Promise.all(t)},_arrangeItems:function(e){e=e||He(this.$element()),this._$centerSection.css({margin:"0 auto",float:"none"});var t=Ut(this._$beforeSection.get(0)),i=Ut(this._$afterSection.get(0));this._alignCenterSection(t,i,e);var n=this._$toolbarItemsContainer.find(Ud).eq(0),r=n.parent();if(n.length){var a=t.width?t.width:n.position().left,o=r.hasClass(Hp)?0:a,s=r.hasClass(Ib)?0:i.width,l=0;r.children().not(Ud).each(function(){l+=ot(this)});var u=e-l,d=Math.max(u-o-s,0);if(r.hasClass(Hp))this._alignSection(this._$beforeSection,d);else{var c=ot(n)-He(n);n.css("maxWidth",d-c)}}},_alignCenterSection:function(e,t,i){this._alignSection(this._$centerSection,i-e.width-t.width);var n=this.option("rtlEnabled"),r=n?t:e,a=n?e:t,o=Ut(this._$centerSection.get(0));(r.right>o.left||o.right>a.left)&&this._$centerSection.css({marginLeft:r.width,marginRight:a.width,float:r.width>a.width?"none":"right"})},_alignSection:function(e,t){var i=e.find(Ud),n=i.toArray();t-=this._getCurrentLabelsPaddings(n);var r=this._getCurrentLabelsWidth(n),a=Math.abs(r-t);t<r?(n=n.reverse(),this._alignSectionLabels(n,a,!1)):this._alignSectionLabels(n,a,!0)},_alignSectionLabels:function(e,t,i){for(var n=function(u){return Ut(u).width},r=0;r<e.length;r++){var a=v(e[r]),o=Math.ceil(n(e[r])),s=void 0;i&&a.css("maxWidth","inherit");var l=Math.ceil(i?n(e[r]):o);if(l<t)s=i?l:0,t-=l;else{s=i?o+t:o-t,a.css("maxWidth",s);break}a.css("maxWidth",s)}},_applyCompactMode:function(){var e=this.$element();e.removeClass(Tb),this.option("compactMode")&&this._getSummaryItemsWidth(this.itemElements(),!0)>He(e)&&e.addClass(Tb)},_getCurrentLabelsWidth:function(e){var t=0;return e.forEach(function(i,n){t+=ot(i)}),t},_getCurrentLabelsPaddings:function(e){var t=0;return e.forEach(function(i,n){t+=ot(i)-He(i)}),t},_renderItem:function(e,t,i,n){var r=t.location||"center",a=i||this["_$"+r+"Section"],o=!!(t.text||t.html),s=this.callBase(e,t,a,n);return s.toggleClass(this._buttonClass(),!o).toggleClass($O,o).addClass(t.cssClass),s},_renderGroupedItems:function(){var e=this;V(this.option("items"),function(t,i){var n=i.items,r=v("<div>").addClass(K8),a=i.location||"center";!n||!n.length||(V(n,function(o,s){e._renderItem(o,s,r,null)}),e._$toolbarItemsContainer.find(".dx-toolbar-"+a).append(r))})},_renderItems:function(e){var t=this.option("grouped")&&e.length&&e[0].items;t?this._renderGroupedItems():this.callBase(e)},_getToolbarItems:function(){return this.option("items")||[]},_renderContentImpl:function(){var e=this._getToolbarItems();this.$element().toggleClass(W8,e.length===0),this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e),this._applyCompactMode()},_renderEmptyMessage:re,_clean:function(){this._$toolbarItemsContainer.children().empty(),this.$element().empty()},_visibilityChanged:function(e){e&&this._arrangeItems()},_isVisible:function(){return He(this.$element())>0&&Ke(this.$element())>0},_getIndexByItem:function(e){return this._getToolbarItems().indexOf(e)},_itemOptionChanged:function(e,t,i){this.callBase.apply(this,[e,t,i]),this._arrangeItems()},_optionChanged:function(e){var t=e.name;switch(t){case"width":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"multiline":this.$element().toggleClass(Ab,e.value);break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:this.callBase.apply(this,arguments)}},_dispose:function(){this.callBase(),clearTimeout(this._waitParentAnimationTimeout)}});tt("dxToolbarBase",HO);var X8=["fullScreen","forceApplyBindings","dragOutsideBoundary","dragAndResizeArea","outsideDragFactor"],Wp=je();class Z8 extends Dg{constructor(t){var{fullScreen:i,forceApplyBindings:n,dragOutsideBoundary:r,dragAndResizeArea:a,outsideDragFactor:o}=t,s=Pt(t,X8);super(s),this._props=Se({},this._props,{fullScreen:i,forceApplyBindings:n,dragOutsideBoundary:r,dragAndResizeArea:a,outsideDragFactor:o}),this._$dragResizeContainer=void 0,this._outsideDragFactor=void 0,this._lastPositionBeforeFullScreen=void 0,this._updateDragResizeContainer(),this._updateOutsideDragFactor()}set fullScreen(t){this._props.fullScreen=t,t?this._fullScreenEnabled():this._fullScreenDisabled()}get $dragResizeContainer(){return this._$dragResizeContainer}get outsideDragFactor(){return this._outsideDragFactor}set dragAndResizeArea(t){this._props.dragAndResizeArea=t,this._updateDragResizeContainer()}set dragOutsideBoundary(t){this._props.dragOutsideBoundary=t,this._updateDragResizeContainer(),this._updateOutsideDragFactor()}set outsideDragFactor(t){this._props.outsideDragFactor=t,this._updateOutsideDragFactor()}updateContainer(t){super.updateContainer(t),this._updateDragResizeContainer()}dragHandled(){this.restorePositionOnNextRender(!1)}resizeHandled(){this.restorePositionOnNextRender(!1)}positionContent(){if(this._props.fullScreen)ri(this._$content,{top:0,left:0}),this.detectVisualPositionChange();else{var t,i;(t=(i=this._props).forceApplyBindings)===null||t===void 0||t.call(i),!this._shouldRenderContentInitialPosition&&this._lastPositionBeforeFullScreen?(ri(this._$content,this._lastPositionBeforeFullScreen),this._lastPositionBeforeFullScreen=void 0,this.detectVisualPositionChange()):super.positionContent()}}_updateOutsideDragFactor(){this._outsideDragFactor=this._getOutsideDragFactor()}_getOutsideDragFactor(){return this._props.dragOutsideBoundary?1:this._props.outsideDragFactor}_updateDragResizeContainer(){this._$dragResizeContainer=this._getDragResizeContainer()}_getDragResizeContainer(){if(this._props.dragOutsideBoundary)return v(Wp);if(this._props.dragAndResizeArea)return v(this._props.dragAndResizeArea);var t=uT().get(0)||this._props.container;return t?this._$markupContainer:v(Wp)}_getVisualContainer(){return this._props.fullScreen?v(Wp):super._getVisualContainer()}_fullScreenEnabled(){this.restorePositionOnNextRender(!1),this._lastPositionBeforeFullScreen=this._visualPosition}_fullScreenDisabled(){this.restorePositionOnNextRender(!1)}}var J8=je(),zp="dx-popup",Q8="dx-popup-wrapper",e9="dx-popup-fullscreen",t9="dx-popup-fullscreen-width",i9="dx-popup-normal",n9="dx-popup-content",r9="dx-state-disabled",a9="dx-popup-draggable",Ob="dx-popup-title",o9="dx-closebutton",Rb="dx-popup-bottom",s9="dx-has-close-button",l9="dx-template-wrapper",u9="dx-popup-flex-height",d9="dx-popup-inherit-height",kb=["cancel","clear","done"],c9="default",h9="normal",f9="text",p9="contained",v9=Lt.safari&&CT(Lt.version,[11])<0,ia={static:"",inherit:d9,flex:u9},_9=e=>{var t=Re.current(),i=t.platform,n="bottom",r="before";if(i==="ios")switch(e){case"cancel":n="top";break;case"clear":n="top",r="after";break;case"done":r="after"}else if(i==="android")switch(e){case"cancel":case"done":r="after"}return{toolbar:n,location:r}},Cr=qn.inherit({_supportedKeys:function(){return k(this.callBase(),{upArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveUp(e)},downArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveDown(e)},leftArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveLeft(e)},rightArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveRight(e)}})},_getDefaultOptions:function(){return k(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragOutsideBoundary:!1,dragEnabled:!1,dragAndResizeArea:void 0,outsideDragFactor:0,onResizeStart:null,onResize:null,onResizeEnd:null,resizeEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules:function(){var e=Xn();return this.callBase().concat([{device:{platform:"ios"},options:{animation:this._iosAnimation}},{device:{platform:"android"},options:{animation:this._androidAnimation}},{device:{platform:"generic"},options:{showCloseButton:!0}},{device:function(t){return Re.real().deviceType==="desktop"&&t.platform==="generic"},options:{dragEnabled:!0}},{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return ei(e)},options:{useDefaultToolbarButtons:!0,useFlatToolbarButtons:!0,showCloseButton:!1}}])},_iosAnimation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom"}},to:{position:{my:"center",at:"center"}}},hide:{type:"slide",duration:400,from:{opacity:1,position:{my:"center",at:"center"}},to:{opacity:1,position:{my:"top",at:"bottom"}}}},_androidAnimation:function(){return this.option("fullScreen")?{show:{type:"slide",duration:300,from:{top:"30%",opacity:0},to:{top:0,opacity:1}},hide:{type:"slide",duration:300,from:{top:0,opacity:1},to:{top:"30%",opacity:0}}}:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}}},_init:function(){this.callBase(),this._updateResizeCallbackSkipCondition(),this.$element().addClass(zp),this.$wrapper().addClass(Q8),this._$popupContent=this._$content.wrapInner(v("<div>").addClass(n9)).children().eq(0)},_render:function(){var e=this.option("fullScreen");this._toggleFullScreenClass(e),this.callBase()},_toggleFullScreenClass:function(e){this.$overlayContent().toggleClass(e9,e).toggleClass(i9,!e)},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new lo,bottom:new lo})},_getActionsList:function(){return this.callBase().concat(["onResizeStart","onResize","onResizeEnd"])},_contentResizeHandler:function(e){this._shouldSkipContentResize(e)||this._renderGeometry({shouldOnlyReposition:!0})},_doesShowAnimationChangeDimensions:function(){var e=this.option("animation");return["to","from"].some(t=>{var i,n=e==null||(i=e.show)===null||i===void 0?void 0:i[t];return $e(n)&&("width"in n||"height"in n)})},_updateResizeCallbackSkipCondition(){var e=this._doesShowAnimationChangeDimensions();this._shouldSkipContentResize=t=>e&&this._showAnimationProcessing||this._areContentDimensionsRendered(t)},_observeContentResize:function(e){if(this.option("useResizeObserver")){var t=this._$content.get(0);e?mh.observe(t,i=>{this._contentResizeHandler(i)}):mh.unobserve(t)}},_renderContentImpl:function(){this._renderTitle(),this.callBase(),this._renderResize(),this._renderBottom()},_renderTitle:function(){var e=this._getToolbarItems("top"),t=this.option("title"),i=this.option("showTitle");if(i&&t&&e.unshift({location:Re.current().ios?"center":"before",text:t}),i||e.length>0){this._$title&&this._$title.remove();var n=v("<div>").addClass(Ob).insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",e,n).addClass(Ob),this._renderDrag(),this._executeTitleRenderAction(this._$title),this._$title.toggleClass(s9,this._hasCloseButton())}else this._$title&&this._$title.detach()},_renderTemplateByType:function(e,t,i,n){var{rtlEnabled:r,useDefaultToolbarButtons:a,useFlatToolbarButtons:o,disabled:s}=this.option(),l=this._getTemplateByOption(e),u=l instanceof lo;if(u){var d=k({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),c=k(n,{items:t,rtlEnabled:r,useDefaultButtons:a,useFlatButtons:o,disabled:s,integrationOptions:d});this._getTemplate("dx-polymorph-widget").render({container:i,model:{widget:"dxToolbarBase",options:c}});var h=i.children("div");return i.replaceWith(h),h}else{var f=v(l.render({container:Me(i)}));return f.hasClass(l9)&&(i.replaceWith(f),i=f),i}},_renderVisibilityAnimate:function(e){return this._observeContentResize(e),this.callBase(e)},_executeTitleRenderAction:function(e){this._getTitleRenderAction()({titleElement:Me(e)})},_getTitleRenderAction:function(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction:function(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton:function(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer:function(){return(e,t,i)=>{var n=v("<div>").addClass(o9);this._createComponent(n,Ii,{icon:"close",onClick:this._createToolbarItemAction(void 0),stylingMode:"text",integrationOptions:{}}),v(i).append(n)}},_getToolbarItems:function(e){var t=this.option("toolbarItems"),i=[];this._toolbarItemClasses=[];var n=Re.current().platform,r=0;return V(t,(a,o)=>{var s=E(o.shortcut),l=s?_9(o.shortcut):o;if(s&&n==="ios"&&r<2&&(l.toolbar="top",r++),l.toolbar=o.toolbar||l.toolbar||"top",l&&l.toolbar===e){s&&k(l,{location:o.location},this._getToolbarItemByAlias(o));var u=n==="generic";o.shortcut==="done"&&u||o.shortcut==="cancel"&&!u?i.unshift(l):i.push(l)}}),e==="top"&&this._hasCloseButton()&&i.push(this._getCloseButton()),i},_hasCloseButton(){return this.option("showCloseButton")&&this.option("showTitle")},_getLocalizationKey:e=>e.toLowerCase()==="done"?"OK":qc(e,!0),_getToolbarItemByAlias:function(e){var t=this,i=e.shortcut;if(!kb.includes(i))return!1;var n=k({text:fe.format(this._getLocalizationKey(i)),onClick:this._createToolbarItemAction(e.onClick),integrationOptions:{},type:t.option("useDefaultToolbarButtons")?c9:h9,stylingMode:t.option("useFlatToolbarButtons")?f9:p9},e.options||{}),r=zp+"-"+i;return this._toolbarItemClasses.push(r),{template:function(a,o,s){var l=v("<div>").addClass(r).appendTo(s);t._createComponent(l,Ii,n)}}},_createToolbarItemAction:function(e){return this._createAction(e,{afterExecute:function(t){t.component.hide()}})},_renderBottom:function(){var e=this._getToolbarItems("bottom");if(e.length){this._$bottom&&this._$bottom.remove();var t=v("<div>").addClass(Rb).insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",e,t,{compactMode:!0}).addClass(Rb),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleDisabledState:function(e){this.callBase(...arguments),this.$content().toggleClass(r9,!!e)},_toggleClasses:function(){var e=kb;V(e,(t,i)=>{var n=zp+"-"+i;this._toolbarItemClasses.includes(n)?(this.$wrapper().addClass(n+"-visible"),this._$bottom.addClass(n)):(this.$wrapper().removeClass(n+"-visible"),this._$bottom.removeClass(n))})},_toggleFocusClass(e,t){if(this.callBase(e,t),e&&!wH(this._zIndex)){var i=tA(this._zIndexInitValue());U_(this._zIndex),this._zIndex=i,this._$wrapper.css("zIndex",i),this._$content.css("zIndex",i)}},_getPositionControllerConfig(){var{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:r}=this.option();return k({},this.callBase(),{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:r})},_initPositionController(){this._positionController=new Z8(this._getPositionControllerConfig())},_getDragTarget:function(){return this.topToolbar()},_renderGeometry:function(e){var{visible:t,useResizeObserver:i}=this.option();if(t&&Ue()){var n=this._showAnimationProcessing,r=n&&!(e!=null&&e.forceStopAnimation)&&i;this._isAnimationPaused=r||void 0,this._stopAnimation(),e!=null&&e.shouldOnlyReposition?this._positionController.positionContent():this._renderGeometryImpl(),r&&(this._animateShowing(),this._isAnimationPaused=void 0)}},_cacheDimensions:function(){this.option("useResizeObserver")&&(this._renderedDimensions={width:parseInt(He(this._$content),10),height:parseInt(Ke(this._$content),10)})},_renderGeometryImpl:function(){this._resetContentHeight(),this.callBase(),this._cacheDimensions(),this._setContentHeight()},_resetContentHeight:function(){var e=this._getOptionValue("height");e==="auto"&&this.$content().css({height:"auto",maxHeight:"none"})},_renderDrag:function(){var e=this._getDragTarget(),t=this.option("dragEnabled");if(e){var i={dragEnabled:t,handle:e.get(0),draggableElement:this._$content.get(0),positionController:this._positionController};this._drag?this._drag.init(i):this._drag=new D8(i),this.$overlayContent().toggleClass(a9,t)}},_renderResize:function(){this._resizable=this._createComponent(this._$content,VO,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:e=>{this._resizeEndHandler(e),this._observeContentResize(!0)},onResize:e=>{this._setContentHeight(),this._actions.onResize(e)},onResizeStart:e=>{this._observeContentResize(!1),this._actions.onResizeStart(e)},minHeight:100,minWidth:100,area:this._positionController.$dragResizeContainer,keepAspectRatio:!1})},_resizeEndHandler:function(e){var t=this._resizable.option("width"),i=this._resizable.option("height");t&&this._setOptionWithoutOptionChange("width",t),i&&this._setOptionWithoutOptionChange("height",i),this._cacheDimensions(),this._positionController.resizeHandled(),this._positionController.detectVisualPositionChange(e.event),this._actions.onResizeEnd(e)},_setContentHeight:function(){(this.option("forceApplyBindings")||re)();var e=this.$overlayContent().get(0),t=this._chooseHeightStrategy(e);this.$content().css(this._getHeightCssStyles(t,e)),this._setHeightClasses(this.$overlayContent(),t)},_heightStrategyChangeOffset:function(e,t){return e===ia.flex?-t:0},_chooseHeightStrategy:function(e){var t=e.style.width==="auto"||e.style.width==="",i=ia.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(t||v9?i=ia.inherit:i=ia.flex),i},_getHeightCssStyles:function(e,t){var i={},n=this._getOptionValue("maxHeight",t),r=this._getOptionValue("minHeight",t),a=this._splitPopupHeight(),o=a.header+a.footer+a.contentVerticalOffsets+a.popupVerticalOffsets+this._heightStrategyChangeOffset(e,a.popupVerticalPaddings);if(e===ia.static){if(!this._isAutoHeight()||n||r){var s=this.option("fullScreen")?Math.min(Ut(t).height,je().innerHeight):Ut(t).height,l=s-o;i={height:Math.max(0,l),minHeight:"auto",maxHeight:"auto"}}}else{var u=v(this._positionController.$visualContainer).get(0),d=xV(n,-o,u),c=bV(r,-o,u);i={height:"auto",minHeight:c,maxHeight:d}}return i},_setHeightClasses:function(e,t){var i="";for(var n in ia)ia[n]!==t&&(i+=" "+ia[n]);e.removeClass(i).addClass(t)},_isAutoHeight:function(){return this.$overlayContent().get(0).style.height==="auto"},_splitPopupHeight:function(){var e=this.topToolbar(),t=this.bottomToolbar();return{header:ly(e&&e.get(0)),footer:ly(t&&t.get(0)),contentVerticalOffsets:kf(this.$overlayContent().get(0),!0),popupVerticalOffsets:kf(this.$content().get(0),!0),popupVerticalPaddings:kf(this.$content().get(0),!1)}},_isAllWindowCovered:function(){return this.callBase()||this.option("fullScreen")},_renderDimensions:function(){this.option("fullScreen")?this.$overlayContent().css({width:"100%",height:"100%",minWidth:"",maxWidth:"",minHeight:"",maxHeight:""}):this.callBase(),Ue()&&this._renderFullscreenWidthClass()},_clean:function(){this.callBase(),this._observeContentResize(!1)},_renderFullscreenWidthClass:function(){this.$overlayContent().toggleClass(t9,ot(this.$overlayContent())===He(J8))},refreshPosition:function(){this._renderPosition()},_optionChanged:function(e){var t,i=e.value;switch(e.name){case"disabled":this.callBase(e),this._renderTitle(),this._renderBottom();break;case"animation":this._updateResizeCallbackSkipCondition();break;case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry(),lr(this.$overlayContent());break;case"bottomTemplate":this._renderBottom(),this._renderGeometry(),lr(this.$overlayContent());break;case"container":if(this.callBase(e),this.option("resizeEnabled")){var n;(n=this._resizable)===null||n===void 0||n.option("area",this._positionController.$dragResizeContainer)}break;case"width":case"height":this.callBase(e),(t=this._resizable)===null||t===void 0||t.option(e.name,e.value);break;case"onTitleRendered":this._createTitleRenderAction(e.value);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":var r=!e.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),r&&(this._renderGeometry(),lr(this.$overlayContent()));break;case"dragEnabled":this._renderDrag();break;case"dragAndResizeArea":this._positionController.dragAndResizeArea=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer),this._positionController.positionContent();break;case"dragOutsideBoundary":this._positionController.dragOutsideBoundary=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer);break;case"outsideDragFactor":this._positionController.outsideDragFactor=i;break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"autoResizeEnabled":this._renderGeometry(),lr(this.$overlayContent());break;case"fullScreen":this._positionController.fullScreen=e.value,this._toggleFullScreenClass(e.value),this._toggleSafariScrolling(),this._renderGeometry(),lr(this.$overlayContent());break;case"showCloseButton":this._renderTitle();break;default:this.callBase(e)}},bottomToolbar:function(){return this._$bottom},topToolbar:function(){return this._$title},$content:function(){return this._$popupContent},content:function(){return Me(this.$content())},$overlayContent:function(){return this._$content}});tt("dxPopup",Cr);var m9={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},g9=["shading","target","$arrow"],Tr={left:-1,top:-1,center:0,right:1,bottom:1},WO={top:{my:"bottom center",at:"top center",collision:"fit flip"},bottom:{my:"top center",at:"bottom center",collision:"fit flip"},right:{my:"left center",at:"right center",collision:"flip fit"},left:{my:"right center",at:"left center",collision:"flip fit"}},C9={h:10,v:10};class y9 extends Dg{constructor(t){var{shading:i,target:n,$arrow:r}=t,a=Pt(t,g9);super(a),this._props=Se({},this._props,{shading:i,target:n}),this._$arrow=r,this._positionSide=void 0,this.updatePosition(this._props.position)}positionWrapper(){this._props.shading&&this._$wrapper.css({top:0,left:0})}updateTarget(t){this._props.target=t,this.updatePosition(this._props.position)}_renderBoundaryOffset(){}_getContainerPosition(){var t=Fh(this._position.offset||""),{h:i,v:n}=t,r=this._isVerticalSide(),a=this._isHorizontalSide();if(r||a){var o=this._isPopoverInside(),s=(o?-1:1)*Tr[this._positionSide],l=r?Ke(this._$arrow):He(this._$arrow),u=this._getContentBorderWidth(this._positionSide),d=s*(l-u);r?n+=d:i+=d}return k({},this._position,{offset:i+" "+n})}_getContentBorderWidth(t){var i=this._$content.css(m9[t]);return parseInt(i)||0}_isPopoverInside(){var t=xi.setup.normalizeAlign(this._position.my),i=xi.setup.normalizeAlign(this._position.at);return t.h===i.h&&t.v===i.v}_isVerticalSide(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return t==="top"||t==="bottom"}_isHorizontalSide(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return t==="left"||t==="right"}_getDisplaySide(t){var i=xi.setup.normalizeAlign(t.my),n=xi.setup.normalizeAlign(t.at),r=Tr[i.h]===Tr[n.h]&&Tr[i.v]===Tr[n.v]?-1:1,a=Math.abs(Tr[i.h]-r*Tr[n.h]),o=Math.abs(Tr[i.v]-r*Tr[n.v]);return a>o?n.h:n.v}_normalizePosition(t){var i={of:this._props.target,boundaryOffset:C9},n;return E(t)?n=k(!0,{},i,this._positionToObject(t)):n=i,this._positionSide=this._getDisplaySide(n),n}_positionToObject(t){return Ve(t)?k({},WO[t]):t}}var x9="dx-popover",b9="dx-popover-wrapper",S9="dx-popover-arrow",E9="dx-popover-without-title",Bb={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},zO=function(e){return $e(e)?e.name:e},GO=function(e,t){var i=e.option(t);return zO(i)},w9=function(e,t){var i=e.option(t);return $e(i)&&i.delay},Gp=function(e,t){var{target:i,shading:n,disabled:r,hideEvent:a}=e.option(),o=Ve(i),s=n&&t==="hide",l=s?null:GO(e,"".concat(t,"Event"));if(s&&a&&Qe.log("W1020"),!(!l||r)){var u=ye(l,e.NAME),d=e._createAction((function(){var p=w9(e,t+"Event");this._clearEventsTimeouts(),p?this._timeouts[t]=setTimeout(function(){e[t]()},p):e[t]()}).bind(e),{validatingTargetName:"target"}),c=function(p){d({event:p,target:v(p.currentTarget)})},h="_"+t+"EventHandler";if(o)e[h]=c,R.on(me.getDocument(),u,i,c);else{var f=Me(v(i));e[h]=void 0,R.on(f,u,c)}}},Up=function(e,t,i,n){var r=n||GO(e,i+"Event");if(r){r=ye(r,e.NAME);var a="_"+i+"EventHandler";e[a]?R.off(me.getDocument(),r,t,e[a]):R.off(Me(v(t)),r)}},UO=Cr.inherit({_getDefaultOptions:function(){return k(this.callBase(),{target:void 0,shading:!1,position:k({},WO.bottom),hideOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,hideOnParentScroll:!0,arrowPosition:"",arrowOffset:0,_fixWrapperPosition:!0})},_defaultOptionsRules:function(){return[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:function(){return!Ue()},options:{animation:null}}]},_init:function(){this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass(x9),this.$wrapper().addClass(b9)},_render:function(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents:function(e){Up(this,e,"show"),Up(this,e,"hide")},_attachEvents:function(){Gp(this,"show"),Gp(this,"hide")},_renderArrow:function(){this._$arrow=v("<div>").addClass(S9).prependTo(this.$overlayContent())},_documentDownHandler:function(e){return this._isOutsideClick(e)?this.callBase(e):!0},_isOutsideClick:function(e){return!v(e.target).closest(this.option("target")).length},_animate:function(e){e&&e.to&&typeof e.to=="object"&&k(e.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation:function(){this.callBase.apply(this,arguments)},_renderTitle:function(){this.$wrapper().toggleClass(E9,!this.option("showTitle")),this.callBase()},_renderPosition:function(){this.callBase(),this._renderOverlayPosition(),this._actions.onPositioned()},_renderOverlayPosition:function(){this._resetOverlayPosition(),this._updateContentSize();var e=this._getContainerPosition(),t=xi.setup(this.$overlayContent(),e),i=this._getSideByLocation(t);this._togglePositionClass("dx-position-"+i),this._toggleFlippedClass(t.h.flip,t.v.flip);var n=this._isHorizontalSide()||this._isVerticalSide();n&&this._renderArrowPosition(i)},_resetOverlayPosition:function(){this._setContentHeight(!0),this._togglePositionClass("dx-position-"+this._positionController._positionSide),ri(this.$overlayContent(),{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize:function(){if(this.$content()){var e=xi.calculate(this.$overlayContent(),this._getContainerPosition());if(e.h.oversize>0&&this._isHorizontalSide()&&!e.h.fit){var t=He(this.$overlayContent())-e.h.oversize;Fu(this.$overlayContent(),t)}if(e.v.oversize>0&&this._isVerticalSide()&&!e.v.fit){var i=Ke(this.$overlayContent())-e.v.oversize,n=Ke(this.$content())-e.v.oversize;gn(this.$overlayContent(),i),gn(this.$content(),n)}}},_getContainerPosition:function(){return this._positionController._getContainerPosition()},_hideOnParentScrollTarget:function(){return v(this._positionController._position.of||this.callBase())},_getSideByLocation:function(e){var t=e.v.flip,i=e.h.flip;return this._isVerticalSide()&&t||this._isHorizontalSide()&&i||this._isPopoverInside()?Bb[this._positionController._positionSide]:this._positionController._positionSide},_togglePositionClass:function(e){this.$wrapper().removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(e)},_toggleFlippedClass:function(e,t){this.$wrapper().toggleClass("dx-popover-flipped-horizontal",e).toggleClass("dx-popover-flipped-vertical",t)},_renderArrowPosition:function(e){var t=Ut(this._$arrow.get(0)),i=-(this._isVerticalSide(e)?t.height:t.width);this._$arrow.css(Bb[e],i);var n=this._isVerticalSide(e)?"left":"top",r=this._isVerticalSide(e)?"width":"height",a=v(this._positionController._position.of),o=xi.offset(a)||{top:0,left:0},s=xi.offset(this.$overlayContent()),l=t[r],u=s[n],d=Ut(this.$overlayContent().get(0))[r],c=o[n],h=a.get(0),f=h&&!h.preventDefault?Ut(h)[r]:0,p=Math.max(u,c),m=Math.min(u+d,c+f),g;this.option("arrowPosition")==="start"?g=p-u:this.option("arrowPosition")==="end"?g=m-u-l:g=(p+m)/2-u-l/2;var C=this._positionController._getContentBorderWidth(e),b=ki(g-C+this.option("arrowOffset"),C,d-l-2*C);this._$arrow.css(n,b)},_isPopoverInside:function(){return this._positionController._isPopoverInside()},_setContentHeight:function(e){e&&this.callBase()},_getPositionControllerConfig(){var{shading:e,target:t}=this.option();return k({},this.callBase(),{target:t,shading:e,$arrow:this._$arrow})},_initPositionController(){this._positionController=new y9(this._getPositionControllerConfig())},_renderWrapperDimensions:function(){this.option("shading")&&this.$wrapper().css({width:"100%",height:"100%"})},_isVerticalSide:function(e){return this._positionController._isVerticalSide(e)},_isHorizontalSide:function(e){return this._positionController._isHorizontalSide(e)},_clearEventTimeout:function(e){clearTimeout(this._timeouts[e])},_clearEventsTimeouts:function(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean:function(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged:function(e){switch(e.name){case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":e.value&&this.option("fullScreen",!1);break;case"target":e.previousValue&&this._detachEvents(e.previousValue),this._positionController.updateTarget(e.value),this._invalidate();break;case"showEvent":case"hideEvent":var t=e.name.substring(0,4),i=zO(e.previousValue);this.hide(),Up(this,this.option("target"),t,i),Gp(this,t);break;case"visible":this._clearEventTimeout(e.value?"show":"hide"),this.callBase(e);break;default:this.callBase(e)}},show:function(e){return e&&this.option("target",e),this.callBase()}});tt("dxPopover",UO);var I9="dx-list-item",Lb="dx-list-group",xC=20,T9=(1<<xC)-1,Pb=function(e){return(e.group<<xC)+e.item},za=function(e){return{group:e>>xC,item:e&T9}},A9=fC.inherit({_groupElements:function(){return this._collectionWidget._itemContainer().find("."+Lb)},_groupItemElements:function(e){return e.find("."+I9)},getIndexByItemData:function(e){var t=this._collectionWidget.option("items"),i=!1;return e?(e.items&&e.items.length&&(e=e.items[0]),V(t,function(n,r){if(!r.items||(V(r.items,function(a,o){return o!==e?!0:(i={group:n,item:a},!1)}),i))return!1}),i):!1},getItemDataByIndex:function(e){var t=this._collectionWidget.option("items");return Et(e)?this.itemsGetter()[e]:e&&t[e.group]&&t[e.group].items[e.item]||null},itemsGetter:function(){for(var e=[],t=this._collectionWidget.option("items"),i=0;i<t.length;i++)t[i]&&t[i].items?e=e.concat(t[i].items):e.push(t[i]);return e},deleteItemAtIndex:function(e){var t=za(e),i=this._collectionWidget.option("items")[t.group].items;i.splice(t.item,1)},getKeysByItems:function(e){var t=[],i;for(i=0;i<e.length;i++)e[i]&&e[i].items?t=t.concat(e[i].items):t.push(e[i]);var n=[];for(i=0;i<t.length;i++)n.push(this._collectionWidget.keyOf(t[i]));return n},getIndexByKey:function(e,t){var i=t||this._collectionWidget.option("items"),n=-1,r=this;return V(i,function(a,o){if(o.items&&(V(o.items,function(s,l){var u=r._collectionWidget.keyOf(l);if(r._equalKeys(u,e))return n={group:a,item:s},!1}),n!==-1))return!1}),n},_getGroups:function(e){var t=this._collectionWidget.getDataSource(),i=t&&t.group();return i?qr.queryByOptions(Yi(e),{group:i}).toArray():this._collectionWidget.option("items")},getItemsByKeys:function(e,t){var i=[],n=this._getGroups(t),r={},a=o=>{var s=this.getIndexByKey(o,n),l=s&&n[s.group];if(l)return{groupKey:l.key,item:l.items[s.item]}};return V(e,function(o,s){var l=a(s);if(l){var u=l.groupKey,d=l.item,c=r[u];c||(c={key:u,items:[]},r[u]=c,i.push(c)),c.items.push(d)}}),i},moveItemAtIndexToIndex:function(e,t){var i=this._collectionWidget.option("items"),n=za(e),r=za(t),a=i[n.group].items,o=i[r.group].items,s=a[n.item];a.splice(n.item,1),o.splice(r.item,0,s)},_isItemIndex:function(e){return e&&Et(e.group)&&Et(e.item)},_getNormalizedItemIndex:function(e){var t=v(e),i=t.closest("."+Lb);return i.length?Pb({group:this._groupElements().index(i),item:this._groupItemElements(i).index(t)}):-1},_normalizeItemIndex:function(e){return Pb(e)},_denormalizeItemIndex:function(e){return za(e)},_getItemByNormalizedIndex:function(e){var t=za(e),i=this._groupElements().eq(t.group);return this._groupItemElements(i).eq(t.item)},_itemsFromSameParent:function(e,t){return za(e).group===za(t).group}}),KO={};function D9(e,t,i){var n=KO,r={};r[e]=n[e]?n[e]:{},r[e][t]=i,k(n,r)}var jO=[],df=function(e,t,i){jO.push({enabled:e,decoratorType:t,decoratorSubType:i})};df(function(){return this.option("menuItems").length},function(){return"menu"},function(){return this.option("menuMode")});df(function(){return!this.option("menuItems").length&&this.option("allowItemDeleting")},function(){var e=this.option("itemDeleteMode");return e==="toggle"||e==="slideButton"||e==="swipe"||e==="static"?"delete":"menu"},function(){var e=this.option("itemDeleteMode");return e==="slideItem"&&(e="slide"),e});df(function(){return this.option("selectionMode")!=="none"&&this.option("showSelectionControls")},function(){return"selection"},function(){return"default"});df(function(){return this.option("itemDragging.allowReordering")||this.option("itemDragging.allowDropInsideItem")||this.option("itemDragging.group")},function(){return"reorder"},function(){return"default"});var O9="dx-list-item-before-bag",R9="dx-list-item-after-bag",k9="beforeBag",B9="afterBag",L9="modifyElement",P9="afterRender",F9="getExcludedSelectors",M9=it.inherit({ctor:function(e){this._list=e,this._fetchRequiredDecorators()},dispose:function(){this._decorators&&this._decorators.length&&V(this._decorators,function(e,t){t.dispose()})},_fetchRequiredDecorators:function(){this._decorators=[],V(jO,(function(e,t){var i=t.enabled.call(this._list);if(i){var n=t.decoratorType.call(this._list),r=t.decoratorSubType.call(this._list),a=this._createDecorator(n,r);this._decorators.push(a)}}).bind(this))},_createDecorator:function(e,t){var i=this._findDecorator(e,t);return new i(this._list)},_findDecorator:function(e,t){var i,n=(i=KO[e])===null||i===void 0?void 0:i[t];if(!n)throw Qe.Error("E1012",e,t);return n},modifyItemElement:function(e){var t=v(e.itemElement),i={$itemElement:t};this._prependBeforeBags(t,i),this._appendAfterBags(t,i),this._applyDecorators(L9,i)},afterItemsRendered:function(){this._applyDecorators(P9)},_prependBeforeBags:function(e,t){var i=this._collectDecoratorsMarkup(k9,t,O9);e.prepend(i)},_appendAfterBags:function(e,t){var i=this._collectDecoratorsMarkup(B9,t,R9);e.append(i)},_collectDecoratorsMarkup:function(e,t,i){var n=v("<div>");return V(this._decorators,function(){var r=v("<div>").addClass(i);this[e](k({$container:r},t)),r.children().length&&n.append(r)}),n.children()},_applyDecorators:function(e,t){V(this._decorators,function(){this[e](t)})},_handlerExists:function(e){if(!this._decorators)return!1;for(var t=this._decorators,i=t.length,n=0;n<i;n++)if(t[n][e]!==re)return!0;return!1},_eventHandler:function(e,t,i){if(!this._decorators)return!1;for(var n=!1,r=this._decorators,a=r.length,o=0;o<a&&(n=r[o][e](t,i),!n);o++);return n},handleClick:function(e,t){return this._eventHandler("handleClick",e,t)},handleKeyboardEvents:function(e,t){return this._eventHandler("handleKeyboardEvents",e,t)},handleEnterPressing:function(e){return this._eventHandler("handleEnterPressing",e)},contextMenuHandlerExists:function(){return this._handlerExists("handleContextMenu")},handleContextMenu:function(e,t){return this._eventHandler("handleContextMenu",e,t)},getExcludedItemSelectors:function(){var e=[];return this._applyDecorators(F9,e),e.join(",")}}),V9="dx-list-item-selected",N9="dx-list-item-response-wait",$9=yC.inherit({_supportedKeys(){var e=this,t=this.callBase(),i=(n,r)=>{var a=this._editStrategy,o=this.option("focusedElement"),s=a.getNormalizedIndex(o),l=s===this._getLastItemIndex();if(!(l&&this._isDataSourceLoading()))if(n.shiftKey&&e.option("itemDragging.allowReordering")){var u=s+(r?-1:1),d=a.getItemElement(u);this.reorderItem(o,d),this.scrollToItem(o),n.preventDefault()}else{var c=this._editProvider,h=c.handleKeyboardEvents(s,r);h||(r?t.upArrow(n):t.downArrow(n))}};return k({},t,{del:n=>{e.option("allowItemDeleting")&&(n.preventDefault(),e.deleteItem(e.option("focusedElement")))},upArrow:n=>i(n,!0),downArrow:n=>i(n),enter:function(n){this._editProvider.handleEnterPressing(n)||t.enter.apply(this,arguments)},space:function(n){this._editProvider.handleEnterPressing(n)||t.space.apply(this,arguments)}})},_updateSelection(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex(){return this._itemElements().length-1},_refreshItemElements(){this.callBase();var e=this._editProvider.getExcludedItemSelectors();e.length&&(this._itemElementsCache=this._itemElementsCache.not(e))},_isItemStrictEquals:function(e,t){var i=e&&e.__dx_key__;return i&&!this.key()&&this._selection.isItemSelected(i)?!1:this.callBase(e,t)},_getDefaultOptions(){return k(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:fe.format("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",itemDragging:{}})},_defaultOptionsRules(){return this.callBase().concat([{device:e=>e.platform==="ios",options:{menuMode:"slide",itemDeleteMode:"slideItem"}},{device:{platform:"android"},options:{itemDeleteMode:"swipe"}}])},_init(){this.callBase(),this._initEditProvider()},_initDataSource(){this.callBase(),this._isPageSelectAll()||this._dataSource&&this._dataSource.requireTotalCount(!0)},_isPageSelectAll(){return this.option("selectAllMode")==="page"},_initEditProvider(){this._editProvider=new M9(this)},_disposeEditProvider(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy(){this.option("grouped")?this._editStrategy=new A9(this):this.callBase()},_initMarkup(){this._refreshEditProvider(),this.callBase()},_renderItems(){this.callBase(...arguments),this._editProvider.afterItemsRendered()},_selectedItemClass:()=>V9,_itemResponseWaitClass:()=>N9,_itemClickHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=this._editProvider.handleClick(t,e);i||(this._saveSelectionChangeEvent(e),this.callBase(...arguments))}},_shouldFireContextMenuEvent(){return this.callBase(...arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=Nu(e)&&this._editProvider.handleContextMenu(t,e);if(i){e.handledByEditProvider=!0;return}this.callBase(...arguments)}},_getItemContainer:function(e){if(this.option("grouped")){var t,i=(t=this._editStrategy.getIndexByItemData(e))===null||t===void 0?void 0:t.group;return this._getGroupContainerByIndex(i)}else return this.callBase(e)},_itemContextMenuHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=!e.handledByEditProvider&&this._editProvider.handleContextMenu(t,e);if(i){e.preventDefault();return}this.callBase(...arguments)}},_postprocessRenderItem(e){this.callBase(...arguments),this._editProvider.modifyItemElement(e)},_clean(){this._disposeEditProvider(),this.callBase()},focusListItem(e){var t=this._editStrategy.getItemElement(e);this.option("focusedElement",t),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged(e){switch(e.name){case"selectAllMode":this._initDataSource(),this._dataSource.pageIndex(0),this._dataSource.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(e);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(e)}},selectAll(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement(e){return this._itemElements().index(e)},getItemElementByFlatIndex(e){var t=this._itemElements();return e<0||e>=t.length?v():t.eq(e)},getItemByIndex(e){return this._editStrategy.getItemDataByIndex(e)}}),Vo=$9.inherit(Eo).inherit({_addWidgetPrefix:function(e){return"dx-list-"+e},_getCombinedFilter:function(){var e,t,i=this._dataSource;return i&&(t={filter:i.filter()},i._addSearchFilter(t),e=t.filter),e},_initDataSource:function(){var e=this.option("searchValue"),t=this.option("searchExpr"),i=this.option("searchMode");this.callBase(),this._dataSource&&(e&&e.length&&this._dataSource.searchValue(e),i.length&&this._dataSource.searchOperation(Eo.getOperationBySearchMode(i)),t&&this._dataSource.searchExpr(t))}});tt("dxList",Vo);var H9="dx-buttongroup",W9=["dxAutocomplete","dxButton","dxCheckBox","dxDateBox","dxMenu","dxSelectBox","dxTabs","dxTextBox","dxButtonGroup","dxDropDownButton"],z9=function(e){var t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]};function gh(e,t){var i;if(e){var n=e._findItemElementByItem(t);if(n.length){var r=e._getItemData(n),a=!!((i=r.options)!==null&&i!==void 0&&i.disabled||r.disabled||e.option("disabled")),{widget:o}=r;if(o&&W9.indexOf(o)!==-1){var s=n.find(o.toLowerCase().replace("dx",".dx-"));if(s.length){var l,u,d=z9(s),c=o==="dxDropDownButton"?d._focusTarget().find(".".concat(H9)):(d==null||(l=d._focusTarget)===null||l===void 0?void 0:l.call(d))||v(d.element()),h=(u=r.options)===null||u===void 0?void 0:u.tabIndex;a?c.attr("tabIndex",-1):c.attr("tabIndex",h||0)}}}}}var G9=je(),U9="dx-dropdownmenu",K9="dx-dropdownmenu-popup",j9="dx-dropdownmenu-popup-wrapper",q9="dx-dropdownmenu-list",Y9="dx-dropdownmenu-button",X9={popupWidth:"width",popupHeight:"height",popupMaxHeight:"maxHeight",popupAutoResizeEnabled:"autoResizeEnabled"},Z9={buttonIcon:"icon",buttonText:"text",buttonWidth:"width",buttonHeight:"height",buttonTemplate:"template"},qO=_i.inherit({_supportedKeys:function(){var e={};return(!this.option("opened")||!this._list.option("focusedElement"))&&(e=this._button._supportedKeys()),k(this.callBase(),e,{tab:function(){this._popup&&this._popup.hide()}})},_getDefaultOptions:function(){return k(this.callBase(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",buttonText:"",buttonIcon:"overflow",buttonWidth:void 0,buttonHeight:void 0,buttonTemplate:"content",onButtonClick:null,usePopover:!1,popupWidth:"auto",popupHeight:"auto",activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,selectionMode:"none",selectedItemKeys:[],deferRendering:!1,popupPosition:{my:"top center",at:"bottom center",collision:"fit flip",offset:{v:1}},popupAnimation:void 0,onItemRendered:null,menuWidget:Vo,popupMaxHeight:void 0,closeOnClick:!0,useInkRipple:!1,container:void 0,popupAutoResizeEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{usePopover:!0}},{device:{platform:"generic"},options:{popupPosition:{offset:{v:4}}}},{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}},{device:{platform:"android"},options:{popupPosition:{my:"top "+(this.option("rtlEnabled")?"left":"right"),at:"top "+(this.option("rtlEnabled")?"left":"right"),collision:"flipfit"},popupAnimation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}},{device:function(){return ei()},options:{useInkRipple:!0}}])},_initOptions:function(e){Re.current().platform==="android"&&(e.popupPosition||(e.popupPosition={at:(e.usePopover?"bottom ":"top ")+(e.rtlEnabled?"left":"right")})),this.callBase(e)},_dataSourceOptions:function(){return{paginate:!1}},_init:function(){this.callBase(),this.$element().addClass(U9),this._initDataSource(),this._initItemClickAction(),this._initButtonClickAction()},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initButtonClickAction:function(){this._buttonClickAction=this._createActionByOption("onButtonClick")},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new $h("content")}),this.callBase()},_initMarkup:function(){this._renderButton(),this.callBase()},_render:function(){this.callBase(),this.setAria({role:"menubar",haspopup:!0,expanded:this.option("opened")})},_renderContentImpl:function(){this.option("opened")&&this._renderPopup()},_clean:function(){this._cleanFocusState(),this._popup&&(this._popup.$element().remove(),delete this._$popup)},_renderButton:function(){var e=this.$element().addClass(Y9),t=this._buttonOptions();this._button=this._createComponent(e,Ii,t)},_toggleActiveState:function(e,t,i){this._button._toggleActiveState(e,t,i)},_buttonOptions:function(){return{text:this.option("buttonText"),icon:this.option("buttonIcon"),width:this.option("buttonWidth"),height:this.option("buttonHeight"),useInkRipple:this.option("useInkRipple"),template:this.option("buttonTemplate"),hoverStateEnabled:!1,focusStateEnabled:!1,onClick:(function(e){this.option("opened",!this.option("opened")),this._buttonClickAction(e)}).bind(this)}},_toggleMenuVisibility:function(e){var t=e===void 0?!this._popup.option("visible"):e;e&&this._renderPopup(),this._popup.toggle(t),this.setAria("expanded",t)},_renderPopup:function(){if(!this._$popup){var e=this._$popup=v("<div>").appendTo(this.$element()),t=this._popupOptions();this._popup=this._createComponent(e,UO,t)}},_popupOptions:function(){var e=!this.option("usePopover");return{onInitialized:function(t){t.component.$wrapper().addClass(j9).toggleClass(K9,e)},visible:this.option("opened"),deferRendering:!1,contentTemplate:(function(t){this._renderList(t)}).bind(this),position:this.option("popupPosition"),animation:this.option("popupAnimation"),onOptionChanged:(function(t){t.name==="visible"&&this.option("opened",t.value)}).bind(this),target:this.$element(),height:this.option("popupHeight"),width:this.option("popupWidth"),maxHeight:this.option("popupMaxHeight"),container:this.option("container"),autoResizeEnabled:this.option("popupAutoResizeEnabled")}},_renderList:function(e){var t=v(e),i=this._listOptions();t.addClass(q9),this._list=this._createComponent(t,this.option("menuWidget"),i),this._list._getAriaTarget=(function(){return this.$element()}).bind(this),this._setListDataSource();var n=.5*Ke(G9);Ke(t)>n&&gn(t,n)},_itemOptionChanged:function(e,t,i){var n;(n=this._list)===null||n===void 0||n._itemOptionChanged(e,t,i),gh(this._list,e)},_listOptions:function(){return{pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",selectionMode:this.option("selectionMode"),selectedItemKeys:this.option("selectedItemKeys"),itemTemplate:this.option("itemTemplate"),onItemClick:(function(e){this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(e)}).bind(this),tabIndex:-1,focusStateEnabled:this.option("focusStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}}},_setListDataSource:function(){this._list&&this._list.option("dataSource",this._dataSource||this.option("items")),delete this._deferRendering},_getKeyboardListeners(){return this.callBase().concat([this._list])},_toggleVisibility:function(e){this.callBase(e),this._button.option("visible",e)},_optionChanged:function(e){var t=e.name,i=e.value;switch(t){case"items":case"dataSource":this.option("deferRendering")&&!this.option("opened")?this._deferRendering=!0:(this._refreshDataSource(),this._setListDataSource());break;case"itemTemplate":this._list&&this._list.option(t,this._getTemplate(i));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"buttonIcon":case"buttonText":case"buttonWidth":case"buttonHeight":case"buttonTemplate":this._button.option(Z9[t],i),this._renderPopup();break;case"popupWidth":case"popupHeight":case"popupMaxHeight":case"popupAutoResizeEnabled":this._popup.option(X9[t],i);break;case"usePopover":case"menuWidget":case"useInkRipple":this._invalidate();break;case"focusStateEnabled":case"activeStateEnabled":this._list&&this._list.option(t,i),this.callBase(e);break;case"selectionMode":case"selectedItemKeys":case"onItemRendered":this._list&&this._list.option(t,i);break;case"opened":this._deferRendering&&(this._refreshDataSource(),this._setListDataSource()),this._toggleMenuVisibility(i),this._updateFocusableItemsTabIndex();break;case"deferRendering":case"popupPosition":case"closeOnClick":break;case"container":this._popup&&this._popup.option(e.name,e.value);break;case"disabled":this._list&&this._updateFocusableItemsTabIndex();break;default:this.callBase(e)}},_updateFocusableItemsTabIndex(){this.option("items").forEach(e=>gh(this._list,e))},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)}}).include(Zu);tt("dxDropDownMenu",qO);var J9="dx-state-invisible",Q9="dx-toolbar-menu-container",ej=10;class tj{constructor(t){this._toolbar=t}render(){if(this._hasVisibleMenuItems()){this._renderMenuButtonContainer();var t=v("<div>").appendTo(this._dropDownMenuContainer());this._dropDownMenu=this._toolbar._createComponent(t,qO,this._dropDownMenuOptions()),this.renderMenuItems()}}renderMenuItems(){this._dropDownMenu||this.render(),this._dropDownMenu&&this._dropDownMenu.option("items",this._getMenuItems()),this._dropDownMenu&&!this._dropDownMenu.option("items").length&&this._dropDownMenu.close()}_renderMenuButtonContainer(){var t=this._toolbar._$afterSection;this._$menuButtonContainer=v("<div>").appendTo(t).addClass(this._toolbar._buttonClass()).addClass(Q9)}_getMenuItemTemplate(){return this._toolbar._getTemplateByOption("menuItemTemplate")}_dropDownMenuOptions(){var t=this._toolbar._createActionByOption("onItemClick"),i=2*ej;return{disabled:this._toolbar.option("disabled"),itemTemplate:this._getMenuItemTemplate.bind(this),onItemClick:(function(n){t(n)}).bind(this),deferRendering:!0,container:this._toolbar.option("menuContainer"),popupMaxHeight:Re.current().platform==="android"?me.getDocumentElement().clientHeight-i:void 0,menuWidget:MO,onOptionChanged:n=>{var{name:r,value:a}=n;r==="opened"&&this._toolbar.option("overflowMenuVisible",a),r==="items"&&this._updateMenuVisibility(a)},popupPosition:{at:"bottom right",my:"top right"}}}_updateMenuVisibility(t){var i=t||this._getMenuItems(),n=i.length&&this._hasVisibleMenuItems(i);this._toggleMenuVisibility(n)}_getMenuItems(){return this._toolbar._getMenuItems()}_hasVisibleMenuItems(t){var i=t||this._toolbar.option("items"),n=!1,r=bt("visible"),a=bt("locateInMenu");return V(i,function(o,s){var l=r(s,{functionsAsIs:!0}),u=a(s,{functionsAsIs:!0});(l!==!1&&(u==="auto"||u==="always")||s.location==="menu")&&(n=!0)}),n}_toggleMenuVisibility(t){this._dropDownMenuContainer()&&this._dropDownMenuContainer().toggleClass(J9,!t)}_dropDownMenuContainer(){return this._$menuButtonContainer}widgetOption(t,i){this._dropDownMenu&&this._dropDownMenu.option(t,i)}itemOption(t,i,n){if(i==="disabled"||i==="options.disabled"){var r;(r=this._dropDownMenu)===null||r===void 0||r._itemOptionChanged(t,i,n)}else this.renderMenuItems()}}var Kd="dx-toolbar-item-auto-hide",ij="dx-toolbar-text-auto-hide",Kp="dx-toolbar-item-invisible",YO=HO.inherit({_getDefaultOptions:function(){return k(this.callBase(),{menuItemTemplate:"menuItem",menuContainer:void 0,overflowMenuVisible:!1})},updateDimensions:function(){this._dimensionChanged()},_dimensionChanged:function(e){e!=="height"&&(this.callBase(),this._menu.renderMenuItems())},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({actionSheetItem:new $h("item")})},_initMarkup:function(){this.callBase(),this._updateFocusableItemsTabIndex(),this._renderMenu()},_postProcessRenderItems:function(){this._hideOverflowItems(),this._menu._updateMenuVisibility(),this.callBase(),Qt(()=>{this._menu.renderMenuItems()})},_renderItem:function(e,t,i,n){var r=this.callBase(e,t,i,n);return t.locateInMenu==="auto"&&r.addClass(Kd),t.widget==="dxButton"&&t.showText==="inMenu"&&r.toggleClass(ij),r},_getItemsWidth:function(){return this._getSummaryItemsWidth([this._$beforeSection,this._$centerSection,this._$afterSection])},_hideOverflowItems:function(e){var t=this.$element().find("."+Kd);if(t.length){e=e||He(this.$element()),v(t).removeClass(Kp);for(var i=this._getItemsWidth();t.length&&e<i;){var n=t.eq(-1);i-=ot(n),n.addClass(Kp),t.splice(-1,1)}}},_getMenuItems:function(){var e=this,t=zi(this.option("items")||[],function(r){return e._isMenuItem(r)}),i=this._itemContainer().children("."+Kd+"."+Kp).not(".dx-state-invisible");this._restoreItems=this._restoreItems||[];var n=[].slice.call(i).map(r=>{var a=e._getItemData(r),o=v(r).children(),s=o.children();return k({menuItemTemplate:function(){e._restoreItems.push({container:o,item:s});var l=v("<div>").addClass(Kd);return l.append(s)}},a)});return[...n,...t]},_getToolbarItems:function(){var e=this;return zi(this.option("items")||[],function(t){return!e._isMenuItem(t)})},_renderMenu:function(){this._renderMenuStrategy(),Qt(()=>{this._menu.render()})},_renderMenuStrategy:function(){this._menu||(this._menu=new tj(this))},_arrangeItems:function(){if(!this.$element().is(":hidden")){this._$centerSection.css({margin:"0 auto",float:"none"}),V(this._restoreItems||[],function(t,i){v(i.container).append(i.item)}),this._restoreItems=[];var e=He(this.$element());this._hideOverflowItems(e),this.callBase(e)}},_itemOptionChanged:function(e,t,i){this._isMenuItem(e)?this._menu.itemOption(e,t,i):this._isToolbarItem(e)?this.callBase(e,t,i):(this.callBase(e,t,i),this._menu.renderMenuItems()),(t==="disabled"||t==="options.disabled")&&gh(this,e),t==="location"&&this.repaint()},_updateFocusableItemsTabIndex(){this._getToolbarItems().forEach(e=>gh(this,e))},_isMenuItem:function(e){return e.location==="menu"||e.locateInMenu==="always"},_isToolbarItem:function(e){return e.location===void 0||e.locateInMenu==="never"},_optionChanged:function(e){var{name:t,value:i}=e;switch(t){case"menuItemTemplate":this._changeMenuOption("itemTemplate",this._getTemplate(i));break;case"onItemClick":this._changeMenuOption(t,i),this.callBase.apply(this,arguments);break;case"menuContainer":this._changeMenuOption("container",i);break;case"overflowMenuVisible":this._changeMenuOption("opened",i);break;case"disabled":this._changeMenuOption("disabled",i),this.callBase.apply(this,arguments),this._updateFocusableItemsTabIndex();break;default:this.callBase.apply(this,arguments)}},_changeMenuOption:function(e,t){this._menu.widgetOption(e,t)}});tt("dxToolbar",YO);var nj="header-panel",Fb="toolbar-button",rj="-ariaToolbar",Mb=["addRowButton","applyFilterButton","columnChooserButton","exportButton","groupPanel","revertButton","saveButton","searchPanel"],aj=Yu.inherit({_getToolbarItems:function(){return[]},_getButtonContainer:function(){return v("<div>").addClass(this.addWidgetPrefix(Fb))},_getToolbarButtonClass:function(e){var t=e?" "+e:"";return this.addWidgetPrefix(Fb)+t},_getToolbarOptions:function(){var e=this.option("toolbar"),t={toolbarOptions:{items:this._getToolbarItems(),visible:e==null?void 0:e.visible,disabled:e==null?void 0:e.disabled,onItemRendered:function(r){var a=r.itemData.onItemRendered;a&&a(r)}}},i=e==null?void 0:e.items;if(t.toolbarOptions.items=this._normalizeToolbarItems(t.toolbarOptions.items,i),this.executeAction("onToolbarPreparing",t),t.toolbarOptions&&!E(t.toolbarOptions.visible)){var n=t.toolbarOptions.items;t.toolbarOptions.visible=!!(n!=null&&n.length)}return t.toolbarOptions},_normalizeToolbarItems(e,t){e.forEach(o=>{if(!Mb.includes(o.name))throw new Error("Default toolbar item '".concat(o.name,"' is not added to DEFAULT_TOOLBAR_ITEM_NAMES"))});var i={location:"after"},n=Array.isArray(t);if(!E(t))return e;n||(t=[t]);var r={};e.forEach(o=>{r[o.name]=o});var a=t.map(o=>(Ve(o)&&(o={name:o}),E(o.name)&&(E(r[o.name])?o=k(!0,{},r[o.name],o):Mb.includes(o.name)&&(o=Se({},o,{visible:!1}))),k(!0,{},i,o)));return n?a:a[0]},_renderCore:function(){if(this._toolbar)this._toolbar.option(this._toolbarOptions);else{var e=this.element();e.addClass(this.addWidgetPrefix(nj));var t=fe.format(this.component.NAME+rj),i=v("<div>").attr("aria-label",t).appendTo(e);this._toolbar=this._createComponent(i,YO,this._toolbarOptions)}},_columnOptionChanged:re,_handleDataChanged:function(){this._requireReady&&this.render()},init:function(){this.callBase(),this.createAction("onToolbarPreparing",{excludeValidators:["disabled","readOnly"]})},render:function(){this._toolbarOptions=this._getToolbarOptions(),this.callBase.apply(this,arguments)},setToolbarItemDisabled:function(e,t){var i=this._toolbar;if(i){var n=i.option("items")||[],r=n.indexOf(n.filter(function(o){return o.name===e})[0]);if(r>=0){var a="items["+r+"]";i.option(a+".options")?i.option(a+".options.disabled",t):i.option(a+".disabled",t)}}},updateToolbarDimensions:function(){var e;(e=this._toolbar)===null||e===void 0||e.updateDimensions()},getHeaderPanel:function(){return this.element()},getHeight:function(){return this.getElementHeight()},optionChanged:function(e){if(e.name==="onToolbarPreparing"&&(this._invalidate(),e.handled=!0),e.name==="toolbar"&&(e.handled=!0,this._toolbar)){var t=Ao(e.fullName),i=e.fullName.replace(/^toolbar\./,"");if(t.length===1){var n=this._getToolbarOptions();this._toolbar.option(n)}else if(t[1]==="items")if(t.length===2){var r=this._getToolbarOptions();this._toolbar.option("items",r.items)}else if(t.length===3){var a=this._normalizeToolbarItems(this._getToolbarItems(),e.value);this._toolbar.option(i,a)}else t.length>=4&&this._toolbar.option(i,e.value);else this._toolbar.option(i,e.value)}this.callBase(e)},isVisible:function(){return this._toolbarOptions&&this._toolbarOptions.visible},allowDragging:re}),XO={defaultOptions:function(){return{}},views:{headerPanel:aj},extenders:{controllers:{resizing:{_updateDimensionsCore:function(){this.callBase.apply(this,arguments),this.getView("headerPanel").updateToolbarDimensions()}}}}};XO.views.headerPanel;Oe.registerModule("headerPanel",XO);var oj=".dx-row",sj="Specifying grid templates with the jQuery selector name is now deprecated. Use the DOM Node or the jQuery object that references this selector instead.";Oe.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","grouping","editing","editingRowBased","editingFormBased","editingCellBased","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);var bC=_i.inherit({_activeStateUnit:oj,_getDefaultOptions:function(){var e=this.callBase();return V(Oe.modules,function(){Ie(this.defaultOptions)&&k(!0,e,this.defaultOptions())}),e},_setDeprecatedOptions:function(){this.callBase(),k(this._deprecatedOptions,{useKeyboard:{since:"19.2",alias:"keyboardNavigation.enabled"},rowTemplate:{since:"21.2",message:'Use the "dataRowTemplate" option instead'},onToolbarPreparing:{since:"21.2",message:'Use the "toolbar" option instead'}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{showRowLines:!0}},{device:function(){return ei()},options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0},selection:{showCheckBoxesMode:"always"}}},{device:function(){return Lt.webkit},options:{loadingTimeout:30,loadPanel:{animation:{show:{easing:"cubic-bezier(1, 0, 1, 0)",duration:500,from:{opacity:0},to:{opacity:1}}}}}},{device:function(e){return e.deviceType!=="desktop"},options:{grouping:{expandMode:"rowClick"}}}])},_init:function(){this.callBase(),Oe.processModules(this,Oe),Oe.callModuleItemsMethod(this,"init")},_clean:re,_optionChanged:function(e){Oe.callModuleItemsMethod(this,"optionChanged",[e]),e.handled||this.callBase(e)},_dimensionChanged:function(){this.updateDimensions(!0)},_visibilityChanged:function(e){e&&this.updateDimensions()},_initMarkup:function(){this.callBase.apply(this,arguments),this.getView("gridView").render(this.$element())},_renderContentImpl:function(){this.getView("gridView").update()},_renderContent:function(){var e=this;Qt(function(){e._renderContentImpl()})},_getTemplate:function(e){var t=e;return Ve(t)&&t[0]==="#"&&(t=v(e),Bu.warn(sj)),this.callBase(t)},_dispose:function(){this.callBase(),Oe.callModuleItemsMethod(this,"dispose")},isReady:function(){return this.getController("data").isReady()},beginUpdate:function(){this.callBase(),Oe.callModuleItemsMethod(this,"beginUpdate")},endUpdate:function(){Oe.callModuleItemsMethod(this,"endUpdate"),this.callBase()},getController:function(e){return this._controllers[e]},getView:function(e){return this._views[e]},focus:function(e){this.getController("keyboardNavigation").focus(e)}});bC.registerModule=Oe.registerModule.bind(Oe);tt("dxDataGrid",bC);var lj=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/,uj=function e(t){t&&V(t,function(i,n){if(Ye(n)||Array.isArray(n))e(n);else if(typeof n=="string"){var r=lj.exec(n);r&&(t[i]=new Date(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4],+r[5],+r[6])))}})},dj=Dt.ViewController.inherit(function(){var e=function(i){var n=i.type==="sessionStorage"?sT():je().localStorage;if(!n)throw new Error("E1007");return n},t=function(i){return E(i.storageKey)?i.storageKey:"storage"};return{_loadState:function(){var i=this.option("stateStoring");if(i.type==="custom")return i.customLoad&&i.customLoad();try{return JSON.parse(e(i).getItem(t(i)))}catch(n){Qe.log(n.message)}},_saveState:function(i){var n=this.option("stateStoring");if(n.type==="custom"){n.customSave&&n.customSave(i);return}try{e(n).setItem(t(n),JSON.stringify(i))}catch(r){Qe.log(r.message)}},publicMethods:function(){return["state"]},isEnabled:function(){return this.option("stateStoring.enabled")},init:function(){var i=this;return i._state={},i._isLoaded=!1,i._isLoading=!1,i._windowUnloadHandler=function(){i._savingTimeoutID!==void 0&&i._saveState(i.state())},R.on(je(),"unload",i._windowUnloadHandler),i},isLoaded:function(){return this._isLoaded},isLoading:function(){return this._isLoading},load:function(){this._isLoading=!0;var i=yi(this._loadState());return i.always(()=>{this._isLoaded=!0,this._isLoading=!1}).done(n=>{n!==null&&!Pn(n)&&this.state(n)}),i},state:function(i){var n=this;if(arguments.length)n._state=k({},i),uj(n._state);else return k(!0,{},n._state)},save:function(){var i=this;clearTimeout(i._savingTimeoutID),i._savingTimeoutID=setTimeout(function(){i._saveState(i.state()),i._savingTimeoutID=void 0},i.option("stateStoring.savingTimeout"))},optionChanged:function(i){switch(i.name){case"stateStoring":this.isEnabled()&&!this.isLoading()&&this.load(),i.handled=!0;break;default:this.callBase(i)}},dispose:function(){clearTimeout(this._savingTimeoutID),R.off(je(),"unload",this._windowUnloadHandler)}}}()),cj=e=>{var t=e.getView("pagerView"),i=e.getController("data"),n={allowedPageSizes:t?t.getPageSizes():void 0,filterPanel:{filterEnabled:e.option("filterPanel.filterEnabled")},filterValue:e.option("filterValue"),focusedRowKey:e.option("focusedRowEnabled")?e.option("focusedRowKey"):void 0};return k(n,i.getUserState())},hj=e=>{var t=e.getController("columns"),i=e.getController("selection"),n=e.getController("export"),r=e.getController("data");t&&t.columnsChanged.add(function(){e.updateState({columns:t.getUserState()})}),i&&i.selectionChanged.add(function(a){e.updateState({selectedRowKeys:a.selectedRowKeys,selectionFilter:a.selectionFilter})}),r&&(e._initialPageSize=e.option("paging.pageSize"),e._initialFilterValue=e.option("filterValue"),r.changed.add(function(){var a=cj(e);e.updateState(a)})),n&&n.selectionOnlyChanged.add(function(){e.updateState({exportSelectionOnly:n.selectionOnly()})})},fj=null,pj=(e,t)=>{var i=e.getController("filterSync"),n=e.getController("columns"),r=t.columns||t.filterValue!==void 0;return i?r?t.filterValue||i.getFilterValueFromColumns(t.columns):e._initialFilterValue||i.getFilterValueFromColumns(n.getColumns()):fj},vj={defaultOptions:function(){return{stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3}}},controllers:{stateStoring:dj},extenders:{views:{rowsView:{init:function(){var e=this,t=e.getController("data");e.callBase(),t.stateLoaded.add(function(){if(t.isLoaded()&&!t.getDataSource()){e.setLoading(!1),e.renderNoDataText();var i=e.component.getView("columnHeadersView");i&&i.render(),e.component._fireContentReadyAction()}})}}},controllers:{stateStoring:{init:function(){this.callBase.apply(this,arguments),hj(this)},isLoading:function(){return this.callBase()||this.getController("data").isStateLoading()},state:function(e){var t=this.callBase.apply(this,arguments);return e!==void 0&&this.applyState(k({},e)),t},updateState:function(e){if(this.isEnabled()){var t=this.state(),i=k({},t,e),n=jn(t),r=jn(i);Bt(n,r)||(k(this._state,e),this.save())}else k(this._state,e)},applyState:function(e){var t=e.allowedPageSizes,i=e.searchText,n=e.selectedRowKeys,r=e.selectionFilter,a=this.getController("export"),o=this.getController("columns"),s=this.getController("data"),l=this.option("scrolling.mode"),u=l==="virtual"||l==="infinite",d=this.option("pager.visible")===!0&&this.option("pager.showPageSizeSelector");this.component.beginUpdate(),o&&o.setUserState(e.columns),a&&a.selectionOnly(e.exportSelectionOnly),this.option("selection.deferred")||this.option("selectedRowKeys",n||[]),this.option("selectionFilter",r),t&&this.option("pager.allowedPageSizes")==="auto"&&(this.option("pager").allowedPageSizes=t),this.option("focusedRowEnabled")&&(this.option("focusedRowIndex",-1),this.option("focusedRowKey",e.focusedRowKey||null)),this.component.endUpdate(),this.option("searchPanel.text",i||""),this.option("filterValue",pj(this,e)),this.option("filterPanel.filterEnabled",e.filterPanel?e.filterPanel.filterEnabled:!0),this.option("paging.pageIndex",e.pageIndex||0),this.option("paging.pageSize",(!u||d)&&E(e.pageSize)?e.pageSize:this._initialPageSize),s&&s.reset()}},columns:{getVisibleColumns:function(){var e=this.callBase.apply(this,arguments),t=this.getController("stateStoring");return t.isEnabled()&&!t.isLoaded()?[]:e}},data:{callbackNames:function(){return this.callBase().concat(["stateLoaded"])},_refreshDataSource:function(){var e=this.callBase,t=this.getController("stateStoring");if(t.isEnabled()&&!t.isLoaded()){clearTimeout(this._restoreStateTimeoutID);var i=new se;return this._restoreStateTimeoutID=setTimeout(()=>{t.load().always(()=>{this._restoreStateTimeoutID=null}).done(()=>{e.call(this),this.stateLoaded.fire(),i.resolve()}).fail(n=>{this.stateLoaded.fire(),this._handleLoadError(n||"Unknown error"),i.reject()})}),i.promise()}else this.isStateLoading()||e.call(this)},isLoading:function(){var e=this.getController("stateStoring");return this.callBase()||e.isLoading()},isStateLoading:function(){return E(this._restoreStateTimeoutID)},isLoaded:function(){return this.callBase()&&!this.isStateLoading()},dispose:function(){clearTimeout(this._restoreStateTimeoutID),this.callBase()}},selection:{_fireSelectionChanged:function(e){var t=this.getController("stateStoring"),i=this.option("selection.deferred");t.isLoading()&&i||this.callBase.apply(this,arguments)}}}}};Oe.registerModule("stateStoring",vj);var ZO="dx-editor-cell",_j="dx-row",Vb="dx-selection",Ga="dx-select-checkbox",mj="dx-select-checkboxes-hidden",JO="dx-command-select",gj="dx-selection-disabled",QO="dx-data-row",dr="selection.showCheckBoxesMode",Pc="selection.mode",Nb=function(e,t){var i=e.getController("selection"),n=e.getView("rowsView"),r=v(t.target).closest("."+QO),a=n.getRowIndex(r);a<0||(e.option(dr)==="onLongTap"?i.isSelectionWithCheckboxes()?i.stopSelectionWithCheckboxes():i.startSelectionWithCheckboxes():(e.option(dr)==="onClick"&&i.startSelectionWithCheckboxes(),e.option(dr)!=="always"&&i.changeItemSelection(a,{control:!0})))},Cj=Oe.Controller.inherit(function(){var e=(i,n)=>{var r=n.component,a=r.getView("rowsView");r.option("renderAsync")&&!r.option("selection.deferred")&&(n.value=r.isRowSelected(n.row.key)),a.renderSelectCheckBoxContainer(v(i),n)},t=(i,n)=>{var r=n.column,a=v(i),o=n.component.getView("columnHeadersView");a.addClass(ZO),o._renderSelectAllCheckBox(a,r),o._attachSelectAllCheckBoxClickEvent(a)};return{init:function(){var{deferred:i,selectAllMode:n,mode:r}=this.option("selection")||{};this.option("scrolling.mode")==="infinite"&&!i&&r==="multiple"&&n==="allPages"&&Qe.log("W1018"),this._dataController=this.getController("data"),this._selectionMode=r,this._isSelectionWithCheckboxes=!1,this._selection=this._createSelection(),this._updateSelectColumn(),this.createAction("onSelectionChanged",{excludeValidators:["disabled","readOnly"]}),this._dataController&&this._dataController.pushed.add(this._handleDataPushed.bind(this))},_handleDataPushed:function(i){var n=i.filter(r=>r.type==="remove").map(r=>r.key);n.length&&this.deselectRows(n)},_getSelectionConfig:function(){var i=this._dataController,n=this.getController("columns"),r=this.option("selection")||{},a=r.deferred,o=this.option("scrolling.mode"),s=o==="virtual"||o==="infinite",l=this.option("selection.allowSelectAll"),u=this.option("scrolling.legacyMode");return{selectedKeys:this.option("selectedRowKeys"),mode:this._selectionMode,deferred:a,maxFilterLengthInRequest:r.maxFilterLengthInRequest,selectionFilter:this.option("selectionFilter"),ignoreDisabledItems:!0,allowLoadByRange:function(){var d=n.getGroupColumns().length>0;return s&&!u&&!d&&l&&!a},key:function(){return i==null?void 0:i.key()},keyOf:function(d){return i==null?void 0:i.keyOf(d)},dataFields:function(){var d;return(d=i.dataSource())===null||d===void 0?void 0:d.select()},load:function(d){var c;return((c=i.dataSource())===null||c===void 0?void 0:c.load(d))||new se().resolve([])},plainItems:function(){return i.items(!0)},isItemSelected:function(d){return d.selected},isSelectableItem:function(d){return(d==null?void 0:d.rowType)==="data"&&!d.isNewRow},getItemData:function(d){return(d==null?void 0:d.oldData)||(d==null?void 0:d.data)||d},filter:function(){return i.getCombinedFilter(a)},totalCount:()=>i.totalCount(),getLoadOptions:function(d,c,h){var f,p,{sort:m,filter:g}=(f=(p=i.dataSource())===null||p===void 0?void 0:p.lastLoadOptions())!==null&&f!==void 0?f:{},C=Math.min(d,c),b=Math.max(d,c);E(h)&&(C=Math.min(h,C),b=Math.max(h,b));var A=b-C+1;return{skip:C,take:A,filter:g,sort:m}},onSelectionChanged:this._updateSelectedItems.bind(this)}},_updateSelectColumn:function(){var i=this.getController("columns"),n=this.isSelectColumnVisible();i.addCommandColumn({type:"selection",command:"select",visible:n,visibleIndex:-1,dataType:"boolean",alignment:"center",cssClass:JO,width:"auto",cellTemplate:e,headerCellTemplate:t}),i.columnOption("command:select","visible",n)},_createSelection:function(){var i=this._getSelectionConfig();return new IO(i)},_fireSelectionChanged:function(i){var n=this.option("selection.deferred")?{selectionFilter:this.option("selectionFilter")}:{selectedRowKeys:this.option("selectedRowKeys")};this.selectionChanged.fire(n),i&&this.executeAction("onSelectionChanged",i)},_updateCheckboxesState:function(i){var n=i.isDeferredMode,r=i.selectionFilter,a=i.selectedItemKeys,o=i.removedItemKeys;this.option(dr)==="onClick"&&((n?r&&function(s,l){var u=0,d=s._dataController.store(),c=d&&d.key(),h=Array.isArray(c);if(!l.length)return!1;if(h&&Array.isArray(l[0])&&l[1]==="and"){for(var f=0;f<l.length;f++)if(Array.isArray(l[f])){if(l[f][0]!==c[u]||l[f][1]!=="=")return!0;u++}return!1}return c!==l[0]}(this,r):a.length>1)?this.startSelectionWithCheckboxes():(n?r&&!r.length:a.length===0&&o.length)&&this.stopSelectionWithCheckboxes())},_updateSelectedItems:function(i){var n,r=this.option("selection.deferred"),a=this._selection.selectionFilter(),o=this._dataController,s=o.items();if(s){var l=this.isSelectionWithCheckboxes(),u=this.getChangedItemIndexes(s);this._updateCheckboxesState({selectedItemKeys:i.selectedItemKeys,removedItemKeys:i.removedItemKeys,selectionFilter:a,isDeferredMode:r}),(u.length||l!==this.isSelectionWithCheckboxes())&&o.updateItems({changeType:"updateSelection",itemIndexes:u}),r?(this.option("selectionFilter",a),n={}):(i.addedItemKeys.length||i.removedItemKeys.length)&&(this._selectedItemsInternalChange=!0,this.option("selectedRowKeys",i.selectedItemKeys.slice(0)),this._selectedItemsInternalChange=!1,n={selectedRowsData:i.selectedItems.slice(0),selectedRowKeys:i.selectedItemKeys.slice(0),currentSelectedRowKeys:i.addedItemKeys.slice(0),currentDeselectedRowKeys:i.removedItemKeys.slice(0)}),this._fireSelectionChanged(n)}},getChangedItemIndexes:function(i){for(var n=[],r=this.option("selection.deferred"),a=0,o=i.length;a<o;a++){var s=i[a],l=this.isRowSelected(r?s.data:s.key);this._selection.isDataItem(s)&&s.isSelected!==l&&n.push(a)}return n},callbackNames:function(){return["selectionChanged"]},optionChanged:function(i){switch(this.callBase(i),i.name){case"selection":var n=this._selectionMode;if(this.init(),i.fullName!=="selection.showCheckBoxesMode"){var r=this._selectionMode,a=this.option("selectedRowKeys");n!==r&&(r==="single"?a.length>1&&(a=[a[0]]):r!=="multiple"&&(a=[])),this.selectRows(a).always(()=>{this._fireSelectionChanged()})}this.getController("columns").updateColumns(),i.handled=!0;break;case"selectionFilter":this._selection.selectionFilter(i.value),i.handled=!0;break;case"selectedRowKeys":var o=i.value||[];Array.isArray(o)&&!this._selectedItemsInternalChange&&(this.component.getDataSource()||!o.length)&&this.selectRows(o),i.handled=!0}},publicMethods:function(){return["selectRows","deselectRows","selectRowsByIndexes","getSelectedRowKeys","getSelectedRowsData","clearSelection","selectAll","deselectAll","startSelectionWithCheckboxes","stopSelectionWithCheckboxes","isRowSelected"]},isRowSelected:function(i){return this._selection.isItemSelected(i)},isSelectColumnVisible:function(){return this.option(Pc)==="multiple"&&(this.option(dr)==="always"||this.option(dr)==="onClick"||this._isSelectionWithCheckboxes)},_isOnePageSelectAll:function(){return this.option("selection.selectAllMode")==="page"},isSelectAll:function(){return this._selection.getSelectAllState(this._isOnePageSelectAll())},selectAll:function(){return this.option(dr)==="onClick"&&this.startSelectionWithCheckboxes(),this._selection.selectAll(this._isOnePageSelectAll())},deselectAll:function(){return this._selection.deselectAll(this._isOnePageSelectAll())},clearSelection:function(){return this.selectedItemKeys([])},refresh:function(){var i=this.option("selectedRowKeys")||[];return!this.option("selection.deferred")&&i.length?this.selectedItemKeys(i):new se().resolve().promise()},selectedItemKeys:function(i,n,r,a){return this._selection.selectedItemKeys(i,n,r,a)},getSelectedRowKeys:function(){return this._selection.getSelectedItemKeys()},selectRows:function(i,n){return this.selectedItemKeys(i,n)},deselectRows:function(i){return this.selectedItemKeys(i,!0,!0)},selectRowsByIndexes:function(i){var n=this._dataController.items(),r=[];return Array.isArray(i)||(i=Array.prototype.slice.call(arguments,0)),V(i,function(){var a=n[this];a&&a.rowType==="data"&&r.push(a.key)}),this.selectRows(r)},getSelectedRowsData:function(){return this._selection.getSelectedItems()},changeItemSelection:function(i,n,r){n=n||{},this.isSelectionWithCheckboxes()&&(n.control=!0);var a=i+this._dataController.getRowIndexOffset()-this._dataController.getRowIndexOffset(!0);return this._selection.changeItemSelection(a,n,r)},focusedItemIndex:function(i){if(E(i))this._selection._focusedItemIndex=i;else return this._selection._focusedItemIndex},isSelectionWithCheckboxes:function(){return this.option(Pc)==="multiple"&&(this.option(dr)==="always"||this._isSelectionWithCheckboxes)},startSelectionWithCheckboxes:function(){return this.option(Pc)==="multiple"&&!this.isSelectionWithCheckboxes()?(this._isSelectionWithCheckboxes=!0,this._updateSelectColumn(),!0):!1},stopSelectionWithCheckboxes:function(){return this._isSelectionWithCheckboxes?(this._isSelectionWithCheckboxes=!1,this._updateSelectColumn(),!0):!1}}}()),yj={defaultOptions:function(){return{selection:{mode:"none",showCheckBoxesMode:"onClick",allowSelectAll:!0,selectAllMode:"allPages",maxFilterLengthInRequest:1500,deferred:!1},selectionFilter:[],selectedRowKeys:[]}},controllers:{selection:Cj},extenders:{controllers:{data:{init:function(){var e=this.getController("selection"),t=this.option("selection.deferred");this.callBase.apply(this,arguments),t&&e._updateCheckboxesState({isDeferredMode:!0,selectionFilter:this.option("selectionFilter")})},_loadDataSource:function(){var e=this;return e.callBase().done(function(){e.getController("selection").refresh()})},_processDataItem:function(e,t){var i=this,n=i.getController("selection"),r=n.isSelectColumnVisible(),a=t.isDeferredSelection=t.isDeferredSelection===void 0?this.option("selection.deferred"):t.isDeferredSelection,o=this.callBase.apply(this,arguments);if(o.isSelected=n.isRowSelected(a?o.data:o.key),r&&o.values){for(var s=0;s<t.visibleColumns.length;s++)if(t.visibleColumns[s].command==="select"){o.values[s]=o.isSelected;break}}return o},refresh:function(e){var t=this,i=new se;return this.callBase.apply(this,arguments).done(function(){!e||e.selection?t.getController("selection").refresh().done(i.resolve).fail(i.reject):i.resolve()}).fail(i.reject),i.promise()},_handleDataChanged:function(e){this.callBase.apply(this,arguments),(!e||e.changeType==="refresh")&&!this._repaintChangesOnly&&this.getController("selection").focusedItemIndex(-1)},_applyChange:function(e){if(e&&e.changeType==="updateSelection"){e.items.forEach((t,i)=>{var n=this._items[i];n&&(n.isSelected=t.isSelected,n.values=t.values)});return}return this.callBase.apply(this,arguments)},_endUpdateCore:function(){var e=this._changes,t=e.length>1&&e.every(n=>n.changeType==="updateSelection");if(t){var i=e.map(n=>n.itemIndexes||[]).reduce((n,r)=>n.concat(r));this._changes=[{changeType:"updateSelection",itemIndexes:i}]}this.callBase.apply(this,arguments)}},contextMenu:{_contextMenuPrepared:function(e){var t=e.event;t.originalEvent&&t.originalEvent.type!=="dxhold"||e.items&&e.items.length>0||Nb(this,t)}}},views:{columnHeadersView:{init:function(){this.callBase(),this.getController("selection").selectionChanged.add(this._updateSelectAllValue.bind(this))},_updateSelectAllValue:function(){var e=this.element(),t=e&&e.find("."+Ga);if(e&&t.length&&this.option("selection.mode")==="multiple"){var i=this.getController("selection").isSelectAll(),n=i!==!1,r=this.option("selection.allowSelectAll")?!this.getController("data").isEmpty():n;t.dxCheckBox("instance").option({visible:r,value:i})}},_handleDataChanged:function(e){this.callBase(e),(!e||e.changeType==="refresh")&&this._updateSelectAllValue()},_renderSelectAllCheckBox:function(e,t){var i=this,n=i.getController("selection"),r=i.getController("data").isEmpty(),a=v("<div>").appendTo(e).addClass(Ga);return i.setAria("label",fe.format("dxDataGrid-ariaSelectAll"),e),i.getController("editorFactory").createEditor(a,k({},t,{parentType:"headerRow",dataType:"boolean",value:n.isSelectAll(),editorOptions:{visible:!r&&(i.option("selection.allowSelectAll")||n.isSelectAll()!==!1)},tabIndex:i.option("useLegacyKeyboardNavigation")?-1:i.option("tabIndex")||0,setValue:function(o,s){var l=i.option("selection.allowSelectAll");s.component.option("visible",l||s.component.option("value")!==!1),!(!s.event||n.isSelectAll()===o)&&(s.value&&!l?s.component.option("value",!1):s.value?n.selectAll():n.deselectAll(),s.event.preventDefault())}})),a},_attachSelectAllCheckBoxClickEvent:function(e){R.on(e,vt,this.createAction(function(t){var i=t.event;v(i.target).closest("."+Ga).length||R.trigger(v(i.currentTarget).children("."+Ga),vt),i.preventDefault()}))}},rowsView:{renderSelectCheckBoxContainer:function(e,t){t.rowType==="data"&&!t.row.isNewRow?(e.addClass(ZO),this._attachCheckBoxClickEvent(e),this.setAria("label",fe.format("dxDataGrid-ariaSelectRow"),e),this._renderSelectCheckBox(e,t)):be.setEmptyText(e)},_renderSelectCheckBox:function(e,t){var i=v("<div>").addClass(Ga).appendTo(e);return this.getController("editorFactory").createEditor(i,k({},t.column,{parentType:"dataRow",dataType:"boolean",lookup:null,value:t.value,setValue:function(n,r){var a;(r==null||(a=r.event)===null||a===void 0?void 0:a.type)==="keydown"&&R.trigger(r.element,vt,r)},row:t.row})),i},_attachCheckBoxClickEvent:function(e){R.on(e,vt,this.createAction(function(t){var i=this.getController("selection"),n=t.event,r=this.getRowIndex(v(n.currentTarget).closest("."+_j));r>=0&&(i.startSelectionWithCheckboxes(),i.changeItemSelection(r,{shift:n.shiftKey}),v(n.target).closest("."+Ga).length&&this.getController("data").updateItems({changeType:"updateSelection",itemIndexes:[r]}))}))},_update:function(e){var t=this,i=t.getTableElements();e.changeType==="updateSelection"?i.length>0&&(V(i,function(n,r){V(e.itemIndexes||[],function(a,o){var s;if(e.items[o]&&(s=t._getRowElements(v(r)).eq(o),s.length)){var l=e.items[o].isSelected;s.toggleClass(Vb,l===void 0?!1:l).find("."+Ga).dxCheckBox("option","value",l),t.setAria("selected",l,s)}})}),t._updateCheckboxesClass()):t.callBase(e)},_createTable:function(){var e=this,t=e.option("selection.mode"),i=e.callBase.apply(e,arguments);return t!=="none"&&((e.option(dr)==="onLongTap"||!go)&&R.on(i,ye(Ea.name,"dxDataGridRowsView"),"."+QO,e.createAction(function(n){Nb(e.component,n.event),n.event.stopPropagation()})),R.on(i,"mousedown selectstart",e.createAction(function(n){var r=n.event;r.shiftKey&&r.preventDefault()}))),i},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=e.isSelected;i&&t.addClass(Vb),this.setAria("selected",i,t)}return t},_rowClick:function(e){var t=e.event,i=v(t.target).closest("."+gj).length;this.isClickableElement(v(t.target))||(!i&&(this.option(Pc)!=="multiple"||this.option(dr)!=="always")&&this.getController("selection").changeItemSelection(e.rowIndex,{control:vi(t),shift:t.shiftKey})&&(t.preventDefault(),e.handled=!0),this.callBase(e))},isClickableElement:function(e){var t=e.closest("."+JO).length;return!!t},_renderCore:function(e){this.callBase(e),this._updateCheckboxesClass()},_updateCheckboxesClass:function(){var e=this.getTableElements(),t=this.getController("selection"),i=t.isSelectColumnVisible()&&!t.isSelectionWithCheckboxes();V(e,function(n,r){v(r).toggleClass(mj,i)})}}}}};Oe.registerModule("selection",yj);var $b="dx-invalid-message-auto",Hb="dx-validation-target";let SC=class extends sd{getProps(){var t=super.getProps();return t.onFocusIn=()=>{var i=this.option("validationMessageMode")==="auto";if(i){var n=v(".dx-invalid-message.dx-overlay-wrapper");n==null||n.removeClass($b),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>{n==null||n.addClass($b)},150)}},t.saveValueChangeEvent=i=>{this._valueChangeEventInstance=i},t}_createElement(t){super._createElement(t),this.showValidationMessageTimeout=void 0,this.validationRequest=dt(),Vt(this.$element()[0],Hb,this)}_render(){var t;(t=this.option("_onMarkupRendered"))===null||t===void 0||t()}_initializeComponent(){super._initializeComponent(),this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})}_initOptions(t){super._initOptions(t),this.option(Ct.initValidationOptions(t))}_getDefaultOptions(){return k(super._getDefaultOptions(),{validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})}_bindInnerWidgetOptions(t,i){var n=k({},t.option()),r=()=>this._silent(i,n);r(),t.on("optionChanged",r)}_raiseValidation(t,i){var n=!E(t)&&!E(i);t!==i&&!n&&this.validationRequest.fire({value:t,editor:this})}_raiseValueChangeAction(t,i){var n;(n=this._valueChangeAction)===null||n===void 0||n.call(this,{element:this.$element(),previousValue:i,value:t,event:this._valueChangeEventInstance}),this._valueChangeEventInstance=void 0}_optionChanged(t){var{name:i,previousValue:n,value:r}=t;switch(i&&this._getActionConfigs()[i]!==void 0&&this._addAction(i),i){case"value":this._raiseValidation(r,n),this._raiseValueChangeAction(r,n);break;case"onValueChanged":this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]});break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(Ct.synchronizeValidationOptions(t,this.option()))}super._optionChanged(t)}reset(){var{value:t}=this._getDefaultOptions();this.option({value:t})}_dispose(){super._dispose(),Vt(this.element(),Hb,null),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout)}};var xj=Yn.isEditor,eR=e=>xj(e)||e instanceof SC;SC.isEditor=eR;Yn.isEditor=eR;let bj=class extends SC{_useTemplates(){return!1}_isFocused(){var t=this.$element()[0];return t.classList.contains("dx-state-focused")}getSupportedKeyNames(){return["space"]}getProps(){var t=super.getProps();return t.value!==null&&(t.value=!!t.value),t}};var Sj=["dataSource","selectedRowKeys"],Ej={integrationOptions:!0};function bl(e,t,i){return{path:e,value:t,previousValue:i}}function Wb(e,t,i,n,r,a){if(!Ej[n]){var o=Ln(t),s=Ln(i);if(t!==i)if(o!==s)e.push(bl(n,i,t));else if(o==="object")if(!Ye(i))e.push(bl(n,i,t));else{var l=zb(t,i,r,a);e.push(...l.map(c=>Se({},c,{path:"".concat(n,".").concat(c.path)})))}else if(o==="array"){var u=a.some(c=>r.includes(c));if(u&&t!==i)e.push(bl(n,i,t));else if(t.length!==i.length)e.push(bl(n,i,t));else{var d=zb(t,i,r,a);[].push.apply(e,d.map(c=>Se({},c,{path:"".concat(n).concat(c.path)})))}}else e.push(bl(n,i,t))}}var tR=e=>(t,i,n,r)=>{var a=[],o=Array.isArray(t)?s=>{Wb(a,t[s],i[s],"[".concat(s,"]"),"".concat(n,".").concat(s),r)}:s=>{Wb(a,t[s],i[s],s,"".concat(n,".").concat(s),r)};return e(t).forEach(o),Object.keys(i).filter(s=>!Object.prototype.hasOwnProperty.call(t,s)&&t[s]!==i[s]).forEach(s=>{a.push({path:s,value:i[s],previousValue:t[s]})}),a},zb=tR(e=>Object.keys(e)),wj={key:!0,ref:!0,children:!0,style:!0},Ij=tR(e=>Object.keys(e).filter(t=>!wj[t]));function Tj(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sj;return Ij(e,t,"",i)}var Aj=["valueChange"],Dj=["componentProps","componentType","rootElementRef","templateNames"],iR=e=>Object.keys(e).reduce((t,i)=>(e[i]!==void 0&&(t[i]=e[i]),t),{}),Oj=e=>{var{props:{componentProps:{className:t}},restAttributes:i,widgetRef:n}=e;return iR(Yt(1,"div",t,null,1,Se({},i),null,n))},Rj={};class cf extends gr{constructor(t){super(t),this.state={},this.widgetRef=Ei(),this.getInstance=this.getInstance.bind(this),this.setupWidget=this.setupWidget.bind(this),this.setRootElementRef=this.setRootElementRef.bind(this),this.updateWidget=this.updateWidget.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:af}createEffects(){return[new kt(this.setupWidget,[]),new kt(this.setRootElementRef,[]),new kt(this.updateWidget,[this.props.componentProps,this.config,this.props.templateNames])]}updateEffects(){var t;(t=this._effects[2])===null||t===void 0||t.update([this.props.componentProps,this.config,this.props.templateNames])}setupWidget(){var t=new this.props.componentType(this.widgetRef.current,this.properties);return this.instance=t,()=>{t.dispose(),this.instance=null}}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.widgetRef.current)}updateWidget(){var t=this.getInstance();if(t){var i=Tj(this.prevProps||{},this.properties);i.length&&(t.beginUpdate(),i.forEach(n=>{var{path:r,value:a}=n;t.option(r,a)}),t.endUpdate()),this.prevProps=this.properties}}get properties(){var t,i=iR(this.props.componentProps),{valueChange:n}=i,r=Pt(i,Aj),a=Se({rtlEnabled:!!((t=this.config)!==null&&t!==void 0&&t.rtlEnabled),isRenovated:!0},r);n&&(a.onValueChanged=s=>{var{value:l}=s;return n(l)});var o=this.props.templateNames;return o.forEach(s=>{HG(s,a)&&(a[s]=(l,u,d)=>{$G(this.props.componentProps[s],{item:l,index:u,container:d})})}),a}get restAttributes(){var t=this.props,i=Pt(t,Dj);return i}getInstance(){return this.instance}render(){var t=this.props;return Oj({props:Se({},t),widgetRef:this.widgetRef,config:this.config,properties:this.properties,restAttributes:this.restAttributes})}}cf.defaultProps=Rj;var kj=["accessKey","activeStateEnabled","boundary","className","contentId","disabled","focusStateEnabled","height","hint","hoverStateEnabled","mode","offset","onClick","onKeyDown","positionRequest","rtlEnabled","tabIndex","target","validationErrors","visible","visualContainer","width"],Bj=e=>{var{componentProps:t,restAttributes:i}=e;return ln(Tt(2,cf,Se({componentType:Qg,componentProps:t,templateNames:[]},i)))},Lj=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(rf),Object.getOwnPropertyDescriptors({mode:"auto",offset:Object.freeze({h:0,v:0}),isReactComponentWrapper:!0})));class nR extends Vn{constructor(t){super(t),this.state={}}get componentProps(){return this.props}get restAttributes(){var t=this.props,i=Pt(t,kj);return i}render(){var t=this.props;return Bj({props:Se({},t),componentProps:this.componentProps,restAttributes:this.restAttributes})}}nR.defaultProps=Lj;var Pj=["accessKey","activeStateEnabled","aria","children","className","classes","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],Fj=e=>{var{classes:t,isValid:i,readOnly:n}=e,r={"dx-state-readonly":!!n,"dx-invalid":!i,["".concat(t)]:!!t};return Rn(r)},Mj=e=>{var{aria:t,cssClasses:i,isValidationMessageVisible:n,onFocusIn:r,props:{accessKey:a,activeStateEnabled:o,children:s,className:l,disabled:u,focusStateEnabled:d,height:c,hint:h,hoverStateEnabled:f,onClick:p,onKeyDown:m,rtlEnabled:g,tabIndex:C,validationMessageMode:b,visible:A,width:B},restAttributes:D,rootElementRef:U,validationErrors:H,validationMessageGuid:W,validationMessageTarget:G,widgetRef:j}=e;return ln(Tt(2,of,Se({rootElementRef:U,aria:t,classes:i,activeStateEnabled:o,focusStateEnabled:d,hoverStateEnabled:f,accessKey:a,className:l,rtlEnabled:g,hint:h,disabled:u,height:c,width:B,onFocusIn:r,onClick:p,onKeyDown:m,tabIndex:C,visible:A},D,{children:Qr([s,n&&Tt(2,nR,{validationErrors:H,mode:b,positionRequest:"below",rtlEnabled:g,target:G,boundary:G,visualContainer:G,contentId:W})],0)}),null,j))},gi=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(rf),Object.getOwnPropertyDescriptors({readOnly:!1,name:"",validationError:null,validationErrors:null,validationMessageMode:"auto",validationStatus:"valid",isValid:!0,defaultValue:null,valueChange:()=>{}}))),Vj={get readOnly(){return gi.readOnly},get name(){return gi.name},get validationError(){return gi.validationError},get validationErrors(){return gi.validationErrors},get validationMessageMode(){return gi.validationMessageMode},get validationStatus(){return gi.validationStatus},get isValid(){return gi.isValid},get defaultValue(){return gi.defaultValue},get valueChange(){return gi.valueChange},get className(){return gi.className},get activeStateEnabled(){return gi.activeStateEnabled},get disabled(){return gi.disabled},get focusStateEnabled(){return gi.focusStateEnabled},get hoverStateEnabled(){return gi.hoverStateEnabled},get tabIndex(){return gi.tabIndex},get visible(){return gi.visible},get aria(){return vh.aria},get classes(){return vh.classes}};class rR extends ad{constructor(t){super(t),this.widgetRef=Ei(),this.rootElementRef=Ei(),this.__getterCache={},this.state={validationMessageGuid:"dx-".concat(new si),isValidationMessageVisible:!1,value:this.props.value!==void 0?this.props.value:this.props.defaultValue},this.updateValidationMessageVisibility=this.updateValidationMessageVisibility.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onFocusIn=this.onFocusIn.bind(this)}createEffects(){return[new kt(this.updateValidationMessageVisibility,[this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors]),od()]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors])}updateValidationMessageVisibility(){this.setState(t=>({isValidationMessageVisible:this.shouldShowValidationMessage}))}onFocusIn(t){var{onFocusIn:i}=this.props;i==null||i(t)}get cssClasses(){return"".concat(Fj(Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})))}get shouldShowValidationMessage(){var t,{isValid:i,validationStatus:n}=this.props,r=(t=this.validationErrors)!==null&&t!==void 0?t:[],a=i&&n!=="invalid";return!a&&r.length>0}get aria(){var{isValid:t,readOnly:i}=this.props,n={readonly:i?"true":"false",invalid:t?"false":"true"};return this.shouldShowValidationMessage&&(n.describedBy=this.state.validationMessageGuid),Se({},n,this.props.aria)}get validationErrors(){return this.__getterCache.validationErrors!==void 0?this.__getterCache.validationErrors:this.__getterCache.validationErrors=(()=>{var{validationError:t,validationErrors:i}=this.props,n=i&&[...i];return!n&&t&&(n=[Se({},t)]),n})()}get validationMessageTarget(){var t;return(t=this.rootElementRef)===null||t===void 0?void 0:t.current}get restAttributes(){var t=Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Pt(t,Pj);return i}focus(){this.widgetRef.current.focus()}blur(){this.widgetRef.current.blur()}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props.validationError!==t.validationError||this.props.validationErrors!==t.validationErrors)&&(this.__getterCache.validationErrors=void 0)}render(){var t=this.props;return Mj({props:Se({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),validationMessageGuid:this.state.validationMessageGuid,isValidationMessageVisible:this.state.isValidationMessageVisible,rootElementRef:this.rootElementRef,widgetRef:this.widgetRef,onFocusIn:this.onFocusIn,cssClasses:this.cssClasses,shouldShowValidationMessage:this.shouldShowValidationMessage,aria:this.aria,validationErrors:this.validationErrors,validationMessageTarget:this.validationMessageTarget,restAttributes:this.restAttributes})}}rR.defaultProps=Vj;function aR(e){var t,i=je();return e?(t=i.getComputedStyle)===null||t===void 0?void 0:t.call(i,e):null}var Nj=[[22,16],[18,16]],$j=[[[12,8],[20,18]],[[16,10],[16,14]]];function oR(){var e=Xn();return{isMaterialTheme:ei(e),isCompactTheme:y$(e)}}function Hj(){var{isCompactTheme:e,isMaterialTheme:t}=oR();return Nj[+t][+e]}function Wj(e){var{isCompactTheme:t,isMaterialTheme:i}=oR();return $j[+e][+i][+t]}function zj(e,t){var i=Wj(t),n=Hj(),r=i/n;return Math.ceil(r*e)}var Gj=["isChecked","size"],Uj=e=>{var{cssStyles:t,elementRef:i}=e;return Yt(1,"span","dx-checkbox-icon",null,1,{style:lC(t)},null,i)},Kj={isChecked:!1};class sR extends gr{constructor(t){super(t),this.state={},this.elementRef=Ei(),this.__getterCache={},this.updateFontSize=this.updateFontSize.bind(this),this.setIconFontSize=this.setIconFontSize.bind(this),this.getIconSize=this.getIconSize.bind(this),this.getComputedIconSize=this.getComputedIconSize.bind(this)}createEffects(){return[new kt(this.updateFontSize,[this.props.isChecked,this.props.size])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.isChecked,this.props.size])}updateFontSize(){var{isChecked:t,size:i}=this.props;if(Ue()&&i){var n=this.getIconSize(i),r=zj(n,t);this.setIconFontSize(r)}}setIconFontSize(t){var i=this.elementRef.current;i.style.fontSize="".concat(t,"px")}getIconSize(t){return Et(t)?t:t.endsWith("px")?parseInt(t,10):this.getComputedIconSize()}getComputedIconSize(){var t=this.elementRef.current,i=aR(t),n=parseInt(i==null?void 0:i.width,10);return n}get cssStyles(){return this.__getterCache.cssStyles!==void 0?this.__getterCache.cssStyles:this.__getterCache.cssStyles=(()=>{var{size:t}=this.props,i=Ms("width",t),n=Ms("height",t);return{height:n,width:i}})()}get restAttributes(){var t=this.props,i=Pt(t,Gj);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.size!==t.size&&(this.__getterCache.cssStyles=void 0)}render(){var t=this.props;return Uj({props:Se({},t),elementRef:this.elementRef,setIconFontSize:this.setIconFontSize,getIconSize:this.getIconSize,getComputedIconSize:this.getComputedIconSize,cssStyles:this.cssStyles,restAttributes:this.restAttributes})}}sR.defaultProps=Kj;var jj=["accessKey","activeStateEnabled","aria","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","iconSize","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","saveValueChangeEvent","tabIndex","text","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],qj=e=>{var{text:t,value:i}=e,n=i,r=n===null,a={"dx-checkbox":!0,"dx-checkbox-checked":n===!0,"dx-checkbox-has-text":!!t,"dx-checkbox-indeterminate":r};return Rn(a)},Yj=e=>{var{aria:t,cssClasses:i,editorRef:n,keyDown:r,onWidgetClick:a,props:{accessKey:o,activeStateEnabled:s,className:l,disabled:u,focusStateEnabled:d,height:c,hint:h,hoverStateEnabled:f,iconSize:p,isValid:m,name:g,onFocusIn:C,readOnly:b,rtlEnabled:A,tabIndex:B,text:D,validationError:U,validationErrors:H,validationMessageMode:W,validationStatus:G,value:j,visible:te,width:N},restAttributes:Y}=e;return ln(Tt(2,rR,Se({aria:t,classes:i,onClick:a,onKeyDown:r,accessKey:o,activeStateEnabled:s,focusStateEnabled:d,hoverStateEnabled:f,className:l,disabled:u,readOnly:b,hint:h,height:c,width:N,rtlEnabled:A,tabIndex:B,visible:te,validationError:U,validationErrors:H,validationMessageMode:W,validationStatus:G,isValid:m,onFocusIn:C},Y,{children:Qr([ln(Yt(64,"input",null,null,1,Se({type:"hidden",value:"".concat(j)},g&&{name:g}))),Yt(1,"div","dx-checkbox-container",[Tt(2,sR,{size:p,isChecked:j===!0}),D&&Yt(1,"span","dx-checkbox-text",D,0)],0)],4)}),null,n))},Fi=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(gi),Object.getOwnPropertyDescriptors({text:"",activeStateEnabled:!0,hoverStateEnabled:!0,get focusStateEnabled(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},defaultValue:!1,valueChange:()=>{}}))),Xj={get text(){return Fi.text},get activeStateEnabled(){return Fi.activeStateEnabled},get hoverStateEnabled(){return Fi.hoverStateEnabled},get focusStateEnabled(){return Fi.focusStateEnabled},get defaultValue(){return Fi.defaultValue},get valueChange(){return Fi.valueChange},get readOnly(){return Fi.readOnly},get name(){return Fi.name},get validationError(){return Fi.validationError},get validationErrors(){return Fi.validationErrors},get validationMessageMode(){return Fi.validationMessageMode},get validationStatus(){return Fi.validationStatus},get isValid(){return Fi.isValid},get className(){return Fi.className},get disabled(){return Fi.disabled},get tabIndex(){return Fi.tabIndex},get visible(){return Fi.visible},get aria(){return vh.aria}};let Ch=class extends ad{constructor(t){super(t),this.editorRef=Ei(),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue},this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[od()]}onWidgetClick(t){var i,{readOnly:n,saveValueChangeEvent:r}=this.props,a=(i=this.props.value!==void 0?this.props.value:this.state.value)!==null&&i!==void 0?i:!1;if(!n){r==null||r(t);var o;this.setState(s=>(o=!a,{value:o})),this.props.valueChange(o)}}keyDown(t){var{onKeyDown:i}=this.props,{keyName:n,originalEvent:r,which:a}=t,o=i==null?void 0:i(t);if(o!=null&&o.cancel)return o;(n==="space"||a==="space")&&(r.preventDefault(),this.onWidgetClick(r))}get cssClasses(){return qj(Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}))}get aria(){var t=(this.props.value!==void 0?this.props.value:this.state.value)===!0,i=(this.props.value!==void 0?this.props.value:this.state.value)===null,n={role:"checkbox",checked:i?"mixed":"".concat(t)};return Se({},n,this.props.aria)}get restAttributes(){var t=Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Pt(t,jj);return i}focus(){this.editorRef.current.focus()}blur(){this.editorRef.current.blur()}render(){var t=this.props;return Yj({props:Se({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),editorRef:this.editorRef,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,cssClasses:this.cssClasses,aria:this.aria,restAttributes:this.restAttributes})}};function Zj(e){var t=["value"];return Object.keys(e).reduce((i,n)=>{var r=e[n],a=t.some(o=>o===n)?"default"+n.charAt(0).toUpperCase()+n.slice(1):n;return i[a]=r,i},{})}Ch.defaultProps=Xj;var Gb=[];function Jj(e){Gb.push(e),Ch.defaultProps=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(Ch.defaultProps),Object.getOwnPropertyDescriptors(Zj(Vs(Gb)))))}class wo extends bj{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}focus(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.focus(...arguments)}blur(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.blur(...arguments)}_getActionConfigs(){return{onFocusIn:{},onClick:{}}}get _propsInfo(){return{twoWay:[["value","defaultValue","valueChange"]],allowNull:["defaultValue","validationError","validationErrors","value"],elements:[],templates:[],props:["text","iconSize","activeStateEnabled","hoverStateEnabled","focusStateEnabled","saveValueChangeEvent","defaultValue","valueChange","readOnly","name","validationError","validationErrors","validationMessageMode","validationStatus","isValid","onFocusIn","className","accessKey","disabled","height","hint","onClick","onKeyDown","rtlEnabled","tabIndex","visible","width","aria","value"]}}get _viewComponent(){return Ch}}tt("dxCheckBox",wo);wo.defaultOptions=Jj;var La="dx-treeview",Ki="".concat(La,"-node"),Ar="".concat(Ki,"-container"),jp="".concat(Ki,"-loadindicator"),Ua="".concat(Ki,"-container-opened"),Sl="".concat(Ki,"-is-leaf"),Oi="".concat(La,"-item"),Qj="".concat(Oi,"-with-checkbox"),e7="".concat(Oi,"-without-checkbox"),t7="".concat(Oi,"-data"),os="".concat(La,"-toggle-item-visibility"),i7="".concat(La,"-loadindicator"),n7="".concat(La,"-loadindicator-wrapper"),qp="".concat(La,"-toggle-item-visibility-opened"),Yp="".concat(La,"-select-all-item"),Ub="dx-state-invisible",El="dx-state-disabled",r7="dx-state-selected",Xp="dxTreeView_expand",jd="data-item-id",a7=TO.inherit({_supportedKeys:function(e){var t=r=>{var a=v(this.option("focusedElement"));if(a.length){r.target=a,r.currentTarget=a,this._itemClickHandler(r,a.children("."+Oi));var o=this._getEventNameByOption(this.option("expandEvent")),s=o===ye(vt,Xp);s&&this._expandEventHandler(r)}},i=r=>{r.preventDefault();var a=v(this.option("focusedElement")),o=this._getCheckBoxInstance(a);if(!o.option("disabled")){var s=o.option("value");this._updateItemSelection(!s,a.find("."+Oi).get(0),!0)}},n=function(r,a){if(this.option("expandAllEnabled")){a.preventDefault();var o=v(this.option("focusedElement"));if(o.length){var s=this._getItemData(o.find(".".concat(Oi)));this._toggleExpandedNestedItems([s],r)}}};return k(this.callBase(),{enter:this._showCheckboxes()?i:t,space:this._showCheckboxes()?i:t,asterisk:n.bind(this,!0),minus:n.bind(this,!1)})},_toggleExpandedNestedItems:function(e,t){if(e)for(var i=0,n=e.length;i<n;i++){var r=e[i],a=this._dataAdapter.getNodeByItem(r);this._toggleExpandedState(a,t),this._toggleExpandedNestedItems(r.items,t)}},_getNodeElement:function(e,t){var i=this._encodeString(e.internalFields.key);if(t)return t.$nodeByKey||(t.$nodeByKey={},this.$element().find(".".concat(Ki)).each(function(){var r=v(this),a=r.attr(jd);t.$nodeByKey[a]=r})),t.$nodeByKey[i]||v();var n=this.$element().get(0).querySelector("[".concat(jd,'="').concat(i,'"]'));return v(n)},_activeStateUnit:"."+Oi,_widgetClass:function(){return La},_getDefaultOptions:function(){var e=k(this.callBase(),{animationEnabled:!0,dataStructure:"tree",deferRendering:!0,expandAllEnabled:!1,hasItemsExpr:"hasItems",selectNodesRecursive:!0,expandNodesRecursive:!0,showCheckBoxesMode:"none",selectAllText:fe.format("dxList-selectAll"),onItemSelectionChanged:null,onItemExpanded:null,onItemCollapsed:null,scrollDirection:"vertical",useNativeScrolling:!0,virtualModeEnabled:!1,rootValue:0,focusStateEnabled:!1,selectionMode:"multiple",expandEvent:"dblclick",selectByClick:!1,createChildren:null,onSelectAllValueChanged:null});return k(!0,e,{integrationOptions:{useDeferUpdateForTemplates:!1}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return!Co},options:{useNativeScrolling:!1}}])},_initSelectedItems:re,_syncSelectionOptions:Xm,_fireSelectionChanged:function(){var e=this._selectionChangePromise;De(e).done((function(){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})()}).bind(this))},_createSelectAllValueChangedAction:function(){this._selectAllValueChangedAction=this._createActionByOption("onSelectAllValueChanged",{excludeValidators:["disabled","readOnly"]})},_fireSelectAllValueChanged:function(e){this._selectAllValueChangedAction({value:e})},_checkBoxModeChange:function(e,t){if(t==="none"||e==="none"){this.repaint();return}var i=this._$selectAllItem&&this._$selectAllItem.length;switch(e){case"selectAll":i||(this._createSelectAllValueChangedAction(),this._renderSelectAllItem());break;case"normal":i&&(this._$selectAllItem.remove(),delete this._$selectAllItem)}},_removeSelection:function(){var e=this;V(this._dataAdapter.getFullData(),function(t,i){e._hasChildren(i)&&e._dataAdapter.toggleSelection(i.internalFields.key,!1,!0)})},_optionChanged:function(e){var{name:t,value:i,previousValue:n}=e;switch(t){case"selectAllText":this._$selectAllItem&&this._$selectAllItem.dxCheckBox("instance").option("text",i);break;case"showCheckBoxesMode":this._checkBoxModeChange(i,n);break;case"scrollDirection":this.getScrollable().option("direction",i);break;case"useNativeScrolling":this.getScrollable().option("useNative",i);break;case"items":delete this._$selectAllItem,this.callBase(e);break;case"dataSource":this.callBase(e),this._initDataAdapter(),this._filter={};break;case"hasItemsExpr":this._initAccessors(),this.repaint();break;case"expandEvent":this._initExpandEvent();break;case"deferRendering":case"dataStructure":case"rootValue":case"createChildren":case"expandNodesRecursive":case"onItemSelectionChanged":case"onItemExpanded":case"onItemCollapsed":case"expandAllEnabled":case"animationEnabled":case"virtualModeEnabled":case"selectByClick":break;case"selectionMode":this._initDataAdapter(),this.callBase(e);break;case"onSelectAllValueChanged":this._createSelectAllValueChangedAction();break;case"selectNodesRecursive":this._dataAdapter.setOption("recursiveSelection",e.value),this.repaint();break;default:this.callBase(e)}},_initDataSource:function(){this._useCustomChildrenLoader()?this._loadChildrenByCustomLoader(null).done((function(e){e&&e.length&&this.option("items",e)}).bind(this)):(this.callBase(),this._isVirtualMode()&&this._initVirtualMode())},_initVirtualMode:function(){var e=this._filter;e.custom||(e.custom=this._dataSource.filter()),e.internal||(e.internal=[this.option("parentIdExpr"),this.option("rootValue")])},_useCustomChildrenLoader:function(){return Ie(this.option("createChildren"))&&this._isDataStructurePlain()},_loadChildrenByCustomLoader:function(e){var t=this.option("createChildren").call(this,e);return Array.isArray(t)?new se().resolve(t).promise():t&&Ie(t.then)?yi(t):new se().resolve([]).promise()},_combineFilter:function(){return!this._filter.custom||!this._filter.custom.length?this._filter.internal:[this._filter.custom,this._filter.internal]},_dataSourceLoadErrorHandler:function(){this._renderEmptyMessage()},_init:function(){this._filter={},this.callBase(),this._initStoreChangeHandlers()},_dataSourceChangedHandler:function(e){var t=this.option("items");this._initialized&&this._isVirtualMode()&&t.length||this.option("items",e)},_removeTreeViewLoadIndicator:function(){this._treeViewLoadIndicator&&(this._treeViewLoadIndicator.remove(),this._treeViewLoadIndicator=null)},_createTreeViewLoadIndicator:function(){return this._treeViewLoadIndicator=v("<div>").addClass(i7),this._createComponent(this._treeViewLoadIndicator,vn,{}),this._treeViewLoadIndicator},_dataSourceLoadingChangedHandler:function(e){var t;if(this._isVirtualMode()&&(t=this._combineFilter(),this._dataSource.filter(t)),e&&!this._dataSource.isLoaded()){this.option("items",[]);var i=v("<div>").addClass(n7);this._createTreeViewLoadIndicator().appendTo(i),this.itemsContainer().append(i),this._isVirtualMode()&&this._dataSource.filter()!==t&&this._dataSource.filter([])}else this._removeTreeViewLoadIndicator()},_initStoreChangeHandlers:function(){this.option("dataStructure")==="plain"&&this._dataSource&&this._dataSource.store().on("inserted",e=>{this.option().items=this.option("items").concat(e),this._dataAdapter.addItem(e),this._dataAdapter.isFiltered(e)&&this._updateLevel(this._parentIdGetter(e))}).on("removed",e=>{var t=this._dataAdapter.getNodeByKey(e);E(t)&&(this.option("items")[this._dataAdapter.getIndexByKey(t.internalFields.key)]=0,this._markChildrenItemsToRemove(t),this._removeItems(),this._dataAdapter.removeItem(e),this._updateLevel(this._parentIdGetter(t)))})},_markChildrenItemsToRemove:function(e){var t=e.internalFields.childrenKeys;V(t,(i,n)=>{this.option("items")[this._dataAdapter.getIndexByKey(n)]=0,this._markChildrenItemsToRemove(this._dataAdapter.getNodeByKey(n))})},_removeItems:function(){var e=k(!0,[],this.option("items")),t=0;V(e,(i,n)=>{n||(this.option("items").splice(i-t,1),t++)})},_updateLevel:function(e){var t=this._getContainerByParentKey(e);this._renderItems(t,this._dataAdapter.getChildrenNodes(e))},_getOldContainer:function(e){if(e.length)return e.children(".".concat(Ar));var t=this.getScrollable();return t?v(t.content()).children():v()},_getContainerByParentKey:function(e){var t=this._dataAdapter.getNodeByKey(e),i=t?this._getNodeElement(t):[];this._getOldContainer(i).remove();var n=this._renderNodeContainer(i);if(this._isRootLevel(e)){var r=this.getScrollable();r||this._renderScrollableContainer(),v(r.content()).append(n)}return n},_isRootLevel:function(e){return e===this.option("rootValue")},_getAccessors:function(){var e=this.callBase();return e.push("hasItems"),e},_getDataAdapterOptions:function(){return{rootValue:this.option("rootValue"),multipleSelection:!this._isSingleSelection(),recursiveSelection:this._isRecursiveSelection(),recursiveExpansion:this.option("expandNodesRecursive"),selectionRequired:this.option("selectionRequired"),dataType:this.option("dataStructure"),sort:this._dataSource&&this._dataSource.sort()}},_initMarkup:function(){this._renderScrollableContainer(),this._renderEmptyMessage(this._dataAdapter.getRootNodes()),this.callBase(),this.setAria("role","tree")},_renderContentImpl:function(){var e=this._renderNodeContainer();v(this.getScrollable().content()).append(e),!(!this.option("items")||!this.option("items").length)&&(this._renderItems(e,this._dataAdapter.getRootNodes()),this._initExpandEvent(),this._selectAllEnabled()&&(this._createSelectAllValueChangedAction(),this._renderSelectAllItem(e)))},_isVirtualMode:function(){return this.option("virtualModeEnabled")&&this._isDataStructurePlain()&&!!this.option("dataSource")},_isDataStructurePlain:function(){return this.option("dataStructure")==="plain"},_fireContentReadyAction:function(){var e=this.getDataSource(),t=e&&!e.isLoaded(),i=this.getScrollable();i&&Ue()&&i.update(),t||this.callBase(),i&&Ue()&&i.update()},_renderScrollableContainer:function(){this._scrollable=this._createComponent(v("<div>").appendTo(this.$element()),_n,{useNative:this.option("useNativeScrolling"),direction:this.option("scrollDirection"),useKeyboard:!1})},_renderNodeContainer:function(e){var t=v("<ul>").addClass(Ar);if(this.setAria("role","group",t),e&&e.length){var i=this._getItemData(e.children("."+Oi));this._expandedGetter(i)&&t.addClass(Ua),t.appendTo(e)}return t},_createDOMElement:function(e,t){var i=v("<li>").addClass(Ki).attr(jd,this._encodeString(t.internalFields.key)).prependTo(e);return this.setAria({role:"treeitem",label:this._displayGetter(t.internalFields.item)||"",expanded:t.internalFields.expanded||!1,level:this._getLevel(e)},i),i},_getLevel:function(e){var t=e.parent();return t.hasClass("dx-scrollable-content")?1:parseInt(t.attr("aria-level"))+1},_showCheckboxes:function(){return this.option("showCheckBoxesMode")!=="none"},_selectAllEnabled:function(){return this.option("showCheckBoxesMode")==="selectAll"&&!this._isSingleSelection()},_renderItems:function(e,t){for(var i=t.length-1,n=i;n>=0;n--)this._renderItem(n,t[n],e);this._renderedItemsCount+=t.length},_renderItem:function(e,t,i){var n=this._createDOMElement(i,t),r=t.internalFields,a=this._showCheckboxes();n.addClass(a?Qj:e7),n.toggleClass(Ub,r.item.visible===!1),a&&this._renderCheckBox(n,t),this.setAria("selected",r.selected,n),this._toggleSelectedClass(n,r.selected),this.callBase(this._renderedItemsCount+e,r.item,n),r.item.visible!==!1&&this._renderChildren(n,t)},_setAriaSelected:function(){},_renderChildren:function(e,t){if(!this._hasChildren(t)){this._addLeafClass(e);return}this._renderToggleItemVisibilityIcon(e,t),!(this.option("deferRendering")&&!t.internalFields.expanded)&&this._loadSublevel(t).done(i=>{this._renderSublevel(e,this._getActualNode(t),i)})},_getActualNode:function(e){return this._dataAdapter.getNodeByKey(e.internalFields.key)},_hasChildren:function(e){return this._isVirtualMode()||this._useCustomChildrenLoader()?this._hasItemsGetter(e.internalFields.item)!==!1:this.callBase(e)},_loadSublevel:function(e){var t=new se,i=this._getChildNodes(e);return i.length?t.resolve(i):this._loadNestedItems(e).done(n=>{t.resolve(this._dataAdapter.getNodesByItems(n))}),t.promise()},_renderSublevel:function(e,t,i){var n=this._renderNodeContainer(e,t),r=i.filter(o=>t.internalFields.childrenKeys.indexOf(o.internalFields.key)!==-1);if(this._renderItems(n,r),r.length&&!t.internalFields.selected){var a=r[0];this._updateParentsState(a,this._getNodeElement(a))}this._normalizeIconState(e,r.length),t.internalFields.expanded&&n.addClass(Ua)},_executeItemRenderAction:function(e,t,i){var n=this._getNode(i);this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t,node:this._dataAdapter.getPublicNode(n)})},_addLeafClass:function(e){e.addClass(Sl)},_expandEventHandler:function(e){var t=v(e.currentTarget.parentNode);t.hasClass(Sl)||this._toggleExpandedState(e.currentTarget,void 0,e)},_initExpandEvent:function(){var e=this._getEventNameByOption(this.option("expandEvent")),t=this._itemContainer(),i=this._itemSelector();R.off(t,"."+Xp,i),R.on(t,e,i,this._expandEventHandler.bind(this))},_getEventNameByOption:function(e){var t=e==="click"?vt:qu;return ye(t,Xp)},_getNode:function(e){if(!E(e))return null;if(e.internalFields)return e;if(Zl(e))return this._dataAdapter.getNodeByKey(e);var t=v(e).get(0);return t?me.isElementNode(t)?this._getNodeByElement(t):this._dataAdapter.getNodeByItem(t):null},_getNodeByElement:function(e){var t=v(e).closest("."+Ki),i=this._decodeString(t.attr(jd));return this._dataAdapter.getNodeByKey(i)},_toggleExpandedState:function(e,t,i){var n=this._getNode(e);if(!n)return new se().reject().promise();if(n.internalFields.disabled)return new se().reject().promise();var r=n.internalFields.expanded;if(r===t)return new se().resolve().promise();if(this._hasChildren(n)){var a=this._getNodeElement(n);if(a.find(".".concat(jp,":not(.").concat(Ub,")")).length)return new se().reject().promise();this._createLoadIndicator(a)}return E(t)||(t=!r),this._dataAdapter.toggleExpansion(n.internalFields.key,t),this._updateExpandedItemsUI(n,t,i)},_createLoadIndicator:function(e){var t=e.children("."+os),i=e.children(".".concat(Ar));t.hasClass(qp)||i.not(":empty").length||(this._createComponent(v("<div>").addClass(jp),vn,{}).$element().appendTo(e),t.hide())},_renderToggleItemVisibilityIcon:function(e,t){var i=v("<div>").addClass(os).appendTo(e);t.internalFields.expanded&&(i.addClass(qp),e.parent().addClass(Ua)),t.internalFields.disabled&&i.addClass(El),this._renderToggleItemVisibilityIconClick(i,t)},_renderToggleItemVisibilityIconClick:function(e,t){var i=ye(vt,this.NAME);R.off(e,i),R.on(e,i,n=>{this._toggleExpandedState(t.internalFields.key,void 0,n)})},_updateExpandedItemsUI:function(e,t,i){var n=this._getNodeElement(e),r=!n.length||t&&n.is(":hidden");if(this.option("expandNodesRecursive")&&r){var a=this._getNode(e.internalFields.parentKey);a&&this._updateExpandedItemsUI(a,t,i)}var o=n.children("."+os),s=n.children(".".concat(Ar));o.toggleClass(qp,t);var l=s.length>0,u=new se;return!t||l&&!s.is(":empty")?(this._animateNodeContainer(e,t,i,u),u.promise()):e.internalFields.childrenKeys.length===0&&(this._isVirtualMode()||this._useCustomChildrenLoader())?(this._loadNestedItemsWithUpdate(e,t,i,u),u.promise()):(this._renderSublevel(n,e,this._getChildNodes(e)),this._fireContentReadyAction(),this._animateNodeContainer(e,t,i,u),u.promise())},_loadNestedItemsWithUpdate:function(e,t,i,n){var r=this._getNodeElement(e);this._loadNestedItems(e).done(a=>{var o=this._getActualNode(e);this._renderSublevel(r,o,this._dataAdapter.getNodesByItems(a)),!(!a||!a.length)&&(this._fireContentReadyAction(),this._animateNodeContainer(o,t,i,n))})},_loadNestedItems:function(e){if(this._useCustomChildrenLoader()){var t=this._dataAdapter.getPublicNode(e);return this._loadChildrenByCustomLoader(t).done(i=>{this._areNodesExists(i)||this._appendItems(i)})}return this._isVirtualMode()?(this._filter.internal=[this.option("parentIdExpr"),e.internalFields.key],this._dataSource.filter(this._combineFilter()),this._dataSource.load().done(i=>{this._areNodesExists(i)||this._appendItems(i)})):new se().resolve([]).promise()},_areNodesExists:function(e,t){var i=this.keyOf(e[0]),n=this._dataAdapter.getFullData();return!!this._dataAdapter.getNodeByKey(i,n)},_appendItems:function(e){this.option().items=this.option("items").concat(e),this._initDataAdapter()},_animateNodeContainer:function(e,t,i,n){var r=this._getNodeElement(e),a=r.children(".".concat(Ar));e&&n&&a.length===0&&n.resolve(),a.addClass(Ua);var o=Ke(a);zt.stop(a,!0),zt.animate(a,{type:"custom",duration:this.option("animationEnabled")?400:0,from:{maxHeight:t?0:o},to:{maxHeight:t?o:0},complete:(function(){a.css("maxHeight","none"),a.toggleClass(Ua,t),this.setAria("expanded",t,r),this.getScrollable().update(),this._fireExpandedStateUpdatedEvent(t,e,i),n&&n.resolve()}).bind(this)})},_fireExpandedStateUpdatedEvent:function(e,t,i){if(this._hasChildren(t)){var n=e?"onItemExpanded":"onItemCollapsed";if(E(i))this._itemDXEventHandler(i,n,{node:this._dataAdapter.getPublicNode(t)});else{var r=this._getNodeElement(t);this._itemEventHandler(r,n,{event:i,node:this._dataAdapter.getPublicNode(t)})}}},_normalizeIconState:function(e,t){var i=e.find(".".concat(jp));if(i.length&&vn.getInstance(i).option("visible",!1),t){var n=e.find("."+os);n.show();return}e.find("."+os).removeClass(os),e.addClass(Sl)},_emptyMessageContainer:function(){var e=this.getScrollable();return e?v(e.content()):this.callBase()},_renderContent:function(){var e=this.option("items");e&&e.length&&(this._contentAlreadyRendered=!0),this.callBase()},_renderSelectAllItem:function(e){e=e||this.$element().find(".".concat(Ar)).first(),this._$selectAllItem=v("<div>").addClass(Yp);var t=this._dataAdapter.isAllSelected();this._createComponent(this._$selectAllItem,wo,{value:t,text:this.option("selectAllText"),onValueChanged:this._onSelectAllCheckboxValueChanged.bind(this)}),this._toggleSelectedClass(this._$selectAllItem,t),e.before(this._$selectAllItem)},_onSelectAllCheckboxValueChanged:function(e){this._toggleSelectAll(e),this._fireSelectAllValueChanged(e.value)},_toggleSelectAll:function(e){this._dataAdapter.toggleSelectAll(e.value),this._updateItemsUI(),this._fireSelectionChanged()},_renderCheckBox:function(e,t){var i=v("<div>").appendTo(e);this._createComponent(i,wo,{value:t.internalFields.selected,onValueChanged:this._changeCheckboxValue.bind(this),focusStateEnabled:!1,disabled:this._disabledGetter(t)})},_toggleSelectedClass:function(e,t){e.toggleClass(r7,!!t)},_toggleNodeDisabledState:function(e,t){var i=this._getNodeElement(e),n=i.find("."+Oi).eq(0);if(this._dataAdapter.toggleNodeDisabledState(e.internalFields.key,t),n.toggleClass(El,!!t),this._showCheckboxes()){var r=this._getCheckBoxInstance(i);r.option("disabled",!!t)}},_itemOptionChanged:function(e,t,i){var n=this._dataAdapter.getNodeByItem(e);t===this.option("disabledExpr")&&this._toggleNodeDisabledState(n,i)},_changeCheckboxValue:function(e){var t=v(e.element).parent("."+Ki),i=t.children("."+Oi),n=this._getItemData(i),r=this._getNodeByElement(i),a=e.value;r&&r.internalFields.selected===a||this._updateItemSelection(a,n,e.event)},_isSingleSelection:function(){return this.option("selectionMode")==="single"},_isRecursiveSelection:function(){return this.option("selectNodesRecursive")&&this.option("selectionMode")!=="single"},_isLastSelectedBranch:function(e,t,i){var n=t.indexOf(e.key);return n>=0&&t.splice(n,1),i&&V(e.children,(function(r,a){this._isLastSelectedBranch(a,t,!0)}).bind(this)),e.parent&&this._isLastSelectedBranch(e.parent,t),t.length===0},_isLastRequired:function(e){var t=this.option("selectionRequired"),i=this._isSingleSelection(),n=this.getSelectedNodeKeys();if(t)return i?n.length===1:this._isLastSelectedBranch(e.internalFields.publicNode,n.slice(),!0)},_updateItemSelection:function(e,t,i){var n=this._getNode(t);if(!n||n.visible===!1)return!1;if(n.internalFields.selected===e)return!0;if(!e&&this._isLastRequired(n)){if(this._showCheckboxes()){var r=this._getNodeElement(n);this._getCheckBoxInstance(r).option("value",!0)}return!1}if(e&&this._isSingleSelection()){var a=this.getSelectedNodeKeys();V(a,(l,u)=>{this._dataAdapter.toggleSelection(u,!1),this._updateItemsUI(),this._fireItemSelectionChanged(this._getNode(u))})}this._dataAdapter.toggleSelection(n.internalFields.key,e);var o=this._dataAdapter.isAllSelected(),s=this._selectAllEnabled()&&this._$selectAllItem.dxCheckBox("instance").option("value")!==o;return this._updateItemsUI(),this._fireItemSelectionChanged(n,i),this._fireSelectionChanged(),s&&this._fireSelectAllValueChanged(o),!0},_fireItemSelectionChanged:function(e,t){var i=t||this._findItemElementByItem(e.internalFields.item),n=t?this._itemDXEventHandler:this._itemEventHandler;n.call(this,i,"onItemSelectionChanged",{node:this._dataAdapter.getPublicNode(e),itemData:e.internalFields.item})},_getCheckBoxInstance:function(e){return e.children(".dx-checkbox").dxCheckBox("instance")},_updateItemsUI:function(){var e={};if(V(this._dataAdapter.getData(),(i,n)=>{var r=this._getNodeElement(n,e),a=n.internalFields.selected;r.length&&(this._toggleSelectedClass(r,a),this.setAria("selected",a,r),this._showCheckboxes()&&this._getCheckBoxInstance(r).option("value",a))}),this._selectAllEnabled()){var t=this._$selectAllItem.dxCheckBox("instance");t.option("onValueChanged",void 0),t.option("value",this._dataAdapter.isAllSelected()),t.option("onValueChanged",this._onSelectAllCheckboxValueChanged.bind(this))}},_updateParentsState:function(e,t){if(t){var i=this._dataAdapter.getNodeByKey(e.internalFields.parentKey),n=v(t.parents("."+Ki)[0]);if(this._showCheckboxes()){var r=i.internalFields.selected;this._getCheckBoxInstance(n).option("value",r),this._toggleSelectedClass(n,r)}i.internalFields.parentKey!==this.option("rootValue")&&this._updateParentsState(i,n)}},_itemEventHandlerImpl:function(e,t,i){var n=v(e).closest("."+Ki).children("."+Oi);return t(k(this._extendActionArgs(n),i))},_itemContextMenuHandler:function(e){this._createEventHandler("onItemContextMenu",e)},_itemHoldHandler:function(e){this._createEventHandler("onItemHold",e)},_createEventHandler:function(e,t){var i=this._getNodeByElement(t.currentTarget);this._itemDXEventHandler(t,e,{node:this._dataAdapter.getPublicNode(i)})},_itemClass:function(){return Oi},_itemDataKey:function(){return t7},_attachClickEvent:function(){var e="."+this._itemClass(),t="."+Ki+", ."+Yp,i=ye(vt,this.NAME),n=ye(lt.down,this.NAME),r=this._itemContainer(),a=this;R.off(r,i,e),R.off(r,n,t),R.on(r,i,e,function(o){a._itemClickHandler(o,v(this))}),R.on(r,n,t,function(o){a._itemPointerDownHandler(o)})},_itemClickHandler:function(e,t){var i=this._getItemData(t),n=this._getNodeByElement(t);this._itemDXEventHandler(e,"onItemClick",{node:this._dataAdapter.getPublicNode(n)}),this.option("selectByClick")&&!e.isDefaultPrevented()&&this._updateItemSelection(!n.internalFields.selected,i,e)},_updateSelectionToFirstItem:function(e,t){for(var i=t;i>=0;){var n=v(e[i]);this._updateItemSelection(!0,n.find("."+Oi).get(0)),i--}},_updateSelectionToLastItem:function(e,t){for(var i=e.length,n=t;n<i;){var r=v(e[n]);this._updateItemSelection(!0,r.find("."+Oi).get(0)),n++}},_focusInHandler:function(e){if(this._updateFocusState(e,!0),this.option("focusedElement")){clearTimeout(this._setFocusedItemTimeout),this._setFocusedItemTimeout=setTimeout(()=>{this._setFocusedItem(v(this.option("focusedElement")))});return}var t=this._getActiveItem();this.option("focusedElement",Me(t.closest("."+Ki)))},_setFocusedItem:function(e){!e||!e.length||e.children().hasClass(El)||this.callBase(e)},_itemPointerDownHandler:function(e){if(this.option("focusStateEnabled")){var t=v(e.target).closest("."+Ki+", ."+Yp);if(t.length){var i=t.hasClass(El)?null:t;this.option("focusedElement",Me(i))}}},_findNonDisabledNodes:function(e){return e.not(function(){return v(this).children("."+Oi).hasClass(El)})},_moveFocus:function(e,t){var i="up",n="down",r="first",a="last",o=this.option("rtlEnabled")?"right":"left",s=this.option("rtlEnabled")?"left":"right";this.$element().find(".".concat(Ar)).each(function(){zt.stop(this,!0)});var l=this._findNonDisabledNodes(this._nodeElements());if(!(!l||!l.length))switch(e){case i:var u=this._prevItem(l);this.option("focusedElement",Me(u));var d=this._getNodeItemElement(u);this.getScrollable().scrollToElement(d),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,d);break;case n:var c=this._nextItem(l);this.option("focusedElement",Me(c));var h=this._getNodeItemElement(c);this.getScrollable().scrollToElement(h),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,h);break;case r:var f=l.first();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToFirstItem(l,l.index(this._prevItem(l))),this.option("focusedElement",Me(f)),this.getScrollable().scrollToElement(this._getNodeItemElement(f));break;case a:var p=l.last();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToLastItem(l,l.index(this._nextItem(l))),this.option("focusedElement",Me(p)),this.getScrollable().scrollToElement(this._getNodeItemElement(p));break;case s:this._expandFocusedContainer();break;case o:this._collapseFocusedContainer();break;default:this.callBase.apply(this,arguments);return}},_getNodeItemElement:function(e){return e.find("."+Oi).get(0)},_nodeElements:function(){return this.$element().find("."+Ki).not(":hidden")},_expandFocusedContainer:function(){var e=v(this.option("focusedElement"));if(!(!e.length||e.hasClass(Sl))){var t=e.find(".".concat(Ar)).eq(0);if(t.hasClass(Ua)){var i=this._nextItem(this._findNonDisabledNodes(this._nodeElements()));this.option("focusedElement",Me(i)),this.getScrollable().scrollToElement(this._getNodeItemElement(i));return}var n=this._getNodeByElement(e.children("."+Oi));this._toggleExpandedState(n,!0)}},_getClosestNonDisabledNode:function(e){do e=e.parent().closest("."+Ki);while(e.children(".dx-treeview-item.dx-state-disabled").length);return e},_collapseFocusedContainer:function(){var e=v(this.option("focusedElement"));if(e.length){var t=e.find(".".concat(Ar)).eq(0);if(!e.hasClass(Sl)&&t.hasClass(Ua)){var i=this._getNodeByElement(e.children("."+Oi));this._toggleExpandedState(i,!1)}else{var n=this._getClosestNonDisabledNode(e);n.length&&this.option("focusedElement",Me(n)),this.getScrollable().scrollToElement(this._getNodeItemElement(n))}}},_encodeString:function(e){return Ve(e)?encodeURI(e):e},_decodeString:function(e){return Ve(e)?decodeURI(e):e},getScrollable:function(){return this._scrollable},updateDimensions:function(){var e=new se,t=this.getScrollable();return t?t.update().done(()=>{e.resolveWith(this)}):e.resolveWith(this),e.promise()},selectItem:function(e){return this._updateItemSelection(!0,e)},unselectItem:function(e){return this._updateItemSelection(!1,e)},expandItem:function(e){return this._toggleExpandedState(e,!0)},collapseItem:function(e){return this._toggleExpandedState(e,!1)},getNodes:function(){return this._dataAdapter.getTreeNodes()},getSelectedNodes:function(){return this.getSelectedNodeKeys().map(e=>{var t=this._dataAdapter.getNodeByKey(e);return this._dataAdapter.getPublicNode(t)})},getSelectedNodesKeys:function(){return Qe.log("W0002","dxTreeView","getSelectedNodesKeys","20.1","Use the 'getSelectedNodeKeys' method instead"),this.getSelectedNodeKeys()},getSelectedNodeKeys:function(){return this._dataAdapter.getSelectedNodesKeys()},selectAll:function(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!0):this._toggleSelectAll({value:!0})},unselectAll:function(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!1):this._toggleSelectAll({value:!1})},expandAll:function(){var e=this._dataAdapter;V(e.getData(),(t,i)=>e.toggleExpansion(i.internalFields.key,!0)),this.repaint()},collapseAll:function(){V(this._dataAdapter.getExpandedNodesKeys(),(function(e,t){this._toggleExpandedState(t,!1)}).bind(this))},scrollToItem:function(e){var t=this._getNode(e);if(!t)return new se().reject().promise();for(var i=[],n=t.internalFields.publicNode.parent;n!=null;)n.expanded||i.push(n.key),n=n.parent;var r=new se;return this._expandNodes(i.reverse()).always(()=>{var a=this._getNodeElement(t);a&&a.length?(this.scrollToElementTopLeft(a.get(0)),r.resolve()):r.reject()}),r.promise()},scrollToElementTopLeft:function(e){var t=this.getScrollable(),{scrollDirection:i,rtlEnabled:n}=this.option(),r={top:0,left:0},a=xD(SD,e);if(i!==hh){var o=v(t.container()).get(0);r.left=n?a.left+e.offsetWidth-o.clientWidth:a.left}i!==bD&&(r.top=a.top),t.scrollTo(r)},_expandNodes:function(e){if(!e||e.length===0)return new se().resolve().promise();var t=new se,i=e.map(n=>this.expandItem(n));return De.apply(v,i).done(()=>t.resolve()).fail(()=>t.reject()),t.promise()},_dispose:function(){this.callBase(),clearTimeout(this._setFocusedItemTimeout)}});Eo.setEditorClass(ld);var lR="dx-treeview",o7="".concat(lR,"-node-container"),cd=a7.inherit(Eo).inherit({_addWidgetPrefix:function(e){return"".concat(lR,"-").concat(e)},_optionChanged:function(e){switch(e.name){case"searchValue":this._showCheckboxes()&&this._isRecursiveSelection()&&this._removeSelection(),this._initDataAdapter(),this._updateSearch(),this._repaintContainer(),this.option("focusedElement",null);break;case"searchExpr":this._initDataAdapter(),this.repaint();break;case"searchMode":this.option("expandNodesRecursive")?this._updateDataAdapter():this._initDataAdapter(),this.repaint();break;default:this.callBase(e)}},_updateDataAdapter:function(){this._setOptionWithoutOptionChange("expandNodesRecursive",!1),this._initDataAdapter(),this._setOptionWithoutOptionChange("expandNodesRecursive",!0)},_getDataAdapterOptions:function(){return k(this.callBase(),{searchValue:this.option("searchValue"),searchMode:this.option("searchMode")||"contains",searchExpr:this.option("searchExpr")})},_updateSearch:function(){if(this._searchEditor){var e=this._getSearchEditorOptions();this._searchEditor.option(e)}},_repaintContainer:function(){var e=this.$element().find(".".concat(o7)).first(),t;e.length&&(e.empty(),t=this._dataAdapter.getRootNodes(),this._renderEmptyMessage(t),this._renderItems(e,t),this._fireContentReadyAction())},_itemContainer:function(e){return this._scrollable&&e?v(this._scrollable.content()):this.callBase()},_addWidgetClass:function(){this.$element().addClass(this._widgetClass())},_clean:function(){this.callBase(),this._removeSearchBox()}});tt("dxTreeView",cd);var s7="column-chooser",uR="column-chooser-button",Kb="notouch-action",l7="column-chooser-list",u7="column-chooser-plain",d7="column-chooser-mode-drag",c7="column-chooser-mode-select",dR="column-chooser",jb="dx-column-chooser-item",h7=".dx-treeview-node",f7=".dx-checkbox",p7=300,qb=function(e,t){var i=[],n=e.option("columnChooser.mode")==="select";return t.length&&V(t,function(r,a){var o={text:a.caption,cssClass:a.cssClass,allowHiding:a.allowHiding,expanded:!0,id:a.index,disabled:!1,disableCheckBox:a.allowHiding===!1,parentId:E(a.ownerBand)?a.ownerBand:null};n&&(o.selected=a.visible),i.push(o)}),i},v7=Dt.ViewController.inherit({renderShowColumnChooserButton:function(e){var t=this,i=t.addWidgetPrefix(uR),n=t.option("columnChooser.enabled"),r=e.find("."+i),a;n?r.length?r.show():(a=v("<div>").addClass(i).appendTo(e),t._createComponent(a,Ii,{icon:dR,onClick:function(){t.getView("columnChooserView").showColumnChooser()},hint:t.option("columnChooser.title"),integrationOptions:{}})):r.hide()},getPosition:function(){var e=this.getView("rowsView");return{my:"right bottom",at:"right bottom",of:e&&e.element(),collision:"fit",offset:"-2 -2",boundaryOffset:"2 2"}}}),_7=Yu.inherit({_resizeCore:re,_isWinDevice:function(){return!!Re.real().win},_updateList:function(e){var t,i=this._popupContainer.$content(),n=this.option("columnChooser.mode")==="select",r=this._columnChooserList,a=this._columnsController.getChooserColumns(n);if(n&&r&&e&&e.changeType==="selection"){t=qb(this,a);for(var o=0;o<t.length;o++){var s=t[o].selected,l=t[o].id;l===e.columnIndex&&(s?r.selectItem(l,s):r.unselectItem(l,s))}}else(!n||!r||e==="full")&&(this._popupContainer.$wrapper().toggleClass(this.addWidgetPrefix(d7),!n).toggleClass(this.addWidgetPrefix(c7),n),t=qb(this,a),this._renderTreeView(i,t))},_initializePopupContainer:function(){var e=this,t=e.element().addClass(e.addWidgetPrefix(s7)),i=e.option("columnChooser"),n=Xn(),r=WT(n),a=ei(n),o={visible:!1,shading:!1,showCloseButton:!1,dragEnabled:!0,resizeEnabled:!0,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{text:i.title,toolbar:"top",location:r||a?"before":"center"}],position:e.getController("columnChooser").getPosition(),width:i.width,height:i.height,rtlEnabled:e.option("rtlEnabled"),onHidden:function(){e._isWinDevice()&&v("body").removeClass(e.addWidgetPrefix(Kb))},container:i.container};r||a?k(o,{showCloseButton:!0}):o.toolbarItems[o.toolbarItems.length]={shortcut:"cancel"},E(this._popupContainer)?this._popupContainer.option(o):(e._popupContainer=e._createComponent(t,Cr,o),e._popupContainer.on("optionChanged",function(s){s.name==="visible"&&e.renderCompleted.fire()}))},_renderCore:function(e){this._popupContainer&&this._updateList(e)},_renderTreeView:function(e,t){var i=this,n=this.option("columnChooser"),r=n.mode==="select",a={items:t,dataStructure:"plain",activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,itemTemplate:"item",showCheckBoxesMode:"none",rootValue:null,searchEnabled:n.allowSearch,searchTimeout:n.searchTimeout,onItemRendered:function(l){if(l.itemData.disableCheckBox){var u=v(l.itemElement).closest(h7),d;if(u.length&&(d=u.find(f7),d.length)){var c=d.data("dxCheckBox");c&&c.option("disabled",!0)}}}},o=e.find(".dx-scrollable").data("dxScrollable"),s=o&&o.scrollTop();r&&!this._columnsController.isBandColumnsUsed()&&e.addClass(this.addWidgetPrefix(u7)),a.onContentReady=function(l){Vi(function(){if(s){var u=v(l.element).find(".dx-scrollable").data("dxScrollable");u&&u.scrollTo({y:s})}i.renderCompleted.fire()})},this._isWinDevice()&&(a.useNativeScrolling=!1),k(a,r?this._prepareSelectModeConfig():this._prepareDragModeConfig()),this._columnChooserList?(a.searchEnabled||(a.searchValue=""),this._columnChooserList.option(a)):(this._columnChooserList=this._createComponent(e,cd,a),e.addClass(this.addWidgetPrefix(l7)))},_prepareDragModeConfig:function(){var e=this.option("columnChooser");return{noDataText:e.emptyPanelText,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,itemTemplate:function(t,i,n){v(n).text(t.text).parent().addClass(t.cssClass).addClass(jb)}}},_prepareSelectModeConfig:function(){var e=this;return{selectNodesRecursive:!1,showCheckBoxesMode:"normal",onItemSelectionChanged:function(t){var i=e._columnsController.getVisibleColumns().filter(function(r){return!r.command}),n=i.length===1&&!t.itemData.selected;n?t.component.selectItem(t.itemElement):setTimeout(function(){e._columnsController.columnOption(t.itemData.id,"visible",t.itemData.selected)},p7)}}},_columnOptionChanged:function(e){var t=e.changeTypes,i=e.optionNames,n=this.option("columnChooser.mode")==="select";if(this.callBase(e),n){var r=i.visible&&i.length===1&&e.columnIndex!==void 0,a=i.showInColumnChooser||i.caption||i.visible||t.columns&&i.all;r?this.render(null,{changeType:"selection",columnIndex:e.columnIndex}):a&&this.render(null,"full")}},optionChanged:function(e){switch(e.name){case"columnChooser":this._initializePopupContainer(),this.render(null,"full");break;default:this.callBase(e)}},getColumnElements:function(){var e=[],t,i=this.option("columnChooser.mode")==="select",n=this._columnsController.getChooserColumns(i),r=this._popupContainer&&this._popupContainer.$content(),a=r&&r.find(".dx-treeview-node");return a&&n.forEach(function(o){t=a.filter("[data-item-id = '"+o.index+"']");var s=t.length?t.children("."+jb).get(0):null;e.push(s)}),v(e)},getName:function(){return"columnChooser"},getColumns:function(){return this._columnsController.getChooserColumns()},allowDragging:function(e,t){var i=e&&e.allowHiding&&(t!=="columnChooser"||!e.visible&&this._columnsController.isParentColumnVisible(e.index));return this.isColumnChooserVisible()&&i},getBoundingRect:function(){var e=this._popupContainer&&this._popupContainer.$overlayContent();if(e&&e.is(":visible")){var t=e.offset();return{left:t.left,top:t.top,right:t.left+ot(e),bottom:t.top+nt(e)}}return null},showColumnChooser:function(){this._popupContainer||(this._initializePopupContainer(),this.render()),this._popupContainer.show(),this._isWinDevice()&&v("body").addClass(this.addWidgetPrefix(Kb))},hideColumnChooser:function(){this._popupContainer&&this._popupContainer.hide()},isColumnChooserVisible:function(){var e=this._popupContainer;return e&&e.option("visible")},publicMethods:function(){return["showColumnChooser","hideColumnChooser"]}}),EC={defaultOptions:function(){return{columnChooser:{enabled:!1,allowSearch:!1,searchTimeout:500,mode:"dragAndDrop",width:250,height:260,title:fe.format("dxDataGrid-columnChooserTitle"),emptyPanelText:fe.format("dxDataGrid-columnChooserEmptyText"),container:void 0}}},controllers:{columnChooser:v7},views:{columnChooserView:_7},extenders:{views:{headerPanel:{_getToolbarItems:function(){var e=this.callBase();return this._appendColumnChooserItem(e)},_appendColumnChooserItem:function(e){var t=this,i=t.option("columnChooser.enabled");if(i){var n=t.option("columnChooser.title"),r={widget:"dxButton",options:{icon:dR,onClick:function(){t.component.getView("columnChooserView").showColumnChooser()},hint:n,text:n,onInitialized:function(a){v(a.element).addClass(t._getToolbarButtonClass(t.addWidgetPrefix(uR)))}},showText:"inMenu",location:"after",name:"columnChooserButton",locateInMenu:"auto",sortIndex:40};e.push(r)}return e},optionChanged:function(e){switch(e.name){case"columnChooser":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}},isVisible:function(){var e=this.option("columnChooser.enabled");return this.callBase()||e}}},controllers:{columns:{allowMoveColumn:function(e,t,i,n){var r=this.option("columnChooser.mode"),a=r==="select"&&n==="columnChooser";return a?!1:this.callBase(e,t,i,n)}}}}};EC.controllers.columnChooser;EC.views.columnChooserView;Oe.registerModule("columnChooser",EC);function cR(e,t,i){for(var n=jr(t.group),r=[],a=i?e.length-1:0;a<e.length;a++){for(var o=[],s=0;s<=a;s++){var l=n[s].selector;if(a===s&&(e[s]===null||e[s]===!1||e[s]===!0))e[s]===!1?o.push([l,"=",n[s].desc?!0:null]):(e[s]?!n[s].desc:n[s].desc)?o.push([l,"<>",e[s]]):(o.push([l,"<>",null]),o.push([l,"=",null]));else{var u=[l,a===s?n[s].desc?">":"<":"=",e[s]];u[1]==="<"?o.push([u,"or",[l,"=",null]]):o.push(u)}}r.push(Oe.combineFilters(o))}return r=Oe.combineFilters(r,"or"),Oe.combineFilters([r,t.filter])}var hR=it.inherit(function(){var e=function(i,n){var r=i.hash;return r&&r[JSON.stringify(n)]},t=function(i,n){var r=0,a=i.length-1;if(!i.length)return 0;do{var o=a+r>>1;i[o].offset>n?a=o:r=o}while(a-r>1);var s;for(s=r;s<=a&&!(i[s].offset>n);s++);return s};return{ctor:function(i){this._dataSource=i,this.reset()},reset:function(){this._groupsInfo=[],this._totalCountCorrection=0},totalCountCorrection:function(){return this._totalCountCorrection},updateTotalItemsCount:function(i){this._totalCountCorrection=i||0},isGroupItemCountable:function(i){return!this._isVirtualPaging()||!i.isContinuation},_isVirtualPaging:function(){var i=this._dataSource.option("scrolling.mode");return i==="virtual"||i==="infinite"},itemsCount:function(){var i=this._dataSource,n=i._dataSource,r=Oe.normalizeSortingInfo(n.group()||[]).length,a=function o(s,l,u){var d=0;if(l)if(!u)d=l.length;else for(var c=0;c<l.length;c++)s.isGroupItemCountable(l[c])&&d++,d+=o(s,l[c].items,u-1);return d}(this,n.items(),r);return a},foreachGroups:function(i,n,r,a,o){var s=this;return function l(u,d,c,h){var f=[];function p(A,B,D,U){var H=B&&A(B,D);return H&&U.push(H),H}for(var m=0;m<u.length;m++){if(h.push(u[m].data),!c&&p(d,u[m].data,h,f)===!1)return!1;if(!u[m].data||u[m].data.isExpanded||r){var g=u[m].children,C=g.length&&l(g,d,c,h);if(C&&f.push(C),C===!1)return!1}if(c&&p(d,u[m].data,h,f)===!1)return!1;(!u[m].data||u[m].data.offset!==u[m].offset)&&(a=!0),h.pop()}var b=o&&h.slice(0);return a&&De.apply(v,f).always(function(){s._updateGroupInfoOffsets(u,b)})}(s._groupsInfo,i,n,[])},_updateGroupInfoOffsets:function(i,n){n=n||[];for(var r=0;r<i.length;r++){var a=i[r];if(a.data&&a.data.offset!==a.offset){a.offset=a.data.offset;for(var o=0;o<n.length;o++)n[o].offset=a.offset}}i.sort(function(s,l){return s.offset-l.offset})},findGroupInfo:function(i){for(var n,r=this._groupsInfo,a=0;r&&a<i.length;a++)n=e(r,i[a]),r=n&&n.children;return n&&n.data},addGroupInfo:function(i){for(var n,r=i.path,a=this._groupsInfo,o=0;o<r.length;o++){if(n=e(a,r[o]),!n){n={key:r[o],offset:i.offset,data:{offset:i.offset,isExpanded:!0,path:r.slice(0,o+1)},children:[]};var s=t(a,i.offset);a.splice(s,0,n),a.hash=a.hash||{},a.hash[JSON.stringify(n.key)]=n}o===r.length-1&&(n.data=i,n.offset!==i.offset&&this._updateGroupInfoOffsets(a)),a=n.children}},allowCollapseAll:function(){return!0},refresh:function(i){var n=i.storeLoadOptions,r=jr(n.group||[]),a="_group"in this?jr(this._group||[]):r,o=Math.min(a.length,r.length);this._group=n.group;for(var s=0;s<o;s++)if(a[s].selector!==r[s].selector){o=s;break}o?function l(u,d,c){for(var h=0;h<u.length;h++)d+1>=c?u[h].children=[]:l(u[h].children,d+1,c)}(this._groupsInfo,0,o):this.reset()},handleDataLoading:function(){},handleDataLoaded:function(i,n){n(i)},handleDataLoadedCore:function(i,n){n(i)}}}());function io(e,t){for(var i=jr(t.group),n=[],r=0;r<e.length;r++)n.push([i[r].selector,"=",e[r]]);return t.filter&&n.push(t.filter),be.combineFilters(n)}var Zp=function(e,t){var i=new se,n=k({skip:0,take:1,requireTotalCount:!0},t);return e.load(n).done(function(r,a){i.resolve(a&&a.totalCount)}).fail(i.reject.bind(i)),i},Yb=hR.inherit(function(){var e=function(a,o,s){return a.foreachGroups(function(l){if(!l.isExpanded)return o(l)},!1,!1,s,!0)},t=function(a,o){var s=0,l=o||0;return o&&(e(a,function(u){if(u.offset-s>=o)return!1;s+=u.count-1}),l+=s),l},i=function(a,o){if(a.length!==o.length)return!1;for(var s=0;s<a.length;s++)if(!Gu(null,a[s],o[s]))return!1;return!0},n=function a(o,s,l,u,d){if(s){for(var c=0;c<s.length;c++){var h=s[c];if("key"in h&&h.items!==void 0){l.push(h.key),d&&i(d.path,l)&&!h.isContinuation&&(d.offset=u);var f=o.findGroupInfo(l);f&&!h.isContinuation&&(f.offset=u),f&&!f.isExpanded?u+=f.count:u=a(o,h.items,l,u,d),l.pop()}else u++}return u}},r=function a(o,s){var l=o.count||o.items.length;if(!o.count&&s>1){l=0;for(var u=0;u<o.items.length;u++)l+=a(o.items[u],s-1)}return l};return{handleDataLoading:function(a){var o=a.storeLoadOptions,s=[],l=0,u=!1,d,c=a.loadOptions.group,h=0;if(function(p,m){if(m.group){var g=Oe.normalizeSortingInfo(m.group),C=Oe.normalizeSortingInfo(p.sort);p.sort=qr.arrangeSortingInfo(g,C),delete m.group}}(o,a.loadOptions),a.group=a.group||c,!a.isCustomLoading){var f=k({},o);f.skip=t(this,o.skip),f.skip&&f.take&&c&&(f.skip--,f.take++,u=!0),f.take&&c&&(d=f.take,f.take++),e(this,function(p){if(p.offset>=f.skip+f.take+h)return!1;p.offset>=f.skip+h&&p.count&&(h+=p.count-1,s.push(p),l+=p.count)}),V(s,function(){f.filter=function(p,m,g){for(var C=Oe.normalizeSortingInfo(g||m.group),b=[],A=0;A<p.length;A++){for(var B=[],D=0;D<=A;D++)B.push([C[D].selector,A===D?"<>":"=",p[D]]);b.push(Oe.combineFilters(B))}return b=Oe.combineFilters(b,"or"),Oe.combineFilters([b,m.filter])}(this.path,f,c)}),a.storeLoadOptions=f,a.collapsedGroups=s,a.collapsedItemsCount=l,a.skip=f.skip||0,a.skipFirstItem=u,a.take=d}},handleDataLoaded:function(a,o){var s=a.collapsedGroups,l=Oe.normalizeSortingInfo(a.group),u=l.length;function d(p,m,g,C,b){if(!(!p||!m.length||!g.length)){var A,B,D=qt(m[0],!0);for(B=0;B<p.length&&(A=qt(p[B].key,!0),!(b>=C.offset||D===A));B++)b+=r(p[B],g.length);(!p.length||D!==A)&&p.splice(B,0,{key:m[0],items:[],count:m.length===1?C.count:void 0}),d(p[B].items,m.slice(1),g.slice(1),C,b)}}if(a.collapsedItemsCount&&a.extra&&a.extra.totalCount>=0&&(a.extra.totalCount+=a.collapsedItemsCount),o(a),u){var c=a.data,h=Yi(c);if(qr.multiLevelGroup(h,l).enumerate().done(function(p){c=p}),s)for(var f=0;f<s.length;f++)d(c,s[f].path,l,s[f],a.skip);a.isCustomLoading||function p(m,g,C,b,A,B){for(var D=0,U=!1,H=0;H<g.length;H++){var W=g[H];if(W.items!==void 0){C.push(W.key);var G=m.findGroupInfo(C);if(G&&!G.isExpanded)W.collapsedItems=W.items,W.items=null,b+=G.count,B--,B<0&&D++,A&&(U=!0);else if(W.items){var j=p(m,W.items,C,b,A,B);A&&(j.offset-b>1?W.isContinuation=!0:U=!0),b=j.offset,B=j.take,B<0&&(W.items.length?W.isContinuationOnNextPage=!0:D++)}C.pop()}else A&&(U=!0),b++,B--,B<0&&D++;A=!1}return U&&g.splice(0,1),D&&g.splice(-D,D),{offset:b,take:B}}(this,c,[],a.skip,a.skipFirstItem,a.take),a.data=c}},isGroupItemCountable:function(a){return a.items===null},updateTotalItemsCount:function(){var a=0;e(this,function(o){o.count&&(a-=o.count-1)}),this.callBase(a)},changeRowExpand:function(a){var o=this,s=o._dataSource,l=s.beginPageIndex?s.beginPageIndex():s.pageIndex(),u=s.items(),d=t(o,l*s.pageSize()),c=o.findGroupInfo(a),h;return c&&!c.isExpanded?h=new se().resolve(c.count):h=Zp(s,{filter:io(a,{filter:s.filter(),group:s.group()})}),De(h).done(function(f){f=parseInt(f.length?f[0]:f),c?(n(o,u,[],d),c.isExpanded=!c.isExpanded,c.count=f):(c={offset:-1,count:f,path:a,isExpanded:!1},n(o,u,[],d,c),c.offset>=0&&o.addGroupInfo(c)),o.updateTotalItemsCount()}).fail(function(){s._eventsStrategy.fireEvent("loadError",arguments)})},allowCollapseAll:function(){return!1},refresh:function(a,o){var s=this,l=a.storeLoadOptions,u=s._dataSource;if(this.callBase.apply(this,arguments),o.reload)return e(s,function(d){var c=Zp(u,{filter:io(d.path,l)}),h=Zp(u,{filter:cR(d.path,l)});return De(h,c).done(function(f,p){f=parseInt(f.length?f[0]:f),p=parseInt(p.length?p[0]:p),d.offset=f,d.count!==p&&(d.count=p,s.updateTotalItemsCount())})},!0)}}}());function Jp(e,t,i,n){if(n=n||0,t>1&&i>0){var r=e-Math.floor(e/t)*t||t;return r+=i-n-2,r<0&&(r+=t),Math.floor(r/(t-n-1))}return 0}var Xb=hR.inherit(function(){var e=function(c,h,f){return c.foreachGroups(function(p,m){if(p.isExpanded)return h(p,m)},!0,!1,f,f)},t=function c(h,f,p,m,g,C,b){var A;if(m.items=m.items||[],m.paths=m.paths||[],m.count=m.count||0,m.lastCount=m.lastCount||0,!!p)for(var B=0;B<f.length;B++){var D=f[B];if(D.items!==void 0){if(g.push(D.key),C)A=!0;else{var U=h.findGroupInfo(g);A=U&&U.isExpanded}A?D.items?c(h,D.items,p-1,m,g,C,b):p===1&&D.count&&(!C||b)&&(m.items.push(D),m.paths.push(g.slice(0)),m.count+=m.lastCount,m.lastCount=D.count):(D.collapsedItems=D.items,D.items=null),g.pop()}}},i=function(c,h,f,p,m){var g=c.findGroupInfo(p),C;g?(f?g.count=h.count>0?h.count:h.items&&h.items.length||0:h.count=g.count||h.count,g.offset=m):(f&&(C=h.count>0?h.count:h.items.length),c.addGroupInfo({isExpanded:c._isGroupExpanded(p.length-1),path:p.slice(0),offset:m,count:C||0}))},n=function c(h,f,p,m,g,C,b){var A=f.group?f.group.length:0,B=A===m,D=f.remoteOperations.paging,U=0,H=0,W;if(g=g||0,C=C||[],D&&!b&&(U=g===0?f.skip||0:f.skips[g-1]||0),g>=m)return p.length;for(var G=0;G<p.length;G++){var j=p[G];if(j){if(C.push(j.key),!j.count&&!j.items||j.items===void 0||(i(h,j,B,C,U+G),W=j.items?c(h,f,j.items,m,g+1,C,G):j.count||-1,W<0))return-1;H+=W,C.pop()}}return H},r=function(c,h){return c&&c.length&&c[h]&&!!c[h].isExpanded},a=function(c,h,f){for(var p,m=f,g=0;g<c.length;g++)p=c[g].offset+1,g>0&&(p+=c[g-1].childrenTotalCount,h&&(p+=Jp(m,h,p,g-1)*g)),m+=p;return m};function o(c,h,f,p){var m=h.items[p],g=c.skips&&c.skips[f],C=c.takes&&c.takes[f],b=p===h.items.length-1,A=p===0,B=A&&g||0,D=m.count>C+B;A&&g!==void 0&&(m.isContinuation=!0),b&&C!==void 0&&D&&(m.isContinuationOnNextPage=!0)}function s(c){return!Array.isArray(c)}function l(c){s(c.data)||(c.data=new se)}function u(c,h,f,p,m,g){h.isCustomLoading||(p={},t(c,g,f,p,[]),function(b,A,B){var D=B-1,U=b.group?b.group.length:0;A.skip=b.skips&&b.skips[D],b.takes&&b.takes[D]!==void 0&&(U===B?A.take=A.count?A.count-(A.skip||0):0:A.take=0,A.take+=b.takes[D])}(h,p,f));var C=h.group?h.group.length:0;p.paths.length&&C-f>0?(l(h),function(b,A,B,D,U,H){var W=A.group||[],G=W[U+1],j=[];V(B.paths,function(te){var N={requireTotalCount:!1,requireGroupCount:!0,group:[G],groupSummary:A.storeLoadOptions.groupSummary,filter:io(B.paths[te],{filter:A.storeLoadOptions.filter,group:W}),select:A.storeLoadOptions.select};te===0&&(N.skip=B.skip||0),te===B.paths.length-1&&(N.take=B.take);var Y=N.take===0?[]:b._dataSource.loadFromStore(N);De(Y).done(function(x){var z=B.items[te];o(A,B,U,te),z.items=x}),j.push(Y)}),De.apply(null,j).done(function(){n(b,A,H,D+1),u(b,A,D+1,B,U+1,H)})}(c,h,p,f,m,g)):p.paths.length&&h.storeLoadOptions.group?(l(h),function(b,A,B,D){var U=[],H=A.group||[];V(B.paths,function(te,N){U.push(io(N,{group:A.isCustomLoading?A.storeLoadOptions.group:H}))});var W=A.storeLoadOptions.filter;A.storeLoadOptions.isLoadingAll||(W=Oe.combineFilters([W,Oe.combineFilters(U,"or")]));var G=k({},A.storeLoadOptions,{requireTotalCount:!1,requireGroupCount:!1,group:null,sort:H.concat(Oe.normalizeSortingInfo(A.storeLoadOptions.sort||[])),filter:W}),j=b._dataSource.isLastLevelGroupItemsPagingLocal();j||(G.skip=B.skip,G.take=B.take),De(B.take===0?[]:b._dataSource.loadFromStore(G)).done(function(te,N){j&&(te=b._dataSource.sortLastLevelGroupItems(te,H,B.paths),te=B.skip?te.slice(B.skip):te,te=B.take?te.slice(0,B.take):te),V(B.items,function(Y,x){var z=x.count-(Y===0&&B.skip||0),ie=te.splice(0,z);o(A,B,H.length-1,Y),x.items=ie}),A.data.resolve(D)}).fail(A.data.reject)}(c,h,p,g)):s(h.data)&&h.data.resolve(g)}var d=function(c,h){var f=new se,p=!!(h.group&&h.group.length),m=k({skip:0,take:1,requireGroupCount:p,requireTotalCount:!p},h,{group:p?h.group:null});return c.load(m).done(function(g,C){var b=C&&(p?C.groupCount:C.totalCount);if(!isFinite(b)){f.reject(oi.Error(p?"E4022":"E4021"));return}f.resolve(b)}).fail(f.reject.bind(f)),f};return{updateTotalItemsCount:function(c){var h=0,f=c.extra&&c.extra.totalCount||0,p=c.extra&&c.extra.groupCount||0,m=this._dataSource.pageSize(),g=this._isVirtualPaging();e(this,function(C){C.childrenTotalCount=0}),e(this,function(C,b){var A=a(b,g?0:m,h),B=C.count+C.childrenTotalCount;g||(B+=Jp(A,m,B,b.length-1)),b[b.length-2]?b[b.length-2].childrenTotalCount+=B:h+=B}),this.callBase(h-f+p)},_isGroupExpanded:function(c){var h=this._dataSource.group();return r(h,c)},_updatePagingOptions:function(c,h){var f=this._isVirtualPaging(),p=this._dataSource.pageSize(),m=[],g=[],C=0,b=0;c.take&&(e(this,function(A){A.childrenTotalCount=0,A.skipChildrenTotalCount=0}),e(this,function(A,B){var D,U=0,H=0,W=a(B,f?0:p,b),G=0,j=0,te=A.count+A.childrenTotalCount,N=te;h&&h(A,W);var Y=c.skip-W;W<=c.skip+c.take&&te&&(D=c.take,f||(G=Jp(W,p,te,B.length-1),te+=G*B.length,N+=G,p&&Y>=0&&(U=B.length,H=B.length-1,j=Math.floor(Y/p))),Y>=0?(W+te>c.skip&&m.unshift(Y-j*U-A.skipChildrenTotalCount),W+te>=c.skip+D&&g.unshift(D-U-A.childrenTotalCount+A.skipChildrenTotalCount)):W+te>=c.skip+D&&g.unshift(D+Y-A.childrenTotalCount)),W<=c.skip&&(B[B.length-2]?B[B.length-2].skipChildrenTotalCount+=Math.min(N,Y+1-j*H):C+=Math.min(N,Y+1)),W<=c.skip+D&&(te=Math.min(N,Y+D-(j+1)*H),B[B.length-2]?B[B.length-2].childrenTotalCount+=te:b+=te)}),c.skip-=C,c.take-=b-C),c.skips=m,c.takes=g},changeRowExpand:function(c){var h=this.findGroupInfo(c),f=this._dataSource,p=f.remoteOperations().groupPaging,m=Oe.normalizeSortingInfo(f.group());return h?(h.isExpanded=!h.isExpanded,p&&h.isExpanded&&c.length<m.length?d(f,{filter:io(c,{filter:f.lastLoadOptions().filter,group:f.group()}),group:[m[c.length]],select:f.select()}).done(function(g){h.count=g}):new se().resolve()):new se().reject()},handleDataLoading:function(c){var h=c.storeLoadOptions,f=Oe.normalizeSortingInfo(h.group||c.loadOptions.group);if(!(c.isCustomLoading||!f.length)){if(c.remoteOperations.grouping){var p=this._dataSource.remoteOperations().paging;h.group=Oe.normalizeSortingInfo(h.group),h.group.forEach(function(m,g){var C=g===h.group.length-1;m.isExpanded=!p||!C})}c.group=c.group||f,c.remoteOperations.paging?(c.skip=h.skip,c.take=h.take,h.requireGroupCount=!0,h.group=f.slice(0,1),this._updatePagingOptions(c),h.skip=c.skip,h.take=c.take):(c.skip=c.loadOptions.skip,c.take=c.loadOptions.take,this._updatePagingOptions(c))}},handleDataLoadedCore:function(c,h){var f=Oe.normalizeSortingInfo(c.storeLoadOptions.group||c.loadOptions.group).length,p=c.group?c.group.length:0,m,g={};if(c.isCustomLoading)h(c),t(this,c.data,f,g,[],c.isCustomLoading,c.storeLoadOptions.isLoadingAll);else{if(c.remoteOperations.paging||this.foreachGroups(function(C){C.count=0}),m=n(this,c,c.data,f),m<0){c.data=new se().reject(Qe.Error("E1037"));return}if(c.remoteOperations.paging||f&&c.extra&&c.loadOptions.requireTotalCount&&(c.extra.totalCount=m,c.extra.groupCount=c.data.length),p&&c.storeLoadOptions.requireGroupCount&&!isFinite(c.extra.groupCount)){c.data=new se().reject(oi.Error("E4022"));return}this.updateTotalItemsCount(c),c.remoteOperations.paging||this._updatePagingOptions(c),h(c),c.remoteOperations.paging||this._processPaging(c,f)}u(this,c,f,g,0,c.data)},_processSkips:function(c,h,f){if(f){var p=c[0],m=h[0],g=p&&p.items;m!==void 0&&(p.isContinuation=!0,g&&(p.items=g.slice(m),this._processSkips(p.items,h.slice(1),f-1)))}},_processTakes:function(c,h,f,p,m){if(!(!p||!c)){m=m||[];var g=c[c.length-1],C=g&&g.items,b=f[0],A=h[0];if(g){var B=g.count-(g.isContinuation&&A||0)||C.length;b!==void 0&&B>b&&(g.isContinuationOnNextPage=!0,m.forEach(function(D){D.isContinuationOnNextPage=!0}),C&&(C=C.slice(0,b),g.items=C)),m.push(g),this._processTakes(C,h.slice(1),f.slice(1),p-1,m)}}},_processPaging:function(c,h){this._processSkips(c.data,c.skips,h),this._processTakes(c.data,c.skips,c.takes,h)},isLastLevelGroupItemsPagingLocal:function(){return!1},sortLastLevelGroupItems:function(c){return c},refresh:function(c,h){var f=this,p=f._dataSource,m=c.storeLoadOptions,g=c.group||c.storeLoadOptions.group,C=Oe.normalizeSortingInfo(f._group),b,A;function B(D,U){U.length===A+1&&(D.isExpanded=b)}for(A=0;A<C.length;A++)b=r(g,A),r(f._group,A)!==b&&f.foreachGroups(B);if(f.callBase.apply(this,arguments),g&&c.remoteOperations.paging&&h.reload)return e(f,function(D){var U=d(p,{filter:io(D.path,{filter:m.filter,group:g}),group:g.slice(D.path.length),select:m.select}),H=d(p,{filter:cR(D.path,{filter:m.filter,group:g},!0),group:g.slice(D.path.length-1,D.path.length),select:m.select});return De(H,U).done(function(W,G){W=parseInt(W.length?W[0]:W),G=parseInt(G.length?G[0]:G),D.offset=W,D.count!==G&&(D.count=G,f.updateTotalItemsCount(c))})},!0)}}}()),Qp="dx-datagrid-group-panel",m7="dx-group-panel-message",qd="dx-group-panel-item",g7="dx-toolbar-label",C7="dx-datagrid-expand",y7="dx-group-row",x7=".dx-header-filter",b7={init:function(){this.callBase.apply(this,arguments),this._initGroupingHelper()},_initGroupingHelper:function(e){var t=this._grouping,i=this.option("grouping.autoExpandAll"),n=this.option("focusedRowEnabled"),r=e?e.remoteOperations:this.remoteOperations(),a=r.filtering&&r.sorting&&r.paging;a&&!r.grouping&&(i||!n)?(!t||t instanceof Xb)&&(this._grouping=new Yb(this)):(!t||t instanceof Yb)&&(this._grouping=new Xb(this))},totalItemsCount:function(){var e=this.callBase();return e>0&&this._dataSource.group()&&this._dataSource.requireTotalCount()?e+this._grouping.totalCountCorrection():e},itemsCount:function(){return this._dataSource.group()?this._grouping.itemsCount()||0:this.callBase.apply(this,arguments)},allowCollapseAll:function(){return this._grouping.allowCollapseAll()},isGroupItemCountable:function(e){return this._grouping.isGroupItemCountable(e)},isRowExpanded:function(e){var t=this._grouping.findGroupInfo(e);return t?t.isExpanded:!this._grouping.allowCollapseAll()},collapseAll:function(e){return this._collapseExpandAll(e,!1)},expandAll:function(e){return this._collapseExpandAll(e,!0)},_collapseExpandAll:function(e,t){var i=this._dataSource,n=i.group(),r=Oe.normalizeSortingInfo(n||[]);if(r.length){for(var a=0;a<r.length;a++)e===void 0||e===a?r[a].isExpanded=t:n&&n[a]&&(r[a].isExpanded=n[a].isExpanded);i.group(r),this._grouping.foreachGroups(function(o,s){(e===void 0||e===s.length-1)&&(o.isExpanded=t)},!1,!0),this.resetPagesCache()}return!0},refresh:function(){return this.callBase.apply(this,arguments),this._grouping.refresh.apply(this._grouping,arguments)},changeRowExpand:function(e){var t=this._dataSource;if(t.group())return t.beginLoading(),this._lastLoadOptions&&(this._lastLoadOptions.groupExpand=!0),this._changeRowExpandCore(e).always(function(){t.endLoading()})},_changeRowExpandCore:function(e){return this._grouping.changeRowExpand(e)},_hasGroupLevelsExpandState:function(e,t){if(e&&Array.isArray(e)){for(var i=0;i<e.length;i++)if(e[i].isExpanded===t)return!0}},_customizeRemoteOperations:function(e,t){var i=e.remoteOperations;e.storeLoadOptions.group?(i.grouping&&!e.isCustomLoading&&(!i.groupPaging||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!0))&&(i.paging=!1),!i.grouping&&(!i.sorting||!i.filtering||e.isCustomLoading||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!1))&&(i.paging=!1)):!e.isCustomLoading&&i.paging&&t.grouping&&this.resetCache(),this.callBase.apply(this,arguments)},_handleDataLoading:function(e){return this.callBase(e),this._initGroupingHelper(e),this._grouping.handleDataLoading(e)},_handleDataLoaded:function(e){return this._grouping.handleDataLoaded(e,this.callBase.bind(this))},_handleDataLoadedCore:function(e){return this._grouping.handleDataLoadedCore(e,this.callBase.bind(this))}};Xu.extend(b7);var S7={init:function(){this.callBase(),this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed")},_beforeProcessItems:function(e){var t=this._columnsController.getGroupColumns();return e=this.callBase(e),e.length&&t.length&&(e=this._processGroupItems(e,t.length)),e},_processItem:function(e,t){return E(e.groupIndex)&&Ve(e.rowType)&&e.rowType.indexOf("group")===0?(e=this._processGroupItem(e,t),t.dataIndex=0):e=this.callBase.apply(this,arguments),e},_processGroupItem:function(e){return e},_processGroupItems:function(e,t,i){var n=this._columnsController.getGroupColumns(),r=n[n.length-t];if(!i){var a=this.option("scrolling.mode");i={collectContinuationItems:a!=="virtual"&&a!=="infinite",resultItems:[],path:[],values:[]}}var o=i.resultItems;if(i.data&&(i.collectContinuationItems||!i.data.isContinuation)&&o.push({rowType:"group",data:i.data,groupIndex:i.path.length-1,isExpanded:!!i.data.items,key:i.path.slice(0),values:i.values.slice(0)}),e)if(t===0)o.push.apply(o,e);else for(var s=0;s<e.length;s++){var l=e[s];l&&"items"in l?(i.data=l,i.path.push(l.key),i.values.push(r&&r.deserializeValue&&!r.calculateDisplayValue?r.deserializeValue(l.key):l.key),this._processGroupItems(l.items,t-1,i),i.data=void 0,i.path.pop(),i.values.pop()):o.push(l)}return o},publicMethods:function(){return this.callBase().concat(["collapseAll","expandAll","isRowExpanded","expandRow","collapseRow"])},collapseAll:function(e){var t=this._dataSource;t&&t.collapseAll(e)&&(t.pageIndex(0),t.reload())},expandAll:function(e){var t=this._dataSource;t&&t.expandAll(e)&&(t.pageIndex(0),t.reload())},changeRowExpand:function(e){var t=this,i=t.isRowExpanded(e),n={key:e,expanded:i};return t.executeAction(i?"onRowCollapsing":"onRowExpanding",n),n.cancel?new se().resolve():De(t._changeRowExpandCore(e)).done(function(){n.expanded=!i,t.executeAction(i?"onRowCollapsed":"onRowExpanded",n)})},_changeRowExpandCore:function(e){var t=this,i=this._dataSource,n=new se;return i?De(i.changeRowExpand(e)).done(function(){t.load().done(n.resolve).fail(n.reject)}).fail(n.reject):n.resolve(),n},isRowExpanded:function(e){var t=this._dataSource;return t&&t.isRowExpanded(e)},expandRow:function(e){return this.isRowExpanded(e)?new se().resolve():this.changeRowExpand(e)},collapseRow:function(e){return this.isRowExpanded(e)?this.changeRowExpand(e):new se().resolve()},optionChanged:function(e){e.name==="grouping"&&(e.name="dataSource"),this.callBase(e)}},wC=function(e,t){var i=this._columnsController;switch(t.itemData.value){case"group":var n=i._dataSource.group()||[];i.columnOption(e.dataField,"groupIndex",n.length);break;case"ungroup":i.columnOption(e.dataField,"groupIndex",-1);break;case"ungroupAll":this.component.clearGrouping()}},E7={_getToolbarItems:function(){var e=this.callBase();return this._appendGroupingItem(e)},_appendGroupingItem:function(e){if(this._isGroupPanelVisible()){var t=!1,i={template:()=>{var n=v("<div>").addClass(Qp);return this._updateGroupPanelContent(n),nu("groupPanel",this,n,void 0,this._handleActionKeyDown.bind(this)),n},name:"groupPanel",onItemRendered:()=>{t&&this.renderCompleted.fire(),t=!0},location:"before",locateInMenu:"never",sortIndex:1};e.push(i)}return e},_handleActionKeyDown:function(e){var t=e.event,i=v(t.target),n=i.closest(".".concat(qd)).index(),r=this._columnsController.getGroupColumns()[n],a=r&&r.index;i.is(x7)?this.getController("headerFilter").showHeaderFilterMenu(a,!0):this._processGroupItemAction(a),t.preventDefault()},_isGroupPanelVisible:function(){var e=this.option("groupPanel"),t;return e&&(t=e.visible,t==="auto"&&(t=Re.current().deviceType==="desktop")),t},_renderGroupPanelItems:function(e,t){var i=this;e.empty(),V(t,function(n,r){i._createGroupPanelItem(e,r)}),zg(this)},_createGroupPanelItem:function(e,t){var i=v("<div>").addClass(t.cssClass).addClass(qd).data("columnData",t).appendTo(e).text(t.caption);return hz(this,i),i},_columnOptionChanged:function(e){if(!this._requireReady&&!Oe.checkChanges(e.optionNames,["width","visibleWidth"])){var t=this.element(),i=t&&t.find("."+Qp);i&&i.length&&(this._updateGroupPanelContent(i),this.renderCompleted.fire())}this.callBase()},_updateGroupPanelContent:function(e){var t=this.getController("columns").getGroupColumns(),i=this.option("groupPanel");this._renderGroupPanelItems(e,t),i.allowColumnDragging&&!t.length&&(v("<div>").addClass(m7).text(i.emptyPanelText).appendTo(e),e.closest("."+g7).css("maxWidth","none"),this.updateToolbarDimensions())},allowDragging:function(e){var t=this.option("groupPanel");return this._isGroupPanelVisible()&&t.allowColumnDragging&&e&&e.allowGrouping},getColumnElements:function(){var e=this.element();return e&&e.find("."+qd)},getColumns:function(){return this.getController("columns").getGroupColumns()},getBoundingRect:function(){var e=this.element();if(e&&e.find("."+Qp).length){var t=e.offset();return{top:t.top,bottom:t.top+Ke(e)}}return null},getName:function(){return"group"},getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i=v(e.targetElement).closest("."+qd),n;if(i.length&&(e.column=i.data("columnData")),t&&e.column){var r=e.column,a=E(r.allowGrouping)?r.allowGrouping:!0;if(a){var o=E(r.groupIndex)&&r.groupIndex>-1,s=this.option("grouping.texts"),l=wC.bind(this,r);n=[{text:s.ungroup,value:"ungroup",disabled:!o,onItemClick:l},{text:s.ungroupAll,value:"ungroupAll",onItemClick:l}]}}return n},isVisible:function(){return this.callBase()||this._isGroupPanelVisible()},optionChanged:function(e){e.name==="groupPanel"?(this._invalidate(),e.handled=!0):this.callBase(e)}},w7={getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i;if(t&&e.row&&e.row.rowType==="group"){var n=this._columnsController,r=n.columnOption("groupIndex:"+e.row.groupIndex);if(r&&r.allowGrouping){var a=this.option("grouping.texts"),o=wC.bind(this,r);i=[],i.push({text:a.ungroup,value:"ungroup",onItemClick:o},{text:a.ungroupAll,value:"ungroupAll",onItemClick:o})}}return i},_rowClick:function(e){var t=this.option("grouping.expandMode"),i=this.option("scrolling.mode"),n=i!=="infinite"&&t==="rowClick"&&v(e.event.target).closest("."+y7).length,r=v(e.event.target).closest("."+C7).length;(n||r)&&this._changeGroupRowState(e),this.callBase(e)},_changeGroupRowState:function(e){var t=this.getController("data"),i=t.items()[e.rowIndex],n=this._columnsController.columnOption("groupIndex:"+i.groupIndex,"allowCollapsing");(i.rowType==="data"||i.rowType==="group"&&n!==!1)&&(t.changeRowExpand(i.key,!0),e.event.preventDefault(),e.handled=!0)}},I7={getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i=this.callBase(e);if(t&&e.row&&(e.row.rowType==="header"||e.row.rowType==="detailAdaptive")){var n=e.column;if(!n.command&&(!E(n.allowGrouping)||n.allowGrouping)){var r=this.option("grouping.texts"),a=E(n.groupIndex)&&n.groupIndex>-1,o=wC.bind(this,n);i=i||[],i.push({text:r.groupByThisColumn,value:"group",beginGroup:!0,disabled:a,onItemClick:o}),n.showWhenGrouped&&i.push({text:r.ungroup,value:"ungroup",disabled:!a,onItemClick:o}),i.push({text:r.ungroupAll,value:"ungroupAll",onItemClick:o})}}return i}};Oe.registerModule("grouping",{defaultOptions:function(){return{grouping:{autoExpandAll:!0,allowCollapsing:!0,contextMenuEnabled:!1,expandMode:"buttonClick",texts:{groupContinuesMessage:fe.format("dxDataGrid-groupContinuesMessage"),groupContinuedMessage:fe.format("dxDataGrid-groupContinuedMessage"),groupByThisColumn:fe.format("dxDataGrid-groupHeaderText"),ungroup:fe.format("dxDataGrid-ungroupHeaderText"),ungroupAll:fe.format("dxDataGrid-ungroupAllText")}},groupPanel:{visible:!1,emptyPanelText:fe.format("dxDataGrid-groupPanelEmptyText"),allowColumnDragging:!0}}},extenders:{controllers:{data:S7,columns:{_getExpandColumnOptions:function(){var e=this.callBase.apply(this,arguments);return e.cellTemplate=Oe.getExpandCellTemplate(),e}},editing:{_isProcessedItem:function(e){return E(e.groupIndex)&&Ve(e.rowType)&&e.rowType.indexOf("group")===0}}},views:{headerPanel:E7,rowsView:w7,columnHeadersView:I7}}});var T7="dx-master-detail-cell",Zb="dx-master-detail-row",A7="dx-cell-focus-disabled",D7="dx-row-lines",O7={defaultOptions:function(){return{masterDetail:{enabled:!1,autoExpandAll:!1,template:null}}},extenders:{controllers:{columns:{_getExpandColumnsCore:function(){var e=this.callBase();return this.option("masterDetail.enabled")&&e.push({type:"detailExpand",cellTemplate:be.getExpandCellTemplate()}),e}},data:function(){var e=function(t){t._expandedItems=[],t._isExpandAll=t.option("masterDetail.autoExpandAll")};return{init:function(){e(this),this.callBase()},expandAll:function(t){var i=this;t<0?(i._isExpandAll=!0,i._expandedItems=[],i.updateItems()):i.callBase.apply(i,arguments)},collapseAll:function(t){var i=this;t<0?(i._isExpandAll=!1,i._expandedItems=[],i.updateItems()):i.callBase.apply(i,arguments)},isRowExpanded:function(t){var i=this,n=be.getIndexByKey(t,i._expandedItems);return Array.isArray(t)?i.callBase.apply(i,arguments):!!(i._isExpandAll^(n>=0&&i._expandedItems[n].visible))},_getRowIndicesForExpand:function(t){var i=this.getRowIndexByKey(t);return[i,i+1]},_changeRowExpandCore:function(t){var i=this,n;if(Array.isArray(t))n=i.callBase.apply(i,arguments);else{var r=be.getIndexByKey(t,i._expandedItems);if(r>=0){var a=i._expandedItems[r].visible;i._expandedItems[r].visible=!a}else i._expandedItems.push({key:t,visible:!0});i.updateItems({changeType:"update",rowIndices:i._getRowIndicesForExpand(t)}),n=new se().resolve()}return n},_processDataItem:function(t,i){var n=this,r=n.callBase.apply(n,arguments);return r.isExpanded=n.isRowExpanded(r.key),i.detailColumnIndex===void 0&&(i.detailColumnIndex=-1,V(i.visibleColumns,function(a,o){if(o.command==="expand"&&!E(o.groupIndex))return i.detailColumnIndex=a,!1})),i.detailColumnIndex>=0&&(r.values[i.detailColumnIndex]=r.isExpanded),r},_processItems:function(t,i){var n=this,r=i.changeType,a=[];return t=n.callBase.apply(n,arguments),r==="loadingAll"?t:(r==="refresh"&&(n._expandedItems=zi(n._expandedItems,function(o){return o.visible})),V(t,function(o,s){a.push(s);var l=be.getIndexByKey(s.key,n._expandedItems);s.rowType==="data"&&(s.isExpanded||l>=0)&&!s.isNewRow&&a.push({visible:s.isExpanded,rowType:"detail",key:s.key,data:s.data,values:[]})}),a)},optionChanged:function(t){var i,n;if(t.name==="masterDetail"){switch(t.name="dataSource",t.fullName){case"masterDetail":var r=t.value||{},a=t.previousValue||{};i=r.enabled!==a.enabled,n=r.autoExpandAll!==a.autoExpandAll;break;case"masterDetail.template":e(this);break;case"masterDetail.enabled":i=!0;break;case"masterDetail.autoExpandAll":n=!0}(i||n)&&e(this)}this.callBase(t)}}}(),resizing:{fireContentReadyAction:function(){this.callBase.apply(this,arguments),this._updateParentDataGrids(this.component.$element())},_updateParentDataGrids:function(e){var t=e.closest("."+Zb);t.length&&De(this._updateMasterDataGrid(t,e)).done(()=>{this._updateParentDataGrids(t.parent())})},_updateMasterDataGrid:function(e,t){var i=v(e).data("options"),n=v(e).closest("."+this.getWidgetContainerClass()).parent().data("dxDataGrid");if(i&&n){if(n.getView("rowsView").isFixedColumns())return this._updateFixedMasterDetailGrids(n,i.rowIndex,t);if(n.option("scrolling.useNative")===!0)return n.updateDimensions();var r=n.getScrollable();return r==null?void 0:r.update()}},_updateFixedMasterDetailGrids:function(e,t,i){var n=v(e.getRowElement(t)),r=v(e.getView("rowsView").getTableElements()),a=(n==null?void 0:n.length)===2&&Ke(n.eq(0))!==Ke(n.eq(1)),o=(r==null?void 0:r.length)===2&&Ke(r.eq(0))!==Ke(r.eq(1));if(a||o){var s=He(i);return e.updateDimensions().done(()=>{var l=this.option("columnAutoWidth")&&e.option("scrolling.useNative")===!0,u=l&&s!==He(i);l&&u&&this.updateDimensions()})}},_toggleBestFitMode:function(e){if(this.callBase.apply(this,arguments),this.option("masterDetail.template")){var t=this._rowsView.getTableElement();t&&t.find(".dx-master-detail-cell").css("maxWidth",e?0:"")}}}},views:{rowsView:{_getCellTemplate:function(e){var t=this,i=e.column,n=t.getController("editing"),r=n&&n.isEditRow(e.rowIndex),a;return i.command==="detail"&&!r?a=t.option("masterDetail.template")||{allowRenderToDetachedContainer:!1,render:t._getDefaultTemplate(i)}:a=t.callBase.apply(t,arguments),a},_isDetailRow:function(e){return e&&e.rowType&&e.rowType.indexOf("detail")===0},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&this._isDetailRow(e)&&(this.option("showRowLines")&&t.addClass(D7),t.addClass(Zb),E(e.visible)&&t.toggle(e.visible)),t},_renderCells:function(e,t){var i=t.row,n,r=this._columnsController.getVisibleColumns();i.rowType&&this._isDetailRow(i)?this._needRenderCell(0,t.columnIndices)&&(n=this._renderCell(e,{value:null,row:i,rowIndex:i.rowIndex,column:{command:"detail"},columnIndex:0}),n.addClass(A7).addClass(T7).attr("colSpan",r.length)):this.callBase.apply(this,arguments)}}}}};Oe.registerModule("masterDetail",O7);var Fc=function(e){for(var t=0,i=0,n=0;n<e.length;++n)if(e[n]==="'"&&t++,e[n]==="."&&(++i,t%2===0))return{occurrence:i,index:n};return{occurrence:1,index:-1}},um=function(e,t,i){for(var n=-1;i--&&n++<e.length;)n=e.indexOf(t,n);return n},dm=function(e,t){return t===-1?[e]:[e.slice(0,t),e.slice(t+1)]},R7=function(e,t){return e&&eA(e/100,t)},yh=function(e,t){if(typeof t=="string"){var i=t.split(";"),n=St.getSign(e,t);i[1]=i[1]||"-"+i[0],t=i[n<0?1:0],t=(o=t,o.replace(/'([^']*)'/g,s=>s.split("").map(()=>" ").join("").substr(2)));var r=/^[^#0.,]*/.exec(t)[0].length,a=/[^#0.,]*$/.exec(t)[0].length;return{start:r,end:e.length-a}}else return{start:0,end:e.length};var o},Jb=function(e,t){var i=St.getDecimalSeparator(),n=new RegExp("[^0-9"+Fr(i)+"]","g"),r=t.slice(0,e);return r.replace(n,"").length},Qb=function(e){return e.split("").reverse().join("")},eS=function(e,t){if(!e)return-1;for(var i=/[0-9]/g,n=1,r=null,a=i.exec(t);a;){if(r=a.index,n>=e)return r;n++,a=i.exec(t)}return r===null?t.length:r},k7=function(e){return e.replace(/[^0-9e]+$/,"")},no=function(e,t){return e.start===void 0&&(e={start:e,end:e}),{start:e.start+t,end:e.end+t}},B7=function(e,t,i,n){i=no(i,0);var r=St.getDecimalSeparator(),a=L7(e),o=Fc(n).occurrence,s=a?0:um(e,r,o),l=um(t,r,o),u=dm(e,s),d=dm(t,l),c=s!==-1&&i.start>s;if(c){var h=i.start-s-1,f=Jb(h,u[1]),p=d[1]?l+1+eS(f,d[1])+1:t.length;return fa(p,t,n)}else{var m=k7(d[0]),g=u[0].length-i.start,C=Jb(g,Qb(u[0])),b=eS(C,Qb(m)),A=m.length-(b+1);return fa(A,t,n)}};function L7(e){return e.length===1&&!!e.match(/^[,.][0-9]*$/g)}var P7=function(e,t,i){e=no(e,0);var n=fa(e,t,i);return e.start>=n.start&&e.end<=n.end};function fa(e,t,i){e=no(e,0);var n=yh(t,i),r={start:ki(e.start,n.start,n.end),end:ki(e.end,n.start,n.end)};return r}var F7=function(e,t,i){var n=yh(e,i),r=yh(t,i);return r.start-n.start},M7="dx-numberbox-spin",V7="dx-numberbox-spin-button",N7=100,fR="dxNumberBox",tS=ye(lt.up,fR),iS=ye(lt.cancel,fR),ss=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{direction:"up",onChange:null,activeStateEnabled:!0,hoverStateEnabled:!0})},_initMarkup:function(){this.callBase();var e=M7+"-"+this.option("direction");this.$element().addClass(V7).addClass(e),this._spinIcon=v("<div>").addClass(e+"-icon").appendTo(this.$element())},_render:function(){this.callBase();var e=ye(lt.down,this.NAME),t=this.$element();R.off(t,e),R.on(t,e,this._spinDownHandler.bind(this)),this._spinChangeHandler=this._createActionByOption("onChange")},_spinDownHandler:function(e){e.preventDefault(),this._clearTimer(),R.on(this.$element(),Ea.name,(function(){this._feedBackDeferred=new se,ZN(this._feedBackDeferred),this._spinChangeHandler({event:e}),this._holdTimer=setInterval(this._spinChangeHandler,N7,{event:e})}).bind(this));var t=me.getDocument();R.on(t,tS,this._clearTimer.bind(this)),R.on(t,iS,this._clearTimer.bind(this)),this._spinChangeHandler({event:e})},_dispose:function(){this._clearTimer(),this.callBase()},_clearTimer:function(){R.off(this.$element(),Ea.name);var e=me.getDocument();R.off(e,tS),R.off(e,iS),this._feedBackDeferred&&this._feedBackDeferred.resolve(),this._holdTimer&&clearInterval(this._holdTimer)},_optionChanged:function(e){switch(e.name){case"onChange":case"direction":this._invalidate();break;default:this.callBase(e)}}}),$7="dx-numberbox-spin",H7="dx-numberbox-spin-container",W7="dx-numberbox-spin-touch-friendly";class z7 extends Zh{_attachEvents(t,i){var{editor:n}=this,r=ye(lt.down,n.NAME),a=i.children(),o=n._createAction(s=>n._spinButtonsPointerDownHandler(s));R.off(i,r),R.on(i,r,s=>o({event:s})),ss.getInstance(a.eq(0)).option("onChange",s=>n._spinUpChangeHandler(s)),ss.getInstance(a.eq(1)).option("onChange",s=>n._spinDownChangeHandler(s))}_create(){var{editor:t}=this,i=v("<div>").addClass(H7),n=v("<div>").appendTo(i),r=v("<div>").appendTo(i),a=this._getOptions();return this._addToContainer(i),t._createComponent(n,ss,k({direction:"up"},a)),t._createComponent(r,ss,k({direction:"down"},a)),this._legacyRender(t.$element(),this._isTouchFriendly(),a.visible),{instance:i,$element:i}}_getOptions(){var{editor:t}=this,i=this._isVisible(),n=t.option("disabled");return{visible:i,disabled:n}}_isVisible(){var{editor:t}=this;return super._isVisible()&&t.option("showSpinButtons")}_isTouchFriendly(){var{editor:t}=this;return t.option("showSpinButtons")&&t.option("useLargeSpinButtons")}_legacyRender(t,i,n){t.toggleClass(W7,i),t.toggleClass($7,n)}update(){var t=super.update();if(t){var{editor:i,instance:n}=this,r=i.$element(),a=this._isVisible(),o=this._isTouchFriendly(),s=n.children(),l=ss.getInstance(s.eq(0)),u=ss.getInstance(s.eq(1)),d=this._getOptions();l.option(d),u.option(d),this._legacyRender(r,o,a)}}}var G7=Math,U7="dx-numberbox",K7=["tab","del","backspace","leftArrow","rightArrow","home","end","enter"],j7="NumberBoxForceValueChange",q7=uC.inherit({_supportedKeys:function(){return k(this.callBase(),{upArrow:function(e){vi(e)||(e.preventDefault(),e.stopPropagation(),this._spinUpChangeHandler(e))},downArrow:function(e){vi(e)||(e.preventDefault(),e.stopPropagation(),this._spinDownChangeHandler(e))},enter:function(){}})},_getDefaultOptions:function(){return k(this.callBase(),{value:0,min:void 0,max:void 0,step:1,showSpinButtons:!1,useLargeSpinButtons:!0,mode:"text",invalidValueMessage:fe.format("dxNumberBox-invalidValueMessage"),buttons:void 0})},_useTemplates:function(){return!1},_getDefaultButtons:function(){return this.callBase().concat([{name:"spins",Ctor:z7}])},_isSupportInputMode:function(){var e=parseFloat(Lt.version);return Lt.chrome&&e>=66||Lt.safari&&e>=12},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().generic&&!Re.isSimulator()},options:{useLargeSpinButtons:!1}},{device:(function(){return Re.real().deviceType!=="desktop"&&!this._isSupportInputMode()}).bind(this),options:{mode:"number"}}])},_initMarkup:function(){this._renderSubmitElement(),this.$element().addClass(U7),this.callBase()},_getDefaultAttributes:function(){var e=this.callBase();return e.inputmode="decimal",e},_renderContentImpl:function(){this.option("isValid")&&this._validateValue(this.option("value")),this.setAria("role","spinbutton")},_renderSubmitElement:function(){this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue:function(e){this._getSubmitElement().val(MI(e))},_getSubmitElement:function(){return this._$submitElement},_keyPressHandler:function(e){this.callBase(e);var t=Qc(e),i=/[\d.,eE\-+]/.test(t);if(!i){var n=$t(e);return vi(e)||n&&K7.includes(n)?void 0:(e.preventDefault(),!1)}this._keyPressed=!0},_onMouseWheel:function(e){e.delta>0?this._spinValueChange(1,e):this._spinValueChange(-1,e)},_renderValue:function(){var e=this._input().val(),t=this.option("value");(!e.length||Number(e)!==t)&&(this._forceValueRender(),this._toggleEmptinessEventHandler());var i=E(t)?null:fe.format("dxNumberBox-noDataText");return this.setAria({valuenow:Mt(t,""),valuetext:i}),this.option("text",this._input().val()),this._updateButtons(),new se().resolve()},_forceValueRender:function(){var e=this.option("value"),t=Number(e),i=isNaN(t)?"":this._applyDisplayValueFormatter(e);this._renderDisplayText(i)},_applyDisplayValueFormatter:function(e){return this.option("displayValueFormatter")(e)},_renderProps:function(){this._input().prop({min:this.option("min"),max:this.option("max"),step:this.option("step")}),this.setAria({valuemin:Mt(this.option("min"),""),valuemax:Mt(this.option("max"),"")})},_spinButtonsPointerDownHandler:function(){var e=this._input();!this.option("useLargeSpinButtons")&&me.getActiveElement()!==e[0]&&R.trigger(e,"focus")},_spinUpChangeHandler:function(e){this.option("readOnly")||this._spinValueChange(1,e.event||e)},_spinDownChangeHandler:function(e){this.option("readOnly")||this._spinValueChange(-1,e.event||e)},_spinValueChange:function(e,t){var i=parseFloat(this.option("step"));if(i!==0){var n=parseFloat(this._normalizeInputValue())||0;n=this._correctRounding(n,i*e);var r=this.option("min"),a=this.option("max");E(r)&&(n=Math.max(r,n)),E(a)&&(n=Math.min(a,n)),this._saveValueChangeEvent(t),this.option("value",n)}},_correctRounding:function(e,t){var i=/[,.](.*)/,n=i.test(e),r=i.test(t);if(n||r){var a=n?i.exec(e)[0].length:0,o=r?i.exec(t)[0].length:0,s=G7.max(a,o);return e=this._round(e+t,s),e}return e+t},_round:function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i,e},_renderValueChangeEvent:function(){this.callBase();var e=ye("focusout",j7);R.off(this.element(),e),R.on(this.element(),e,this._forceRefreshInputValue.bind(this))},_forceRefreshInputValue:function(){if(this.option("mode")!=="number"){var e=this._input(),t=this._applyDisplayValueFormatter(this.option("value"));e.val(null),e.val(t)}},_valueChangeEventHandler:function(e){var t=this._input(),i=this._normalizeText(),n=this._parseValue(i),r=i!=="."&&i!=="-";if(this._isValueValid()&&!this._validateValue(n)){t.val(this._applyDisplayValueFormatter(n));return}r&&this.callBase(e,isNaN(n)?null:n),this._applyValueBoundaries(i,n),this.validationRequest.fire({value:n,editor:this})},_applyValueBoundaries:function(e,t){var i=this._isValueIncomplete(e),n=this._isValueInRange(e);!i&&!n&&t!==null&&Number(e)!==t&&this._input().val(this._applyDisplayValueFormatter(t))},_replaceCommaWithPoint:function(e){return e.replace(",",".")},_inputIsInvalid:function(){var e=this.option("mode")==="number",t=this._input().get(0).validity;return e&&t&&t.badInput},_renderDisplayText:function(e){this._inputIsInvalid()||this.callBase(e)},_isValueIncomplete:function(e){return/(^-$)|(^-?\d*\.$)|(\d+e-?$)/i.test(e)},_isValueInRange:function(e){return Nr(e,this.option("min"),this.option("max"))},_isNumber:function(e){return this._parseValue(e)!==null},_validateValue:function(e){var t=this._normalizeText(),i=this._isValueValid(),n=!0,r=this._isNumber(t);return isNaN(Number(e))&&(n=!1),!e&&i?n=!0:!r&&!i&&(n=!1),this.option({isValid:n,validationError:n?null:{editorSpecific:!0,message:this.option("invalidValueMessage")}}),n},_normalizeInputValue:function(){return this._parseValue(this._normalizeText())},_normalizeText:function(){var e=this._input().val().trim();return this._replaceCommaWithPoint(e)},_parseValue:function(e){var t=parseFloat(e);return isNaN(t)?null:ki(t,this.option("min"),this.option("max"))},_clearValue:function(){this._inputIsInvalid()&&(this._input().val(""),this._validateValue()),this.callBase()},reset:function(){this.option("value")===null?(this.option("text",""),this._renderValue()):this.option("value",null)},_optionChanged:function(e){switch(e.name){case"value":this._validateValue(e.value),this._setSubmitValue(e.value),this.callBase(e),this._resumeValueChangeAction();break;case"step":this._renderProps();break;case"min":case"max":this._renderProps(),this.option("value",this._parseValue(this.option("value")));break;case"showSpinButtons":case"useLargeSpinButtons":this._updateButtons(["spins"]);break;case"invalidValueMessage":break;default:this.callBase(e)}}}),ev="dxNumberFormatter",Yd=1,tv=-1,nS="-",wl="minus",Y7="input",rS=0,xh=q7.inherit({_getDefaultOptions:function(){return k(this.callBase(),{useMaskBehavior:!0,format:null})},_isDeleteKey:function(e){return e==="del"},_supportedKeys:function(){return this._useMaskBehavior()?k(this.callBase(),{minus:this._revertSign.bind(this),del:this._removeHandler.bind(this),backspace:this._removeHandler.bind(this),leftArrow:this._arrowHandler.bind(this,tv),rightArrow:this._arrowHandler.bind(this,Yd),home:this._moveCaretToBoundaryEventHandler.bind(this,Yd),enter:this._updateFormattedValue.bind(this),end:this._moveCaretToBoundaryEventHandler.bind(this,tv)}):this.callBase()},_getTextSeparatorIndex:function(e){var t=St.getDecimalSeparator(),i=Fc(this.option("format")).occurrence;return um(e,t,i)},_focusInHandler:function(e){this._preventNestedFocusEvent(e)||(this.clearCaretTimeout(),this._caretTimeout=setTimeout((function(){this._caretTimeout=void 0;var t=this._caret();if(t.start===t.end&&this._useMaskBehavior()){var i=this._getInputVal(),n=this._getTextSeparatorIndex(i);n>=0?this._caret({start:n,end:n}):this._moveCaretToBoundaryEventHandler(tv,e)}}).bind(this),rS)),this.callBase(e)},_focusOutHandler:function(e){var t=!this._preventNestedFocusEvent(e);t&&(this._focusOutOccurs=!0,this._useMaskBehavior()&&this._updateFormattedValue()),this.callBase(e),t&&(this._focusOutOccurs=!1)},_hasValueBeenChanged(e){var t=this._getFormatPattern(),i=this.option("value"),n=this._format(i,t)||"";return n!==e},_updateFormattedValue:function(){var e=this._getInputVal();this._hasValueBeenChanged(e)&&(this._updateParsedValue(),this._adjustParsedValue(),this._setTextByParsedValue(),this._parsedValue!==this.option("value")&&R.trigger(this._input(),"change"))},_arrowHandler:function(e,t){if(this._useMaskBehavior()){var i=this._getInputVal(),n=this._getFormatPattern(),r=no(this._caret(),e);P7(r,i,n)||(r=e===Yd?r.end:r.start,t.preventDefault(),this._caret(fa(r,i,n)))}},_moveCaretToBoundary:function(e){var t=yh(this._getInputVal(),this._getFormatPattern()),i=no(e===Yd?t.start:t.end,0);this._caret(i)},_moveCaretToBoundaryEventHandler:function(e,t){!this._useMaskBehavior()||t&&t.shiftKey||(this._moveCaretToBoundary(e),t&&t.preventDefault())},_shouldMoveCaret:function(e,t){var i=St.getDecimalSeparator(),n=e.charAt(t.end)===i,r=(this._lastKey===i||this._lastKey===".")&&n;return r},_getInputVal:function(){return St.convertDigits(this._input().val(),!0)},_keyboardHandler:function(e){if(this.clearCaretTimeout(),this._lastKey=St.convertDigits(Qc(e),!0),this._lastKeyName=$t(e),!this._shouldHandleKey(e.originalEvent))return this.callBase(e);var t=this._getInputVal(),i=this._caret(),n=this._lastKeyName===wl?"":this._lastKey,r=this._tryParse(t,i,n);return this._shouldMoveCaret(t,i)&&(this._moveCaret(1),e.originalEvent.preventDefault()),r===void 0?this._lastKeyName!==wl&&e.originalEvent.preventDefault():this._parsedValue=r,this.callBase(e)},_keyPressHandler:function(e){this._useMaskBehavior()||this.callBase(e)},_removeHandler:function(e){var t=this._caret(),i=this._getInputVal(),n=t.start,r=t.end;this._lastKey=Qc(e),this._lastKeyName=$t(e);var a=this._isDeleteKey(this._lastKeyName),o=!a;if(n===r){var s=n,l=o&&s>0||a&&s<i.length;if(l)a&&r++,o&&n--;else{e.preventDefault();return}}var u=i.slice(n,r);if(this._isStub(u)){this._moveCaret(a?1:-1),(this._parsedValue<0||1/this._parsedValue===-1/0)&&(this._revertSign(e),this._setTextByParsedValue()),e.preventDefault();return}var d=St.getDecimalSeparator();if(u===d){var c=i.indexOf(d);this._isNonStubAfter(c+1)&&(this._moveCaret(a?1:-1),e.preventDefault());return}if(r-n<i.length){var h=this._replaceSelectedText(i,{start:n,end:r},""),f=h.search(/[0-9]/)<0;if(f&&this._isValueInRange(0)){this._parsedValue=this._parsedValue<0||1/this._parsedValue===-1/0?-0:0;return}}var p=this._tryParse(i,{start:n,end:r},"");p===void 0?e.preventDefault():this._parsedValue=p},_isPercentFormat:function(){var e=this._getFormatPattern(),t=e.replace(/'[^']+'/g,"");return t.indexOf("%")!==-1},_parse:function(e,t){var i=this.option("format"),n=Ie(i.parser),r=n?i.parser:St.parse,a=0;if(!n){var o=Fc(t).index,s=this._getTextSeparatorIndex(e),l=o!==-1?o:t.length,u=s!==-1?s:e.length;u>l&&t.indexOf("#")===-1&&(a=u-l)}return e=this._removeStubs(e,!0),e=e.substr(a),r(e,t)},_format:function(e,t){var i=this.option("format"),n=(i==null?void 0:i.formatter)||i,r=Ie(n)?n:St.format,a=e===null?"":r(e,t);return a},_getFormatPattern:function(){return this._currentFormat||this._updateFormat(),this._currentFormat},_updateFormat:function(){var e=this.option("format"),t=Ie(e==null?void 0:e.parser),i=Ve(e)&&(e.indexOf("0")>=0||e.indexOf("#")>=0);this._currentFormat=t||i?e:V2(n=>{var r=this._format(n,e);return St.convertDigits(r,!0)})},_getFormatForSign:function(e){var t=this._getFormatPattern();if(Ve(t)){var i=t.split(";"),n=St.getSign(e,t);return i[1]=i[1]||"-"+i[0],n<0?i[1]:i[0]}else{var r=St.getSign(e);return r<0?"-":""}},_removeStubs:function(e,t){var i=this._getFormatForSign(e),n=St.getThousandsSeparator(),r=this._getStubs(i),a=e;if(r.length){var o=r[0],s=new RegExp("("+Fr(r[1]||"")+")$","g"),l=new RegExp("[-"+Fr(t?"":n)+"]","g");a=a.replace(o,"").replace(s,"").replace(l,"")}return a},_getStubs:function(e){var t=/[^']([#0.,]+)/g.exec(e),i=t&&t[0].trim();return e.split(i).map(function(n){return n.replace(/'/g,"")})},_truncateToPrecision:function(e,t){if(E(e)){var i=e.toString(),n=i.indexOf(".");if(i&&n>-1){var r=parseFloat(i.substr(0,n+t+1));return isNaN(r)?e:r}}return e},_tryParse:function(e,t,i){var n=this._replaceSelectedText(e,t,i),r=this._getFormatPattern(),a=t.start!==t.end,o=this._getParsedValue(n,r),s=!r.parser&&this._getPrecisionLimits(n).max,l=o!==this._parsedValue,u=St.getDecimalSeparator(),d=i===u&&s===0,c=!a&&!l&&i!==nS&&!this._isValueIncomplete(n)&&this._isStub(i);if(!(d||c)&&(this._removeStubs(n)===""&&(o=Math.abs(0*this._parsedValue)),!isNaN(o))){var h=o===null?this._parsedValue:o;return o=s?this._truncateToPrecision(h,s):o,!r.parser&&this._isPercentFormat()?R7(o,s):o}},_getParsedValue:function(e,t){var i=St.getSign(e,(t==null?void 0:t.formatter)||t),n=this._parse(e,t),r=n<0?-1:1,a=Et(n)&&i!==r?i*n:n;return a},_isValueIncomplete:function(e){if(!this._useMaskBehavior())return this.callBase(e);var t=this._caret(),i=St.getDecimalSeparator(),n=this._getTextSeparatorIndex(e),r=n>=0&&n<t.start,a=this._removeStubs(e,!0).split(i);if(!r||a.length!==2)return!1;var o=a[1].length,s=this._getFormatPattern(),l=!!s.parser,u=!l&&this._getPrecisionLimits(this._getFormatPattern(),e),d=l?!0:Nr(o,u.min,u.max),c=a[1].charAt(o-1)==="0";return d&&(c||!o)},_isValueInRange:function(e){var t=Mt(this.option("min"),-1/0),i=Mt(this.option("max"),1/0);return Nr(e,t,i)},_setInputText:function(e){var t=St.convertDigits(e,!0),i=B7(this._getInputVal(),t,this._caret(),this._getFormatPattern());this._input().val(e),this._toggleEmptinessEventHandler(),this._formattedValue=e,this._focusOutOccurs||this._caret(i)},_useMaskBehavior:function(){return!!this.option("format")&&this.option("useMaskBehavior")},_renderInputType:function(){var e=this.option("mode")==="number",t=Re.real().deviceType==="desktop";this._useMaskBehavior()&&e?this._setInputType(t||this._isSupportInputMode()?"text":"tel"):this.callBase()},_isChar:function(e){return Ve(e)&&e.length===1},_moveCaret:function(e){if(e){var t=no(this._caret(),e),i=fa(t,this._getInputVal(),this._getFormatPattern());this._caret(i)}},_shouldHandleKey:function(e){var t=$t(e),i=vi(e)||e.altKey||e.shiftKey||!this._isChar(t),n=t===wl,r=this._useMaskBehavior();return r&&!i&&!n},_renderInput:function(){this.callBase(),this._renderFormatter()},_renderFormatter:function(){this._clearCache(),this._detachFormatterEvents(),this._useMaskBehavior()&&this._attachFormatterEvents()},_detachFormatterEvents:function(){R.off(this._input(),"."+ev)},_isInputFromPaste:function(e){var t=e.originalEvent&&e.originalEvent.inputType;return E(t)?t==="insertFromPaste":this._isValuePasted},_attachFormatterEvents:function(){var e=this._input();R.on(e,ye(Y7,ev),(function(t){this._formatValue(t),this._isValuePasted=!1}).bind(this)),R.on(e,ye("dxclick",ev),(function(){this._caretTimeout||(this._caretTimeout=setTimeout((function(){this._caretTimeout=void 0,this._caret(fa(this._caret(),this._getInputVal(),this._getFormatPattern()))}).bind(this),rS))}).bind(this)),R.on(e,"dxdblclick",(function(){this.clearCaretTimeout()}).bind(this))},clearCaretTimeout:function(){clearTimeout(this._caretTimeout),this._caretTimeout=void 0},_forceRefreshInputValue:function(){if(!this._useMaskBehavior())return this.callBase()},_isNonStubAfter:function(e){var t=this._getInputVal().slice(e);return t&&!this._isStub(t,!0)},_isStub:function(e,t){var i=Fr(St.getDecimalSeparator()),n="^[^0-9"+i+"]+$",r=new RegExp(n,"g");return r.test(e)&&(t||this._isChar(e))},_parseValue:function(e){return this._useMaskBehavior()?this._parsedValue:this.callBase(e)},_getPrecisionLimits:function(e){var t=this._getFormatForSign(e),i=Fc(t).index,n=(dm(t,i)[1]||"").replace(/[^#0]/g,""),r=n.replace(/^(0*)#*/,"$1").length,a=n.length;return{min:r,max:a}},_revertSign:function(e){if(this._useMaskBehavior()){var t=this._caret();if(t.start!==t.end)if($t(e)===wl){this._applyRevertedSign(e,t,!0);return}else this._caret(fa(0,this._getInputVal(),this._getFormatPattern()));this._applyRevertedSign(e,t)}},_applyRevertedSign:function(e,t,i){var n=-1*Mt(this._parsedValue,null);if(this._isValueInRange(n)&&(this._parsedValue=n,i)){var r=this._getFormatPattern(),a=this._getInputVal();this._setTextByParsedValue(),e.preventDefault();var o=this._getInputVal(),s=F7(a,o,r);t=no(t,s);var l=fa(t,o,r);this._caret(l)}},_removeMinusFromText:function(e,t){var i=this._lastKeyName===wl&&e.charAt(t.start-1)===nS;return i?this._replaceSelectedText(e,{start:t.start-1,end:t.start},""):e},_setTextByParsedValue:function(){var e=this._getFormatPattern(),t=this._parseValue(),i=this._format(t,e)||"";this._setInputText(i)},_formatValue:function(e){var t=this._getInputVal(),i=this._caret(),n=this._removeMinusFromText(t,i),r=n!==t;if(t=n,!this._isInputFromPaste(e)&&this._isValueIncomplete(n)){this._formattedValue=t,r&&this._setTextByParsedValue();return}var a=St.convertDigits(this._formattedValue,!0)!==t;if(a){var o=this._tryParse(t,i,"");E(o)&&(this._parsedValue=o)}this._setTextByParsedValue()},_renderDisplayText:function(){this._useMaskBehavior()?this._toggleEmptinessEventHandler():this.callBase.apply(this,arguments)},_renderValue:function(){return this._useMaskBehavior()&&(this._parsedValue=this.option("value"),this._setTextByParsedValue()),this.callBase()},_updateParsedValue:function(){var e=this._getInputVal();this._parsedValue=this._tryParse(e,this._caret())},_adjustParsedValue:function(){if(this._useMaskBehavior()){var e=this._removeStubs(this._getInputVal()),t=e?this._parseValue():null;if(!Et(t)){this._parsedValue=t;return}this._parsedValue=ki(t,this.option("min"),this.option("max"))}},_valueChangeEventHandler:function(e){if(!this._useMaskBehavior())return this.callBase(e);var t=this._caret();this._saveValueChangeEvent(e),this._lastKey=null,this._lastKeyName=null,this._updateParsedValue(),this._adjustParsedValue(),this.option("value",this._parsedValue),t&&this._caret(t)},_optionChanged:function(e){switch(e.name){case"format":case"useMaskBehavior":this._renderInputType(),this._updateFormat(),this._renderFormatter(),this._renderValue(),this._refreshValueChangeEvent(),this._refreshEvents();break;case"min":case"max":this._adjustParsedValue(),this.callBase(e);break;default:this.callBase(e)}},_clearCache:function(){delete this._formattedValue,delete this._lastKey,delete this._lastKeyName,delete this._parsedValue,delete this._focusOutOccurs,clearTimeout(this._caretTimeout),delete this._caretTimeout},_clean:function(){this._clearCache(),this.callBase()}});tt("dxNumberBox",xh);var X7="dx-dropdowneditor-button",Z7="dx-dropdowneditor-button-visible",J7="dxDropDownEditor-selectLabel";let Q7=class extends Zh{constructor(t,i,n){super(t,i,n),this.currentTemplate=null}_attachEvents(t){var{editor:i}=this;t.option("onClick",n=>{!i.option("openOnFieldClick")&&i._openHandler(n)}),R.on(t.$element(),"mousedown",n=>{i.$element().is(".dx-state-focused")&&n.preventDefault()})}_create(){var{editor:t}=this,i=v("<div>"),n=this._getOptions();this._addToContainer(i);var r=t._createComponent(i,Ii,k({},n,{elementAttr:{"aria-label":fe.format(J7)}}));return this._legacyRender(t.$element(),i,n.visible),{$element:i,instance:r}}_getOptions(){var{editor:t}=this,i=this._isVisible(),n=t.option("readOnly"),r={focusStateEnabled:!1,hoverStateEnabled:!1,activeStateEnabled:!1,useInkRipple:!1,disabled:n,visible:i};return this._addTemplate(r),r}_isVisible(){var{editor:t}=this;return super._isVisible()&&t.option("showDropDownButton")}_legacyRender(t,i,n){t.toggleClass(Z7,n),i&&i.removeClass("dx-button").addClass(X7)}_isSameTemplate(){return this.editor.option("dropDownButtonTemplate")===this.currentTemplate}_addTemplate(t){this._isSameTemplate()||(t.template=this.editor._getTemplateByOption("dropDownButtonTemplate"),this.currentTemplate=this.editor.option("dropDownButtonTemplate"))}update(){var t=super.update();if(t){var{editor:i,instance:n}=this,r=i.$element(),a=this._getOptions();n==null||n.option(a),this._legacyRender(r,n==null?void 0:n.$element(),a.visible)}}};var bh=function(e){if(Ue())return ot(e)},IC=function(e){return e===null&&(e=void 0),typeof e=="function"&&(e=e()),e},eq="dx-dropdowneditor",aS="dx-dropdowneditor-input-wrapper",tq="dx-dropdowneditor-icon",Xd="dx-dropdowneditor-overlay",oS="dx-dropdowneditor-overlay-flipped",iq="dx-dropdowneditor-active",nq="dx-dropdowneditor-field-clickable",rq="dx-dropdowneditor-field-template-wrapper",sS=Re.current().platform==="ios",TC=ld.inherit({_supportedKeys:function(){return k({},this.callBase(),{tab:function(e){if(this.option("opened")){if(this.option("applyValueMode")==="instantly"){this.close();return}var t=e.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();t&&R.trigger(t,"focus"),e.preventDefault()}},escape:function(e){return this.option("opened")&&e.preventDefault(),this.close(),!0},upArrow:function(e){return!vi(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey)?(this.close(),!1):!0},downArrow:function(e){return!vi(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey)?(this._validatedOpening(),!1):!0},enter:function(e){return this.option("opened")&&(e.preventDefault(),this._valueChangeEventHandler(e)),!0}})},_getDefaultButtons:function(){return this.callBase().concat([{name:"dropDown",Ctor:Q7}])},_getDefaultOptions:function(){return k(this.callBase(),{value:null,onOpened:null,onClosed:null,opened:!1,acceptCustomValue:!0,applyValueMode:"instantly",deferRendering:!0,activeStateEnabled:!0,dropDownButtonTemplate:"dropDownButton",fieldTemplate:null,openOnFieldClick:!1,showDropDownButton:!0,buttons:void 0,dropDownOptions:{showTitle:!1},popupPosition:this._getDefaultPopupPosition(),onPopupInitialized:null,applyButtonText:fe.format("OK"),cancelButtonText:fe.format("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1})},_useTemplates:function(){return!0},_getDefaultPopupPosition:function(e){var t=Ra(e);return{offset:{h:0,v:-1},my:t+" top",at:t+" bottom",collision:"flip flip"}},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(e){var t=e.platform==="generic";return t},options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper:function(){return this.$element().find("."+aS).first()},_init:function(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition:function(e){var{my:t,at:i}=this._getDefaultPopupPosition(e),n=this.option("popupPosition");this.option("popupPosition",k({},n,{my:t,at:i}))},_initVisibilityActions:function(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction:function(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup:function(){this._renderSubmitElement(),this.callBase(),this.$element().addClass(eq),this.setAria("role","combobox")},_render:function(){this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl:function(){this.option("deferRendering")||this._createPopup()},_renderInput:function(){this.callBase(),this._wrapInput(),this._setDefaultAria()},_wrapInput:function(){this._$container=this.$element().wrapInner(v("<div>").addClass(aS)).children().eq(0)},_setDefaultAria:function(){this.setAria({haspopup:"true",autocomplete:"list"})},_readOnlyPropValue:function(){return!this._isEditable()||this.callBase()},_cleanFocusState:function(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate:function(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask:function(){this.option("fieldTemplate")||this.callBase()},_renderField:function(){var e=this._getFieldTemplate();e&&this._renderTemplatedField(e,this._fieldRenderData())},_renderPlaceholder:function(){var e=!!this._getFieldTemplate();e||this.callBase()},_renderValue:function(){this.option("useHiddenSubmitElement")&&this._setSubmitValue();var e=this.callBase();e.always(this._renderField.bind(this))},_renderTemplatedField:function(e,t){var i;this._fieldRenderQueueLength=((i=this._fieldRenderQueueLength)!==null&&i!==void 0?i:0)+1;var n=ba(this._input()),r=this._$container;this._detachKeyboardEvents(),this._refreshButtonsContainer(),this._detachWrapperContent(),this._detachFocusEvents(),r.empty();var a=v("<div>").addClass(rq).appendTo(r);e.render({model:t,container:Me(a),onRendered:()=>{if(this._fieldRenderQueueLength--,this._fieldRenderQueueLength===0){var o=this._input();if(!o.length)throw Qe.Error("E1010");this._integrateInput(),n&&R.trigger(o,"focus")}}}),this._attachWrapperContent(r)},_detachWrapperContent(){var e,t,i,n=this.option("useHiddenSubmitElement");n&&((e=this._$submitElement)===null||e===void 0||e.detach());var r=(t=this._$beforeButtonsContainer)===null||t===void 0?void 0:t[0].parentNode,a=(i=this._$afterButtonsContainer)===null||i===void 0?void 0:i[0].parentNode;r==null||r.removeChild(this._$beforeButtonsContainer[0]),a==null||a.removeChild(this._$afterButtonsContainer[0])},_attachWrapperContent(e){var t,i=this.option("useHiddenSubmitElement");e.prepend(this._$beforeButtonsContainer),i&&((t=this._$submitElement)===null||t===void 0||t.appendTo(e)),e.append(this._$afterButtonsContainer)},_refreshButtonsContainer(){this._$buttonsContainer=this.$element().children().eq(0)},_integrateInput:function(){this._renderFocusState(),this._refreshValueChangeEvent(),this._refreshEvents(),this._refreshEmptinessEvent()},_refreshEmptinessEvent:function(){R.off(this._input(),"input blur",this._toggleEmptinessEventHandler),this._renderEmptinessEvent()},_fieldRenderData:function(){return this.option("value")},_initTemplates:function(){this._templateManager.addDefaultTemplates({dropDownButton:new Ns(function(e){var t=v("<div>").addClass(tq);v(e.container).append(t)})}),this.callBase()},_renderOpenHandler:function(){var e=this._inputWrapper(),t=ye(vt,this.NAME),i=this.option("openOnFieldClick");R.off(e,t),R.on(e,t,this._getInputClickHandler(i)),this.$element().toggleClass(nq,i),i&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler:function(){sS&&(this._detachFocusOutEvents(),R.on(this._inputWrapper(),ye("focusout",this.NAME),e=>{var t=e.relatedTarget,i=this.content?v(this.content()).closest("."+Xd):this._$popup;if(t&&this.option("opened")){var n=v(t).closest("."+Xd,i).length===0;n&&this.close()}}))},_detachFocusOutEvents:function(){sS&&R.off(this._inputWrapper(),ye("focusout",this.NAME))},_getInputClickHandler:function(e){return e?t=>{this._executeOpenAction(t)}:t=>{this._focusInput()}},_openHandler:function(){this._toggleOpenState()},_executeOpenAction:function(e){this._openOnFieldClickAction({event:e})},_keyboardEventBindingTarget:function(){return this._input()},_focusInput:function(){return this.option("disabled")?!1:(this.option("focusStateEnabled")&&!ba(this._input())&&(this._resetCaretPosition(),R.trigger(this._input(),"focus")),!0)},_resetCaretPosition:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this._input().get(0);if(t){var{value:i}=t,n=E(i)&&(e||this._isEditable())?i.length:0;this._caret({start:n,end:n},!0)}},_isEditable:function(){return this.option("acceptCustomValue")},_toggleOpenState:function(e){this._focusInput()&&(this.option("readOnly")||(e=arguments.length?e:!this.option("opened"),this.option("opened",e)))},_renderOpenedState:function(){var e=this.option("opened");e&&this._createPopup(),this.$element().toggleClass(iq,e),this._setPopupOption("visible",e),this.setAria({expanded:e}),this.setAria("owns",e?this._popupContentId:void 0,this.$element())},_createPopup:function(){this._$popup||(this._$popup=v("<div>").addClass(Xd).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent())},_renderPopupContent:re,_renderPopup:function(){var e=k(this._popupConfig(),this._options.cache("dropDownOptions"));this._popup=this._createComponent(this._$popup,Cr,e),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_setPopupContentId(e){this._popupContentId="dx-"+new si,this.setAria("id",this._popupContentId,e)},_contentReadyHandler:re,_popupConfig:function(){return{onInitialized:this._popupInitializedHandler(),position:k(this.option("popupPosition"),{of:this.$element()}),visualContainer:this.$element(),showTitle:this.option("dropDownOptions.showTitle"),_ignoreFunctionValueDeprecation:!0,width:()=>bh(this.$element()),height:"auto",shading:!1,wrapperAttr:{class:Xd},hideOnParentScroll:!0,hideOnOutsideClick:e=>this._closeOutsideDropDownHandler(e),animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,dragEnabled:!1,toolbarItems:this._getPopupToolbarItems(),onPositioned:this._popupPositionedHandler.bind(this),fullScreen:!1,contentTemplate:null}},_popupInitializedHandler:function(){return this.option("onPopupInitialized")?e=>{this._popupInitializedAction({popup:e.component})}:null},_dimensionChanged:function(){var e=IC(this.option("dropDownOptions.width"));e===void 0&&this._setPopupOption("width",()=>bh(this.$element()))},_popupPositionedHandler:function(e){e.position&&this._popup.$overlayContent().toggleClass(oS,e.position.v.flip)},_popupShowingHandler:re,_popupHidingHandler:function(){this.option("opened",!1)},_popupShownHandler:function(){var e;this._openAction();var t=this._popup.$overlayContent(),i=On(t);if(this._label.isVisible()&&t.hasClass(oS)){var n=this._label.$element();ri(t,{top:i.top-parseInt(n.css("fontSize"))})}(e=this._validationMessage)===null||e===void 0||e.option("positionRequest",this._getValidationMessagePositionRequest())},_popupHiddenHandler:function(){var e;this._closeAction(),(e=this._validationMessage)===null||e===void 0||e.option("positionRequest",this._getValidationMessagePositionRequest())},_getValidationMessagePositionRequest:function(){var e="below";if(this._popup&&this._popup.option("visible")){var{top:t}=xi.setup(this.$element()),{top:i}=xi.setup(this._popup.$content());e=t+this.option("popupPosition").offset.v>i?"below":"above"}return e},_closeOutsideDropDownHandler:function(e){var{target:t}=e,i=v(t),n=this.getButton("dropDown"),r=n&&n.$element(),a=!!i.closest(this.$element()).length,o=!!i.closest(r).length,s=!a&&!o;return s},_clean:function(){delete this._openOnFieldClickAction,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption:function(e,t){this._setWidgetOption("_popup",arguments)},_validatedOpening:function(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems:function(){return this.option("applyValueMode")==="useButtons"?this._popupToolbarItemsConfig():[]},_getFirstPopupElement:function(){return this._popup.$wrapper().find(".dx-popup-done.dx-button")},_getLastPopupElement:function(){return this._popup.$wrapper().find(".dx-popup-cancel.dx-button")},_popupElementTabHandler:function(e){var t=v(e.currentTarget);(e.shiftKey&&t.is(this._getFirstPopupElement())||!e.shiftKey&&t.is(this._getLastPopupElement()))&&(R.trigger(this._input(),"focus"),e.preventDefault())},_popupElementEscHandler:function(){R.trigger(this._input(),"focus"),this.close()},_popupButtonInitializedHandler:function(e){e.component.registerKeyHandler("tab",this._popupElementTabHandler.bind(this)),e.component.registerKeyHandler("escape",this._popupElementEscHandler.bind(this))},_popupToolbarItemsConfig:function(){var e=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}}];return this._applyButtonsLocation(e)},_applyButtonsLocation:function(e){var t=this.option("buttonsLocation"),i=e;if(t!=="default"){var n=Do(t);V(i,function(r,a){k(a,{toolbar:n[0],location:n[1]})})}return i},_applyButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_popupOptionChanged:function(e){var t=_i.getOptionsFromContainer(e);this._setPopupOption(t);var i=Object.keys(t);(i.indexOf("width")!==-1||i.indexOf("height")!==-1)&&this._dimensionChanged()},_renderSubmitElement:function(){this.option("useHiddenSubmitElement")&&(this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue:function(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement:function(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose:function(){this._detachFocusOutEvents(),this.callBase()},_optionChanged:function(e){var t;switch(e.name){case"width":case"height":this.callBase(e),(t=this._popup)===null||t===void 0||t.repaint();break;case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":E(e.value)?this._renderField():this._invalidate();break;case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(e),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":break;case"deferRendering":Ue()&&this._createPopup();break;case"applyValueMode":case"applyButtonText":case"cancelButtonText":case"buttonsLocation":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"useHiddenSubmitElement":this._$submitElement&&(this._$submitElement.remove(),this._$submitElement=void 0),this._renderSubmitElement();break;case"rtlEnabled":this._updatePopupPosition(e.value),this.callBase(e);break;default:this.callBase(e)}},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)},field:function(){return Me(this._input())},content:function(){return this._popup?this._popup.content():null}});tt("dxDropDownEditor",TC);var lS=k({},Zu,{_dataExpressionDefaultOptions:function(){return{items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}},_initDataExpressions:function(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource:function(){this.option("dataSource")||(this._dataSource=new fr({store:new Qs(this.option("items")),pageSize:0}))},_compileDisplayGetter:function(){this._displayGetter=bt(this._displayGetterExpr())},_displayGetterExpr:function(){return this.option("displayExpr")},_compileValueGetter:function(){this._valueGetter=bt(this._valueGetterExpr())},_valueGetterExpr:function(){return this.option("valueExpr")||"this"},_loadValue:function(e){var t=new se;return e=this._unwrappedValue(e),E(e)?(this._loadSingle(this._valueGetterExpr(),e).done((function(i){this._isValueEquals(this._valueGetter(i),e)?t.resolve(i):t.reject()}).bind(this)).fail(function(){t.reject()}),this._loadValueDeferred=t,t.promise()):t.reject().promise()},_rejectValueLoading:function(){var e;(e=this._loadValueDeferred)===null||e===void 0||e.reject({shouldSkipCallback:!0})},_getCurrentValue:function(){return this.option("value")},_unwrappedValue:function(e){var t;return e=(t=e)!==null&&t!==void 0?t:this._getCurrentValue(),e&&this._dataSource&&this._valueGetterExpr()==="this"&&(e=this._getItemKey(e)),Hi.unwrap(e)},_getItemKey:function(e){var t=this._dataSource.key();if(Array.isArray(t)){for(var i={},n=0,r=t.length;n<r;n++)i[t[n]]=e[t[n]];return i}return t&&typeof e=="object"&&(e=e[t]),e},_isValueEquals:function(e,t){var i=this._dataSource&&this._dataSource.key(),n=this._compareValues(e,t);return!n&&i&&E(e)&&E(t)&&(Array.isArray(i)?n=this._compareByCompositeKey(e,t,i):n=this._compareByKey(e,t,i)),n},_compareByCompositeKey:function(e,t,i){var n=$e;if(!n(e)||!n(t))return!1;for(var r=0,a=i.length;r<a;r++)if(e[i[r]]!==t[i[r]])return!1;return!0},_compareByKey:function(e,t,i){var n=Hi.unwrap,r=Mt(n(e[i]),e),a=Mt(n(t[i]),t);return this._compareValues(r,a)},_compareValues:function(e,t){return qt(e,!0)===qt(t,!0)},_initDynamicTemplates:re,_setCollectionWidgetItemTemplate:function(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this.option("itemTemplate"))},_getCollectionKeyExpr:function(){var e=this.option("valueExpr"),t=Ve(e)&&e!=="this"||Ie(e);return t?e:null},_dataExpressionOptionChanged:function(e){switch(e.name){case"items":this._itemsToDataSource(),this._setCollectionWidgetOption("items");break;case"dataSource":this._initDataSource();break;case"itemTemplate":this._setCollectionWidgetItemTemplate();break;case"valueExpr":this._compileValueGetter();break;case"displayExpr":this._compileDisplayGetter(),this._initDynamicTemplates(),this._setCollectionWidgetOption("displayExpr")}}}),uS=je(),aq=".dx-list-item",oq="dxListItemData",sq="dx-dropdownlist-popup-wrapper",lq="input",uq=["startswith","contains","endwith","notcontains"],dS=Re.real().platform!=="android",pR=TC.inherit({_supportedKeys:function(){var e=this.callBase();return k({},e,{tab:function(t){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(t);var i=v(this._list.option("focusedElement"));i.length&&this._setSelectedElement(i)}e.tab.apply(this,arguments)},space:re,home:re,end:re})},_allowSelectItemByTab:function(){return this.option("opened")&&this.option("applyValueMode")==="instantly"},_setSelectedElement:function(e){var t=this._valueGetter(this._list._getItemData(e));this._setValue(t)},_setValue:function(e){this.option("value",e)},_getDefaultOptions:function(){return k(this.callBase(),k(lS._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:fe.format("dxCollectionWidget-noDataText"),onSelectionChanged:null,onItemClick:re,showDataBeforeSearch:!1,grouped:!1,groupTemplate:"group",popupPosition:{my:"left top",at:"left bottom",offset:{h:0,v:0},collision:"flip"},wrapItemText:!1,useItemTextAsTitle:!1}))},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init:function(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_setListFocusedElementOptionChange:function(){this._list._updateParentActiveDescendant=this._updateActiveDescendant.bind(this)},_initItems:function(){var e=this.option().items;e&&!e.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions:function(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction:function(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction:function(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new $h("item")})},_isEditable:function(){return this.callBase()||this.option("searchEnabled")},_saveFocusOnWidget:function(e){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange:function(e,t,i){return e>i?t:e<t?i:e},_items:function(){var e=this._getPlainItems(!this._list&&this._dataSource.items()),t=new Yi(e).filter("disabled","<>",!0).toArray();return t},_calcNextItem:function(e){var t=this._items(),i=this._fitIntoRange(this._getSelectedIndex()+e,0,t.length-1);return t[i]},_getSelectedIndex:function(){var e=this._items(),t=this.option("selectedItem"),i=-1;return V(e,(function(n,r){if(this._isValueEquals(r,t))return i=n,!1}).bind(this)),i},_createPopup:function(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup.$wrapper().addClass(this._popupWrapperClass());var e=this._popup.$content();R.off(e,"mouseup"),R.on(e,"mouseup",this._saveFocusOnWidget.bind(this))},_updateCustomBoundaryContainer:function(){var e=this.option("dropDownOptions.container"),t=e&&v(e);if(t&&t.length&&!Xt(t.get(0))){var i=[].slice.call(t.parents());i.unshift(t.get(0)),V(i,(function(n,r){if(r===v("body").get(0))return!1;if(uS.getComputedStyle(r).overflowY==="hidden")return this._$customBoundaryContainer=v(r),!1}).bind(this))}},_popupWrapperClass:function(){return sq},_renderInputValue:function(){var e=this._getCurrentValue();return this._rejectValueLoading(),this._loadInputValue(e,this._setSelectedItem.bind(this)).always(this.callBase.bind(this,e))},_loadInputValue:function(e,t){return this._loadItem(e).always(t)},_getItemFromPlain:function(e,t){var i,n;return t&&typeof e!="object"&&(t.itemByValue||(t.itemByValue={},i=this._getPlainItems(),i.forEach(function(r){t.itemByValue[this._valueGetter(r)]=r},this)),n=t.itemByValue[e]),n||(i=this._getPlainItems(),n=zi(i,(function(r){return this._isValueEquals(this._valueGetter(r),e)}).bind(this))[0]),n},_loadItem:function(e,t){var i=this._getItemFromPlain(e,t);return i!==void 0?new se().resolve(i).promise():this._loadValue(e)},_getPlainItems:function(e){var t=[];e=e||this.option("items")||this._dataSource.items()||[];for(var i=0;i<e.length;i++)e[i]&&e[i].items?t=t.concat(e[i].items):t.push(e[i]);return t},_updateActiveDescendant(){var e,t=this.option("opened"),i=(e=this._list)===null||e===void 0?void 0:e.getFocusedItemId(),n=v("#".concat(i)).length>0,r=t&&n&&i;this.setAria({activedescendant:r||null})},_setSelectedItem:function(e){var t=this._displayValue(e);this.option("selectedItem",Mt(e,null)),this.option("displayValue",t)},_displayValue:function(e){return this._displayGetter(e)},_refreshSelected:function(){var e={};this._listItemElements().each((function(t,i){var n=v(i),r=this._valueGetter(n.data(oq)),a=this._isSelectedValue(r,e);a?this._list.selectItem(n):this._list.unselectItem(n)}).bind(this))},_popupShownHandler:function(){this.callBase(),this._setFocusPolicy()},_setFocusPolicy:function(){!this.option("focusStateEnabled")||!this._list||this._list.option("focusedElement",null)},_isSelectedValue:function(e){return this._isValueEquals(e,this.option("value"))},_validateSearchMode:function(){var e=this.option("searchMode"),t=e.toLowerCase();if(!uq.includes(t))throw Qe.Error("E1019",e)},_clearSelectedItem:function(){this.option("selectedItem",null)},_processDataSourceChanging:function(){this._setListDataSource(),this._renderInputValue().fail((function(){this._isCustomValueAllowed()||this._clearSelectedItem()}).bind(this))},_isCustomValueAllowed:function(){return this.option("displayCustomValue")},reset:function(){this.callBase(),this._clearFilter(),this._clearSelectedItem()},_listItemElements:function(){return this._$list?this._$list.find(aq):v()},_popupConfig:function(){return k(this.callBase(),{templatesRenderAsynchronously:!1,autoResizeEnabled:!1,maxHeight:this._getMaxHeight.bind(this)})},_renderPopupContent:function(){this.callBase(),this._renderList()},_getKeyboardListeners(){var e=this._canListHaveFocus();return this.callBase().concat([!e&&this._list])},_setAriaTargetForList:function(){this._list._getAriaTarget=this._getAriaTarget.bind(this)},_renderList:function(){this._listId="dx-"+new si()._value;var e=this._$list=v("<div>").attr("id",this._listId).appendTo(this._popup.$content());this._list=this._createComponent(e,Vo,this._listConfig()),this._refreshList(),this._setAriaTargetForList(),this._list.option("_listAttributes",{role:"combobox"}),this._renderPreventBlurOnListClick(),this._setListFocusedElementOptionChange()},_renderPreventBlurOnListClick:function(){var e=ye("mousedown","dxDropDownList");R.off(this._$list,e),R.on(this._$list,e,t=>t.preventDefault())},_renderOpenedState:function(){this.callBase(),this._list&&this._updateActiveDescendant(),this.setAria({controls:this._list&&this._listId,owns:this._popup&&this._popupContentId})},_setDefaultAria:function(){this.setAria({haspopup:"listbox",autocomplete:"list"})},_refreshList:function(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource:function(){var e=!!this._list.option("dataSource");return e!==this._needPassDataSourceToList()},_isDesktopDevice:function(){return Re.real().deviceType==="desktop"},_listConfig:function(){var e={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),grouped:this.option("grouped"),wrapItemText:this.option("wrapItemText"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:this._listContentReadyHandler.bind(this),itemTemplate:this.option("itemTemplate"),indicateLoading:!1,keyExpr:this._getCollectionKeyExpr(),displayExpr:this._displayGetterExpr(),groupTemplate:this.option("groupTemplate"),onItemClick:this._listItemClickAction.bind(this),dataSource:this._getDataSource(),_revertPageOnEmptyLoad:!0,hoverStateEnabled:this._isDesktopDevice()?this.option("hoverStateEnabled"):!1,focusStateEnabled:this._isDesktopDevice()?this.option("focusStateEnabled"):!1};return this._canListHaveFocus()||(e.tabIndex=null),e},_canListHaveFocus:()=>!1,_getDataSource:function(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:function(){return{paginate:!1}},_getGroupedOption:function(){return this.option("grouped")},_dataSourceFromUrlLoadMode:function(){return"raw"},_listContentReadyHandler:function(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._dimensionChanged(),this._contentReadyAction()},_setListOption:function(e,t){this._setWidgetOption("_list",arguments)},_listItemClickAction:function(e){this._listItemClickHandler(e),this._itemClickAction(e)},_listItemClickHandler:re,_setListDataSource:function(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList:function(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded:function(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter:function(){return this._canKeepDataSource()?!1:this._needPassDataSourceToList()},_canKeepDataSource:function(){var e,t=this._isMinSearchLengthExceeded();return((e=this._dataSource)===null||e===void 0?void 0:e.isLoaded())&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!t&&!this._isLastMinSearchLengthExceeded},_searchValue:function(){return this._input().val()||""},_getSearchEvent:function(){return ye(lq,this.NAME+"Search")},_getCompositionStartEvent:function(){return ye("compositionstart",this.NAME+"CompositionStart")},_getCompositionEndEvent:function(){return ye("compositionend",this.NAME+"CompositionEnd")},_getSetFocusPolicyEvent:function(){return ye("input",this.NAME+"FocusPolicy")},_renderEvents:function(){this.callBase(),R.on(this._input(),this._getSetFocusPolicyEvent(),()=>{this._setFocusPolicy()}),this._shouldRenderSearchEvent()&&(R.on(this._input(),this._getSearchEvent(),e=>{this._searchHandler(e)}),dS&&(R.on(this._input(),this._getCompositionStartEvent(),()=>{this._isTextCompositionInProgress(!0)}),R.on(this._input(),this._getCompositionEndEvent(),e=>{this._isTextCompositionInProgress(void 0),this._searchHandler(e,this._searchValue())})))},_shouldRenderSearchEvent:function(){return this.option("searchEnabled")},_refreshEvents:function(){R.off(this._input(),this._getSearchEvent()),R.off(this._input(),this._getSetFocusPolicyEvent()),dS&&(R.off(this._input(),this._getCompositionStartEvent()),R.off(this._input(),this._getCompositionEndEvent())),this.callBase()},_isTextCompositionInProgress:function(e){if(arguments.length)this._isTextComposition=e;else return this._isTextComposition},_searchHandler:function(e,t){if(!this._isTextCompositionInProgress()){if(!this._isMinSearchLengthExceeded()){this._searchCanceled();return}var i=this.option("searchTimeout");i?(this._clearSearchTimer(),this._searchTimer=setTimeout(()=>{this._searchDataSource(t)},i)):this._searchDataSource(t)}},_searchCanceled:function(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._searchValue();this._filterDataSource(e)},_filterDataSource:function(e){this._clearSearchTimer();var t=this._dataSource;t&&(t.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),t.searchOperation(this.option("searchMode")),t.searchValue(e),t.load().done(this._dataSourceFiltered.bind(this,e)))},_clearFilter:function(){var e=this._dataSource;e&&e.searchValue()&&e.searchValue(null)},_dataSourceFiltered:function(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup:function(){return this._hasItemsToShow()},_refreshPopupVisibility:function(){if(!(this.option("readOnly")||!this._searchValue())){var e=this._shouldOpenPopup();e&&!this._isFocused()||(this.option("opened",e),e&&this._dimensionChanged())}},_dataSourceChangedHandler:function(e){this._dataSource.pageIndex()===0?this.option().items=e:this.option().items=this.option().items.concat(e)},_hasItemsToShow:function(){var e=this._dataSource&&this._dataSource.items()||[],t=e.length,i=this._needPassDataSourceToList();return!!(i&&t)},_clearSearchTimer:function(){clearTimeout(this._searchTimer),delete this._searchTimer},_popupShowingHandler:function(){this._dimensionChanged()},_dimensionChanged:function(){this.callBase(arguments),this._popup&&this._updatePopupDimensions()},_needPopupRepaint:function(){if(!this._dataSource)return!1;var e=this._dataSource.pageIndex(),t=E(this._pageIndex)&&e<=this._pageIndex;return this._pageIndex=e,t},_updatePopupDimensions:function(){this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions()},_getMaxHeight:function(){var e=this.$element(),t=this._$customBoundaryContainer,i=e.offset().top-(t?t.offset().top:0),n=nt(uS),r=t?Math.min(nt(t),n):n,a=Math.max(i,r-i-nt(e));return Math.min(.5*r,a)},_clean:function(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose:function(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption:function(){this._setListOption.apply(this,arguments)},_setSubmitValue:function(){var e=this.option("value"),t=this._shouldUseDisplayValue(e)?this._displayGetter(e):e;this._getSubmitElement().val(t)},_shouldUseDisplayValue:function(e){return this.option("valueExpr")==="this"&&$e(e)},_optionChanged:function(e){switch(this._dataExpressionOptionChanged(e),e.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(e.name,e.value),this.callBase(e);break;case"items":this.option("dataSource")||this._processDataSourceChanging();break;case"dataSource":this._processDataSourceChanging();break;case"valueExpr":this._renderValue(),this._setListOption("keyExpr",this._getCollectionKeyExpr());break;case"displayExpr":this._renderValue(),this._setListOption("displayExpr",this._displayGetterExpr());break;case"searchMode":this._validateSearchMode();break;case"minSearchLength":this._refreshList();break;case"searchEnabled":case"showDataBeforeSearch":case"searchExpr":this._invalidate();break;case"onContentReady":this._initContentReadyAction();break;case"onSelectionChanged":this._initSelectionChangedAction();break;case"onItemClick":this._initItemClickAction();break;case"grouped":case"groupTemplate":case"wrapItemText":case"noDataText":case"useItemTextAsTitle":this._setListOption(e.name);break;case"displayValue":this.option("text",e.value);break;case"itemTemplate":case"searchTimeout":break;case"selectedItem":e.previousValue!==e.value&&this._selectionChangedAction({selectedItem:e.value});break;default:this.callBase(e)}}}).include(lS,FO);tt("dxDropDownList",pR);var dq="dx-radiobutton",cS="dx-radiobutton-icon",cq="dx-radiobutton-icon-dot",hq="dx-radiobutton-checked",fq="dx-radiobutton-icon-checked",vR=Yn.inherit({_supportedKeys:function(){return k(this.callBase(),{space:function(e){e.preventDefault(),this._clickAction({event:e})}})},_getDefaultOptions:function(){return k(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1})},_canValueBeChangedByClick:function(){return!0},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}}])},_init:function(){this.callBase(),this.$element().addClass(dq)},_initMarkup:function(){this.callBase(),this._renderIcon(),this._renderCheckedState(this.option("value")),this._renderClick(),this.setAria("role","radio")},_renderIcon:function(){this._$icon=v("<div>").addClass(cS),v("<div>").addClass(cq).appendTo(this._$icon),this.$element().append(this._$icon)},_renderCheckedState:function(e){this.$element().toggleClass(hq,e).find("."+cS).toggleClass(fq,e),this.setAria("checked",e)},_renderClick:function(){var e=ye(vt,this.NAME);this._clickAction=this._createAction((function(t){this._clickHandler(t.event)}).bind(this)),R.off(this.$element(),e),R.on(this.$element(),e,(function(t){this._clickAction({event:t})}).bind(this))},_clickHandler:function(e){this._saveValueChangeEvent(e),this.option("value",!0)},_optionChanged:function(e){switch(e.name){case"value":this._renderCheckedState(e.value),this.callBase(e);break;default:this.callBase(e)}}});tt("dxRadioButton",vR);var AC="dxListEditDecorator",pq=ye(sf,AC),vq=ye(lf,AC),_q=ye(dd,AC),mq=it.inherit({ctor:function(e){this._list=e,this._init()},_init:re,_shouldHandleSwipe:!1,_attachSwipeEvent:function(e){var t={itemSizeFunc:(function(){return this._clearSwipeCache&&(this._itemWidthCache=He(this._list.$element()),this._clearSwipeCache=!1),this._itemWidthCache}).bind(this)};R.on(e.$itemElement,pq,t,this._itemSwipeStartHandler.bind(this)),R.on(e.$itemElement,vq,this._itemSwipeUpdateHandler.bind(this)),R.on(e.$itemElement,_q,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler:function(e){var t=v(e.currentTarget);if(t.is(".dx-state-disabled, .dx-state-disabled *")){e.cancel=!0;return}clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(t,e)},_itemSwipeUpdateHandler:function(e){var t=v(e.currentTarget);this._swipeUpdateHandler(t,e)},_itemSwipeEndHandler:function(e){var t=v(e.currentTarget);this._swipeEndHandler(t,e),this._clearSwipeCache=!0},beforeBag:re,afterBag:re,_commonOptions:function(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement:function(e){this._shouldHandleSwipe&&(this._attachSwipeEvent(e),this._clearSwipeCache=!0)},afterRender:re,handleClick:re,handleKeyboardEvents:re,handleEnterPressing:re,handleContextMenu:re,_swipeStartHandler:re,_swipeUpdateHandler:re,_swipeEndHandler:re,visibilityChange:re,getExcludedSelectors:re,dispose:re}),hS="dx-list-select-decorator-enabled",gq="dx-list-select-all",Cq="dx-list-select-all-checkbox",yq="dx-list-select-all-label",xq="dx-list-select-checkbox-container",bq="dx-list-select-checkbox",Sq="dx-list-select-radiobutton-container",Eq="dx-list-select-radiobutton",wq="dx-state-focused",fS=ye(vt,"dxListEditDecorator");D9("selection","default",mq.inherit({_init:function(){this.callBase.apply(this,arguments);var e=this._list.option("selectionMode");this._singleStrategy=e==="single",this._containerClass=this._singleStrategy?Sq:xq,this._controlClass=this._singleStrategy?Eq:bq,this._controlWidget=this._singleStrategy?vR:wo,this._list.$element().addClass(hS)},beforeBag:function(e){var t=e.$itemElement,i=e.$container.addClass(this._containerClass),n=v("<div>").addClass(this._controlClass).appendTo(i);new this._controlWidget(n,k(this._commonOptions(),{value:this._isSelected(t),focusStateEnabled:!1,hoverStateEnabled:!1,onValueChanged:(function(r){r.event&&this._list._saveSelectionChangeEvent(r.event),this._processCheckedState(t,r.value),r.event&&r.event.stopPropagation()}).bind(this)}))},modifyElement:function(e){this.callBase.apply(this,arguments);var t=e.$itemElement,i=this._controlWidget.getInstance(t.find("."+this._controlClass));R.on(t,"stateChanged",(function(n,r){i.option("value",r)}).bind(this))},_updateSelectAllState:function(){this._$selectAll&&this._selectAllCheckBox.option("value",this._list.isSelectAll())},afterRender:function(){this._list.option("selectionMode")==="all"&&(this._$selectAll?this._updateSelectAllState():this._renderSelectAll())},handleKeyboardEvents:function(e,t){var i=!t,n=this._list,r=this._$selectAll,a=n._getLastItemIndex(),o=t&&e===0||i&&e===a,s=!!r;return s&&o?(n.option("focusedElement",r),n.scrollToItem(n.option("focusedElement")),!0):!1},handleEnterPressing:function(e){if(this._$selectAll&&this._$selectAll.hasClass(wq))return e.target=this._$selectAll.get(0),this._list._saveSelectionChangeEvent(e),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value")),!0},_renderSelectAll:function(){var e=this._$selectAll=v("<div>").addClass(gq),t=this._list,i=t._supportedKeys().downArrow.bind(t);this._selectAllCheckBox=t._createComponent(v("<div>").addClass(Cq).appendTo(e),wo,{focusStateEnabled:!1,hoverStateEnabled:!1}),this._selectAllCheckBox.registerKeyHandler("downArrow",i),v("<div>").addClass(yq).text(this._list.option("selectAllText")).appendTo(e),this._list.itemsContainer().prepend(e),this._updateSelectAllState(),this._attachSelectAllHandler()},_attachSelectAllHandler:function(){this._selectAllCheckBox.option("onValueChanged",this._selectAllHandler.bind(this)),R.off(this._$selectAll,fS),R.on(this._$selectAll,fS,this._selectAllClickHandler.bind(this))},_selectAllHandler:function(e){e.event&&e.event.stopPropagation();var t=this._selectAllCheckBox.option("value");e.event&&this._list._saveSelectionChangeEvent(e.event),t===!0?this._selectAllItems():t===!1&&this._unselectAllItems(),this._list._createActionByOption("onSelectAllValueChanged")({value:t})},_checkSelectAllCapability:function(){var e=this._list,t=e.getDataSource();return e.option("selectAllMode")==="allPages"&&e.option("grouped")&&(!t||!t.group())?(Qe.log("W1010"),!1):!0},_selectAllItems:function(){this._checkSelectAllCapability()&&this._list._selection.selectAll(this._list.option("selectAllMode")==="page")},_unselectAllItems:function(){this._checkSelectAllCapability()&&this._list._selection.deselectAll(this._list.option("selectAllMode")==="page")},_selectAllClickHandler:function(e){this._list._saveSelectionChangeEvent(e),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value"))},_isSelected:function(e){return this._list.isItemSelected(e)},_processCheckedState:function(e,t){t?this._list.selectItem(e):this._list.unselectItem(e)},dispose:function(){this._disposeSelectAll(),this._list.$element().removeClass(hS),this.callBase.apply(this,arguments)},_disposeSelectAll:function(){this._$selectAll&&(this._$selectAll.remove(),this._$selectAll=null)}}));var Iq=".dx-state-disabled",Tq="dx-selectbox",Aq="dx-selectbox-popup",Dq="dx-selectbox-container",pS="dx-selectbox-popup-wrapper",DC=pR.inherit({_supportedKeys:function(){var e=this,t=this.callBase(),i=function(r){var a=this._isEditable();a?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(r.preventDefault(),this.reset()),this._savedTextRemoveEvent=r,this._preventSubstitution=!0},n=function(){e.option("searchEnabled")&&e._valueSubstituted()&&e._searchHandler()};return k({},t,{tab:function(){this.option("opened")&&this.option("applyValueMode")==="instantly"&&this._resetCaretPosition(!0),t.tab&&t.tab.apply(this,arguments),this._cancelSearchIfNeed()},upArrow:function(r){if(t.upArrow&&t.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(r),!0},downArrow:function(r){if(t.downArrow&&t.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(r),!0},leftArrow:function(){n(),t.leftArrow&&t.leftArrow.apply(this,arguments)},rightArrow:function(){n(),t.rightArrow&&t.rightArrow.apply(this,arguments)},home:function(){n(),t.home&&t.home.apply(this,arguments)},end:function(){n(),t.end&&t.end.apply(this,arguments)},escape:function(){var r=t.escape&&t.escape.apply(this,arguments);return this._cancelEditing(),r??!0},enter:function(r){var a=this.option("opened"),o=this._input().val().trim(),s=o&&this._list&&!this._list.option("focusedElement");if(!o&&E(this.option("value"))&&this.option("allowClearing"))this._saveValueChangeEvent(r),this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return r.preventDefault(),s&&(a&&this._toggleOpenState(),this._valueChangeEventHandler(r)),a;if(t.enter&&t.enter.apply(this,arguments))return a}},space:function(r){var a=this.option("opened"),o=this.option("searchEnabled"),s=this.option("acceptCustomValue");if(!(!a||o||s))return r.preventDefault(),this._valueChangeEventHandler(r),!0},backspace:i,del:i})},_getDefaultOptions:function(){return k(this.callBase(),{placeholder:fe.format("Select"),fieldTemplate:null,valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating:function(e){E(e.customItem)||(e.customItem=e.text)},showSelectionControls:!1,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,useHiddenSubmitElement:!0})},_init:function(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup:function(){this.$element().addClass(Tq),this._renderTooltip(),this.callBase(),this._$container.addClass(Dq)},_createPopup:function(){this.callBase(),this._popup.$element().addClass(Aq),this._popup.$overlayContent().attr("tabindex",-1)},_popupWrapperClass:function(){return this.callBase()+" "+pS},_cancelEditing:function(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState:function(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement:function(){var e,t=this._searchValue();if(!t){this._focusListElement(null);return}var{items:i,selectedItem:n}=this.option(),r=this._list._itemElements(),a=(e=i==null?void 0:i.indexOf(n))!==null&&e!==void 0?e:-1,o=a!==-1&&!this._isCustomItemSelected()?r.eq(a):null;this._focusListElement(o)},_renderFocusedElement:function(){if(this._list){var e=this._searchValue();if(!e||this.option("acceptCustomValue")){this._focusListElement(null);return}var t=this._list._itemElements(),i=t.not(Iq).eq(0);this._focusListElement(i)}},_focusListElement:function(e){this._preventInputValueRender=!0,this._list.option("focusedElement",Me(e)),delete this._preventInputValueRender},_scrollToSelectedItem:function(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler:function(){this.callBase();var e=this._dataSource&&this._dataSource.paginate();e&&this._needPopupRepaint()||this._scrollToSelectedItem()},_renderValue:function(){return this._renderInputValue(),this._setSubmitValue(),new se().resolve()},_renderInputValue:function(){return this.callBase().always((function(){this._renderInputValueAsync()}).bind(this))},_renderInputValueAsync:function(){this._renderTooltip(),this._renderInputValueImpl().always((function(){this._refreshSelected()}).bind(this))},_renderInputValueImpl:function(){return this._renderField(),new se().resolve()},_setNextItem:function(e){var t=this._calcNextItem(e),i=this._valueGetter(t);this._setValue(i)},_setNextValue:function(e){var t=this._dataSource.isLoaded()?new se().resolve():this._dataSource.load();t.done((function(){var i=this._getSelectedIndex(),n=this._dataSource.pageSize(),r=this._dataSource.isLastPage(),a=i===this._items().length-1;this._saveValueChangeEvent(e);var o=$t(e)==="downArrow"?1:-1;n&&!r&&a&&o>0?(this._popup||this._createPopup(),this._dataSource.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,o))):this._setNextItem(o)}).bind(this))},_setSelectedItem:function(e){var t=!this._isCustomValueAllowed()&&e===void 0;this.callBase(t?null:e),!t&&(!this._isEditable()||this._isCustomItemSelected())&&this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed:function(){return this.option("acceptCustomValue")||this.callBase()},_displayValue:function(e){return e=!E(e)&&this._isCustomValueAllowed()?this.option("value"):e,this.callBase(e)},_listConfig:function(){var e=k(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this)});return this.option("showSelectionControls")&&k(e,{showSelectionControls:!0,selectionByClick:!0}),e},_listFocusedItemChangeHandler:function(e){if(!this._preventInputValueRender){var t=e.component,i=v(t.option("focusedElement")),n=t._getItemData(i);this._updateField(n)}},_updateField:function(e){var t=this._getTemplateByOption("fieldTemplate");if(!(t&&this.option("fieldTemplate"))){var i=this._displayGetter(e);this.option("text",i),this._renderDisplayText(i);return}this._renderField()},_getSelectionChangeHandler:function(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):re},_selectionChangeHandler:function(e){V(e.addedItems||[],(function(t,i){this._setValue(this._valueGetter(i))}).bind(this))},_getActualSearchValue:function(){return this._dataSource.searchValue()},_toggleOpenState:function(e){if(!this.option("disabled")){if(e=arguments.length?e:!this.option("opened"),!e&&!this._shouldClearFilter()&&this._restoreInputText(!0),this._wasSearch()&&e){this._wasSearch(!1);var t=this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded();if(t&&this._dataSource){if(this._searchTimer)return;var i=this._getActualSearchValue();i&&this._wasSearch(!0),this._filterDataSource(i||null)}else this._setListOption("items",[])}e&&this._scrollToSelectedItem(),this.callBase(e)}},_renderTooltip:function(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions:function(){this.callBase(),this._dimensionChanged()},_isValueEqualInputText:function(){var e=this.option("selectedItem");if(e===null)return!1;var t=this._displayGetter(e),i=t?String(t):"",n=this._searchValue();return i===n},_popupHidingHandler:function(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_popupHiddenHandler:function(){this.callBase(),this._shouldCancelSearch()&&(this._wasSearch(!1),this._searchCanceled(),this._shouldCancelSearch(!1))},_restoreInputText:function(e){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always((function(){var{selectedItem:t,text:i}=this.option();if(this.option("acceptCustomValue")){e||(this._updateField(t??this._createCustomItem(i)),this._clearFilter());return}if(this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")){this._clearTextValue();return}this._isValueEqualInputText()||this._renderInputValue().always((function(n){var r=Mt(n,t);this._setSelectedItem(r),this._updateField(r),this._clearFilter()}).bind(this))}).bind(this))},_focusOutHandler:function(e){if(!this._preventNestedFocusEvent(e)){var t=this._isOverlayNestedTarget(e.relatedTarget);t||(this._restoreInputText(),this._clearSearchTimer()),this._cancelSearchIfNeed(e)}e.target=this._input().get(0),this.callBase(e)},_cancelSearchIfNeed:function(e){var{searchEnabled:t}=this.option(),i=this._isOverlayNestedTarget(e==null?void 0:e.relatedTarget),n=this._wasSearch()&&t&&!i;if(n){var r,a=(r=this._popup)===null||r===void 0?void 0:r._hideAnimationProcessing;this._clearSearchTimer(),a?this._shouldCancelSearch(!0):(this._wasSearch(!1),this._searchCanceled())}},_shouldCancelSearch:function(e){if(!arguments.length)return this._shouldCancelSearchValue;this._shouldCancelSearchValue=e},_isOverlayNestedTarget:function(e){return!!v(e).closest(".".concat(pS)).length},_clearTextValue:function(){this.option("selectedItem")&&(this._savedTextRemoveEvent&&this._saveValueChangeEvent(this._savedTextRemoveEvent),this.option("value",null)),delete this._savedTextRemoveEvent},_shouldOpenPopup:function(){return this._needPassDataSourceToList()&&this._wasSearch()},_isFocused:function(){var e=me.getActiveElement();return this.callBase()&&v(e).closest(this._input()).length>0},_renderValueChangeEvent:function(){this._isEditable()&&this.callBase()},_fieldRenderData:function(){var e=this._list&&this.option("opened")&&v(this._list.option("focusedElement"));return e&&e.length?this._list._getItemData(e):this.option("selectedItem")},_isSelectedValue:function(e){return this._isValueEquals(e,this.option("value"))},_shouldCloseOnItemClick:function(){return!(this.option("showSelectionControls")&&this.option("selectionMode")!=="single")},_listItemClickHandler:function(e){var t=this._getCurrentValue();this._focusListElement(v(e.itemElement)),this._saveValueChangeEvent(e.event),this._completeSelection(this._valueGetter(e.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&t===this._valueGetter(e.itemData)&&this._updateField(e.itemData),this._shouldClearFilter()&&this._cancelSearchIfNeed()},_shouldClearFilter:function(){return this._wasSearch()},_completeSelection:function(e){this._setValue(e)},_loadItem:function(e,t){var i=this,n=new se;return this.callBase(e,t).done((function(r){n.resolve(r)}).bind(this)).fail((function(r){if(!(r!=null&&r.shouldSkipCallback)){var a=i.option("selectedItem");i.option("acceptCustomValue")&&e===i._valueGetter(a)?n.resolve(a):n.reject()}}).bind(this)),n.promise()},_loadInputValue:function(e,t){return this._loadItemDeferred=this._loadItem(e).always(t),this._loadItemDeferred},_isCustomItemSelected:function(){var e=this.option("selectedItem"),t=this._searchValue(),i=this._displayGetter(e);return!i||t!==i.toString()},_valueChangeEventHandler:function(e){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(e),this._isValueChanging=!1)},_initCustomItemCreatingAction:function(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem:function(e){var t={text:e},i=this._customItemCreatingAction(t),n=Mt(i,t.customItem);return E(i)&&xt.log("W0015","onCustomItemCreating","customItem"),n},_customItemAddedHandler:function(e){var t=this._searchValue(),i=this._createCustomItem(t);if(this._saveValueChangeEvent(e),i===void 0)throw this._renderValue(),xt.Error("E0121");ku(i)?yi(i).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(i)},_setCustomItem:function(e){this._disposed||(e=e||null,this.option("selectedItem",e),this._cancelSearchIfNeed(),this._setValue(this._valueGetter(e)),this._renderDisplayText(this._displayGetter(e)))},_clearValueHandler:function(e){return this._preventFiltering=!0,this.callBase(e),this._searchCanceled(),!1},_wasSearch:function(e){if(!arguments.length)return!!this._wasSearchValue;this._wasSearchValue=e},_searchHandler:function(){if(this._preventFiltering){delete this._preventFiltering;return}this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(arguments)},_dataSourceFiltered:function(e){this.callBase(),e!==null&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted:function(){var e=this._input().get(0),t=this._searchValue().length,i=e.selectionStart===0&&e.selectionEnd===t,n=e.selectionStart!==e.selectionEnd,r=t===e.selectionEnd;return this._wasSearch()&&n&&!i&&r&&this._shouldSubstitutionBeRendered()},_shouldSubstitutionBeRendered:function(){return!this._preventSubstitution&&this.option("searchEnabled")&&!this.option("acceptCustomValue")&&this.option("searchMode")==="startswith"},_renderInputSubstitution:function(){if(!this._shouldSubstitutionBeRendered()){delete this._preventSubstitution;return}var e=this._list&&this._getPlainItems(this._list.option("items"))[0];if(e){var t=this._input(),i=t.val().length;if(i!==0){var n=t.get(0),r=this._displayGetter(e).toString();n.value=r,this._caret({start:i,end:r.length})}}},_dispose:function(){this._renderInputValueAsync=re,delete this._loadItemDeferred,this.callBase()},_optionChanged:function(e){switch(e.name){case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":this._invalidate();break;case"allowClearing":break;default:this.callBase(e)}}});tt("dxSelectBox",DC);var vS=e=>e.getMonth()+1,_S=(e,t)=>{var i=e.getDate(),n=Eu("M",e),r=ki(parseInt(t),n.min,n.max);e.setMonth(r-1,1);var{min:a,max:o}=Eu("dM",e),s=ki(i,a,o);e.setDate(s)},Oq={a:e=>e.getHours()<12?0:1,E:"getDay",y:"getFullYear",M:vS,L:vS,d:"getDate",H:"getHours",h:"getHours",m:"getMinutes",s:"getSeconds",S:"getMilliseconds"},Rq=k({},u4(),{a:(e,t)=>{var i=e.getHours(),n=i>=12;n!==!!parseInt(t)&&e.setHours((i+12)%24)},d:(e,t)=>{var i=Eu("dM",e).max;t>i&&e.setMonth(e.getMonth()+1),e.setDate(t)},h:(e,t)=>{var i=e.getHours()>=12;e.setHours(+t%12+(i?12:0))},M:_S,L:_S,E:(e,t)=>{t<0||e.setDate(e.getDate()-e.getDay()+parseInt(t))},y:(e,t)=>{var i=e.getFullYear(),n=String(t).length,r=String(Eu("y",e).max).length,a=parseInt(String(i).substr(0,r-n)+t);e.setFullYear(a)}}),kq=e=>Oq[e]||(()=>e),Bq=(e,t)=>{for(var i=t.regexp.exec(e),n=0,r=0,a=[],o=function(l){n=r,r=n+i[l].length;var u=t.patterns[l-1].replace(/^'|'$/g,""),d=kq(u[0]);a.push({index:l-1,isStub:u===i[l],caret:{start:n,end:r},pattern:u,text:i[l],limits:function(){for(var c=arguments.length,h=new Array(c),f=0;f<c;f++)h[f]=arguments[f];return Eu(u[0],...h)},setter:Rq[u[0]]||re,getter:d})},s=1;s<i.length;s++)o(s);return a},Eu=(e,t,i)=>{var n={y:{min:0,max:9999},M:{min:1,max:12},L:{min:1,max:12},d:{min:1,max:31},dM:{min:1,max:new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},E:{min:0,max:6},H:{min:0,max:23},h:{min:0,max:23},m:{min:0,max:59},s:{min:0,max:59},S:{min:0,max:999},a:{min:0,max:1}};return n[i||e]||n.getAmPm},Lq=(e,t)=>{for(var i=0;i<e.length;i++){var n=e[i].caret.end>=t;if(!e[i].isStub&&n)return i}return null},iv=["year","day","month","day"],mS=["hours","minutes","seconds","milliseconds"],_R=6e4,mR=60*_R*24,Pq=365*mR,Fq=function(e){var t=typeof e;return t==="string"?"format":t==="object"&&e.type!==void 0?e.type:null},_t={SUPPORTED_FORMATS:["date","time","datetime"],ONE_MINUTE:_R,ONE_DAY:mR,ONE_YEAR:Pq,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){var e=new Date;return new Date(e.getFullYear()+50,e.getMonth(),e.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:function(){return"yyyy-MM-dd"},components:iv},time:{getStandardPattern:function(){return"HH:mm"},components:mS},datetime:{getStandardPattern:function(){var e;return function(){var t=v("<input>").attr("type","datetime");t.val("2000-01-01T01:01Z"),t.val()&&(e="yyyy-MM-ddTHH:mmZ")}(),e||(e="yyyy-MM-ddTHH:mm:ssZ"),_t.FORMATS_INFO.datetime.getStandardPattern=function(){return e},e},components:[...iv,...mS]},"datetime-local":{getStandardPattern:function(){return"yyyy-MM-ddTHH:mm:ss"},components:[...iv,"hours","minutes","seconds"]}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat:function(e,t){var i=_t.FORMATS_INFO[t].getStandardPattern();return ci.serializeDate(e,i)},fromStandardDateFormat:function(e){var t=ci.dateParser(e);return Wi(t)?t:void 0},getMaxMonthDay:function(e,t){return new Date(e,t+1,0).getDate()},mergeDates:function(e,t,i){if(!t)return t||null;if(!e||isNaN(e.getTime())){var n=new Date(null);e=new Date(n.getFullYear(),n.getMonth(),n.getDate())}var r=new Date(e.valueOf()),a=_t.FORMATS_INFO[i];return V(a.components,function(){var o=_t.DATE_COMPONENTS_INFO[this];r[o.setter](t[o.getter]())}),r},getLongestCaptionIndex:function(e){var t=0,i=0,n;for(n=0;n<e.length;++n)e[n].length>i&&(t=n,i=e[n].length);return t},formatUsesMonthName:function(e){return Xe.formatUsesMonthName(e)},formatUsesDayName:function(e){return Xe.formatUsesDayName(e)},getLongestDate:function(e,t,i){var n=Fq(e),r=9;(!n||_t.formatUsesMonthName(n))&&(r=_t.getLongestCaptionIndex(t));var a=new Date(1888,r,21,23,59,59,999);if(!n||_t.formatUsesDayName(n)){var o=a.getDate()-a.getDay()+_t.getLongestCaptionIndex(i);a.setDate(o)}return a},normalizeTime:function(e){e.setSeconds(0),e.setMilliseconds(0)}};_t.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter:function(e,t){var i=new Date(t.getTime());return i.setFullYear(e),Xe.format(i,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter:function(e,t){var i=new Date(t.getTime());return i.setDate(e),Xe.format(i,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:function(e){return Xe.getMonthNames()[e]},startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:function(e){return Xe.format(new Date(0,0,0,e),"hour")},startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:function(e){return Xe.format(new Date(0,0,0,0,e),"minute")},startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:function(e){return Xe.format(new Date(0,0,0,0,0,e),"second")},startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:function(e){return Xe.format(new Date(0,0,0,0,0,0,e),"millisecond")},startValue:0,endValue:999}};var gR="dxSwipeable",Mq="dx-swipeable",Vq={onStart:sf,onUpdated:lf,onEnd:dd,onCancel:"dxswipecancel"},Sh=mr.inherit({_getDefaultOptions:function(){return k(this.callBase(),{elastic:!0,immediate:!1,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render:function(){this.callBase(),this.$element().addClass(Mq),this._attachEventHandlers()},_attachEventHandlers:function(){if(this._detachEventHandlers(),!this.option("disabled")){var e=this.NAME;this._createEventData(),V(Vq,(function(t,i){var n=this._createActionByOption(t,{context:this});i=ye(i,e),R.on(this.$element(),i,this._eventData,function(r){return n({event:r})})}).bind(this))}},_createEventData:function(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate")}},_detachEventHandlers:function(){R.off(this.$element(),"."+gR)},_optionChanged:function(e){switch(e.name){case"disabled":case"onStart":case"onUpdated":case"onEnd":case"onCancel":case"elastic":case"immediate":case"itemSizeFunc":case"direction":this._detachEventHandlers(),this._attachEventHandlers();break;case"rtlEnabled":break;default:this.callBase(e)}},_useTemplates:function(){return!1}});Mu(Sh,gR);var Nq="dx-calendar-navigator",$q="dx-calendar-navigator-previous-month",Hq="dx-calendar-navigator-next-month",Wq="dx-calendar-navigator-previous-view",zq="dx-calendar-navigator-next-view",Gq="dx-calendar-disabled-navigator-link",Uq="dx-calendar-caption-button",Kq=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{onClick:null,onCaptionClick:null,text:""})},_init:function(){this.callBase(),this._initActions()},_initActions:function(){this._clickAction=this._createActionByOption("onClick"),this._captionClickAction=this._createActionByOption("onCaptionClick")},_initMarkup:function(){this.callBase(),this.$element().addClass(Nq),this._renderButtons(),this._renderCaption()},_renderButtons:function(){var e=this,t=this.option("rtlEnabled")?-1:1;this._prevButton=this._createComponent(v("<a>"),Ii,{focusStateEnabled:!1,icon:"chevronleft",onClick:function(a){e._clickAction({direction:-t,event:a})},integrationOptions:{}});var i=this._prevButton.$element().addClass(Wq).addClass($q);this._nextButton=this._createComponent(v("<a>"),Ii,{focusStateEnabled:!1,icon:"chevronright",onClick:function(a){e._clickAction({direction:t,event:a})},integrationOptions:{}});var n=this._nextButton.$element().addClass(zq).addClass(Hq);this._caption=this._createComponent(v("<a>").addClass(Uq),Ii,{focusStateEnabled:!1,onClick:function(a){e._captionClickAction({event:a})},integrationOptions:{}});var r=this._caption.$element();this.$element().append(i,r,n)},_renderCaption:function(){this._caption.option("text",this.option("text"))},toggleButton:function(e,t){var i="_"+e+"Button",n=this[i];n&&(n.option("disabled",t),n.$element().toggleClass(Gq,t))},_optionChanged:function(e){switch(e.name){case"text":this._renderCaption();break;default:this.callBase(e)}}}),{abstract:na}=_i,jq="dx-calendar-other-view",qq="dx-calendar-cell",gS="dx-calendar-empty-cell",Yq="dx-calendar-today",CS="dx-calendar-selected-date",nv="dx-calendar-contoured-date",yS=ye(vt,"dxCalendar"),xS="dxDateValueKey",Zd=_i.inherit({_getViewName:function(){return"base"},_getDefaultOptions:function(){return k(this.callBase(),{date:new Date,focusStateEnabled:!1,cellTemplate:null,disabledDates:null,onCellClick:null,rowCount:3,colCount:4,allowValueSelection:!0,_todayDate:()=>new Date})},_initMarkup:function(){this.callBase(),this._renderImpl()},_renderImpl:function(){this.$element().append(this._createTable()),this._createDisabledDatesHandler(),this._renderBody(),this._renderContouredDate(),this._renderValue(),this._renderEvents()},_createTable:function(){return this._$table=v("<table>"),this.setAria({label:fe.format("dxCalendar-ariaWidgetName"),role:"grid"},this._$table),this._$table},_renderBody:function(){this.$body=v("<tbody>").appendTo(this._$table);for(var e={cellDate:this._getFirstCellData(),prevCellDate:null},t=0,i=this.option("rowCount");t<i;t++){e.row=this._createRow();for(var n=0,r=this.option("colCount");n<r;n++)this._renderCell(e,n)}},_createRow:function(){var e=me.createElement("tr");return this.setAria("role","row",v(e)),this.$body.get(0).appendChild(e),e},_appendCell:function(e,t){this._appendMethodName||this._cacheAppendMethodName(),v(e)[this._appendMethodName](t)},_cacheAppendMethodName:function(e){this._appendMethodName=e??this.option("rtlEnabled")?"prepend":"append"},_createCell:function(e){var t=me.createElement("td"),i=v(t);return t.className=this._getClassNameByDate(e),t.setAttribute("data-value",ci.serializeDate(e,Fe.getShortDateFormat())),Vt(t,xS,e),this.setAria({role:"gridcell",label:this.getCellAriaLabel(e)},i),{cell:t,$cell:i}},_renderCell:function(e,t){var{cellDate:i,prevCellDate:n,row:r}=e;n&&Fe.fixTimezoneGap(n,i),e.prevCellDate=i;var{cell:a,$cell:o}=this._createCell(i),s=this.option("cellTemplate");this._appendCell(r,a),s?s.render(this._prepareCellTemplateData(i,t,o)):a.innerHTML=this._getCellText(i),e.cellDate=this._getNextCellData(i)},_getClassNameByDate:function(e){var t=qq;return this._isTodayCell(e)&&(t+=" ".concat(Yq)),(this._isDateOutOfRange(e)||this.isDateDisabled(e))&&(t+=" ".concat(gS)),this._isOtherView(e)&&(t+=" ".concat(jq)),t},_prepareCellTemplateData:function(e,t,i){return{model:{text:this._getCellText(e),date:e,view:this._getViewName()},container:Me(i),index:t}},_renderEvents:function(){this._createCellClickAction(),R.off(this._$table,yS),R.on(this._$table,yS,"td",e=>{v(e.currentTarget).hasClass(gS)||this._cellClickAction({event:e,value:v(e.currentTarget).data(xS)})})},_createCellClickAction:function(){this._cellClickAction=this._createActionByOption("onCellClick")},_createDisabledDatesHandler:function(){var e=this.option("disabledDates");this._disabledDatesHandler=Array.isArray(e)?this._getDefaultDisabledDatesHandler(e):e||re},_getDefaultDisabledDatesHandler:function(e){return re},_isTodayCell:na,_isDateOutOfRange:na,isDateDisabled:function(e){var t={date:e,view:this._getViewName()};return this._disabledDatesHandler(t)},_isOtherView:na,_getCellText:na,_getFirstCellData:na,_getNextCellData:na,_renderContouredDate:function(e){if(this.option("focusStateEnabled")){e=e||this.option("contouredDate");var t=this._getContouredCell(),i=this._getCellByDate(e);t.removeClass(nv),i.addClass(nv)}},_getContouredCell:function(){return this._$table.find(".".concat(nv))},_changeValue:function(e){if(e){var t=this.option("value"),i=t?new Date(t):new Date;i.setDate(e.getDate()),i.setMonth(e.getMonth()),i.setFullYear(e.getFullYear()),i.setDate(e.getDate()),this.option("value",i)}else this.option("value",null)},_renderValue:function(){if(this.option("allowValueSelection")){var e=this.option("value"),t=this._getCellByDate(e);this._selectedCell&&this._selectedCell.removeClass(CS),t.addClass(CS),this._selectedCell=t}},getCellAriaLabel:function(e){return this._getCellText(e)},_getFirstAvailableDate:function(){var e=this.option("date"),t=this.option("min");return e=Fe.getFirstDateView(this._getViewName(),e),new Date(t&&e<t?t:e)},_getCellByDate:na,isBoundary:na,_optionChanged:function(e){var{name:t,value:i}=e;switch(t){case"value":this._renderValue();break;case"contouredDate":this._renderContouredDate(i);break;case"onCellClick":this._createCellClickAction();break;case"disabledDates":case"cellTemplate":this._invalidate();break;case"rtlEnabled":this._cacheAppendMethodName(i),this.callBase(e);break;case"_todayDate":this._renderBody();break;default:this.callBase(e)}}}),Xq="dx-calendar-other-month",Zq="dx-calendar-other-view",Jq={month:Zd.inherit({_getViewName:function(){return"month"},_getDefaultOptions:function(){return k(this.callBase(),{firstDayOfWeek:void 0,rowCount:6,colCount:7})},_renderImpl:function(){this.callBase(),this._renderHeader()},_renderBody:function(){this.callBase(),this._$table.find(".".concat(Zq)).addClass(Xq)},_renderFocusTarget:re,getCellAriaLabel:function(e){return Xe.format(e,"longdate")},_renderHeader:function(){var e=v("<tr>"),t=v("<thead>").append(e);this._$table.prepend(t);for(var i=0,n=this.option("colCount");i<n;i++)this._renderHeaderCell(i,e)},_renderHeaderCell:function(e,t){var{full:i,abbreviated:n}=this._getDayCaption(this._getFirstDayOfWeek()+e),r=v("<th>").attr({scope:"col",abbr:i}).text(n);this._appendCell(t,r)},getNavigatorCaption:function(){return Xe.format(this.option("date"),"monthandyear")},_isTodayCell:function(e){var t=this.option("_todayDate")();return Fe.sameDate(e,t)},_isDateOutOfRange:function(e){var t=this.option("min"),i=this.option("max");return!Fe.dateInRange(e,t,i,"date")},_isOtherView:function(e){return e.getMonth()!==this.option("date").getMonth()},_getCellText:function(e){return Xe.format(e,"d")},_getDayCaption:function(e){var t=this.option("colCount"),i=e%t;return{full:Xe.getDayNames()[i],abbreviated:Xe.getDayNames("abbreviated")[i]}},_getFirstCellData:function(){var e=Fe.getFirstMonthDate(this.option("date")),t=this._getFirstDayOfWeek()-e.getDay(),i=this.option("colCount");return t>=0&&(t-=i),e.setDate(e.getDate()+t),e},_getNextCellData:function(e){return e=new Date(e),e.setDate(e.getDate()+1),e},_getFirstDayOfWeek:function(){return E(this.option("firstDayOfWeek"))?this.option("firstDayOfWeek"):Xe.firstDayOfWeekIndex()},_getCellByDate:function(e){return this._$table.find("td[data-value='".concat(ci.serializeDate(e,Fe.getShortDateFormat()),"']"))},isBoundary:function(e){return Fe.sameMonthAndYear(e,this.option("min"))||Fe.sameMonthAndYear(e,this.option("max"))},_getDefaultDisabledDatesHandler:function(e){return function(t){var i=e.some(function(n){return Fe.sameDate(n,t.date)});if(i)return!0}}}),year:Zd.inherit({_getViewName:function(){return"year"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Fe.sameMonthAndYear(e,t)},_isDateOutOfRange:function(e){return!Fe.dateInRange(e,Fe.getFirstMonthDate(this.option("min")),Fe.getLastMonthDate(this.option("max")))},_isOtherView:function(){return!1},_getCellText:function(e){return Xe.getMonthNames("abbreviated")[e.getMonth()]},_getFirstCellData:function(){var e=this.option("date"),t=new Date(e);return t.setDate(1),t.setMonth(0),t},_getNextCellData:function(e){return e=new Date(e),e.setMonth(e.getMonth()+1),e},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),this._$table.find("td[data-value='".concat(ci.serializeDate(t,Fe.getShortDateFormat()),"']"))},getCellAriaLabel:function(e){return Xe.format(e,"monthandyear")},getNavigatorCaption:function(){return Xe.format(this.option("date"),"yyyy")},isBoundary:function(e){return Fe.sameYear(e,this.option("min"))||Fe.sameYear(e,this.option("max"))}}),decade:Zd.inherit({_getViewName:function(){return"decade"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Fe.sameYear(e,t)},_isDateOutOfRange:function(e){var t=this.option("min"),i=this.option("max");return!Fe.dateInRange(e.getFullYear(),t&&t.getFullYear(),i&&i.getFullYear())},_isOtherView:function(e){var t=new Date(e);return t.setMonth(1),!Fe.sameDecade(t,this.option("date"))},_getCellText:function(e){return Xe.format(e,"yyyy")},_getFirstCellData:function(){var e=Fe.getFirstYearInDecade(this.option("date"))-1;return Fe.createDateWithFullYear(e,0,1)},_getNextCellData:function(e){return e=new Date(e),e.setFullYear(e.getFullYear()+1),e},getNavigatorCaption:function(){var e=this.option("date"),t=Fe.getFirstYearInDecade(e),i=new Date(e),n=new Date(e);return i.setFullYear(t),n.setFullYear(t+9),Xe.format(i,"yyyy")+"-"+Xe.format(n,"yyyy")},_isValueOnCurrentView:function(e,t){return Fe.sameDecade(e,t)},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),t.setMonth(0),this._$table.find("td[data-value='".concat(ci.serializeDate(t,Fe.getShortDateFormat()),"']"))},isBoundary:function(e){return Fe.sameDecade(e,this.option("min"))||Fe.sameDecade(e,this.option("max"))}}),century:Zd.inherit({_getViewName:function(){return"century"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Fe.sameDecade(e,t)},_isDateOutOfRange:function(e){var t=Fe.getFirstYearInDecade(e),i=Fe.getFirstYearInDecade(this.option("min")),n=Fe.getFirstYearInDecade(this.option("max"));return!Fe.dateInRange(t,i,n)},_isOtherView:function(e){var t=new Date(e);return t.setMonth(1),!Fe.sameCentury(t,this.option("date"))},_getCellText:function(e){var t=Xe.format(e,"yyyy"),i=new Date(e);return i.setFullYear(i.getFullYear()+9),t+" - "+Xe.format(i,"yyyy")},_getFirstCellData:function(){var e=Fe.getFirstDecadeInCentury(this.option("date"))-10;return Fe.createDateWithFullYear(e,0,1)},_getNextCellData:function(e){return e=new Date(e),e.setFullYear(e.getFullYear()+10),e},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),t.setMonth(0),t.setFullYear(Fe.getFirstYearInDecade(t)),this._$table.find("td[data-value='".concat(ci.serializeDate(t,Fe.getShortDateFormat()),"']"))},getNavigatorCaption:function(){var e=this.option("date"),t=Fe.getFirstDecadeInCentury(e),i=new Date(e),n=new Date(e);return i.setFullYear(t),n.setFullYear(t+99),Xe.format(i,"yyyy")+"-"+Xe.format(n,"yyyy")},isBoundary:function(e){return Fe.sameCentury(e,this.option("min"))||Fe.sameCentury(e,this.option("max"))}})},Qq="dx-calendar",eY="dx-calendar-body",tY="dx-calendar-cell",iY="dx-calendar-footer",nY="dx-calendar-today-button",rY="dx-calendar-with-footer",aY="dx-calendar-views-wrapper",bS="dx-calendar-view",oY="dx-state-focused",rv=250,sY=.6,lY=1,uY="yyyy-MM-dd",dY="dxDateValueKey",ls={month:3,year:2,decade:1,century:0},Di={MONTH:"month",YEAR:"year",DECADE:"decade",CENTURY:"century"};function cY(e){return e.hasClass(oY)}var CR=Yn.inherit({_activeStateUnit:"."+tY,_getDefaultOptions:function(){return k(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,currentDate:new Date,value:null,dateSerializationFormat:void 0,min:new Date(1e3,0),max:new Date(3e3,0),firstDayOfWeek:void 0,zoomLevel:Di.MONTH,maxZoomLevel:Di.MONTH,minZoomLevel:Di.CENTURY,showTodayButton:!1,cellTemplate:"cell",disabledDates:null,onCellClick:null,onContouredChanged:null,skipFocusCheck:!1,_todayDate:()=>new Date})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}}])},_supportedKeys:function(){return k(this.callBase(),{rightArrow:function(e){e.preventDefault(),vi(e)?this._waitRenderView(1):this._moveCurrentDateByOffset(1*this._getRtlCorrection())},leftArrow:function(e){e.preventDefault(),vi(e)?this._waitRenderView(-1):this._moveCurrentDateByOffset(-1*this._getRtlCorrection())},upArrow:function(e){if(e.preventDefault(),vi(e))this._navigateUp();else{if(zt.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(-1*this._view.option("colCount"))}},downArrow:function(e){if(e.preventDefault(),vi(e))this._navigateDown();else{if(zt.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(1*this._view.option("colCount"))}},home:function(e){e.preventDefault();var t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("min");if(!this._view.isDateDisabled(i)){var r=Fe.sameView(t,i,n)?n:Fe.getViewFirstCellDate(t,i);this._moveToClosestAvailableDate(r)}},end:function(e){e.preventDefault();var t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("max");if(!this._view.isDateDisabled(i)){var r=Fe.sameView(t,i,n)?n:Fe.getViewLastCellDate(t,i);this._moveToClosestAvailableDate(r)}},pageUp:function(e){e.preventDefault(),this._waitRenderView(-1*this._getRtlCorrection())},pageDown:function(e){e.preventDefault(),this._waitRenderView(1*this._getRtlCorrection())},tab:re,enter:function(e){if(!this._isMaxZoomLevel())this._navigateDown();else if(!this._view.isDateDisabled(this.option("currentDate"))){var t=this._updateTimeComponent(this.option("currentDate"));this._dateValue(t,e)}}})},_getSerializationFormat:function(e){var t=this.option(e||"value");if(this.option("dateSerializationFormat"))return this.option("dateSerializationFormat");if(Et(t))return"number";if(Ve(t))return ci.getDateSerializationFormat(t)},_convertToDate:function(e,t){return ci.deserializeDate(e)},_dateValue:function(e,t){if(t){if(t.type==="keydown"){var i=this._view._getContouredCell().get(0);t.target=i}this._saveValueChangeEvent(t)}this._dateOption("value",e)},_dateOption:function(e,t){if(arguments.length===1)return this._convertToDate(this.option(e),e);var i=this._getSerializationFormat(e);this.option(e,ci.serializeDate(t,i))},_shiftDate:function(e,t,i,n){switch(e){case Di.MONTH:t.setDate(t.getDate()+i*n);break;case Di.YEAR:t.setMonth(t.getMonth()+i*n);break;case Di.DECADE:t.setFullYear(t.getFullYear()+i*n);break;case Di.CENTURY:t.setFullYear(t.getFullYear()+10*i*n)}},_moveCurrentDateByOffset:function(e){var t=this.option("currentDate"),i=new Date(t),n=this.option("zoomLevel");this._shiftDate(n,i,e,1);for(var r=this._getMaxDate(),a=this._getMinDate(),o=this._areDatesInNeighborView(n,i,t),s=Nr(i,a,r)&&o,l=new Date(i);s;){if(!this._view.isDateDisabled(l)){i=l;break}this._shiftDate(n,l,e,1),o=this._areDatesInNeighborView(n,l,t),s=Nr(l,a,r)&&o}this._view.isDateDisabled(t)||this._view.isDateDisabled(i)?this._waitRenderView(e>0?1:-1):this.option("currentDate",i)},_areDatesInSameView(e,t,i){switch(e){case Di.MONTH:return t.getMonth()===i.getMonth();case Di.YEAR:return t.getYear()===i.getYear();case Di.DECADE:return parseInt(t.getYear()/10)===parseInt(i.getYear()/10);case Di.CENTURY:return parseInt(t.getYear()/100)===parseInt(i.getYear()/100)}},_areDatesInNeighborView(e,t,i){switch(e){case Di.MONTH:return n=t.getMonth(),r=i.getMonth(),a=Math.abs(n-r),Math.min(a,12-a)<=1;case Di.YEAR:return Math.abs(t.getYear()-i.getYear())<=1;case Di.DECADE:return Math.abs(t.getYear()-i.getYear())<=10;case Di.CENTURY:return Math.abs(t.getYear()-i.getYear())<=100}var n,r,a},_moveToClosestAvailableDate:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.option("currentDate"),t=new Date(e),i=this.option("zoomLevel"),n=!this._isDateNotAvailable(t),r=n,a=n,o,s,l=new Date(t),u=new Date(t);do{if(r){t=l;break}if(a){t=u;break}this._shiftDate(i,l,1,1),this._shiftDate(i,u,1,-1),o=this._areDatesInSameView(i,l,e),s=this._areDatesInSameView(i,u,e),r=o&&!this._isDateNotAvailable(l),a=s&&!this._isDateNotAvailable(u)}while(o||s);this.option("currentDate",t)},_isDateNotAvailable:function(e){var t=this._getMaxDate(),i=this._getMinDate();return!Nr(e,i,t)||this._view.isDateDisabled(e)},_init:function(){this.callBase(),this._correctZoomLevel(),this._initCurrentDate(),this._initActions()},_correctZoomLevel:function(){var e=this.option("minZoomLevel"),t=this.option("maxZoomLevel"),i=this.option("zoomLevel");ls[t]<ls[e]||(ls[i]>ls[t]?this.option("zoomLevel",t):ls[i]<ls[e]&&this.option("zoomLevel",e))},_initCurrentDate:function(){var e=this._getNormalizedDate(this._dateOption("value"))||this._getNormalizedDate(this.option("currentDate"));this.option("currentDate",e)},_getNormalizedDate:function(e){return e=Fe.normalizeDate(e,this._getMinDate(),this._getMaxDate()),E(e)?this._getDate(e):e},_initActions:function(){this._cellClickAction=this._createActionByOption("onCellClick"),this._onContouredChanged=this._createActionByOption("onContouredChanged")},_initTemplates:function(){this._templateManager.addDefaultTemplates({cell:new Ns(function(e){var t=e.model;v(e.container).append(v("<span>").text(t&&t.text||String(t)))})}),this.callBase()},_updateCurrentDate:function(e){zt.isAnimating(this._$viewsWrapper)&&zt.stop(this._$viewsWrapper,!0);var t=this._getMinDate(),i=this._getMaxDate();if(t>i){this.option("currentDate",new Date);return}var n=this._getNormalizedDate(e);if(e.getTime()!==n.getTime()){this.option("currentDate",new Date(n));return}var r=this._getViewsOffset(this._view.option("date"),n);r!==0&&!this._isMaxZoomLevel()&&this._isOtherViewCellClicked&&(r=0),this._view&&r!==0&&!this._suppressNavigation?this._navigate(r,n):(this._renderNavigator(),this._setViewContoured(n),this._updateAriaId(n))},_setViewContoured:function(e){(this.option("skipFocusCheck")||cY(this._focusTarget()))&&this._view.option("contouredDate",e)},_getMinDate:function(){return this.min?this.min:(this.min=this._dateOption("min")||new Date(1e3,0),this.min)},_getMaxDate:function(){return this.max?this.max:(this.max=this._dateOption("max")||new Date(3e3,0),this.max)},_getViewsOffset:function(e,t){var i=this.option("zoomLevel");if(i===Di.MONTH)return this._getMonthsOffset(e,t);var n;switch(i){case Di.CENTURY:n=100;break;case Di.DECADE:n=10;break;default:n=1}return parseInt(t.getFullYear()/n)-parseInt(e.getFullYear()/n)},_getMonthsOffset:function(e,t){var i=t.getFullYear()-e.getFullYear(),n=t.getMonth()-e.getMonth();return 12*i+n},_waitRenderView:function(e){if(!this._alreadyViewRender){this._alreadyViewRender=!0;var t=this._getDateByOffset(e*this._getRtlCorrection());this._moveToClosestAvailableDate(t),this._waitRenderViewTimeout=setTimeout(()=>{this._alreadyViewRender=!1})}},_getRtlCorrection:function(){return this.option("rtlEnabled")?-1:1},_getDateByOffset:function(e,t){var i;t=this._getDate((i=t)!==null&&i!==void 0?i:this.option("currentDate"));var n=t.getDate(),r=Fe.getDifferenceInMonth(this.option("zoomLevel"))*e;t.setDate(1),t.setMonth(t.getMonth()+r);var a=Fe.getLastMonthDate(t).getDate();return t.setDate(n>a?a:n),t},_focusTarget:function(){return this.$element()},_initMarkup:function(){this._renderSubmitElement(),this.callBase();var e=this.$element();e.addClass(Qq),this._renderBody(),e.append(this.$body),this._renderViews(),this._renderNavigator(),e.append(this._navigator.$element()),this._renderSwipeable(),this._renderFooter(),this._updateAriaSelected(),this._updateAriaId(),this._moveToClosestAvailableDate()},_render:function(){this.callBase(),this._setViewContoured(this.option("currentDate"))},_renderBody:function(){this._$viewsWrapper||(this.$body=v("<div>").addClass(eY),this._$viewsWrapper=v("<div>").addClass(aY),this.$body.append(this._$viewsWrapper))},_getKeyboardListeners(){return this.callBase().concat([this._view])},_renderViews:function(){this.$element().addClass(bS+"-"+this.option("zoomLevel"));var e=this.option("currentDate");if(this._view=this._renderSpecificView(e),Ue()){var t=this._getDateByOffset(-1,e);this._beforeView=this._isViewAvailable(t)?this._renderSpecificView(t):null;var i=this._getDateByOffset(1,e);i.setDate(1),this._afterView=this._isViewAvailable(i)?this._renderSpecificView(i):null}this._translateViews()},_renderSpecificView:function(e){var t=Jq[this.option("zoomLevel")],i=v("<div>").appendTo(this._$viewsWrapper),n=this._viewConfig(e);return this._createComponent(i,t,n)},_viewConfig:function(e){var t=this.option("disabledDates");return t=Ie(t)?this._injectComponent(t.bind(this)):t,{date:e,min:this._getMinDate(),max:this._getMaxDate(),firstDayOfWeek:this.option("firstDayOfWeek"),value:this._dateOption("value"),tabIndex:void 0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),disabledDates:t,onCellClick:this._cellClickHandler.bind(this),cellTemplate:this._getTemplateByOption("cellTemplate"),allowValueSelection:this._isMaxZoomLevel(),_todayDate:this.option("_todayDate")}},_injectComponent:function(e){var t=this;return function(i){return k(i,{component:t}),e(i)}},_isViewAvailable:function(e){var t=this.option("zoomLevel"),i=Fe.getViewMinBoundaryDate(t,this._getMinDate()),n=Fe.getViewMaxBoundaryDate(t,this._getMaxDate());return Fe.dateInRange(e,i,n)},_translateViews:function(){ri(this._view.$element(),{left:0,top:0}),this._beforeView&&ri(this._beforeView.$element(),{left:this._getViewPosition(-1),top:0}),this._afterView&&ri(this._afterView.$element(),{left:this._getViewPosition(1),top:0})},_getViewPosition:function(e){var t=this.option("rtlEnabled")?-1:1;return 100*e*t+"%"},_cellClickHandler:function(e){var t=this.option("zoomLevel"),i=Fe.getViewDown(t),n=this._isMaxZoomLevel();if(i&&!n)this._navigateDown(e.event.currentTarget);else{var r=this._updateTimeComponent(e.value);this._dateValue(r,e.event),this._cellClickAction(e)}},_updateTimeComponent:function(e){var t=new Date(e),i=this._dateOption("value");return i&&(t.setHours(i.getHours()),t.setMinutes(i.getMinutes()),t.setSeconds(i.getSeconds()),t.setMilliseconds(i.getMilliseconds())),t},_isMaxZoomLevel:function(){return this.option("zoomLevel")===this.option("maxZoomLevel")},_navigateDown:function(e){var t=this.option("zoomLevel");if(!this._isMaxZoomLevel()){var i=Fe.getViewDown(t);if(i){var n=this._view.option("contouredDate")||this._view.option("date");e&&(n=v(e).data(dY)),this._isOtherViewCellClicked=!0,this.option("currentDate",n),this.option("zoomLevel",i),this._isOtherViewCellClicked=!1,this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate")))}}},_renderNavigator:function(){this._navigator||(this._navigator=new Kq(v("<div>"),this._navigatorConfig())),this._navigator.option("text",this._view.getNavigatorCaption()),this._updateButtonsVisibility()},_navigatorConfig:function(){return{text:this._view.getNavigatorCaption(),onClick:this._navigatorClickHandler.bind(this),onCaptionClick:this._navigateUp.bind(this),rtlEnabled:this.option("rtlEnabled")}},_navigatorClickHandler:function(e){var t=this._getDateByOffset(e.direction,this.option("currentDate"));this._moveToClosestAvailableDate(t)},_navigateUp:function(){var e=this.option("zoomLevel"),t=Fe.getViewUp(e);!t||this._isMinZoomLevel(e)||(this.option("zoomLevel",t),this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate"))))},_isMinZoomLevel:function(e){var t=this._getMinDate(),i=this._getMaxDate();return Fe.sameView(e,t,i)||this.option("minZoomLevel")===e},_updateButtonsVisibility:function(){this._navigator.toggleButton("next",!E(this._getRequiredView("next"))),this._navigator.toggleButton("prev",!E(this._getRequiredView("prev")))},_renderSwipeable:function(){this._swipeable||(this._swipeable=this._createComponent(this.$element(),Sh,{onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._viewWidth.bind(this)}))},_swipeStartHandler:function(e){zt.stop(this._$viewsWrapper,!0),e.event.maxLeftOffset=this._getRequiredView("next")?1:0,e.event.maxRightOffset=this._getRequiredView("prev")?1:0},_getRequiredView:function(e){var t,i=this.option("rtlEnabled");return e==="next"?t=i?this._beforeView:this._afterView:e==="prev"&&(t=i?this._afterView:this._beforeView),t},_swipeUpdateHandler:function(e){var t=e.event.offset;ri(this._$viewsWrapper,{left:t*this._viewWidth(),top:0}),this._updateNavigatorCaption(t)},_swipeEndHandler:function(e){var t=e.event.targetOffset,i=t?t/Math.abs(t):0;if(i===0){this._animateWrapper(0,rv);return}var n=this._getDateByOffset(-i*this._getRtlCorrection());this._isDateInInvalidRange(n)&&(i>=0?n=new Date(this._getMinDate()):n=new Date(this._getMaxDate())),this.option("currentDate",n)},_viewWidth:function(){return this._viewWidthValue||(this._viewWidthValue=He(this.$element())),this._viewWidthValue},_updateNavigatorCaption:function(e){e*=this._getRtlCorrection();var t=this._view;e>.5&&this._beforeView?t=this._beforeView:e<-.5&&this._afterView&&(t=this._afterView),this._navigator.option("text",t.getNavigatorCaption())},_isDateInInvalidRange:function(e){if(!this._view.isBoundary(e)){var t=this._getMinDate(),i=this._getMaxDate(),n=Fe.normalizeDate(e,t,i);return n===t||n===i}},_renderFooter:function(){var e=this.option("showTodayButton");if(e){var t=this._createComponent(v("<a>"),Ii,{focusStateEnabled:!1,text:fe.format("dxCalendar-todayButtonText"),onClick:(function(i){this._toTodayView(i)}).bind(this),integrationOptions:{}}).$element().addClass(nY);this._$footer=v("<div>").addClass(iY).append(t),this.$element().append(this._$footer)}this.$element().toggleClass(rY,e)},_renderSubmitElement:function(){this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue:function(e){var t=this._convertToDate(e);this._getSubmitElement().val(ci.serializeDate(t,uY))},_getSubmitElement:function(){return this._$submitElement},_animateShowView:function(){return zt.stop(this._view.$element(),!0),this._popAnimationView(this._view,sY,lY,rv).promise()},_popAnimationView:function(e,t,i,n){return zt.animate(e.$element(),{type:"pop",from:{scale:t,opacity:t},to:{scale:i,opacity:i},duration:n})},_navigate:function(e,t){if(e!==0&&Math.abs(e)!==1&&this._isViewAvailable(t)){var i=this._renderSpecificView(t);e>0?(this._afterView&&this._afterView.$element().remove(),this._afterView=i):(this._beforeView&&this._beforeView.$element().remove(),this._beforeView=i),this._translateViews()}var n=this._getRtlCorrection(),r=e>0?1:e<0?-1:0,a=-n*r*this._viewWidth(),o=this._$viewsWrapper.position().left;o!==a&&(this._preventViewChangeAnimation?this._wrapperAnimationEndHandler(e,t):this._animateWrapper(a,rv).done(this._wrapperAnimationEndHandler.bind(this,e,t)))},_animateWrapper:function(e,t){return zt.animate(this._$viewsWrapper,{type:"slide",from:{left:this._$viewsWrapper.position().left},to:{left:e},duration:t})},_getDate:e=>new Date(e),_toTodayView:function(e){this._saveValueChangeEvent(e.event);var t=new Date;if(this._isMaxZoomLevel()){this._dateOption("value",t);return}this._preventViewChangeAnimation=!0,this.option("zoomLevel",this.option("maxZoomLevel")),this._dateOption("value",t),this._animateShowView(),this._preventViewChangeAnimation=!1},_wrapperAnimationEndHandler:function(e,t){this._rearrangeViews(e),this._translateViews(),this._resetLocation(),this._renderNavigator(),this._setViewContoured(t),this._updateAriaId(t)},_rearrangeViews:function(e){if(e!==0){var t,i,n;if(e<0?(t=1,i="_beforeView",n="_afterView"):(t=-1,i="_afterView",n="_beforeView"),!!this[i]){var r=this[i].option("date");this[n]&&this[n].$element().remove(),e===t?this[n]=this._view:(this[n]=this._renderSpecificView(this._getDateByOffset(t,r)),this._view.$element().remove()),this._view=this[i];var a=this._getDateByOffset(-t,r);this[i]=this._isViewAvailable(a)?this._renderSpecificView(a):null}}},_resetLocation:function(){ri(this._$viewsWrapper,{left:0,top:0})},_clean:function(){this.callBase(),this._clearViewWidthCache(),delete this._$viewsWrapper,delete this._navigator,delete this._$footer},_clearViewWidthCache:function(){delete this._viewWidthValue},_disposeViews:function(){this._view.$element().remove(),this._beforeView&&this._beforeView.$element().remove(),this._afterView&&this._afterView.$element().remove(),delete this._view,delete this._beforeView,delete this._afterView},_dispose:function(){clearTimeout(this._waitRenderViewTimeout),this.callBase()},_refreshViews:function(){this._disposeViews(),this._renderViews()},_visibilityChanged:function(){this._translateViews()},_focusInHandler:function(){this.callBase.apply(this,arguments),this._view.option("contouredDate",this.option("currentDate"))},_focusOutHandler:function(){this.callBase.apply(this,arguments),this._view.option("contouredDate",null)},_updateViewsValue:function(e){var t=e?new Date(e):null;this._view.option("value",t),this._beforeView&&this._beforeView.option("value",t),this._afterView&&this._afterView.option("value",t)},_updateAriaSelected:function(e,t){var i;e=(i=e)!==null&&i!==void 0?i:this._dateOption("value");var n=this._view._getCellByDate(t),r=this._view._getCellByDate(e);this.setAria("selected",void 0,n),this.setAria("selected",!0,r),e&&this.option("currentDate").getTime()===e.getTime()&&this._updateAriaId(e)},_updateAriaId:function(e){var t;e=(t=e)!==null&&t!==void 0?t:this.option("currentDate");var i="dx-"+new si,n=this._view._getCellByDate(e);this.setAria("id",i,n),this.setAria("activedescendant",i),this._onContouredChanged(i)},_suppressingNavigation:function(e,t){this._suppressNavigation=!0,e.apply(this,t),delete this._suppressNavigation},_optionChanged:function(e){var t=e.value,i=e.previousValue;switch(e.name){case"width":this.callBase(e),this._clearViewWidthCache();break;case"min":case"max":this.min=void 0,this.max=void 0,this._suppressingNavigation(this._updateCurrentDate,[this.option("currentDate")]),this._refreshViews(),this._renderNavigator();break;case"firstDayOfWeek":this._refreshViews(),this._updateButtonsVisibility();break;case"currentDate":this.setAria("id",void 0,this._view._getCellByDate(i)),this._updateCurrentDate(t);break;case"zoomLevel":this.$element().removeClass(bS+"-"+i),this._correctZoomLevel(),this._refreshViews(),this._renderNavigator(),this._updateAriaId();break;case"minZoomLevel":case"maxZoomLevel":this._correctZoomLevel(),this._updateButtonsVisibility();break;case"value":t=this._convertToDate(t),i=this._convertToDate(i),this._updateAriaSelected(t,i),this.option("currentDate",E(t)?new Date(t):new Date),this._updateViewsValue(t),this._setSubmitValue(t),this.callBase(e);break;case"onCellClick":this._view.option("onCellClick",t);break;case"onContouredChanged":this._onContouredChanged=this._createActionByOption("onContouredChanged");break;case"disabledDates":case"dateSerializationFormat":case"cellTemplate":case"showTodayButton":this._invalidate();break;case"skipFocusCheck":break;case"_todayDate":this._refreshViews();break;default:this.callBase(e)}},getContouredDate:function(){return this._view.option("contouredDate")}});tt("dxCalendar",CR);var Jd=it.abstract,hf=it.inherit({ctor:function(e){this.dateBox=e},widgetOption:function(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget:function(e){e=e||v("<div>"),this._widget=this._createWidget(e),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget:function(e){var t=this._getWidgetName(),i=this._getWidgetOptions();return this.dateBox._createComponent(e,t,i)},_getWidgetOptions:Jd,_getWidgetName:Jd,getDefaultOptions:function(){return{mode:"text"}},getDisplayFormat:Jd,supportedKeys:re,getKeyboardListener:re,customizeButtons:re,getParsedText:function(e,t){var i=Xe.parse(e,t);return i||Xe.parse(e)},renderInputMinMax:re,renderOpenedState:function(){this._updateValue()},popupConfig:Jd,_dimensionChanged:function(){var e;(e=this._getPopup())===null||e===void 0||e.repaint()},renderPopupContent:function(){var e=this._getPopup();this._renderWidget();var t=e.$content().parent();R.off(t,"mousedown"),R.on(t,"mousedown",this._preventFocusOnPopup.bind(this))},getFirstPopupElement:re,getLastPopupElement:re,_preventFocusOnPopup:function(e){e.preventDefault()},_getWidgetContainer:function(){return this._getPopup().$content()},_getPopup:function(){return this.dateBox._popup},popupShowingHandler:re,popupHiddenHandler:re,_updateValue:function(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:re,getDefaultDate:function(){return new Date},textChangedHandler:re,renderValue:function(){this.dateBox.option("opened")&&this._updateValue()},getValue:function(){return this._widget.option("value")},isAdaptivityChanged:function(){return!1},dispose:function(){var e=this._getPopup();e&&e.$content().empty()},dateBoxValue:function(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}}),yR=hf.inherit({NAME:"Calendar",supportedKeys:function(){var e=function(t){return this.option("opened")?(t.preventDefault(),!0):!1};return{rightArrow:function(){if(this.option("opened"))return!0},leftArrow:function(){if(this.option("opened"))return!0},enter:(function(t){if(this.dateBox.option("opened"))if(t.preventDefault(),this._widget.option("zoomLevel")===this._widget.option("maxZoomLevel")){var i=this._getContouredValue(),n=this._lastActionElement,r=this._closeDropDownByEnter();return r&&i&&n==="calendar"&&this.dateBoxValue(i,t),r&&this.dateBox.close(),this.dateBox._valueChangeEventHandler(t),!r}else return!0;else this.dateBox._valueChangeEventHandler(t)}).bind(this),home:e,end:e}},getDisplayFormat:function(e){return e||"shortdate"},_closeDropDownByEnter:()=>!0,_getWidgetName:function(){return CR},_getContouredValue:function(){return this._widget._view.option("contouredDate")},getKeyboardListener(){return this._widget},_getWidgetOptions:function(){var e=this.dateBox.option("disabledDates");return k(this.dateBox.option("calendarOptions"),{value:this.dateBoxValue()||null,dateSerializationFormat:null,min:this.dateBox.dateOption("min"),max:this.dateBox.dateOption("max"),onValueChanged:this._valueChangedHandler.bind(this),onCellClick:this._cellClickHandler.bind(this),tabIndex:null,disabledDates:Ie(e)?this._injectComponent(e.bind(this.dateBox)):e,onContouredChanged:this._refreshActiveDescendant.bind(this),skipFocusCheck:!0})},_injectComponent:function(e){var t=this;return function(i){return k(i,{component:t.dateBox}),e(i)}},_refreshActiveDescendant:function(e){this._lastActionElement="calendar",this.dateBox.setAria("activedescendant",e.actionValue)},popupConfig:function(e){var t=e.toolbarItems,i=this.dateBox.option("buttonsLocation"),n=[];return i!=="default"?n=Do(i):n=["bottom","center"],this.dateBox.option("applyValueMode")==="useButtons"&&this._isCalendarVisible()&&t.unshift({widget:"dxButton",toolbar:n[0],location:n[1]==="after"?"before":n[1],options:{onInitialized:(function(r){r.component.registerKeyHandler("escape",this._escapeHandler.bind(this))}).bind(this),onClick:r=>{this._widget._toTodayView(r)},text:fe.format("dxCalendar-todayButtonText"),type:"today"}}),k(!0,e,{toolbarItems:t,position:{collision:"flipfit flip"},width:"auto"})},_isCalendarVisible:function(){return Pn(this.dateBox.option("calendarOptions"))||this.dateBox.option("calendarOptions.visible")!==!1},_escapeHandler:function(){this.dateBox.close(),this.dateBox.focus()},_valueChangedHandler:function(e){var t=this.dateBox,i=e.value,n=e.previousValue;Fe.sameDate(i,n)||t.option("applyValueMode")==="instantly"&&this.dateBoxValue(this.getValue(),e.event)},_updateValue:function(){this._widget&&this._widget.option("value",this.dateBoxValue())},textChangedHandler:function(){this._lastActionElement="input",this.dateBox.option("opened")&&this._widget&&this._updateValue(!0)},_cellClickHandler:function(e){var t=this.dateBox;t.option("applyValueMode")==="instantly"&&(t.option("opened",!1),this.dateBoxValue(this.getValue(),e.event))}});class hY{constructor(t){this.DIRECTION_HORIZONTAL="horizontal",this.DIRECTION_VERTICAL="vertical",this.DIRECTION_BOTH="both",this.direction=t??hh}get isHorizontal(){return this.direction===bD||this.direction===mp}get isVertical(){return this.direction===hh||this.direction===mp}get isBoth(){return this.direction===mp}}function fY(e,t){if(Ye(e)){var i=Mt(e.left,e.x),n=Mt(e.top,e.y);return{left:E(i)?i:void 0,top:E(n)?n:void 0}}var{isHorizontal:r,isVertical:a}=new hY(t);return{left:r&&E(e)?e:void 0,top:a&&E(e)?e:void 0}}var pY="dx-dateviewroller",vY="dx-state-active",_Y="dx-dateviewroller-current",SS="dx-dateview-item",mY="dx-dateview-item-selected",gY="dx-dateview-item-selected-frame",CY="dx-dateview-item-selected-border";class xR extends _n{_getDefaultOptions(){return k(super._getDefaultOptions(),{showScrollbar:"never",useNative:!1,selectedIndex:0,bounceEnabled:!1,items:[],showOnClick:!1,onClick:null,onSelectedIndexChanged:null,scrollByContent:!0})}_init(){super._init(),this.option("onVisibilityChange",this._visibilityChangedHandler.bind(this)),this.option("onEnd",this._endActionHandler.bind(this))}_render(){super._render(),this._renderSelectedItemFrame(),this.$element().addClass(pY),this._renderContainerClick(),this._renderItems(),this._renderSelectedValue(),this._renderItemsClick(),this._renderWheelEvent(),this._renderSelectedIndexChanged()}_renderSelectedIndexChanged(){this._selectedIndexChanged=this._createActionByOption("onSelectedIndexChanged")}_renderWheelEvent(){R.on(v(this.container()),"dxmousewheel",t=>{this._isWheelScrolled=!0})}_renderContainerClick(){if(this.option("showOnClick")){var t=ye(vt,this.NAME),i=this._createActionByOption("onClick");R.off(v(this.container()),t),R.on(v(this.container()),t,function(n){i({event:n})})}}_renderItems(){var t=this.option("items")||[],i=v();v(this.content()).empty(),t.forEach(function(n){i=i.add(v("<div>").addClass(SS).append(n))}),v(this.content()).append(i),this._$items=i,this.update()}_renderSelectedItemFrame(){v("<div>").addClass(gY).append(v("<div>").addClass(CY)).appendTo(v(this.container()))}_renderSelectedValue(t){var i=this._fitIndex(t??this.option("selectedIndex"));this._moveTo({top:this._getItemPosition(i)}),this._renderActiveStateItem()}_fitIndex(t){var i=this.option("items")||[],n=i.length;return t>=n?n-1:t<0?0:t}_getItemPosition(t){return Math.round(this._itemHeight()*t)}_renderItemsClick(){var t=this._getItemSelector(),i=ye(vt,this.NAME);R.off(this.$element(),i,t),R.on(this.$element(),i,t,this._itemClickHandler.bind(this))}_getItemSelector(){return"."+SS}_itemClickHandler(t){this.option("selectedIndex",this._itemElementIndex(t.currentTarget))}_itemElementIndex(t){return this._itemElements().index(t)}_itemElements(){return this.$element().find(this._getItemSelector())}_renderActiveStateItem(){var t=this.option("selectedIndex");V(this._$items,function(i){v(this).toggleClass(mY,t===i)})}_shouldScrollToNeighborItem(){return Re.real().deviceType==="desktop"&&this._isWheelScrolled}_moveTo(t){var{top:i,left:n}=fY(t),r=this.scrollOffset(),a={x:r.left-n,y:r.top-i};if(this._isVisible()&&(a.x||a.y))if(this._prepareDirections(!0),this._animation&&!this._shouldScrollToNeighborItem()){var o=this;zt.stop(v(this.content())),zt.animate(v(this.content()),{duration:200,type:"slide",to:{top:Math.floor(a.y)},complete(){Wu(v(o.content())),o.handleMove({delta:a})}}),delete this._animation}else this.handleMove({delta:a})}_validate(t){return this._moveIsAllowed(t)}_fitSelectedIndexInRange(t){var i=this.option("items").length;return Math.max(Math.min(t,i-1),0)}_isInNullNeighborhood(t){return-.1<=t&&t<=.1}_getSelectedIndexAfterScroll(t){var i=this.scrollOffset().top,n=t*this._itemHeight(),r=i-n;if(this._isInNullNeighborhood(r))return t;var a=r>0?1:-1,o=this._fitSelectedIndexInRange(t+a);return o}_getNewSelectedIndex(t){if(this._shouldScrollToNeighborItem())return this._getSelectedIndexAfterScroll(t);this._animation=!0;var i=this.scrollOffset().top/this._itemHeight();return Math.round(i)}_endActionHandler(){var t=this.option("selectedIndex"),i=this._getNewSelectedIndex(t);i===t?this._renderSelectedValue(i):this.option("selectedIndex",i),this._isWheelScrolled=!1}_itemHeight(){var t=this._$items.first();return Ke(t)}_toggleActive(t){this.$element().toggleClass(vY,t)}_isVisible(){return v(this.container()).is(":visible")}_fireSelectedIndexChanged(t,i){this._selectedIndexChanged({value:t,previousValue:i,event:void 0})}_visibilityChanged(t){super._visibilityChanged(t),this._visibilityChangedHandler(t)}_visibilityChangedHandler(t){t&&(this._visibilityTimer=setTimeout(()=>{this._renderSelectedValue(this.option("selectedIndex"))})),this.toggleActiveState(!1)}toggleActiveState(t){this.$element().toggleClass(_Y,t)}_refreshSelectedIndex(){var t=this.option("selectedIndex"),i=this._fitIndex(t);i===t?this._renderActiveStateItem():this.option("selectedIndex",i)}_optionChanged(t){switch(t.name){case"selectedIndex":this._fireSelectedIndexChanged(t.value,t.previousValue),this._renderSelectedValue(t.value);break;case"items":this._renderItems(),this._refreshSelectedIndex();break;case"onClick":case"showOnClick":this._renderContainerClick();break;case"onSelectedIndexChanged":this._renderSelectedIndexChanged();break;default:super._optionChanged(t)}}_dispose(){clearTimeout(this._visibilityTimer),super._dispose()}}tt("dxDateViewRoller",xR);var av="dx-dateview",yY="dx-dateview-compact",xY="dx-dateview-wrapper",bY="dx-dateview-rollers",SY="dx-dateviewroller",ES={date:"date"},tn={year:"year",month:"month",day:"day",hours:"hours"},bR=Yn.inherit({_valueOption:function(){var e=this.option("value"),t=new Date(e);return!e||isNaN(t)?this._getDefaultDate():t},_getDefaultDate:function(){var e=new Date;return this.option("type")===ES.date?new Date(e.getFullYear(),e.getMonth(),e.getDate()):e},_getDefaultOptions:function(){return k(this.callBase(),{minDate:_t.MIN_DATEVIEW_DEFAULT_DATE,maxDate:_t.MAX_DATEVIEW_DEFAULT_DATE,type:ES.date,value:new Date,applyCompactClass:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(e){return e.deviceType!=="desktop"},options:{applyCompactClass:!0}}])},_render:function(){this.callBase(),this.$element().addClass(av),this._toggleFormatClasses(this.option("type")),this._toggleCompactClass()},_toggleFormatClasses:function(e,t){this.$element().addClass(av+"-"+e),t&&this.$element().removeClass(av+"-"+t)},_toggleCompactClass:function(){this.$element().toggleClass(yY,this.option("applyCompactClass"))},_wrapper:function(){return this._$wrapper},_renderContentImpl:function(){this._$wrapper=v("<div>").addClass(xY),this._renderRollers(),this._$wrapper.appendTo(this.$element())},_renderRollers:function(){this._$rollersContainer||(this._$rollersContainer=v("<div>").addClass(bY)),this._$rollersContainer.empty(),this._createRollerConfigs(),this._rollers={};var e=this;V(e._rollerConfigs,function(t){var i=v("<div>").appendTo(e._$rollersContainer).addClass(SY+"-"+e._rollerConfigs[t].type);e._rollers[e._rollerConfigs[t].type]=e._createComponent(i,xR,{items:e._rollerConfigs[t].displayItems,selectedIndex:e._rollerConfigs[t].selectedIndex,showScrollbar:"never",scrollByContent:!0,onStart:function(n){var r=n.component;r._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],r.option("selectedIndex"))},onEnd:function(n){var r=n.component;r._toggleActive(!1)},onClick:function(n){var r=n.component;r._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],r.option("selectedIndex")),e._setRollerState(e._rollerConfigs[t],r.option("selectedIndex")),r._toggleActive(!1)},onSelectedIndexChanged:function(n){var r=n.component;e._setRollerState(e._rollerConfigs[t],r.option("selectedIndex"))}})}),e._$rollersContainer.appendTo(e._wrapper())},_createRollerConfigs:function(e){var t=this;e=e||t.option("type"),t._rollerConfigs={},Xe.getFormatParts(_t.FORMATS_MAP[e]).forEach(function(i){t._createRollerConfig(i)})},_createRollerConfig:function(e){for(var t=_t.DATE_COMPONENTS_INFO[e],i=this._calculateRollerConfigValueRange(e),n=i.startValue,r=i.endValue,a=t.formatter,o=this._getCurrentDate(),s={type:e,setValue:t.setter,valueItems:[],displayItems:[],getIndex:function(u){return u[t.getter]()-n}},l=n;l<=r;l++)s.valueItems.push(l),s.displayItems.push(a(l,o));s.selectedIndex=s.getIndex(o),this._rollerConfigs[e]=s},_setActiveRoller:function(e){var t=e&&this._rollers[e.type];V(this._rollers,function(){this.toggleActiveState(this===t)})},_updateRollersPosition:function(){var e=this;V(this._rollers,function(t){var i=e._rollerConfigs[t].getIndex(e._getCurrentDate());this.option("selectedIndex",i)})},_setRollerState:function(e,t){if(t!==e.selectedIndex){var i=e.valueItems[t],n=e.setValue,r=new Date(this._getCurrentDate()),a=r.getDate(),o=this.option("minDate"),s=this.option("maxDate");e.type===tn.month?a=Math.min(a,_t.getMaxMonthDay(r.getFullYear(),i)):e.type===tn.year&&(a=Math.min(a,_t.getMaxMonthDay(i,r.getMonth()))),r.setDate(a),r[n](i);var l=Fe.normalizeDate(r,o,s);r=_t.mergeDates(l,r,"time"),r=Fe.normalizeDate(r,o,s),this.option("value",r),e.selectedIndex=t}e.type===tn.year&&this._refreshRollers(),e.type===tn.month&&(this._refreshRoller(tn.day),this._refreshRoller(tn.hours))},_refreshRoller:function(e){var t=this._rollers[e];if(t){this._createRollerConfig(e);var i=this._rollerConfigs[e];(e===tn.day||i.displayItems.toString()!==t.option("items").toString())&&t.option({items:i.displayItems,selectedIndex:i.selectedIndex})}},_getCurrentDate:function(){var e=this._valueOption(),t=this.option("minDate"),i=this.option("maxDate");return Fe.normalizeDate(e,t,i)},_calculateRollerConfigValueRange:function(e){var t=this._getCurrentDate(),i=this.option("minDate"),n=this.option("maxDate"),r=Fe.sameYear(t,i),a=r&&t.getMonth()===i.getMonth(),o=Fe.sameYear(t,n),s=o&&t.getMonth()===n.getMonth(),l=a&&t.getDate()===i.getDate(),u=s&&t.getDate()===n.getDate(),d=_t.DATE_COMPONENTS_INFO[e],c=d.startValue,h=d.endValue;return e===tn.year&&(c=i.getFullYear(),h=n.getFullYear()),e===tn.month&&(r&&(c=i.getMonth()),o&&(h=n.getMonth())),e===tn.day&&(h=_t.getMaxMonthDay(t.getFullYear(),t.getMonth()),r&&a&&(c=i.getDate()),o&&s&&(h=n.getDate())),e===tn.hours&&(c=l?i.getHours():c,h=u?n.getHours():h),{startValue:c,endValue:h}},_refreshRollers:function(){this._refreshRoller(tn.month),this._refreshRoller(tn.day),this._refreshRoller(tn.hours)},_optionChanged:function(e){switch(e.name){case"minDate":case"maxDate":case"type":this._renderRollers(),this._toggleFormatClasses(e.value,e.previousValue);break;case"visible":this.callBase(e),e.value&&this._renderRollers();break;case"value":this.option("value",this._valueOption()),this._refreshRollers(),this._updateRollersPosition();break;default:this.callBase(e)}},_clean:function(){this.callBase(),delete this._$rollersContainer}});tt("dxDateView",bR);var EY=je(),wY=hf.inherit({NAME:"DateView",getDefaultOptions:function(){return k(this.callBase(),{openOnFieldClick:!0,applyButtonText:fe.format("OK"),"dropDownOptions.showTitle":!0})},getDisplayFormat:function(e){return e||_t.FORMATS_MAP[this.dateBox.option("type")]},popupConfig:function(e){return{toolbarItems:this.dateBox._popupToolbarItemsConfig(),onInitialized:e.onInitialized,defaultOptionsRules:[{device:{platform:"android"},options:{width:333,height:331}},{device:function(t){var i=t.platform;return i==="generic"||i==="ios"},options:{width:"auto",height:"auto"}},{device:function(t){var i=t.platform,n=t.phone;return i==="generic"&&n},options:{width:333,maxWidth:"100%",maxHeight:"100%",height:"auto",position:{collision:"flipfit flip"}}},{device:{platform:"ios",phone:!0},options:{width:"100%",position:{my:"bottom",at:"bottom",of:EY}}}]}},_renderWidget:function(){if(Hh(this.dateBox.option("mode"))&&this.dateBox._isNativeType()||this.dateBox.option("readOnly")){this._widget&&(this._widget.$element().remove(),this._widget=null);return}var e=this._getPopup();if(this._widget)this._widget.option(this._getWidgetOptions());else{var t=v("<div>").appendTo(e.$content());this._widget=this._createWidget(t)}this._widget.$element().appendTo(this._getWidgetContainer())},_getWidgetName:function(){return bR},renderOpenedState:function(){this.callBase(),this._widget&&this._widget.option("value",this._widget._getCurrentDate())},_getWidgetOptions:function(){return{value:this.dateBoxValue()||new Date,type:this.dateBox.option("type"),minDate:this.dateBox.dateOption("min")||new Date(1900,0,1),maxDate:this.dateBox.dateOption("max")||new Date(Date.now()+50*_t.ONE_YEAR),onDisposing:(function(){this._widget=null}).bind(this)}}}),IY=hf.inherit({NAME:"Native",popupConfig:function(e){return k({},e,{width:"auto"})},getParsedText:function(e){return e?this.dateBox.option("type")==="datetime"?new Date(e.replace(/-/g,"/").replace("T"," ").split(".")[0]):_t.fromStandardDateFormat(e):null},renderPopupContent:re,_getWidgetName:re,_getWidgetOptions:re,_getDateBoxType:function(){var e=this.dateBox.option("type");return _t.SUPPORTED_FORMATS.includes(e)?e==="datetime"&&!Hh(e)&&(e="datetime-local"):e="date",e},customizeButtons:function(){var e=this.dateBox.getButton("dropDown");Re.real().android&&e&&e.on("click",(function(){this.dateBox._input().get(0).click()}).bind(this))},getDefaultOptions:function(){return{mode:this._getDateBoxType()}},getDisplayFormat:function(e){var t=this._getDateBoxType();return e||_t.FORMATS_MAP[t]},renderInputMinMax:function(e){e.attr({min:ci.serializeDate(this.dateBox.dateOption("min"),"yyyy-MM-dd"),max:ci.serializeDate(this.dateBox.dateOption("max"),"yyyy-MM-dd")})}}),wS="dx-box",IS=".dx-box",TY="dx-box-item",Ts="dxBoxItemData",SR={row:"minWidth",col:"minHeight"},ER={row:"maxWidth",col:"maxHeight"},cm=1,TS={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around"},AS={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"},AY={row:"row",col:"column"},us=(e,t,i)=>{if(i=Ms(t,i),e.style[Ta(t)]=i,!Ue()){if(i===""||!E(i))return;var n=ag(t),r=n+": "+i+";";e.attributes.style?e.attributes.style.value.indexOf(r)<0&&(e.attributes.style.value+=" "+r):e.setAttribute("style",r)}},DY="dxBox",ov="dxupdate."+DY,DS="dx-box-fallback-item",OY={row:"nowrap",col:"normal"},Qa={row:{name:"width",getter:He,setter:Fu},col:{name:"height",getter:Ke,setter:gn}},Qd={row:Qa.col,col:Qa.row},ec={row:"marginLeft",col:"marginTop"},sv={row:"marginRight",col:"marginBottom"},lv={row:"marginTop",col:"marginLeft"},OS={row:"marginBottom",col:"marginRight"},RY={marginLeft:"marginRight",marginRight:"marginLeft"};class kY extends Lo{_renderVisible(t,i){super._renderVisible(t),E(i)&&this._options.fireItemStateChangedAction({name:"visible",state:t,oldState:i})}}class BY{constructor(t,i){this._$element=t,this._option=i,this.initSize=re,this.update=re}renderBox(){this._$element.css({display:Sc("flexDirection")+"flex"}),us(this._$element.get(0),"flexDirection",AY[this._option("direction")])}renderAlign(){this._$element.css({justifyContent:this._normalizedAlign()})}_normalizedAlign(){var t=this._option("align");return t in TS?TS[t]:t}renderCrossAlign(){this._$element.css({alignItems:this._normalizedCrossAlign()})}_normalizedCrossAlign(){var t=this._option("crossAlign");return t in AS?AS[t]:t}renderItems(t){var i=Sc("flexDirection"),n=this._option("direction");V(t,function(){var r=v(this),a=r.data(Ts);r.css({display:i+"flex"}).css(ER[n],a.maxSize||"none").css(SR[n],a.minSize||"0"),us(r.get(0),"flexBasis",a.baseSize||0),us(r.get(0),"flexGrow",a.ratio),us(r.get(0),"flexShrink",E(a.shrink)?a.shrink:cm),r.children().each((o,s)=>{v(s).css({width:"auto",height:"auto",display:Sc("flexDirection")+"flex",flexBasis:0}),us(s,"flexGrow",1),us(s,"flexDirection",v(s)[0].style.flexDirection||"column")})})}}class LY{constructor(t,i){this._$element=t,this._option=i}renderBox(){this._$element.css({fontSize:0,whiteSpace:OY[this._option("direction")],verticalAlign:"top"}),R.off(this._$element,ov),R.on(this._$element,ov,this.update.bind(this))}renderAlign(){var t=this._$items;if(t){var i=this._option("align"),n=this.totalItemSize,r=this._option("direction"),a=Qa[r].getter(this._$element),o=a-n,s=0;switch(this._setItemsMargins(t,r,0),i){case"start":break;case"end":s=o,t.first().css(this._chooseMarginSide(ec[r]),s);break;case"center":s=.5*o,t.first().css(this._chooseMarginSide(ec[r]),s),t.last().css(this._chooseMarginSide(sv[r]),s);break;case"space-between":s=.5*o/(t.length-1),this._setItemsMargins(t,r,s),t.first().css(this._chooseMarginSide(ec[r]),0),t.last().css(this._chooseMarginSide(sv[r]),0);break;case"space-around":s=.5*o/t.length,this._setItemsMargins(t,r,s)}}}_setItemsMargins(t,i,n){t.css(this._chooseMarginSide(ec[i]),n).css(this._chooseMarginSide(sv[i]),n)}renderCrossAlign(){var t=this._$items;if(t){var i=this._option("crossAlign"),n=this._option("direction"),r=Qd[n].getter(this._$element),a=this;switch(i){case"start":break;case"end":V(t,function(){var o=v(this),s=Qd[n].getter(o),l=r-s;o.css(a._chooseMarginSide(lv[n]),l)});break;case"center":V(t,function(){var o=v(this),s=Qd[n].getter(o),l=.5*(r-s);o.css(a._chooseMarginSide(lv[n]),l).css(a._chooseMarginSide(OS[n]),l)});break;case"stretch":t.css(a._chooseMarginSide(lv[n]),0).css(a._chooseMarginSide(OS[n]),0).css(Qd[n].name,"100%")}}}_chooseMarginSide(t){return this._option("rtlEnabled")&&RY[t]||t}renderItems(t){this._$items=t;var i=this._option("direction"),n=0,r=0,a=0;V(t,(u,d)=>{var c=v(d);c.css({display:"inline-block",verticalAlign:"top"}),Qa[i].setter(c,"auto"),c.removeClass(DS);var h=c.data(Ts),f=h.ratio||0,p=this._baseSize(c),m=E(h.shrink)?h.shrink:cm;n+=f,r+=m*p,a+=p});var o=this._boxSize()-a,s=u=>{var d=u.data(Ts),c=this._baseSize(u),h=o>=0?d.ratio||0:(E(d.shrink)?d.shrink:cm)*c,f=o>=0?n:r,p=f?Math.round(o*h/f):0;return c+p},l=0;V(t,(u,d)=>{var c=v(d),h=v(d).data(Ts),f=s(c);l+=f,c.css(ER[i],h.maxSize||"none").css(SR[i],h.minSize||"0").css(Qa[i].name,f),c.addClass(DS)}),this.totalItemSize=l}_baseSize(t){var i=v(t).data(Ts);return i.baseSize==null?0:i.baseSize==="auto"?this._contentSize(t):this._parseSize(i.baseSize)}_contentSize(t){return Qa[this._option("direction")].getter(v(t))}_parseSize(t){return String(t).match(/.+%$/)?.01*parseFloat(t)*this._boxSizeValue:t}_boxSize(t){if(!arguments.length)return this._boxSizeValue=this._boxSizeValue||this._totalBaseSize(),this._boxSizeValue;this._boxSizeValue=t}_totalBaseSize(){var t=0;return V(this._$items,(i,n)=>{t+=this._baseSize(n)}),t}initSize(){this._boxSize(Qa[this._option("direction")].getter(this._$element))}update(){if(!(!this._$items||this._$element.is(":hidden"))){this._$items.detach(),this.initSize(),this._$element.append(this._$items),this.renderItems(this._$items),this.renderAlign(),this.renderCrossAlign();var t=this._$element.get(0);this._$items.find(IS).each(function(){t===v(this).parent().closest(IS).get(0)&&R.triggerHandler(this,ov)})}}}class wa extends Fo{_getDefaultOptions(){return k(super._getDefaultOptions(),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_layoutStrategy:"flex",_queue:void 0})}_itemClass(){return TY}_itemDataKey(){return Ts}_itemElements(){return this._itemContainer().children(this._itemSelector())}_init(){super._init(),this.$element().addClass("".concat(wS,"-").concat(this.option("_layoutStrategy"))),this._initLayout(),this._initBoxQueue()}_initLayout(){this._layout=this.option("_layoutStrategy")==="fallback"?new LY(this.$element(),this.option.bind(this)):new BY(this.$element(),this.option.bind(this))}_initBoxQueue(){this._queue=this.option("_queue")||[]}_queueIsNotEmpty(){return this.option("_queue")?!1:!!this._queue.length}_pushItemToQueue(t,i){this._queue.push({$item:t,config:i})}_shiftItemFromQueue(){return this._queue.shift()}_initMarkup(){this.$element().addClass(wS),this._layout.renderBox(),super._initMarkup(),this._renderAlign(),this._renderActions()}_renderActions(){this._onItemStateChanged=this._createActionByOption("onItemStateChanged")}_renderAlign(){this._layout.renderAlign(),this._layout.renderCrossAlign()}_renderItems(t){for(this._layout.initSize(),super._renderItems(t);this._queueIsNotEmpty();){var i=this._shiftItemFromQueue();this._createComponent(i.$item,wa,k({_layoutStrategy:this.option("_layoutStrategy"),itemTemplate:this.option("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this.option("onItemHold"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),_queue:this._queue},i.config))}this._layout.renderItems(this._itemElements()),clearTimeout(this._updateTimer),this._updateTimer=setTimeout(()=>{this._isUpdated||this._layout.update(),this._isUpdated=!1,this._updateTimer=null})}_renderItemContent(t){var i=t.itemData&&t.itemData.node;return i?this._renderItemContentByNode(t,i):super._renderItemContent(t)}_postprocessRenderItem(t){var i=t.itemData.box;i&&this._pushItemToQueue(t.itemContent,i)}_createItemByTemplate(t,i){return i.itemData.box?t.source?t.source():v():super._createItemByTemplate(t,i)}_visibilityChanged(t){t&&this._dimensionChanged()}_dimensionChanged(){this._updateTimer||(this._isUpdated=!0,this._layout.update())}_dispose(){clearTimeout(this._updateTimer),super._dispose.apply(this,arguments)}_itemOptionChanged(t,i,n,r){i==="visible"&&this._onItemStateChanged({name:i,state:n,oldState:r!==!1}),super._itemOptionChanged(t,i,n)}_optionChanged(t){switch(t.name){case"_layoutStrategy":case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:super._optionChanged(t)}}_itemOptions(){var t=super._itemOptions();return t.fireItemStateChangedAction=i=>{this._onItemStateChanged(i)},t}repaint(){this._dimensionChanged()}}wa.ItemClass=kY;tt("dxBox",wa);var PY="dx-timeview",FY="dx-timeview-clock",MY="dx-timeview-field",VY="dx-timeview-hourarrow",NY="dx-timeview-time-separator",$Y="dx-timeview-format12",uv=-1,dv=1,HY="dx-timeview-minutearrow",RS=function(e,t,i){WY(e,t,i)},WY=function(e,t,i){e.css("transform","rotate("+t+"deg) translate(0,"+i+"px)")},wR=Yn.inherit({_getDefaultOptions:function(){return k(this.callBase(),{value:new Date(Date.now()),use24HourFormat:!0,_showClock:!0,_arrowOffset:5,stylingMode:void 0})},_getValue:function(){return this.option("value")||new Date},_init:function(){this.callBase(),this.$element().addClass(PY)},_render:function(){this.callBase(),this._renderBox(),this._updateTime()},_renderBox:function(){var e=v("<div>").appendTo(this.$element()),t=[];this.option("_showClock")&&t.push({ratio:1,shrink:0,baseSize:"auto",template:this._renderClock.bind(this)}),t.push({ratio:0,shrink:0,baseSize:"auto",template:this._renderField.bind(this)}),this._createComponent(e,wa,{height:"100%",width:"100%",direction:"col",items:t})},_renderClock:function(e,t,i){this._$hourArrow=v("<div>").addClass(VY),this._$minuteArrow=v("<div>").addClass(HY);var n=v(i);n.addClass(FY).append(this._$hourArrow).append(this._$minuteArrow),this.setAria("role","presentation",n)},_updateClock:function(){var e=this._getValue(),t=e.getHours()/12*360+e.getMinutes()/60*30,i=e.getMinutes()/60*360;RS(this._$hourArrow,t,this.option("_arrowOffset")),RS(this._$minuteArrow,i,this.option("_arrowOffset"))},_getBoxItems:function(e){var t=[{ratio:0,shrink:0,baseSize:"auto",template:()=>this._hourBox.$element()},{ratio:0,shrink:0,baseSize:"auto",template:v("<div>").addClass(NY).text(Xe.getTimeSeparator())},{ratio:0,shrink:0,baseSize:"auto",template:()=>this._minuteBox.$element()}];return e&&t.push({ratio:0,shrink:0,baseSize:"auto",template:()=>this._format12.$element()}),t},_renderField:function(){var e=!this.option("use24HourFormat");return this._createHourBox(e),this._createMinuteBox(),e&&this._createFormat12Box(),this._createComponent(v("<div>").addClass(MY),wa,{direction:"row",align:"center",crossAlign:"center",items:this._getBoxItems(e)}).$element()},_createHourBox:function(e){var t=this._hourBox=this._createComponent(v("<div>"),xh,k({min:-1,max:e?13:24,value:this._getValue().getHours(),onValueChanged:this._onHourBoxValueChanged.bind(this),onKeyboardHandled:i=>this._keyboardHandler(i)},this._getNumberBoxConfig()));t.setAria("label","hours")},_isPM:function(){return!this.option("use24HourFormat")&&this._format12.option("value")===1},_onHourBoxValueChanged:function(e){var{value:t,component:i}=e,n=this._getValue(),r=new Date(n),a=this._convertMaxHourToMin(t);i.option("value",a),this._isPM()&&(a+=12),r.setHours(a),_t.normalizeTime(r),this.option("value",r)},_convertMaxHourToMin:function(e){var t=this.option("use24HourFormat")?24:12;return(t+e)%t},_createMinuteBox:function(){var e=this._minuteBox=this._createComponent(v("<div>"),xh,k({min:-1,max:60,value:this._getValue().getMinutes(),onKeyboardHandled:t=>this._keyboardHandler(t),onValueChanged:t=>{var{value:i,component:n}=t,r=(60+i)%60;n.option("value",r);var a=new Date(this._getValue());a.setMinutes(r),_t.normalizeTime(a),this.option("value",a)}},this._getNumberBoxConfig()));e.setAria("label","minutes")},_createFormat12Box:function(){var e=Xe.getPeriodNames(),t=this._format12=this._createComponent(v("<div>").addClass($Y),DC,{items:[{value:uv,text:e[0]},{value:dv,text:e[1]}],valueExpr:"value",displayExpr:"text",onKeyboardHandled:i=>this._keyboardHandler(i),onValueChanged:i=>{var{value:n}=i,r=this._getValue().getHours(),a=new Date(this._getValue()),o=(r+12*n)%24;a.setHours(o),this.option("value",a)},value:this._getValue().getHours()>=12?dv:uv,stylingMode:this.option("stylingMode")});t.setAria("label","type")},_refreshFormat12:function(){if(!this.option("use24HourFormat")){var e=this._getValue(),t=e.getHours(),i=t>=12,n=i?dv:uv;this._silentEditorValueUpdate(this._format12,n)}},_silentEditorValueUpdate:function(e,t){e&&(e._suppressValueChangeAction(),e.option("value",t),e._resumeValueChangeAction())},_getNumberBoxConfig:function(){return{showSpinButtons:!0,displayValueFormatter:function(e){return(e<10?"0":"")+e},stylingMode:this.option("stylingMode")}},_normalizeHours:function(e){return this.option("use24HourFormat")?e:e%12||12},_updateField:function(){var e=this._normalizeHours(this._getValue().getHours());this._silentEditorValueUpdate(this._hourBox,e),this._silentEditorValueUpdate(this._minuteBox,this._getValue().getMinutes()),this._refreshFormat12()},_updateTime:function(){this.option("_showClock")&&this._updateClock(),this._updateField()},_visibilityChanged:function(e){e&&this._updateTime()},_optionChanged:function(e){switch(e.name){case"value":this._updateTime(),this.callBase(e);break;case"_arrowOffset":break;case"use24HourFormat":case"_showClock":case"stylingMode":this._invalidate();break;default:this.callBase(e)}}});tt("dxTimeView",wR);var zY=je(),GY=573,UY="dx-datebox-adaptivity-mode",kS="dx-datebox-datetime-time-side",KY=yR.inherit({NAME:"CalendarWithTime",getDefaultOptions:function(){return k(this.callBase(),{applyValueMode:"useButtons",buttonsLocation:"bottom after","dropDownOptions.showTitle":!1})},_closeDropDownByEnter:function(){return Fe.sameDate(this._getContouredValue(),this.widgetOption("value"))},getDisplayFormat:function(e){return e||"shortdateshorttime"},_is24HourFormat:function(){return Xe.is24HourFormat(this.getDisplayFormat(this.dateBox.option("displayFormat")))},_getContouredValue:function(){var e=this.callBase();return this._updateDateTime(e)},_renderWidget:function(){this.callBase(),this._timeView=this.dateBox._createComponent(v("<div>"),wR,{value:this.dateBoxValue(),_showClock:!this._isShrinkView(),use24HourFormat:this._is24HourFormat(),onValueChanged:this._valueChangedHandler.bind(this),stylingMode:this.dateBox.option("stylingMode")}),this._timeView.registerKeyHandler("escape",this._escapeHandler.bind(this))},renderOpenedState:function(){this.callBase();var e=this._getPopup();e&&e.$wrapper().toggleClass(UY,this._isSmallScreen()),clearTimeout(this._repaintTimer),this._repaintTimer=setTimeout((function(){this._getPopup()&&this._getPopup().repaint()}).bind(this),0)},isAdaptivityChanged:function(){var e=this._isShrinkView(),t=this._currentAdaptiveMode;return e!==t?(this._currentAdaptiveMode=e,t!==void 0):this.callBase()},_updateValue:function(e){var t=this.dateBoxValue();!t&&!e&&(t=new Date,_t.normalizeTime(t)),this.callBase(),this._timeView&&(t&&this._timeView.option("value",t),this._timeView.option("use24HourFormat",this._is24HourFormat()))},_isSmallScreen:function(){return He(zY)<=GY},_isShrinkView:function(){return!this.dateBox.option("showAnalogClock")||this.dateBox.option("adaptivityEnabled")&&this._isSmallScreen()},_getBoxItems:function(){var e=[{ratio:0,shrink:0,baseSize:"auto",name:"calendar"}];return this._isShrinkView()||e.push({ratio:0,shrink:0,baseSize:"auto",name:"time"}),e},renderPopupContent:function(){this.callBase(),this._currentAdaptiveMode=this._isShrinkView();var e=this._getPopup().$content();this._box=this.dateBox._createComponent(v("<div>").appendTo(e),wa,{direction:"row",crossAlign:"stretch",items:this._getBoxItems(),itemTemplate:(function(t,i,n){var r=v("<div>");switch(t.name){case"calendar":r.append(this._widget.$element()),this._isShrinkView()&&(this._timeView.$element().addClass(kS),r.append(this._timeView.$element()));break;case"time":r.append(this._timeView.$element()),v(n).addClass(kS)}return r}).bind(this)}),this._attachTabHandler()},popupConfig:function(e){var t=this.callBase(e),i=k(t,{width:"auto",onShowing:(function(){if(this._box.option("_layoutStrategy")==="fallback"){var n=this._getPopup().$content().find(".dx-timeview-clock").css("minWidth");this._timeView.$element().css("maxWidth",n)}}).bind(this)});return i},getFirstPopupElement:function(){return this._timeView._hourBox.$element().find("input")},_attachTabHandler:function(){var e=this.dateBox;this._timeView._hourBox.registerKeyHandler("tab",function(t){t.shiftKey&&(t.preventDefault(),e.focus())})},_preventFocusOnPopup:function(e){v(e.target).hasClass("dx-texteditor-input")||(this.callBase.apply(this,arguments),this.dateBox._hasFocusClass()||this.dateBox.focus())},_updateDateTime:function(e){var t=this._timeView.option("value");return e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e},getValue:function(){var e,t=(e=this._widget.option("value"))!==null&&e!==void 0?e:this._widget.getContouredDate();return t=t?new Date(t):new Date,this._updateDateTime(t)},dispose:function(){clearTimeout(this._removeMinWidthTimer),clearTimeout(this._repaintTimer),this.callBase()}}),jY=je(),qY="date",YY={min:new Date(0,0,0,0,0),max:new Date(0,0,0,23,59)},XY=hf.inherit({NAME:"List",supportedKeys:function(){return{tab:function(){var{opened:e,applyValueMode:t}=this.option();e&&t==="instantly"&&this.close()},space:re,home:re,end:re}},getDefaultOptions:function(){return k(this.callBase(),{applyValueMode:"instantly"})},getDisplayFormat:function(e){return e||"shorttime"},popupConfig:function(e){return e},getValue:function(){var e=this._widget.option("selectedIndex");if(e===-1)return this.dateBox.option("value");var t=this._widgetItems[e];return this._getDateByItemData(t)},useCurrentDateByDefault:function(){return!0},getDefaultDate:function(){return new Date(null)},popupShowingHandler:function(){this.dateBox._dimensionChanged()},_renderWidget:function(){this.callBase(),this._refreshItems()},_getWidgetName:function(){return Vo},_getWidgetOptions:function(){return{itemTemplate:this._timeListItemTemplate.bind(this),onItemClick:this._listItemClickHandler.bind(this),tabIndex:-1,onFocusedItemChanged:this._refreshActiveDescendant.bind(this),selectionMode:"single"}},_refreshActiveDescendant:function(e){this.dateBox.setAria("activedescendant",""),this.dateBox.setAria("activedescendant",e.actionValue)},_refreshItems:function(){this._widgetItems=this._getTimeListItems(),this._widget.option("items",this._widgetItems)},renderOpenedState:function(){this._widget&&(this._widget.option("focusedElement",null),this._setSelectedItemsByValue(),this._widget.option("templatesRenderAsynchronously")?this._asyncScrollTimeout=setTimeout(this._scrollToSelectedItem.bind(this)):this._scrollToSelectedItem())},dispose:function(){this.callBase(),clearTimeout(this._asyncScrollTimeout)},_updateValue:function(){this._widget&&(this._refreshItems(),this._setSelectedItemsByValue(),this._scrollToSelectedItem())},_setSelectedItemsByValue:function(){var e=this.dateBoxValue(),t=this._getDateIndex(e);t===-1?this._widget.option("selectedItems",[]):this._widget.option("selectedIndex",t)},_scrollToSelectedItem:function(){this._widget.scrollToItem(this._widget.option("selectedIndex"))},_getDateIndex:function(e){for(var t=-1,i=0,n=this._widgetItems.length;i<n;i++)if(this._areDatesEqual(e,this._widgetItems[i])){t=i;break}return t},_areDatesEqual:function(e,t){return Wi(e)&&Wi(t)&&e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()},_getTimeListItems:function(){var e=this.dateBox.dateOption("min")||this._getBoundaryDate("min"),t=this.dateBox.dateOption("max")||this._getBoundaryDate("max"),i=this.dateBox.dateOption("value")||null,n=t-e,r=e.getMinutes()%this.dateBox.option("interval");return n<0?[]:(n>_t.ONE_DAY&&(n=_t.ONE_DAY),i-e<_t.ONE_DAY?this._getRangeItems(e,new Date(e),n):(e=this._getBoundaryDate("min"),e.setMinutes(r),i&&Math.abs(i-t)<_t.ONE_DAY&&(n=(60*t.getHours()+Math.abs(t.getMinutes()-r))*_t.ONE_MINUTE),this._getRangeItems(e,new Date(e),n)))},_getRangeItems:function(e,t,i){for(var n=[],r=this.dateBox.option("interval");t-e<=i;)n.push(new Date(t)),t.setMinutes(t.getMinutes()+r);return n},_getBoundaryDate:function(e){var t=YY[e],i=new Date(Mt(this.dateBox.dateOption("value"),0));return new Date(i.getFullYear(),i.getMonth(),i.getDate(),t.getHours(),t.getMinutes())},_timeListItemTemplate:function(e){var t=this.dateBox.option("displayFormat");return Xe.format(e,this.getDisplayFormat(t))},_listItemClickHandler:function(e){if(this.dateBox.option("applyValueMode")!=="useButtons"){var t=this._getDateByItemData(e.itemData);this.dateBox.option("opened",!1),this.dateBoxValue(t,e.event)}},_getDateByItemData:function(e){var t=this.dateBox.option("value"),i=e.getHours(),n=e.getMinutes(),r=e.getSeconds(),a=e.getFullYear(),o=e.getMonth(),s=e.getDate();return t?(this.dateBox.option("dateSerializationFormat")?t=ci.deserializeDate(t):t=new Date(t),t.setHours(i),t.setMinutes(n),t.setSeconds(r),t.setFullYear(a),t.setMonth(o),t.setDate(s)):t=new Date(a,o,s,i,n,0,0),t},getKeyboardListener:function(){return this._widget},_updatePopupHeight:function(){var e=IC(this.dateBox.option("dropDownOptions.height"));if(e===void 0||e==="auto"){this.dateBox._setPopupOption("height","auto");var t=nt(this._widget.$element()),i=.45*Ke(jY);this.dateBox._setPopupOption("height",Math.min(t,i))}this.dateBox._timeList&&this.dateBox._timeList.updateDimensions()},getParsedText:function(e,t){var i=this.callBase(e,t);return i&&(i=_t.mergeDates(i,new Date(null),qY)),i}}),Il=je(),Tl="dx-datebox",ZY="dx-auto-width",JY="dx-show-invalid-badge",QY="dx-clear-button-area",tc="dx-datebox-wrapper",eX="dx-dropdowneditor-overlay",dn={calendar:"calendar",rollers:"rollers",list:"list",native:"native"},wn={date:"date",datetime:"datetime",time:"time"},Al={calendar:"Calendar",dateView:"DateView",native:"Native",calendarWithTime:"CalendarWithTime",list:"List"},tX={Calendar:yR,DateView:wY,Native:IY,CalendarWithTime:KY,List:XY},iX=TC.inherit({_supportedKeys:function(){return k(this.callBase(),this._strategy.supportedKeys())},_renderButtonContainers:function(){this.callBase.apply(this,arguments),this._strategy.customizeButtons()},_getDefaultOptions:function(){return k(this.callBase(),{type:"date",showAnalogClock:!0,value:null,dateSerializationFormat:void 0,min:void 0,max:void 0,displayFormat:null,interval:30,disabledDates:null,pickerType:dn.calendar,invalidDateMessage:fe.format("dxDateBox-validation-datetime"),dateOutOfRangeMessage:fe.format("validation-range"),applyButtonText:fe.format("OK"),adaptivityEnabled:!1,calendarOptions:{},useHiddenSubmitElement:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{"dropDownOptions.showTitle":!0}},{device:{platform:"android"},options:{buttonsLocation:"bottom after"}},{device:function(){var e=Re.real(),t=e.platform;return t==="ios"||t==="android"},options:{pickerType:dn.native}},{device:{platform:"generic",deviceType:"desktop"},options:{buttonsLocation:"bottom after"}}])},_initOptions:function(e){this._userOptions=k({},e),this.callBase(e),this._updatePickerOptions()},_updatePickerOptions:function(){var e=this.option("pickerType"),t=this.option("type");e===dn.list&&(t===wn.datetime||t===wn.date)&&(e=dn.calendar),t===wn.time&&e===dn.calendar&&(e=dn.list),this.option("showDropDownButton",Re.real().platform!=="generic"||e!==dn.native),this._pickerType=e},_init:function(){this._initStrategy(),this.option(k({},this._strategy.getDefaultOptions(),this._userOptions)),delete this._userOptions,this.callBase()},_toLowerCaseFirstLetter:function(e){return e.charAt(0).toLowerCase()+e.substr(1)},_initStrategy:function(){var e=this._getStrategyName(this._getFormatType()),t=tX[e];this._strategy&&this._strategy.NAME===e||(this._strategy=new t(this))},_getFormatType:function(){var e=this.option("type"),t=/h|m|s/g.test(e),i=/d|M|Y/g.test(e),n="";return i&&(n+=wn.date),t&&(n+=wn.time),n},_getStrategyName:function(e){var t=this._pickerType;return t===dn.rollers?Al.dateView:t===dn.native?Al.native:e===wn.date?Al.calendar:e===wn.datetime?Al.calendarWithTime:Al.list},_initMarkup:function(){this.$element().addClass(Tl),this.callBase(),this._refreshFormatClass(),this._refreshPickerTypeClass(),this._strategy.renderInputMinMax(this._input())},_render:function(){this.callBase(),this._formatValidationIcon()},_renderDimensions:function(){this.callBase(),this.$element().toggleClass(ZY,!this.option("width")),this._dimensionChanged()},_dimensionChanged:function(){if(this.callBase(arguments),this._popup){var e,t;(e=(t=this._strategy)._updatePopupHeight)===null||e===void 0||e.call(t)}},_refreshFormatClass:function(){var e=this.$element();V(wn,function(t,i){e.removeClass(Tl+"-"+i)}),e.addClass(Tl+"-"+this.option("type"))},_refreshPickerTypeClass:function(){var e=this.$element();V(dn,function(t,i){e.removeClass(Tl+"-"+i)}),e.addClass(Tl+"-"+this._pickerType)},_formatValidationIcon:function(){if(Ue()){var e=this._input().get(0),t=this.option("rtlEnabled"),i=this._getClearButtonWidth(),n=this._getLongestElementDimensions(),r=parseFloat(Il.getComputedStyle(e).width)-i,a=n.width>r,o=e.style;this.$element().toggleClass(JY,!a),a?(this._storedPadding===void 0&&(this._storedPadding=t?n.leftPadding:n.rightPadding),t?o.paddingLeft=0:o.paddingRight=0):t?o.paddingLeft=this._storedPadding+"px":o.paddingRight=this._storedPadding+"px"}},_getClearButtonWidth:function(){var e=0;if(this._isClearButtonVisible()&&this._input().val()===""){var t=this.$element().find("."+QY).get(0);e=parseFloat(Il.getComputedStyle(t).width)}return e},_getLongestElementDimensions:function(){var e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=Xe.format(_t.getLongestDate(e,Xe.getMonthNames(),Xe.getDayNames()),e),i=this._input(),n=i.get(0),r=ZV(i,t),a=this._storedPadding!==void 0,o=a?this._storedPadding:0;r.appendTo(this.$element());var s=parseFloat(Il.getComputedStyle(r.get(0)).width),l=parseFloat(Il.getComputedStyle(n).paddingRight),u=parseFloat(Il.getComputedStyle(n).paddingLeft),d=s+u+l+o;return r.remove(),{width:d,leftPadding:u,rightPadding:l}},_getKeyboardListeners(){return this.callBase().concat([this._strategy&&this._strategy.getKeyboardListener()])},_renderPopup:function(){this.callBase(),this._popup.$wrapper().addClass(tc),this._renderPopupWrapper()},_popupConfig:function(){var e=this.callBase();return k(this._strategy.popupConfig(e),{title:this._getPopupTitle(),dragEnabled:!1})},_renderPopupWrapper:function(){if(this._popup){var e=this.$element(),t=k({},wn,dn);V(t,(function(i,n){e.removeClass(tc+"-"+n)}).bind(this)),this._popup.$wrapper().addClass(tc+"-"+this.option("type")).addClass(tc+"-"+this._pickerType).addClass(eX)}},_renderPopupContent:function(){this.callBase(),this._strategy.renderPopupContent()},_getFirstPopupElement:function(){return this._strategy.getFirstPopupElement()||this.callBase()},_getLastPopupElement:function(){return this._strategy.getLastPopupElement()||this.callBase()},_popupShowingHandler:function(){this.callBase(),this._strategy.popupShowingHandler()},_popupShownHandler:function(){this.callBase(),this._strategy.renderOpenedState()},_popupHiddenHandler:function(){this.callBase(),this._strategy.renderOpenedState(),this._strategy.popupHiddenHandler()},_visibilityChanged:function(e){e&&this._formatValidationIcon()},_clearValueHandler:function(e){this.option("text",""),this.callBase(e)},_readOnlyPropValue:function(){if(this._pickerType===dn.rollers)return!0;var e=Re.real().platform,t=this._isNativeType()&&(e==="ios"||e==="android");return t?this.option("readOnly"):this.callBase()},_isClearButtonVisible:function(){return this.callBase()&&!this._isNativeType()},_renderValue:function(){var e=this.dateOption("value");return this.option("text",this._getDisplayedText(e)),this._strategy.renderValue(),this.callBase()},_setSubmitValue:function(){var e=this.dateOption("value"),t=this.option("dateSerializationFormat"),i=_t.SUBMIT_FORMATS_MAP[this.option("type")],n=t?ci.serializeDate(e,t):_t.toStandardDateFormat(e,i);this._getSubmitElement().val(n)},_getDisplayedText:function(e){var t=this.option("mode"),i;if(t==="text"){var n=this._strategy.getDisplayFormat(this.option("displayFormat"));i=Xe.format(e,n)}else{var r=this._getFormatByMode(t);r?i=Xe.format(e,r):i=_t.toStandardDateFormat(e,t)}return i},_getFormatByMode:function(e){return Hh(e)?null:_t.FORMATS_MAP[e]},_valueChangeEventHandler:function(e){var{text:t,type:i,validationError:n}=this.option(),r=this.dateOption("value");if(t===this._getDisplayedText(r)){(!n||n.editorSpecific)&&(this._applyInternalValidation(r),this._applyCustomValidation(r));return}var a=this._getParsedDate(t),o=r??this._getDateByDefault(),s=_t.mergeDates(o,a,i),l=a&&i==="time"?s:a;if(this._applyInternalValidation(l).isValid){var u=this._getDisplayedText(s);o&&s&&o.getTime()===s.getTime()&&u!==t?this._renderValue():this.dateValue(s,e)}},_getDateByDefault:function(){return this._strategy.useCurrentDateByDefault()&&this._strategy.getDefaultDate()},_getParsedDate:function(e){var t=this._strategy.getDisplayFormat(this.option("displayFormat")),i=this._strategy.getParsedText(e,t);return i??void 0},_applyInternalValidation(e){var t=this.option("text"),i=!!t&&e!==null,n=!!e&&Wi(e)&&!isNaN(e.getTime()),r=n&&Fe.dateInRange(e,this.dateOption("min"),this.dateOption("max"),this.option("type")),a=!i&&!e||r,o="";return n?r||(o=this.option("dateOutOfRangeMessage")):o=this.option("invalidDateMessage"),this.option({isValid:a,validationError:a?null:{editorSpecific:!0,message:o}}),{isValid:a,isDate:n}},_applyCustomValidation:function(e){this.validationRequest.fire({editor:this,value:this._serializeDate(e)})},_isValueChanged:function(e){var t=this.dateOption("value"),i=t&&t.getTime(),n=e&&e.getTime();return i!==n},_isTextChanged:function(e){var t=this.option("text"),i=e&&this._getDisplayedText(e)||"";return t!==i},_renderProps:function(){this.callBase(),this._input().attr("autocomplete","off")},_renderOpenedState:function(){this._isNativeType()||this.callBase(),this._strategy.isAdaptivityChanged()&&this._refreshStrategy()},_getPopupTitle:function(){var e=this.option("placeholder");if(e)return e;var t=this.option("type");return t===wn.time?fe.format("dxDateBox-simulatedDataPickerTitleTime"):t===wn.date||t===wn.datetime?fe.format("dxDateBox-simulatedDataPickerTitleDate"):""},_refreshStrategy:function(){this._strategy.dispose(),this._initStrategy(),this.option(this._strategy.getDefaultOptions()),this._refresh()},_applyButtonHandler:function(e){var t=this._strategy.getValue(),{isValid:i,isDate:n}=this._applyInternalValidation(t);if(i)this.dateValue(t,e.event);else if(n){var r=this._getDisplayedText(t);this.option("text",r),this._renderDisplayText(r)}this.callBase()},_dispose:function(){var e;this.callBase(),(e=this._strategy)===null||e===void 0||e.dispose()},_isNativeType:function(){return this._pickerType===dn.native},_updatePopupTitle:function(){var e;(e=this._popup)===null||e===void 0||e.option("title",this._getPopupTitle())},_optionChanged:function(e){switch(e.name){case"showClearButton":case"buttons":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"pickerType":this._updatePickerOptions({pickerType:e.value}),this._refreshStrategy(),this._refreshPickerTypeClass(),this._invalidate();break;case"type":this._updatePickerOptions({format:e.value}),this._refreshStrategy(),this._refreshFormatClass(),this._renderPopupWrapper(),this._formatValidationIcon(),this._updateValue();break;case"placeholder":this.callBase.apply(this,arguments),this._updatePopupTitle();break;case"min":case"max":var t=this.option("isValid");this._applyInternalValidation(this.dateOption("value")),t||this._applyCustomValidation(this.dateOption("value")),this._invalidate();break;case"dateSerializationFormat":case"interval":case"disabledDates":case"calendarOptions":this._invalidate();break;case"displayFormat":this.option("text",this._getDisplayedText(this.dateOption("value"))),this._renderInputValue();break;case"text":this._strategy.textChangedHandler(e.value),this.callBase.apply(this,arguments);break;case"isValid":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"showDropDownButton":this._formatValidationIcon(),this.callBase.apply(this,arguments);break;case"readOnly":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"invalidDateMessage":case"dateOutOfRangeMessage":case"adaptivityEnabled":case"showAnalogClock":break;default:this.callBase.apply(this,arguments)}},_getSerializationFormat:function(){var e=this.option("value");if(this.option("dateSerializationFormat")&&At().forceIsoDateParsing)return this.option("dateSerializationFormat");if(Et(e))return"number";if(Ve(e))return ci.getDateSerializationFormat(e)},_updateValue:function(e){this.callBase(),this._applyInternalValidation(e??this.dateOption("value"))},dateValue:function(e,t){var i=this._isValueChanged(e);return i&&t&&this._saveValueChangeEvent(t),i||(this._isTextChanged(e)?this._updateValue(e):this.option("text")===""&&this._applyCustomValidation(e)),this.dateOption("value",e)},dateOption:function(e,t){if(arguments.length===1)return ci.deserializeDate(this.option(e));this.option(e,this._serializeDate(t))},_serializeDate:function(e){var t=this._getSerializationFormat();return ci.serializeDate(e,t)},_clearValue:function(){var e=this.option("value");this.callBase(),e===null&&this._applyCustomValidation(null)},reset:function(){var e=this.option("value");this.callBase(),e===null&&this._applyInternalValidation(null)}}),ds="dateBoxMask",ra=1,cs=-1,nX=iX.inherit({_supportedKeys(e){var t=this.callBase(e),i=r=>{var a=t[$t(r)];return a&&a.apply(this,[r])},n=(r,a)=>this._shouldUseOriginalHandler(r)?i.apply(this,[r]):a.apply(this,[r]);return k({},t,{del:r=>n(r,a=>{this._revertPart(ra),this._isAllSelected()||a.preventDefault()}),backspace:r=>n(r,a=>{this._revertPart(cs),this._isAllSelected()||a.preventDefault()}),home:r=>n(r,a=>{this._selectFirstPart(),a.preventDefault()}),end:r=>n(r,a=>{this._selectLastPart(),a.preventDefault()}),escape:r=>n(r,a=>{this._revertChanges(a)}),enter:r=>n(r,a=>{this._enterHandler(a)}),leftArrow:r=>n(r,a=>{this._selectNextPart(cs),a.preventDefault()}),rightArrow:r=>n(r,a=>{this._selectNextPart(ra),a.preventDefault()}),upArrow:r=>n(r,a=>{this._upDownArrowHandler(ra),a.preventDefault()}),downArrow:r=>n(r,a=>{this._upDownArrowHandler(cs),a.preventDefault()})})},_shouldUseOriginalHandler(e){var t=this.option("opened")&&e&&["backspace","del"].indexOf($t(e))===-1;return!this._useMaskBehavior()||t||e&&e.altKey},_upDownArrowHandler(e){this._setNewDateIfEmpty();var t=this._getActivePartValue(this._initialMaskValue),i=this._getActivePartValue(),n=i-t;this._loadMaskValue(this._initialMaskValue),this._partIncrease(n+e,!0)},_getDefaultOptions(){return k(this.callBase(),{useMaskBehavior:!1,emptyDateValue:new Date(2e3,0,1,0,0,0)})},_isSingleCharKey(e){var{originalEvent:t,alt:i}=e,n=t.data||t.key;return typeof n=="string"&&n.length===1&&!i&&!vi(t)},_isSingleDigitKey(e){var t,i=(t=e.originalEvent)===null||t===void 0?void 0:t.data;return(i==null?void 0:i.length)===1&&parseInt(i,10)},_useBeforeInputEvent:function(){return Re.real().android},_keyInputHandler(e,t){var i=this._input().val();this._processInputKey(t),e.preventDefault();var n=i!==this._input().val();n&&R.trigger(this._input(),"input")},_keyboardHandler(e){var t=e.originalEvent.key,i=this.callBase(e);return!this._useMaskBehavior()||this._useBeforeInputEvent()||(Lt.chrome&&e.key==="Process"&&e.code.indexOf("Digit")===0?(t=e.code.replace("Digit",""),this._processInputKey(t),this._maskInputHandler=()=>{this._renderSelectedPart()}):this._isSingleCharKey(e)&&this._keyInputHandler(e.originalEvent,t)),i},_maskBeforeInputHandler(e){this._maskInputHandler=null;var{inputType:t}=e.originalEvent;t==="insertCompositionText"&&(this._maskInputHandler=()=>{this._renderSelectedPart()});var i=t==="deleteContentBackward",n=t==="deleteContentForward";if(i||n){var r=i?cs:ra;this._maskInputHandler=()=>{this._revertPart(),this._selectNextPart(r)}}if(!(!this._useMaskBehavior()||!this._isSingleCharKey(e))){var a=e.originalEvent.data;return this._keyInputHandler(e,a),!0}},_keyPressHandler(e){var{originalEvent:t}=e;(t==null?void 0:t.inputType)==="insertCompositionText"&&this._isSingleDigitKey(e)&&(this._processInputKey(t.data),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()),this.callBase(e),this._maskInputHandler&&(this._maskInputHandler(),this._maskInputHandler=null)},_processInputKey(e){this._isAllSelected()&&(this._activePartIndex=0),this._setNewDateIfEmpty(),isNaN(parseInt(e))?this._searchString(e):this._searchNumber(e)},_isAllSelected(){var e=this._caret();return e.end-e.start===this.option("text").length},_getFormatPattern(){if(this._formatPattern)return this._formatPattern;var e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=Ve(e)&&!Xe._getPatternByFormat(e);return t?this._formatPattern=e:this._formatPattern=Bg(function(i){return Xe.format(i,e)}),this._formatPattern},_setNewDateIfEmpty(){if(!this._maskValue){var e=this.option("type")==="time"?new Date(null):new Date;this._maskValue=e,this._initialMaskValue=e,this._renderDateParts()}},_partLimitsReached(e){var t=String(e).length,i=this._getActivePartProp("pattern").length,n=i===1,r=n?t:Math.min(i,t),a=this._searchValue.length===r,o=parseInt(this._searchValue+"0")>e;return a||o},_searchNumber(e){var{max:t}=this._getActivePartLimits(),i=String(t).length;this._searchValue=(this._searchValue+e).substr(-i),isNaN(this._searchValue)&&(this._searchValue=e),this._setActivePartValue(this._searchValue),this._partLimitsReached(t)&&this._selectNextPart(ra)},_searchString(e){if(isNaN(parseInt(this._getActivePartProp("text")))){for(var t=this._getActivePartProp("limits")(this._maskValue),i=this._searchValue+e.toLowerCase(),n=t.max-t.min,r=0;r<=n;r++)if(this._loadMaskValue(this._initialMaskValue),this._partIncrease(r+1),this._getActivePartProp("text").toLowerCase().indexOf(i)===0){this._searchValue=i;return}this._setNewDateIfEmpty(),this._searchValue&&(this._clearSearchValue(),this._searchString(e))}},_clearSearchValue(){this._searchValue=""},_revertPart:function(e){if(!this._isAllSelected()){var t=this._getActivePartValue(this.option("emptyDateValue"));this._setActivePartValue(t),this._selectNextPart(e)}this._clearSearchValue()},_useMaskBehavior(){return this.option("useMaskBehavior")&&this.option("mode")==="text"},_prepareRegExpInfo(){this._regExpInfo=SA(this._getFormatPattern(),Xe);var e=this._regExpInfo.regexp,t=e.source,i=e.flags,n=new RegExp(/(\{[0-9]+,?[0-9]*\})/),r=t.split(n).map(a=>n.test(a)?a:St.convertDigits(a,!1)).join("");this._regExpInfo.regexp=new RegExp(r,i)},_initMaskState(){this._activePartIndex=0,this._formatPattern=null,this._prepareRegExpInfo(),this._loadMaskValue()},_renderMask(){this.callBase(),this._detachMaskEvents(),this._clearMaskState(),this._useMaskBehavior()&&(this._attachMaskEvents(),this._initMaskState(),this._renderDateParts())},_renderDateParts(){if(this._useMaskBehavior()){var e=this.option("text")||this._getDisplayedText(this._maskValue);e&&(this._dateParts=Bq(e,this._regExpInfo),this._input().is(":hidden")||this._selectNextPart())}},_detachMaskEvents(){R.off(this._input(),"."+ds)},_attachMaskEvents(){R.on(this._input(),ye("dxclick",ds),this._maskClickHandler.bind(this)),R.on(this._input(),ye("paste",ds),this._maskPasteHandler.bind(this)),R.on(this._input(),ye("drop",ds),()=>{this._renderSelectedPart()}),R.on(this._input(),ye("compositionend",ds),this._maskCompositionEndHandler.bind(this)),this._useBeforeInputEvent()&&R.on(this._input(),ye("beforeinput",ds),this._maskBeforeInputHandler.bind(this))},_renderSelectedPart(){this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()},_selectLastPart(){this.option("text")&&(this._activePartIndex=this._dateParts.length,this._selectNextPart(cs))},_selectFirstPart(){this.option("text")&&(this._activePartIndex=-1,this._selectNextPart(ra))},_onMouseWheel(e){this._useMaskBehavior()&&this._partIncrease(e.delta>0?ra:cs,e)},_selectNextPart(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;if(!(!this.option("text")||this._disposed)){e&&(this._initialMaskValue=new Date(this._maskValue));var t=ki(this._activePartIndex+e,0,this._dateParts.length-1);if(this._dateParts[t].isStub){var i=t===0&&e<0||t===this._dateParts.length-1&&e>0;if(i)t=this._activePartIndex;else{this._selectNextPart(e>=0?e+1:e-1);return}}this._activePartIndex!==t&&this._clearSearchValue(),this._activePartIndex=t,this._caret(this._getActivePartProp("caret"))}},_getRealLimitsPattern(){if(this._getActivePartProp("pattern")[0]==="d")return"dM"},_getActivePartLimits(e){var t=this._getActivePartProp("limits");return t(this._maskValue,e&&this._getRealLimitsPattern())},_getActivePartValue(e){e=e||this._maskValue;var t=this._getActivePartProp("getter");return Ie(t)?t(e):e[t]()},_addLeadingZeroes(e){var t=this._searchValue.match(/^0+/),i=this._getActivePartLimits(),n=String(i.max).length;return((t&&t[0]||"")+String(e)).substr(-n)},_setActivePartValue(e,t){t=t||this._maskValue;var i=this._getActivePartProp("setter"),n=this._getActivePartLimits();e=Nr(e,n.min,n.max)?e:e%10,e=this._addLeadingZeroes(ki(e,n.min,n.max)),Ie(i)?i(t,e):t[i](e),this._renderDisplayText(this._getDisplayedText(t)),this._renderDateParts()},_getActivePartProp(e){if(!(!this._dateParts||!this._dateParts[this._activePartIndex]))return this._dateParts[this._activePartIndex][e]},_loadMaskValue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dateOption("value");this._maskValue=e&&new Date(e),this._initialMaskValue=e&&new Date(e)},_saveMaskValue(){var e=this._maskValue&&new Date(this._maskValue);e&&this.option("type")==="date"&&e.setHours(0,0,0,0),this._initialMaskValue=new Date(e),this.dateOption("value",e)},_revertChanges(){this._loadMaskValue(),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts()},_renderDisplayText(e){this.callBase(e),this._useMaskBehavior()&&this.option("text",e)},_partIncrease(e,t){this._setNewDateIfEmpty();var{max:i,min:n}=this._getActivePartLimits(t),r=i-n;r===1&&r++;var a=e+this._getActivePartValue();a>i?a=this._applyLimits(a,{limitBase:n,limitClosest:i,limitDelta:r}):a<n&&(a=this._applyLimits(a,{limitBase:i,limitClosest:n,limitDelta:r})),this._setActivePartValue(a)},_applyLimits(e,t){var{limitBase:i,limitClosest:n,limitDelta:r}=t,a=(e-n)%r;return a?i+a-1*Hs(a):n},_maskClickHandler(){this.option("text")&&(this._activePartIndex=Lq(this._dateParts,this._caret().start),this._isAllSelected()||(E(this._activePartIndex)?this._caret(this._getActivePartProp("caret")):this._selectLastPart()))},_maskCompositionEndHandler(e){this._input().val(this._getDisplayedText(this._maskValue)),this._selectNextPart(),this._maskInputHandler=()=>{this._renderSelectedPart()}},_maskPasteHandler(e){var t=this._replaceSelectedText(this.option("text"),this._caret(),I_(e)),i=Xe.parse(t,this._getFormatPattern());i&&this._isDateValid(i)&&(this._maskValue=i,this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts(),this._selectNextPart()),e.preventDefault()},_isDateValid:e=>Wi(e)&&!isNaN(e),_isValueDirty(){var e=this.dateOption("value");return(this._maskValue&&this._maskValue.getTime())!==(e&&e.getTime())},_fireChangeEvent(){this._clearSearchValue(),this._isValueDirty()&&R.trigger(this._input(),"change")},_enterHandler(e){this._fireChangeEvent(),this._selectNextPart(ra),e.preventDefault()},_focusOutHandler(e){var t=this._useMaskBehavior()&&!e.isDefaultPrevented();t?(this._fireChangeEvent(),this.callBase(e),this._selectFirstPart(e)):this.callBase(e)},_valueChangeEventHandler(e){var t=this.option("text");this._useMaskBehavior()?(this._saveValueChangeEvent(e),t?this._maskValue===null&&this._loadMaskValue(t):this._maskValue=null,this._saveMaskValue()):this.callBase(e)},_optionChanged(e){switch(e.name){case"useMaskBehavior":this._renderMask();break;case"displayFormat":case"mode":this.callBase(e),this._renderMask();break;case"value":this._loadMaskValue(),this.callBase(e),this._renderDateParts();break;case"emptyDateValue":break;default:this.callBase(e)}},_clearMaskState(){this._clearSearchValue(),delete this._dateParts,delete this._activePartIndex,delete this._maskValue},reset(){this.callBase(),this._clearMaskState(),this._activePartIndex=0},_clean(){this.callBase(),this._detachMaskEvents(),this._clearMaskState()}});tt("dxDateBox",nX);var{isWrapped:rX}=Hi,aX="checkbox-size",oX="dx-editor-inline-block",IR=function(){var e=function(a,o){return k(a,{readOnly:o.readOnly,placeholder:o.placeholder,inputAttr:{id:o.id},tabIndex:o.tabIndex},o.editorOptions)},t=function(){return Lt.mozilla||Re.real().ios},i=function(a){var o={},s=t(),l=a.sharedData||o;return e({placeholder:a.placeholder,width:a.width,value:a.value,onValueChanged:function(u){var d=a.parentType==="filterRow"||a.parentType==="searchPanel",c=u.event&&(u.event.type==="input"||u.event.type==="keyup"),h=function(f,p){a&&a.setValue(f.value,p)};clearTimeout(o.valueChangeTimeout),c&&d?l.valueChangeTimeout=o.valueChangeTimeout=setTimeout(function(){h(u,o.valueChangeTimeout!==l.valueChangeTimeout)},E(a.updateValueTimeout)?a.updateValueTimeout:0):h(u)},onKeyDown:function(u){s&&$t(u.event)==="enter"&&R.trigger(v(u.component._input()),"change")},valueChangeEvent:"change"+(a.parentType==="filterRow"?" keyup input":"")},a)},n=function(a){a.parentType==="filterRow"||a.parentType==="filterBuilder"?r(k(a,{lookup:{displayExpr:function(o){if(o===!0)return a.trueText||"true";if(o===!1)return a.falseText||"false"},dataSource:[!0,!1]}})):function(o){o.editorName="dxCheckBox",o.editorOptions=e({elementAttr:{id:o.id},value:E(o.value)?o.value:void 0,hoverStateEnabled:!o.readOnly,focusStateEnabled:!o.readOnly,activeStateEnabled:!1,onValueChanged:function(s){o.setValue&&o.setValue(s.value,s)}},o)}(a)};function r(a){var o=a.lookup,s,l,u,d=a.parentType==="filterRow";if(o){s=bt(o.displayExpr),l=o.dataSource,Ie(l)&&!rX(l)&&(l=l(a.row||{}),function(h){if(h.row&&h.row.watch&&h.parentType==="dataRow"){var f=h.editorOptions||{};h.editorOptions=f;var p,m=f.onInitialized;f.onInitialized=function(b){m&&m.apply(this,arguments),p=b.component,p.on("disposing",C)};var g,C=h.row.watch(()=>(g=h.lookup.dataSource(h.row),g&&g.filter),()=>{p.option("dataSource",g)},b=>{h.row=b})}}(a)),($e(l)||Array.isArray(l))&&(l=el(l),d&&(u=l.postProcess,l.postProcess=function(h){return this.pageIndex()===0&&(h=h.slice(0),h.unshift(null)),u?u.call(this,h):h}));var c=!!(o.allowClearing&&!d);a.editorName="dxSelectBox",a.editorOptions=e({searchEnabled:!0,value:a.value,valueExpr:a.lookup.valueExpr,searchExpr:a.lookup.searchExpr||a.lookup.displayExpr,allowClearing:c,showClearButton:c,displayExpr:function(h){return h===null?a.showAllText:s(h)},dataSource:l,onValueChanged:function(h){var f=[h.value];!d&&f.push(h.component.option("text")),a.setValue.apply(this,f)}},a)}}return{createEditor:function(a,o){if(o.cancel=!1,o.editorElement=Me(a),E(o.tabIndex)||(o.tabIndex=this.option("tabIndex")),o.lookup)r(o);else switch(o.dataType){case"date":case"datetime":(function(s){s.editorName="dxDateBox",s.editorOptions=e({value:s.value,onValueChanged:function(l){s.setValue(l.value)},onKeyDown:function(l){var{component:u,event:d}=l,c=u.option("useMaskBehavior");(t()||c)&&$t(d)==="enter"&&(u.blur(),u.focus())},displayFormat:s.format,type:s.dataType,dateSerializationFormat:null,width:s.parentType==="filterBuilder"?void 0:"auto"},s)})(o);break;case"boolean":n(o);break;case"number":(function(s){var l=i(s);l.value=E(s.value)?s.value:null,s.editorName="dxNumberBox",s.editorOptions=l})(o);break;default:(function(s){var l=i(s),u=s.parentType==="searchPanel";s.editorType&&s.editorType!=="dxTextBox"?l.value=s.value:l.value=(d=s.value,E(d)?d.toString():"");var d;l.valueChangeEvent+=u?" keyup input search":"",l.mode=l.mode||(u?"search":"text"),s.editorName="dxTextBox",s.editorOptions=l})(o)}o.parentType==="dataRow"&&o.editorType&&(o.editorName=o.editorType),this.executeAction("onEditorPreparing",o),!o.cancel&&(o.parentType==="dataRow"&&!o.isOnForm&&!E(o.editorOptions.showValidationMark)&&(o.editorOptions.showValidationMark=!1),function(s,l){var u=v(l.editorElement);if(l.editorName&&l.editorOptions&&u[l.editorName]){if((l.editorName==="dxCheckBox"||l.editorName==="dxSwitch")&&(l.isOnForm||(u.addClass(s.addWidgetPrefix(aX)),u.parent().addClass(oX))),s._createComponent(u,l.editorName,l.editorOptions),l.editorName==="dxDateBox"){var d=u.dxDateBox("instance"),c=d._supportedKeys().enter;d.registerKeyHandler("enter",h=>(d.option("opened")&&c(h),!0))}l.editorName==="dxTextArea"&&u.dxTextArea("instance").registerKeyHandler("enter",function(h){$t(h)==="enter"&&!h.ctrlKey&&!h.shiftKey&&h.stopPropagation()})}}(this,o),this.executeAction("onEditorPrepared",o))}}}(),sX="dx-editor-inline-block",cv="dx-cell-focus-disabled",BS="focus-overlay",lX="content",hv="dx-focused",uX="dx-row",TR="dxDataGridEditorFactory",LS=ye([lt.down,"focusin",vt].join(" "),TR),fv="dx-hidden",dX=Dt.ViewController.inherit({_getFocusedElement:function(e){var t=this.option("focusedRowEnabled")?"tr[tabindex]:focus":"tr[tabindex]:not(.dx-data-row):focus",i="td[tabindex]:focus, ".concat(t,", input:focus, textarea:focus, .dx-lookup-field:focus, .dx-checkbox:focus, .dx-switch:focus, .dx-dropdownbutton .dx-buttongroup:focus"),n=e.find(i);return this.elementIsInsideGrid(n)&&n},_getFocusCellSelector:function(){return".dx-row > td"},_updateFocusCore:function(){var e=this._$focusedElement,t=this.component&&this.component.$element(),i,n;if(t&&(e=this._getFocusedElement(t),e&&e.length&&(!e.hasClass(cv)&&!e.hasClass(uX)&&(i=e.closest(this._getFocusCellSelector()+", ."+cv),n=i.get(0)!==e.get(0)&&i.hasClass(sX),e=i),e.length&&!e.hasClass(cv)))){this.focus(e,n);return}this.loseFocus()},_updateFocus:function(e){var t=this,i=e&&e.event&&v(e.event.target).hasClass(t.addWidgetPrefix(BS));t._isFocusOverlay=t._isFocusOverlay||i,clearTimeout(t._updateFocusTimeoutID),t._updateFocusTimeoutID=setTimeout(function(){delete t._updateFocusTimeoutID,t._isFocusOverlay||t._updateFocusCore(),t._isFocusOverlay=!1})},_updateFocusOverlaySize:function(e,t){e.hide();var i=xi.calculate(e,k({collision:"fit"},t));i.h.oversize>0&&uy(e,ot(e)-i.h.oversize),i.v.oversize>0&&dy(e,nt(e)-i.v.oversize),e.show()},callbackNames:function(){return["focused"]},focus:function(e,t){var i=this;if(e===void 0)return i._$focusedElement;e&&(e.is(i._$focusedElement)||i._$focusedElement&&i._$focusedElement.removeClass(hv),i._$focusedElement=e,clearTimeout(i._focusTimeoutID),i._focusTimeoutID=setTimeout(function(){delete i._focusTimeoutID,i.renderFocusOverlay(e,t),e.addClass(hv),i.focused.fire(e)}))},refocus:function(){var e=this.focus();this.focus(e)},renderFocusOverlay:function(e,t){if(be.isElementInCurrentGrid(this,e)){if(this._$focusOverlay||(this._$focusOverlay=v("<div>").addClass(this.addWidgetPrefix(BS))),t)this._$focusOverlay.addClass(fv);else if(e.length){var i=Lt.mozilla?"right bottom":"left top",n=e.closest("."+this.addWidgetPrefix(lX)),r=Ut(e.get(0));this._$focusOverlay.removeClass(fv).appendTo(n),dy(this._$focusOverlay,r.bottom-r.top+1),uy(this._$focusOverlay,r.right-r.left+1);var a={precise:!0,my:i,at:i,of:e,boundary:n.length&&n};this._updateFocusOverlaySize(this._$focusOverlay,a),xi.setup(this._$focusOverlay,a),this._$focusOverlay.css("visibility","visible")}}},resize:function(){var e=this._$focusedElement;e&&this.focus(e)},loseFocus:function(){this._$focusedElement&&this._$focusedElement.removeClass(hv),this._$focusedElement=null,this._$focusOverlay&&this._$focusOverlay.addClass(fv)},init:function(){this.createAction("onEditorPreparing",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onEditorPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this._updateFocusHandler=this._updateFocusHandler||this.createAction(this._updateFocus.bind(this)),R.on(me.getDocument(),LS,this._updateFocusHandler),this._attachContainerEventHandlers()},_attachContainerEventHandlers:function(){var e=this,t=e.component&&e.component.$element();t&&R.on(t,ye("keydown",TR),function(i){$t(i)==="tab"&&e._updateFocusHandler(i)})},dispose:function(){clearTimeout(this._focusTimeoutID),clearTimeout(this._updateFocusTimeoutID),R.off(me.getDocument(),LS,this._updateFocusHandler)}}).include(IR),cX={defaultOptions:function(){return{}},controllers:{editorFactory:dX}};Oe.registerModule("editorFactory",cX);var pv=je(),hX={text:"OK",onClick:function(){return!0}},No="dx-dialog",fX="".concat(No,"-wrapper"),pX="".concat(No,"-root"),vX="".concat(No,"-content"),_X="".concat(No,"-message"),mX="".concat(No,"-buttons"),gX="".concat(No,"-button"),PS="dx-button",CX=ug.inherit({ctor:function(e,t){this.callBase(t)},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{width:276}}])}}),yX=function(e){var t,i=new se,n=new CX().option();e=k(n,e);var r=v("<div>").addClass(No).appendTo(xa()),a="message"in e,o="messageHtml"in e;a&&Qe.log("W1013");var s=String(o?e.messageHtml:e.message),l=v("<div>").addClass(_X).html(s),u=[];V(e.buttons||[hX],function(){var h=new on(this.onClick,{context:d});u.push({toolbar:"bottom",location:Re.current().android?"after":"center",widget:"dxButton",options:k({},this,{onClick:function(){var f=h.execute(...arguments);c(f)}})})});var d=new Cr(r,k({title:(t=e.title)!==null&&t!==void 0?t:"",showTitle:Mt(e.showTitle,!0),dragEnabled:Mt(e.dragEnabled,!0),height:"auto",width:e.width,showCloseButton:e.showCloseButton||!1,ignoreChildEvents:!1,container:r,visualContainer:pv,onContentReady:function(h){h.component.$content().addClass(vX).append(l)},onShowing:function(h){h.component.bottomToolbar().addClass(mX).find(".".concat(PS)).addClass(gX),Zs()},onShown:function(h){var f=h.component.bottomToolbar().find(".".concat(PS)).first();R.trigger(f,"focus")},onHiding:function(){i.reject()},toolbarItems:u,animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:At().rtlEnabled,position:{boundaryOffset:{h:10,v:0}}},e.popupOptions));d.$wrapper().addClass(fX),e.position&&d.option("position",e.position),d.$wrapper().addClass(pX);function c(h){i.resolve(h),d.hide().done(function(){d.$element().remove()})}return{show:function(){if(Re.real().platform==="android"){var h=Ke(pv)>He(pv),f=h?"80%":"60%";d.option({width:f})}return d.show(),i.promise()},hide:c}},xX=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=Ye(e)?e:{title:t,messageHtml:e,showTitle:i,buttons:[{text:fe.format("Yes"),onClick:function(){return!0}},{text:fe.format("No"),onClick:function(){return!1}}],dragEnabled:i};return yX(n).show()},bX="dx-editor-cell",SX="dx-row",FS="dx-selection",AR="edit-form",ir="insert",aa="remove",Mc="editing.popup",vv="editing.form",Gn="editing.editRowKey",zl="editing.editColumnName",DR="targetComponent",OR="input:not([type='hidden'])",RR="[tabindex], "+OR,hm="batch",zs="row",kR="cell",ff="form",OC="popup",MS="first",ic="last",VS="pageBottom",_v="pageTop",NS="viewportBottom",BR="viewportTop",EX=[hm,zs,kR,ff,OC],wX=[zs,ff,OC],IX=[zs,ff],TX="readonly",AX="dx-link",DX="dx-selection",OX="dx-edit-button",LR="dx-command-edit",$S=LR+"-with-icons",oa="__DX_INSERT_INDEX__",RX="dx-row-inserted",kX="dx-row-modified",HS="dx-cell-modified",BX="dxDataGridEditing",LX="dx-cell-focus-disabled",Dl="update",PX="click",FX={save:"dx-link-save",cancel:"dx-link-cancel",edit:"dx-link-edit",undelete:"dx-link-undelete",delete:"dx-link-delete",add:"dx-link-add"},MX={save:"save",cancel:"revert",edit:"edit",undelete:"revert",delete:"trash",add:"add"},VX={edit:"editRow",delete:"deleteRow",undelete:"undeleteRow",save:"saveEditData",cancel:"cancelEditData",add:"addRowByRowIndex"},NX={add:"allowAdding",edit:"allowUpdating",delete:"allowDeleting"},$X=["edit","save","cancel","delete","undelete"],Rr="editing.changes",nc=function(e){return function(t){var i=t instanceof Error?t:new Error(t&&String(t)||"Unknown error");e.reject(i)}},PR=function(e,t){return t.isEditing||e&&t.column.allowEditing},WS=function(e,t){var i=!!t.column.command,n=PR(e,t),r=!i&&(n||t.column.showEditorAlways);return t.rowType==="data"&&r},HX=Dt.ViewController.inherit(function(){var e=(i,n)=>{var r=-1;return i.some((a,o)=>{if(t(a)===n)return r=o,!0}),r};function t(i){return $e(i)?i.name:i}return{init:function(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._rowsView=this.getView("rowsView"),this._lastOperation=null,this._deferreds&&this._deferreds.forEach(i=>i.reject("cancel")),this._deferreds=[],this._dataChangedHandler||(this._dataChangedHandler=this._handleDataChanged.bind(this),this._dataController.changed.add(this._dataChangedHandler)),this._saveEditorHandler||(this.createAction("onInitNewRow",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserting",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserted",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditingStart",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdating",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdated",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceling",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceled",{excludeValidators:["disabled","readOnly"]})),this._updateEditColumn(),this._updateEditButtons(),this._internalState||(this._internalState=[]),this.component._optionsByReference[Gn]=!0,this.component._optionsByReference[Rr]=!0},getEditMode:function(){var i=this.option("editing.mode");return EX.indexOf(i)!==-1?i:zs},_getDefaultEditorTemplate:function(){return(i,n)=>{var r=v("<div>").appendTo(i);this.getController("editorFactory").createEditor(r,k({},n.column,{value:n.value,setValue:n.setValue,row:n.row,parentType:"dataRow",width:null,readOnly:!n.setValue,isOnForm:n.isOnForm,id:n.id}))}},_getNewRowPosition:function(){var i=this.option("editing.newRowPosition"),n=this.option("scrolling.mode");if(n==="virtual")switch(i){case _v:return BR;case VS:return NS;default:return i}return i},getChanges:function(){return this.option(Rr)},getInsertRowCount:function(){var i=this.option(Rr);return i.filter(n=>n.type==="insert").length},resetChanges:function(){var i=this.getChanges(),n=i==null?void 0:i.length;n&&this._silentOption(Rr,[])},_getInternalData:function(i){return this._internalState.filter(n=>Bt(n.key,i))[0]},_addInternalData:function(i){var n=this._getInternalData(i.key);return n?k(n,i):(this._internalState.push(i),i)},_getOldData:function(i){var n;return(n=this._getInternalData(i))===null||n===void 0?void 0:n.oldData},getUpdatedData:function(i){var n=this._dataController.keyOf(i),r=this.getChanges(),a=be.getIndexByKey(n,r);return r[a]?va(i,r[a].data):i},getInsertedData:function(){return this.getChanges().filter(i=>i.data&&i.type===ir).map(i=>i.data)},getRemovedData:function(){return this.getChanges().filter(i=>this._getOldData(i.key)&&i.type===aa).map(i=>this._getOldData(i.key))},_fireDataErrorOccurred:function(i){if(i!=="cancel"){var n=this.getPopupContent();this._dataController.dataErrorOccurred.fire(i,n)}},_needToCloseEditableCell:re,_closeEditItem:re,_handleDataChanged:re,_isDefaultButtonVisible:function(i,n){var r=!0;switch(i.name){case"delete":r=this.allowDeleting(n);break;case"undelete":r=!1}return r},_isButtonVisible:function(i,n){var r=i.visible;return E(r)?Ie(r)?r.call(i,{component:n.component,row:n.row,column:n.column}):r:this._isDefaultButtonVisible(i,n)},_isButtonDisabled:function(i,n){var r=i.disabled;return Ie(r)?r.call(i,{component:n.component,row:n.row,column:n.column}):!!r},_getButtonConfig:function(i,n){var r=$e(i)?i:{},a=t(i),o=(c=>{var h=c.component.option("editing.texts")||{};return{save:h.saveRowChanges,cancel:h.cancelRowChanges,edit:h.editRow,undelete:h.undeleteRow,delete:h.deleteRow,add:h.addRowToNode}})(n),s=VX[a],l=this.option("editing"),u=NX[a],d=u?l[u]:!0;return k({name:a,text:o[a],cssClass:FX[a]},{onClick:s&&(c=>{var h=c.event;h.stopPropagation(),h.preventDefault(),setTimeout(()=>{n.row&&d&&this[s]&&this[s](n.row.rowIndex)})})},r)},_getEditingButtons:function(i){var n,r=!!i.column.buttons,a=(i.column.buttons||[]).slice();return r?(n=e(a,"edit"),n>=0&&(e(a,"save")<0&&a.splice(n+1,0,"save"),e(a,"cancel")<0&&a.splice(e(a,"save")+1,0,"cancel")),n=e(a,"delete"),n>=0&&e(a,"undelete")<0&&a.splice(n+1,0,"undelete")):a=$X.slice(),a.map(o=>this._getButtonConfig(o,i))},_renderEditingButtons:function(i,n,r,a){n.forEach(o=>{this._isButtonVisible(o,r)&&this._createButton(i,o,r,a)})},_getEditCommandCellTemplate:function(){return(i,n,r)=>{var a=v(i);if(n.rowType==="data"){var o=this._getEditingButtons(n);this._renderEditingButtons(a,o,n,r),n.watch&&n.watch(()=>o.map(s=>this._isButtonVisible(s,n)),()=>{a.empty(),this._renderEditingButtons(a,o,n)})}else be.setEmptyText(a)}},isRowBasedEditMode:function(){var i=this.getEditMode();return wX.indexOf(i)!==-1},getFirstEditableColumnIndex:function(){var i=this.getController("columns"),n,r=i.getVisibleColumns();return V(r,function(a,o){if(o.allowEditing)return n=a,!1}),n},getFirstEditableCellInRow:function(i){var n=this.getView("rowsView");return n&&n._getCellElement(i||0,this.getFirstEditableColumnIndex())},getFocusedCellInRow:function(i){return this.getFirstEditableCellInRow(i)},getIndexByKey:function(i,n){return be.getIndexByKey(i,n)},hasChanges:function(i){for(var n=this.getChanges(),r=!1,a=0;a<(n==null?void 0:n.length);a++)if(n[a].type&&(!E(i)||this._dataController.getRowIndexByKey(n[a].key)===i)){r=!0;break}return r},dispose:function(){this.callBase(),clearTimeout(this._inputFocusTimeoutID),R.off(me.getDocument(),lt.up,this._pointerUpEditorHandler),R.off(me.getDocument(),lt.down,this._pointerDownEditorHandler),R.off(me.getDocument(),vt,this._saveEditorHandler)},optionChanged:function(i){if(i.name==="editing"){var n=i.fullName;n===Gn?this._handleEditRowKeyChange(i):n===Rr?this._handleChangesChange(i):i.handled||(this._columnsController.reinit(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey()),i.handled=!0}else this.callBase(i)},_handleEditRowKeyChange:function(i){var n=this._dataController.getRowIndexByKey(i.value),r=this._getEditRowIndexCorrection(),a=this._dataController.getRowIndexByKey(i.previousValue)+r;E(i.value)?i.value!==i.previousValue&&this._editRowFromOptionChanged(n,a):this.cancelEditData()},_handleChangesChange:function(i){var n=this._dataController;!i.value.length&&!i.previousValue.length||(this._processInsertChanges(i.value),n.updateItems({repaintChangesOnly:!0,isLiveUpdate:!1}))},_processInsertChanges:function(i){i.forEach(n=>{n.type==="insert"&&this._addInsertInfo(n)})},publicMethods:function(){return["addRow","deleteRow","undeleteRow","editRow","saveEditData","cancelEditData","hasEditData"]},refresh:function(){E(this._pageIndex)&&this._refreshCore.apply(this,arguments)},_refreshCore:re,isEditing:function(){var i=E(this.option(Gn));return i},isEditRow:function(){return!1},_setEditRowKey:function(i,n){n?this._silentOption(Gn,i):this.option(Gn,i)},_setEditRowKeyByIndex:function(i,n){var r=this._dataController.getKeyByRowIndex(i);if(r===void 0){this._dataController.fireError("E1043");return}this._setEditRowKey(r,n)},getEditRowIndex:function(){return this._getVisibleEditRowIndex()},getEditFormRowIndex:function(){return-1},isEditRowByIndex(i){var n=this._dataController.getKeyByRowIndex(i),r=E(n)&&Bt(this.option(Gn),n);return r&&this._getVisibleEditRowIndex()===i},isEditCell:function(i,n){return this.isEditRowByIndex(i)&&this._getVisibleEditColumnIndex()===n},getPopupContent:re,_isProcessedItem:function(i){return!1},_getInsertRowIndex:function(i,n,r){var a=-1,o=this._dataController,s=this._getInsertAfterOrBeforeKey(n);return!E(s)&&i.length===0?a=0:E(s)&&i.some((l,u)=>{var d=r||this._isProcessedItem(l);if($e(l)&&(d||E(l[oa])?Bt(l.key,s)&&(a=u):Bt(o.keyOf(l),s)&&(a=u)),a>=0){var c=i[a+1];return c&&(c.rowType==="detail"||c.rowType==="detailAdaptive")&&E(n.insertAfterKey)?void 0:(E(n.insertAfterKey)&&(a+=1),!0)}}),a},_generateNewItem:function(i){var n,r={key:i},a=(n=this._getInternalData(i))===null||n===void 0?void 0:n.insertInfo;return a!=null&&a[oa]&&(r[oa]=a[oa]),r},_getLoadedRowIndex:function(i,n,r){var a=this._getInsertRowIndex(i,n,r),o=this._dataController;if(a<0){var s=this._getNewRowPosition(),l=o.pageIndex(),u=this._getInsertAfterOrBeforeKey(n);s!==ic&&l===0&&!E(u)?a=0:s===ic&&o.isLastPageLoaded()&&(a=i.length)}return a},processItems:function(i,n){var r=n.changeType;this.update(r);var a=this.getChanges();return a.forEach(o=>{var s,l=o.type===ir;if(l){var u=o.key,d=(s=this._getInternalData(u))===null||s===void 0?void 0:s.insertInfo;(!E(u)||!E(d))&&(d=this._addInsertInfo(o),u=d.key);var c=this._getLoadedRowIndex(i,o),h=this._generateNewItem(u);c>=0&&i.splice(c,0,h)}}),i},processDataItem:function(i,n,r){var a=n.visibleColumns,o=i.data[oa]?i.data.key:i.key,s=this.getChanges(),l=be.getIndexByKey(o,s);i.isEditing=!1,l>=0&&this._processDataItemCore(i,s[l],o,a,r)},_processDataItemCore:function(i,n,r,a,o){var{data:s,type:l}=n;switch(l){case ir:i.isNewRow=!0,i.key=r,i.data=s;break;case Dl:i.modified=!0,i.oldData=i.data,i.data=va(i.data,s),i.modifiedValues=o(s,a,!0);break;case aa:i.removed=!0}},_initNewRow:function(i){if(this.executeAction("onInitNewRow",i),i.promise){var n=new se;return De(yi(i.promise)).done(n.resolve).fail(nc(n)).fail(r=>this._fireDataErrorOccurred(r)),n}},_createInsertInfo:function(){var i={};return i[oa]=this._getInsertIndex(),i},_addInsertInfo:function(i,n){var r,a,{key:o}=i;if(E(o)||(o=String(new si),i.key=o),a=(r=this._getInternalData(o))===null||r===void 0?void 0:r.insertInfo,!E(a)){var s=this._getInsertAfterOrBeforeKey(i);a=this._createInsertInfo(),E(s)||this._setInsertAfterOrBeforeKey(i,n)}return this._addInternalData({insertInfo:a,key:o}),{insertInfo:a,key:o}},_setInsertAfterOrBeforeKey:function(i,n){var r=this._dataController,a=r.items(!0),o=this.getView("rowsView"),s=this._getNewRowPosition();switch(s){case MS:case ic:break;case _v:case VS:if(a.length){var l=s===_v?0:a.length-1;i[l===0?"insertBeforeKey":"insertAfterKey"]=a[l].key}break;default:var u=s===NS,d=u?o==null?void 0:o.getBottomVisibleItemIndex():o==null?void 0:o.getTopVisibleItemIndex(),c=r.getVisibleRows()[d];c&&(!c.isEditing&&c.rowType==="detail"||c.rowType==="detailAdaptive")&&d++;var h=r.getKeyByRowIndex(d);E(h)&&(i.insertBeforeKey=h)}},_getInsertIndex:function(){var i=0;return this.getChanges().forEach(n=>{var r,a=(r=this._getInternalData(n.key))===null||r===void 0?void 0:r.insertInfo;E(a)&&n.type===ir&&a[oa]>i&&(i=a[oa])}),i+1},_getInsertAfterOrBeforeKey:function(i){var n;return(n=i.insertAfterKey)!==null&&n!==void 0?n:i.insertBeforeKey},_getPageIndexToInsertRow:function(){var i=this._getNewRowPosition(),n=this._dataController,r=n.pageIndex(),a=n.pageCount()-1;return i===MS&&r!==0?0:i===ic&&r!==a?a:-1},addRow:function(i){var n=this._dataController,r=n.store();return r?this._addRow(i):(n.fireError("E1052",this.component.NAME),new se().reject())},_addRow:function(i){var n=this._dataController,r=n.store(),a=r&&r.key(),o={data:{}},s=this._getVisibleEditRowIndex(),l=new se;return this.refresh({allowCancelEditing:!0}),this._allowRowAdding()?(a||(o.data.__KEY__=String(new si)),De(this._initNewRow(o,i)).done(()=>{this._allowRowAdding()?De(this._addRowCore(o.data,i,s)).done(l.resolve).fail(l.reject):l.reject("cancel")}).fail(l.reject),l.promise()):(De(this._navigateToNewRow(s)).done(l.resolve).fail(l.reject),l.promise())},_allowRowAdding:function(){var i=this._getInsertIndex();return!(i>1)},_addRowCore:function(i,n,r){var a={data:i,type:ir},o=this._getVisibleEditRowIndex(),s=this._addInsertInfo(a,n),l=s.key;return this._setEditRowKey(l,!0),this._addChange(a),this._navigateToNewRow(r,a,o)},_navigateToNewRow:function(i,n,r){var a,o,s=new se,l=this._dataController,u=this.getController("focus");if(r=(a=r)!==null&&a!==void 0?a:-1,n=(o=n)!==null&&o!==void 0?o:this.getChanges().filter(p=>p.type===ir)[0],!n)return s.reject("cancel").promise();var d=this._getPageIndexToInsertRow(),c=this._getLoadedRowIndex(l.items(),n,!0),h=p=>{De(u==null?void 0:u.navigateToRow(p)).done(()=>{c=l.getRowIndexByKey(n.key),s.resolve()})},f=this._getInsertAfterOrBeforeKey(n);return d>=0?l.pageIndex(d).done(()=>{h(n.key)}).fail(s.reject):c<0&&E(f)?h(f):(l.updateItems({changeType:"update",rowIndices:[i,r,c]}),c=l.getRowIndexByKey(n.key),c<0?h(n.key):s.resolve()),s.done(()=>{this._showAddedRow(c),this._afterInsertRow(n.key)}),s.promise()},_showAddedRow:function(i){this._focusFirstEditableCellInRow(i)},_beforeFocusElementInRow:re,_focusFirstEditableCellInRow:function(i){var n=this._dataController,r=n.getKeyByRowIndex(i),a=this.getFirstEditableCellInRow(i);this._editCellInProgress=!0,this._delayedInputFocus(a,()=>{i=n.getRowIndexByKey(r),this._editCellInProgress=!1,this._beforeFocusElementInRow(i)})},_isEditingStart:function(i){return this.executeAction("onEditingStart",i),i.cancel},_beforeUpdateItems:re,_getVisibleEditColumnIndex:function(){var i=this.option(zl);return E(i)?this._columnsController.getVisibleColumnIndex(i):-1},_setEditColumnNameByIndex:function(i,n){var r,a=this._columnsController.getVisibleColumns();this._setEditColumnName((r=a[i])===null||r===void 0?void 0:r.name,n)},_setEditColumnName:function(i,n){n?this._silentOption(zl,i):this.option(zl,i)},_resetEditColumnName:function(){this._setEditColumnName(null,!0)},_getEditColumn:function(){var i=this.option(zl);return this._getColumnByName(i)},_getColumnByName:function(i){var n=this._columnsController.getVisibleColumns(),r;return E(i)&&n.some(a=>{if(a.name===i)return r=a,!0}),r},_getVisibleEditRowIndex:function(i){var n=this._dataController,r=this.option(Gn),a=n.getRowIndexByKey(r);return a===-1?a:a+this._getEditRowIndexCorrection(i)},_getEditRowIndexCorrection:function(i){var n=i?this._getColumnByName(i):this._getEditColumn(),r=(n==null?void 0:n.visibleWidth)==="adaptiveHidden";return r?1:0},_resetEditRowKey:function(){this._setEditRowKey(null,!0)},_resetEditIndices:function(){this._resetEditColumnName(),this._resetEditRowKey()},editRow:function(i){var n,r=this._dataController,a=r.items(),o=a[i],s={data:o&&o.data,cancel:!1},l=this._getVisibleEditRowIndex();if(o){if(i===l)return!0;if(o.key===void 0){this._dataController.fireError("E1043");return}o.isNewRow||(s.key=o.key),!this._isEditingStart(s)&&(this.resetChanges(),this.init(),this._resetEditColumnName(),this._pageIndex=r.pageIndex(),this._addInternalData({key:o.key,oldData:(n=o.oldData)!==null&&n!==void 0?n:o.data}),this._setEditRowKey(o.key))}},_editRowFromOptionChanged:function(i,n){var r=[n,i];this._beforeUpdateItems(r,i,n),this._editRowFromOptionChangedCore(r,i)},_editRowFromOptionChangedCore:function(i,n,r){this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:i,cancel:r})},_focusEditorIfNeed:re,_showEditPopup:re,_repaintEditPopup:re,_getEditPopupHiddenHandler:function(){return i=>{this.isEditing()&&this.cancelEditData()}},_getPopupEditFormTemplate:re,_getSaveButtonConfig:function(){return{text:this.option("editing.texts.saveRowChanges"),onClick:this.saveEditData.bind(this)}},_getCancelButtonConfig:function(){return{text:this.option("editing.texts.cancelRowChanges"),onClick:this.cancelEditData.bind(this)}},_removeInternalData:function(i){var n=this._getInternalData(i),r=this._internalState.indexOf(n);r>-1&&this._internalState.splice(r,1)},_updateInsertAfterOrBeforeKeys:function(i,n){var r=i[n];i.forEach(a=>{var o=this._getInsertAfterOrBeforeKey(a);Bt(o,r.key)&&(a[E(a.insertAfterKey)?"insertAfterKey":"insertBeforeKey"]=this._getInsertAfterOrBeforeKey(r))})},_removeChange:function(i){if(i>=0){var n=[...this.getChanges()],r=n[i].key;this._removeInternalData(r),this._updateInsertAfterOrBeforeKeys(n,i),n.splice(i,1),this._silentOption(Rr,n),Bt(this.option(Gn),r)&&this._resetEditIndices()}},executeOperation:function(i,n){this._lastOperation&&this._lastOperation.reject(),this._lastOperation=i,this.waitForDeferredOperations().done(()=>{i.state()!=="rejected"&&(n(),this._lastOperation=null)}).fail(()=>{i.reject(),this._lastOperation=null})},waitForDeferredOperations:function(){return De(...this._deferreds)},_processCanceledEditingCell:re,_repaintEditCell:function(i,n,r){this._needFocusEditor=!0,!i||!i.showEditorAlways||n&&!n.showEditorAlways?(this._editCellInProgress=!0,this.getController("editorFactory").loseFocus(),this._dataController.updateItems({changeType:"update",rowIndices:[r,this._getVisibleEditRowIndex()]})):i!==n&&this._dataController.updateItems({changeType:"update",rowIndices:[]})},_delayedInputFocus:function(i,n,r){var a=()=>{if(n&&n(),i){var o=i.find(RR).first();be.focusAndSelectElement(this,o)}this._beforeFocusCallback=null};Re.real().ios||Re.real().android?a():(this._beforeFocusCallback&&this._beforeFocusCallback(),clearTimeout(this._inputFocusTimeoutID),r&&(this._beforeFocusCallback=n),this._inputFocusTimeoutID=setTimeout(a))},_focusEditingCell:function(i,n,r){var a=this.getView("rowsView"),o=this._getVisibleEditColumnIndex();n=n||a&&a._getCellElement(this._getVisibleEditRowIndex(),o),n&&this._delayedInputFocus(n,i,r)},deleteRow:function(i){this._checkAndDeleteRow(i)},_checkAndDeleteRow:function(i){var n=this.option("editing"),r=n==null?void 0:n.texts,a=n==null?void 0:n.confirmDelete,o=r==null?void 0:r.confirmDeleteMessage,s=this._dataController.items()[i],l=!this.isEditing()||s.isNewRow;if(s&&l)if(!a||!o)this._deleteRowCore(i);else{var u=r&&r.confirmDeleteTitle,d=E(u)&&u.length>0;xX(o,u,d).done(c=>{c&&this._deleteRowCore(i)})}},_deleteRowCore:function(i){var n=this._dataController,r=n.items()[i],a=r&&r.key,o=this._getVisibleEditRowIndex();this.refresh();var s=this.getChanges(),l=be.getIndexByKey(a,s);return l>=0?s[l].type===ir?this._removeChange(l):this._addChange({key:a,type:aa}):this._addChange({key:a,oldData:r.data,type:aa}),this._afterDeleteRow(i,o)},_afterDeleteRow:function(i,n){return this.saveEditData()},undeleteRow:function(i){var n=this._dataController,r=n.items()[i],a=this._getVisibleEditRowIndex(),o=r&&r.key,s=this.getChanges();if(r){var l=be.getIndexByKey(o,s);if(l>=0){var{data:u}=s[l];Pn(u)?this._removeChange(l):this._addChange({key:o,type:Dl}),n.updateItems({changeType:"update",rowIndices:[a,i]})}}},_fireOnSaving:function(){var i={cancel:!1,promise:null,changes:[...this.getChanges()]};this.executeAction("onSaving",i);var n=new se;return De(yi(i.promise)).done(()=>{n.resolve(i)}).fail(r=>{this._fireDataErrorOccurred(r),n.resolve({cancel:!0})}),n},_executeEditingAction:function(i,n,r){if(this.component._disposed)return null;var a=new se;return this.executeAction(i,n),De(yi(n.cancel)).done(function(o){o?setTimeout(function(){a.resolve("cancel")}):r(n).done(a.resolve).fail(nc(a))}).fail(nc(a)),a},_processChanges:function(i,n,r,a){var o=this._dataController.store();V(a,(s,l)=>{var u=this._getOldData(l.key),{data:d,type:c}=l,h=Se({},l),f,p;if(!this._beforeSaveEditData(l,s)){switch(c){case aa:p={data:u,key:l.key,cancel:!1},f=this._executeEditingAction("onRowRemoving",p,function(){return o.remove(l.key).done(function(g){r.push({type:"remove",key:g})})});break;case ir:p={data:d,cancel:!1},f=this._executeEditingAction("onRowInserting",p,function(){return o.insert(p.data).done(function(g,C){E(C)&&(h.key=C),g&&$e(g)&&g!==p.data&&(h.data=g),r.push({type:"insert",data:g,index:0})})});break;case Dl:p={newData:d,oldData:u,key:l.key,cancel:!1},f=this._executeEditingAction("onRowUpdating",p,function(){return o.update(l.key,p.newData).done(function(g,C){g&&$e(g)&&g!==p.newData&&(h.data=g),r.push({type:"update",key:C,data:g})})})}if(a[s]=h,f){var m=new se;f.always(function(g){n.push({key:l.key,result:g})}).always(m.resolve),i.push(m.promise())}}})},_processRemoveIfError:function(i,n){var r=i[n];return(r==null?void 0:r.type)===aa&&n>=0&&i.splice(n,1),!0},_processRemove:function(i,n,r){var a=i[n];if(!r||!a||a.type===aa)return this._processRemoveCore(i,n,!r||!a)},_processRemoveCore:function(i,n){return n>=0&&i.splice(n,1),!0},_processSaveEditDataResult:function(i){for(var n=!1,r=[...this.getChanges()],a=r.length,o=0;o<i.length;o++){var s=i[o].result,l=s==="cancel",u=be.getIndexByKey(i[o].key,r),d=r[u],c=s&&s instanceof Error;if(c){if(d&&this._addInternalData({key:d.key,error:s}),this._fireDataErrorOccurred(s),this._processRemoveIfError(r,u))break}else this._processRemove(r,u,l)&&(n=!l)}return r.length<a&&this._silentOption(Rr,r),n},_fireSaveEditDataEvents:function(i){V(i,(n,r)=>{var{data:a,key:o,type:s}=r,l=this._addInternalData({key:o}),u={key:o,data:a};switch(l.error&&(u.error=l.error),s){case aa:this.executeAction("onRowRemoved",k({},u,{data:l.oldData}));break;case ir:this.executeAction("onRowInserted",u);break;case Dl:this.executeAction("onRowUpdated",u)}}),this.executeAction("onSaved",{changes:i})},saveEditData:function(){var i=new se;return this.waitForDeferredOperations().done(()=>{if(this.isSaving()){this._resolveAfterSave(i);return}De(this._beforeSaveEditData()).done(n=>{if(n){this._resolveAfterSave(i,{cancel:n});return}this._saving=!0;var r={};this._saveEditDataInner(r).always(()=>{this._saving=!1,r.needFocusEditCell&&this._focusEditingCell()}).done(i.resolve).fail(i.reject)}).fail(i.reject)}).fail(i.reject),i.promise()},_resolveAfterSave:function(i){var{cancel:n,error:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};De(this._afterSaveEditData(n)).done(function(){i.resolve(r)}).fail(i.reject)},_saveEditDataInner:function(i){var n=[],r=[],a=[],o=this._dataController,s=o.dataSource(),l=new se;return De(this._fireOnSaving()).done(u=>{var{cancel:d,changes:c}=u;if(d)return l.resolve().promise();if(this._processChanges(r,n,a,c),r.length)return s==null||s.beginLoading(),De(...r).done(()=>{this._processSaveEditDataResult(n)?this._endSaving(a,c,l):(s==null||s.endLoading(),l.resolve())}).fail(h=>{s==null||s.endLoading(),l.resolve(h)}),l.always(()=>{i.needFocusEditCell=!0}).promise();this._cancelSaving(l)}).fail(l.reject),l.promise()},_beforeEndSaving:function(i){this._resetEditIndices()},_endSaving:function(i,n,r){var a=this._dataController.dataSource();this._beforeEndSaving(n),a==null||a.endLoading(),this._refreshDataAfterSave(i,n,r)},_cancelSaving:function(i){this.executeAction("onSaved",{changes:[]}),this._resolveAfterSave(i)},_refreshDataAfterSave:function(i,n,r){var a=this._dataController,o=this.option("editing.refreshMode"),s=o!=="reshape"&&o!=="repaint";s||a.push(i),De(a.refresh({selection:s,reload:s,load:o==="reshape",changesOnly:this.option("repaintChangesOnly")})).always(()=>{this._fireSaveEditDataEvents(n)}).done(()=>{this._resolveAfterSave(r)}).fail(l=>{this._resolveAfterSave(r,{error:l})})},isSaving:function(){return this._saving},_updateEditColumn:function(){var i=this._isEditColumnVisible(),n=this.option("editing.useIcons"),r=LR+(n?" "+$S:"");this._columnsController.addCommandColumn({type:"buttons",command:"edit",visible:i,cssClass:r,width:"auto",alignment:"center",cellTemplate:this._getEditCommandCellTemplate(),fixedPosition:"right"}),this._columnsController.columnOption("command:edit",{visible:i,cssClass:r})},_isEditColumnVisible:function(){var i=this.option("editing");return i.allowDeleting},_isEditButtonDisabled:function(){var i=this.hasChanges(),n=E(this.option("editing.editRowKey"));return!(n||i)},_updateEditButtons:function(){var i=this.getView("headerPanel"),n=this._isEditButtonDisabled();i&&(i.setToolbarItemDisabled("saveButton",n),i.setToolbarItemDisabled("revertButton",n))},_applyModified:function(i){i&&i.addClass(HS)},_beforeCloseEditCellInBatchMode:re,cancelEditData:function(){var i=this.getChanges(),n={cancel:!1,changes:i};this.executeAction("onEditCanceling",n),n.cancel||(this._cancelEditDataCore(),this.executeAction("onEditCanceled",{changes:i}))},_cancelEditDataCore:function(){var i=this._getVisibleEditRowIndex();this._beforeCancelEditData(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey(),this._afterCancelEditData(i)},_afterCancelEditData:function(i){var n=this._dataController;n.updateItems({repaintChangesOnly:this.option("repaintChangesOnly")})},_hideEditPopup:re,hasEditData:function(){return this.hasChanges()},update:function(i){var n=this._dataController;n&&this._pageIndex!==n.pageIndex()&&(i==="refresh"&&this.refresh({isPageChanged:!0}),this._pageIndex=n.pageIndex()),this._updateEditButtons()},_getRowIndicesForCascadeUpdating:function(i,n){return n?[]:[i.rowIndex]},addDeferred:function(i){this._deferreds.indexOf(i)<0&&(this._deferreds.push(i),i.always(()=>{var n=this._deferreds.indexOf(i);n>=0&&this._deferreds.splice(n,1)}))},_prepareChange:function(i,n,r){var a,o={},s=(a=i.row)===null||a===void 0?void 0:a.data,l=i.key,u=new se;if(l!==void 0){i.value=n;var d=yi(i.column.setCellValue(o,n,k(!0,{},s),r));d.done(function(){u.resolve({data:o,key:l,oldData:s,type:Dl})}).fail(nc(u)).fail(c=>this._fireDataErrorOccurred(c)),E(r)&&i.column.displayValueMap&&(i.column.displayValueMap[n]=r),this._updateRowValues(i),this.addDeferred(u)}return u},_updateRowValues:function(i){if(i.values){var n=this._dataController,r=n.getRowIndexByKey(i.key),a=n.getVisibleRows()[r];a&&(i.values=a.values),i.values[i.columnIndex]=i.value}},updateFieldValue:function(i,n,r,a){var o=i.key,s=new se;return o===void 0&&this._dataController.fireError("E1043"),i.column.setCellValue?this._prepareChange(i,n,r).done(l=>{De(this._applyChange(i,l,a)).always(()=>{s.resolve()})}):s.resolve(),s.promise()},_focusPreviousEditingCellIfNeed:function(i){if(this.hasEditData()&&!this.isEditCell(i.rowIndex,i.columnIndex))return this._focusEditingCell(),this._updateEditRow(i.row,!0),!0},_needUpdateRow:function(i){var n=this._columnsController.getVisibleColumns();i||(i=this._getEditColumn());var r=i&&i.setCellValue!==i.defaultSetCellValue,a=n.some(o=>o.calculateCellValue!==o.defaultCalculateCellValue);return r||a},_applyChange:function(i,n,r){var a=Se({},i,{forceUpdateRow:r});return this._addChange(n,a),this._updateEditButtons(),this._applyChangeCore(i,a.forceUpdateRow)},_applyChangeCore:function(i,n){var r=i.column.setCellValue!==i.column.defaultSetCellValue,a=i.row;a&&(n||r?this._updateEditRow(a,n,r):a.update&&a.update())},_updateEditRowCore:function(i,n,r){this._dataController.updateItems({changeType:"update",rowIndices:this._getRowIndicesForCascadeUpdating(i,n)})},_updateEditRow:function(i,n,r){n?this._updateRowImmediately(i,n,r):this._updateRowWithDelay(i,r)},_updateRowImmediately:function(i,n,r){this._updateEditRowCore(i,!n,r),this._validateEditFormAfterUpdate(i,r),n||this._focusEditingCell()},_updateRowWithDelay:function(i,n){var r=new se;this.addDeferred(r),setTimeout(()=>{var a=v(me.getActiveElement()),o=this._rowsView.getCellIndex(a,i.rowIndex),s=a.get(0),l=be.getSelectionRange(s);if(this._updateEditRowCore(i,!1,n),this._validateEditFormAfterUpdate(i,n),o>=0){var u=this._rowsView._getCellElement(i.rowIndex,o);this._delayedInputFocus(u,()=>{setTimeout(()=>{s=me.getActiveElement(),l.selectionStart>=0&&be.setSelectionRange(s,l)})})}r.resolve()})},_validateEditFormAfterUpdate:re,_addChange:function(i,n){var r,a=n==null?void 0:n.row,o=[...this.getChanges()],s=be.getIndexByKey(i.key,o);s<0&&(s=o.length,this._addInternalData({key:i.key,oldData:i.oldData}),delete i.oldData,o.push(i));var l=Se({},o[s]);return l&&(i.data&&(l.data=va(l.data,i.data)),(!l.type||!i.data)&&i.type&&(l.type=i.type),a&&(a.oldData=this._getOldData(a.key),a.data=va(a.data,i.data))),o[s]=l,this._silentOption(Rr,o),n&&l!==((r=this.getChanges())===null||r===void 0?void 0:r[s])&&(n.forceUpdateRow=!0),l},_getFormEditItemTemplate:function(i,n){return n.editCellTemplate||this._getDefaultEditorTemplate()},getColumnTemplate:function(i){var n=i.column,r=i.row&&i.row.rowIndex,a,o=this.isRowBasedEditMode(),s=this.isEditRow(r),l=this.isEditCell(r,i.columnIndex),u;if((n.showEditorAlways||n.setCellValue&&(s&&n.allowEditing||l))&&(i.rowType==="data"||i.rowType==="detailAdaptive")&&!n.command){var d=this.allowUpdating(i);((d||s)&&n.allowEditing||l)&&(s||!o)&&(n.showEditorAlways&&!o&&(u={cancel:!1,key:i.row.isNewRow?void 0:i.row.key,data:i.row.data,column:n},this._isEditingStart(u)),(!u||!u.cancel)&&(i.setValue=(c,h)=>{this.updateFieldValue(i,c,h)})),a=n.editCellTemplate||this._getDefaultEditorTemplate()}else n.command==="detail"&&i.rowType==="detail"&&s&&(a=this===null||this===void 0?void 0:this.getEditFormTemplate(i));return a},_createButton:function(i,n,r,a){var o=MX[n.name],s=this.option("editing.useIcons"),l=this.option("useLegacyColumnButtonTemplate"),u=v("<a>").attr("href","#").addClass(AX).addClass(n.cssClass);if(n.template&&l)this._rowsView.renderTemplate(i,n.template,r,!0);else{if(n.template)u=v("<span>").addClass(n.cssClass);else if(s&&o||n.icon){o=n.icon||o;var d=Ju(o);d==="image"||d==="svg"?u=So(o).addClass(n.cssClass):u.addClass("dx-icon"+(d==="dxIcon"?"-":" ")+o).attr("title",n.text),u.addClass("dx-link-icon"),i.addClass($S);var c=this.getButtonLocalizationNames()[n.name];c&&u.attr("aria-label",fe.format(c))}else u.text(n.text);E(n.hint)&&u.attr("title",n.hint),this._isButtonDisabled(n,r)?u.addClass("dx-state-disabled"):(!n.template||n.onClick)&&R.on(u,ye("click",BX),this.createAction(function(h){var f;(f=n.onClick)===null||f===void 0||f.call(n,k({},h,{row:r.row,column:r.column})),h.event.preventDefault(),h.event.stopPropagation()})),i.append(u,"&nbsp;"),n.template&&this._rowsView.renderTemplate(u,n.template,r,!0,a)}},getButtonLocalizationNames:()=>({edit:"dxDataGrid-editingEditRow",save:"dxDataGrid-editingSaveRowChanges",delete:"dxDataGrid-editingDeleteRow",undelete:"dxDataGrid-editingUndeleteRow",cancel:"dxDataGrid-editingCancelRowChanges"}),prepareButtonItem:function(i,n,r,a){var o=this.option("editing.texts")||{},s={revert:o.cancelAllChanges,save:o.saveAllChanges,addRow:o.addRow},l={revert:"cancel",save:"save",addRow:"addrow"}[n],u=s[n],d=(l==="save"||l==="cancel")&&this._isEditButtonDisabled();return{widget:"dxButton",options:{onInitialized:c=>{v(c.element).addClass(i._getToolbarButtonClass(OX+" "+this.addWidgetPrefix(l)+"-button"))},icon:"edit-button-"+l,disabled:d,onClick:()=>{setTimeout(()=>{this[r]()})},text:u,hint:u},showText:"inMenu",name:n+"Button",location:"after",locateInMenu:"auto",sortIndex:a}},prepareEditButtons:function(i){var n=this.option("editing")||{},r=[];return n.allowAdding&&r.push(this.prepareButtonItem(i,"addRow","addRow",20)),r},highlightDataCell:function(i,n){var r=this.isCellModified(n),a=r&&n.column.setCellValue&&(this.getEditMode()!==zs||!n.row.isEditing);a&&i.addClass(HS)},_afterInsertRow:re,_beforeSaveEditData:function(i){if(i&&!E(i.key)&&E(i.type))return!0},_afterSaveEditData:re,_beforeCancelEditData:re,_allowEditAction:function(i,n){var r=this.option("editing."+i);return Ie(r)&&(r=r({component:this.component,row:n.row})),r},allowUpdating:function(i,n){var r=this.option("editing.startEditAction")||PX,a=arguments.length>1?r===n||n==="down":!0;return a&&this._allowEditAction("allowUpdating",i)},allowDeleting:function(i){return this._allowEditAction("allowDeleting",i)},isCellModified:function(i){var n=i.columnIndex,r=i.row&&(i.row.isNewRow?i.row.values:i.row.modifiedValues);return!!r&&r[n]!==void 0},isNewRowInEditMode:function(){var i=this._getVisibleEditRowIndex(),n=this._dataController.items();return i>=0?n[i].isNewRow:!1}}}()),WX={defaultOptions:function(){return{editing:{mode:"row",refreshMode:"full",newRowPosition:BR,allowAdding:!1,allowUpdating:!1,allowDeleting:!1,useIcons:!1,selectTextOnEditStart:!1,confirmDelete:!0,texts:{editRow:fe.format("dxDataGrid-editingEditRow"),saveAllChanges:fe.format("dxDataGrid-editingSaveAllChanges"),saveRowChanges:fe.format("dxDataGrid-editingSaveRowChanges"),cancelAllChanges:fe.format("dxDataGrid-editingCancelAllChanges"),cancelRowChanges:fe.format("dxDataGrid-editingCancelRowChanges"),addRow:fe.format("dxDataGrid-editingAddRow"),deleteRow:fe.format("dxDataGrid-editingDeleteRow"),undeleteRow:fe.format("dxDataGrid-editingUndeleteRow"),confirmDeleteMessage:fe.format("dxDataGrid-editingConfirmDeleteMessage"),confirmDeleteTitle:""},form:{colCount:2},popup:{},startEditAction:"click",editRowKey:null,editColumnName:null,changes:[]},useLegacyColumnButtonTemplate:!1}},controllers:{editing:HX},extenders:{controllers:{data:{init:function(){this._editingController=this.getController("editing"),this.callBase()},reload:function(e,t){return!t&&this._editingController.refresh(),this.callBase.apply(this,arguments)},repaintRows:function(){if(!this.getController("editing").isSaving())return this.callBase.apply(this,arguments)},_updateEditRow:function(e){var t=this.option(Gn),i=be.getIndexByKey(t,e),n=e[i];if(n){var r;n.isEditing=!0,(r=this._updateEditItem)===null||r===void 0||r.call(this,n)}},_updateItemsCore:function(e){this.callBase(e),this._updateEditRow(this.items(!0))},_applyChangeUpdate:function(e){this._updateEditRow(e.items),this.callBase(e)},_applyChangesOnly:function(e){this._updateEditRow(e.items),this.callBase(e)},_processItems:function(e,t){return e=this._editingController.processItems(e,t),this.callBase(e,t)},_processDataItem:function(e,t){return this._editingController.processDataItem(e,t,this.generateDataValues),this.callBase(e,t)},_processItem:function(e,t){return e=this.callBase(e,t),e.isNewRow&&(t.dataIndex--,delete e.dataIndex),e},_getChangedColumnIndices:function(e,t,i,n){if(!(e.isNewRow!==t.isNewRow||e.removed!==t.removed))return this.callBase.apply(this,arguments)},_isCellChanged:function(e,t,i,n,r){var a=this.getController("editing"),o=e.cells&&e.cells[n],s=a&&a.isEditCell(i,n);return r&&s?!1:o&&o.column&&!o.column.showEditorAlways&&o.isEditing!==s?!0:this.callBase.apply(this,arguments)},needToRefreshOnDataSourceChange:function(e){var t=this.getController("editing"),i=Array.isArray(e.value)&&e.value===e.previousValue&&t.isSaving();return!i},_handleDataSourceChange(e){var t=this.callBase(e),i=this.option("editing.changes"),n=e.value;if(Array.isArray(n)&&i.length){var r=n.map(l=>this.keyOf(l)),a=i.filter(l=>l.type==="insert"||r.some(u=>Bt(l.key,u)));a.length!==i.length&&this.option("editing.changes",a);var o=this.option("editing.editRowKey"),s=a.some(l=>l.type==="insert"&&Bt(o,l.key));!s&&r.every(l=>!Bt(o,l))&&this.option("editing.editRowKey",null)}return t}}},views:{rowsView:{init:function(){this.callBase(),this._editingController=this.getController("editing")},getCellIndex:function(e,t){if(!e.is("td")&&t>=0){var i=this.getCellElements(t),n=-1;return V(i,function(r,a){v(a).find(e).length&&(n=r)}),n}return this.callBase.apply(this,arguments)},publicMethods:function(){return this.callBase().concat(["cellValue"])},_getCellTemplate:function(e){var t=this._editingController.getColumnTemplate(e);return t||this.callBase(e)},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=!!e.removed,n=!!e.isNewRow,r=!!e.modified;n&&t.addClass(RX),r&&t.addClass(kX),(n||i)&&t.removeClass(DX)}return t},_getColumnIndexByElement:function(e){for(var t=e.closest("table"),i=this.getTableElements();t.length&&!i.filter(t).length;)e=t.closest("td"),t=e.closest("table");return this._getColumnIndexByElementCore(e)},_getColumnIndexByElementCore:function(e){var t=e.closest("."+SX+"> td:not(.dx-master-detail-cell)");return this.getCellIndex(t)},_editCellByClick:function(e,t){var i=this._editingController,n=v(e.event.target),r=this._getColumnIndexByElement(n),a=this._dataController.items()[e.rowIndex],o=i.allowUpdating({row:a},t)||a&&a.isNewRow,s=this._columnsController.getVisibleColumns()[r],l=i.isEditCell(e.rowIndex,r),u=o&&s&&(s.allowEditing||l),d=this.option("editing.startEditAction")||"click";if(t==="down")return(Re.real().ios||Re.real().android)&&!l&&Zs(),s&&s.showEditorAlways&&u&&i.editCell(e.rowIndex,r);if(t==="click"&&d==="dblClick"&&!l){var c=a==null?void 0:a.isNewRow;i.closeEditCell(!1,c)}if(u&&t===d)return i.editCell(e.rowIndex,r)||i.isEditRow(e.rowIndex)},_rowPointerDown:function(e){this._pointerDownTimeout=setTimeout(()=>{this._editCellByClick(e,"down")})},_rowClick:function(e){var t=v(e.rowElement).hasClass(this.addWidgetPrefix(AR));e.event[DR]=this.component,!this._editCellByClick(e,"click")&&!t&&this.callBase.apply(this,arguments)},_rowDblClick:function(e){this._editCellByClick(e,"dblClick")||this.callBase.apply(this,arguments)},_cellPrepared:function(e,t){var i=this._editingController,n=!!t.column.command,r=t.setValue,a=i.isEditRow(t.rowIndex),o=PR(a,t);if(WS(a,t)){var s=t.column.alignment;e.toggleClass(this.addWidgetPrefix(TX),!r).toggleClass(LX,!r),s&&e.find(OR).first().css("textAlign",s)}o&&this._editCellPrepared(e),t.column&&!n&&i.highlightDataCell(e,t),this.callBase.apply(this,arguments)},_editCellPrepared:re,_formItemPrepared:re,_getCellOptions:function(e){var t=this.callBase(e);return t.isEditing=this._editingController.isEditCell(t.rowIndex,t.columnIndex),t},_createCell:function(e){var t=this.callBase(e),i=this._editingController.isEditRow(e.rowIndex);return WS(i,e)&&t.addClass(bX),t},cellValue:function(e,t,i,n){var r=this.getCellOptions(e,t);if(r){if(i===void 0)return r.value;this._editingController.updateFieldValue(r,i,n,!0)}},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._pointerDownTimeout)},_renderCore:function(){this.callBase.apply(this,arguments),this._editingController._focusEditorIfNeed()}},headerPanel:{_getToolbarItems:function(){var e=this.callBase(),t=this.getController("editing").prepareEditButtons(this);return t.concat(e)},optionChanged:function(e){var t=e.fullName;switch(e.name){case"editing":var i=[Mc,Rr,zl,Gn],n=t&&!i.some(r=>r===t);n&&this._invalidate(),this.callBase(e);break;case"useLegacyColumnButtonTemplate":e.handled=!0;break;default:this.callBase(e)}},isVisible:function(){var e=this.getController("editing").option("editing");return this.callBase()||(e==null?void 0:e.allowAdding)}}}}};Oe.registerModule("editing",k(!0,{},WX,{extenders:{controllers:{data:{_changeRowExpandCore:function(e){var t=this._editingController;return Array.isArray(e)&&t&&t.refresh(),this.callBase.apply(this,arguments)}}}}}));var zS="dx-edit-row",zX={extenders:{controllers:{editing:{isRowEditMode:function(){return this.getEditMode()===zs},_afterCancelEditData:function(e){var t=this._dataController;this.isRowBasedEditMode()&&e>=0?t.updateItems({changeType:"update",rowIndices:[e,e+1]}):this.callBase.apply(this,arguments)},_isDefaultButtonVisible:function(e,t){var i=this.isRowBasedEditMode(),n=t.row&&t.row.rowIndex===this._getVisibleEditRowIndex();if(i)switch(e.name){case"edit":return!n&&this.allowUpdating(t);case"delete":return this.callBase.apply(this,arguments)&&!n;case"save":case"cancel":return n;default:return this.callBase.apply(this,arguments)}return this.callBase.apply(this,arguments)},isEditRow:function(e){return this.isRowBasedEditMode()&&this.isEditRowByIndex(e)},_cancelSaving:function(){this.isRowBasedEditMode()&&(this.hasChanges()||this._cancelEditDataCore()),this.callBase.apply(this,arguments)},_refreshCore:function(e){var{allowCancelEditing:t}=e??{};if(this.isRowBasedEditMode()){var i=this.getChanges().filter(n=>n.type==="update").length>0;this.init(),t&&i&&this._cancelEditDataCore()}this.callBase.apply(this,arguments)},_isEditColumnVisible:function(){var e=this.callBase.apply(this,arguments),t=this.option("editing"),i=this.isRowEditMode(),n=t.allowUpdating||t.allowAdding;return e||i&&n},_focusEditorIfNeed:function(){var e=this.getEditMode();if(this._needFocusEditor){if(IX.indexOf(e)!==-1){var t=this.getFocusedCellInRow(this._getVisibleEditRowIndex());this._delayedInputFocus(t,()=>{t&&this.component.focus(t)})}this._needFocusEditor=!1}}},data:{_getChangedColumnIndices:function(e,t,i,n){var r=this.getController("editing");if(!(r.isRowBasedEditMode()&&e.isEditing!==t.isEditing))return this.callBase.apply(this,arguments)}}},views:{rowsView:{_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=this._editingController,n=i.isEditRow(e.rowIndex);n&&(t.addClass(zS),t.removeClass(FS),e.rowType==="detail"&&t.addClass(this.addWidgetPrefix(AR)))}return t},_update:function(e){this.callBase(e),e.changeType==="updateSelection"&&this.getTableElements().children("tbody").children("."+zS).removeClass(FS)}}}}};Oe.registerModule("editingRowBased",zX);class FR{constructor(){this._map={}}_findWidgetInstance(t){var i;return V(this._map,function(n,r){var{widgetInstance:a,item:o}=r;if(t(o))return i=a,!1}),i}_findFieldByCondition(t,i){var n;return V(this._map,function(r,a){if(t(a))return n=i==="guid"?r:a[i],!1}),n}clear(){this._map={}}removeItemsByItems(t){V(t.getItems(),i=>this.removeItemByKey(i))}removeItemByKey(t){delete this._map[t]}add(t){var i=t.guid||new si;return this._map[i]=t,i}addItemsOrExtendFrom(t){t.each((i,n)=>{this._map[i]?(n.widgetInstance&&(this._map[i].widgetInstance=n.widgetInstance),this._map[i].$itemContainer=n.$itemContainer):this.add({item:n.item,widgetInstance:n.widgetInstance,guid:i,$itemContainer:n.$itemContainer})})}extendRunTimeItemInfoByKey(t,i){this._map[t]&&(this._map[t]=k(this._map[t],i))}findWidgetInstanceByItem(t){return this._findWidgetInstance(i=>i===t)}findGroupOrTabLayoutManagerByPath(t){return this._findFieldByCondition(i=>{var{path:n}=i;return n===t},"layoutManager")}findKeyByPath(t){return this._findFieldByCondition(i=>{var{path:n}=i;return n===t},"guid")}findWidgetInstanceByName(t){return this._findWidgetInstance(i=>t===i.name)}findWidgetInstanceByDataField(t){return this._findWidgetInstance(i=>t===(Ve(i)?i:i.dataField))}findItemContainerByItem(t){for(var i in this._map)if(this._map[i].item===t)return this._map[i].$itemContainer;return null}findItemIndexByItem(t){return this._findFieldByCondition(i=>{var{item:n}=i;return n===t},"itemIndex")}findPreparedItemByItem(t){return this._findFieldByCondition(i=>{var{item:n}=i;return n===t},"preparedItem")}getItems(){return this._map}each(t){V(this._map,function(i,n){t(i,n)})}removeItemsByPathStartWith(t){var i=Object.keys(this._map),n=i.filter(r=>this._map[r].path?this._map[r].path.indexOf(t,0)>-1:!1);n.forEach(r=>this.removeItemByKey(r))}}var rc={move(e,t){ri(e,{left:t})}},mv={moveTo(e,t,i,n){zt.animate(e,{type:"slide",to:{left:t},duration:i,complete:n})},complete(e){zt.stop(e,!0)}},GX="dx-multiview",UX="dx-multiview-wrapper",KX="dx-multiview-item-container",GS="dx-multiview-item",jX="dx-multiview-item-hidden",qX="dxMultiViewItemData",YX=200,US=e=>+e,XX=e=>On(e).left,MR=CC.inherit({_activeStateUnit:"."+GS,_supportedKeys:function(){return k(this.callBase(),{pageUp:re,pageDown:re})},_getDefaultOptions:function(){return k(this.callBase(),{selectedIndex:0,swipeEnabled:!0,animationEnabled:!0,loop:!1,deferRendering:!0,_itemAttributes:{role:"tabpanel"},loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectionByClick:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}}])},_itemClass:function(){return GS},_itemDataKey:function(){return qX},_itemContainer:function(){return this._$itemContainer},_itemElements:function(){return this._itemContainer().children(this._itemSelector())},_itemWidth:function(){return this._itemWidthValue||(this._itemWidthValue=He(this._$wrapper)),this._itemWidthValue},_clearItemWidthCache:function(){delete this._itemWidthValue},_itemsCount:function(){return this.option("items").length},_normalizeIndex:function(e){var t=this._itemsCount();return e<0&&(e+=t),e>=t&&(e-=t),e},_getRTLSignCorrection:function(){return this.option("rtlEnabled")?-1:1},_init:function(){this.callBase.apply(this,arguments);var e=this.$element();e.addClass(GX),this._$wrapper=v("<div>").addClass(UX),this._$wrapper.appendTo(e),this._$itemContainer=v("<div>").addClass(KX),this._$itemContainer.appendTo(this._$wrapper),this.option("loopItemFocus",this.option("loop")),this._initSwipeable()},_initMarkup:function(){this._deferredItems=[],this.callBase();var e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0])},_afterItemElementDeleted:function(e,t){this.callBase(e,t),this._deferredItems&&this._deferredItems.splice(t.itemIndex,1)},_beforeItemElementInserted:function(e){this.callBase.apply(this,arguments),this._deferredItems&&this._deferredItems.splice(e.index,0,null)},_executeItemRenderAction:function(e,t,i){e=(this.option("items")||[]).indexOf(t),this.callBase(e,t,i)},_renderItemContent:function(e){var t=new se,i=this,n=this.callBase,r=new se;return r.done(function(){var a=n.call(i,e);t.resolve(a)}),this._deferredItems[e.index]=r,this.option("deferRendering")||r.resolve(),t.promise()},_render:function(){this.callBase(),Qt(()=>{var e=this._getSelectedItemIndices();this._updateItems(e[0])})},_updateItems:function(e,t){this._updateItemsPosition(e,t),this._updateItemsVisibility(e,t)},_modifyByChanges:function(){this.callBase.apply(this,arguments);var e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0])},_updateItemsPosition:function(e,t){var i=this._itemElements(),n=E(t)?-this._animationDirection(t,e):void 0,r=i.eq(e);rc.move(r,0),E(t)&&rc.move(i.eq(t),100*n+"%")},_updateItemsVisibility:function(e,t){var i=this._itemElements();i.each((function(n,r){var a=v(r),o=n!==e&&n!==t;o||this._renderSpecificItem(n),a.toggleClass(jX,o),this.setAria("hidden",o||void 0,a)}).bind(this))},_renderSpecificItem:function(e){var t=this._itemElements().eq(e),i=t.find(this._itemContentClass()).length>0;E(e)&&!i&&(this._deferredItems[e].resolve(),lr(t))},_refreshItem:function(e,t){this.callBase(e,t),this._updateItemsVisibility(this.option("selectedIndex"))},_setAriaSelected:re,_updateSelection:function(e,t){var i=e[0],n=t[0];mv.complete(this._$itemContainer),this._updateItems(n,i);var r=this._animationDirection(i,n);this._animateItemContainer(r*this._itemWidth(),(function(){rc.move(this._$itemContainer,0),this._updateItems(i),He(this._$itemContainer)}).bind(this))},_animateItemContainer:function(e,t){var i=this.option("animationEnabled")?YX:0;mv.moveTo(this._$itemContainer,e,i,t)},_animationDirection:function(e,t){var i=XX(this._$itemContainer),n=(t-e)*this._getRTLSignCorrection()*this._getItemFocusLoopSignCorrection(),r=i!==0,a=r?i:n;return Hs(a)},_getSwipeDisabledState(){return!this.option("swipeEnabled")||this._itemsCount()<=1},_initSwipeable(){this._createComponent(this.$element(),Sh,{disabled:this._getSwipeDisabledState(),elastic:!1,itemSizeFunc:this._itemWidth.bind(this),onStart:e=>this._swipeStartHandler(e.event),onUpdated:e=>this._swipeUpdateHandler(e.event),onEnd:e=>this._swipeEndHandler(e.event)})},_swipeStartHandler:function(e){mv.complete(this._$itemContainer);var t=this.option("selectedIndex"),i=this.option("loop"),n=this._itemsCount()-1,r=this.option("rtlEnabled");e.maxLeftOffset=US(i||(r?t>0:t<n)),e.maxRightOffset=US(i||(r?t<n:t>0)),this._swipeDirection=null},_swipeUpdateHandler:function(e){var t=e.offset,i=Hs(t)*this._getRTLSignCorrection();if(rc.move(this._$itemContainer,t*this._itemWidth()),i!==this._swipeDirection){this._swipeDirection=i;var n=this.option("selectedIndex"),r=this._normalizeIndex(n-i);this._updateItems(n,r)}},_swipeEndHandler:function(e){var t=e.targetOffset*this._getRTLSignCorrection();if(t){this.option("selectedIndex",this._normalizeIndex(this.option("selectedIndex")-t));var i=this.itemElements().filter(".dx-item-selected");this.option("focusStateEnabled")&&this.option("focusedElement",Me(i))}else this._animateItemContainer(0,re)},_getItemFocusLoopSignCorrection:function(){return this._itemFocusLooped?-1:1},_moveFocus:function(){this.callBase.apply(this,arguments),this._itemFocusLooped=!1},_prevItem:function(e){var t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.last()),t},_nextItem:function(e){var t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.first()),t},_dimensionChanged:function(){this._clearItemWidthCache()},_visibilityChanged:function(e){e&&this._dimensionChanged()},_updateSwipeDisabledState(){var e=this._getSwipeDisabledState();Sh.getInstance(this.$element()).option("disabled",e)},_optionChanged:function(e){var t=e.value;switch(e.name){case"loop":this.option("loopItemFocus",t);break;case"animationEnabled":break;case"swipeEnabled":this._updateSwipeDisabledState();break;case"deferRendering":this._invalidate();break;case"items":this._updateSwipeDisabledState(),this.callBase(e);break;default:this.callBase(e)}}});tt("dxMultiView",MR);var ZX="dx-tabs-item-badge",KS="dx-badge",JX=Lo.inherit({_renderWatchers:function(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this))},_renderBadge:function(e){if(this._$element.children("."+KS).remove(),!!e){var t=v("<div>").addClass(ZX).addClass(KS).text(e);this._$element.append(t)}}}),jS="dx-tabs-expanded";function VR(e){return e.scrollWidth-e.clientWidth}function QX(e,t){return Math.round(e)<=t}function eZ(e,t,i){return Math.round(VR(e)-t)<=i}var tZ="dx-tabs",iZ="dx-tabs-wrapper",qS="dx-tabs-stretched",nZ="dx-tabs-scrollable",YS="dx-tabs-nav-buttons",XS="dx-overflow-hidden",ZS="dx-tab",rZ="dx-tab-selected",aZ="dx-tabs-nav-button",oZ="dx-tabs-nav-button-left",sZ="dx-tabs-nav-button-right",lZ="dx-tab-text",uZ="dxTabData",JS="chevronnext",QS="chevronprev",dZ=100,eE=5,cZ=300,hZ=30,RC=CC.inherit({_activeStateUnit:"."+ZS,_getDefaultOptions:function(){return k(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:function(e){return e?e.badge:void 0},_itemAttributes:{role:"tab"}})},_defaultOptionsRules:function(){var e=Xn();return this.callBase().concat([{device:function(){return Re.real().deviceType!=="desktop"},options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return ei(e)},options:{useInkRipple:!0,selectOnFocus:!1}}])},_init:function(){this.callBase(),this.setAria("role","tablist"),this.$element().addClass(tZ),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=dZ},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Po((function(e,t){Ye(t)?this._prepareDefaultItemTemplate(t,e):e.text(String(t));var i=So(t.icon);i&&i.prependTo(e),e.wrapInner(v("<span>").addClass(lZ))}).bind(this),["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(e,t){var{itemData:i,container:n,index:r}=t;return this._deferredTemplates[r]=new se,e.render({model:i,container:n,index:r,onRendered:()=>this._deferredTemplates[r].resolve()})},_itemClass:function(){return ZS},_selectedItemClass:function(){return rZ},_itemDataKey:function(){return uZ},_initMarkup:function(){this._deferredTemplates=[],this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass(XS)},_render:function(){this.callBase(),this._deferRenderScrolling()},_deferRenderScrolling(){De.apply(this,this._deferredTemplates).done(()=>this._renderScrolling())},_renderScrolling:function(){var e=[qS,jS,XS];if(this.$element().removeClass(e.join(" ")),this.option("scrollingEnabled")&&this._isItemsWidthExceeded()){this._scrollable||(this._renderScrollable(),this._renderNavButtons());var t=this.getScrollable();if(t.update(),this.option("rtlEnabled")){var i=VR(v(this.getScrollable().container()).get(0));t.scrollTo({left:i})}this._updateNavButtonsVisibility(),this._scrollToItem(this.option("selectedItem"))}this.option("scrollingEnabled")&&this._isItemsWidthExceeded()||(this._cleanScrolling(),this._needStretchItems()&&!this._isItemsWidthExceeded()&&this.$element().addClass(qS),this.$element().removeClass(YS).addClass(jS))},_isItemsWidthExceeded:function(){var e=this._getSummaryItemsWidth(this._getVisibleItems(),!0);return e-1>He(this.$element())},_needStretchItems:function(){var e=this._getVisibleItems(),t=He(this.$element()),i=[];V(e,(r,a)=>{i.push(ot(a,!0))});var n=Math.max.apply(null,i);return n>t/e.length},_cleanNavButtons:function(){!this._leftButton||!this._rightButton||(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling:function(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple:function(){this._inkRipple=Jg()},_toggleActiveState:function(e,t,i){if(this.callBase.apply(this,arguments),!!this._inkRipple){var n={element:e,event:i};t?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)}},_renderMultiple:function(){this.option("selectionMode")==="multiple"&&this.option("selectOnFocus",!1)},_renderWrapper:function(){this._$wrapper=v("<div>").addClass(iZ),this.$element().append(this._$wrapper)},_itemContainer:function(){return this._$wrapper},_renderScrollable:function(){var e=this.$element().wrapInner(v("<div>").addClass(nZ)).children();this._scrollable=this._createComponent(e,_n,{direction:"horizontal",showScrollbar:"never",useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:()=>{this._updateNavButtonsVisibility()}}),this.$element().append(this._scrollable.$element())},_scrollToItem:function(e){if(this._scrollable){var t=this._editStrategy.getItemElement(e);this._scrollable.scrollToElement(t)}},_renderNavButtons:function(){if(this.$element().toggleClass(YS,this.option("showNavButtons")),!!this.option("showNavButtons")){var e=this.option("rtlEnabled");this._leftButton=this._createNavButton(-30,e?JS:QS);var t=this._leftButton.$element();t.addClass(oZ),this.$element().prepend(t),this._rightButton=this._createNavButton(hZ,e?QS:JS);var i=this._rightButton.$element();i.addClass(sZ),this.$element().append(i)}},_updateNavButtonsVisibility:function(){var e=this.getScrollable();this._leftButton&&this._leftButton.option("disabled",QX(e.scrollLeft(),1)),this._rightButton&&this._rightButton.option("disabled",eZ(v(e.container()).get(0),e.scrollLeft(),1))},_updateScrollPosition:function(e,t){this._scrollable.update(),this._scrollable.scrollBy(e/t)},_createNavButton:function(e,t){var i=this,n=i._createAction(function(){i._holdInterval=setInterval(function(){i._updateScrollPosition(e,eE)},eE)}),r=ye(Ea.name,"dxNavButton"),a=ye(lt.up,"dxNavButton"),o=ye(lt.out,"dxNavButton"),s=this._createComponent(v("<div>").addClass(aZ),Ii,{focusStateEnabled:!1,icon:t,onClick:function(){i._updateScrollPosition(e,1)},integrationOptions:{}}),l=s.$element();return R.on(l,r,{timeout:cZ},(function(u){n({event:u})}).bind(this)),R.on(l,a,function(){i._clearInterval()}),R.on(l,o,function(){i._clearInterval()}),s},_clearInterval:function(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection:function(e){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(e[0]),{left:1,right:1})},_visibilityChanged:function(e){e&&this._dimensionChanged()},_dimensionChanged:function(){this._renderScrolling()},_itemSelectHandler:function(e){this.option("selectionMode")==="single"&&this.isItemSelected(e.currentTarget)||this.callBase(e)},_clean:function(){this._deferredTemplates=[],this._cleanScrolling(),this.callBase()},_optionChanged:function(e){switch(e.name){case"useInkRipple":case"scrollingEnabled":case"showNavButtons":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(e.name,e.value);break;case"width":this.callBase(e),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(e);break;case"badgeExpr":this._invalidate();break;default:this.callBase(e)}},_afterItemElementInserted(){this.callBase(),this._deferRenderScrolling()},_afterItemElementDeleted(e,t){this.callBase(e,t),this._renderScrolling()},getScrollable(){return this._scrollable}});RC.ItemClass=JX;tt("dxTabs",RC);class fZ extends Lo{_renderWatchers(){return this._startWatcher("badge",re),super._renderWatchers()}}var pZ="dx-tabpanel",vZ="dx-tabpanel-tabs",_Z="dx-tabpanel-container",mZ="dx-tab-text",kC=MR.inherit({_getDefaultOptions:function(){return k(this.callBase(),{itemTitleTemplate:"title",hoverStateEnabled:!0,showNavButtons:!1,scrollByContent:!0,scrollingEnabled:!0,onTitleClick:null,onTitleHold:null,onTitleRendered:null,badgeExpr:function(e){return e?e.badge:void 0}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return!go},options:{swipeEnabled:!1}},{device:{platform:"generic"},options:{animationEnabled:!1}}])},_init:function(){this.callBase(),this.$element().addClass(pZ),this.setAria("role","tabpanel")},_initMarkup:function(){this.callBase(),this._createTitleActions(),this._renderLayout()},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new Po(function(e,t){if(Ye(t)){var i=So(t.icon);i&&e.append(i),E(t.title)&&!Ye(t.title)&&e.append(me.createTextNode(t.title))}else E(t)&&e.text(String(t));e.wrapInner(v("<span>").addClass(mZ))},["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions:function(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction:function(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction:function(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction:function(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderContent:function(){var e=this;this.callBase(),this.option("templatesRenderAsynchronously")&&(this._resizeEventTimer=setTimeout(function(){e._updateLayout()},0))},_renderLayout:function(){if(this._tabs){this._updateLayout();return}var e=this.$element();this._$tabContainer=v("<div>").addClass(vZ).appendTo(e);var t=v("<div>").appendTo(this._$tabContainer);this._tabs=this._createComponent(t,RC,this._tabConfig()),this._$container=v("<div>").addClass(_Z).appendTo(e),this._$container.append(this._$wrapper),this._updateLayout()},_updateLayout:function(){if(Ue()){var e=nt(this._$tabContainer);this._$container.css({marginTop:-e,paddingTop:e})}},_refreshActiveDescendant:function(){if(this._tabs){var e=this._tabs,t=e.itemElements(),i=v(t[e.option("selectedIndex")]),n=this.getFocusedItemId();this.setAria("controls",void 0,v(t)),this.setAria("controls",n,i)}},_tabConfig:function(){return{selectOnFocus:!0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),repaintChangesOnly:this.option("repaintChangesOnly"),tabIndex:this.option("tabIndex"),selectedIndex:this.option("selectedIndex"),badgeExpr:this.option("badgeExpr"),onItemClick:this._titleClickAction.bind(this),onItemHold:this._titleHoldAction.bind(this),itemHoldTimeout:this.option("itemHoldTimeout"),onSelectionChanged:(function(e){this.option("selectedIndex",e.component.option("selectedIndex")),this._refreshActiveDescendant()}).bind(this),onItemRendered:this._titleRenderedAction.bind(this),itemTemplate:this._getTemplateByOption("itemTitleTemplate"),items:this.option("items"),noDataText:null,scrollingEnabled:this.option("scrollingEnabled"),scrollByContent:this.option("scrollByContent"),showNavButtons:this.option("showNavButtons"),itemTemplateProperty:"tabTemplate",loopItemFocus:this.option("loop"),selectionRequired:!0,onOptionChanged:(function(e){if(e.name==="focusedElement")if(e.value){var t=v(e.value),i=this._itemElements().eq(t.index());this.option("focusedElement",Me(i))}else this.option("focusedElement",e.value)}).bind(this),onFocusIn:(function(e){this._focusInHandler(e.event)}).bind(this),onFocusOut:(function(e){this._isFocusOutHandlerExecuting||this._focusOutHandler(e.event)}).bind(this)}},_renderFocusTarget:function(){this._focusTarget().attr("tabIndex",-1)},_updateFocusState:function(e,t){this.callBase(e,t),e.target===this._tabs._focusTarget().get(0)&&this._toggleFocusClass(t,this._focusTarget())},_focusOutHandler:function(e){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(e),this._isFocusOutHandlerExecuting=!1},_setTabsOption:function(e,t){this._tabs&&this._tabs.option(e,t)},_visibilityChanged:function(e){e&&(this._tabs._dimensionChanged(),this._updateLayout())},registerKeyHandler:function(e,t){this.callBase(e,t),this._tabs&&this._tabs.registerKeyHandler(e,t)},repaint:function(){this.callBase(),this._tabs.repaint()},_optionChanged:function(e){var t=e.name,i=e.value,n=e.fullName;switch(t){case"dataSource":this.callBase(e);break;case"items":this._setTabsOption(t,this.option(t)),this._updateLayout(),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(e);break;case"width":this.callBase(e),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(n,i),this.callBase(e),this.option("focusStateEnabled")===!0){var r=this.option("selectedIndex"),a=this._itemElements().eq(r);this.option("focusedElement",Me(a))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(n,i),this.callBase(e);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(n,i);break;case"focusedElement":var o=i&&v(i).index(),s=i&&this._tabs._itemElements().eq(o);this._setTabsOption("focusedElement",Me(s)),this.callBase(e);break;case"itemTitleTemplate":this._setTabsOption("itemTemplate",this._getTemplateByOption("itemTitleTemplate"));break;case"onTitleClick":this._createTitleClickAction(),this._setTabsOption("onItemClick",this._titleClickAction.bind(this));break;case"onTitleHold":this._createTitleHoldAction(),this._setTabsOption("onItemHold",this._titleHoldAction.bind(this));break;case"onTitleRendered":this._createTitleRenderedAction(),this._setTabsOption("onItemRendered",this._titleRenderedAction.bind(this));break;case"loop":this._setTabsOption("loopItemFocus",i);break;case"badgeExpr":this._invalidate();break;default:this.callBase(e)}},_clean:function(){clearTimeout(this._resizeEventTimer),this.callBase()}});kC.ItemClass=fZ;tt("dxTabPanel",kC);class tl{constructor(t){this._options=t,this._itemsRunTimeInfo=this._options.itemsRunTimeInfo}findInstance(){return this._itemsRunTimeInfo.findWidgetInstanceByItem(this._options.item)}findItemContainer(){return this._itemsRunTimeInfo.findItemContainerByItem(this._options.item)}findPreparedItem(){return this._itemsRunTimeInfo.findPreparedItemByItem(this._options.item)}tryExecute(){it.abstract()}}var fm=(e,t)=>"".concat(t?"tabs":"items","[").concat(e,"]"),NR=(e,t)=>E(e)&&E(t)?"".concat(e,".").concat(t):e||t,pm=e=>e?e.replace(/\s/g,""):void 0,gZ=(e,t)=>e?e.dataField===t||e.name===t||pm(e.title)===t||e.itemType==="group"&&pm(e.caption)===t:!1,Gl=(e,t)=>"".concat(e,".").concat(t),tE=e=>{var t=e.split(".");return t[t.length-1].replace(/\[\d+]/,"")},CZ=e=>{for(var t=e.split("."),i=[...t],n=t.length-1;n>=0;n--){if($R(t[n]))return i.join(".");i.splice(n,1)}return""},$R=e=>e.indexOf("tabs")>-1,HR=(e,t,i)=>{var n=e.indexOf(t);if(n>-1)return fm(n,i);for(var r=0;r<e.length;r++){var a=e[r],o=a.tabs||a.items;if(o){var s=HR(o,t,a.tabs);if(s)return NR(fm(r,i),s)}}};function yZ(e){var{form:t,$formElement:i,formOptions:n,items:r,validationGroup:a,extendedLayoutManagerOptions:o,onFieldDataChanged:s,onContentReady:l,onDisposing:u,onFieldItemRendered:d}=e,c={form:t,items:r,$formElement:i,validationGroup:a,onFieldDataChanged:s,onContentReady:l,onDisposing:u,onFieldItemRendered:d,validationBoundary:n.scrollingEnabled?i:void 0,scrollingEnabled:n.scrollingEnabled,showRequiredMark:n.showRequiredMark,showOptionalMark:n.showOptionalMark,requiredMark:n.requiredMark,optionalMark:n.optionalMark,requiredMessage:n.requiredMessage,screenByWidth:n.screenByWidth,layoutData:n.formData,labelLocation:n.labelLocation,customizeItem:n.customizeItem,minColWidth:n.minColWidth,showColonAfterLabel:n.showColonAfterLabel,onEditorEnterKey:n.onEditorEnterKey,labelMode:n.labelMode},h=k(c,{isRoot:o.isRoot,colCount:o.colCount,alignItemLabels:o.alignItemLabels,cssItemClass:o.cssItemClass,colCountByScreen:o.colCountByScreen,onLayoutChanged:o.onLayoutChanged,width:o.width});return h}class xZ extends tl{tryExecute(){var{value:t}=this._options,i=this.findInstance();return i?(i.option(t),!0):!1}}class iE extends tl{tryExecute(){var t=this.findInstance();if(t){var{optionName:i,item:n,value:r}=this._options,a=this._itemsRunTimeInfo.findItemIndexByItem(n);if(a>=0)return t.option(Gl("items[".concat(a,"]"),i),r),!0}return!1}}class bZ extends tl{tryExecute(){var t=this.findPreparedItem();return t!=null&&t._prepareGroupItemTemplate&&t._renderGroupContentTemplate?(t._prepareGroupItemTemplate(this._options.item.template),t._renderGroupContentTemplate(),!0):!1}}class SZ extends tl{tryExecute(){var t=this.findInstance();if(t){var{value:i}=this._options;return t.option("dataSource",i),!0}return!1}}class EZ extends tl{tryExecute(){var{item:t}=this._options,i=this.findInstance(),n=i&&Vt(i.$element()[0],"dxValidator");if(n&&t){var r=s=>s.type==="required",a=(n.option("validationRules")||[]).some(r),o=(t.validationRules||[]).some(r);if(!a&&!o||a&&o)return n.option("validationRules",t.validationRules),!0}return!1}}class wZ extends tl{tryExecute(){var t=this.findItemContainer(),{previousValue:i,value:n}=this._options;return t?(t.removeClass(i).addClass(n),!0):!1}}var IZ=(e,t)=>{var i;switch(e){case"editorOptions":case"buttonOptions":return new xZ(t);case"validationRules":return new EZ(t);case"cssClass":return new wZ(t);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new iE(k(t,{optionName:e}));case"tabs":return new SZ(t);case"template":return((i=t.item)===null||i===void 0?void 0:i.itemType)==="group"?new bZ(t):new iE(k(t,{optionName:e}));default:return null}},TZ=je(),WR="dx-responsivebox",nE=WR+"-screen-",AZ="dx-box-item",rE="dxBoxItemData",DZ=1920,zR=Fo.inherit({_getDefaultOptions:function(){return k(this.callBase(),{rows:[],cols:[],screenByWidth:null,singleColumnScreen:"",height:"100%",width:"100%",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,onLayoutChanged:null,currentScreenFactor:void 0,_layoutStrategy:void 0})},_init:function(){this.option("screenByWidth")||this._options.silent("screenByWidth",Qm),this.callBase(),this._initLayoutChangedAction()},_initLayoutChangedAction:function(){this._layoutChangedAction=this._createActionByOption("onLayoutChanged",{excludeValidators:["disabled","readonly"]})},_itemClass:function(){return AZ},_itemDataKey:function(){return rE},_initMarkup:function(){this.callBase(),this.$element().addClass(WR),this._updateRootBox()},_updateRootBox:function(){clearTimeout(this._updateTimer),this._updateTimer=setTimeout((function(){this._$root&&R.triggerHandler(this._$root,"dxupdate")}).bind(this))},_renderItems:function(){this._setScreenSize(),this._screenItems=this._itemsByScreen(),this._prepareGrid(),this._spreadItems(),this._layoutItems(),this._linkNodeToItem()},_itemOptionChanged:function(e){var t=this._findItemElementByItem(e);t.length&&(this._refreshItem(t,e),this._clearItemNodeTemplates(),this._update(!0))},_setScreenSize:function(){var e=this._getCurrentScreen();this._removeScreenSizeClass(),this.$element().addClass(nE+e),this.option("currentScreenFactor",e)},_removeScreenSizeClass:function(){var e=this.option("currentScreenFactor");e&&this.$element().removeClass(nE+e)},_prepareGrid:function(){var e=this._grid=[];this._prepareRowsAndCols(),V(this._rows,(function(){var t=[];e.push(t),V(this._cols,(function(){t.push(this._createEmptyCell())}).bind(this))}).bind(this))},getSingleColumnRows:function(){var e=this.option("rows"),t=this._screenItems.length;if(e.length){for(var i=this._filterByScreen(e),n=[],r=0;r<t;r++){var a=this._defaultSizeConfig();r<i.length&&E(i[r].shrink)&&(a.shrink=i[r].shrink),n.push(a)}return n}else return this._defaultSizeConfig(t)},_prepareRowsAndCols:function(){this._isSingleColumnScreen()?(this._prepareSingleColumnScreenItems(),this._rows=this.getSingleColumnRows(),this._cols=this._defaultSizeConfig(1)):(this._rows=this._sizesByScreen(this.option("rows")),this._cols=this._sizesByScreen(this.option("cols")))},_isSingleColumnScreen:function(){return this._screenRegExp().test(this.option("singleColumnScreen"))||!this.option("rows").length||!this.option("cols").length},_prepareSingleColumnScreenItems:function(){this._screenItems.sort(function(e,t){return e.location.row-t.location.row||e.location.col-t.location.col}),V(this._screenItems,function(e,t){k(t.location,{row:e,col:0,rowspan:1,colspan:1})})},_sizesByScreen:function(e){return ti(this._filterByScreen(e),(function(t){return k(this._defaultSizeConfig(),t)}).bind(this))},_createDefaultSizeConfig:function(){return{ratio:1,baseSize:0,minSize:0,maxSize:0}},_defaultSizeConfig:function(e){var t=this._createDefaultSizeConfig();if(!arguments.length)return t;for(var i=[],n=0;n<e;n++)i.push(t);return i},_filterByScreen:function(e){var t=this._screenRegExp();return zi(e,function(i){return!i.screen||t.test(i.screen)})},_screenRegExp:function(){var e=this._getCurrentScreen();return new RegExp("(^|\\s)"+e+"($|\\s)","i")},_getCurrentScreen:function(){var e=this._screenWidth();return this.option("screenByWidth")(e)},_screenWidth:function(){return Ue()?He(TZ):DZ},_createEmptyCell:function(){return{item:{},location:{colspan:1,rowspan:1}}},_spreadItems:function(){V(this._screenItems,(function(e,t){var i=t.location||{},n=i.col,r=i.row,a=this._grid[r],o=a&&a[n];this._occupyCells(o,t)}).bind(this))},_itemsByScreen:function(){return this.option("items").reduce((e,t)=>{var i=t.location||{};return i=Ye(i)?[i]:i,this._filterByScreen(i).forEach(n=>{e.push({item:t,location:k({rowspan:1,colspan:1},n)})}),e},[])},_occupyCells:function(e,t){!e||this._isItemCellOccupied(e,t)||(k(e,t),this._markSpanningCell(e))},_isItemCellOccupied:function(e,t){if(!Pn(e.item))return!0;var i=!1;return this._loopOverSpanning(t.location,function(n){i=i||!Pn(n.item)}),i},_loopOverSpanning:function(e,t){var i=e.row+e.rowspan-1,n=e.col+e.colspan-1,r=Math.min(i,this._rows.length-1),a=Math.min(n,this._cols.length-1);e.rowspan-=i-r,e.colspan-=n-a;for(var o=e.row;o<=r;o++)for(var s=e.col;s<=a;s++)(o!==e.row||s!==e.col)&&t(this._grid[o][s])},_markSpanningCell:function(e){this._loopOverSpanning(e.location,function(t){k(t,{item:e.item,spanningCell:e})})},_linkNodeToItem:function(){V(this._itemElements(),function(e,t){var i=v(t),n=i.data(rE);n.box||(n.node=i.children())})},_layoutItems:function(){var e=this._grid.length,t=e&&this._grid[0].length;if(!(!e&&!t)){var i=this._layoutBlock({direction:"col",row:{start:0,end:e-1},col:{start:0,end:t-1}}),n=this._prepareBoxConfig(i.box||{direction:"row",items:[k(i,{ratio:1})]});k(n,this._rootBoxConfig(n.items)),this._$root=v("<div>").appendTo(this._itemContainer()),this._createComponent(this._$root,wa,n)}},_rootBoxConfig:function(e){var t=V(e,(function(i,n){this._needApplyAutoBaseSize(n)&&k(n,{baseSize:"auto"})}).bind(this));return k({width:"100%",height:"100%",items:t,itemTemplate:this._getTemplateByOption("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this._createActionByOption("onItemHold"),onItemClick:this._createActionByOption("onItemClick"),onItemContextMenu:this._createActionByOption("onItemContextMenu"),onItemRendered:this._createActionByOption("onItemRendered")},{_layoutStrategy:this.option("_layoutStrategy")})},_needApplyAutoBaseSize:function(e){return!e.baseSize&&(!e.minSize||e.minSize==="auto")&&(!e.maxSize||e.maxSize==="auto")},_prepareBoxConfig:function(e){return k(e||{},{crossAlign:"stretch",onItemStateChanged:this.option("onItemStateChanged")})},_layoutBlock:function(e){return this._isSingleItem(e)?this._itemByCell(e.row.start,e.col.start):this._layoutDirection(e)},_isSingleItem:function(e){var t=this._grid[e.row.start][e.col.start].location,i=e.row.end-e.row.start===t.rowspan-1,n=e.col.end-e.col.start===t.colspan-1;return i&&n},_itemByCell:function(e,t){var i=this._grid[e][t];return i.spanningCell?null:i.item},_layoutDirection:function(e){for(var t=[],i=e.direction,n=this._crossDirection(i),r;r=this._nextBlock(e);){if(this._isBlockIndivisible(e.prevBlockOptions,r))throw Qe.Error("E1025");var a=this._layoutBlock({direction:n,row:r.row,col:r.col,prevBlockOptions:e});a&&(k(a,this._blockSize(r,n)),t.push(a)),e[n].start=r[n].end+1}return{box:this._prepareBoxConfig({direction:i,items:t})}},_isBlockIndivisible:function(e,t){return e&&e.col.start===t.col.start&&e.col.end===t.col.end&&e.row.start===t.row.start&&e.row.end===t.row.end},_crossDirection:function(e){return e==="col"?"row":"col"},_nextBlock:function(e){var t=e.direction,i=this._crossDirection(t),n=e[t].start,r=e[t].end,a=e[i].start;if(a>e[i].end)return null;for(var o=1,s=a;s<a+o;s++){for(var l=1,u=n;u<=r;u++){var d=this._cellByDirection(t,u,s);l=Math.max(l,d.location[i+"span"])}var c=s+l,h=a+o;c>h&&(o+=c-h)}var f={};return f[t]={start:n,end:r},f[i]={start:a,end:a+o-1},f},_cellByDirection:function(e,t,i){return e==="col"?this._grid[i][t]:this._grid[t][i]},_blockSize:function(e,t){for(var i=t==="row"?"auto":0,n=t==="row"?this._rows:this._cols,r=k(this._createDefaultSizeConfig(),{ratio:0}),a=e[t].start;a<=e[t].end;a++){var o=n[a];r.ratio+=o.ratio,r.baseSize+=o.baseSize,r.minSize+=o.minSize,r.maxSize+=o.maxSize,E(o.shrink)&&(r.shrink=o.shrink)}return r.minSize=r.minSize?r.minSize:i,r.maxSize=r.maxSize?r.maxSize:"auto",this._isSingleColumnScreen()&&(r.baseSize="auto"),r},_update:function(e){var t=this._$root;this._renderItems(),t&&(e?t.remove():(t.detach(),this._saveAssistantRoot(t))),this._layoutChangedAction(),this._updateRootBox()},_saveAssistantRoot:function(e){this._assistantRoots=this._assistantRoots||[],this._assistantRoots.push(e)},_dispose:function(){clearTimeout(this._updateTimer),this._clearItemNodeTemplates(),this._cleanUnusedRoots(),this.callBase.apply(this,arguments)},_cleanUnusedRoots:function(){this._assistantRoots&&V(this._assistantRoots,function(e,t){v(t).remove()})},_clearItemNodeTemplates:function(){V(this.option("items"),function(){delete this.node})},_toggleVisibility:function(e){this.callBase(e),e&&this._updateRootBox()},_attachClickEvent:re,_optionChanged:function(e){switch(e.name){case"rows":case"cols":case"screenByWidth":case"_layoutStrategy":case"singleColumnScreen":this._clearItemNodeTemplates(),this._invalidate();break;case"width":case"height":this.callBase(e),this._update();break;case"onLayoutChanged":this._initLayoutChangedAction();break;case"itemTemplate":this._clearItemNodeTemplates(),this.callBase(e);break;case"currentScreenFactor":break;default:this.callBase(e)}},_dimensionChanged:function(){this._getCurrentScreen()!==this.option("currentScreenFactor")&&this._update()},repaint:function(){this._update()}});tt("dxResponsiveBox",zR);var OZ="dx-widget",RZ="dx-form",gv="dx-form-group",kZ="dx-form-group-caption",aE="dx-col-",GR="dx-field-item",oE="dx-layout-manager-one-col",UR="dx-field-item-label-content",BZ="dx-layout-manager",KR="dx-field-item-label",vm="dx-field-item-content",LZ="dx-single-column-item-content",jR="dx-root-simple-item",PZ="dx-form-group-content",FZ="dx-field-item-has-group",MZ="dx-field-item-has-tabs",VZ="dx-form-group-with-caption",sE="dx-field-item-tab",lE="dx-group-colcount-",uE="group-col-count",NZ="dx-form-validation-summary",$Z="dx-form-styling-mode-underlined",_m="simple",HZ=it.inherit({ctor(e,t){this.editor=e,this.validator=t,this.validationRequestsCallbacks=[];var i=n=>{this.validationRequestsCallbacks.forEach(r=>r(n))};e.validationRequest.add(i),e.on("disposing",function(){e.validationRequest.remove(i)})},getValue(){return this.editor.option("value")},getCurrentValidationError(){return this.editor.option("validationError")},bypass(){return this.editor.option("disabled")},applyValidationResults(e){this.editor.option({validationErrors:e.brokenRules,validationStatus:e.status})},reset(){this.editor.reset()},focus(){this.editor.focus()}}),WZ="dx-validator",dE="valid",zZ="invalid",Cv="pending",pf=mr.inherit({_initOptions:function(e){this.callBase.apply(this,arguments),this.option(Ct.initValidationOptions(e))},_getDefaultOptions(){return k(this.callBase(),{validationRules:[]})},_init(){this.callBase(),this._initGroupRegistration(),this.focused=dt(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration(){var e=this._findGroup();this._groupWasInit||this.on("disposing",function(t){Ct.removeRegisteredValidator(t.component._validationGroup,t.component)}),(!this._groupWasInit||this._validationGroup!==e)&&(Ct.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=e,Ct.registerValidatorInGroup(e,this))},_setOptionsByReference(){this.callBase(),k(this._optionsByReference,{validationGroup:!0})},_getEditor(){var e=this.$element()[0];return Vt(e,"dx-validation-target")},_initAdapter(){var e=this._getEditor(),t=this.option("adapter");if(!t){if(e){t=new HZ(e,this),t.validationRequestsCallbacks.push(n=>{this._validationInfo.skipValidation||this.validate(n)}),this.option("adapter",t);return}throw Qe.Error("E0120")}var i=t.validationRequestsCallbacks;i&&i.push(n=>{this.validate(n)})},_toggleRTLDirection(e){var t,i,n,r=(t=(i=this.option("adapter"))===null||i===void 0||(n=i.editor)===null||n===void 0?void 0:n.option("rtlEnabled"))!==null&&t!==void 0?t:e;this.callBase(r)},_initMarkup(){this.$element().addClass(WZ),this.callBase()},_render(){this.callBase(),this._toggleAccessibilityAttributes()},_toggleAccessibilityAttributes(){var e=this._getEditor();if(e){var t=this.option("validationRules")||[],i=t.some(n=>{var{type:r}=n;return r==="required"})||null;e.isInitialized()&&e.setAria("required",i),e.option("_onMarkupRendered",()=>{e.setAria("required",i)})}},_visibilityChanged(e){e&&this._initGroupRegistration()},_optionChanged(e){switch(e.name){case"validationGroup":this._initGroupRegistration();return;case"validationRules":this._resetValidationRules(),this._toggleAccessibilityAttributes(),this.option("isValid")!==void 0&&this.validate();return;case"adapter":this._initAdapter();break;case"isValid":case"validationStatus":this.option(Ct.synchronizeValidationOptions(e,this.option()));break;default:this.callBase(e)}},_getValidationRules(){return this._validationRules||(this._validationRules=ti(this.option("validationRules"),(e,t)=>k({},e,{validator:this,index:t}))),this._validationRules},_findGroup(){var e=this.$element();return this.option("validationGroup")||Ct.findGroup(e,this._modelByElement(e))},_resetValidationRules(){delete this._validationRules},validate(e){var t=this.option("adapter"),i=this.option("name"),n=t.bypass&&t.bypass(),r=e&&e.value!==void 0?e.value:t.getValue(),a=t.getCurrentValidationError&&t.getCurrentValidationError(),o=this._getValidationRules(),s=this._validationInfo&&this._validationInfo.result;if(s&&s.status===Cv&&s.value===r)return k({},s);var l;return n?l={isValid:!0,status:dE}:a&&a.editorSpecific?(a.validator=this,l={isValid:!1,status:zZ,brokenRule:a,brokenRules:[a]}):l=Ct.validate(r,o,i),l.id=new si().toString(),this._applyValidationResult(l,t),l.complete&&l.complete.then(u=>{u.id===this._validationInfo.result.id&&this._applyValidationResult(u,t)}),k({},this._validationInfo.result)},reset(){var e=this.option("adapter"),t={id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:dE,complete:null};this._validationInfo.skipValidation=!0,e.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult(t,e)},_updateValidationResult(e){if(!this._validationInfo.result||this._validationInfo.result.id!==e.id){var t=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=k({},e,{complete:t})}else for(var i in e)i!=="id"&&i!=="complete"&&(this._validationInfo.result[i]=e[i])},_applyValidationResult(e,t){var i=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(e.validator=this,this._updateValidationResult(e),t.applyValidationResults&&t.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),this._validationInfo.result.status===Cv){this._validationInfo.deferred||(this._validationInfo.deferred=new se,this._validationInfo.result.complete=this._validationInfo.deferred.promise()),this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);return}this._validationInfo.result.status!==Cv&&(i(e),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(e),this._validationInfo.deferred=null))},focus(){var e=this.option("adapter");e&&e.focus&&e.focus()},_useTemplates:function(){return!1}});tt("dxValidator",pf);var GZ=["dxTagBox","dxRangeSlider"],UZ=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"];function KZ(e){var{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,item:o,template:s,name:l,formLabelLocation:u,requiredMessageTemplate:d,validationGroup:c,editorValue:h,canAssignUndefinedValueToEditor:f,editorValidationBoundary:p,editorStylingMode:m,showColonAfterLabel:g,managerLabelLocation:C,itemId:b,managerMarkOptions:A,labelMode:B}=e,D=E(o.isRequired)?o.isRequired:!!YZ(o.validationRules),U=o.itemType===_m,H=o.helpText?"dx-"+new si:null,W=XZ({item:o,id:b,isRequired:D,managerMarkOptions:A,showColonAfterLabel:g,labelLocation:C,formLabelMode:B}),G=W.visible&&W.text,{location:j,labelID:te}=W,N=j!=="top"&&(!!o.helpText&&!a||["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"].includes(o.editorType)),Y=qZ({editorType:o.editorType,editorValue:h,defaultEditorName:o.dataField,canAssignUndefinedValueToEditor:f,externalEditorOptions:o.editorOptions,editorInputId:b,editorValidationBoundary:p,editorStylingMode:m,formLabelMode:B,labelText:W.textWithoutColon,labelMark:W.markOptions.showRequiredMark?" "+W.markOptions.requiredMark:""}),x=W.markOptions.showOptionalMark&&!W.visible&&Y.labelMode!=="hidden"&&!E(o.helpText),z=x?W.markOptions.optionalMark:o.helpText;return{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,labelOptions:W,labelNeedBaselineAlign:N,labelLocation:j,needRenderLabel:G,item:o,isSimpleItem:U,isRequired:D,template:s,helpID:H,labelID:te,name:l,helpText:z,formLabelLocation:u,requiredMessageTemplate:d,validationGroup:c,editorOptions:Y}}function jZ(e){var{showRequiredMark:t,requiredMark:i,showOptionalMark:n,optionalMark:r}=e;return!t&&!n?"":" "+(t?i:r)}function qR(e,t){var{showRequiredMark:i,requiredMark:n,showOptionalMark:r,optionalMark:a}=e;return{showRequiredMark:i&&t,requiredMark:n,showOptionalMark:r&&!t,optionalMark:a}}function qZ(e){var{editorType:t,defaultEditorName:i,editorValue:n,canAssignUndefinedValueToEditor:r,externalEditorOptions:a,editorInputId:o,editorValidationBoundary:s,editorStylingMode:l,formLabelMode:u,labelText:d,labelMark:c}=e,h={};(n!==void 0||r)&&(h.value=n),GZ.indexOf(t)!==-1&&(h.value=h.value||[]);var f=a==null?void 0:a.labelMode;E(f)||(f=u==="outside"?"hidden":u);var p=(a==null?void 0:a.stylingMode)||l,m=k(!0,h,a,{inputAttr:{id:o},validationBoundary:s,stylingMode:p,label:d,labelMode:f,labelMark:c});return a&&(m.dataSource&&(m.dataSource=a.dataSource),m.items&&(m.items=a.items)),i&&!m.name&&(m.name=i),m}function YZ(e){var t;return e&&e.length&&V(e,function(i,n){if(n.type==="required")return t=!0,!1}),t}function XZ(e){var{item:t,id:i,isRequired:n,managerMarkOptions:r,showColonAfterLabel:a,labelLocation:o,formLabelMode:s}=e,l=UZ.includes(t.editorType),u=k({showColon:a,location:o,id:i,visible:s==="outside"||l&&s!=="hidden",isRequired:n},t?t.label:{},{markOptions:qR(r,n)});return["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor"].includes(t.editorType)&&(u.labelID="dx-label-".concat(new si)),!u.text&&t.dataField&&(u.text=vo(t.dataField)),u.text&&(u.textWithoutColon=u.text,u.text+=u.showColon?":":""),u}var ZZ=["$FIELD_ITEM_LABEL_CONTENT_CLASS"],JZ="dx-layout-manager-hidden-label",QZ="dx-field-item-required-mark",YR="dx-field-item-label-location-",eJ="dx-field-item-optional-mark",XR="dx-field-item-label-text";function ZR(e){var{text:t,id:i,location:n,alignment:r,labelID:a=null,markOptions:o={}}=e;return!E(t)||t.length<=0?null:v("<label>").addClass(KR+" "+YR+n).attr("for",i).attr("id",a).css("textAlign",r).append(v("<span>").addClass(UR).append(v("<span>").addClass(XR).text(t),tJ(o)))}function tJ(e){var t=jZ(e);return t===""?null:v("<span>").addClass(e.showRequiredMark?QZ:eJ).text(t)}function iJ(e,t,i){var n="".concat(t," > .").concat(KR,":not(.").concat(YR,"top) > .").concat(UR),r=e.find(n),a=r.length,o,s,l=0;for(s=0;s<a;s++)o=nJ({$FIELD_ITEM_LABEL_CONTENT_CLASS:r[s],location:"left",markOptions:i}),o>l&&(l=o);for(s=0;s<a;s++)r[s].style.width=l+"px"}function nJ(e){var{$FIELD_ITEM_LABEL_CONTENT_CLASS:t}=e,i=Pt(e,ZZ),n=v("<div>").addClass(OZ).addClass(JZ).appendTo("body");i.text=" ";var r=ZR(i).appendTo(n),a=r.find("."+XR)[0];a.innerHTML=rJ(t);var o=a.offsetWidth;return n.remove(),o}function rJ(e){var t=e.children.length,i,n="",r;for(r=0;r<t;r++)i=e.children[r],n+=Jl(i.innerText)?i.innerHTML:i.innerText;return n}var aJ="dx-flex-layout",oJ="dx-field-item-optional",sJ="dx-field-item-required",cE="dx-field-item-content-wrapper",lJ="dx-field-item-content-location-",uJ="dx-field-item-label-align",dJ="dx-field-item-help-text",cJ="dx-label-v-align",hJ="dx-label-h-align",fJ="dx-template-wrapper",pJ="dx-invalid";function vJ(e){var{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,labelOptions:o,labelNeedBaselineAlign:s,labelLocation:l,needRenderLabel:u,formLabelLocation:d,item:c,editorOptions:h,isSimpleItem:f,isRequired:p,template:m,helpID:g,labelID:C,name:b,helpText:A,requiredMessageTemplate:B,validationGroup:D}=e,U=v("<div>").addClass(i.join(" ")).appendTo(t);U.addClass(p?sJ:oJ),f&&a&&U.addClass(aJ),f&&s&&U.addClass(uJ);var H=v("<div>");H.data("dx-form-item",c),H.addClass(vm).addClass(lJ+{right:"left",left:"right",top:"bottom"}[d]);var W=u?ZR(o):null;W?(U.append(W),(l==="top"||l==="left")&&U.append(H),l==="right"&&U.prepend(H),l==="top"?U.addClass(cJ):U.addClass(hJ),(c.editorType==="dxCheckBox"||c.editorType==="dxSwitch")&&R.on(W,vt,function(){R.trigger(H.children(),vt)})):U.append(H);var G;if(m)m.render({container:Me(H),model:{dataField:c.dataField,editorType:c.editorType,editorOptions:h,component:n,name:c.name}});else{var j=v("<div>").appendTo(H);try{G=r(j,c.editorType,h),G.setAria("describedby",g),C&&G.setAria("labelledby",C),G.setAria("required",p)}catch(y){Qe.log("E1035",y.message)}}var te=H.children().first(),N=te.hasClass(fJ)?te.children().first():te,Y=N&&N.data("dx-validation-target");if(Y){var x=c.label&&c.label.text,z=x?null:b,ie=x?c.label.text:z&&vo(z),ne;if(f)if(c.validationRules)ne=c.validationRules;else{var pe=Kr(B,ie||"");ne=c.isRequired?[{type:"required",message:pe}]:null}if(Array.isArray(ne)&&ne.length&&r(N,pf,{validationRules:ne,validationGroup:D,dataGetter:function(){return{formItem:c}}}),ei()){var le="."+cE,J=function(y){v(y.element).parents(le).toggleClass(pJ,y.component.option("isValid")===!1&&(y.component._isFocused()||y.component.option("validationMessageMode")==="always"))};Y.on("optionChanged",y=>{y.name==="isValid"&&J(y)}),Y.on("focusIn",J).on("focusOut",J).on("enterKey",J)}}if(A&&f){var K=H.parent();K.append(v("<div>").addClass(cE).append(H).append(v("<div>").addClass(dJ).attr("id",g).text(A)))}return{$fieldEditorContainer:H,$rootElement:U,widgetInstance:G}}var _J="dx-field-button-item";function mJ(e){var{item:t,$parent:i,rootElementCssClassList:n,validationGroup:r,createComponentCallback:a}=e,o=v("<div>").appendTo(i).addClass(n.join(" ")).addClass(_J).css("textAlign",gJ(t.horizontalAlignment));i.css("justifyContent",CJ(t.verticalAlignment));var s=v("<div>").appendTo(o);return{$rootElement:o,buttonInstance:a(s,"dxButton",k({validationGroup:r},t.buttonOptions))}}function gJ(e){return E(e)?e:"right"}function CJ(e){switch(e){case"center":return"center";case"bottom":return"flex-end";default:return"flex-start"}}var yJ="dx-field-empty-item";function hE(e){var{$parent:t,rootElementCssClassList:i}=e;return v("<div>").addClass(yJ).html("&nbsp;").addClass(i.join(" ")).appendTo(t)}var xJ="dxTextBox",bJ="dx-first-row",SJ="dx-last-row",EJ="dx-first-col",wJ="dx-last-col",yv="flex",IJ="fallback",TJ=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{layoutData:{},readOnly:!1,colCount:1,colCountByScreen:void 0,labelLocation:"left",onFieldDataChanged:null,onEditorEnterKey:null,customizeItem:null,alignItemLabels:!0,minColWidth:200,showRequiredMark:!0,screenByWidth:null,showOptionalMark:!1,requiredMark:"*",labelMode:"outside",optionalMark:fe.format("dxForm-optionalMark"),requiredMessage:fe.getFormatter("dxForm-requiredMessage")})},_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{layoutData:!0,validationGroup:!0})},_init:function(){var e=this.option("layoutData");this.callBase(),this._itemWatchers=[],this._itemsRunTimeInfo=new FR,this._updateReferencedOptions(e),this._initDataAndItems(e)},_dispose:function(){this.callBase(),this._cleanItemWatchers()},_initDataAndItems:function(e){this._syncDataWithItems(),this._updateItems(e)},_syncDataWithItems:function(){var e=this.option("layoutData"),t=this.option("items");E(t)&&t.forEach(i=>{if(i.dataField&&this._getDataByField(i.dataField)===void 0){var n;i.editorOptions&&(n=i.editorOptions.value),(E(n)||i.dataField in e)&&this._updateFieldValue(i.dataField,n)}})},_getDataByField:function(e){return e?this.option("layoutData."+e):null},_isCheckboxUndefinedStateEnabled:function(e){var{allowIndeterminateState:t,editorType:i,dataField:n}=e;if(t===!0&&i==="dxCheckBox"){var r=["layoutData",...n.split(".")],a=r.pop(),o=this.option(r.join("."));return o&&a in o}return!1},_updateFieldValue:function(e,t){var i=this.option("layoutData"),n=t;!Hi.isWrapped(i[e])&&E(e)?this.option("layoutData."+e,n):Hi.isWritableWrapped(i[e])&&(n=Ie(n)?n():n,i[e](n)),this._triggerOnFieldDataChanged({dataField:e,value:n})},_triggerOnFieldDataChanged:function(e){this._createActionByOption("onFieldDataChanged")(e)},_updateItems:function(e){var t=this,i=this.option("items"),n=E(i),r=t.option("customizeItem"),a=n?i:this._generateItemsByData(e);if(E(a)){var o=[];V(a,function(s,l){t._isAcceptableItem(l)&&(l=t._processItem(l),r&&r(l),$e(l)&&Hi.unwrap(l.visible)!==!1&&o.push(l))}),(!t._itemWatchers.length||!n)&&t._updateItemWatchers(a),this._setItems(o),this._sortItems()}},_cleanItemWatchers:function(){this._itemWatchers.forEach(function(e){e()}),this._itemWatchers=[]},_updateItemWatchers:function(e){var t=this,i=t._getWatch();e.forEach(function(n){$e(n)&&E(n.visible)&&Ie(i)&&t._itemWatchers.push(i(function(){return Hi.unwrap(n.visible)},function(){t._updateItems(t.option("layoutData")),t.repaint()},{skipImmediate:!0}))})},_generateItemsByData:function(e){var t=[];return E(e)&&V(e,function(i){t.push({dataField:i})}),t},_isAcceptableItem:function(e){var t=e.dataField||e,i=this._getDataByField(t);return!(Ie(i)&&!Hi.isWrapped(i))},_processItem:function(e){if(typeof e=="string"&&(e={dataField:e}),typeof e=="object"&&!e.itemType&&(e.itemType=_m),!E(e.editorType)&&E(e.dataField)){var t=this._getDataByField(e.dataField);e.editorType=E(t)?this._getEditorTypeByDataType(Ln(t)):xJ}if(e.editorType==="dxCheckBox"){var i;e.allowIndeterminateState=(i=e.allowIndeterminateState)!==null&&i!==void 0?i:!0}return e},_getEditorTypeByDataType:function(e){switch(e){case"number":return"dxNumberBox";case"date":return"dxDateBox";case"boolean":return"dxCheckBox";default:return"dxTextBox"}},_sortItems:function(){Ml(this._items,"visibleIndex"),this._sortIndexes()},_sortIndexes:function(){this._items.sort(function(e,t){var i=e.visibleIndex,n=t.visibleIndex,r;return i>n?r=1:i<n?r=-1:r=0,r})},_initMarkup:function(){this._itemsRunTimeInfo.clear(),this.$element().addClass(BZ),this.callBase(),this._renderResponsiveBox()},_hasBrowserFlex:function(){return Ta(yv)===yv},_renderResponsiveBox:function(){var e=[];if(this._items&&this._items.length){var t=this._getColCount(),i=v("<div>").appendTo(this.$element());this._prepareItemsWithMerging(t);var n=this._generateLayoutItems();this._responsiveBox=this._createComponent(i,zR,this._getResponsiveBoxConfig(n,t,e)),Ue()||this._renderTemplates(e)}},_itemStateChangedHandler:function(e){this._refresh()},_renderTemplates:function(e){var t=this;V(e,function(i,n){switch(n.itemType){case"empty":hE(n);break;case"button":t._renderButtonItem(n);break;default:t._renderFieldItem(n)}})},_getResponsiveBoxConfig:function(e,t,i){var n=this,r=n.option("colCountByScreen"),a=r&&r.xs;return{onItemStateChanged:this._itemStateChangedHandler.bind(this),_layoutStrategy:n._hasBrowserFlex()?yv:IJ,onLayoutChanged:function(){var o=n.option("onLayoutChanged"),s=n.isSingleColumnMode();o&&(n.$element().toggleClass(oE,s),o(s))},onContentReady:function(o){Ue()&&n._renderTemplates(i),n.option("onLayoutChanged")&&n.$element().toggleClass(oE,n.isSingleColumnMode(o.component))},itemTemplate:function(o,s,l){if(o.location){var u=v(l),d=o.location.row*t,c=n._items[o.location.col+d];if(c){var h=[c.cssClass];u.toggleClass(LZ,n.isSingleColumnMode(this)),o.location.row===0&&h.push(bJ),o.location.col===0&&h.push(EJ),c.itemType===_m&&n.option("isRoot")&&u.addClass(jR);var f=o.location.col===t-1||o.location.col+o.location.colspan===t,p=n._getRowsCount(),m=o.location.row===p-1;f&&h.push(wJ),m&&h.push(SJ),c.itemType!=="empty"&&(h.push(GR),h.push(n.option("cssItemClass")),E(c.col)&&h.push("dx-col-"+c.col)),i.push({itemType:c.itemType,item:c,$parent:u,rootElementCssClassList:h})}}},cols:n._generateRatio(t),rows:n._generateRatio(n._getRowsCount(),!0),dataSource:e,screenByWidth:n.option("screenByWidth"),singleColumnScreen:a?!1:"xs"}},_getColCount:function(){var e=this.option("colCount"),t=this.option("colCountByScreen");if(t){var i=this.option("form").getTargetScreenFactor();i||(i=Ue()?NI(this.option("screenByWidth")):"lg"),e=t[i]||e}if(e==="auto"){if(this._cashedColCount)return this._cashedColCount;this._cashedColCount=e=this._getMaxColCount()}return e<1?1:e},_getMaxColCount:function(){if(!Ue())return 1;var e=this.option("minColWidth"),t=He(this.$element()),i=this._items.length,n=Math.floor(t/e)||1;return i<n?i:n},isCachedColCountObsolete:function(){return this._cashedColCount&&this._getMaxColCount()!==this._cashedColCount},_prepareItemsWithMerging:function(e){var t=this._items.slice(0),i,n,r=[],a,o;for(o=0;o<t.length;o++)if(i=t[o],r.push(i),(this.option("alignItemLabels")||i.alignItemLabels||i.colSpan)&&(i.col=this._getColByIndex(r.length-1,e)),i.colSpan>1&&i.col+i.colSpan<=e){for(n=[],a=0;a<i.colSpan-1;a++)n.push({merged:!0});r=r.concat(n)}else delete i.colSpan;this._setItems(r)},_getColByIndex:function(e,t){return e%t},_setItems:function(e){this._items=e,this._cashedColCount=null},_generateLayoutItems:function(){var e=this._items,t=this._getColCount(),i=[],n,r;for(r=0;r<e.length;r++)if(n=e[r],!n.merged){var a={location:{row:parseInt(r/t),col:this._getColByIndex(r,t)}};E(n.disabled)&&(a.disabled=n.disabled),E(n.visible)&&(a.visible=n.visible),E(n.colSpan)&&(a.location.colspan=n.colSpan),E(n.rowSpan)&&(a.location.rowspan=n.rowSpan),i.push(a)}return i},_renderEmptyItem:function(e){hE({})},_renderButtonItem:function(e){var{item:t,$parent:i,rootElementCssClassList:n}=e,{$rootElement:r,buttonInstance:a}=mJ({item:t,$parent:i,rootElementCssClassList:n,validationGroup:this.option("validationGroup"),createComponentCallback:this._createComponent.bind(this)});this._itemsRunTimeInfo.add({item:t,widgetInstance:a,guid:t.guid,$itemContainer:r})},_renderFieldItem:function(e){var t,{item:i,$parent:n,rootElementCssClassList:r}=e,a=this._getDataByField(i.dataField),o=!1;if(a===void 0){var{allowIndeterminateState:s,editorType:l,dataField:u}=i;o=this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:s,editorType:l,dataField:u})}var d=i.dataField||i.name,{$fieldEditorContainer:c,widgetInstance:h,$rootElement:f}=vJ(KZ({$parent:n,rootElementCssClassList:r,item:i,name:d,editorValue:a,canAssignUndefinedValueToEditor:o,formOrLayoutManager:this._getFormOrThis(),createComponentCallback:this._createComponent.bind(this),useFlexLayout:this._hasBrowserFlex(),formLabelLocation:this.option("labelLocation"),requiredMessageTemplate:this.option("requiredMessage"),validationGroup:this.option("validationGroup"),editorValidationBoundary:this.option("validationBoundary"),editorStylingMode:this.option("form")&&this.option("form").option("stylingMode"),showColonAfterLabel:this.option("showColonAfterLabel"),managerLabelLocation:this.option("labelLocation"),template:i.template?this._getTemplate(i.template):null,itemId:this.option("form")&&this.option("form").getItemID(d),managerMarkOptions:this._getMarkOptions(),labelMode:this.option("labelMode")}));(t=this.option("onFieldItemRendered"))===null||t===void 0||t(),h&&i.dataField&&this._bindDataField(h,i.dataField,i.editorType,c),this._itemsRunTimeInfo.add({item:i,widgetInstance:h,guid:i.guid,$itemContainer:f})},_getMarkOptions:function(){return{showRequiredMark:this.option("showRequiredMark"),requiredMark:this.option("requiredMark"),showOptionalMark:this.option("showOptionalMark"),optionalMark:this.option("optionalMark")}},_getFormOrThis:function(){return this.option("form")||this},_bindDataField:function(e,t,i,n){var r=this._getFormOrThis();e.on("enterKey",function(a){r._createActionByOption("onEditorEnterKey")(k(a,{dataField:t}))}),this._createWatcher(e,n,t),this.linkEditorToDataField(e,t,i)},_createWatcher:function(e,t,i){var n=this,r=n._getWatch();if(Ie(r)){var a=r(function(){return n._getDataByField(i)},function(){var o=n._getDataByField(i);if(e.NAME==="dxTagBox"){var s=e.option("value");if(o!==s&&function(l,u){if(!Array.isArray(l)||!Array.isArray(u)||l.length!==u.length)return!1;for(var d=0;d<l.length;d++)if(l[d]!==u[d])return!1;return!0}(o,s))return}e.option("value",o)},{deep:!0,skipImmediate:!0});R.on(t,vr,a)}},_getWatch:function(){if(!E(this._watch)){var e=this.option("form");this._watch=e&&e.option("integrationOptions.watchMethod")}return this._watch},_createComponent:function(e,t,i){var n=this.option("readOnly"),r=this.callBase(e,t,i);return n&&r.option("readOnly",n),this.on("optionChanged",function(a){a.name==="readOnly"&&!E(i.readOnly)&&r.option(a.name,a.value)}),r},_generateRatio:function(e,t){var i=[],n,r;for(r=0;r<e;r++)n={ratio:1},t&&(n.baseSize="auto"),i.push(n);return i},_getRowsCount:function(){return Math.ceil(this._items.length/this._getColCount())},_updateReferencedOptions:function(e){var t=this.option("layoutData");$e(t)&&Object.getOwnPropertyNames(t).forEach(i=>delete this._optionsByReference["layoutData."+i]),$e(e)&&Object.getOwnPropertyNames(e).forEach(i=>this._optionsByReference["layoutData."+i]=!0)},_resetWidget(e){this._disableEditorValueChangedHandler=!0,e.reset(),this._disableEditorValueChangedHandler=!1,e.option("isValid",!0)},_optionChanged(e){if(e.fullName.search("layoutData.")!==0)switch(e.name){case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":this._cashedRequiredConfig=null,this._invalidate();break;case"layoutData":this._updateReferencedOptions(e.value),this.option("items")?Pn(e.value)||this._itemsRunTimeInfo.each((t,i)=>{if(E(i.item)){var n=i.item.dataField;if(n&&E(i.widgetInstance)){var r=bt(n),a=r(e.value),{allowIndeterminateState:o,editorType:s}=i.item;a!==void 0||this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:o,editorType:s,dataField:n})?i.widgetInstance.option("value",a):this._resetWidget(i.widgetInstance)}}}):(this._initDataAndItems(e.value),this._invalidate());break;case"items":this._cleanItemWatchers(),this._initDataAndItems(e.value),this._invalidate();break;case"alignItemLabels":case"labelLocation":case"labelMode":case"requiredMessage":this._invalidate();break;case"customizeItem":this._updateItems(this.option("layoutData")),this._invalidate();break;case"colCount":this._resetColCount();break;case"minColWidth":this.option("colCount")==="auto"&&this._resetColCount();break;case"readOnly":break;case"width":this.callBase(e),this.option("colCount")==="auto"&&this._resetColCount();break;case"onFieldDataChanged":break;default:this.callBase(e)}},_resetColCount:function(){this._cashedColCount=null,this._invalidate()},linkEditorToDataField(e,t){this.on("optionChanged",i=>{i.fullName==="layoutData.".concat(t)&&e._setOptionWithoutOptionChange("value",i.value)}),e.on("valueChanged",i=>{var n=$e(i.value)||Array.isArray(i.value);!this._disableEditorValueChangedHandler&&!(n&&i.value===i.previousValue)&&this._updateFieldValue(t,i.value)})},_dimensionChanged:function(){this.option("colCount")==="auto"&&this.isCachedColCountObsolete()&&this._eventsStrategy.fireEvent("autoColCountChanged")},updateData:function(e,t){var i=this;$e(e)?V(e,function(n,r){i._updateFieldValue(n,r)}):typeof e=="string"&&i._updateFieldValue(e,t)},getEditor:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},isSingleColumnMode:function(e){var t=this._responsiveBox||e;if(t)return t.option("currentScreenFactor")===t.option("singleColumnScreen")},getItemsRunTimeInfo:function(){return this._itemsRunTimeInfo}});tt("dxLayoutManager",TJ);var BC="dx-validationsummary",AJ=BC+"-item",DJ=BC+"-item-data",JR=Fo.inherit({_getDefaultOptions(){return k(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference(){this.callBase(),k(this._optionsByReference,{validationGroup:!0})},_init(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration(){var e=this.$element(),t=this.option("validationGroup")||Ct.findGroup(e,this._modelByElement(e)),i=Ct.addGroup(t);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=t,this.groupSubscription=this._groupValidationHandler.bind(this),i.on("validated",this.groupSubscription)},_unsubscribeGroup(){var e=Ct.getGroupConfig(this._validationGroup);e&&e.off("validated",this.groupSubscription)},_getOrderedItems(e,t){var i=[];return V(e,function(n,r){var a=zi(t,function(o){if(o.validator===r)return!0});a.length&&(i=i.concat(a))}),i},_groupValidationHandler(e){var t=this._getOrderedItems(e.validators,ti(e.brokenRules,function(i){return{text:i.message,validator:i.validator,index:i.index}}));this.validators=e.validators,V(this.validators,(i,n)=>{if(n._validationSummary!==this){var r=this._itemValidationHandler.bind(this);n.on("validated",r),n.on("disposing",function(){n.off("validated",r),n._validationSummary=null,r=null}),n._validationSummary=this}}),this.option("items",t)},_itemValidationHandler(e){for(var{isValid:t,validator:i,brokenRules:n}=e,r=this.option("items"),a=!1,o=0,s=function(){var u=r[o];if(u.validator===i){var d=zi(n||[],function(c){return c.index===u.index})[0];if(t||!d)return r.splice(o,1),a=!0,"continue";d.message!==u.text&&(u.text=d.message,a=!0)}o++};o<r.length;)var l=s();V(n,function(u,d){var c=zi(r,function(h){return h.validator===i&&h.index===d.index})[0];c||(r.push({text:d.message,validator:i,index:d.index}),a=!0)}),a&&(r=this._getOrderedItems(this.validators,r),this.option("items",r))},_initMarkup(){this.$element().addClass(BC),this.callBase()},_optionChanged(e){switch(e.name){case"validationGroup":this._initGroupRegistration();break;default:this.callBase(e)}},_itemClass:()=>AJ,_itemDataKey:()=>DJ,_postprocessRenderItem(e){R.on(e.itemElement,"click",function(){e.itemData.validator&&e.itemData.validator.focus&&e.itemData.validator.focus()})},_dispose(){this.callBase(),this._unsubscribeGroup()},refreshValidationGroup(){this._initGroupRegistration()}});tt("dxValidationSummary",JR);var fE="dx-validationgroup",OJ="dx-validator",RJ="dx-validationsummary";class kJ extends mr{_getDefaultOptions(){return super._getDefaultOptions()}_init(){super._init(),Ct.addGroup(this)}_initMarkup(){var t=this.$element();t.addClass(fE),t.find(".".concat(OJ)).each(function(i,n){pf.getInstance(v(n))._initGroupRegistration()}),t.find(".".concat(RJ)).each(function(i,n){JR.getInstance(v(n)).refreshValidationGroup()}),super._initMarkup()}validate(){return Ct.validateGroup(this)}reset(){return Ct.resetGroup(this)}_dispose(){Ct.removeGroup(this),this.$element().removeClass(fE),super._dispose()}_useTemplates(){return!1}}tt("dxValidationGroup",kJ);var pE="dx-state-focused",BJ=["items","isRequired","validationRules","visible"],LC=_i.inherit({_init:function(){this.callBase(),this._cachedColCountOptions=[],this._itemsRunTimeInfo=new FR,this._groupsColCount=[],this._attachSyncSubscriptions()},_getDefaultOptions:function(){return k(this.callBase(),{formID:"dx-"+new si,formData:{},colCount:1,screenByWidth:Qm,colCountByScreen:void 0,labelLocation:"left",readOnly:!1,onFieldDataChanged:null,customizeItem:null,onEditorEnterKey:null,minColWidth:200,alignItemLabels:!0,alignItemLabelsInAllGroups:!0,alignRootItemLabels:!0,showColonAfterLabel:!0,showRequiredMark:!0,showOptionalMark:!1,requiredMark:"*",optionalMark:fe.format("dxForm-optionalMark"),requiredMessage:fe.getFormatter("dxForm-requiredMessage"),showValidationSummary:!1,items:void 0,scrollingEnabled:!1,validationGroup:void 0,stylingMode:At().editorStylingMode,labelMode:"outside"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return ei()},options:{showColonAfterLabel:!1,labelLocation:"top"}}])},_setOptionsByReference:function(){this.callBase(),k(this._optionsByReference,{formData:!0,validationGroup:!0})},_getGroupColCount:function(e){return parseInt(e.attr(uE))},_applyLabelsWidthByCol:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=i.inOneColumn?GR:aE+t,a=i.excludeTabbed?":not(.".concat(sE,")"):"";iJ(e,".".concat(r).concat(a),n)},_applyLabelsWidth:function(e,t,i,n,r){n=i?1:n||this._getGroupColCount(e);var a={excludeTabbed:t,inOneColumn:i},o;for(o=0;o<n;o++)this._applyLabelsWidthByCol(e,o,a,r)},_getGroupElementsInColumn:function(e,t,i){var n=E(i)?"."+lE+i:"",r="."+aE+t+" > ."+vm+" > ."+gv+n;return e.find(r)},_applyLabelsWidthWithGroups:function(e,t,i,n){if(this.option("alignRootItemLabels")===!0)for(var r=e.find(".".concat(jR)),a=0;a<t;a++)this._applyLabelsWidthByCol(r,a,i,n);var o=this.option("alignItemLabelsInAllGroups");if(o)this._applyLabelsWidthWithNestedGroups(e,t,i,n);else{var s=this.$element().find("."+gv),l;for(l=0;l<s.length;l++)this._applyLabelsWidth(s.eq(l),i,void 0,void 0,n)}},_applyLabelsWidthWithNestedGroups:function(e,t,i,n){var r={excludeTabbed:i},a,o,s,l;for(a=0;a<t;a++)for(l=this._getGroupElementsInColumn(e,a),this._applyLabelsWidthByCol(l,0,r,n),o=0;o<this._groupsColCount.length;o++){l=this._getGroupElementsInColumn(e,a,this._groupsColCount[o]);var u=this._getGroupColCount(l);for(s=1;s<u;s++)this._applyLabelsWidthByCol(l,s,r,n)}},_labelLocation:function(){return this.option("labelLocation")},_alignLabelsInColumn:function(e){var{layoutManager:t,inOneColumn:i,$container:n,excludeTabbed:r,items:a}=e;if(!(!Ue()||this._labelLocation()==="top")){var o=qR(t._getMarkOptions());i?this._applyLabelsWidth(n,r,!0,void 0,o):this._checkGrouping(a)?this._applyLabelsWidthWithGroups(n,t._getColCount(),r,o):this._applyLabelsWidth(n,r,!1,t._getColCount(),o)}},_prepareFormData:function(){E(this.option("formData"))||this.option("formData",{})},_setStylingModeClass:function(){this.option("stylingMode")==="underlined"&&this.$element().addClass($Z)},_initMarkup:function(){Ct.addGroup(this._getValidationGroup()),this._clearCachedInstances(),this._prepareFormData(),this.$element().addClass(RZ),this._setStylingModeClass(),this.callBase(),this.setAria("role","form",this.$element()),this.option("scrollingEnabled")&&this._renderScrollable(),this._renderLayout(),this._renderValidationSummary(),this._lastMarkupScreenFactor=this._targetScreenFactor||this._getCurrentScreenFactor()},_getCurrentScreenFactor:function(){return Ue()?NI(this.option("screenByWidth")):"lg"},_clearCachedInstances:function(){this._itemsRunTimeInfo.clear(),this._cachedLayoutManagers=[]},_alignLabels:function(e,t){this._alignLabelsInColumn({$container:this.$element(),layoutManager:e,excludeTabbed:!0,items:this.option("items"),inOneColumn:t}),lr(this.$element().find(".".concat(NO)))},_clean:function(){this._clearValidationSummary(),this.callBase(),this._groupsColCount=[],this._cachedColCountOptions=[],this._lastMarkupScreenFactor=void 0},_renderScrollable:function(){var e=this.option("useNativeScrolling");this._scrollable=new _n(this.$element(),{useNative:!!e,useSimulatedScrollbar:!e,useKeyboard:!1,direction:"both",bounceEnabled:!1})},_getContent:function(){return this.option("scrollingEnabled")?v(this._scrollable.content()):this.$element()},_clearValidationSummary:function(){var e;(e=this._$validationSummary)===null||e===void 0||e.remove(),this._$validationSummary=void 0,this._validationSummary=void 0},_renderValidationSummary:function(){this._clearValidationSummary(),this.option("showValidationSummary")&&(this._$validationSummary=v("<div>").addClass(NZ).appendTo(this._getContent()),this._validationSummary=this._$validationSummary.dxValidationSummary({validationGroup:this._getValidationGroup()}).dxValidationSummary("instance"))},_prepareItems(e,t,i,n){if(e){for(var r=[],a=0;a<e.length;a++){var o=e[a],s=NR(i,fm(a,n)),l={item:o,itemIndex:a,path:s},u=this._itemsRunTimeInfo.add(l);if(Ve(o)&&(o={dataField:o}),$e(o)){var d=Se({},o);l.preparedItem=d,d.guid=u,this._tryPrepareGroupItem(d),this._tryPrepareTabbedItem(d,s),this._tryPrepareItemTemplate(d),t&&(d.cssItemClass=sE),d.items&&(d.items=this._prepareItems(d.items,t,s)),r.push(d)}else r.push(o)}return r}},_tryPrepareGroupItem:function(e){e.itemType==="group"&&(e.alignItemLabels=Mt(e.alignItemLabels,!0),e._prepareGroupItemTemplate=t=>{e.template&&(e.groupContentTemplate=this._getTemplate(t)),e.template=this._itemGroupTemplate.bind(this,e)},e._prepareGroupItemTemplate(e.template))},_tryPrepareTabbedItem:function(e,t){e.itemType==="tabbed"&&(e.template=this._itemTabbedTemplate.bind(this,e),e.tabs=this._prepareItems(e.tabs,!0,t,!0))},_tryPrepareItemTemplate:function(e){e.template&&(e.template=this._getTemplate(e.template))},_checkGrouping:function(e){if(e)for(var t=0;t<e.length;t++){var i=e[t];if(i.itemType==="group")return!0}},_renderLayout:function(){var e=this,t=e.option("items"),i=e._getContent();t=e._prepareItems(t),e._rootLayoutManager=e._renderLayoutManager(i,this._createLayoutManagerOptions(t,{isRoot:!0,colCount:e.option("colCount"),alignItemLabels:e.option("alignItemLabels"),screenByWidth:this.option("screenByWidth"),colCountByScreen:this.option("colCountByScreen"),onLayoutChanged:function(n){e._alignLabels.bind(e)(e._rootLayoutManager,n)},onContentReady:function(n){e._alignLabels(n.component,n.component.isSingleColumnMode())}}))},_tryGetItemsForTemplate:function(e){return e.items||[]},_itemTabbedTemplate:function(e,t,i){var n=v("<div>").appendTo(i),r=k({},e.tabPanelOptions,{dataSource:e.tabs,onItemRendered:s=>Jc(s.itemElement),itemTemplate:(s,l,u)=>{var d=v(u),c=Mt(s.alignItemLabels,!0),h=this._renderLayoutManager(d,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(s),{colCount:s.colCount,alignItemLabels:c,screenByWidth:this.option("screenByWidth"),colCountByScreen:s.colCountByScreen,cssItemClass:s.cssItemClass,onLayoutChanged:f=>{this._alignLabelsInColumn({$container:d,layoutManager:h,items:s.items,inOneColumn:f})}}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(s.guid,{layoutManager:h}),c&&this._alignLabelsInColumn({$container:d,layoutManager:h,items:s.items,inOneColumn:h.isSingleColumnMode()})}}),a=(s,l)=>{Array.isArray(s)&&s.forEach(u=>this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(u.guid,{widgetInstance:l}))},o=this._createComponent(n,kC,r);v(i).parent().addClass(MZ),o.on("optionChanged",s=>{s.fullName==="dataSource"&&a(s.value,s.component)}),a([{guid:e.guid},...e.tabs],o)},_itemGroupTemplate:function(e,t,i){var n=v("<div>").toggleClass(VZ,E(e.caption)&&e.caption.length).addClass(gv).appendTo(i);v(i).parent().addClass(FZ);var r,a;e.caption&&v("<span>").addClass(kZ).text(e.caption).appendTo(n);var o=v("<div>").addClass(PZ).appendTo(n);e.groupContentTemplate?(e._renderGroupContentTemplate=()=>{o.empty();var s={formData:this.option("formData"),component:this};e.groupContentTemplate.render({model:s,container:Me(o)})},e._renderGroupContentTemplate()):(a=this._renderLayoutManager(o,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(e),{colCount:e.colCount,colCountByScreen:e.colCountByScreen,alignItemLabels:e.alignItemLabels,cssItemClass:e.cssItemClass})),this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(e.guid,{layoutManager:a}),r=a._getColCount(),this._groupsColCount.includes(r)||this._groupsColCount.push(r),n.addClass(lE+r),n.attr(uE,r))},_createLayoutManagerOptions:function(e,t){return yZ({form:this,formOptions:this.option(),$formElement:this.$element(),items:e,validationGroup:this._getValidationGroup(),extendedLayoutManagerOptions:t,onFieldDataChanged:i=>{this._isDataUpdating||this._triggerOnFieldDataChanged(i)},onContentReady:i=>{this._itemsRunTimeInfo.addItemsOrExtendFrom(i.component._itemsRunTimeInfo),t.onContentReady&&t.onContentReady(i)},onDisposing:i=>{var{component:n}=i,r=n.getItemsRunTimeInfo();this._itemsRunTimeInfo.removeItemsByItems(r)},onFieldItemRendered:()=>{var i;(i=this._validationSummary)===null||i===void 0||i.refreshValidationGroup()}})},_renderLayoutManager:function(e,t){var i={lg:t.colCount,md:t.colCount,sm:t.colCount,xs:1};this._cachedColCountOptions.push({colCountByScreen:k(i,t.colCountByScreen)});var n=v("<div>");n.appendTo(e);var r=this._createComponent(n,"dxLayoutManager",t);return r.on("autoColCountChanged",()=>{this._clearAutoColCountChangedTimeout(),this.autoColCountChangedTimeoutId=setTimeout(()=>!this._disposed&&this._refresh(),0)}),this._cachedLayoutManagers.push(r),r},_getValidationGroup:function(){return this.option("validationGroup")||this},_createComponent:function(e,t,i){return i=i||{},this._extendConfig(i,{readOnly:this.option("readOnly")}),this.callBase(e,t,i)},_attachSyncSubscriptions:function(){var e=this;e.on("optionChanged",function(t){var i=t.fullName;i==="formData"&&(E(t.value)||e._options.silent("formData",t.value={}),e._triggerOnFieldDataChangedByDataSet(t.value)),e._cachedLayoutManagers.length&&V(e._cachedLayoutManagers,function(n,r){i==="formData"&&(e._isDataUpdating=!0,r.option("layoutData",t.value),e._isDataUpdating=!1),(t.name==="readOnly"||t.name==="disabled")&&r.option(i,t.value)})})},_optionChanged:function(e){var t=e.fullName.split(".");t.length>1&&t[0].search("items")!==-1&&this._itemsOptionChangedHandler(e)||t.length>1&&t[0].search("formData")!==-1&&this._formDataOptionChangedHandler(e)||this._defaultOptionChangedHandler(e)},_defaultOptionChangedHandler:function(e){switch(e.name){case"formData":this.option("items")?Pn(e.value)&&this._resetValues():this._invalidate();break;case"onFieldDataChanged":break;case"items":case"colCount":case"onEditorEnterKey":case"labelLocation":case"labelMode":case"alignItemLabels":case"showColonAfterLabel":case"customizeItem":case"alignItemLabelsInAllGroups":case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":case"requiredMessage":case"scrollingEnabled":case"formID":case"colCountByScreen":case"screenByWidth":case"stylingMode":this._invalidate();break;case"showValidationSummary":this._renderValidationSummary();break;case"minColWidth":this.option("colCount")==="auto"&&this._invalidate();break;case"alignRootItemLabels":case"readOnly":break;case"width":this.callBase(e),this._rootLayoutManager.option(e.name,e.value),this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode());break;case"visible":this.callBase(e),e.value&&Jc(this.$element());break;case"validationGroup":Ct.removeGroup(e.previousValue||this),this._invalidate();break;default:this.callBase(e)}},_itemsOptionChangedHandler:function(e){var t=e.fullName.split("."),i=e.value,n=this._getItemPath(t),r=this.option(n),a=e.fullName.replace(n+".",""),o=a.split(".")[0].replace(/\[\d+]/,""),s=this._tryCreateItemOptionAction(o,r,r[o],e.previousValue,n),l=this._tryExecuteItemOptionAction(s)||this._tryChangeLayoutManagerItemOption(e.fullName,i);if(!l&&r){this._changeItemOption(r,a,i);var u=this._generateItemsFromData(this.option("items"));this.option("items",u),l=!0}return l},_formDataOptionChangedHandler:function(e){var t=e.fullName.split("."),i=e.value,n=t.slice(1).join("."),r=this.getEditor(n);return r?r.option("value",i):this._triggerOnFieldDataChanged({dataField:n,value:i}),!0},_tryCreateItemOptionAction:function(e,t,i,n,r){return e==="tabs"&&(this._itemsRunTimeInfo.removeItemsByPathStartWith("".concat(r,".tabs")),i=this._prepareItems(i,!0,r,!0)),IZ(e,{item:t,value:i,previousValue:n,itemsRunTimeInfo:this._itemsRunTimeInfo})},_tryExecuteItemOptionAction:function(e){return e&&e.tryExecute()},_updateValidationGroupAndSummaryIfNeeded:function(e){var t=tE(e);if(BJ.indexOf(t)>-1&&(Ct.addGroup(this._getValidationGroup()),this.option("showValidationSummary"))){var i;(i=this._validationSummary)===null||i===void 0||i.refreshValidationGroup()}},_setLayoutManagerItemOption(e,t,i,n){if(this._updateLockCount>0){!e._updateLockCount&&e.beginUpdate();var r=this._itemsRunTimeInfo.findKeyByPath(n);this.postponedOperations.add(r,()=>(!e._disposed&&e.endUpdate(),new se().resolve()))}var a=o=>{if(o.component.off("contentReady",a),$R(n)){var s=CZ(n),l=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(s);l&&this._alignLabelsInColumn({items:l.option("items"),layoutManager:l,$container:l.$element(),inOneColumn:l.isSingleColumnMode()})}else this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())};e.on("contentReady",a),e.option(t,i),this._updateValidationGroupAndSummaryIfNeeded(t)},_tryChangeLayoutManagerItemOption(e,t){var i=e.split("."),n=tE(e);if(n==="items"&&i.length>1){var r=this._getItemPath(i),a=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(r);if(a){this._itemsRunTimeInfo.removeItemsByItems(a.getItemsRunTimeInfo());var o=this._prepareItems(t,!1,r);return this._setLayoutManagerItemOption(a,n,o,r),!0}}else if(i.length>2){var s=i.length-2,l=this._getItemPath(i.slice(0,s)),u=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(l);if(u){var d=Gl(i[s],n);if(n==="editorType"&&u.option(d)!==t)return!1;if(n==="visible"){var c=this.option(Gl(l,"items"));if(c&&c.length){var h=u.option("items");c.forEach((f,p)=>{var m=h[p];m.visibleIndex=f.visibleIndex})}}return this._setLayoutManagerItemOption(u,d,t,l),!0}}return!1},_tryChangeLayoutManagerItemOptions(e,t){var i;return this.beginUpdate(),V(t,(n,r)=>{if(i=this._tryChangeLayoutManagerItemOption(Gl(e,n),r),!i)return!1}),this.endUpdate(),i},_getItemPath:function(e){var t=e[0],i;for(i=1;i<e.length&&e[i].search(/items\[\d+]|tabs\[\d+]/)!==-1;i++)t+="."+e[i];return t},_triggerOnFieldDataChanged:function(e){this._createActionByOption("onFieldDataChanged")(e)},_triggerOnFieldDataChangedByDataSet:function(e){var t=this;e&&$e(e)&&V(e,function(i,n){t._triggerOnFieldDataChanged({dataField:i,value:n})})},_updateFieldValue:function(e,t){if(E(this.option("formData"))){var i=this.getEditor(e);if(this.option("formData."+e,t),i){var n=i.option("value");n!==t&&i.option("value",t)}}},_generateItemsFromData:function(e){var t=this.option("formData"),i=[];return!e&&E(t)&&V(t,function(n){i.push({dataField:n})}),e&&V(e,function(n,r){$e(r)?i.push(r):i.push({dataField:r})}),i},_getItemByField:function(e,t){var i=this,n=$e(e)?e:i._getFieldParts(e),r=n.fieldName,a=n.fieldPath,o;return t.length&&V(t,function(s,l){var u=l.itemType;if(a.length){var d=a.slice();l=i._getItemByFieldPath(d,r,l)}else if(u==="group"&&!(l.caption||l.name)||u==="tabbed"&&!l.name){var c=i._getSubItemField(u);l.items=i._generateItemsFromData(l.items),l=i._getItemByField({fieldName:r,fieldPath:a},l[c])}if(gZ(l,r))return o=l,!1}),o},_getFieldParts:function(e){for(var t=e,i=t.indexOf("."),n=[];i!==-1;)n.push(t.substr(0,i)),t=t.substr(i+1),i=t.indexOf(".");return{fieldName:t,fieldPath:n.reverse()}},_getItemByFieldPath:function(e,t,i){var n=i.itemType,r=this._getSubItemField(n),a=n==="group"||n==="tabbed"||i.title,o;do if(a){var s=i.name||i.caption||i.title,l=E(s),u=pm(s),d=void 0;if(i[r]=this._generateItemsFromData(i[r]),l&&(d=e.pop()),!e.length&&(o=this._getItemByField(t,i[r]),o))break;(!l||l&&u===d)&&e.length&&(o=this._searchItemInEverySubItem(e,t,i[r]))}else break;while(e.length&&!E(o));return o},_getSubItemField:function(e){return e==="tabbed"?"tabs":"items"},_searchItemInEverySubItem:function(e,t,i){var n=this,r;return V(i,function(a,o){if(r=n._getItemByFieldPath(e.slice(),t,o),r)return!1}),r||(r=!1),r},_changeItemOption:function(e,t,i){$e(e)&&(e[t]=i)},_dimensionChanged:function(){var e=this._getCurrentScreenFactor();this._lastMarkupScreenFactor!==e&&(this._isColCountChanged(this._lastMarkupScreenFactor,e)&&(this._targetScreenFactor=e,this._refresh(),this._targetScreenFactor=void 0),this._lastMarkupScreenFactor=e)},_isColCountChanged:function(e,t){var i=!1;return V(this._cachedColCountOptions,function(n,r){if(r.colCountByScreen[e]!==r.colCountByScreen[t])return i=!0,!1}),i},_refresh:function(){var e="."+pE+" input, ."+pE+" textarea";R.trigger(this.$element().find(e),"change"),this.callBase()},_resetValues:function(){this._itemsRunTimeInfo.each(function(e,t){E(t.widgetInstance)&&Yn.isEditor(t.widgetInstance)&&(t.widgetInstance.reset(),t.widgetInstance.option("isValid",!0))}),Ct.resetGroup(this._getValidationGroup())},_updateData:function(e,t,i){var n=this,r=i?t:e;$e(r)?V(r,function(a,o){n._updateData(i?e+"."+a:a,o,$e(o))}):Ve(e)&&n._updateFieldValue(e,t)},registerKeyHandler:function(e,t){this.callBase(e,t),this._itemsRunTimeInfo.each(function(i,n){E(n.widgetInstance)&&n.widgetInstance.registerKeyHandler(e,t)})},_focusTarget:function(){return this.$element().find("."+vm+" [tabindex]").first()},_visibilityChanged:function(){},_clearAutoColCountChangedTimeout:function(){this.autoColCountChangedTimeoutId&&(clearTimeout(this.autoColCountChangedTimeoutId),this.autoColCountChangedTimeoutId=void 0)},_dispose:function(){this._clearAutoColCountChangedTimeout(),Ct.removeGroup(this._getValidationGroup()),this.callBase()},resetValues:function(){this._resetValues()},updateData:function(e,t){this._updateData(e,t)},getEditor:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},getButton:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByName(e)},updateDimensions:function(){var e=this,t=new se;return e._scrollable?e._scrollable.update().done(function(){t.resolveWith(e)}):t.resolveWith(e),t.promise()},itemOption:function(e,t,i){var n=this._generateItemsFromData(this.option("items")),r=this._getItemByField(e,n),a=HR(n,r);if(r)switch(arguments.length){case 1:return r;case 3:var o=this._tryCreateItemOptionAction(t,r,i,r[t],a);this._changeItemOption(r,t,i);var s=Gl(a,t);!this._tryExecuteItemOptionAction(o)&&!this._tryChangeLayoutManagerItemOption(s,i)&&this.option("items",n);break;default:if($e(t)&&!this._tryChangeLayoutManagerItemOptions(a,t)){var l;V(t,(u,d)=>{var c=this._tryCreateItemOptionAction(u,r,d,r[u],a);this._changeItemOption(r,u,d),!l&&!this._tryExecuteItemOptionAction(c)&&(l=!0)}),l&&this.option("items",n)}}},validate:function(){return Ct.validateGroup(this._getValidationGroup())},getItemID:function(e){return"dx_"+this.option("formID")+"_"+(e||new si)},getTargetScreenFactor:function(){return this._targetScreenFactor}});tt("dxForm",LC);var LJ=!!_n.IS_RENOVATED_WIDGET,vE="edit-form-item",PJ="edit-popup",FJ="edit-popup-form",MJ=LJ?"dx-scrollable":"dx-scrollable-container",VJ="dx-button",NJ="form-buttons-container",$J=e=>{var t,i=e.column;return e.isCustomEditorType?e.editorType:(t=i.formItem)===null||t===void 0?void 0:t.editorType},QR=(e,t)=>{e.forEach(i=>{i.items||i.tabs?QR(i.items||i.tabs,t):t(i)})},HJ={extenders:{controllers:{editing:{init:function(){this._editForm=null,this._updateEditFormDeferred=null,this.callBase.apply(this,arguments)},isFormOrPopupEditMode:function(){return this.isPopupEditMode()||this.isFormEditMode()},isPopupEditMode:function(){var e=this.option("editing.mode");return e===OC},isFormEditMode:function(){var e=this.option("editing.mode");return e===ff},getFirstEditableColumnIndex:function(){var e=this._firstFormItem;if(this.isFormEditMode()&&e){var t=this.option(Gn),i=this._dataController.getRowIndexByKey(t),n=this._rowsView.getCellElements(i);return this._rowsView._getEditFormEditorVisibleIndex(n,e.column)}return this.callBase.apply(this,arguments)},getEditFormRowIndex:function(){return this.isFormOrPopupEditMode()?this._getVisibleEditRowIndex():this.callBase.apply(this,arguments)},_isEditColumnVisible:function(){var e=this.callBase.apply(this,arguments),t=this.option("editing");return this.isFormOrPopupEditMode()&&t.allowUpdating||e},_handleDataChanged:function(e){if(this.isPopupEditMode()){var t,i=this.option("editing.editRowKey"),n=e==null||(t=e.items)===null||t===void 0?void 0:t.some(r=>Bt(r.key,i));(e.changeType==="refresh"||n)&&this._repaintEditPopup()}this.callBase.apply(this,arguments)},getPopupContent:function(){var e,t=(e=this._editPopup)===null||e===void 0?void 0:e.option("visible");if(this.isPopupEditMode()&&t)return this._$popupContent},_showAddedRow:function(e){this.isPopupEditMode()?this._showEditPopup(e):this.callBase.apply(this,arguments)},_cancelEditDataCore:function(){this.callBase.apply(this,arguments),this.isPopupEditMode()&&this._hideEditPopup()},_updateEditRowCore:function(e,t,i){var n=this._editForm;if(this.isPopupEditMode())if(this.option("repaintChangesOnly")){var r;(r=e.update)===null||r===void 0||r.call(e,e),this._rowsView.renderDelayedTemplates()}else n&&(this._updateEditFormDeferred=new se().done(()=>n.repaint()),this._updateLockCount||this._updateEditFormDeferred.resolve());else this.callBase.apply(this,arguments)},_showEditPopup:function(e,t){var i=Re.current().deviceType!=="desktop",n=k({showTitle:!1,fullScreen:i,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getSaveButtonConfig()},{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getCancelButtonConfig()}],contentTemplate:this._getPopupEditFormTemplate(e)},this.option(Mc));if(!this._editPopup){var r=v("<div>").appendTo(this.component.$element()).addClass(this.addWidgetPrefix(PJ));this._editPopup=this._createComponent(r,Cr,{copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0}),this._editPopup.on("hiding",this._getEditPopupHiddenHandler()),this._editPopup.on("shown",a=>{if(R.trigger(a.component.$content().find(RR).not(".".concat(MJ)).first(),"focus"),t){var o;(o=this._editForm)===null||o===void 0||o.repaint()}})}this._editPopup.option(n),this._editPopup.show(),this.callBase.apply(this,arguments)},_getPopupEditFormTemplate:function(e){var t=this.component.getVisibleRows()[e],i={row:t,values:t.values,rowType:t.rowType,key:t.key,rowIndex:e};return this._rowsView._addWatchMethod(i,t),n=>{var r=this.getEditFormTemplate(),a=this._createComponent(v("<div>").appendTo(n),_n);this._$popupContent=v(a.content()),r(this._$popupContent,i,{isPopupForm:!0}),this._rowsView.renderDelayedTemplates()}},_repaintEditPopup:function(){var e,t=this._getVisibleEditRowIndex();if((e=this._editPopup)!==null&&e!==void 0&&e.option("visible")&&t>=0){var i=this._editPopup.option("animation");this._editPopup.option("animation",null),this._showEditPopup(t,!0),this._editPopup.option("animation",i)}},_hideEditPopup:function(){var e;(e=this._editPopup)===null||e===void 0||e.option("visible",!1)},optionChanged:function(e){if(e.name==="editing"&&this.isFormOrPopupEditMode()){var t=e.fullName;t.indexOf(vv)===0?(this._handleFormOptionChange(e),e.handled=!0):t.indexOf(Mc)===0&&(this._handlePopupOptionChange(e),e.handled=!0)}this.callBase.apply(this,arguments)},_handleFormOptionChange:function(e){var t;if(this.isFormEditMode()){var i=this._getVisibleEditRowIndex();i>=0&&this._dataController.updateItems({changeType:"update",rowIndices:[i]})}else(t=this._editPopup)!==null&&t!==void 0&&t.option("visible")&&e.fullName.indexOf(vv)===0&&this._repaintEditPopup()},_handlePopupOptionChange:function(e){var t=this._editPopup;if(t){var i=e.fullName.slice(Mc.length+1);i?t.option(i,e.value):t.option(e.value)}},renderFormEditTemplate:function(e,t,i,n,r){var a=this,o=v(n),s=t.column,l=$J(t),u=e==null?void 0:e.row.data,d=i.component,{label:c,labelMark:h,labelMode:f}=i.editorOptions||{},p=k({},e,{data:u,cellElement:null,isOnForm:!0,item:t,id:d.getItemID(t.name||t.dataField),column:k({},s,{editorType:l,editorOptions:k({label:c,labelMark:h,labelMode:f},s.editorOptions,t.editorOptions)}),columnIndex:s.index,setValue:!r&&s.allowEditing&&function(g){a.updateFieldValue(p,g)}});p.value=s.calculateCellValue(u);var m=this._getFormEditItemTemplate.bind(this)(p,s);return this._rowsView.renderTemplate(o,m,p,!!o.closest(je().document).length).done(()=>{this._rowsView._updateCell(o,p)}),p},getFormEditorTemplate:function(e,t){var i=this.component.columnOption(t.dataField);return(n,r)=>{var a,o,s=v(r);(a=(o=e.row).watch)===null||a===void 0||a.call(o,function(){return i.selector(e.row.data)},()=>{var l,u=s.find(".dx-widget").first(),d=u.data("dxValidator"),c=(l=d)===null||l===void 0?void 0:l.option();s.contents().remove(),e=this.renderFormEditTemplate.bind(this)(e,t,n,s),u=s.find(".dx-widget").first(),d=u.data("dxValidator"),c&&!d&&u.dxValidator({validationRules:c.validationRules,validationGroup:c.validationGroup,dataGetter:c.dataGetter})}),e=this.renderFormEditTemplate.bind(this)(e,t,n,s)}},getEditFormOptions:function(e){var t,i=(t=this._getValidationGroupsInForm)===null||t===void 0?void 0:t.call(this,e),n=this.option("editing.form.customizeItem"),r=this.addWidgetPrefix(vE),a=this.option("editing.form.items"),o={};if(a)QR(a,l=>{var u=(l==null?void 0:l.name)||(l==null?void 0:l.dataField);u&&(o[u]=!!l.editorType)});else{var s=this.getController("columns").getColumns();a=[],V(s,function(l,u){!u.isBand&&!u.type&&a.push({column:u,name:u.name,dataField:u.dataField})})}return k({},i,{items:a,formID:"dx-"+new si,customizeItem:l=>{var u,d=l.name||l.dataField;if((l.column||d)&&(u=l.column||this._columnsController.columnOption(l.name?"name:"+l.name:"dataField:"+l.dataField)),u){if(l.label=l.label||{},l.label.text=l.label.text||u.caption,u.dataType==="boolean"&&l.label.visible===void 0){var c=this.option("editing.form.labelMode");(c==="floating"||c==="static")&&(l.label.visible=!0)}l.template=l.template||this.getFormEditorTemplate(e,l),l.column=u,l.isCustomEditorType=o[d],u.formItem&&k(l,u.formItem),l.isRequired===void 0&&u.validationRules&&(l.isRequired=u.validationRules.some(function(f){return f.type==="required"}),l.validationRules=[]);var h=E(l.visible)?l.visible:!0;!this._firstFormItem&&h&&(this._firstFormItem=l)}n==null||n.call(this,l),l.cssClass=Ve(l.cssClass)?l.cssClass+" "+r:r}})},getEditFormTemplate:function(){return(e,t,i)=>{var n=this.option(vv),r=this.getEditFormOptions(t),a=v("<div>").appendTo(e),o=i==null?void 0:i.isPopupForm;if(this._firstFormItem=void 0,o&&a.addClass(this.addWidgetPrefix(FJ)),this._editForm=this._createComponent(a,LC,k({},n,r)),!o){var s=v("<div>").addClass(this.addWidgetPrefix(NJ)).appendTo(e);this._createComponent(v("<div>").appendTo(s),Ii,this._getSaveButtonConfig()),this._createComponent(v("<div>").appendTo(s),Ii,this._getCancelButtonConfig())}this._editForm.on("contentReady",()=>{var l;this._rowsView.renderDelayedTemplates(),(l=this._editPopup)===null||l===void 0||l.repaint()})}},getEditForm:function(){return this._editForm},_endUpdateCore:function(){var e;(e=this._updateEditFormDeferred)===null||e===void 0||e.resolve()},_beforeEndSaving:function(){if(this.callBase.apply(this,arguments),this.isPopupEditMode()){var e;(e=this._editPopup)===null||e===void 0||e.hide()}},_processDataItemCore:function(e,t){var{type:i}=t;this.isPopupEditMode()&&i===ir&&(e.visible=!1),this.callBase.apply(this,arguments)},_editRowFromOptionChangedCore:function(e,t){var i=this.isPopupEditMode();this.callBase(e,t,i),i&&this._showEditPopup(t)}},data:{_updateEditItem:function(e){this._editingController.isFormEditMode()&&(e.rowType="detail")},_getChangedColumnIndices:function(e,t,i,n){if(!(n===!1&&t.isEditing&&this._editingController.isFormEditMode()))return this.callBase.apply(this,arguments)}}},views:{rowsView:{_renderCellContent:function(e,t){t.rowType==="data"&&this._editingController.isPopupEditMode()&&t.row.visible===!1||this.callBase.apply(this,arguments)},getCellElements:function(e){var t=this.callBase(e),i=this._editingController,n=i.getEditForm(),r=i.getEditFormRowIndex();return r===e&&t&&n?n.$element().find("."+this.addWidgetPrefix(vE)+", ."+VJ):t},_getVisibleColumnIndex:function(e,t,i){var n=this._editingController.getEditFormRowIndex();if(n===t&&Ve(i)){var r=this._columnsController.columnOption(i);return this._getEditFormEditorVisibleIndex(e,r)}return this.callBase.apply(this,arguments)},_getEditFormEditorVisibleIndex:function(e,t){var i=-1;return V(e,function(n,r){var a=v(r).find(".dx-field-item-content").data("dx-form-item");if(a!=null&&a.column&&t&&a.column.index===t.index)return i=n,!1}),i},_isFormItem:function(e){var t=e.rowType==="detail"||e.rowType==="detailAdaptive",i=e.rowType==="data"&&this._editingController.isPopupEditMode();return(t||i)&&e.item},_updateCell:function(e,t){this._isFormItem(t)?this._formItemPrepared(t,e):this.callBase(e,t)}}}}};Oe.registerModule("editingFormBased",HJ);var WJ="focus-overlay",zJ="addrow-button",GJ="dx-dropdowneditor-overlay",UJ="dx-editor-cell",KJ="dx-row",jJ="dx-cell-modified",qJ="dx-data-row",YJ="dx-row-removed",XJ="editing.editRowKey",_E="editing.editColumnName",ZJ="remove";const JJ={extenders:{controllers:{editing:{init:function(){var e=!this._saveEditorHandler;if(this.callBase.apply(this,arguments),e){var t,i;this._pointerUpEditorHandler=()=>{var n;i=(n=this.getController("columnsResizer"))===null||n===void 0?void 0:n.isResizing()},this._pointerDownEditorHandler=n=>t=v(n.target),this._saveEditorHandler=this.createAction(function(n){var r=n.event,a=v(r.target),o=r[DR],s=this.component;if(t&&t.is("input")&&!t.is(a))return;function l(m){if(!m)return!1;var g=m.closest(".".concat(GJ)),C=s.$element();return g.length>0&&C.closest(g).length===0}if(this.isCellOrBatchEditMode()&&!this._editCellInProgress){var u=l(a)||l(o==null?void 0:o.$element()),d=!!a.closest(je().document).length,c=o&&!o._disposed&&o!==this.component,h=!!a.closest(".".concat(this.addWidgetPrefix(zJ))).length,f=a.hasClass(this.addWidgetPrefix(WJ)),p=this.isCellEditMode();!i&&!u&&!f&&!(h&&p&&this.isEditing())&&(d||c)&&this._closeEditItem.bind(this)(a)}}),R.on(me.getDocument(),lt.up,this._pointerUpEditorHandler),R.on(me.getDocument(),lt.down,this._pointerDownEditorHandler),R.on(me.getDocument(),vt,this._saveEditorHandler)}},isCellEditMode:function(){return this.option("editing.mode")===kR},isBatchEditMode:function(){return this.option("editing.mode")===hm},isCellOrBatchEditMode:function(){return this.isCellEditMode()||this.isBatchEditMode()},_needToCloseEditableCell:function(e){var t=this.component.$element(),i=this.isEditing(),n=!t||!!e.closest(t).length;if(n){var r=e.closest("."+qJ).length;if(r){var a=this.getView("rowsView"),o=e.closest("."+KJ+"> td"),s=a.getRowIndex(o.parent()),l=a.getCellElements(s).index(o),u=this._columnsController.getVisibleColumns(),d=u[l]&&u[l].allowEditing;i=i&&!d&&!this.isEditCell(s,l)}}return i||this.callBase.apply(this,arguments)},_closeEditItem:function(e){this._needToCloseEditableCell(e)&&this.closeEditCell()},_focusEditorIfNeed:function(){if(this._needFocusEditor&&this.isCellOrBatchEditMode()){var e,t=this._getVisibleEditColumnIndex(),i=(e=this._rowsView)===null||e===void 0?void 0:e._getCellElement(this._getVisibleEditRowIndex(),t);i&&!i.find(":focus").length?this._focusEditingCell(()=>{this._editCellInProgress=!1},i,!0):this._editCellInProgress=!1,this._needFocusEditor=!1}else this.callBase.apply(this,arguments)},isEditing:function(){if(this.isCellOrBatchEditMode()){var e=E(this.option(XJ)),t=E(this.option(_E));return e&&t}return this.callBase.apply(this,arguments)},_handleEditColumnNameChange:function(e){var t=this._getVisibleEditRowIndex(e.previousValue);if(this.isCellOrBatchEditMode()&&t!==-1&&E(e.value)&&e.value!==e.previousValue){var i=this._columnsController.getVisibleColumnIndex(e.value),n=this._columnsController.getVisibleColumnIndex(e.previousValue);this._editCellFromOptionChanged(i,n,t)}},_addRow:function(e,t){if(this.isCellEditMode()&&this.hasChanges()){var i=new se;return this.saveEditData().done(()=>{this.hasChanges()?i.reject("cancel"):this.addRow(e).done(i.resolve).fail(i.reject)}),i.promise()}return this.callBase.apply(this,arguments)},editCell:function(e,t){return this._editCell({rowIndex:e,columnIndex:t})},_editCell:function(e){var t=new se,i;return this.executeOperation(t,()=>{i=this._editCellCore(e),De(i).done(t.resolve).fail(t.reject)}),i!==void 0?i:t.promise()},_editCellCore:function(e){var t=this._dataController,i=E(e.oldColumnIndex)||E(e.oldRowIndex),{columnIndex:n,rowIndex:r,column:a,item:o}=this._getNormalizedEditCellOptions(e),s={data:o==null?void 0:o.data,cancel:!1,column:a};if(o.key===void 0){this._dataController.fireError("E1043");return}if(a&&(o.rowType==="data"||o.rowType==="detailAdaptive")&&!o.removed&&this.isCellOrBatchEditMode()){if(!i&&this.isEditCell(r,n))return!0;var l=r+t.getRowIndexOffset();return De(this._beforeEditCell(r,n,o)).done(u=>{u||this._prepareEditCell(s,o,n,l)||this._processCanceledEditingCell()})}return!1},_beforeEditCell:function(e,t,i){if(this.isCellEditMode()&&!i.isNewRow&&this.hasChanges()){var n=new se;return this.saveEditData().always(()=>{n.resolve(this.hasChanges())}),n}},publicMethods:function(){var e=this.callBase.apply(this,arguments);return e.concat(["editCell","closeEditCell"])},_getNormalizedEditCellOptions:function(e){var{oldColumnIndex:t,oldRowIndex:i,columnIndex:n,rowIndex:r}=e,a=this._columnsController,o=a.getVisibleColumns(),s=this._dataController.items(),l=s[r],u;E(t)?u=o[t]:u=this._getEditColumn(),E(i)||(i=this._getVisibleEditRowIndex()),Ve(n)&&(n=a.columnOption(n,"index"),n=a.getVisibleIndex(n));var d=o[n];return{oldColumn:u,columnIndex:n,oldRowIndex:i,rowIndex:r,column:d,item:l}},_prepareEditCell:function(e,t,i,n){if(t.isNewRow||(e.key=t.key),this._isEditingStart(e))return!1;if(this._pageIndex=this._dataController.pageIndex(),this._setEditRowKey(t.key),this._setEditColumnNameByIndex(i),!e.column.showEditorAlways){var r;this._addInternalData({key:t.key,oldData:(r=t.oldData)!==null&&r!==void 0?r:t.data})}return!0},closeEditCell:function(e,t){var i=De(),n=this._getVisibleEditRowIndex();if(this.isCellOrBatchEditMode()){var r=new se;i=new se,this.executeOperation(r,()=>{this._closeEditCellCore(e,n,t).always(i.resolve)})}return i.promise()},_closeEditCellCore:function(e,t,i){var n=this._dataController,r=new se,a=r.promise();if(this.isCellEditMode()&&this.hasChanges()){if(!i)return this.saveEditData().done(s=>{if(!this.hasChanges()){this.closeEditCell(!!s).always(r.resolve);return}r.resolve()}),a}else if(this._resetEditRowKey(),this._resetEditColumnName(),t>=0){var o=[t];this._beforeCloseEditCellInBatchMode(o),e||n.updateItems({changeType:"update",rowIndices:o})}return r.resolve(),a},_resetModifiedClassCells:function(e){if(this.isBatchEditMode()){var t=this._columnsController.getVisibleColumns().length;e.forEach(i=>{var{key:n}=i,r=this._dataController.getRowIndexByKey(n);if(r!==-1)for(var a=0;a<t;a++)this._rowsView._getCellElement(r,a).removeClass(jJ)})}},_prepareChange:function(e,t,i){var n=v(e.cellElement);return this.isBatchEditMode()&&e.key!==void 0&&this._applyModified(n,e),this.callBase.apply(this,arguments)},_cancelSaving:function(){var e=this._dataController;this.isCellOrBatchEditMode()&&(this.isBatchEditMode()&&this._resetEditIndices(),e.updateItems()),this.callBase.apply(this,arguments)},optionChanged:function(e){var t=e.fullName;e.name==="editing"&&t===_E?(this._handleEditColumnNameChange(e),e.handled=!0):this.callBase(e)},_editCellFromOptionChanged:function(e,t,i){var n=this._columnsController.getVisibleColumns();e>-1&&Qt(()=>{this._repaintEditCell(n[e],n[t],i)})},_handleEditRowKeyChange:function(e){if(this.isCellOrBatchEditMode()){var t=this._getVisibleEditColumnIndex(),i=this._getEditRowIndexCorrection(),n=this._dataController.getRowIndexByKey(e.previousValue)+i;if(E(e.value)&&e.value!==e.previousValue){var r;(r=this._editCellFromOptionChanged)===null||r===void 0||r.call(this,t,t,n)}}else this.callBase.apply(this,arguments)},deleteRow:function(e){if(this.isCellEditMode()&&this.isEditing()){var t=this._dataController.items()[e].isNewRow,i=this._dataController.getKeyByRowIndex(e);this.closeEditCell(null,t).always(()=>{e=this._dataController.getRowIndexByKey(i),this._checkAndDeleteRow(e)})}else this.callBase.apply(this,arguments)},_checkAndDeleteRow:function(e){this.isBatchEditMode()?this._deleteRowCore(e):this.callBase.apply(this,arguments)},_refreshCore:function(e){var{isPageChanged:t}=e??{},i=this.isBatchEditMode()||t&&this.option("scrolling.mode")!=="virtual";this.isCellOrBatchEditMode()?i&&(this._resetEditColumnName(),this._resetEditRowKey()):this.callBase.apply(this,arguments)},_allowRowAdding:function(e){return this.isBatchEditMode()?!0:this.callBase.apply(this,arguments)},_afterDeleteRow:function(e,t){var i=this._dataController;return this.isBatchEditMode()?(i.updateItems({changeType:"update",rowIndices:[t,e]}),new se().resolve()):this.callBase.apply(this,arguments)},_updateEditRow:function(e,t,i){this.isCellOrBatchEditMode()?this._updateRowImmediately(e,t,i):this.callBase.apply(this,arguments)},_isDefaultButtonVisible:function(e,t){if(this.isCellOrBatchEditMode()){var i=this.isBatchEditMode();switch(e.name){case"save":case"cancel":case"edit":return!1;case"delete":return this.callBase.apply(this,arguments)&&(!i||!t.row.removed);case"undelete":return i&&this.allowDeleting(t)&&t.row.removed;default:return this.callBase.apply(this,arguments)}}return this.callBase.apply(this,arguments)},_isRowDeleteAllowed:function(){var e=this.callBase.apply(this,arguments);return e||this.isBatchEditMode()},_beforeEndSaving:function(e){if(this.isCellEditMode()){var t;((t=e[0])===null||t===void 0?void 0:t.type)!=="update"&&this.callBase.apply(this,arguments)}else this.isBatchEditMode()&&this._resetModifiedClassCells(e),this.callBase.apply(this,arguments)},prepareEditButtons:function(e){var t=this.option("editing")||{},i=this.callBase.apply(this,arguments);return(t.allowUpdating||t.allowAdding||t.allowDeleting)&&this.isBatchEditMode()&&(i.push(this.prepareButtonItem(e,"save","saveEditData",21)),i.push(this.prepareButtonItem(e,"revert","cancelEditData",22))),i},_saveEditDataInner:function(){var e,t=this._dataController.getVisibleRows()[this.getEditRowIndex()],i=this._getEditColumn(),n=i==null?void 0:i.showEditorAlways,r=this.isCellEditMode()&&!(t!=null&&t.isNewRow),a;return r&&n&&(a=new se,this.addDeferred(a)),this.callBase.apply(this,arguments).always((e=a)===null||e===void 0?void 0:e.resolve)},_applyChange:function(e,t,i){var n=this.isCellEditMode()&&e.row&&!e.row.isNewRow,r=e.column.showEditorAlways,a=e.column.setCellValue!==e.column.defaultSetCellValue,o=r&&!i&&n&&this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex);if(o){this._focusEditingCell(),this._updateEditRow(e.row,!0,a);return}return this.callBase.apply(this,arguments)},_applyChangeCore:function(e,t){var i=e.column.showEditorAlways,n=this.isCellEditMode()&&e.row&&!e.row.isNewRow;if(i&&!t){if(n)return this._setEditRowKey(e.row.key,!0),this._setEditColumnNameByIndex(e.columnIndex,!0),this.saveEditData();if(this.isBatchEditMode())return t=this._needUpdateRow(e.column),this.callBase(e,t)}return this.callBase.apply(this,arguments)},_processDataItemCore:function(e,t){var{data:i,type:n}=t;this.isBatchEditMode()&&n===ZJ&&(e.data=va(e.data,i)),this.callBase.apply(this,arguments)},_processRemoveCore:function(e,t,i){if(!(this.isBatchEditMode()&&!i))return this.callBase.apply(this,arguments)},_processRemoveIfError:function(){if(!this.isBatchEditMode())return this.callBase.apply(this,arguments)},_beforeFocusElementInRow:function(e){this.callBase.apply(this,arguments);var t=e>=0?e:0,i=this.getFirstEditableColumnIndex();i>=0&&this.editCell(t,i)}}},views:{rowsView:{_createTable:function(){var e=this.callBase.apply(this,arguments),t=this._editingController;return t.isCellOrBatchEditMode()&&this.option("editing.allowUpdating")&&R.on(e,ye(Ea.name,"dxDataGridRowsView"),"td:not(."+UJ+")",this.createAction(()=>{t.isEditing()&&t.closeEditCell()})),e},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=this._editingController,n=!!e.removed;i.isBatchEditMode()&&n&&t.addClass(YJ)}return t}},headerPanel:{isVisible:function(){var e=this.getController("editing").option("editing");return this.callBase()||e&&(e.allowUpdating||e.allowDeleting)&&e.mode===hm}}}}};Oe.registerModule("editingCellBased",JJ);var e1="invalid",ac="revert-tooltip",QJ="rowsview",eQ="dx-invalid-message",xv="invalid-message",tQ="dx-invalid-message-always",iQ="dx-revert-button",t1="validator",bv="dx-pending-indicator",mE="dx-validation-pending",gE="content",CE="__DX_INSERT_INDEX__",nQ=2,rQ="row",aQ="form",Sv="batch",Ul="cell",oQ="popup",sQ="dx-group-cell",i1=[oQ,aQ],lQ="transparent",hn={valid:"valid",invalid:"invalid",pending:"pending"},Kl="insert",uQ="remove",jl="cancel",ql=function(e){return E(e)&&e!==jl},yE=function(e,t){return e!==void 0||e===void 0&&t&&!t.isNewRow},dQ=Dt.Controller.inherit({init:function(){this._editingController=this.getController("editing"),this.createAction("onRowValidating"),this._validationState||this.initValidationState()},initValidationState(){this._validationState=[],this._validationStateCache={}},_rowIsValidated:function(e){var t=this._getValidationData(e==null?void 0:e.key);return!!t&&!!t.validated},_getValidationData:function(e,t){var i=jn(e),n=$e(i),r;return n?r=this._validationState.filter(a=>Bt(a.key,e))[0]:r=this._validationStateCache[i],!r&&t&&(r={key:e,isValid:!0},this._validationState.push(r),n||(this._validationStateCache[i]=r)),r},_getBrokenRules:function(e,t){var i;return t?i=t.brokenRules||t.brokenRule&&[t.brokenRule]:i=e.brokenRules||[],i},_rowValidating:function(e,t){var i=new se,n=this._editingController.getChangeByKey(e==null?void 0:e.key),r=this._getBrokenRules(e,t),a=t?t.isValid:e.isValid,o={brokenRules:r,isValid:a,key:n.key,newData:n.data,oldData:this._editingController._getOldData(n.key),promise:null,errorText:this.getHiddenValidatorsErrorText(r)};return this.executeAction("onRowValidating",o),De(yi(o.promise)).always(function(){e.isValid=o.isValid,e.errorText=o.errorText,i.resolve(o)}),i.promise()},getHiddenValidatorsErrorText:function(e){var t=[];return V(e,function(i,n){var r=n.column,a=r&&r.groupIndex!==void 0&&!r.showWhenGrouped,o=r&&r.visible;!n.validator.$element().parent().length&&(!o||a)&&t.push(n.message)}),t.join(", ")},validate:function(e){var t=!0,i=this._editingController,n=new se,r=[],a=i.getEditMode();if(e=e||a===rQ,this._isValidationInProgress)return n.resolve(!1).promise();if(this._isValidationInProgress=!0,e){i.addDeferred(n);var o=i.getChanges();V(o,(l,u)=>{var{type:d,key:c}=u;if(d!=="remove"){var h=this._getValidationData(c,!0),f=this.validateGroup(h);r.push(f),f.done(p=>{h.validated=!0,t=t&&p.isValid})}})}else if(this._currentCellValidator){var s=this.validateGroup(this._currentCellValidator._findGroup());r.push(s),s.done(l=>{t=l.isValid})}return De(...r).done(()=>{this._isValidationInProgress=!1,n.resolve(t)}),n.promise()},validateGroup:function(e){var t,i=new se,n=e&&Ct.getGroupConfig(e),r;return n!=null&&n.validators.length&&(this.resetRowValidationResults(e),r=Ct.validateGroup(e)),De(((t=r)===null||t===void 0?void 0:t.complete)||r).done(a=>{De(this._rowValidating(e,a)).done(i.resolve)}),i.promise()},isRowDataModified:e=>!Pn(e.data),updateValidationState:function(e){var t=this._editingController.getEditMode(),i=e.key,n=this._getValidationData(i,!0);if(i1.indexOf(t)===-1){if(e.type===Kl&&!this.isRowDataModified(e)){n.isValid=!0;return}this.setDisableApplyValidationResults(!0);var r=Ct.getGroupConfig(n);if(r){var a=Ct.validateGroup(n);De(a.complete||a).done(o=>{n.isValid=o.isValid,n.brokenRules=o.brokenRules})}else(!n.brokenRules||!n.brokenRules.length)&&(n.isValid=!0);this.setDisableApplyValidationResults(!1)}else n.isValid=!0},setValidator:function(e){this._currentCellValidator=e},renderCellPendingIndicator:function(e){var t=e.find("."+bv);if(!t.length){var i=e;t=v("<div>").appendTo(i).addClass(bv),this._createComponent(t,vn),e.addClass(mE)}},disposeCellPendingIndicator:function(e){var t=e.find("."+bv);if(t.length){var i=vn.getInstance(t);i&&(i.dispose(),i.$element().remove()),e.removeClass(mE)}},validationStatusChanged:function(e){var t=e.validator,i=t.option("validationGroup"),n=t.option("dataGetter")().column;this.updateCellValidationResult({rowKey:i.key,columnIndex:n.index,validationResult:e})},validatorInitialized:function(e){e.component.on("validating",this.validationStatusChanged.bind(this)),e.component.on("validated",this.validationStatusChanged.bind(this))},validatorDisposing:function(e){var t=e.component,i=t.option("validationGroup"),n=t.option("dataGetter")().column,r=this.getCellValidationResult({rowKey:i==null?void 0:i.key,columnIndex:n.index});ql(r)&&r.status===hn.pending&&this.cancelCellValidationResult({change:i,columnIndex:n.index})},applyValidationResult:function(e,t){var i=t.validator,n=i.option("validationGroup"),r=i.option("dataGetter")().column;if(t.brokenRules&&t.brokenRules.forEach(u=>{u.columnIndex=r.index,u.column=r}),e){var a=this.getCellValidationResult({rowKey:n.key,columnIndex:r.index}),o=ql(a)&&a.disabledPendingId===t.id;if(this._disableApplyValidationResults||o)return;if(t.status===hn.invalid){var s=e.find(":focus");ba(s)||(R.trigger(s,"focus"),R.trigger(s,lt.down))}var l=!r.editCellTemplate&&this.getController("editorFactory").getEditorInstance(e);t.status===hn.pending?l?l.option("validationStatus",hn.pending):this.renderCellPendingIndicator(e):l?l.option("validationStatus",hn.valid):this.disposeCellPendingIndicator(e),e.toggleClass(this.addWidgetPrefix(e1),t.status===hn.invalid)}},_syncInternalEditingData:function(e){var t,i=this._editingController,n=i.getChangeByKey(e.key),r=i._getOldData(e.key),a=(t=e.row)===null||t===void 0?void 0:t.oldData;n&&a&&!r&&i._addInternalData({key:e.key,oldData:a})},createValidator:function(e,t){var i=this._editingController,n=e.column,r=n.showEditorAlways;if(!(E(n.command)||!n.validationRules||!Array.isArray(n.validationRules)||!n.validationRules.length)){var a=i.getIndexByKey(e.key,i.getChanges()),o=a>-1;if(!o){if(!r){var s=this.getController("columns"),l=(s==null?void 0:s.getVisibleColumns())||[];r=l.some(function(b){return b.showEditorAlways})}var u=Bt(this.option("editing.editRowKey"),e.key),d=i.isCellOrBatchEditMode()&&i.allowUpdating({row:e.row});if(o=u||d&&r,d&&r){var c,h;i._addInternalData({key:e.key,oldData:(c=(h=e.row)===null||h===void 0?void 0:h.oldData)!==null&&c!==void 0?c:e.data})}}if(o){if(t&&!t.length){Qe.log("E1050");return}this._syncInternalEditingData(e);var f=this._getValidationData(e.key,!0),p=()=>{var b=i.getChangeByKey(f==null?void 0:f.key),A=n.calculateCellValue((b==null?void 0:b.data)||{});return A!==void 0?A:e.value},m=t&&t.hasClass("dx-widget");t&&t.addClass(this.addWidgetPrefix(t1));var g=new pf(t||v("<div>"),{name:n.caption,validationRules:k(!0,[],n.validationRules),validationGroup:f,adapter:m?null:{getValue:p,applyValidationResults:b=>{this.applyValidationResult(t,b)}},dataGetter:function(){var b=f==null?void 0:f.key,A=i.getChangeByKey(b),B=i._getOldData(b);return{data:va(B,A==null?void 0:A.data),column:n}},onInitialized:this.validatorInitialized.bind(this),onDisposing:this.validatorDisposing.bind(this)});if(m){var C=g.option("adapter");C&&(C.getValue=p,C.validationRequestsCallbacks=[],C.bypass=()=>e.row.isNewRow&&!this._isValidationInProgress&&!i.isCellModified(e))}return g}}},setDisableApplyValidationResults:function(e){this._disableApplyValidationResults=e},getDisableApplyValidationResults:function(){return this._disableApplyValidationResults},isCurrentValidatorProcessing:function(e){var{rowKey:t,columnIndex:i}=e;return this._currentCellValidator&&Bt(this._currentCellValidator.option("validationGroup").key,t)&&this._currentCellValidator.option("dataGetter")().column.index===i},validateCell:function(e){var t={rowKey:e.option("validationGroup").key,columnIndex:e.option("dataGetter")().column.index},i=this.getCellValidationResult(t),n=ql(i);n||(i=e.validate());var r=new se,a=e.option("adapter");return n&&i.status===hn.pending&&(this.updateCellValidationResult(t),a.applyValidationResults(i)),De(i.complete||i).done(o=>{n&&a.applyValidationResults(o),r.resolve(o)}),r.promise()},updateCellValidationResult:function(e){var{rowKey:t,columnIndex:i,validationResult:n}=e,r=this._getValidationData(t);if(r){r.validationResults||(r.validationResults={});var a;if(n){if(a=k({},n),r.validationResults[i]=a,n.status===hn.pending&&(this._editingController.getEditMode()===Ul&&(a.deferred=new se,a.complete.always(()=>{a.deferred.resolve()}),this._editingController.addDeferred(a.deferred)),this._disableApplyValidationResults)){a.disabledPendingId=n.id;return}}else a=r.validationResults[i];a&&a.disabledPendingId&&delete a.disabledPendingId}},getCellValidationResult:function(e){var t,{rowKey:i,columnIndex:n}=e,r=this._getValidationData(i,!0);return r==null||(t=r.validationResults)===null||t===void 0?void 0:t[n]},removeCellValidationResult:function(e){var{change:t,columnIndex:i}=e,n=this._getValidationData(t==null?void 0:t.key);n&&n.validationResults&&(this.cancelCellValidationResult({change:t,columnIndex:i}),delete n.validationResults[i])},cancelCellValidationResult:function(e){var{change:t,columnIndex:i}=e,n=this._getValidationData(t.key);if(t&&n.validationResults){var r=n.validationResults[i];r&&(r.deferred&&r.deferred.reject(jl),n.validationResults[i]=jl)}},resetRowValidationResults:function(e){e&&(e.validationResults&&delete e.validationResults,delete e.validated)},isInvalidCell:function(e){var{rowKey:t,columnIndex:i}=e,n=this.getCellValidationResult({rowKey:t,columnIndex:i});return ql(n)&&n.status===hn.invalid},getCellValidator:function(e){var{rowKey:t,columnIndex:i}=e,n=this._getValidationData(t),r=n&&Ct.getGroupConfig(n),a=r&&r.validators;return a&&a.filter(o=>{var s=o.option("dataGetter")().column;return s?s.index===i:!1})[0]},setCellValidationStatus:function(e){var t=this.getCellValidationResult({rowKey:e.key,columnIndex:e.column.index});E(t)?e.validationStatus=t!==jl?t.status:jl:delete e.validationStatus}}),cQ={defaultOptions:function(){return{editing:{texts:{validationCancelChanges:fe.format("dxDataGrid-validationCancelChanges")}}}},controllers:{validating:dQ},extenders:{controllers:{editing:{_addChange:function(e){var t=this.callBase.apply(this,arguments),i=this.getController("validating");return t&&e.type!==uQ&&i.updateValidationState(t),t},_handleChangesChange:function(e){this.callBase.apply(this,arguments);var t=this.getController("validating");e.value.forEach(i=>{t._getValidationData(i.key)===void 0&&t.updateValidationState(i)})},_updateRowAndPageIndices:function(){var e=this,t=e.getView("rowsView").getTopVisibleItemIndex(),i=t;V(e.getChanges(),(n,r)=>{var{key:a,type:o}=r,s=this.getController("validating")._getValidationData(a);s&&!s.isValid&&s.pageIndex!==e._pageIndex&&(s.pageIndex=e._pageIndex,o===Kl?s.rowIndex=t:s.rowIndex=i,i++)})},_getValidationGroupsInForm:function(e){var t=this.getController("validating"),i=t._getValidationData(e.key,!0);return{validationGroup:i}},_validateEditFormAfterUpdate:function(e,t){t&&this._editForm&&this._editForm.validate(),this.callBase.apply(this,arguments)},_prepareEditCell:function(e){var t=this.callBase.apply(this,arguments),i=this.getController("validating");return t&&e.column.showEditorAlways&&i.updateValidationState({key:e.key}),t},processItems:function(e,t){var i=this.getChanges(),n=this.getController("data"),r=this.getController("validating");e=this.callBase(e,t);var a=e.length,o=function(s,l){var u={key:s.key},d=function(h,f){var p=-1,m=h.type===Kl,g=h.key;return V(f,function(C,b){if(Bt(g,m?b.key:n.keyOf(b)))return p=C,!1}),p}(s,e);if(!(d>=0)){l.rowIndex=l.rowIndex>a?l.rowIndex%a:l.rowIndex;var c=l.rowIndex;u[CE]=1,e.splice(c,0,u)}};return this.getEditMode()===Sv&&t!=="prepend"&&t!=="append"&&i.forEach(s=>{var l=s.key,u=r._getValidationData(l);u&&s.type&&u.pageIndex===this._pageIndex&&(s==null?void 0:s.pageIndex)!==this._pageIndex&&o(s,u)}),e},processDataItem:function(e){var t=e.data[CE],i=t?e.data.key:e.key,n=this.getEditMode();if(n===Sv&&t&&i){var r=this.getChanges(),a=be.getIndexByKey(i,r);if(a>=0){var o=r[a];if(o.type!==Kl){var s=this._getOldData(o.key);e.data=k(!0,{},s,o.data),e.key=i}}}this.callBase.apply(this,arguments)},_createInvisibleColumnValidators:function(e){var t=this,i=this.getController("validating"),n=this.getController("columns"),r=n.getColumns(),a=n.getInvisibleColumns().filter(u=>!u.isBand),o=n.getGroupColumns().filter(u=>!u.showWhenGrouped&&a.indexOf(u)===-1),s=[],l=(u,d)=>this._dataController.getRowIndexByKey(d)>=0&&a.indexOf(u)<0;return a.push(...o),i1.indexOf(this.getEditMode())===-1&&V(r,function(u,d){e.forEach(function(c){var h;if(!l(d,c.key)){if(c.type===Kl)h=c.data;else if(c.type==="update"){var f=t._getOldData(c.key);h=va(f,c.data)}if(h){var p=i.createValidator({column:d,key:c.key,value:d.calculateCellValue(h)});p&&s.push(p)}}})}),function(){s.forEach(function(u){u.dispose()})}},_beforeSaveEditData:function(e,t){var i=this.callBase.apply(this,arguments),n=this.getController("validating"),r=n._getValidationData(e==null?void 0:e.key);if(e){var a=e.type==="remove"||r.isValid;i=i||!a}else{var o=this._createInvisibleColumnValidators(this.getChanges());i=new se,this.executeOperation(i,()=>{n.validate(!0).done(s=>{switch(o(),this._updateRowAndPageIndices(),this.getEditMode()){case Ul:s||this._focusEditingCell();break;case Sv:s||(this._resetEditRowKey(),this._resetEditColumnName(),this.getController("data").updateItems())}i.resolve(!s)})})}return i.promise?i.promise():i},_beforeEditCell:function(e,t,i){var n=this.callBase(e,t,i);if(this.getEditMode()===Ul){var r=this._rowsView._getCellElement(e,t),a=r&&r.data("dxValidator"),o=r&&r.closest(".dx-row").data("options"),s=a&&a.option("adapter").getValue();if(a&&yE(s,o)){var l=this.getController("validating"),u=new se;return De(l.validateCell(a),n).done((d,c)=>{u.resolve(d.status===hn.valid&&c)}),u.promise()}else if(!a)return n}},_afterSaveEditData:function(e){var t,i=this.getEditMode()===Ul;if(V(this.getChanges(),(l,u)=>{var d=this._showErrorRow(u);t=t||d}),t){var n=this._rowsView.getScrollable();n&&(n.update(),n.scrollToElement(t))}if(e&&i&&this._needUpdateRow()){var r=this.getEditRowIndex();this._dataController.updateItems({changeType:"update",rowIndices:[r]}),this._focusEditingCell()}else if(!e){var a=!0;if(i){var o=this.getController("columns").getColumns(),s=o.filter(l=>{var u;return l.showEditorAlways&&((u=l.validationRules)===null||u===void 0?void 0:u.length)>0}).length>0;a=!s}a&&this.getController("validating").initValidationState()}},_handleDataChanged:function(e){var t=this.getController("validating")._validationState;this.option("scrolling.mode")==="standard"&&this.resetRowAndPageIndices(),e.changeType==="prepend"&&V(t,function(i,n){n.rowIndex+=e.items.length}),this.callBase(e)},resetRowAndPageIndices:function(){var e=this.getController("validating")._validationState;V(e,(t,i)=>{i.pageIndex!==this._pageIndex&&(delete i.pageIndex,delete i.rowIndex)})},_beforeCancelEditData:function(){this.getController("validating").initValidationState(),this.callBase()},_showErrorRow:function(e){var t,i=this.getController("errorHandling"),n=this.getController("data").items(),r=this.getIndexByKey(e.key,n),a=this.getController("validating")._getValidationData(e.key);if(!(a!=null&&a.isValid)&&a!==null&&a!==void 0&&a.errorText&&r>=0)return t=this.getPopupContent(),i&&i.renderErrorRow(a==null?void 0:a.errorText,r,t)},updateFieldValue:function(e){var t=this.getController("validating"),i=new se;return t.removeCellValidationResult({change:this.getChangeByKey(e.key),columnIndex:e.column.index}),this.callBase.apply(this,arguments).done(()=>{var n=t.getCellValidator({rowKey:e.key,columnIndex:e.column.index});De(n&&t.validateCell(n)).done(r=>{this.getController("editorFactory").refocus(),i.resolve(r)})}),i.promise()},highlightDataCell:function(e,t){this.callBase.apply(this,arguments);var i=this.getController("validating");i.setCellValidationStatus(t);var n=!!t.setValue,r=this.isCellModified(t),a=E(t.validationStatus),o=r&&t.column.setCellValue||n&&!r&&!(t.row.isNewRow||!a);if(o){var s=e.data("dxValidator");s&&De(this.getController("validating").validateCell(s)).done(()=>{i.setCellValidationStatus(t)})}},getChangeByKey:function(e){var t=this.getChanges();return t[be.getIndexByKey(e,t)]},isCellModified:function(e){var t=this.callBase(e),i=this.getChangeByKey(e.key),n=!!e.row&&this.getController("validating").isInvalidCell({rowKey:e.key,columnIndex:e.column.index});return t||this.getController("validating")._rowIsValidated(i)&&n}},editorFactory:{_showRevertButton:function(e){if(!(!e||!e.length)){var t=this._rowsView.element().find("."+this.addWidgetPrefix(ac)),i=e.closest(".".concat(this.addWidgetPrefix(gE)));t&&t.remove(),t=v("<div>").addClass(this.addWidgetPrefix(ac)).appendTo(e);var n={animation:null,visible:!0,width:"auto",height:"auto",shading:!1,container:i,propagateOutsideClick:!0,hideOnOutsideClick:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,contentTemplate:()=>{var r=v("<div>").addClass(iQ),a={icon:"revert",hint:this.option("editing.texts.validationCancelChanges"),onClick:()=>{this._editingController.cancelEditData()}};return new Ii(r,a).$element()},position:{my:"left top",at:"right top",offset:"1 0",collision:"flip",boundaryOffset:"0 0",boundary:this._rowsView.element(),of:e},onPositioned:this._positionedHandler.bind(this)};return new qn(t,n)}},_hideFixedGroupCell:function(e,t){var i,n,r=this._rowsView.isFixedColumns(),a=this._editingController.isFormOrPopupEditMode();if(r&&!a){var o=e.closest(".dx-row").next().data("options");o&&o.rowType==="group"&&(i=v(this._rowsView.getRowElement(o.rowIndex)).last(),n=i.find("."+sQ),n.length&&n.get(0).style.visibility!=="hidden"&&(n.css("visibility","hidden"),t.onDisposing=function(){n.css("visibility","")}))}},_positionedHandler:function(e,t){if(!e.component.__skipPositionProcessing){var i=v(e.element).hasClass(this.addWidgetPrefix(ac)),n=!i&&this._rowsView.updateFreeSpaceRowHeight(),r=this._normalizeValidationMessagePositionAndMaxWidth(e,i,t);e.component.__skipPositionProcessing=!!(n||r),r?e.component.option(r):n&&e.component.repaint()}},_showValidationMessage:function(e,t,i,n){var r=e.find(".dx-dropdowneditor-overlay").data("dxPopup"),a=r&&r.option("visible"),o=a?"top right":"top "+i,s=a?"top left":"bottom "+i,l=e.closest(".".concat(this.addWidgetPrefix(gE))),u="";t&&t.forEach(function(f){u+=(u.length?"<br/>":"")+Km(f)});var d=this.addWidgetPrefix(xv);this._rowsView.element().find("."+d).remove();var c=v("<div>").addClass(eQ).addClass(tQ).addClass(d).html(u).appendTo(e),h={container:l,shading:!1,width:"auto",height:"auto",visible:!0,animation:!1,propagateOutsideClick:!0,hideOnOutsideClick:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,position:{collision:"flip",boundary:this._rowsView.element(),boundaryOffset:"0 0",offset:{x:0,y:!a&&Lt.mozilla?-1:0},my:o,at:s,of:e},onPositioned:f=>{this._positionedHandler(f,a),this._shiftValidationMessageIfNeed(f.component.$content(),n&&n.$content(),e)}};this._hideFixedGroupCell(e,h),new qn(c,h)},_normalizeValidationMessagePositionAndMaxWidth:function(e,t,i){var n=this._columnsController.getFixedColumns();if(!(!n||!n.length)){var r,a=!t&&(o=this,s=e.element,l=v(s).closest("tr").index(),u=v(o._rowsView.getRowElement(l)).first().children().filter(":not(.dx-hidden-cell)"),o._rowsView._getWidths(u).reduce((m,g)=>m+g,0)),o,s,l,u,d=e.component.$content(),c=ot(d,!0),h=!t&&c>a,f=this._rowsView.getCellIndex(v(e.element).closest("td")),p=function(m){var g,C;return m.some((b,A)=>{if(b.command===lQ)return g=A===0?-1:A,C=A===m.length-1?-1:A+b.colspan-1,!0}),{startColumnIndex:g,endColumnIndex:C}}(n);return!t&&(f===p.startColumnIndex||h)?r={collision:"none flip",my:"top left",at:i?"top right":"bottom left"}:f===p.endColumnIndex&&(r={collision:"none flip",my:"top right",at:t||i?"top left":"bottom right"},t&&(r.offset="-1 0")),r&&{position:r,maxWidth:h?a-2:void 0}}},_shiftValidationMessageIfNeed:function(e,t,i){if(t){var n=e.offset(),r=t.offset();if(n.top===r.top&&n.left+He(e)>r.left){var a=He(t)+nQ;e.css("left",r.left<i.offset().left?-a:a)}}},_getTooltipsSelector:function(){var e=this.addWidgetPrefix(xv),t=this.addWidgetPrefix(ac);return".dx-editor-cell ."+t+", .dx-editor-cell ."+e+", .dx-cell-modified ."+e},init:function(){this.callBase(),this._editingController=this.getController("editing"),this._columnsController=this.getController("columns"),this._rowsView=this.getView("rowsView")},loseFocus:function(e){e||this.getController("validating").setValidator(null),this.callBase()},updateCellState:function(e,t,i){var n,r=e==null?void 0:e.closest(this._getFocusCellSelector()),a=r!=null&&r.is("td")?r:null,o=r==null?void 0:r.closest(".dx-row").data("options"),s=o?this.getController("editing").getChangeByKey(o.key):null,l=a&&this.getController("columns").getVisibleColumns()[a.index()],u=(s==null||(n=s.data)===null||n===void 0?void 0:n[l==null?void 0:l.name])!==void 0&&!this._editingController.isSaving(),d;((t==null?void 0:t.status)===hn.invalid||u)&&this._editingController.getEditMode()===Ul&&(d=this._showRevertButton(r));var c=t&&t.status===hn.invalid;if(c&&a&&l&&t&&t.brokenRules){var h=[];t.brokenRules.forEach(function(f){f.message&&h.push(f.message)}),h.length&&this._showValidationMessage(r,h,l.alignment||"left",d)}!i&&this._rowsView.element()&&this._rowsView.updateFreeSpaceRowHeight()},focus:function(e,t){if(!arguments.length)return this.callBase();var i=e&&e.closest("."+this.addWidgetPrefix(QJ)).find(this._getTooltipsSelector());if(i&&i.remove(),e!=null&&e.hasClass("dx-row"))return this.callBase(e,t);var n=e==null?void 0:e.closest(this._getFocusCellSelector()),r=this.callBase,a=n&&(n.data("dxValidator")||e.find("."+this.addWidgetPrefix(t1)).eq(0).data("dxValidator")),o=n&&n.closest(".dx-row").data("options"),s=this.getController("editing"),l=o?s.getChangeByKey(o.key):null,u,d=this.getController("validating");if(a){d.setValidator(a);var c=a.option("adapter").getValue();if(yE(c,o)||d._rowIsValidated(l))return s.waitForDeferredOperations().done(()=>{De(d.validateCell(a)).done(h=>{u=h;var f=u.validator.option("dataGetter")().column;l&&f&&!d.isCurrentValidatorProcessing({rowKey:l.key,columnIndex:f.index})||(u.status===hn.invalid&&(t=!0),this.updateCellState(e,u,t),r.call(this,e,t))})}),this.callBase(e,t)}return this.updateCellState(e,u,t),this.callBase(e,t)},getEditorInstance:function(e){var t=e.find(".dx-texteditor").eq(0);return be.getWidgetInstance(t)}},data:{_isCellChanged:function(e,t,i,n,r){var a,o,s=(a=e.cells)===null||a===void 0?void 0:a[n],l=s&&s.validationStatus,u=this.getController("validating"),d=u.getCellValidationResult({rowKey:e.key,columnIndex:n}),c=u._getValidationData(e.key),h=ql(d)?d.status:d,f=JSON.stringify(t.modifiedValues)!==JSON.stringify(e.modifiedValues),p=v(s==null?void 0:s.cellElement).hasClass(this.addWidgetPrefix(e1)),m=e.isEditing!==t.isEditing,g=s==null||(o=s.column.validationRules)===null||o===void 0?void 0:o.length;return m&&g||l!==h&&f||c.isValid&&p?!0:this.callBase.apply(this,arguments)}}},views:{rowsView:{updateFreeSpaceRowHeight:function(e){var t,i,n,r=this.element(),a=r&&r.find("."+this.addWidgetPrefix(xv)+" .dx-overlay-content");if(this.callBase(e),a&&a.length&&(t=this._getRowElements(),n=this._getFreeSpaceRowElements(e),i=n.first(),i&&t.length===1&&(!i.is(":visible")||nt(a)>nt(i))))return n.show(),gn(n,nt(a)),!0},_formItemPrepared:function(e,t){this.callBase.apply(this,arguments),Vi(()=>{var i=t.find(".dx-widget").first(),n=i.length&&!i.children().length;n||this.getController("validating").createValidator(e,i)})},_cellPrepared:function(e,t){this.getController("editing").isFormOrPopupEditMode()||this.getController("validating").createValidator(t,e),this.callBase.apply(this,arguments)},_restoreErrorRow:function(e){var t=this.getController("editing");t&&t.hasChanges()&&this._getRowElements(e).each((i,n)=>{var r=v(n).data("options");if(r){var a=t.getChangeByKey(r.key);a&&t._showErrorRow(a)}})}}}}};Oe.registerModule("validating",cQ);var Ev="scrolling.legacyMode",n1=e=>e.option("scrolling.loadTwoPagesOnStart")||e._controller.isVirtual()||e._controller.getViewportItemIndex()>0,Vc=e=>e._cache.length?e._cache[0].pageIndex:-1,mm=e=>e._cache.length?e._cache[e._cache.length-1].pageIndex:-1,Eh=(e,t,i)=>{e._isChangedFiring=!0,t(i),e._isChangedFiring=!1},xE=(e,t,i)=>{if(e._isDelayChanged)return e._isDelayChanged=!1,Eh(e,t,i),!0},hQ=e=>{var t=e._dataOptions.pageSize(),i=e.option("scrolling.preventPreload");if(i)return 0;var n=e._controller.viewportSize();if(e._controller.isVirtualMode()&&e.option("scrolling.removeInvisiblePages")){n=0;for(var r=e._controller.viewportSize()*e._controller.viewportItemSize(),a=e._controller.getContentOffset(),o=e._controller.getViewportPosition(),s=e._controller.virtualItemsCount(),l=e._dataOptions.totalItemsCount(),u=s.begin;u<l&&!(a>=o+r);u++){var d=e._controller.getItemSizes()[u]||e._controller.viewportItemSize();a+=d,a>=o&&n++}}return t&&n>0?Math.ceil(n/t):1},Nc=(e,t)=>{var i=e.option("scrolling.preloadEnabled"),n=hQ(e),r=e._controller.isAppendMode();return n&&(t?n=i?1:0:(i&&n++,(r||!n1(e))&&n--)),n},fQ=e=>{var t=-1,i=Vc(e),n=e._dataOptions;if(i<0)t=e._pageIndex;else if(!e._cache[e._pageIndex-i])t=e._pageIndex;else if(i>=0&&e._controller.viewportSize()>=0){if(i>0){var r=mm(e)+1===n.pageCount()&&e._cache.length<Nc(e)+1,a=r||e._pageIndex===i&&Nc(e,!0);a&&(t=i-1)}if(t<0){var o=i+e._cache.length<=e._pageIndex+Nc(e);o&&(t=i+e._cache.length)}}return e._loadingPageIndexes[t]&&(t=-1),t},pQ=(e,t)=>{var i=e._dataOptions;if(t===e.pageIndex()||!i.isLoading()&&t<i.pageCount()||!i.hasKnownLastPage()&&t===i.pageCount())return i.pageIndex(t),e._loadingPageIndexes[t]=!0,De(i.load()).always(()=>{e._loadingPageIndexes[t]=!1})},bE=(e,t,i,n,r)=>{var a=e._dataOptions,o=a.items().slice(),s=$e(i)?i:void 0,l=i==="prepend",u=a.viewportItems();i&&Ve(i)&&!e._isDelayChanged&&(s={changeType:i,items:o},r&&(s.removeCount=r.itemsCount,s.removeCount&&a.correctCount&&(s.removeCount=a.correctCount(u,s.removeCount,l))));var d=r?r.itemsLength:0;d&&a.correctCount&&(d=a.correctCount(u,d,l)),i==="append"?(u.push.apply(u,o),r&&u.splice(0,d)):l?(u.unshift.apply(u,o),r&&u.splice(-d)):e._dataOptions.viewportItems(o),a.updateLoading(),e._lastPageIndex=e.pageIndex(),e._isDelayChanged=n,n||Eh(e,t,s)};class vQ{constructor(t,i){this._controller=t,this._dataOptions=i,this._pageIndex=this._lastPageIndex=i.pageIndex(),this._cache=[],this._loadingPageIndexes={}}option(){return this._controller.option.apply(this._controller,arguments)}viewportItemIndexChanged(t){var i=this._dataOptions.pageSize(),n=this._dataOptions.pageCount(),r=this._controller.isVirtualMode(),a=this._controller.isAppendMode(),o=this._dataOptions.totalItemsCount(),s;if(i&&(r||a)&&o>=0){var l=this._controller.viewportSize();if(l&&t+l>=o&&!this._controller.isVirtual())if(this._dataOptions.hasKnownLastPage()){s=n-1;var u=o%i;s>0&&u>0&&u<l&&s--}else s=n;else{s=Math.floor(t/i);var d=n-1;s=Math.max(s,0),s=Math.min(s,d)}return this.pageIndex(s),this.load()}}pageIndex(t){var i=this._controller.isVirtualMode(),n=this._controller.isAppendMode();return this.option(Ev)!==!1&&(i||n)?(t!==void 0&&(this._pageIndex=t),this._pageIndex):this._dataOptions.pageIndex(t)}beginPageIndex(t){var i=Vc(this);return i<0&&(i=t!==void 0?t:this.pageIndex()),i}endPageIndex(){var t=mm(this);return t>0?t:this._lastPageIndex}pageSize(){return this._dataOptions.pageSize()}load(){var t=this._dataOptions,i,n=this._controller.isVirtualMode(),r=this._controller.isAppendMode();if(this.option(Ev)!==!1&&(n||r)){var a=fQ(this);if(a>=0){var o=pQ(this,a);o&&(i=new se,o.done(()=>{var s=this._delayDeferred;s?s.done(i.resolve).fail(i.reject):i.resolve()}).fail(i.reject),t.updateLoading())}}else i=t.load();return!i&&this._lastPageIndex!==this.pageIndex()&&this._dataOptions.onChanged({changeType:"pageIndex"}),i||new se().resolve()}loadIfNeed(){var t=this._controller.isVirtualMode(),i=this._controller.isAppendMode();if((t||i)&&!this._dataOptions.isLoading()&&(!this._isChangedFiring||this._controller.isVirtual())){var n=this._controller.getViewportPosition();n>0?this._controller._setViewportPositionCore(n):this.load()}}handleDataChanged(t,i){var n=this._dataOptions,r=this._cache.length,a,o,s=this._controller.isVirtualMode(),l=this._controller.isAppendMode();if(i&&i.changes)Eh(this,t,i);else if(this.option(Ev)!==!1&&(s||l)){var u=Vc(this);if(u>=0&&(s&&u+this._cache.length!==n.pageIndex()&&u-1!==n.pageIndex()&&(r=0,this._cache=[]),l)){if(n.pageIndex()===0)this._cache=[];else if(n.pageIndex()<mm(this)){Eh(this,t,{changeType:"append",items:[]});return}}var d={pageIndex:n.pageIndex(),itemsLength:n.items(!0).length,itemsCount:this.itemsCount(!0)};this.option("scrolling.removeInvisiblePages")&&s?o=this._cache.length>Math.max(Nc(this)+(this.option("scrolling.preloadEnabled")?1:0),2):xE(this,t,{isDelayed:!0});var c;u===n.pageIndex()+1?(o&&(c=this._cache.pop()),a="prepend",this._cache.unshift(d)):(o&&(c=this._cache.shift()),a="append",this._cache.push(d));var h=s&&r===0&&n1(this);bE(this,t,this._cache.length>1?a:void 0,h,c),this._delayDeferred=this.load().done(()=>{xE(this,t)&&this.load()})}else bE(this,t,i)}getDelayDeferred(){return this._delayDeferred}itemsCount(t){var i=0,n=this._controller.isVirtualMode();return!t&&n?this._cache.forEach(r=>{i+=r.itemsCount}):i=this._dataOptions.itemsCount(),i}virtualItemsCount(){var t=Vc(this);t<0&&(t=this._dataOptions.pageIndex());var i=t*this._dataOptions.pageSize(),n=this._cache.length*this._dataOptions.pageSize(),r=Math.max(0,this._dataOptions.totalItemsCount()-n-i);return{begin:i,end:r}}reset(){this._loadingPageIndexes={},this._cache=[]}}var _Q="infinite",r1="virtual",oc="scrolling.legacyMode",SE=e=>e.option("scrolling.mode")===r1||e._isVirtual,mQ=e=>e.option("scrolling.mode")===_Q&&!e._isVirtual;function a1(e,t,i){var n,r=[],a=[];i=i||e;function o(u){var d=u.element?u.$element():u,c=xi.offset(d);return c?u.scrollTop()-(c.top-e.offset().top):e.offset().top}var s={on:function(u,d,c){u.on("scroll",c)},off:function(u,d,c){u.off("scroll",c)}};function l(u){var d=u.get(0).nodeName==="#document",c=u.data("dxScrollable"),h=s;if(!(!c&&(c=d&&v(je())||u.css("overflowY")==="auto"&&u,h=R,!c))){var f=function(p){return function(){var m=p.scrollTop()-o(p);m=m>0?m:0,t(m)}}(c);h.on(c,"scroll",f),r.push(function(p){var m=o(c),g=c.scrollTo?"scrollTo":"scrollTop";p-m>=0&&c[g](p+m)}),a.push(function(){h.off(c,"scroll",f)})}}for(n=i.parent();n.length;n=n.parent())l(n);return{scrollTo:function(u){V(r,function(d,c){c(u)})},dispose:function(){V(a,function(u,d){d()})}}}var o1=it.inherit(function(){var e={ctor:function(t,i,n){this._dataOptions=i,this.component=t,this._viewportSize=t.option(oc)===!1?15:0,this._viewportItemSize=20,this._viewportItemIndex=0,this._position=0,this._isScrollingBack=!1,this._contentSize=0,this._itemSizes={},this._sizeRatio=1,this._isVirtual=n,this.positionChanged=dt(),this._dataLoader=new vQ(this,this._dataOptions)},getItemSizes:function(){return this._itemSizes},option:function(){return this.component.option.apply(this.component,arguments)},isVirtual:function(){return this._isVirtual},virtualItemsCount:function(){if(SE(this)){var t=this._dataOptions,i=t.totalItemsCount();if(this.option(oc)===!1&&i!==-1){var n=this.getViewportParams(),r=t.loadedOffset(),a=t.loadedItemCount(),o=Math.max(n.skip,r),s=Math.min(n.take,a),l=Math.max(i-(o+s),0);return{begin:o,end:l}}return this._dataLoader.virtualItemsCount.apply(this._dataLoader,arguments)}},getScrollingTimeout:function(){var t=this.option("scrolling.renderAsync"),i=0;if(!E(t))i=Math.min(this.option("scrolling.timeout")||0,this._dataOptions.changingDuration()),i<this.option("scrolling.renderingThreshold")&&(i=this.option("scrolling.minTimeout")||0);else if(t){var n;i=(n=this.option("scrolling.timeout"))!==null&&n!==void 0?n:0}return i},setViewportPosition:function(t){var i=new se,n=this.getScrollingTimeout();return clearTimeout(this._scrollTimeoutID),n>0?this._scrollTimeoutID=setTimeout(()=>{this._setViewportPositionCore(t),i.resolve()},n):(this._setViewportPositionCore(t),i.resolve()),i.promise()},getViewportPosition:function(){return this._position},getItemIndexByPosition:function(t){var i;t=(i=t)!==null&&i!==void 0?i:this._position;for(var n=this.getItemSize(),r=0,a=0,o=Object.keys(this._itemSizes).concat(-1),s=0;s<o.length&&r<t;s++){var l=parseInt(o[s]),u=(t-r)/n;if(l<0||a+u<l){a+=u;break}else u=l-a,r+=u*n,a+=u;var d=this._itemSizes[l];r+=d,a+=r<t?1:(t-r+d)/d}return Math.round(50*a)/50},isScrollingBack:function(){return this._isScrollingBack},_setViewportPositionCore:function(t){var i=this._position||0;this._position=t,i!==this._position&&(this._isScrollingBack=this._position<i);var n=this.getItemIndexByPosition(),r=this.setViewportItemIndex(n);return this.positionChanged.fire(),r},setContentItemSizes:function(t){var i=this.virtualItemsCount();if(this._contentSize=t.reduce((a,o)=>a+o,0),i){t.forEach((a,o)=>{this._itemSizes[i.begin+o]=a});var n=(i.begin+i.end+this.itemsCount())*this._viewportItemSize,r=be.getContentHeightLimit(Lt);n>r?this._sizeRatio=r/n:this._sizeRatio=1}},getItemSize:function(){return this._viewportItemSize*this._sizeRatio},getItemOffset:function(t,i){var n=this.virtualItemsCount(),r=t;if(!n)return 0;var a=0,o=this._dataOptions.totalItemsCount();return Object.keys(this._itemSizes).forEach(s=>{r&&(i?s>=o-t:s<t)&&(a+=this._itemSizes[s],r--)}),Math.floor(a+r*this._viewportItemSize*this._sizeRatio)},getContentOffset:function(t){var i=t==="end",n=this.virtualItemsCount();return n?this.getItemOffset(i?n.end:n.begin,i):0},getVirtualContentSize:function(){var t=this.virtualItemsCount();return t?this.getContentOffset("begin")+this.getContentOffset("end")+this._contentSize:0},getViewportItemIndex:function(){return this._viewportItemIndex},setViewportItemIndex:function(t){if(this._viewportItemIndex=t,this.option(oc)!==!1)return this._dataLoader.viewportItemIndexChanged.apply(this._dataLoader,arguments)},viewportItemSize:function(t){return t!==void 0&&(this._viewportItemSize=t),this._viewportItemSize},viewportSize:function(t){return t!==void 0&&(this._viewportSize=t),this._viewportSize},viewportHeight:function(t){var i=this.getItemIndexByPosition(),n=this.getItemIndexByPosition(this._position+t);this.viewportSize(Math.ceil(n-i)),this._viewportItemIndex!==i&&this._setViewportPositionCore(this._position)},reset:function(t){this._dataLoader.reset(),t||(this._itemSizes={})},subscribeToWindowScrollEvents:function(t){this._windowScroll=this._windowScroll||a1(t,i=>{this.viewportItemSize()&&this.setViewportPosition(i)})},dispose:function(){clearTimeout(this._scrollTimeoutID),this._windowScroll&&this._windowScroll.dispose(),this._windowScroll=null},scrollTo:function(t){this._windowScroll&&this._windowScroll.scrollTo(t)},isVirtualMode:function(){return SE(this)},isAppendMode:function(){return mQ(this)},getViewportParams:function(){var t,i=this.option("scrolling.mode")===r1,n=this._dataOptions.totalItemsCount(),r=this._dataOptions.hasKnownLastPage(),a=r&&this._viewportItemIndex>n?n:this._viewportItemIndex,o=this._viewportSize+a,s=this.option("scrolling.prerenderedRowChunkSize")||1,l=this.isScrollingBack(),u=(t=this.option("scrolling.prerenderedRowCount"))!==null&&t!==void 0?t:1,d=l?u:0,c=l?0:u,h=Math.floor(Math.max(0,a-d)/s)*s,f=Math.ceil((o+c-h)/s)*s;if(i){var p=Math.max(0,n-h);f=Math.min(f,p)}return{skip:h,take:f}},itemsCount:function(){var t=0;return this.option(oc)?t=this._dataLoader.itemsCount.apply(this._dataLoader,arguments):t=this._dataOptions.itemsCount(),t}};return["pageIndex","beginPageIndex","endPageIndex","pageSize","load","loadIfNeed","handleDataChanged","getDelayDeferred"].forEach(function(t){e[t]=function(){return this._dataLoader[t].apply(this._dataLoader,arguments)}}),e}()),EE="bottom-load-panel",gQ="table-content",CQ="group-space",yQ="content",wE="dx-freespace-row",xQ="dx-column-lines",sc="dx-virtual-row",bQ="dx-row-inserted",SQ="infinite",EQ="virtual",s1=300,at="scrolling.legacyMode",wv="paging.pageIndex",an=function(e){return e.option("scrolling.mode")===EQ},hr=function(e){return e.option("scrolling.mode")===SQ},er=function(e){return an(e)||hr(e)},IE=function(e,t,i,n){for(var r=0;r<t+1;r++){var a=e[i?e.length-1-r:r];a&&!n(a,r===t,i)&&t++}return t},$c=function(e,t){return e.rowType==="data"&&!e.isNewRow||e.rowType==="group"&&t.isGroupItemCountable(e.data)},wQ=function(e){return e.forEach(function(t,i){t.rowIndex=i}),e},IQ=function(){var e=function(i){var n=i._virtualScrollController.beginPageIndex(-1);an(i)&&(n<0||i.viewportSize()>=0&&i.getViewportItemIndex()>=0&&(n*i.pageSize()>i.getViewportItemIndex()||n*i.pageSize()+i.itemsCount()<i.getViewportItemIndex()+i.viewportSize())&&i._dataSource.isLoading()?i._isLoading||(i._isLoading=!0,i.loadingChanged.fire(!0)):i._isLoading&&(i._isLoading=!1,i.loadingChanged.fire(!1)))},t={init:function(){this.callBase.apply(this,arguments),this._items=[],this._totalCount=-1,this._isLoaded=!0,this._loadPageCount=1,this._virtualScrollController=new o1(this.component,this._getVirtualScrollDataOptions())},_getVirtualScrollDataOptions:function(){var i=this;return{pageSize:function(){return i.pageSize()},totalItemsCount:function(){return i.totalItemsCount()},hasKnownLastPage:function(){return i.hasKnownLastPage()},pageIndex:function(n){return i._dataSource.pageIndex(n)},isLoading:function(){return i._dataSource.isLoading()&&!i.isCustomLoading()},pageCount:function(){return i.pageCount()},load:function(){return i._dataSource.load()},updateLoading:function(){e(i)},itemsCount:function(){return i.itemsCount(!0)},items:function(){return i._dataSource.items()},viewportItems:function(n){return n&&(i._items=n),i._items},onChanged:function(n){i.changed.fire(n)},changingDuration:function(n){return i.isLoading()?s1:i._renderTime||0}}},_handleLoadingChanged:function(i){if(this.option(at)===!1){this.callBase.apply(this,arguments);return}(!an(this)||this._isLoadingAll)&&(this._isLoading=i,this.callBase.apply(this,arguments)),i?this._startLoadTime=new Date:this._startLoadTime=void 0},_handleLoadError:function(){this.option(at)!==!1&&(this._isLoading=!1,this.loadingChanged.fire(!1)),this.callBase.apply(this,arguments)},_handleDataChanged:function(i){if(this.option(at)===!1){this._items=this._dataSource.items().slice(),this._totalCount=this._dataSourceTotalCount(!0),this.callBase.apply(this,arguments);return}var n=this.callBase.bind(this);this._virtualScrollController.handleDataChanged(n,i)},_customizeRemoteOperations:function(i,n){var r=this.option(at)===!1,a=this.option("scrolling.renderAsync");E(a)||(a=this._renderTime>=this.option("scrolling.renderingThreshold")),(an(this)||hr(this)&&r)&&!n.reload&&(n.skip||r)&&!a&&(i.delay=void 0),this.callBase.apply(this,arguments)},items:function(){return this._items},_dataSourceTotalCount:function(i){return this.option(at)===!1&&an(this)&&!i?this._totalCount:this.callBase()},itemsCount:function(i){return i||this.option(at)===!1?this.callBase():this._virtualScrollController.itemsCount()},load:function(i){return this.option(at)===!1||i?this.callBase(i):this._virtualScrollController.load()},isLoading:function(){return this.option(at)===!1?this._dataSource.isLoading():this._isLoading},isLoaded:function(){return this._dataSource.isLoaded()&&this._isLoaded},resetPagesCache:function(i){i||this._virtualScrollController.reset(!0),this.callBase.apply(this,arguments)},_changeRowExpandCore:function(){var i=this.callBase.apply(this,arguments);return this.option(at)===!1||(this.resetPagesCache(),e(this)),i},reload:function(){this._dataSource.pageIndex(this.pageIndex());var i=this._virtualScrollController;if(this.option(at)!==!1&&i){var n=new se;return this.callBase.apply(this,arguments).done(function(r){var a=i.getDelayDeferred();a?a.done(n.resolve).fail(n.reject):n.resolve(r)}).fail(n.reject),n}else return this.callBase.apply(this,arguments)},refresh:function(i,n){if(this.option(at)!==!1){var r=i.storeLoadOptions,a=this._dataSource;n.reload?(this._virtualScrollController.reset(),a.items().length=0,this._isLoaded=!1,e(this),this._isLoaded=!0,hr(this)?(this.pageIndex(0),a.pageIndex(0),r.pageIndex=0,i.pageIndex=0,r.skip=0):(a.pageIndex(this.pageIndex()),a.paginate()&&(i.pageIndex=this.pageIndex(),r.skip=this.pageIndex()*this.pageSize()))):hr(this)&&r.skip&&this._totalCountCorrection<0&&(r.skip+=this._totalCountCorrection)}return this.callBase.apply(this,arguments)},dispose:function(){this._virtualScrollController.dispose(),this.callBase.apply(this,arguments)},loadPageCount:function(i){if(!E(i))return this._loadPageCount;this._loadPageCount=i},_handleDataLoading:function(i){var n=this.loadPageCount(),r=this.pageSize(),a=this.option(at)===!1,o=i.storeLoadOptions,s=E(o.take);i.loadPageCount=n,!i.isCustomLoading&&a&&s&&n>1&&r>0&&(o.take=n*r),this.callBase.apply(this,arguments)},_loadPageSize:function(){return this.callBase.apply(this,arguments)*this.loadPageCount()}};return["beginPageIndex","endPageIndex","pageIndex"].forEach(function(i){t[i]=function(){if(this.option(at)===!1){var n=this._dataSource;return n.pageIndex.apply(n,arguments)}var r=this._virtualScrollController;return r[i].apply(r,arguments)}}),["virtualItemsCount","getContentOffset","getVirtualContentSize","setContentItemSizes","setViewportPosition","getViewportItemIndex","setViewportItemIndex","getItemIndexByPosition","viewportSize","viewportItemSize","getItemSize","getItemSizes","loadIfNeed"].forEach(function(i){t[i]=function(){var n=this._virtualScrollController;return n[i].apply(n,arguments)}}),t}(),TQ=function(){var e=function(t,i){var n=t.toArray().map(o=>v(o).parent("."+i).get(0)).filter(o=>o);n.length&&(t=v(n));for(var r=i===wE?t.length-1:t.length,a=0;a<r;a++)t.eq(a).remove()};return{init:function(){var t,i=this.getController("data");this.callBase(),i.pageChanged.add(n=>{var r=this._scrollTop;this.scrollToPage(n??i.pageIndex()),this.option(at)===!1&&this._scrollTop===r&&i.updateViewport()}),i.dataSourceChanged.add(()=>{!this._scrollTop&&this._scrollToCurrentPageOnResize()}),(t=i.stateLoaded)===null||t===void 0||t.add(()=>{this._scrollToCurrentPageOnResize()}),this._scrollToCurrentPageOnResize()},_scrollToCurrentPageOnResize:function(){var t=this.getController("data");if(t.pageIndex()>0){var i=()=>{this.resizeCompleted.remove(i),this.scrollToPage(t.pageIndex())};this.resizeCompleted.add(i)}},scrollToPage:function(t){var i=this._dataController,n=i?i.pageSize():0,r;if(an(this)||hr(this)){var a=i.getItemSize(),o=i.getItemSizes(),s=t*n;r=s*a;for(var l in o)l<s&&(r+=o[l]-a)}else r=0;this.scrollTo({y:r,x:this._scrollLeft})},renderDelayedTemplates:function(t){this._updateContentPosition(!0),this.callBase.apply(this,arguments)},_renderCore:function(t){var i=new Date;this.callBase.apply(this,arguments);var n=this._dataController._dataSource;if(n&&t){var r=t.items?t.items.length:20,a=this._dataController.viewportSize()||20;be.isVirtualRowRendering(this)&&r>0&&this.option(at)!==!1?n._renderTime=(new Date-i)*a/r:n._renderTime=new Date-i}},_getRowElements:function(t){var i=this.callBase(t);return i&&i.not("."+sc)},_removeRowsElements:function(t,i,n){var r=this._getRowElements(t).toArray();n==="append"?r=r.slice(0,i):r=r.slice(-i);var a=this.getController("errorHandling");r.map(o=>{var s=v(o);a&&a.removeErrorRow(s.next()),s.remove()})},_updateContent:function(t,i){var n,r=this._findContentElement(),a=i&&i.changeType,o=r.children().first();if(a==="append"||a==="prepend"){var s=this._getBodies(t);s.length===1?this._getBodies(o)[a==="append"?"append":"prepend"](s.children()):s[a==="append"?"appendTo":"prependTo"](o),t.remove(),n=this._getFreeSpaceRowElements(o),e(n,wE),i.removeCount&&this._removeRowsElements(o,i.removeCount,a),this._restoreErrorRow(o)}else this.callBase.apply(this,arguments),a==="update"&&this._restoreErrorRow(o);this._updateBottomLoading()},_addVirtualRow:function(t,i,n,r){if(r){var a=this._createEmptyRow(sc,i,r);a=this._wrapRowIfNeed(t,a),this._appendEmptyRow(t,a,n)}},_getRowHeights:function(){var t,i,n=(t=this.getController("editing"))===null||t===void 0||(i=t.isPopupEditMode)===null||i===void 0?void 0:i.call(t),r=this._getRowElements(this._tableElement).toArray();return n&&(r=r.filter(a=>!v(a).hasClass(bQ))),r.map(a=>Ut(a).height)},_correctRowHeights:function(t){for(var i=this._dataController,n=i._dataSource,r=[],a=i.getVisibleRows(),o=0,s=!0,l=-1,u=0;u<t.length;u++){var d=a[u];E(d)&&(this.option(at)===!1?(l>=0&&l!==d.loadIndex&&(r.push(o),o=0),l=d.loadIndex):$c(d,n)&&(s?s=!1:(r.push(o),o=0)),o+=t[u])}return o>0&&r.push(o),r},_updateContentPosition:function(t){var i=this._dataController,n=this._rowHeight||20;if(i.viewportItemSize(n),an(this)||be.isVirtualRowRendering(this)){if(!t){var r=this._getRowHeights(),a=this._correctRowHeights(r);i.setContentItemSizes(a)}var o=i.getContentOffset("begin"),s=i.getContentOffset("end"),l=this.getTableElements(),u=l.children("tbody").children("."+sc);e(u,sc),l.each((d,c)=>{var h=d>0,f=this._isFixedTableRendering;this._isFixedTableRendering=h,this._addVirtualRow(v(c),h,"top",o),this._addVirtualRow(v(c),h,"bottom",s),this._isFixedTableRendering=f})}},_isTableLinesDisplaysCorrect:function(t){var i=t.find("."+xQ).length>0;return i===this.option("showColumnLines")},_isColumnElementsEqual:function(t,i){var n=t.length===i.length;return n&&V(t,function(r,a){if(a.style.width!==i[r].style.width)return n=!1,n}),n},_getCellClasses:function(t){var i=[],n=t.cssClass,r=t.command==="expand";return n&&i.push(n),r&&i.push(this.addWidgetPrefix(CQ)),i},_findBottomLoadPanel:function(t){var i=t||this.element(),n=i&&i.find("."+this.addWidgetPrefix(EE));if(n&&n.length)return n},_updateBottomLoading:function(){var t=an(this),i=hr(this),n=!this._dataController.hasKnownLastPage()&&this._dataController.isLoaded()&&(t||i),r=this._findContentElement(),a=this._findBottomLoadPanel(r);n?a||v("<div>").addClass(this.addWidgetPrefix(EE)).append(this._createComponent(v("<div>"),vn).$element()).appendTo(r):a&&a.remove()},_handleScroll:function(t){var i=this.option(at)===!0,n=t.scrollOffset.top===0;(this._hasHeight||!i&&n)&&this._rowHeight&&(this._scrollTop=t.scrollOffset.top,this._dataController.setViewportPosition(t.scrollOffset.top)),this.callBase.apply(this,arguments)},_needUpdateRowHeight:function(t){return this.callBase.apply(this,arguments)||t>0&&hr(this)&&!be.isVirtualRowRendering(this)},_updateRowHeight:function(){if(this.callBase.apply(this,arguments),this._rowHeight){this._updateContentPosition();var t=this._hasHeight?nt(this.element()):nt(je()),i=this._dataController;this.option(at)===!1?(i.viewportHeight(t),i.updateViewport()):i.viewportSize(Math.ceil(t/this._rowHeight))}},updateFreeSpaceRowHeight:function(){var t=this.callBase.apply(this,arguments);return t&&this._updateContentPosition(),t},setLoading:function(t,i){var n=this._dataController,r=n.pageIndex()>0&&n.isLoaded()&&!!this._findBottomLoadPanel();this.option(at)===!1&&t&&n.isViewportChanging()||(r&&(t=!1),this.callBase.call(this,t,i))},_resizeCore:function(){var t=this,i=t.element();t.callBase(),t.component.$element()&&!t._windowScroll&&i.closest(je().document).length&&(t._windowScroll=a1(i,function(n){!t._hasHeight&&t._rowHeight&&t._dataController.setViewportPosition(n)},t.component.$element()),t.on("disposing",function(){t._windowScroll.dispose()})),this.option(at)!==!1&&t.loadIfNeed()},loadIfNeed:function(){var t,i=this._dataController;i==null||(t=i.loadIfNeed)===null||t===void 0||t.call(i)},setColumnWidths:function(t){var i=this.getScrollable(),n;this.callBase.apply(this,arguments),this.option("scrolling.mode")==="virtual"&&(n=i?v(i.content()):this.element(),this.callBase(t,n.children("."+this.addWidgetPrefix(yQ)).children(":not(."+this.addWidgetPrefix(gQ)+")")))},_restoreErrorRow:function(){if(this.option(at)===!1){var t=this.getController("errorHandling");t==null||t.removeErrorRow()}this.callBase.apply(this,arguments)},dispose:function(){clearTimeout(this._scrollTimeoutID),this.callBase()}}}(),l1={defaultOptions:function(){return{scrolling:{timeout:300,updateTimeout:300,minTimeout:0,renderingThreshold:100,removeInvisiblePages:!0,rowPageSize:5,prerenderedRowChunkSize:1,mode:"standard",preloadEnabled:!1,rowRenderingMode:"standard",loadTwoPagesOnStart:!1,legacyMode:!1,prerenderedRowCount:1}}},extenders:{dataSourceAdapter:IQ,controllers:{data:function(){var e={_refreshDataSource:function(){var t=this.callBase.apply(this,arguments)||new se().resolve().promise();return t.done(this.initVirtualRows.bind(this)),t},_loadDataSource:function(){if(this._rowsScrollController&&er(this)){var t,i,{loadPageCount:n}=(t=this.getLoadPageParams())!==null&&t!==void 0?t:{};n>=1&&((i=this._dataSource)===null||i===void 0||i.loadPageCount(n))}return this.callBase.apply(this,arguments)},getRowPageSize:function(){var t=this.option("scrolling.rowPageSize"),i=this.pageSize();return i&&i<t?i:t},reload:function(){var t=this._rowsScrollController||this._dataSource,i=t&&t.getItemIndexByPosition(),n=this.callBase.apply(this,arguments);return n&&n.done(()=>{if(an(this)||be.isVirtualRowRendering(this)){var r=this.getRowIndexOffset(),a=Math.floor(i)-r,o=this.component,s=o.getScrollable&&o.getScrollable(),l=this.dataSource().operationTypes().sorting;if(s&&!l&&a>=0){var u=o.getRowElement(a),d=u&&u[0]&&v(u[0]),c=d&&d.position().top,h=Lt.chrome&&Lt.version>=91,f=Lt.mozilla||h?1:0;c>f&&(c=Math.round(c+nt(d)*(i%1)),s.scrollTo({y:c}))}}})},initVirtualRows:function(){var t=be.isVirtualRowRendering(this);if(this._allItems=null,this._loadViewportParams=null,this.option("scrolling.mode")!=="virtual"&&t!==!0||t===!1||this.option(at)!==!1&&!this.option("scrolling.rowPageSize")){this._visibleItems=null,this._rowsScrollController=null;return}var i=!an(this)&&this.pageIndex()>=this.pageCount()?this.pageCount()-1:this.pageIndex();this._rowPageIndex=Math.ceil(i*this.pageSize()/this.getRowPageSize()),this._visibleItems=this.option(at)===!1?null:[],this._viewportChanging=!1,this._needUpdateViewportAfterLoading=!1,this._rowsScrollController||(this._rowsScrollController=new o1(this.component,this._getRowsScrollDataOptions(),!0),this._rowsScrollController.positionChanged.add(()=>{var n;if(this.option(at)===!1){this._viewportChanging=!0,this.loadViewport(),this._viewportChanging=!1;return}(n=this._dataSource)===null||n===void 0||n.setViewportItemIndex(this._rowsScrollController.getViewportItemIndex())})),this.option(at)===!1&&this._updateLoadViewportParams(),this.isLoaded()&&this.option(at)!==!1&&this._rowsScrollController.load()},isViewportChanging:function(){return this._viewportChanging},_getRowsScrollDataOptions:function(){var t=this,i=function(n){return $c(n,t._dataSource)};return{pageSize:function(){return t.getRowPageSize()},loadedOffset:function(){var n;return an(t)&&((n=t._dataSource)===null||n===void 0?void 0:n.lastLoadOptions().skip)||0},loadedItemCount:function(){return t._itemCount},totalItemsCount:function(){return er(t)?t.totalItemsCount():t.option(at)===!1?t._itemCount:t._items.filter(i).length},hasKnownLastPage:function(){return t.option(at)===!1?t.hasKnownLastPage():!0},pageIndex:function(n){return n!==void 0&&(t._rowPageIndex=n),t._rowPageIndex},isLoading:function(){return t.isLoading()},pageCount:function(){var n=Math.ceil(this.totalItemsCount()/this.pageSize());return n||1},load:function(){t._rowsScrollController.pageIndex()>=this.pageCount()&&(t._rowPageIndex=this.pageCount()-1,t._rowsScrollController.pageIndex(t._rowPageIndex)),!(!this.items().length&&this.totalItemsCount())&&t._rowsScrollController.handleDataChanged(n=>{n=n||{},n.changeType=n.changeType||"refresh",n.items=n.items||t._visibleItems,t._visibleItems.forEach((r,a)=>{r.rowIndex=a}),t._fireChanged(n)})},updateLoading:function(){},itemsCount:function(){return this.items(!0).length},correctCount:function(n,r,a){return IE(n,r,a,(o,s,l)=>o.isNewRow?s&&!l:s&&l?!o.isNewRow:i(o))},items:function(n){var r=t._items;if(t.option(at)){var a=t.dataSource(),o=a==null?void 0:a.virtualItemsCount(),s=o?o.begin:0,l=t.getRowPageSize(),u=t._rowPageIndex*l-s,d=l;if(u<0)return[];u&&(u=this.correctCount(r,u),r=r.slice(u)),d&&(d=this.correctCount(r,d),r=r.slice(0,d))}return n?r.filter(i):r},viewportItems:function(n){return n&&t.option(at)!==!1&&(t._visibleItems=n),t._visibleItems},onChanged:function(){},changingDuration:function(n){var r=t.dataSource();return r!=null&&r.isLoading()&&t.option(at)!==!1?s1:(r==null?void 0:r._renderTime)||0}}},_updateItemsCore:function(t){var i=this.getRowIndexDelta();if(this.callBase.apply(this,arguments),this.option(at)===!1&&be.isVirtualRowRendering(this)){t.changeType==="update"&&t.rowIndices.length===0&&t.cancelEmptyChanges&&(t.cancel=!0);return}var n=this._rowsScrollController;if(n){var r=this._visibleItems,a=t.changeType==="refresh"||t.isLiveUpdate;if(t.changeType==="append"&&t.items&&!t.items.length)return;a||t.changeType==="append"||t.changeType==="prepend"?(t.cancel=!0,a&&n.reset(!0),n.load()):(t.changeType==="update"?t.rowIndices.forEach((o,s)=>{var l=t.changeTypes[s],u=t.items[s];l==="update"?r[o]=u:l==="insert"?r.splice(o,0,u):l==="remove"&&r.splice(o,1)}):(r.forEach((o,s)=>{r[s]=this._items[s+i]||r[s]}),t.items=r),wQ(r))}},_updateLoadViewportParams:function(){var t=this._rowsScrollController.getViewportParams(),i=this.pageSize();if(t&&!er(this)&&i>0){var n=this.pageIndex()*i;t.skip+=n}this._loadViewportParams=t},_processItems:function(t){var i=this.callBase.apply(this,arguments);if(this.option(at)===!1){var n,r=this._dataSource,a=(n=r==null?void 0:r.lastLoadOptions().skip)!==null&&n!==void 0?n:0,o,s,l,u=!1;i.forEach(d=>{var c=d.rowType,h=$c(d,r),f=c==="group"&&(o||h||s!=="group"&&a>0),p=c==="data"&&h&&(o||s!=="group");if(!d.isNewRow&&E(o)){var m=l&&!u;(f||p)&&!m&&a++}(f||p)&&(u=!0),d.loadIndex=a,o=h,s=c,l=d.isNewRow})}return i},_afterProcessItems:function(t){if(this._itemCount=t.filter(o=>$c(o,this._dataSource)).length,E(this._loadViewportParams)){this._updateLoadViewportParams();var i=t;if(this._allItems=t,t.length){var{skipForCurrentPage:n}=this.getLoadPageParams(!0),r=t[0].loadIndex+n,a=this._loadViewportParams.take;i=t.filter(o=>{var s=o.isNewRow&&o.loadIndex>=r-1,l=o.isNewRow&&o.loadIndex===r&&a===0,u=o.loadIndex>=r||s,d=o.loadIndex<r+a||l;return u&&d})}return i}return this.callBase.apply(this,arguments)},_applyChange:function(t){var i=this,n=t.items,r=t.changeType,a=t.removeCount;if(a){var o=r==="prepend";a=IE(i._items,a,o,function(s,l){return s.rowType==="data"&&!s.isNewRow||s.rowType==="group"&&(i._dataSource.isGroupItemCountable(s.data)||l)}),t.removeCount=a}switch(r){case"prepend":i._items.unshift.apply(i._items,n),a&&i._items.splice(-a);break;case"append":i._items.push.apply(i._items,n),a&&i._items.splice(0,a);break;default:i.callBase(t)}},items:function(t){return t?this._allItems||this._items:this._visibleItems||this._items},getRowIndexDelta:function(){var t=0;if(this.option(at)){var i=this._visibleItems;i&&i[0]&&(t=this._items.indexOf(i[0]))}return t<0?0:t},getRowIndexOffset:function(t){var i=0,n=this.dataSource(),r=this._rowsScrollController,a=this.option(at)===!1,o=er(this);if(r&&!t)if(a&&E(this._loadViewportParams)){var{skipForCurrentPage:s,pageIndex:l}=this.getLoadPageParams(!0),u=this.items(!0);if(i=o?l*this.pageSize():0,u.length){var d=u[0].loadIndex;i+=u.filter(h=>h.loadIndex<d+s).length}}else i=r.beginPageIndex()*r.pageSize();else if(o&&a&&n){var c;i=(c=n.lastLoadOptions().skip)!==null&&c!==void 0?c:0}else an(this)&&n&&(i=n.beginPageIndex()*n.pageSize());return i},viewportSize:function(){var t=this._rowsScrollController,i=this._dataSource,n=t==null?void 0:t.viewportSize.apply(t,arguments);return this.option(at)===!1?n:i==null?void 0:i.viewportSize.apply(i,arguments)},viewportHeight:function(t){var i;(i=this._rowsScrollController)===null||i===void 0||i.viewportHeight(t)},viewportItemSize:function(){var t=this._rowsScrollController,i=this._dataSource,n=t==null?void 0:t.viewportItemSize.apply(t,arguments);return this.option(at)===!1?n:i==null?void 0:i.viewportItemSize.apply(i,arguments)},setViewportPosition:function(){var t=this._rowsScrollController,i=this._dataSource;this._isPaging=!1,t?t.setViewportPosition.apply(t,arguments):i==null||i.setViewportPosition.apply(i,arguments)},setContentItemSizes:function(t){var i=this._rowsScrollController,n=this._dataSource,r=i==null?void 0:i.setContentItemSizes(t);return this.option(at)===!1?r:n==null?void 0:n.setContentItemSizes(t)},getPreloadedRowCount:function(){var t=this.option("scrolling.preloadedRowCount"),i=this.option("scrolling.preloadEnabled");if(E(t))return t;var n=this.viewportSize();return i?2*n:n},getLoadPageParams:function(t){var i,n,r=this.pageSize(),a=this._loadViewportParams,o=(i=this._dataSource)===null||i===void 0?void 0:i.lastLoadOptions(),s=(o==null?void 0:o.pageIndex)||0,l=(o==null?void 0:o.take)||0,u=this._rowsScrollController.isScrollingBack(),d=u?this.getPreloadedRowCount():0,c=u?0:this.getPreloadedRowCount(),h=((n=this._dataSource)===null||n===void 0?void 0:n.totalCountCorrection())||0,f=Math.max(0,a.skip-d),p=t?s:Math.floor(r?f/r:0),m=p*r,g=a.skip-m,C=a.take+g+c-h,b=t?l:C,A=Math.ceil(r?b/r:0);return{pageIndex:p,loadPageCount:Math.max(1,A),skipForCurrentPage:Math.max(0,g)}},_updateVisiblePageIndex:function(t){if(this._rowsScrollController){if(E(t)){this._silentOption(wv,t),this.pageChanged.fire();return}var i=this._rowsScrollController.getViewportItemIndex(),n=Math.floor(i/this.pageSize());this.pageIndex()!==n&&(this._silentOption(wv,n),this.updateItems({changeType:"pageIndex"}))}},_getChangedLoadParams:function(){var t=this.getLoadPageParams(!0),{pageIndex:i,loadPageCount:n}=this.getLoadPageParams(),r=this._pageIndexIsValid(i),a=null;return!this._isLoading&&r&&(i!==t.pageIndex||n!==t.loadPageCount)&&(a={pageIndex:i,loadPageCount:n}),a},_pageIndexIsValid:function(t){var i=!0;return(hr(this)&&this.hasKnownLastPage()||an(this))&&(i=t*this.pageSize()<this.totalItemsCount()),i},_loadItems:function(t){var i,n,r=er(this),a=this._dataSource,o=this._getChangedLoadParams(),s=(i=a==null?void 0:a.loadPageCount())!==null&&i!==void 0?i:0,l=this.pageSize()*s,u=(n=a==null?void 0:a.pageIndex())!==null&&n!==void 0?n:0,d=(o==null?void 0:o.pageIndex)===u,c=hr(this)&&this.totalItemsCount()<l,h=this.option("editing.refreshMode")==="repaint",f=(o==null?void 0:o.pageIndex)>u,p=!1;if(!a||r&&t&&(h||f||d&&c))return p;if(r&&this._isLoading&&(this._needUpdateViewportAfterLoading=!0),r&&o){p=!0,a.pageIndex(o.pageIndex),a.loadPageCount(o.loadPageCount),this._repaintChangesOnly=!0,this._needUpdateDimensions=!0;var m=this._viewportChanging;this.load().always(()=>{this._repaintChangesOnly=void 0,this._needUpdateDimensions=void 0}).done(()=>{var g=this.pageCount()>0&&this.pageIndex()===this.pageCount()-1;(m||g)&&this._updateVisiblePageIndex(),this._needUpdateViewportAfterLoading&&(this._needUpdateViewportAfterLoading=!1,this.loadViewport({checkLoadedParamsOnly:!0}))})}return p},loadViewport:function(t){var{checkLoadedParamsOnly:i,checkLoading:n}=t??{},r=er(this);if(r||be.isVirtualRowRendering(this)){this._updateLoadViewportParams();var a=this._loadItems(n);!a&&!(this._isLoading&&n)&&!i&&this.updateItems({repaintChangesOnly:!0,needUpdateDimensions:!0,useProcessedItemsCache:!0,cancelEmptyChanges:!0})}},updateViewport:function(){var t,i,n=this.viewportSize(),r=this.items().length,a=n>r,o=(t=(i=this._loadViewportParams)===null||i===void 0?void 0:i.take)!==null&&t!==void 0?t:0,s=this._rowsScrollController,l=s==null?void 0:s.getViewportParams().take;(a||o<l)&&!this._isPaging&&r&&this.loadViewport({checkLoading:!0})},loadIfNeed:function(){if(this.option(at)!==!1){var t=this._rowsScrollController;t&&t.loadIfNeed();var i=this._dataSource;return i&&i.loadIfNeed()}},getItemSize:function(){var t=this._rowsScrollController;if(t)return t.getItemSize.apply(t,arguments);var i=this._dataSource;return i&&i.getItemSize.apply(i,arguments)},getItemSizes:function(){var t=this._rowsScrollController;if(t)return t.getItemSizes.apply(t,arguments);var i=this._dataSource;return i&&i.getItemSizes.apply(i,arguments)},getContentOffset:function(){var t=this._rowsScrollController;if(t)return t.getContentOffset.apply(t,arguments);var i=this._dataSource;return i&&i.getContentOffset.apply(i,arguments)},refresh:function(t){var i=this._dataSource;return i&&t&&t.load&&hr(this)&&i.resetCurrentTotalCount(),this.callBase.apply(this,arguments)},dispose:function(){var t=this._rowsScrollController;t&&t.dispose(),this.callBase.apply(this,arguments)},topItemIndex:function(){var t;return(t=this._loadViewportParams)===null||t===void 0?void 0:t.skip},bottomItemIndex:function(){var t=this._loadViewportParams;return t&&t.skip+t.take},virtualItemsCount:function(){var t=this._rowsScrollController;if(t)return t.virtualItemsCount.apply(t,arguments);var i=this._dataSource;return i==null?void 0:i.virtualItemsCount.apply(i,arguments)},pageIndex:function(t){var i=er(this),n=this._rowsScrollController;if(this.option(at)===!1&&i&&n&&t===void 0){var r;return(r=this.option(wv))!==null&&r!==void 0?r:0}return this.callBase.apply(this,arguments)},_fireChanged:function(t){this.callBase.apply(this,arguments);var{operationTypes:i}=t;if(this.option(at)===!1&&er(this)&&i){var{fullReload:n,pageIndex:r}=i;t.isDataChanged&&!n&&r&&this._updateVisiblePageIndex(this._dataSource.pageIndex())}},_getPagingOptionValue:function(t){var i=this.callBase.apply(this,arguments);return this.option(at)===!1&&er(this)&&(i=this[t]()),i},isEmpty:function(){return this.option(at)===!1?!this.items(!0).length:this.callBase(this,arguments)},isLastPageLoaded:function(){var t=!1;if(this.option(at)===!1&&er(this)){var{pageIndex:i,loadPageCount:n}=this.getLoadPageParams(!0),r=this.pageCount();t=i+n>=r}else t=this.callBase.apply(this,arguments);return t},reset:function(){this._itemCount=0,this._allItems=null,this.callBase.apply(this,arguments)}};return be.proxyMethod(e,"getVirtualContentSize"),be.proxyMethod(e,"setViewportItemIndex"),e}(),resizing:{resize:function(){var e=this,t=e.callBase,i;if(an(e)||be.isVirtualRowRendering(e)){clearTimeout(e._resizeTimeout);var n=new Date-e._lastTime,r=e.option("scrolling.updateTimeout");e._lastTime&&n<r?(i=new se,e._resizeTimeout=setTimeout(function(){t.apply(e).done(i.resolve).fail(i.reject),e._lastTime=new Date},r),e._lastTime=new Date):(i=t.apply(e),e._dataController.isLoaded()&&(e._lastTime=new Date))}else i=t.apply(e);return i},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._resizeTimeout)}}},views:{rowsView:TQ}}};Oe.registerModule("virtualScrolling",l1);Xu.extend(l1.extenders.dataSourceAdapter);var AQ=.9,u1=(e,t)=>{var i=v(je()),{top:n}=e.offset(),r;if(Et(t)){if(t<n)return n-t;r=Zc(i)-t+i.scrollTop()}else{var a=n-i.scrollTop(),o=Zc(i)-a-nt(e);r=Math.max(a,o)}return r*AQ},DQ="dx-context-menu-content-delimiter",OQ="dx-submenu";class Iv extends vC{_getDefaultOptions(){return k(super._getDefaultOptions(),{orientation:"horizontal",tabIndex:null,onHoverStart:re})}_initDataAdapter(){this._dataAdapter=this.option("_dataAdapter"),this._dataAdapter||super._initDataAdapter()}_renderContentImpl(){this._renderContextMenuOverlay(),super._renderContentImpl();var t=this._dataAdapter.getNodeByKey(this.option("_parentKey"));t&&this._renderItems(this._getChildNodes(t)),this._renderDelimiter()}_renderDelimiter(){this.$contentDelimiter=v("<div>").appendTo(this._itemContainer()).addClass(DQ)}_getOverlayOptions(){return k(super._getOverlayOptions(),{onPositioned:this._overlayPositionedActionHandler.bind(this)})}_overlayPositionedActionHandler(t){this._showDelimiter(t)}_hoverEndHandler(t){super._hoverEndHandler(t),this._toggleFocusClass(!1,t.currentTarget)}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_hoverStartHandler(t){var i=this.option("onHoverStart");i(t),super._hoverStartHandler(t),this._toggleFocusClass(!0,t.currentTarget)}_drawSubmenu(t){this._actions.onShowing({rootItem:Me(t),submenu:this}),super._drawSubmenu(t),this._actions.onShown({rootItem:Me(t),submenu:this})}_hideSubmenu(t){this._actions.onHiding({cancel:!0,rootItem:Me(t),submenu:this}),super._hideSubmenu(t),this._actions.onHidden({rootItem:Me(t),submenu:this})}_showDelimiter(t){if(this.$contentDelimiter){var i=this._itemContainer().children(".".concat(OQ)).eq(0),n=this.option("position").of,r={of:i},a=t.position,o=a.v.location,s=a.h.location,l=n.offset(),u=Math.round(l.left),d=Math.round(l.top),c=He(n),h=Ke(n),f=He(i),p=Ke(i);this.$contentDelimiter.css("display","block"),Fu(this.$contentDelimiter,this._isMenuHorizontal()?c<f?c-2:f:2),gn(this.$contentDelimiter,this._isMenuHorizontal()?2:h<p?h-2:p),this._isMenuHorizontal()?o>d?Math.round(s)===u?(r.offset="1 -1",r.at=r.my="left top"):(r.offset="-1 -1",r.at=r.my="right top"):(gn(this.$contentDelimiter,5),Math.round(s)===u?(r.offset="1 4",r.at=r.my="left bottom"):(r.offset="-1 2",r.at=r.my="right bottom")):s>u?Math.round(o)===d?(r.offset="-1 1",r.at=r.my="left top"):(r.offset="-1 -1",r.at=r.my="left bottom"):Math.round(o)===d?(r.offset="1 1",r.at=r.my="right top"):(r.offset="1 -1",r.at=r.my="right bottom"),xi.setup(this.$contentDelimiter,r)}}_getContextMenuPosition(){return this.option("position")}isOverlayVisible(){return this._overlay.option("visible")}getOverlayContent(){return this._overlay.$content()}}var $o="dx-menu",RQ=$o+"-vertical",TE=$o+"-horizontal",gm=$o+"-item",AE=$o+"-items-container",Tv=gm+"-expanded",Hc="dx-context-menu",Av=Hc+"-container-border",kQ="dx-context-menu-content-delimiter",BQ="dx-submenu",LQ="dx-state-disabled",DE="dx-state-hover",PQ="dx-state-active",Wc=$o+"-adaptive-mode",OE=$o+"-hamburger-button",FQ=Wc+"-overlay-wrapper",MQ="up",VQ="down",NQ="left",$Q="right",Ol="showSubmenu",hs="nextItem",sa="prevItem",HQ={show:50,hide:300},RE=["onSubmenuShowing","onSubmenuShown","onSubmenuHiding","onSubmenuHidden","onItemContextMenu","onItemClick","onSelectionChanged","onItemRendered"];class Cm extends pC{_getDefaultOptions(){return k(super._getDefaultOptions(),{orientation:"horizontal",submenuDirection:"auto",showFirstSubmenuMode:{name:"onClick",delay:{show:50,hide:300}},hideSubmenuOnMouseLeave:!1,onSubmenuShowing:null,onSubmenuShown:null,onSubmenuHiding:null,onSubmenuHidden:null,adaptivityEnabled:!1})}_setOptionsByReference(){super._setOptionsByReference(),k(this._optionsByReference,{animation:!0,selectedItem:!0})}_itemElements(){var t=super._itemElements(),i=this._submenuItemElements();return t.add(i)}_submenuItemElements(){var t=[],i=".".concat(gm),n=this._submenus.length&&this._submenus[0];return n&&n.itemsContainer()&&(t=n.itemsContainer().find(i)),t}_focusTarget(){return this.$element()}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_moveFocus(t){var i=this._getAvailableItems(),n=this._isMenuHorizontal(),r=this._getActiveItem(!0),a,o,s,l;switch(t){case MQ:o=n?Ol:this._getItemsNavigationOperation(sa),a=n?r:i,s=this._getKeyboardNavigationAction(o,a),l=s();break;case VQ:o=n?Ol:this._getItemsNavigationOperation(hs),a=n?r:i,s=this._getKeyboardNavigationAction(o,a),l=s();break;case $Q:o=n?this._getItemsNavigationOperation(hs):Ol,a=n?i:r,s=this._getKeyboardNavigationAction(o,a),l=s();break;case NQ:o=n?this._getItemsNavigationOperation(sa):Ol,a=n?i:r,s=this._getKeyboardNavigationAction(o,a),l=s();break;default:return super._moveFocus(t)}l&&l.length!==0&&this.option("focusedElement",Me(l))}_getItemsNavigationOperation(t){var i=t;return this.option("rtlEnabled")&&(i=t===sa?hs:sa),i}_getKeyboardNavigationAction(t,i){var n=re;switch(t){case Ol:i.hasClass(LQ)||(n=this._showSubmenu.bind(this,i));break;case hs:n=this._nextItem.bind(this,i);break;case sa:n=this._prevItem.bind(this,i)}return n}_clean(){super._clean(),this.option("templatesRenderAsynchronously")&&clearTimeout(this._resizeEventTimer)}_visibilityChanged(t){t&&(this._menuItemsWidth||this._updateItemsWidthCache(),this._dimensionChanged())}_isAdaptivityEnabled(){return this.option("adaptivityEnabled")&&this.option("orientation")==="horizontal"}_updateItemsWidthCache(){var t=this.$element().find("ul").first().children("li").children(".".concat(gm));this._menuItemsWidth=this._getSummaryItemsWidth(t,!0)}_dimensionChanged(){if(this._isAdaptivityEnabled()){var t=ot(this.$element());this._toggleAdaptiveMode(this._menuItemsWidth>t)}}_init(){super._init(),this._submenus=[]}_initActions(){this._actions={},V(RE,(t,i)=>{this._actions[i]=this._createActionByOption(i)})}_initMarkup(){this._visibleSubmenu=null,this.$element().addClass($o),super._initMarkup(),this._addCustomCssClass(this.$element()),this.setAria("role","menubar")}_render(){super._render(),this._initAdaptivity()}_renderHamburgerButton(){return this._hamburger=new Ii(v("<div>").addClass(OE),{icon:"menu",activeStateEnabled:!1,onClick:this._toggleTreeView.bind(this)}),this._hamburger.$element()}_toggleTreeView(t){Ye(t)&&(t=!this._overlay.option("visible")),this._overlay.option("visible",t),this._toggleHamburgerActiveState(t)}_toggleHamburgerActiveState(t){this._hamburger&&this._hamburger.$element().toggleClass(PQ,t)}_toggleAdaptiveMode(t){var i=this.$element().find(".".concat(TE)),n=this.$element().find(".".concat(Wc));t?this._hideVisibleSubmenu():(this._treeView&&this._treeView.collapseAll(),this._overlay&&this._toggleTreeView(t)),i.toggle(!t),n.toggle(t)}_removeAdaptivity(){this._$adaptiveContainer&&(this._toggleAdaptiveMode(!1),this._$adaptiveContainer.remove(),this._$adaptiveContainer=null,this._treeView=null,this._hamburger=null,this._overlay=null)}_treeviewItemClickHandler(t){this._actions.onItemClick(t),t.node.children.length||this._toggleTreeView(!1)}_getAdaptiveOverlayOptions(){var t=this.option("rtlEnabled"),i=t?"right":"left";return{_ignoreFunctionValueDeprecation:!0,maxHeight:()=>u1(this.$element()),deferRendering:!1,shading:!1,animation:!1,hideOnParentScroll:!0,onHidden:()=>{this._toggleHamburgerActiveState(!1)},height:"auto",hideOnOutsideClick:n=>!v(n.target).closest(".".concat(OE)).length,position:{collision:"flipfit",at:"bottom "+i,my:"top "+i,of:this._hamburger.$element()}}}_getTreeViewOptions(){var t={};return V(["rtlEnabled","width","accessKey","activeStateEnabled","animation","dataSource","disabled","displayExpr","displayExpr","focusStateEnabled","hint","hoverStateEnabled","itemsExpr","items","itemTemplate","selectedExpr","selectionMode","tabIndex","visible"],(i,n)=>{t[n]=this.option(n)}),V(["onItemContextMenu","onSelectionChanged","onItemRendered"],(i,n)=>{t[n]=r=>{this._actions[n](r)}}),k(t,{dataSource:this.getDataSource(),animationEnabled:!!this.option("animation"),onItemClick:this._treeviewItemClickHandler.bind(this),onItemExpanded:i=>{this._overlay.repaint(),this._actions.onSubmenuShown(i)},onItemCollapsed:i=>{this._overlay.repaint(),this._actions.onSubmenuHidden(i)},selectNodesRecursive:!1,selectByClick:this.option("selectByClick"),expandEvent:"click"})}_initAdaptivity(){if(this._isAdaptivityEnabled()){this._$adaptiveContainer=v("<div>").addClass(Wc);var t=this._renderHamburgerButton();this._treeView=this._createComponent(v("<div>"),cd,this._getTreeViewOptions()),this._overlay=this._createComponent(v("<div>"),qn,this._getAdaptiveOverlayOptions()),this._overlay.$content().append(this._treeView.$element()).addClass(Wc).addClass(this.option("cssClass")),this._overlay.$wrapper().addClass(FQ),this._$adaptiveContainer.append(t),this._$adaptiveContainer.append(this._overlay.$element()),this.$element().append(this._$adaptiveContainer),this._updateItemsWidthCache(),this._dimensionChanged()}}_getDelay(t){var i=this.option("showFirstSubmenuMode").delay;return E(i)?$e(i)?i[t]:i:HQ[t]}_keyboardHandler(t){return super._keyboardHandler(t,!!this._visibleSubmenu)}_renderContainer(){var t=v("<div>");return t.appendTo(this.$element()).addClass(this._isMenuHorizontal()?TE:RQ),super._renderContainer(t)}_renderSubmenuItems(t,i){var n=this._createSubmenu(t,i);return this._submenus.push(n),this._renderBorderElement(i),n}_getKeyboardListeners(){return super._getKeyboardListeners().concat(this._visibleSubmenu)}_createSubmenu(t,i){var n=v("<div>").addClass(Hc).appendTo(i),r=this._getChildNodes(t),a=this._createComponent(n,Iv,k(this._getSubmenuOptions(),{_dataAdapter:this._dataAdapter,_parentKey:t.internalFields.key,items:r,onHoverStart:this._clearTimeouts.bind(this),position:this.getSubmenuPosition(i)}));return this._attachSubmenuHandlers(i,a),a}_getSubmenuOptions(){var t=v("<div>"),i=this._isMenuHorizontal();return{itemTemplate:this.option("itemTemplate"),target:t,orientation:this.option("orientation"),selectionMode:this.option("selectionMode"),cssClass:this.option("cssClass"),selectByClick:this.option("selectByClick"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),showSubmenuMode:this.option("showSubmenuMode"),displayExpr:this.option("displayExpr"),disabledExpr:this.option("disabledExpr"),selectedExpr:this.option("selectedExpr"),itemsExpr:this.option("itemsExpr"),onFocusedItemChanged:n=>{n.component.option("visible")&&this.option("focusedElement",n.component.option("focusedElement"))},onSelectionChanged:this._nestedItemOnSelectionChangedHandler.bind(this),onItemClick:this._nestedItemOnItemClickHandler.bind(this),onItemRendered:this._nestedItemOnItemRenderedHandler.bind(this),onLeftFirstItem:i?null:this._moveMainMenuFocus.bind(this,sa),onLeftLastItem:i?null:this._moveMainMenuFocus.bind(this,hs),onCloseRootSubmenu:this._moveMainMenuFocus.bind(this,i?sa:null),onExpandLastSubmenu:i?this._moveMainMenuFocus.bind(this,hs):null}}_getShowFirstSubmenuMode(){if(!this._isDesktopDevice())return"onClick";var t=this.option("showFirstSubmenuMode");return $e(t)?t.name:t}_moveMainMenuFocus(t){var i=this._getAvailableItems(),n=i.length,r=i.filter(".".concat(Tv)).eq(0),a=i.index(r);this._hideSubmenu(this._visibleSubmenu),a+=t===sa?-1:1,a>=n?a=0:a<0&&(a=n-1);var o=i.eq(a);this.option("focusedElement",Me(o))}_nestedItemOnSelectionChangedHandler(t){var i=t.addedItems.length&&t.addedItems[0],n=Iv.getInstance(t.element),r=this._actions.onSelectionChanged;r(t),i&&this._clearSelectionInSubmenus(i[0],n),this._clearRootSelection(),this._setOptionWithoutOptionChange("selectedItem",i)}_clearSelectionInSubmenus(t,i){var n=!arguments.length;V(this._submenus,(r,a)=>{var o=a._itemContainer(),s=!o.is(i&&i._itemContainer()),l=o.find(".".concat(this._selectedItemClass()));if(s&&l.length||n){l.removeClass(this._selectedItemClass());var u=this._getItemData(l);u&&(u.selected=!1),a._clearSelectedItems()}})}_clearRootSelection(){var t=this.$element().find(".".concat(AE)).first().children().children().filter(".".concat(this._selectedItemClass()));if(t.length){var i=this._getItemData(t);i.selected=!1,t.removeClass(this._selectedItemClass())}}_nestedItemOnItemClickHandler(t){this._actions.onItemClick(t)}_nestedItemOnItemRenderedHandler(t){this._actions.onItemRendered(t)}_attachSubmenuHandlers(t,i){var n=i.getOverlayContent(),r=n.find(".".concat(BQ)),a=ye(Gh,this.NAME+"_submenu");i.option({onShowing:this._submenuOnShowingHandler.bind(this,t,i),onShown:this._submenuOnShownHandler.bind(this,t,i),onHiding:this._submenuOnHidingHandler.bind(this,t,i),onHidden:this._submenuOnHiddenHandler.bind(this,t,i)}),V(r,(o,s)=>{R.off(s,a),R.on(s,a,null,this._submenuMouseLeaveHandler.bind(this,t))})}_submenuOnShowingHandler(t,i){var n=t.children(".".concat(Av));this._actions.onSubmenuShowing({rootItem:Me(t),submenu:i}),n.show(),t.addClass(Tv)}_submenuOnShownHandler(t,i){this._actions.onSubmenuShown({rootItem:Me(t),submenu:i})}_submenuOnHidingHandler(t,i,n){var r=t.children(".".concat(Av)),a=n;a.rootItem=Me(t),a.submenu=i,this._actions.onSubmenuHiding(a),n=a,n.cancel||(this._visibleSubmenu===i&&(this._visibleSubmenu=null),r.hide(),t.removeClass(Tv))}_submenuOnHiddenHandler(t,i){this._actions.onSubmenuHidden({rootItem:Me(t),submenu:i})}_submenuMouseLeaveHandler(t,i){var n=v(i.relatedTarget).parents(".".concat(Hc))[0],r=this._getSubmenuByRootElement(t).getOverlayContent()[0];this.option("hideSubmenuOnMouseLeave")&&n!==r&&(this._clearTimeouts(),setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")))}_hideSubmenuAfterTimeout(){if(this._visibleSubmenu){var t=v(this._visibleSubmenu.$element().context).hasClass(DE),i=this._visibleSubmenu.getOverlayContent().find(".".concat(DE)).length,n=this._visibleSubmenu.getOverlayContent().get(0).querySelector(":hover");!n&&!i&&!t&&this._visibleSubmenu.hide()}}_getSubmenuByRootElement(t){if(!t)return!1;var i=t.children(".".concat(Hc));return i.length&&Iv.getInstance(i)}getSubmenuPosition(t){var i=this._isMenuHorizontal(),n=this.option("submenuDirection").toLowerCase(),r=this.option("rtlEnabled"),a={collision:"flip",of:t};switch(n){case"leftortop":a.at="left top",a.my=i?"left bottom":"right top";break;case"rightorbottom":a.at=i?"left bottom":"right top",a.my="left top";break;default:i?(a.at=r?"right bottom":"left bottom",a.my=r?"right top":"left top"):(a.at=r?"left top":"right top",a.my=r?"right top":"left top")}return a}_renderBorderElement(t){v("<div>").appendTo(t).addClass(Av).hide()}_itemPointerDownHandler(t){var i=v(t.target),n=i.closest(this._itemElements());if(n.hasClass("dx-menu-item-has-submenu")){this.option("focusedElement",null);return}super._itemPointerDownHandler(t)}_hoverStartHandler(t){var i=ye(lt.move,this.NAME),n=this._getItemElementByEventArgs(t),r=this._dataAdapter.getNodeByItem(this._getItemData(n)),a=E(t.buttons)&&t.buttons===1||!E(t.buttons)&&t.which===1;if(!this._isItemDisabled(n)){if(R.off(n,i),!this._hasChildren(r)){this._showSubmenuTimer=setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide"));return}if(this._getShowFirstSubmenuMode()==="onHover"&&!a){var o=this._getSubmenuByElement(n);this._clearTimeouts(),o.isOverlayVisible()||(R.on(n,i,this._itemMouseMoveHandler.bind(this)),this._showSubmenuTimer=this._getDelay("hide"))}}}_hoverEndHandler(t){var i=this._getItemElementByEventArgs(t),n=v(t.relatedTarget);super._hoverEndHandler(t),this._clearTimeouts(),!this._isItemDisabled(i)&&(n.hasClass(kQ)||this.option("hideSubmenuOnMouseLeave")&&!n.hasClass(AE)&&(this._hideSubmenuTimer=setTimeout(()=>{this._hideSubmenuAfterTimeout()},this._getDelay("hide"))))}_hideVisibleSubmenu(){return this._visibleSubmenu?(this._hideSubmenu(this._visibleSubmenu),!0):!1}_showSubmenu(t){var i=this._getSubmenuByElement(t);this._visibleSubmenu!==i&&this._hideVisibleSubmenu(),i&&(this._clearTimeouts(),i.show(),this.option("focusedElement",i.option("focusedElement"))),this._visibleSubmenu=i,this._hoveredRootItem=t}_hideSubmenu(t){t&&t.hide(),this._visibleSubmenu===t&&(this._visibleSubmenu=null),this._hoveredRootItem=null}_itemMouseMoveHandler(t){if(!(t.pointers&&t.pointers.length)){var i=v(t.currentTarget);E(this._showSubmenuTimer)&&(this._clearTimeouts(),this._showSubmenuTimer=setTimeout(()=>{var n=this._getSubmenuByElement(i);n&&!n.isOverlayVisible()&&this._showSubmenu(i)},this._getDelay("show")))}}_clearTimeouts(){clearTimeout(this._hideSubmenuTimer),clearTimeout(this._showSubmenuTimer)}_getSubmenuByElement(t,i){var n=this._getSubmenuByRootElement(t);if(n)return n;i=i||this._getItemData(t);var r=this._dataAdapter.getNodeByItem(i);return this._hasChildren(r)&&this._renderSubmenuItems(r,t)}_updateSubmenuVisibilityOnClick(t){var i=t.args.length&&t.args[0];if(!(!i||this._disabledGetter(i.itemData))){var n=v(i.itemElement),r=this._getSubmenuByElement(n,i.itemData);if(this._updateSelectedItemOnClick(t),this._visibleSubmenu)if(this._visibleSubmenu===r){this.option("showFirstSubmenuMode")==="onClick"&&this._hideSubmenu(this._visibleSubmenu);return}else this._hideSubmenu(this._visibleSubmenu);if(r&&!r.isOverlayVisible()){this._showSubmenu(n);return}}}_optionChanged(t){if(RE.indexOf(t.name)>=0){this._initActions();return}switch(t.name){case"orientation":case"submenuDirection":this._invalidate();break;case"showFirstSubmenuMode":case"hideSubmenuOnMouseLeave":break;case"showSubmenuMode":this._changeSubmenusOption(t.name,t.value);break;case"adaptivityEnabled":t.value?this._initAdaptivity():this._removeAdaptivity();break;case"width":this._isAdaptivityEnabled()&&(this._treeView.option(t.name,t.value),this._overlay.option(t.name,t.value)),super._optionChanged(t),this._dimensionChanged();break;case"animation":this._isAdaptivityEnabled()&&this._treeView.option("animationEnabled",!!t.value),super._optionChanged(t);break;default:this._isAdaptivityEnabled()&&(t.name===t.fullName||t.name==="items")&&this._treeView.option(t.fullName,t.value),super._optionChanged(t)}}_changeSubmenusOption(t,i){V(this._submenus,(n,r)=>{r.option(t,i)})}selectItem(t){this._hideSubmenu(this._visibleSubmenu),super.selectItem(t)}unselectItem(t){this._hideSubmenu(this._visibleSubmenu),super.selectItem(t)}}tt("dxMenu",Cm);var Dv={"=":"filter-operation-equals","<>":"filter-operation-not-equals","<":"filter-operation-less","<=":"filter-operation-less-equal",">":"filter-operation-greater",">=":"filter-operation-greater-equal",default:"filter-operation-default",notcontains:"filter-operation-not-contains",contains:"filter-operation-contains",startswith:"filter-operation-starts-with",endswith:"filter-operation-ends-with",between:"filter-operation-between"},kE={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",between:"between"},WQ=700,d1=1,su="filter-row",lc="filter-range-overlay",uc="filter-range-start",zQ="filter-range-end",BE="dx-menu",LE="dx-editor-with-menu",Ka="dx-editor-container",ym="dx-editor-cell",GQ="dx-filter-menu",UQ="dx-apply-button",Ov="dx-highlight-outline",PE="dx-focused",KQ="dx-cell-focus-disabled",Rv="dx-filter-range-content",kv="dx-filter-modified",Rl="input:not([type='hidden'])",jQ=["date","datetime","number"];function As(e){return e.option("filterRow.applyFilter")==="onClick"}var Bv=function(e){var t=e&&e.children(),i=t&&t.data("dxComponents"),n=i&&i.length&&t.data(i[0]);if(n instanceof Yn)return n},qQ=function(){var e=function(a,o){var s="",l="",u=t(a,o),d=be.getFormatOptionsByColumn(o,"filterRow");return Array.isArray(u)?(s=be.formatValue(u[0],d),l=be.formatValue(u[1],d),l!==""&&(s+=" - "+l)):E(u)&&(s=be.formatValue(u,d)),s};function t(a,o){if(o)return As(a)&&o.bufferedFilterValue!==void 0?o.bufferedFilterValue:o.filterValue}var i=function(a,o){if(o)return As(a)&&o.bufferedSelectedFilterOperation!==void 0?o.bufferedSelectedFilterOperation:o.selectedFilterOperation},n=function(a,o,s){var l=a._columnsController.columnOption(o),u=t(a,l),d=s.closest("."+a.addWidgetPrefix(lc)).length,c=s.hasClass(a.addWidgetPrefix(uc));return u&&Array.isArray(u)&&i(a,l)==="between"?c?u[0]:u[1]:!d&&function(h,f){return f&&jQ.indexOf(f.dataType)>=0&&Array.isArray(h)?!1:h!==void 0}(u,l)?u:null},r=function(a,o){var s=o.value===""?null:o.value,l=o.container,u=a._columnsController.columnOption(o.column.index),d=n(a,u.index,l);if(!(!E(d)&&!E(s))){a._applyFilterViewController.setHighLight(l,d!==s);var c=As(a)?"bufferedFilterValue":"filterValue",h=function(m,g,C,b){if(i(m,C)==="between"){var A=t(m,C);return b.hasClass(m.addWidgetPrefix(uc))?[g,Array.isArray(A)?A[1]:void 0]:[Array.isArray(A)?A[0]:A,g]}return g}(a,s,u,l),f=i(a,u)==="between",p=o.notFireEvent||f&&Array.isArray(h)&&h.indexOf(void 0)>=0;a._columnsController.columnOption(u.index,c,h,p)}};return{_updateEditorValue:function(a,o){var s=Bv(o);s&&s.option("value",n(this,a.index,o))},_columnOptionChanged:function(a){var o=a.optionNames,s,l,u,d;if(be.checkChanges(o,["filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","filterValues","filterType"])&&a.columnIndex!==void 0){var c=this._columnsController.getVisibleIndex(a.columnIndex),h=this._columnsController.columnOption(a.columnIndex);if(s=this._getCellElement(this.element().find("."+this.addWidgetPrefix(su)).index(),c)||v(),l=s.find("."+Ka).first(),o.filterValue||o.bufferedFilterValue){this._updateEditorValue(h,l);var f=s.find("."+this.addWidgetPrefix(lc)).data("dxOverlay");f&&(u=f.$content().find("."+Ka),this._updateEditorValue(h,u.first()),this._updateEditorValue(h,u.last())),(!f||!f.option("visible"))&&this._updateFilterRangeContent(s,e(this,h))}(o.selectedFilterOperation||o.bufferedSelectedFilterOperation)&&c>=0&&h&&(d=s.find("."+BE),d.length&&(this._updateFilterOperationChooser(d,h,l),i(this,h)==="between"?this._renderFilterRangeContent(s,h):l.find("."+Rv).length&&(this._renderEditor(l,this._getEditorOptions(l,h)),this._hideFilterRange())));return}this.callBase(a)},_renderCore:function(){this._filterRangeOverlayInstance=null,this.callBase.apply(this,arguments)},_resizeCore:function(){this.callBase.apply(this,arguments),this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.repaint()},isFilterRowVisible:function(){return this._isElementVisible(this.option("filterRow"))},isVisible:function(){return this.callBase()||this.isFilterRowVisible()},init:function(){this.callBase(),this._applyFilterViewController=this.getController("applyFilter")},_initFilterRangeOverlay:function(a,o){var s=this,l={},u=a.find(".dx-editor-container"),d=v("<div>").addClass(s.addWidgetPrefix(lc)).appendTo(a);return s._createComponent(d,qn,{height:"auto",shading:!1,showTitle:!1,focusStateEnabled:!1,hideOnOutsideClick:!0,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,animation:!1,position:{my:"top",at:"top",of:u.length&&u||a,offset:"0 -1"},contentTemplate:function(c){var h,f=v("<div>").addClass(Ka+" "+s.addWidgetPrefix(uc)).appendTo(c);return o=s._columnsController.columnOption(o.index),h=s._getEditorOptions(f,o),h.sharedData=l,s._renderEditor(f,h),R.on(f.find(Rl),"keydown",function(p){var m=a.find("[tabindex]").not(p.target).first();$t(p)==="tab"&&p.shiftKey&&(p.preventDefault(),s._hideFilterRange(),m.length||(m=a.prev().find("[tabindex]").last()),R.trigger(m,"focus"))}),f=v("<div>").addClass(Ka+" "+s.addWidgetPrefix(zQ)).appendTo(c),h=s._getEditorOptions(f,o),h.sharedData=l,s._renderEditor(f,h),R.on(f.find(Rl),"keydown",function(p){$t(p)==="tab"&&!p.shiftKey&&(p.preventDefault(),s._hideFilterRange(),R.trigger(a.next().find("[tabindex]").first(),"focus"))}),v(c).addClass(s.getWidgetContainerClass())},onShown:function(c){var h=c.component.$content().find("."+Ka).first();R.trigger(h.find(Rl),"focus")},onHidden:function(){o=s._columnsController.columnOption(o.index),a.find("."+BE).parent().addClass(LE),i(s,o)==="between"&&(s._updateFilterRangeContent(a,e(s,o)),s.component.updateDimensions())}})},_updateFilterRangeOverlay:function(a){var o=this._filterRangeOverlayInstance;o&&o.option(a)},_showFilterRange:function(a,o){var s=a.children("."+this.addWidgetPrefix(lc)),l=s.length&&s.data("dxOverlay");!l&&o&&(l=this._initFilterRangeOverlay(a,o)),l.option("visible")||(this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.hide(),this._filterRangeOverlayInstance=l,this._updateFilterRangeOverlay({width:ot(a,!0)+d1}),this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.show())},_hideFilterRange:function(){var a=this._filterRangeOverlayInstance;a&&a.hide()},getFilterRangeOverlayInstance:function(){return this._filterRangeOverlayInstance},_createRow:function(a){var o=this.callBase(a);return a.rowType==="filter"&&(o.addClass(this.addWidgetPrefix(su)),this.option("useLegacyKeyboardNavigation")||R.on(o,"keydown",s=>Gg("filterRow",this,s))),o},_getRows:function(){var a=this.callBase();return this.isFilterRowVisible()&&a.push({rowType:"filter"}),a},_renderFilterCell:function(a,o){var s=o.column,l=v(a);this.component.option("showColumnHeaders")&&this.setAria("describedby",s.headerId,l),this.setAria("label",fe.format("dxDataGrid-ariaFilterCell"),l),l.addClass(ym);var u=v("<div>").appendTo(l),d=v("<div>").addClass(Ka).appendTo(u);if(i(this,s)==="between")this._renderFilterRangeContent(l,s);else{var c=this._getEditorOptions(d,s);this._renderEditor(d,c)}var h=s.alignment;h&&h!=="center"&&l.find(Rl).first().css("textAlign",s.alignment),s.filterOperations&&s.filterOperations.length&&this._renderFilterOperationChooser(u,s,d)},_renderCellContent:function(a,o){var s=this,l=o.column;if(o.rowType==="filter"){if(l.command)a.html("&nbsp;");else if(l.allowFiltering){s.renderTemplate(a,s._renderFilterCell.bind(s),o).done(()=>{s._updateCell(a,o)});return}}s.callBase(a,o)},_getEditorOptions:function(a,o){var s=this,l={editorOptions:{inputAttr:s._getFilterInputAccessibilityAttributes(o)}},u=k(l,o,{value:n(s,o.index,a),parentType:"filterRow",showAllText:s.option("filterRow.showAllText"),updateValueTimeout:s.option("filterRow.applyFilter")==="onClick"?0:WQ,width:null,setValue:function(d,c){r(s,{column:o,value:d,container:a,notFireEvent:c})}});return i(s,o)==="between"&&(a.hasClass(s.addWidgetPrefix(uc))?u.placeholder=s.option("filterRow.betweenStartText"):u.placeholder=s.option("filterRow.betweenEndText")),u},_getFilterInputAccessibilityAttributes:function(a){var o=fe.format("dxDataGrid-ariaFilterCell");return this.component.option("showColumnHeaders")?{"aria-label":o,"aria-describedby":a.headerId}:{"aria-label":o}},_renderEditor:function(a,o){a.empty();var s=v("<div>").appendTo(a),l=this.getController("editorFactory"),u=this.getController("data").dataSource(),d=this.getController("applyFilter");if(o.lookup&&this.option("syncLookupFilterValues")){d.setCurrentColumnForFiltering(o);var c=this.getController("data").getCombinedFilter();d.setCurrentColumnForFiltering(null);var h=be.getWrappedLookupDataSource(o,u,c),f=Se({},o,{lookup:Se({},o.lookup,{dataSource:h})});return l.createEditor(s,f)}else return l.createEditor(s,o)},_renderFilterRangeContent:function(a,o){var s=this,l=a.find("."+Ka).first();l.empty();var u=v("<div>").addClass(Rv).attr("tabindex",this.option("tabIndex"));R.on(u,"focusin",function(){s._showFilterRange(a,o)}),u.appendTo(l),s._updateFilterRangeContent(a,e(s,o))},_updateFilterRangeContent:function(a,o){var s=a.find("."+Rv);s.length&&(o===""?s.html("&nbsp;"):s.text(o))},_updateFilterOperationChooser:function(a,o,s){var l=this,u,d=function(){var c=Cm.getInstance(a);c&&c.option("focusedElement",null),u&&l._focusEditor(s)};l._createComponent(a,Cm,{integrationOptions:{},activeStateEnabled:!1,selectionMode:"single",cssClass:l.getWidgetContainerClass()+" "+KQ+" "+GQ,showFirstSubmenuMode:"onHover",hideSubmenuOnMouseLeave:!0,items:[{disabled:!(o.filterOperations&&o.filterOperations.length),icon:Dv[i(l,o)||"default"],selectable:!1,items:l._getFilterOperationMenuItems(o)}],onItemClick:function(c){var h=c.itemData.name,f=i(l,o),p=!1,m=As(l),g={};if(!(c.itemData.items||h&&h===f)){if(h?(g[m?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=h,(h==="between"||f==="between")&&(p=h==="between",g[m?"bufferedFilterValue":"filterValue"]=null)):(g[m?"bufferedFilterValue":"filterValue"]=null,g[m?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=o.defaultSelectedFilterOperation||null),l._columnsController.columnOption(o.index,g),l._applyFilterViewController.setHighLight(s,!0),!h){var C=Bv(s);C&&C.NAME==="dxDateBox"&&!C.option("isValid")&&(C.reset(),C.option("isValid",!0))}p?l._showFilterRange(s.closest("."+ym),o):l._focusEditor(s)}},onSubmenuShown:function(){u=l._isEditorFocused(s),l.getController("editorFactory").loseFocus()},onSubmenuHiding:function(){R.trigger(a,"blur"),d()},onContentReady:function(c){R.on(a,"blur",()=>{var h=c.component;h._hideSubmenu(h._visibleSubmenu),d()})},rtlEnabled:l.option("rtlEnabled")})},_isEditorFocused:function(a){return a.hasClass(PE)||a.parents("."+PE).length},_focusEditor:function(a){this.getController("editorFactory").focus(a),R.trigger(a.find(Rl),"focus")},_renderFilterOperationChooser:function(a,o,s){var l;this.option("filterRow.showOperationChooser")&&(a.addClass(LE),l=v("<div>").prependTo(a),this._updateFilterOperationChooser(l,o,s))},_getFilterOperationMenuItems:function(a){var o=this,s=[{}],l=o.option("filterRow"),u=l&&l.operationDescriptions||{};if(a.filterOperations&&a.filterOperations.length){var d=a.filterOperations.filter(function(c){return E(kE[c])});s=ti(d,function(c){var h=kE[c];return{name:c,selected:(i(o,a)||a.defaultFilterOperation)===c,text:u[h],icon:Dv[c]}}),s.push({name:null,text:l&&l.resetOperationText,icon:Dv.default})}return s},_handleDataChanged:function(a){var o;this.callBase.apply(this,arguments),(o=a.operationTypes)!==null&&o!==void 0&&o.filtering&&this.updateLookupDataSource()},updateLookupDataSource:function(){if(this.option("syncLookupFilterValues")&&this.element()){var a=this.getController("columns").getVisibleColumns(),o=this.getController("data").dataSource(),s=this.getController("applyFilter"),l=this.element().find("."+this.addWidgetPrefix(su)).index();l!==-1&&a.forEach(u=>{if(u.lookup){var d=this._getCellElement(l,u.visibleIndex),c=Bv(d.find(".dx-editor-container"));s.setCurrentColumnForFiltering(u);var h=this.getController("data").getCombinedFilter();s.setCurrentColumnForFiltering(null);var f=be.getWrappedLookupDataSource(u,o,h);c==null||c.option("dataSource",f)}})}},optionChanged:function(a){switch(a.name){case"filterRow":case"showColumnLines":this._invalidate(!0,!0),a.handled=!0;break;default:this.callBase(a)}}}}(),YQ={skipCalculateColumnFilters:function(){return!1},_calculateAdditionalFilter:function(){if(this.skipCalculateColumnFilters())return this.callBase();var e=[this.callBase()],t=this._columnsController.getVisibleColumns(null,!0),i=this.getController("applyFilter");return V(t,function(){var n,r=((n=i.getCurrentColumnForFiltering())===null||n===void 0?void 0:n.index)===this.index;if(this.allowFiltering&&this.calculateFilterExpression&&E(this.filterValue)&&!r){var a=this.createFilterExpression(this.filterValue,this.selectedFilterOperation||this.defaultFilterOperation,"filterRow");e.push(a)}}),be.combineFilters(e)}},XQ=Dt.ViewController.inherit({_getHeaderPanel:function(){return this._headerPanel||(this._headerPanel=this.getView("headerPanel")),this._headerPanel},setHighLight:function(e,t){As(this)&&(e&&e.toggleClass(Ov,t)&&e.closest("."+ym).toggleClass(kv,t),this._getHeaderPanel().enableApplyButton(t))},applyFilter:function(){var e=this.getController("columns"),t=e.getColumns();e.beginUpdate();for(var i=0;i<t.length;i++){var n=t[i];n.bufferedFilterValue!==void 0&&(e.columnOption(i,"filterValue",n.bufferedFilterValue),n.bufferedFilterValue=void 0),n.bufferedSelectedFilterOperation!==void 0&&(e.columnOption(i,"selectedFilterOperation",n.bufferedSelectedFilterOperation),n.bufferedSelectedFilterOperation=void 0)}e.endUpdate(),this.removeHighLights()},removeHighLights:function(){if(As(this)){var e=this.getView("columnHeadersView").element();e.find("."+this.addWidgetPrefix(su)+" ."+Ov).removeClass(Ov),e.find("."+this.addWidgetPrefix(su)+" ."+kv).removeClass(kv),this._getHeaderPanel().enableApplyButton(!1)}},setCurrentColumnForFiltering:function(e){this._currentColumn=e},getCurrentColumnForFiltering:function(){return this._currentColumn}}),ZQ={defaultOptions:function(){return{syncLookupFilterValues:!0,filterRow:{visible:!1,showOperationChooser:!0,showAllText:fe.format("dxDataGrid-filterRowShowAllText"),resetOperationText:fe.format("dxDataGrid-filterRowResetOperationText"),applyFilter:"auto",applyFilterText:fe.format("dxDataGrid-applyFilterText"),operationDescriptions:{equal:fe.format("dxDataGrid-filterRowOperationEquals"),notEqual:fe.format("dxDataGrid-filterRowOperationNotEquals"),lessThan:fe.format("dxDataGrid-filterRowOperationLess"),lessThanOrEqual:fe.format("dxDataGrid-filterRowOperationLessOrEquals"),greaterThan:fe.format("dxDataGrid-filterRowOperationGreater"),greaterThanOrEqual:fe.format("dxDataGrid-filterRowOperationGreaterOrEquals"),startsWith:fe.format("dxDataGrid-filterRowOperationStartsWith"),contains:fe.format("dxDataGrid-filterRowOperationContains"),notContains:fe.format("dxDataGrid-filterRowOperationNotContains"),endsWith:fe.format("dxDataGrid-filterRowOperationEndsWith"),between:fe.format("dxDataGrid-filterRowOperationBetween"),isBlank:fe.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:fe.format("dxFilterBuilder-filterOperationIsNotBlank")},betweenStartText:fe.format("dxDataGrid-filterRowOperationBetweenStartText"),betweenEndText:fe.format("dxDataGrid-filterRowOperationBetweenEndText")}}},controllers:{applyFilter:XQ},extenders:{controllers:{data:YQ,columnsResizer:{_startResizing:function(){var e=this;if(e.callBase.apply(e,arguments),e.isResizing()){var t=e._columnHeadersView.getFilterRangeOverlayInstance();if(t){var i=t.$element().closest("td").index();(i===e._targetPoint.columnIndex||i===e._targetPoint.columnIndex+1)&&t.$content().hide()}}},_endResizing:function(){var e=this,t;if(e.isResizing()){var i=e._columnHeadersView.getFilterRangeOverlayInstance();i&&(t=i.$element().closest("td"),e._columnHeadersView._updateFilterRangeOverlay({width:ot(t,!0)+d1}),i.$content().show())}e.callBase.apply(e,arguments)}},editing:{updateFieldValue(e){return e.column.lookup&&(this._needUpdateLookupDataSource=!0),this.callBase.apply(this,arguments)},_afterSaveEditData(e){if(this._needUpdateLookupDataSource&&!e){var t;(t=this.getView("columnHeadersView"))===null||t===void 0||t.updateLookupDataSource()}return this._needUpdateLookupDataSource=!1,this.callBase.apply(this,arguments)},_afterCancelEditData(){return this._needUpdateLookupDataSource=!1,this.callBase.apply(this,arguments)}}},views:{columnHeadersView:qQ,headerPanel:{_getToolbarItems:function(){var e=this.callBase(),t=this._prepareFilterItem(e);return t.concat(e)},_prepareFilterItem:function(){var e=this,t=[];if(e._isShowApplyFilterButton()){var i=e.option("filterRow.applyFilterText"),n=e._columnsController.getColumns(),r=!n.filter(function(o){return o.bufferedFilterValue!==void 0}).length,a={widget:"dxButton",options:{icon:"apply-filter",disabled:r,onClick:function(){e._applyFilterViewController.applyFilter()},hint:i,text:i,onInitialized:function(o){v(o.element).addClass(e._getToolbarButtonClass(UQ))}},showText:"inMenu",name:"applyFilterButton",location:"after",locateInMenu:"auto",sortIndex:10};t.push(a)}return t},_isShowApplyFilterButton:function(){var e=this.option("filterRow");return e&&e.visible&&e.applyFilter==="onClick"},init:function(){this.callBase(),this._dataController=this.getController("data"),this._applyFilterViewController=this.getController("applyFilter")},enableApplyButton:function(e){this.setToolbarItemDisabled("applyFilterButton",!e)},isVisible:function(){return this.callBase()||this._isShowApplyFilterButton()},optionChanged:function(e){if(e.name==="filterRow")this._invalidate(),e.handled=!0;else if(e.name==="syncLookupFilterValues"){var t;(t=this.component.getView("columnHeadersView"))===null||t===void 0||t.updateLookupDataSource(),e.handled=!0}else this.callBase(e)}}}}};Oe.registerModule("filterRow",ZQ);Eo.setEditorClass(ld);var FE="dx-header-filter",JQ="dx-header-filter-menu",QQ="text";function c1(e){e=e||[];for(var t=0;t<e.length;t++)e[t].selected=!1,c1(e[t].items)}function ME(e,t){if(!e.component.option("searchValue")){var i=v(e.element).find(".dx-list-select-all-checkbox").data("dxCheckBox");i&&t&&t.length&&i.option("value",void 0)}}function eee(e,t){var i=t.headerFilter;return i&&E(i.allowSearch)?i.allowSearch:e.option("headerFilter.allowSearch")}function tee(e,t,i){if(t^i){if(e.selected=!0,i&&e.items){for(var n=0;n<e.items.length;n++)if(!e.items[n].selected){e.selected=void 0;break}}}else(i||e.selected)&&(e.selected=!1,c1(e.items))}var iee=Dt.View.inherit({getPopupContainer:function(){return this._popupContainer},getListContainer:function(){return this._listContainer},applyHeaderFilter:function(e){var t=this.getListContainer(),i=t.option("searchValue"),n=!i&&!e.isFilterBuilder&&t.$element().find(".dx-checkbox").eq(0).hasClass("dx-checkbox-checked"),r=[];n?(e.type==="tree"&&(e.filterType="exclude"),Array.isArray(e.filterValues)&&(e.filterValues=[])):e.type==="tree"&&(e.filterType&&(e.filterType="include"),function a(o,s,l){V(s,function(u,d){if(d.selected!==void 0&&!!d.selected^l){var c=t._getNode(d),h=t._hasChildren(c),f=h&&d.items&&d.items.some(p=>p.selected);if(!i||!f){o.push(d.value);return}}d.items&&d.items.length&&a(o,d.items,l)})}(r,t.option("items"),!1),e.filterValues=r),e.filterValues&&!e.filterValues.length&&(e.filterValues=null),e.apply(),this.hideHeaderFilterMenu()},showHeaderFilterMenu:function(e,t){if(t){this._initializePopupContainer(t);var i=this.getPopupContainer();this.hideHeaderFilterMenu(),this.updatePopup(e,t),i.show()}},hideHeaderFilterMenu:function(){var e=this.getPopupContainer();e&&e.hide()},updatePopup:function(e,t){var i=this.option("showColumnLines"),n=t.alignment==="right"^!i?"left":"right";this._popupContainer&&(this._cleanPopupContent(),this._popupContainer.option("position",{my:n+" top",at:n+" bottom",of:e,collision:"flip fit"}))},_getSearchExpr:function(e){var t=e.lookup,i=e.useDefaultSearchExpr,n=e.headerFilter&&e.headerFilter.dataSource;if(i||E(n)&&!Ie(n))return QQ;if(t)return t.displayExpr||"this";if(e.dataSource){var r=e.dataSource.group;if(Array.isArray(r)&&r.length>0)return r[0].selector;if(Ie(r)&&!e.remoteFiltering)return r}return e.dataField||e.selector},_cleanPopupContent:function(){this._popupContainer&&this._popupContainer.$content().empty()},_initializePopupContainer:function(e){var t=this,i=t.element(),n=t.option("headerFilter"),r=e.headerFilter&&e.headerFilter.width||n&&n.width,a=e.headerFilter&&e.headerFilter.height||n&&n.height,o={width:r,height:a,visible:!1,shading:!1,showTitle:!1,showCloseButton:!1,hideOnParentScroll:!1,dragEnabled:!1,hideOnOutsideClick:!0,focusStateEnabled:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.ok,onClick:function(){t.applyHeaderFilter(e)}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.cancel,onClick:function(){t.hideHeaderFilterMenu()}}}],resizeEnabled:!0,onShowing:function(s){s.component.$content().parent().addClass("dx-dropdowneditor-overlay"),t._initializeListContainer(e),e.onShowing&&e.onShowing(s)},onShown:function(){t.getListContainer().focus()},onHidden:e.onHidden,onInitialized:function(s){var l=s.component;l.option("animation",l._getDefaultOptions().animation)}};E(t._popupContainer)?t._popupContainer.option(o):t._popupContainer=t._createComponent(i,Cr,o)},_initializeListContainer:function(e){var t=this,i=t._popupContainer.$content(),n={searchEnabled:eee(t,e),searchTimeout:t.option("headerFilter.searchTimeout"),searchMode:e.headerFilter&&e.headerFilter.searchMode||"",dataSource:e.dataSource,onContentReady:function(){t.renderCompleted.fire()},itemTemplate:function(a,o,s){var l=v(s);return e.encodeHtml?l.text(a.text):l.html(a.text)}};function r(a){a.fullName==="searchValue"&&!e.isFilterBuilder&&t.option("headerFilter.hideSelectAllOnSearch")!==!1&&(e.type==="tree"?a.component.option("showCheckBoxesMode",a.value?"normal":"selectAll"):a.component.option("selectionMode",a.value?"multiple":"all"))}e.type==="tree"?t._listContainer=t._createComponent(v("<div>").appendTo(i),cd,k(n,{showCheckBoxesMode:e.isFilterBuilder?"normal":"selectAll",onOptionChanged:r,keyExpr:"id"})):t._listContainer=t._createComponent(v("<div>").appendTo(i),Vo,k(n,{searchExpr:t._getSearchExpr(e),pageLoadMode:"scrollBottom",showSelectionControls:!0,selectionMode:e.isFilterBuilder?"multiple":"all",onOptionChanged:r,onSelectionChanged:function(a){var o=a.component.option("items"),s=a.component.option("selectedItems");if(!a.component._selectedItemsUpdating&&!a.component.option("searchValue")&&!e.isFilterBuilder){var l=e.filterValues||[],u=e.filterType==="exclude";s.length===0&&o.length&&(l.length<=1||u&&l.length===o.length-1)?(e.filterType="include",e.filterValues=[]):s.length===o.length&&(e.filterType="exclude",e.filterValues=[])}V(o,function(d,c){var h=be.getIndexByKey(c,s,null)>=0,f=!!c.selected;if(f!==h){c.selected=h,e.filterValues=e.filterValues||[];var p=be.getIndexByKey(c.value,e.filterValues,null);p>=0&&e.filterValues.splice(p,1),h^e.filterType==="exclude"&&e.filterValues.push(c.value)}}),ME(a,e.filterValues)},onContentReady:function(a){var o=a.component,s=o.option("items"),l=[];V(s,function(){this.selected&&l.push(this)}),o._selectedItemsUpdating=!0,o.option("selectedItems",l),o._selectedItemsUpdating=!1,ME(a,e.filterValues)}}))},_renderCore:function(){this.element().addClass(JQ)}}),vf=function(e){return E(e.allowHeaderFiltering)?e.allowHeaderFiltering:e.allowFiltering},h1={_applyColumnState:function(e){var t,i=e.rootElement,n=e.column;return e.name==="headerFilter"?(i.find("."+FE).remove(),vf(n)&&(t=this.callBase(e).toggleClass("dx-header-filter-empty",this._isHeaderFilterEmpty(n)),this.option("useLegacyKeyboardNavigation")||t.attr("tabindex",this.option("tabindex")||0)),t):this.callBase(e)},_isHeaderFilterEmpty:function(e){return!e.filterValues||!e.filterValues.length},_getIndicatorClassName:function(e){return e==="headerFilter"?FE:this.callBase(e)},_renderIndicator:function(e){var t=e.container,i=e.indicator;if(e.name==="headerFilter"){var n=this.option("rtlEnabled");if(t.children().length&&(!n&&e.columnAlignment==="right"||n&&e.columnAlignment==="left")){t.prepend(i);return}}this.callBase(e)},optionChanged:function(e){if(e.name==="headerFilter"){var t=this.name==="columnHeadersView";this._invalidate(t,t),e.handled=!0}else this.callBase(e)}},nee={month:function(e){return Xe.getMonthNames()[e-1]},quarter:function(e){return Xe.format(new Date(2e3,3*e-1),"quarter")}};function f1(e,t,i){return t=t||[],i=i||[],e.forEach(n=>{if(E(n.key)){var r=t.length===1;if(t.push(r?n.key-1:n.key),n.items)f1(n.items,t,i);else{var a=new Date(Date.UTC.apply(Date,t));i.push(a)}t.pop()}else i.push(null)}),i}function ree(e,t){var i=f1(e),n=Yi(i),r=be.getHeaderFilterGroupParameters(Se({},t,{calculateCellValue:a=>a}));return qr.queryByOptions(n,{group:r}).toArray()}function aee(e){return(e==null?void 0:e.slice(-1))==="Z"||(e==null?void 0:e.slice(-3))==="'Z'"}var oee=Dt.ViewController.inherit({init:function(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._headerFilterView=this.getView("headerFilterView")},_updateSelectedState:function(e,t){for(var i=e.length,n=t.filterType==="exclude";i--;){var r=e[i];"items"in e[i]&&this._updateSelectedState(e[i].items,t),tee(r,be.getIndexByKey(e[i].value,t.filterValues,null)>-1,n)}},_normalizeGroupItem:function(e,t,i){var n,r,a=i.path,o=i.valueSelector,s=i.displaySelector,l=i.column;return o&&s?(n=o(e),r=s(e)):(n=e.key,r=n),$e(e)?e=k({},e):e={},a.push(n),a.length===1?e.value=a[0]:e.value=a.join("/"),e.text=this.getHeaderItemText(r,l,t,i.headerFilterOptions),e},getHeaderItemText:function(e,t,i,n){var r=be.formatValue(e,function(a,o,s){var l=$s.getGroupInterval(o),u=be.getFormatOptionsByColumn(o,"headerFilter");return l&&(u.groupInterval=l[s],be.isDateType(o.dataType)?u.format=nee[l[s]]:o.dataType==="number"&&(u.getDisplayFormat=function(){var d={format:o.format,target:"headerFilter"},c=be.formatValue(a,d),h=a+l[s],f=be.formatValue(h,d);return c&&f?c+" - "+f:""})),u}(e,t,i));return r||(r=n.texts.emptyValue),r},_processGroupItems:function(e,t,i,n){var r,a,o=n.column,s=o.lookup,l=n.level;i=i||[],t=t||0,s&&(r=bt(s.displayExpr),a=bt(s.valueExpr));for(var u=0;u<e.length;u++)e[u]=this._normalizeGroupItem(e[u],t,{column:n.column,headerFilterOptions:n.headerFilterOptions,displaySelector:r,valueSelector:a,path:i}),"items"in e[u]&&(t===l||!E(e[u].value)?delete e[u].items:this._processGroupItems(e[u].items,t+1,i,n)),i.pop()},getDataSource:function(e){var t,i=this._dataController.dataSource(),n=i==null?void 0:i.remoteOperations().grouping,r=be.getHeaderFilterGroupParameters(e,n),a=(t=e.headerFilter)===null||t===void 0?void 0:t.dataSource,o=this.option("headerFilter"),s=!1,l={component:this.component};if(i){if(E(a)&&!Ie(a))l.dataSource=el(a);else if(e.lookup)if(s=!0,this.option("syncLookupFilterValues")){this._currentColumn=e;var u=this._dataController.getCombinedFilter();this._currentColumn=null,l.dataSource=be.getWrappedLookupDataSource(e,i,u)}else l.dataSource=be.normalizeLookupDataSource(e.lookup);else{var d=Array.isArray(r)?r.length-1:0;this._currentColumn=e;var c=this._dataController.getCombinedFilter();this._currentColumn=null,l.dataSource={filter:c,group:r,useDefaultSearch:!0,load:p=>{var m=new se;return p.dataField=e.dataField||e.name,i.load(p).done(function(g){var C=n&&aee(e.serializationFormat)&&d>3;C&&(g=ree(g,e)),f._processGroupItems(g,null,null,{level:d,column:e,headerFilterOptions:o}),m.resolve(g)}).fail(m.reject),m}}}Ie(a)&&a.call(e,l);var h=l.dataSource.postProcess,f=this;return l.dataSource.postProcess=function(p){var m=p;return s&&(this.pageIndex()===0&&!this.searchValue()&&(m=m.slice(0),m.unshift(null)),f._processGroupItems(m,null,null,{level:0,column:e,headerFilterOptions:o})),m=h&&h.call(this,m)||m,f._updateSelectedState(m,e),m},l.dataSource}},getCurrentColumn:function(){return this._currentColumn},showHeaderFilterMenu:function(e,t){var i=this._columnsController,n=k(!0,{},this._columnsController.getColumns()[e]);if(n){var r=i.getVisibleIndex(e),a=t?this.getView("headerPanel"):this.getView("columnHeadersView"),o=o||a.getColumnElements().eq(t?n.groupIndex:r);this.showHeaderFilterMenuBase({columnElement:o,column:n,applyFilter:!0,apply:function(){i.columnOption(e,{filterValues:this.filterValues,filterType:this.filterType})}})}},showHeaderFilterMenuBase:function(e){var t=this,i=e.column;if(i){var n=$s.getGroupInterval(i),r=t._dataController.dataSource(),a=r&&r.remoteOperations().filtering;k(e,i,{type:n&&n.length>1?"tree":"list",remoteFiltering:a,onShowing:function(o){var s=o.component.$overlayContent().dxResizable("instance");s&&s.option("onResizeEnd",function(l){var u=t.getController("columns"),d=u.columnOption(e.dataField,"headerFilter");d=d||{},d.width=l.width,d.height=l.height,u.columnOption(e.dataField,"headerFilter",d,!0)})},onHidden:()=>zg(this)}),e.dataSource=t.getDataSource(e),e.isFilterBuilder&&(e.dataSource.filter=null,e.alignment="right"),t._headerFilterView.showHeaderFilterMenu(e.columnElement,e)}},hideHeaderFilterMenu:function(){this._headerFilterView.hideHeaderFilterMenu()}}),see=k({},h1,{_renderCellContent:function(e,t){var i,n=t.column;!n.command&&vf(n)&&this.option("headerFilter.visible")&&t.rowType==="header"&&(i=this._applyColumnState({name:"headerFilter",rootElement:e,column:n,showColumnLines:this.option("showColumnLines")}),i&&this._subscribeToIndicatorEvent(i,n,"headerFilter")),this.callBase(e,t)},_subscribeToIndicatorEvent:function(e,t,i){var n=this;i==="headerFilter"&&R.on(e,vt,n.createAction(function(r){r.event.stopPropagation(),n.getController("headerFilter").showHeaderFilterMenu(t.index,!1)}))},_updateIndicator:function(e,t,i){var n=this.callBase(e,t,i);n&&this._subscribeToIndicatorEvent(n,t,i)},_updateHeaderFilterIndicators:function(){this.option("headerFilter.visible")&&this._updateIndicators("headerFilter")},_needUpdateFilterIndicators:function(){return!0},_columnOptionChanged:function(e){var t=e.optionNames;if(be.checkChanges(t,["filterValues","filterType"])){this._needUpdateFilterIndicators()&&this._updateHeaderFilterIndicators();return}this.callBase(e)}}),lee=k({},h1,{_createGroupPanelItem:function(e,t){var i=this,n=i.callBase.apply(i,arguments),r;return!t.command&&vf(t)&&i.option("headerFilter.visible")&&(r=i._applyColumnState({name:"headerFilter",rootElement:n,column:{alignment:Ra(i.option("rtlEnabled")),filterValues:t.filterValues,allowHeaderFiltering:!0},showColumnLines:!0}),r&&R.on(r,vt,i.createAction(function(a){var o=a.event;o.stopPropagation(),i.getController("headerFilter").showHeaderFilterMenu(t.index,!0)}))),n}}),uee={skipCalculateColumnFilters:function(){return!1},_calculateAdditionalFilter:function(){if(this.skipCalculateColumnFilters())return this.callBase();var e=[this.callBase()],t=this._columnsController.getVisibleColumns(null,!0),i=this.getController("headerFilter"),n=i.getCurrentColumn();return V(t,function(r,a){var o;if(!(n&&n.index===a.index)&&vf(a)&&a.calculateFilterExpression&&Array.isArray(a.filterValues)&&a.filterValues.length){var s=[];V(a.filterValues,function(l,u){Array.isArray(u)?o=u:(a.deserializeValue&&!be.isDateType(a.dataType)&&a.dataType!=="number"&&(u=a.deserializeValue(u)),o=a.createFilterExpression(u,"=","headerFilter")),o&&(o.columnIndex=a.index),s.push(o)}),s=be.combineFilters(s,"or"),e.push(a.filterType==="exclude"?["!",s]:s)}}),be.combineFilters(e)}},dee={defaultOptions:function(){return{syncLookupFilterValues:!0,headerFilter:{visible:!1,width:252,height:325,allowSearch:!1,searchTimeout:500,texts:{emptyValue:fe.format("dxDataGrid-headerFilterEmptyValue"),ok:fe.format("dxDataGrid-headerFilterOK"),cancel:fe.format("dxDataGrid-headerFilterCancel")}}}},controllers:{headerFilter:oee},views:{headerFilterView:iee},extenders:{controllers:{data:uee},views:{columnHeadersView:see,headerPanel:lee}}};Oe.registerModule("headerFilter",dee);var _f="dx-filterbuilder-range",cee=_f+"-start",hee=_f+"-end",fee=_f+"-separator",p1="–";function pee(e,t){var i=v("<div>").addClass(cee),n=v("<div>").addClass(hee),r=e.value||[],a=function(s){return s&&s.length>0?s[0]:null},o=function(s){return s&&s.length===2?s[1]:null};t.append(i),t.append(v("<span>").addClass(fee).text(p1)),t.append(n),t.addClass(_f),this._editorFactory.createEditor.call(this,i,k({},e.field,e,{value:a(r),parentType:"filterBuilder",setValue:function(s){r=[s,o(r)],e.setValue(r)}})),this._editorFactory.createEditor.call(this,n,k({},e.field,e,{value:o(r),parentType:"filterBuilder",setValue:function(s){r=[a(r),s],e.setValue(r)}}))}function VE(e,t){return{name:"between",caption:e,icon:"range",valueSeparator:p1,dataTypes:["number","date","datetime"],editorTemplate:pee.bind(t),notForLookup:!0}}var vee={"=":"equal","<>":"notequal","<":"less","<=":"lessorequal",">":"greater",">=":"greaterorequal",notcontains:"doesnotcontain",contains:"contains",startswith:"startswith",endswith:"endswith",isblank:"isblank",isnotblank:"isnotblank"},_ee={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",isblank:"isBlank",isnotblank:"isNotBlank",between:"between"};const v1={getIconByFilterOperation:function(e){return vee[e]},getNameByFilterOperation:function(e){return _ee[e]}};var PC="string",NE="icon-none",Ia="and",FC="=",mee="<>",gee={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},Cee={date:"shortDate",datetime:"shortDateShortTime"},yee=["=","<>","isblank","isnotblank"],xee=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"],bee="dx-filterbuilder",_1=bee+"-text",See=_1+"-part",m1=_1+"-separator",Eee=m1+"-empty";function wee(e,t){var i=e.format||Cee[e.dataType];return wA.format(t,i)}function Io(e){return e&&e.length>1&&e[0]==="!"&&!Ti(e)}function Pa(e){return Io(e)?e[1]:e}function Iee(e,t){return Io(e)?e[1]=t:e=t,e}function Tee(e,t){(function(i){return i.indexOf("!")!==-1})(t)?Io(e)||function(i){var n=i.slice(0);i.length=0,i.push("!",n)}(e):Io(e)&&function(i){var n=Pa(i);i.length=0,[].push.apply(i,n)}(e)}function Aee(e,t){Tee(e,t);var i=Pa(e),n;return t=function(r){return r.indexOf("!")===-1?r:r.substring(1)}(t),function(r,a){for(n=0;n<r.length;n++)Array.isArray(r[n])||(r[n]=a)}(i,t),e}function Dee(e,t){var i=Ho(e);return t.filter(function(n){return n.value===i})[0]}function g1(e){if(Ti(e))return Ia;for(var t="",i=0;i<e.length;i++){var n=e[i];if(!Array.isArray(n)){if(t&&t!==n)throw new oi.Error("E4019");n!=="!"&&(t=n)}}return t}function Ho(e){var t=Pa(e),i=g1(t);return i||(i=Ia),t!==e&&(i="!"+i),i}function Oee(e){return e.lookup&&yee||gee[e.dataType||PC]}function Ree(e){return Array.isArray(e)&&e.length}function C1(e){var t=Ree(e.filterOperations)?e.filterOperations:Oee(e);return k([],t)}function xm(e,t){var i=v1.getNameByFilterOperation(e);return t&&t[i]?t[i]:i}function kee(e,t){for(var i=0;i<t.length;i++)if(t[i].value===e)return t[i];throw new Qe.Error("E1048",e)}function Wr(e,t){var i=e.filter(function(n){return n.name===t});return i.length?i[0]:null}function Bee(e,t,i){var n=C1(e),r=!!e.lookup;return i.forEach(function(a){if(!e.filterOperations&&n.indexOf(a.name)===-1){var o=a&&a.dataTypes,s=r?!!a.notForLookup:!1;!s&&o&&o.indexOf(e.dataType||PC)>=0&&n.push(a.name)}}),n.map(function(a){var o=Wr(i,a);return o?{icon:o.icon||NE,text:o.caption||vo(o.name),value:o.name,isCustom:!0}:{icon:v1.getIconByFilterOperation(a)||NE,text:xm(a,t),value:a}})}function MC(e){return e.defaultFilterOperation||C1(e)[0]}function Lee(e,t){var i=[e.dataField,"",""],n=MC(e);return Sm(i,n,t),i}function bm(e,t){var i=Pa(e),n=i.indexOf(t);return i.splice(n,1),i.length!==1&&i.splice(n,1),e}function y1(e){var t=VC(e),i=t?NC(e):e;return t?["!",[i]]:[i]}function wh(e,t){var i=Pa(t),n=Ho(i);return i.length===1?i.unshift(e):i.push(e,n),t}function Ih(e,t){for(var i=0;i<t.length;i++)if(t[i].name===e||t[i].dataField.toLowerCase()===e.toLowerCase())return t[i];var n=I1(t,!0).filter(function(r){return r.dataField.toLowerCase()===e.toLowerCase()});if(n.length>0)return n[0];throw new Qe.Error("E1047",e)}function Fa(e){return Array.isArray(e)?e.length<2||Array.isArray(e[0])||Array.isArray(e[1]):!1}function Ti(e){return Array.isArray(e)?e.length>1&&!Array.isArray(e[0])&&!Array.isArray(e[1]):!1}function $E(e,t,i){i=i||Ia;for(var n=g1(e).toLowerCase()||i,r=[],a=0;a<e.length;a++)Fa(e[a])?(r.push($C(e[a],t,i)),r=Pv(r,n)):Ti(e[a])&&(r.push(Th(e[a],t)),r=Pv(r,n));return r.length===0&&(r=Pv(r,n)),r}function Pee(e,t){var i=Wr(t,e[1]);return i&&i.name===e[1]}function Th(e,t){return Pee(e,t)||e.length<3&&(e[2]=e[1],e[1]=FC),e}function VC(e){return e.indexOf("not")!==-1}function NC(e){return e.substring(3).toLowerCase()}function Lv(e,t){var i=VC(t);return t=i?NC(t):t,i?["!",e,t]:[e,t]}function Pv(e,t){var i=VC(t);t=i?NC(t):t,e.push(t);var n=e;return i&&(n=["!",n]),n}function $C(e,t,i){return i=i||Ia,e?(e=k(!0,[],e),Ti(e)?Lv(Th(e,t),i):Io(e)?["!",Ti(e[1])?Lv(Th(e[1],t),i):Io(e[1])?Lv($C(e[1],t),i):$E(e[1],t,i)]:$E(e,t,i)):y1(i)}function Fee(e){return e.reduce(function(t,i){if(E(i.dataField)){var n={};for(var r in i)i[r]&&xee.indexOf(r)>-1&&(n[r]=i[r]);n.defaultCalculateFilterExpression=$s.defaultCalculateFilterExpression,E(n.dataType)||(n.dataType=PC),E(n.trueText)||(n.trueText=fe.format("dxDataGrid-trueText")),E(n.falseText)||(n.falseText=fe.format("dxDataGrid-falseText")),t.push(n)}return t},[])}function HE(e,t,i,n){var r=Ih(e[0],t),a=Th(e,i),o=i.length&&Wr(i,a[1]);return o&&o.calculateFilterExpression?o.calculateFilterExpression.apply(o,[a[2],r,t]):r.createFilterExpression?r.createFilterExpression.apply(r,[a[2],a[1],n]):r.calculateFilterExpression?r.calculateFilterExpression.apply(r,[a[2],a[1],n]):r.defaultCalculateFilterExpression.apply(r,[a[2],a[1],n])}function Gs(e,t,i,n){if(!E(e))return null;if(Io(e)){var r=Gs(e[1],t,i,n);return["!",r]}var a=Pa(e);if(Ti(a))return HE(a,t,i,n)||null;for(var o=[],s,l=Ho(a),u=0;u<a.length;u++)Fa(a[u])?(s=Gs(a[u],t,i,n),s&&(u&&o.push(l),o.push(s))):Ti(a[u])&&(s=HE(a[u],t,i,n),s&&(o.length&&o.push(l),o.push(s)));return o.length===1&&(o=o[0]),o.length?o:null}function lu(e){var t=Pa(e),i;if(t.length===0)return null;var n=[];for(i=0;i<t.length;i++)if(Fa(t[i])){var r=lu(t[i]);r?t[i]=r:n.push(t[i])}else Ti(t[i])&&(Vee(t[i])||n.push(t[i]));for(i=0;i<n.length;i++)bm(t,n[i]);return t.length===1||(t.splice(t.length-1,1),t.length===1&&(e=Iee(e,t[0])),e.length===0)?null:e}function x1(e,t,i){if(t===""){i("");return}var n=e.lookup;if(n.items)i(n.calculateCellValue(t)||"");else{var r=Ie(n.dataSource)?n.dataSource({}):n.dataSource,a=new fr(r);a.loadSingle(n.valueExpr,t).done(function(o){var s="";o&&(s=n.displayExpr?bt(n.displayExpr)(o):o),e.customizeText&&(s=e.customizeText({value:t,valueText:s})),i(s)}).fail(function(){i("")})}}function b1(e,t,i,n,r){var a;return t===!0?a=e.trueText||fe.format("dxDataGrid-trueText"):t===!1?a=e.falseText||fe.format("dxDataGrid-falseText"):a=wee(e,t),e.customizeText&&(a=e.customizeText.call(e,{value:t,valueText:a,target:n})),i&&i.customizeText&&(a=i.customizeText.call(i,{value:t,valueText:a,field:e,target:n},r)),a}function Mee(e,t,i,n){var r={values:t};return t.map(a=>b1(e,a,i,n,r))}function Fv(e){return e===""||e===null}function S1(e,t,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"filterBuilder";if(Fv(t))return"";if(Array.isArray(t)){var r=new se;return De.apply(this,Mee(e,t,i,n)).done(function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=o.some(u=>!Fv(u))?o.map(u=>Fv(u)?"?":u):"";r.resolve(l)}),r}else return b1(e,t,i,n)}function WE(e,t){return e.some(function(i){return i.dataField===t})}function E1(e,t,i){var n=i.dataField;HC(n)&&(i.parentId=T1(n),!WE(t,i.parentId)&&!WE(e,i.parentId)&&E1(e,t,{id:i.parentId,dataType:"object",dataField:i.parentId,caption:w1(i.parentId,!0),filterOperations:["isblank","isnotblank"]})),t.push(i)}function w1(e,t){var i="";if(t)e=e.substring(e.lastIndexOf(".")+1);else if(HC(e))return e.split(".").forEach(function(n,r,a){i+=vo(n),r!==a.length-1&&(i+=".")}),i;return vo(e)}function I1(e,t){for(var i=[],n=0;n<e.length;n++){var r=k(!0,{caption:w1(e[n].dataField,t)},e[n]);r.id=r.name||r.dataField,t?E1(e,i,r):i.push(r)}return i}function HC(e){return e.lastIndexOf(".")!==-1}function T1(e){return e.substring(0,e.lastIndexOf("."))}function A1(e,t){if(HC(e.dataField)){for(var i=T1(e.dataField),n=0;n<t.length;n++)if(t[n].dataField===i)return A1(t[n],t)+"."+e.caption}return e.caption}function Sm(e,t,i){var n=Wr(i,t);return n?(n.hasValue===!1?(e[1]=t,e.length=2):(e[1]=t,e[2]=""),e):(t==="isblank"?(e[1]=FC,e[2]=null):t==="isnotblank"?(e[1]=mee,e[2]=null):(n=Wr(i,e[1]),(n||e.length===2||e[2]===null)&&(e[2]=""),e[1]=t),e)}function zE(e){var t;return e[2]===null?e[1]===FC?t="isblank":t="isnotblank":t=e[1],t}function Vee(e){return e[2]!==""}function Nee(e,t,i){var n=k(!0,[],e),r=-1;return n.some(function(a,o){if(a.name==="between")return r=o,!0}),r!==-1?n[r]=k(VE(t,i),n[r]):n.unshift(VE(t,i)),n}function wu(e,t){return e[0]===t}function Em(e,t){if(!e||e.length===0)return null;if(Ti(e)){var i=wu(e,t);return i?null:e}else return D1(e,[t],!1)}function D1(e,t,i){var n=[];return e.forEach(function(r){Ti(r)?wu(r,t[0])?i?(n.push(t),i=!1):n.splice(n.length-1,1):n.push(r):(n.length||Fa(r))&&n.push(r)}),n.length===0?null:(i&&(n.push(Ia),n.push(t)),n.length===1?n[0]:n)}function GE(e,t){if(e===null||e.length===0)return t;if(Ti(e))return wu(e,t[0])?t:[e,Ia,t];var i=Ho(e);return i!==Ia?[t,"and",e]:D1(e,t,!0)}function $ee(e,t){if(e===null||e.length===0)return[];if(Ti(e))return wu(e,t)?[e]:[];var i=Ho(e);if(i!==Ia)return[];var n=e.filter(function(r){return Ti(r)&&wu(r,t)});return n}function O1(e,t){return e===null||e.length===0?!1:Ti(e)?e[0]===t:e.some(function(i){return(Ti(i)||Fa(i))&&O1(i,t)})}var wm=function(e,t,i){if(Array.isArray(t)){var n=t.length-1;e.empty(),t.forEach((r,a)=>{v("<span>").addClass(See).text(r).appendTo(e),a!==n&&v("<span>").addClass(m1).text(i&&i.valueSeparator?i.valueSeparator:"|").addClass(Eee).appendTo(e)})}else t?e.text(t):e.text(fe.format("dxFilterBuilder-enterValueText"))};function R1(e){var t=function(n,r){return r?r+"/"+n:n},i=e&&e.getController("headerFilter");return{dataTypes:["string","date","datetime","number","boolean","object"],calculateFilterExpression:function(n,r,a){var o=[],s=n.length-1;return n&&n.forEach(function(l,u){if(Ti(l)||Fa(l)){var d=Gs(l,a,[],"headerFilter");o.push(d)}else o.push(Gs([r.dataField,"=",l],a,[],"headerFilter"));u!==s&&o.push("or")}),o.length===1&&(o=o[0]),o},editorTemplate:function(n,r){var a=v("<div>").addClass("dx-filterbuilder-item-value-text").appendTo(r),o=k(!0,{},e.columnOption(n.field.dataField));return wm(a,n.text&&n.text.split("|")),o.filterType="include",o.filterValues=n.value?n.value.slice():[],i.showHeaderFilterMenuBase({columnElement:a,column:o,apply:function(){s=this.filterValues,n.setValue(s);var s;i.hideHeaderFilterMenu(),n.closeEditor()},onHidden:function(){n.closeEditor()},isFilterBuilder:!0}),r},customizeText:function(n,r){r=r||{};var a=n.value,o=e.columnOption(n.field.dataField),s=o&&o.headerFilter,l=o&&o.lookup,u=r.values||[a];if(s&&s.dataSource||l&&l.dataSource){var d=new se,c=r.items||new se;if(!r.items){o=k({},o,{filterType:"include",filterValues:u});var h=i.getDataSource(o);h.paginate=!1;var f=new fr(h),p=f.store().key();if(p){var{values:m}=r;if(m&&m.length>1){var g=m.reduce((b,A)=>(b.length&&b.push("or"),b.push([p,"=",A]),b),[]);f.filter(g)}else f.filter([p,"=",n.value])}else n.field.calculateDisplayValue&&Qe.log("W1017");r.items=c,f.load().done(c.resolve)}return c.done(b=>{var A=u.indexOf(n.value);d.resolve(function B(D,U){var H=[];return D.forEach(function(W){if(W.items){var G=B(W.items,t(W.text,U));H=H.concat(G)}W.selected&&H.push(t(W.text,U))}),H}(b)[A])}),d}else{var C=i.getHeaderItemText(a,o,0,e.option("headerFilter"));return C}}}}function Hee(e){return k(R1(e),{name:"anyof",icon:"selectall",caption:fe.format("dxFilterBuilder-filterOperationAnyOf")})}function Wee(e){var t=R1(e);return k({},t,{calculateFilterExpression:function(i,n,r){var a=t.calculateFilterExpression(i,n,r);return!a||a.length===0?null:a[0]==="!"?a:["!",a]},name:"noneof",icon:"unselectall",caption:fe.format("dxFilterBuilder-filterOperationNoneOf")})}var zee=["=","<>","<","<=",">",">=","notcontains","contains","startswith","endswith","between"],UE="include",uu="exclude";function nr(e){return e.name||e.dataField}function Gee(e){e.forEach(t=>{var i=nr(t);if(!E(i)&&t.allowFiltering)throw new Qe.Error("E1049",t.caption)})}var Uee=Dt.Controller.inherit(function(){var e=function(){return{filterType:UE,filterValues:void 0}},t=function(o){var s=o.filterValues||[];return!$s.getGroupInterval(o)&&!(o.headerFilter&&o.headerFilter.dataSource)||s.length===1&&s[0]===null},i=function(o){var s=o.filterValue;if(E(s)){var l=o.selectedFilterOperation||o.defaultFilterOperation||MC(o),u=[nr(o),l,o.filterValue];return u}else return null},n=function(o){var s,l,u=o.filterValues;return u?(u.length===1&&t(o)&&!Array.isArray(u[0])?(o.filterType===uu?s="<>":s="=",l=u[0]):(o.filterType===uu?s="noneof":s="anyof",l=u),[nr(o),s,l]):null},r=function(o,s,l){var u=function(d,c){if(!d)return e();var h,f=d[1],p=d[2],m=Array.isArray(p);if(!m&&!t(c))return e();switch(f){case"anyof":case"=":h=UE;break;case"noneof":case"<>":h=uu;break;default:return e()}return{filterType:h,filterValues:m?p:[p]}}(l,s);o.columnOption(nr(s),u)},a=function(o,s,l){var u,d=l==null?void 0:l[1],c=l==null?void 0:l[2],h=s.filterOperations||s.defaultFilterOperations;(!h||h.indexOf(d)>=0||d===s.defaultFilterOperation)&&zee.indexOf(d)>=0&&c!==null?(d===s.defaultFilterOperation&&!E(s.selectedFilterOperation)&&(d=s.selectedFilterOperation),u={filterValue:c,selectedFilterOperation:d}):u={filterValue:void 0,selectedFilterOperation:void 0},o.columnOption(nr(s),u)};return{syncFilterValue:function(){var o=this,s=o.getController("columns"),l=s.getFilteringColumns();this._skipSyncColumnOptions=!0,l.forEach(function(u){var d=$ee(o.option("filterValue"),nr(u));if(d.length===1){var c=d[0];r(s,u,c),a(s,u,c)}else E(u.filterValues)&&r(s,u),E(u.filterValue)&&a(s,u)}),this._skipSyncColumnOptions=!1},_initSync:function(){var o=this.getController("columns").getColumns(),s=this.getController("data"),l=s.pageIndex();if(Gee(o),!this.option("filterValue")){var u=this.getController("columns").getFilteringColumns(),d=this.getFilterValueFromColumns(u);this.option("filterValue",d)}this.syncFilterValue(),s.pageIndex(l)},init:function(){var o=this.getController("data");o.isFilterSyncActive()&&(this.getController("columns").isAllDataTypesDefined()?this._initSync():o.dataSourceChanged.add(()=>this._initSync()))},_getSyncFilterRow:function(o,s){var l=i(s);return E(l)?GE(o,l):Em(o,nr(s))},_getSyncHeaderFilter:function(o,s){var l=n(s);return l?GE(o,l):Em(o,nr(s))},getFilterValueFromColumns:function(o){if(!this.getController("data").isFilterSyncActive())return null;var s=["and"];return o&&o.forEach(l=>{var u=n(l),d=i(l);u&&wh(u,s),d&&wh(d,s)}),lu(s)},syncFilterRow:function(o,s){this.option("filterValue",this._getSyncFilterRow(this.option("filterValue"),o))},syncHeaderFilter:function(o){this.option("filterValue",this._getSyncHeaderFilter(this.option("filterValue"),o))},getCustomFilterOperations:function(){var o=this.option("filterBuilder.customOperations")||[];return[Hee(this.component),Wee(this.component)].concat(o)},publicMethods:function(){return["getCustomFilterOperations"]}}}()),Kee={isFilterSyncActive:function(){var e=this.option("filterSyncEnabled");return e==="auto"?this.option("filterPanel.visible"):e},skipCalculateColumnFilters:function(){return E(this.option("filterValue"))&&this.isFilterSyncActive()},_calculateAdditionalFilter:function(){if(this.option("filterPanel.filterEnabled")===!1)return this.callBase();var e=[this.callBase()],t=this.getController("columns").getFilteringColumns(),i=this.option("filterValue");if(this.isFilterSyncActive()){var n=this.getController("headerFilter").getCurrentColumn();n&&i&&(i=Em(i,nr(n)))}var r=this.getController("filterSync").getCustomFilterOperations(),a=Gs(i,t,r,"filterBuilder");return a&&e.push(a),be.combineFilters(e)},_parseColumnPropertyName:function(e){var t=e.match(/.*\.(.*)/);return t?t[1]:null},clearFilter:function(e){this.component.beginUpdate(),arguments.length>0?(e==="filterValue"&&this.option("filterValue",null),this.callBase(e)):(this.option("filterValue",null),this.callBase()),this.component.endUpdate()},optionChanged:function(e){switch(e.name){case"filterValue":this._applyFilter(),this.isFilterSyncActive()&&this.getController("filterSync").syncFilterValue(),e.handled=!0;break;case"filterSyncEnabled":e.handled=!0;break;case"columns":if(this.isFilterSyncActive()){var t=this.getController("columns").getColumnByPath(e.fullName),i=this.getController("filterSync");if(t&&!i._skipSyncColumnOptions){var n=this._parseColumnPropertyName(e.fullName);i._skipSyncColumnOptions=!0,n==="filterType"?(uu===e.value||uu===e.previousValue)&&i.syncHeaderFilter(t):n==="filterValues"?i.syncHeaderFilter(t):["filterValue","selectedFilterOperation"].indexOf(n)>-1&&i.syncFilterRow(t,t.filterValue),i._skipSyncColumnOptions=!1}}this.callBase(e);break;default:this.callBase(e)}}},jee={_isHeaderFilterEmpty:function(e){return this.getController("data").isFilterSyncActive()?!O1(this.option("filterValue"),nr(e)):this.callBase(e)},_needUpdateFilterIndicators:function(){return!this.getController("data").isFilterSyncActive()},optionChanged:function(e){e.name==="filterValue"?this._updateHeaderFilterIndicators():this.callBase(e)}},qee={defaultOptions:function(){return{filterValue:null,filterSyncEnabled:"auto"}},controllers:{filterSync:Uee},extenders:{controllers:{data:Kee},views:{columnHeadersView:jee}}};Oe.registerModule("filterSync",qee);var yn="dx-filterbuilder",Us=yn+"-group",KE=Us+"-item",jE=Us+"-content",Yee=Us+"-operations",Xee=Us+"-operation",Im=yn+"-action",qE=Im+"-icon",Zee="dx-icon-plus",Jee="dx-icon-remove",kl=yn+"-text",Qee=yn+"-item-field",ete=yn+"-item-operation",YE=yn+"-item-value",tte=yn+"-item-value-text",ite=yn+"-overlay",nte=yn+"-operations",rte=yn+"-fields",ate=yn+"-add-condition",dc="dx-state-active",ote=yn+"-menu-custom-operation",XE="filterBuilder",ste="dx-state-disabled",ZE="tab",Mv="enter",JE="escape",lte=[{name:"onEditorPreparing",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onEditorPrepared",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onValueChanged",config:{excludeValidators:["disabled","readOnly"]}}],QE={and:"and",or:"or",notAnd:"!and",notOr:"!or"},ute=it.inherit(IR),k1=_i.inherit({_getDefaultOptions:function(){return k(this.callBase(),{onEditorPreparing:null,onEditorPrepared:null,onValueChanged:null,fields:[],groupOperations:["and","or","notAnd","notOr"],maxGroupLevel:void 0,value:null,allowHierarchicalFields:!1,groupOperationDescriptions:{and:fe.format("dxFilterBuilder-and"),or:fe.format("dxFilterBuilder-or"),notAnd:fe.format("dxFilterBuilder-notAnd"),notOr:fe.format("dxFilterBuilder-notOr")},customOperations:[],closePopupOnTargetScroll:!0,filterOperationDescriptions:{between:fe.format("dxFilterBuilder-filterOperationBetween"),equal:fe.format("dxFilterBuilder-filterOperationEquals"),notEqual:fe.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:fe.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:fe.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:fe.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:fe.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:fe.format("dxFilterBuilder-filterOperationStartsWith"),contains:fe.format("dxFilterBuilder-filterOperationContains"),notContains:fe.format("dxFilterBuilder-filterOperationNotContains"),endsWith:fe.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:fe.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:fe.format("dxFilterBuilder-filterOperationIsNotBlank")}})},_optionChanged:function(e){switch(e.name){case"closePopupOnTargetScroll":break;case"onEditorPreparing":case"onEditorPrepared":case"onValueChanged":this._initActions();break;case"customOperations":this._initCustomOperations(),this._invalidate();break;case"fields":case"maxGroupLevel":case"groupOperations":case"allowHierarchicalFields":case"groupOperationDescriptions":case"filterOperationDescriptions":this._invalidate();break;case"value":if(e.value!==e.previousValue){var t=this._disableInvalidateForValue;t||(this._initModel(),this._invalidate()),this._disableInvalidateForValue=!1,this.executeAction("onValueChanged",{value:e.value,previousValue:e.previousValue}),this._disableInvalidateForValue=t}break;default:this.callBase(e)}},getFilterExpression:function(){var e=this._getNormalizedFields(),t=k(!0,[],this._model);return Gs(lu(t),e,this._customOperations,XE)},_getNormalizedFields:function(){return Fee(this.option("fields"))},_updateFilter:function(){this._disableInvalidateForValue=!0;var e=k(!0,[],this._model),t=lu(e),i=lu(this._getModel(this.option("value")));JSON.stringify(i)!==JSON.stringify(t)&&this.option("value",t),this._disableInvalidateForValue=!1,this._fireContentReadyAction()},_init:function(){this._initCustomOperations(),this._initModel(),this._initEditorFactory(),this._initActions(),this.callBase()},_initEditorFactory:function(){this._editorFactory=new ute},_initCustomOperations:function(){this._customOperations=Nee(this.option("customOperations"),this.option("filterOperationDescriptions.between"),this)},_getDefaultGroupOperation:function(){var e,t;return(e=(t=this.option("groupOperations"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:QE.and},_getModel:function(e){return $C(e,this._customOperations,this._getDefaultGroupOperation())},_initModel:function(){this._model=this._getModel(this.option("value"))},_initActions:function(){var e=this;e._actions={},lte.forEach(function(t){var i=k({},t.config);e._actions[t.name]=e._createActionByOption(t.name,i)})},executeAction:function(e,t){var i=this._actions[e];return i&&i(t)},_initMarkup:function(){this.$element().addClass(yn),this.callBase(),this._createGroupElementByCriteria(this._model).appendTo(this.$element())},_createConditionElement:function(e,t){return v("<div>").addClass(Us).append(this._createConditionItem(e,t))},_createGroupElementByCriteria:function(e,t){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=this._createGroupElement(e,t,i),r=n.find("."+jE),a=Pa(e),o=0;o<a.length;o++){var s=a[o];Fa(s)?this._createGroupElementByCriteria(s,e,i+1).appendTo(r):Ti(s)&&this._createConditionElement(s,e).appendTo(r)}return n},_createGroupElement:function(e,t,i){var n=v("<div>").addClass(KE),r=v("<div>").addClass(jE),a=v("<div>").addClass(Us).append(n).append(r);return t!=null&&this._createRemoveButton(()=>{bm(t,e),a.remove(),this._updateFilter()}).appendTo(n),this._createGroupOperationButton(e).appendTo(n),this._createAddButton(()=>{var o=y1(this._getDefaultGroupOperation());wh(o,e),this._createGroupElement(o,e,i+1).appendTo(r),this._updateFilter()},()=>{var o=this.option("fields")[0],s=Lee(o,this._customOperations);wh(s,e),this._createConditionElement(s,e).appendTo(r),this._updateFilter()},i).appendTo(n),a},_createButton:function(e){return v("<div>").text(e)},_createGroupOperationButton:function(e){var t=this._getGroupOperations(e),i=Dee(e,t),n=i.text,r=t&&t.length<2?this._createButton(n).addClass(ste):this._createButtonWithMenu({caption:n,menu:{items:t,displayExpr:"text",keyExpr:"value",onItemClick:a=>{i!==a.itemData&&(Aee(e,a.itemData.value),r.text(a.itemData.text),i=a.itemData,this._updateFilter())},onContentReady:function(a){a.component.selectItem(i)},cssClass:Yee}});return r.addClass(kl).addClass(Xee).attr("tabindex",0)},_createButtonWithMenu:function(e){var t=this,i=function(){t.$element().find("."+dc).removeClass(dc),t.$element().find(".dx-overlay .dx-treeview").remove(),t.$element().find(".dx-overlay").remove()},n=this.option("rtlEnabled"),r=n?"right":"left",a=this._createButton(e.caption);k(e.menu,{focusStateEnabled:!0,selectionMode:"single",onItemClick:(o=e.menu.onItemClick,function(s){o(s),s.event.type==="dxclick"&&i()}),onHiding:function(s){a.removeClass(dc)},position:{my:r+" top",at:r+" bottom",offset:"0 1",of:a,collision:"flip"},animation:null,onHidden:function(){i()},cssClass:ite+" "+e.menu.cssClass,rtlEnabled:n});var o;return e.popup={onShown:function(s){var l=v(s.component.content()).find(".dx-treeview"),u=l.dxTreeView("instance");R.on(l,"keyup keydown",function(d){var c=$t(d);(d.type==="keydown"&&c===ZE||d.type==="keyup"&&(c===JE||c===Mv))&&(s.component.hide(),R.trigger(e.menu.position.of,"focus"))}),u.focus(),u.option("focusedElement",null)}},this._subscribeOnClickAndEnterKey(a,function(){i(),t._createPopupWithTreeView(e,t.$element()),a.addClass(dc)}),a},_hasValueButton:function(e){var t=Wr(this._customOperations,e[1]);return t?t.hasValue!==!1:e[2]!==null},_createOperationButtonWithMenu:function(e,t){var i=this,n=Bee(t,this.option("filterOperationDescriptions"),this._customOperations),r=kee(zE(e),n),a=this._createButtonWithMenu({caption:r.text,menu:{items:n,displayExpr:"text",onItemRendered:function(o){o.itemData.isCustom&&v(o.itemElement).addClass(ote)},onContentReady:function(o){o.component.selectItem(r)},onItemClick:o=>{if(r!==o.itemData){r=o.itemData,Sm(e,r.value,i._customOperations);var s=a.siblings().filter("."+YE);i._hasValueButton(e)?(s.length!==0&&s.remove(),i._createValueButton(e,t).appendTo(a.parent())):s.remove(),a.html(r.text),this._updateFilter()}},cssClass:nte}}).addClass(kl).addClass(ete).attr("tabindex",0);return a},_createOperationAndValueButtons:function(e,t,i){this._createOperationButtonWithMenu(e,t).appendTo(i),this._hasValueButton(e)&&this._createValueButton(e,t).appendTo(i)},_createFieldButtonWithMenu:function(e,t,i){var n=this,r=this.option("allowHierarchicalFields"),a=I1(e,r),o=Ih(i.name||i.dataField,a),s=function(u,d){return r?A1(u,d):u.caption},l=this._createButtonWithMenu({caption:s(o,a),menu:{items:a,dataStructure:"plain",keyExpr:"id",parentId:"parentId",displayExpr:"caption",onItemClick:u=>{if(o!==u.itemData){o=u.itemData,t[0]=o.name||o.dataField,t[2]=o.dataType==="object"?null:"",Sm(t,MC(o),n._customOperations),l.siblings().filter("."+kl).remove(),n._createOperationAndValueButtons(t,o,l.parent());var d=s(o,u.component.option("items"));l.html(d),this._updateFilter()}},onContentReady:function(u){u.component.selectItem(o)},cssClass:rte}}).addClass(kl).addClass(Qee).attr("tabindex",0);return l},_createConditionItem:function(e,t){var i=v("<div>").addClass(KE),n=this._getNormalizedFields(),r=Ih(e[0],n);return this._createRemoveButton(()=>{bm(t,e);var a=i.parent().children().length===1;a?i.parent().remove():i.remove(),this._updateFilter()}).appendTo(i),this._createFieldButtonWithMenu(n,e,r).appendTo(i),this._createOperationAndValueButtons(e,r,i),i},_getGroupOperations:function(e){var t=this.option("groupOperations"),i=this.option("groupOperationDescriptions");return(!t||!t.length)&&(t=[Ho(e).replace("!","not")]),t.map(n=>({text:i[n],value:QE[n]}))},_createRemoveButton:function(e){var t=v("<div>").addClass(qE).addClass(Jee).addClass(Im).attr("tabindex",0);return this._subscribeOnClickAndEnterKey(t,e),t},_createAddButton:function(e,t,i){var n,r=this.option("maxGroupLevel");return E(r)&&i>=r?(n=this._createButton(),this._subscribeOnClickAndEnterKey(n,t)):n=this._createButtonWithMenu({menu:{items:[{caption:fe.format("dxFilterBuilder-addCondition"),click:t},{caption:fe.format("dxFilterBuilder-addGroup"),click:e}],displayExpr:"caption",onItemClick:function(a){a.itemData.click()},cssClass:ate}}),n.addClass(qE).addClass(Zee).addClass(Im).attr("tabindex",0)},_createValueText:function(e,t,i){var n=this,r=v("<div>").html("&nbsp;").addClass(tte).attr("tabindex",0).appendTo(i),a=e[2],o=Wr(n._customOperations,e[1]);return!o&&t.lookup?x1(t,a,function(s){wm(r,s)}):De(S1(t,a,o)).done(s=>{wm(r,s,o)}),n._subscribeOnClickAndEnterKey(r,function(s){s.type==="keyup"&&s.stopPropagation(),n._createValueEditorWithEvents(e,t,i)}),r},_updateConditionValue:function(e,t,i){var n=e[2]!==t;n&&(e[2]=t),i(),this._updateFilter()},_addDocumentKeyUp:function(e,t){var i=!1,n=!1,r=me.getDocument(),a=s=>{if(i||n){n=!1;return}t(s)};R.on(r,"keyup",a);var o=e.find("input");R.on(o,"compositionstart",()=>{i=!0}),R.on(o,"compositionend",()=>{i=!1,n=!0}),R.on(o,"keydown",s=>{s.which!==229&&(n=!1)}),this._documentKeyUpHandler=a},_addDocumentClick:function(e,t){var i=me.getDocument(),n=r=>{this._isFocusOnEditorParts(e,r.target)||(R.trigger(e.find("input"),"change"),t())};R.on(i,"dxpointerdown",n),this._documentClickHandler=n},_isFocusOnEditorParts:function(e,t){var i=t||me.getActiveElement();return v(i).closest(e.children()).length||v(i).closest(".dx-dropdowneditor-overlay").length},_removeEvents:function(){var e=me.getDocument();E(this._documentKeyUpHandler)&&R.off(e,"keyup",this._documentKeyUpHandler),E(this._documentClickHandler)&&R.off(e,"dxpointerdown",this._documentClickHandler)},_dispose:function(){this._removeEvents(),this.callBase()},_createValueEditorWithEvents:function(e,t,i){var n=e[2],r=()=>(i.empty(),this._removeEvents(),this._createValueText(e,t,i)),a=()=>{this._updateConditionValue(e,n,function(){r()})},o={value:n===""?null:n,filterOperation:zE(e),setValue:function(l){n=l===null?"":l},closeEditor:a,text:i.text()};i.empty();var s=this._createValueEditor(i,t,o);R.trigger(s.find("input").not(":hidden").eq(0),"focus"),this._removeEvents(),this._addDocumentClick(s,a),this._addDocumentKeyUp(s,l=>{var u=$t(l);if(u===ZE){if(this._isFocusOnEditorParts(s))return;this._updateConditionValue(e,n,function(){r(),l.shiftKey&&R.trigger(i.prev(),"focus")})}u===JE&&R.trigger(r(),"focus"),u===Mv&&this._updateConditionValue(e,n,function(){R.trigger(r(),"focus")})}),this._fireContentReadyAction()},_createValueButton:function(e,t){var i=v("<div>").addClass(kl).addClass(YE);return this._createValueText(e,t,i),i},_createValueEditor:function(e,t,i){var n=v("<div>").attr("tabindex",0).appendTo(e),r=Wr(this._customOperations,i.filterOperation),a=r&&r.editorTemplate?r.editorTemplate:t.editorTemplate;if(a){var o=this._getTemplate(a);o.render({model:k({field:t},i),container:n})}else this._editorFactory.createEditor.call(this,n,k({},t,i,{parentType:XE}));return n},_createPopupWithTreeView:function(e,t){var i=this,n=v("<div>").addClass(e.menu.cssClass).appendTo(t);this._createComponent(n,Cr,{wrapperAttr:{class:e.menu.cssClass},onHiding:e.menu.onHiding,onHidden:e.menu.onHidden,rtlEnabled:e.menu.rtlEnabled,position:e.menu.position,animation:e.menu.animation,contentTemplate:function(r){var a=v("<div>").appendTo(r);i._createComponent(a,cd,e.menu),this.repaint()},_ignoreFunctionValueDeprecation:!0,maxHeight:function(){return u1(e.menu.position.of)},visible:!0,focusStateEnabled:!1,hideOnParentScroll:this.option("closePopupOnTargetScroll"),hideOnOutsideClick:!0,onShown:e.popup.onShown,shading:!1,width:"auto",height:"auto",showTitle:!1})},_subscribeOnClickAndEnterKey:function(e,t){R.on(e,"dxclick",t),R.on(e,"keyup",function(i){$t(i)===Mv&&t(i)})}});tt("dxFilterBuilder",k1);var dte=Dt.View.inherit({_renderCore:function(){this._updatePopupOptions()},_updatePopupOptions:function(){this.option("filterBuilderPopup.visible")?this._initPopup():this._filterBuilderPopup&&this._filterBuilderPopup.hide()},_disposePopup:function(){this._filterBuilderPopup&&(this._filterBuilderPopup.dispose(),this._filterBuilderPopup=void 0),this._filterBuilder&&(this._filterBuilder.dispose(),this._filterBuilder=void 0)},_initPopup:function(){var e=this;e._disposePopup(),e._filterBuilderPopup=e._createComponent(e.element(),Cr,k({title:fe.format("dxDataGrid-filterBuilderPopupTitle"),contentTemplate:function(t){return e._getPopupContentTemplate(t)},onOptionChanged:function(t){t.name==="visible"&&e.option("filterBuilderPopup.visible",t.value)},toolbarItems:e._getPopupToolbarItems()},e.option("filterBuilderPopup"),{onHidden:function(t){zg(e),e._disposePopup()}}))},_getPopupContentTemplate:function(e){var t=v(e),i=v("<div>").appendTo(v(e));this._filterBuilder=this._createComponent(i,k1,k({value:this.option("filterValue"),fields:this.getController("columns").getFilteringColumns()},this.option("filterBuilder"),{customOperations:this.getController("filterSync").getCustomFilterOperations()})),this._createComponent(t,gC,{direction:"both"})},_getPopupToolbarItems:function(){var e=this;return[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:fe.format("OK"),onClick:function(t){var i=e._filterBuilder.option("value");e.option("filterValue",i),e._filterBuilderPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:fe.format("Cancel"),onClick:function(t){e._filterBuilderPopup.hide()}}}]},optionChanged:function(e){switch(e.name){case"filterBuilder":case"filterBuilderPopup":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),cte={defaultOptions:function(){return{filterBuilder:{groupOperationDescriptions:{and:fe.format("dxFilterBuilder-and"),or:fe.format("dxFilterBuilder-or"),notAnd:fe.format("dxFilterBuilder-notAnd"),notOr:fe.format("dxFilterBuilder-notOr")},filterOperationDescriptions:{between:fe.format("dxFilterBuilder-filterOperationBetween"),equal:fe.format("dxFilterBuilder-filterOperationEquals"),notEqual:fe.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:fe.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:fe.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:fe.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:fe.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:fe.format("dxFilterBuilder-filterOperationStartsWith"),contains:fe.format("dxFilterBuilder-filterOperationContains"),notContains:fe.format("dxFilterBuilder-filterOperationNotContains"),endsWith:fe.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:fe.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:fe.format("dxFilterBuilder-filterOperationIsNotBlank")}},filterBuilderPopup:{}}},views:{filterBuilderView:dte}};Oe.registerModule("filterBuilder",cte);var hd="filter-panel",hte=hd+"-text",fte=hd+"-checkbox",pte=hd+"-clear-filter",vte=hd+"-left",_te="filterPanel",mte=Dt.View.inherit({isVisible:function(){return this.option("filterPanel.visible")&&this.getController("data").dataSource()},init:function(){this.getController("data").dataSourceChanged.add(()=>this.render())},_renderCore:function(){var e=this.element();e.empty().addClass(this.addWidgetPrefix(hd));var t=v("<div>").addClass(this.addWidgetPrefix(vte)).appendTo(e);this.option("filterValue")||this._filterValueBuffer?(t.append(this._getCheckElement()).append(this._getFilterElement()).append(this._getTextElement()),e.append(this._getRemoveButtonElement())):t.append(this._getFilterElement()).append(this._getTextElement())},_getCheckElement:function(){var e=this,t=v("<div>").addClass(this.addWidgetPrefix(fte));return e._createComponent(t,wo,{value:e.option("filterPanel.filterEnabled"),onValueChanged:function(i){e.option("filterPanel.filterEnabled",i.value)}}),t.attr("title",this.option("filterPanel.texts.filterEnabledHint")),t},_getFilterElement:function(){var e=this,t=v("<div>").addClass("dx-icon-filter");return R.on(t,"click",()=>e._showFilterBuilder()),nu("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t},_getTextElement:function(){var e=this,t=v("<div>").addClass(e.addWidgetPrefix(hte)),i,n=e.option("filterValue");return n?De(e.getFilterText(n,e.getController("filterSync").getCustomFilterOperations())).done(function(r){var a=e.option("filterPanel.customizeText");if(a){var o=a({component:e.component,filterValue:n,text:r});typeof o=="string"&&(r=o)}t.text(r)}):(i=e.option("filterPanel.texts.createFilter"),t.text(i)),R.on(t,"click",()=>e._showFilterBuilder()),nu("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t},_showFilterBuilder:function(){this.option("filterBuilderPopup.visible",!0)},_getRemoveButtonElement:function(){var e=this,t=()=>e.option("filterValue",null),i=v("<div>").addClass(e.addWidgetPrefix(pte)).text(e.option("filterPanel.texts.clearFilter"));return R.on(i,"click",t),nu("filterPanel",this,i,void 0,t),e._addTabIndexToElement(i),i},_addTabIndexToElement:function(e){if(!this.option("useLegacyKeyboardNavigation")){var t=this.option("tabindex")||0;e.attr("tabindex",t)}},optionChanged:function(e){switch(e.name){case"filterValue":this._invalidate(),this.option("filterPanel.filterEnabled",!0),e.handled=!0;break;case"filterPanel":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}},_getConditionText:function(e,t,i){var n="[".concat(e,"] ").concat(t);return E(i)&&(n+=i),n},_getValueMaskedText:function(e){return Array.isArray(e)?"('".concat(e.join("', '"),"')"):" '".concat(e,"'")},_getValueText:function(e,t,i){var n=new se,r=t&&t.customizeText;if(E(i)||r)if(!r&&e.lookup)x1(e,i,o=>{n.resolve(this._getValueMaskedText(o))});else{var a=Array.isArray(i)?i:be.getDisplayValue(e,i);De(S1(e,a,t,_te)).done(o=>{n.resolve(this._getValueMaskedText(o))})}else n.resolve("");return n.promise()},getConditionText:function(e,t){var i=this,n=e[1],r=new se,a=Wr(t.customOperations,n),o,s=Ih(e[0],t.columns),l=s.caption||"",u=e[2];return a?o=a.caption||vo(a.name):u===null?o=xm(n==="="?"isblank":"isnotblank",t.filterOperationDescriptions):o=xm(n,t.filterOperationDescriptions),this._getValueText(s,a,u).done(d=>{r.resolve(i._getConditionText(l,o,d))}),r},getGroupText:function(e,t,i){var n=this,r=new se,a=[],o=Ho(e);return e.forEach(s=>{Ti(s)?a.push(n.getConditionText(s,t)):Fa(s)&&a.push(n.getGroupText(s,t,!0))}),De.apply(this,a).done(function(){for(var s,l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];if(o[0]==="!"){var c=t.groupOperationDescriptions["not"+o.substring(1,2).toUpperCase()+o.substring(2)].split(" ");s="".concat(c[0]," ").concat(u[0])}else s=u.join(" ".concat(t.groupOperationDescriptions[o]," "));i&&(s="(".concat(s,")")),r.resolve(s)}),r},getFilterText:function(e,t){var i={customOperations:t,columns:this.getController("columns").getFilteringColumns(),filterOperationDescriptions:this.option("filterBuilder.filterOperationDescriptions"),groupOperationDescriptions:this.option("filterBuilder.groupOperationDescriptions")};return Ti(e)?this.getConditionText(e,i):this.getGroupText(e,i)}}),gte={defaultOptions:function(){return{filterPanel:{visible:!1,filterEnabled:!0,texts:{createFilter:fe.format("dxDataGrid-filterPanelCreateFilter"),clearFilter:fe.format("dxDataGrid-filterPanelClearFilter"),filterEnabledHint:fe.format("dxDataGrid-filterPanelFilterEnabledHint")}}}},views:{filterPanelView:mte},extenders:{controllers:{data:{optionChanged:function(e){switch(e.name){case"filterPanel":this._applyFilter(),e.handled=!0;break;default:this.callBase(e)}}}}}};Oe.registerModule("filterPanel",gte);var ew="search-panel",tw="search-text",Cte="header-panel",yte=700;function iw(e){return E(e.allowSearch)?e.allowSearch:e.allowFiltering}function nw(e,t){var i=e.lookup;return e.parseValue?i?e.parseValue.call(i,t):e.parseValue(t):t}var xte={defaultOptions:function(){return{searchPanel:{visible:!1,width:160,placeholder:fe.format("dxDataGrid-searchPanelPlaceholder"),highlightSearchText:!0,highlightCaseSensitive:!1,text:"",searchVisibleColumnsOnly:!1}}},extenders:{controllers:{data:{publicMethods:function(){return this.callBase().concat(["searchByText"])},_calculateAdditionalFilter:function(){var e=this.callBase(),t=function(i,n){var r,a,o=i._columnsController.getColumns(),s=i.option("searchPanel.searchVisibleColumnsOnly"),l,u=[];if(!n)return null;function d(h){for(var f=bt(l.valueExpr),p=0;p<h.length;p++){var m=f(h[p]);u.push(a.createFilterExpression(m,null,"search"))}}for(r=0;r<o.length;r++)if(a=o[r],!(s&&!a.visible)&&iw(a)&&a.calculateFilterExpression){l=a.lookup;var c=nw(a,n);l&&l.items?Yi(l.items).filter(a.createFilterExpression.call({dataField:l.displayExpr,dataType:l.dataType,calculateFilterExpression:a.calculateFilterExpression},c,null,"search")).enumerate().done(d):c!==void 0&&u.push(a.createFilterExpression(c,null,"search"))}return u.length===0?["!"]:be.combineFilters(u,"or")}(this,this.option("searchPanel.text"));return be.combineFilters([e,t])},searchByText:function(e){this.option("searchPanel.text",e)},optionChanged:function(e){switch(e.fullName){case"searchPanel.text":case"searchPanel":this._applyFilter(),e.handled=!0;break;default:this.callBase(e)}}}},views:{headerPanel:function(){var e=function(t){return t.option("searchPanel")};return{_getToolbarItems:function(){var t=this.callBase();return this._prepareSearchItem(t)},_prepareSearchItem:function(t){var i=this,n=i.getController("data"),r=e(i);if(r&&r.visible){var a={template:function(o,s,l){var u=v("<div>").addClass(i.addWidgetPrefix(ew)).appendTo(l);i.getController("editorFactory").createEditor(u,{width:r.width,placeholder:r.placeholder,parentType:"searchPanel",value:i.option("searchPanel.text"),updateValueTimeout:yte,setValue:function(d){n.searchByText(d)},editorOptions:{inputAttr:{"aria-label":fe.format("".concat(i.component.NAME,"-ariaSearchInGrid"))}}}),i.resize()},name:"searchPanel",location:"after",locateInMenu:"never",sortIndex:40};t.push(a)}return t},getSearchTextEditor:function(){var t=this,i=t.element(),n=i.find("."+t.addWidgetPrefix(ew)).filter(function(){return v(this).closest("."+t.addWidgetPrefix(Cte)).is(i)});return n.length?n.dxTextBox("instance"):null},isVisible:function(){var t=e(this);return this.callBase()||t&&t.visible},optionChanged:function(t){if(t.name==="searchPanel"){if(t.fullName==="searchPanel.text"){var i=this.getSearchTextEditor();i&&i.option("value",t.value)}else this._invalidate();t.handled=!0}else this.callBase(t)}}}(),rowsView:{init:function(){this.callBase.apply(this,arguments),this._searchParams=[]},_getFormattedSearchText:function(e,t){var i=nw(e,t),n=be.getFormatOptionsByColumn(e,"search");return be.formatValue(i,n)},_getStringNormalizer:function(){var e=this.option("searchPanel.highlightCaseSensitive");return function(t){return e?t:t.toLowerCase()}},_findHighlightingTextNodes:function(e,t,i){var n,r=t.parent(),a,o=this._getStringNormalizer(),s=o(i),l=[];if(!r.length)r=v("<div>").append(t);else if(e)if(e.groupIndex>=0&&!e.showWhenGrouped)a=t;else{var u=this._columnsController.getVisibleIndex(e.index);a=r.children("td").eq(u).find("*")}return a=(n=a)!==null&&n!==void 0&&n.length?a:r.find("*"),a.each(function(d,c){for(var h=v(c).contents(),f=0;f<h.length;f++){var p=h.get(f);if(p.nodeType===3){var m=o(p.textContent||p.nodeValue);m.indexOf(s)>-1&&l.push(p)}}}),l},_highlightSearchTextCore:function(e,t){var i=v("<span>").addClass(this.addWidgetPrefix(tw)),n=e.text(),r=e[0],a=this._getStringNormalizer(),o=a(n).indexOf(a(t));if(o>=0)return r.textContent?r.textContent=n.substr(0,o):r.nodeValue=n.substr(0,o),e.after(i.text(n.substr(o,t.length))),e=v(me.createTextNode(n.substr(o+t.length))).insertAfter(i),this._highlightSearchTextCore(e,t)},_highlightSearchText:function(e,t,i){var n=this,r=this._getStringNormalizer(),a=n.option("searchPanel.text");if(t&&i&&(a=a&&n._getFormattedSearchText(i,a)),a&&n.option("searchPanel.highlightSearchText")){var o=n._findHighlightingTextNodes(i,e,a);o.forEach(s=>{t?r(v(s).text())===r(a)&&v(s).replaceWith(v("<span>").addClass(n.addWidgetPrefix(tw)).text(v(s).text())):n._highlightSearchTextCore(v(s),a)})}},_renderCore:function(){this.callBase.apply(this,arguments),(this.option().rowTemplate||this.option("dataRowTemplate"))&&(this.option("templatesRenderAsynchronously")?(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){this._highlightSearchText(this.getTableElement())}).bind(this))):this._highlightSearchText(this.getTableElement()))},_updateCell:function(e,t){var i=t.column,n=i.lookup&&i.lookup.dataType||i.dataType,r=n!=="string";iw(i)&&!t.isOnForm&&(this.option("templatesRenderAsynchronously")?(this._searchParams.length||(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){this._searchParams.forEach((function(a){this._highlightSearchText.apply(this,a)}).bind(this)),this._searchParams=[]}).bind(this))),this._searchParams.push([e,r,i])):this._highlightSearchText(e,r,i)),this.callBase(e,t)},dispose:function(){clearTimeout(this._highlightTimer),this.callBase()}}}}};Oe.registerModule("search",xte);class bte extends sd{_optionChanged(t){switch(t.name){case"pageIndex":var i=this.option("pageIndexChanged");i&&i(t.value);break;case"pageSize":var n=this.option("pageSizeChanged");n&&n(t.value)}super._optionChanged(t)}}function Ste(e){return e?Number(e.replace("px","")):0}function Ah(e,t){var i,n=(i=aR(t))!==null&&i!==void 0?i:{};return Ste(n[e])}function Yl(e){return Ah("width",e)}function B1(e){return Ah("minWidth",e)}var Ete=["contentTemplate","pagerProps"],wte=e=>{var{contentAttributes:t,infoTextRef:i,infoTextVisible:n,isLargeDisplayMode:r,pageSizesRef:a,pagesRef:o,parentRef:s,props:{contentTemplate:l}}=e;return l(Se({rootElementRef:s,pageSizesRef:a,infoTextRef:i,pagesRef:o,infoTextVisible:n,isLargeDisplayMode:r},t))};function Ite(e){var{pageSizes:t,pages:i,parent:n}=e;return n-(t+i)>0}function Tte(e){var{info:t,pageSizes:i,pages:n,parent:r}=e,a=i+n+t;return r-a>0}function Ate(e){var{info:t,pageSizes:i,pages:n,parent:r}=e,a=Yl(r),o=Yl(i),s=Yl(t),l=Yl(n);return{parent:a,pageSizes:o,info:s+Ah("marginLeft",t)+Ah("marginRight",t),pages:l}}var Dte={},Ote=e=>e&&(e.defaultProps?t=>ln(Tt(2,e,Se({},t))):e);class L1 extends gr{constructor(t){super(t),this.parentRef=Ei(),this.pageSizesRef=Ei(),this.infoTextRef=Ei(),this.pagesRef=Ei(),this.actualIsLargeDisplayMode=!0,this.actualInfoTextVisible=!0,this.state={infoTextVisible:!0,isLargeDisplayMode:!0},this.subscribeToResize=this.subscribeToResize.bind(this),this.effectUpdateChildProps=this.effectUpdateChildProps.bind(this),this.updateAdaptivityProps=this.updateAdaptivityProps.bind(this)}createEffects(){return[new kt(this.subscribeToResize,[this.state.infoTextVisible,this.state.isLargeDisplayMode]),new kt(this.effectUpdateChildProps,[this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])]}updateEffects(){var t,i;(t=this._effects[0])===null||t===void 0||t.update([this.state.infoTextVisible,this.state.isLargeDisplayMode]),(i=this._effects[1])===null||i===void 0||i.update([this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])}subscribeToResize(){var t=()=>{this.parentWidth>0&&this.updateAdaptivityProps()};return _o.add(t),()=>{_o.remove(t)}}effectUpdateChildProps(){this.parentWidth>0&&this.updateAdaptivityProps()}get contentAttributes(){var{className:t,displayMode:i,gridCompatibility:n,hasKnownLastPage:r,infoText:a,lightModeEnabled:o,maxPagesCount:s,onKeyDown:l,pageCount:u,pageIndex:d,pageIndexChange:c,pageSize:h,pageSizeChange:f,pageSizes:p,pagesCountText:m,pagesNavigatorVisible:g,rtlEnabled:C,showInfo:b,showNavigationButtons:A,showPageSizes:B,totalCount:D,visible:U}=this.props.pagerProps;return Se({},this.restAttributes,{pageSize:h,pageIndex:d,pageIndexChange:c,pageSizeChange:f,gridCompatibility:n,className:t,showInfo:b,infoText:a,lightModeEnabled:o,displayMode:i,maxPagesCount:s,pageCount:u,pagesCountText:m,visible:U,hasKnownLastPage:r,pagesNavigatorVisible:g,showPageSizes:B,pageSizes:p,rtlEnabled:C,showNavigationButtons:A,totalCount:D,onKeyDown:l})}get parentWidth(){return this.parentRef.current?Yl(this.parentRef.current):0}updateAdaptivityProps(){var t=Ate({parent:this.parentRef.current,pageSizes:this.pageSizesRef.current,info:this.infoTextRef.current,pages:this.pagesRef.current});if(!(this.actualInfoTextVisible!==this.state.infoTextVisible||this.actualIsLargeDisplayMode!==this.state.isLargeDisplayMode)){var i=!E(this.elementsWidth);i&&(this.elementsWidth={}),(i||this.state.isLargeDisplayMode)&&(this.elementsWidth.pageSizes=t.pageSizes,this.elementsWidth.pages=t.pages),(i||this.state.infoTextVisible)&&(this.elementsWidth.info=t.info),this.actualIsLargeDisplayMode=Ite(Se({parent:t.parent},{pageSizes:this.elementsWidth.pageSizes,pages:this.elementsWidth.pages})),this.actualInfoTextVisible=Tte(Se({},t,{info:this.elementsWidth.info})),this.setState(n=>({infoTextVisible:this.actualInfoTextVisible})),this.setState(n=>({isLargeDisplayMode:this.actualIsLargeDisplayMode}))}}get restAttributes(){var t=this.props,i=Pt(t,Ete);return i}render(){var t=this.props;return wte({props:Se({},t,{contentTemplate:Ote(t.contentTemplate)}),infoTextVisible:this.state.infoTextVisible,isLargeDisplayMode:this.state.isLargeDisplayMode,parentRef:this.parentRef,pageSizesRef:this.pageSizesRef,infoTextRef:this.infoTextRef,pagesRef:this.pagesRef,contentAttributes:this.contentAttributes,parentWidth:this.parentWidth,updateAdaptivityProps:this.updateAdaptivityProps,restAttributes:this.restAttributes})}}L1.defaultProps=Dte;var P1={gridCompatibility:!0,showInfo:!1,displayMode:"adaptive",maxPagesCount:10,pageCount:10,visible:!0,hasKnownLastPage:!0,pagesNavigatorVisible:"auto",showPageSizes:!0,pageSizes:Object.freeze([5,10]),showNavigationButtons:!1,totalCount:0},Rte=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(P1),Object.getOwnPropertyDescriptors({defaultPageSize:5,pageSizeChange:()=>{},defaultPageIndex:1,pageIndexChange:()=>{}}))),Ci=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(P1),Object.getOwnPropertyDescriptors({pageSize:5,pageIndex:1}))),kte=["infoText","pageCount","pageIndex","rootElementRef","totalCount"],F1="dx-info",Bte=e=>{var{props:{rootElementRef:t},text:i}=e;return Yt(1,"div",F1,i,0,null,null,t)},Lte={get pageIndex(){return Ci.pageIndex},get pageCount(){return Ci.pageCount},get totalCount(){return Ci.totalCount}};class M1 extends Vn{constructor(t){super(t),this.state={}}get infoText(){var t;return((t=this.props.infoText)!==null&&t!==void 0?t:"")||fe.getFormatter("dxPager-infoText")()}get text(){var{pageCount:t,pageIndex:i,totalCount:n}=this.props;return Kr(this.infoText,(i+1).toString(),t.toString(),n.toString())}get restAttributes(){var t=this.props,i=Pt(t,kte);return i}render(){var t=this.props;return Bte({props:Se({},t),infoText:this.infoText,text:this.text,restAttributes:this.restAttributes})}}M1.defaultProps=Lte;var Pte=fO(void 0),Fte=["children","className","label","onClick"],Mte=e=>{var{props:{children:t,className:i,label:n},widgetRef:r}=e;return Yt(1,"div",i,t,0,{tabIndex:0,role:"button","aria-label":n},null,r)},Vte={className:"",label:""};class Iu extends gr{constructor(t){super(t),this.state={},this.widgetRef=Ei(),this.keyboardEffect=this.keyboardEffect.bind(this),this.subscribeToClick=this.subscribeToClick.bind(this)}get keyboardContext(){return"KeyboardActionContext"in this.context?this.context.KeyboardActionContext:Pte}createEffects(){return[new kt(this.keyboardEffect,[this.keyboardContext,this.props.onClick]),new kt(this.subscribeToClick,[this.props.onClick])]}updateEffects(){var t,i;(t=this._effects[0])===null||t===void 0||t.update([this.keyboardContext,this.props.onClick]),(i=this._effects[1])===null||i===void 0||i.update([this.props.onClick])}keyboardEffect(){return this.keyboardContext.registerKeyboardAction(this.widgetRef.current,this.props.onClick)}subscribeToClick(){return r5(this.widgetRef.current,this.props.onClick)}get restAttributes(){var t=this.props,i=Pt(t,Fte);return i}render(){var t=this.props;return Mte({props:Se({},t),widgetRef:this.widgetRef,keyboardContext:this.keyboardContext,restAttributes:this.restAttributes})}}Iu.defaultProps=Vte;var Nte="dx-pager",$te="dx-light-mode",Hte="dx-pages",Wte="dx-page-indexes",zte="dx-page",V1="dx-selection",N1="dx-page-size",Gte="dx-page-sizes",Ute="".concat(N1," ").concat(V1),Kte="dx-first-child",jte=["className","index","onClick","selected"],qte=e=>{var{className:t,label:i,props:{onClick:n},value:r}=e;return Tt(2,Iu,{className:t,label:i,onClick:n,children:r})},Yte={index:0,selected:!1,className:zte};class WC extends Vn{constructor(t){super(t),this.state={}}get label(){return"Page ".concat(this.value)}get value(){return this.props.index+1}get className(){var{selected:t}=this.props;return Rn({["".concat(this.props.className)]:!!this.props.className,[V1]:!!t})}get restAttributes(){var t=this.props,i=Pt(t,jte);return i}render(){var t=this.props;return qte({props:Se({},t),label:this.label,value:this.value,className:this.className,restAttributes:this.restAttributes})}}WC.defaultProps=Yte;var Xte=["pageIndexes"],Zte=["maxPagesCount","pageCount","pageIndex","pageIndexChange"],Jte="dx-separator",Qte=e=>{var{pages:t}=e,i=t.map(n=>{var{key:r,pageProps:a}=n;return a?Tt(2,WC,{index:a.index,selected:a.selected,onClick:a.onClick},r):Yt(1,"div",Jte,". . .",16,null,r)});return Qr(i,0)},ja=4;function rw(e,t,i){return e===1?"high":e+t===i-1?"low":"both"}function $1(e,t,i){var n=[],r=[];switch(i){case"none":n=[...e];break;case"both":n=[0,"low",...e,"high",t-1],r=e.slice(1,-1);break;case"high":n=[0,...e,"high",t-1],r=e.slice(0,-1);break;case"low":n=[0,"low",...e,t-1],r=e.slice(1)}return{slidingWindowIndexes:e,indexesForReuse:r,pageIndexes:n}}function aw(e,t,i,n){for(var r=[],a=0;a<t;a+=1)r.push(a+e);return $1(r,i,n)}var eie={get pageIndex(){return Ci.pageIndex},get maxPagesCount(){return Ci.maxPagesCount},get pageCount(){return Ci.pageCount}};class H1 extends Vn{constructor(t){super(t),this.state={},this.canReuseSlidingWindow=this.canReuseSlidingWindow.bind(this),this.generatePageIndexes=this.generatePageIndexes.bind(this),this.isSlidingWindowMode=this.isSlidingWindowMode.bind(this),this.onPageClick=this.onPageClick.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:af}get slidingWindowState(){var t=this.slidingWindowStateHolder;return t||{indexesForReuse:[],slidingWindowIndexes:[]}}canReuseSlidingWindow(t,i){var{indexesForReuse:n}=this.slidingWindowState,r=n.slice(-1)[0]<t-1,a=n.includes(i);return r&&a}generatePageIndexes(){var{pageCount:t,pageIndex:i}=this.props,n=0,{slidingWindowIndexes:r}=this.slidingWindowState;i===r[0]?n=i-1:i===r[r.length-1]?n=i+2-ja:i<ja?n=1:i>=t-ja?n=t-ja-1:n=i-1;var a=ja,o=rw(n,a,t),s=aw(n,a,t,o),{pageIndexes:l}=s,u=Pt(s,Xte);return this.slidingWindowStateHolder=u,l}isSlidingWindowMode(){var{maxPagesCount:t,pageCount:i}=this.props;return i<=ja||i<=t}onPageClick(t){this.props.pageIndexChange(t)}get pageIndexes(){var{pageCount:t}=this.props;if(this.isSlidingWindowMode())return aw(0,t,t,"none").pageIndexes;if(this.canReuseSlidingWindow(t,this.props.pageIndex)){var{slidingWindowIndexes:i}=this.slidingWindowState,n=rw(i[0],ja,t);return $1(i,t,n).pageIndexes}return this.generatePageIndexes()}get pages(){var t,{pageIndex:i}=this.props,n=a=>{var o=a==="low"||a==="high"?null:{index:a,onClick:()=>this.onPageClick(a),selected:i===a};return{key:a.toString(),pageProps:o}},r=(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?[...this.pageIndexes].reverse():this.pageIndexes;return r.map(a=>n(a))}get restAttributes(){var t=this.props,i=Pt(t,Zte);return i}render(){var t=this.props;return Qte({props:Se({},t),config:this.config,pageIndexes:this.pageIndexes,pages:this.pages,restAttributes:this.restAttributes})}}H1.defaultProps=eie;var Bs={hoverStateEnabled:!0,activeStateEnabled:!0,get focusStateEnabled(){return Re.real().deviceType==="desktop"&&!Re.isSimulator()}},Dh={label:"",get labelMode(){return ei(Xn())?"floating":"static"}},tie=["accessKey","activeStateEnabled","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","invalidValueMessage","isValid","label","labelMode","max","min","mode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","showSpinButtons","step","tabIndex","useLargeSpinButtons","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],iie=0,nie=e=>{var{componentProps:t,restAttributes:i}=e;return ln(Tt(2,cf,Se({componentType:xh,componentProps:t,templateNames:[]},i)))},In=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(gi),Object.getOwnPropertyDescriptors({defaultValue:iie,isReactComponentWrapper:!0}))),rie={get defaultValue(){return In.defaultValue},get readOnly(){return In.readOnly},get name(){return In.name},get validationError(){return In.validationError},get validationErrors(){return In.validationErrors},get validationMessageMode(){return In.validationMessageMode},get validationStatus(){return In.validationStatus},get isValid(){return In.isValid},get className(){return In.className},get activeStateEnabled(){return Bs.activeStateEnabled},get disabled(){return In.disabled},get focusStateEnabled(){return Bs.focusStateEnabled},get hoverStateEnabled(){return Bs.hoverStateEnabled},get tabIndex(){return In.tabIndex},get visible(){return In.visible},get label(){return Dh.label},get labelMode(){return Dh.labelMode},isReactComponentWrapper:!0};class W1 extends Vn{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){var t=Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Pt(t,tie);return i}render(){var t=this.props;return nie({props:Se({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}W1.defaultProps=rie;var aie=10;function z1(e,t){return e+aie*Math.max(...t).toString().length}var oie=["pageCount","pageIndex","pageIndexChange","pagesCountText"],sie="".concat(F1," dx-info-text"),G1="dx-page-index",lie="dx-light-pages",uie="dx-pages-count",die=e=>{var{pageIndexRef:t,pagesCountText:i,props:{pageCount:n},selectLastPageIndex:r,value:a,valueChange:o,width:s}=e;return Yt(1,"div",lie,[Tt(2,W1,{className:G1,min:1,max:n,width:s,value:a,valueChange:o}),Yt(1,"span",sie,i,0),Tt(2,WC,{className:uie,selected:!1,index:n-1,onClick:r})],4,null,null,t)},cie={get pageIndex(){return Ci.pageIndex},get pageCount(){return Ci.pageCount}};class U1 extends gr{constructor(t){super(t),this.pageIndexRef=Ei(),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this),this.selectLastPageIndex=this.selectLastPageIndex.bind(this),this.valueChange=this.valueChange.bind(this)}createEffects(){return[new kt(this.updateWidth,[this.state.minWidth])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.state.minWidth])}updateWidth(){var t,i=(t=this.pageIndexRef.current)===null||t===void 0?void 0:t.querySelector(".".concat(G1));this.setState(n=>({minWidth:i&&B1(i)||n.minWidth}))}get value(){return this.props.pageIndex+1}get width(){var{pageCount:t}=this.props;return z1(this.state.minWidth,[t])}get pagesCountText(){var t;return((t=this.props.pagesCountText)!==null&&t!==void 0?t:"")||fe.getFormatter("dxPager-pagesCountText")()}selectLastPageIndex(){this.props.pageIndexChange(this.props.pageCount-1)}valueChange(t){this.props.pageIndexChange(t-1)}get restAttributes(){var t=this.props,i=Pt(t,oie);return i}render(){var t=this.props;return die({props:Se({},t),pageIndexRef:this.pageIndexRef,value:this.value,width:this.width,pagesCountText:this.pagesCountText,selectLastPageIndex:this.selectLastPageIndex,valueChange:this.valueChange,restAttributes:this.restAttributes})}}U1.defaultProps=cie;var hie=["hasKnownLastPage","isLargeDisplayMode","maxPagesCount","pageCount","pageIndex","pageIndexChange","pagesCountText","showNavigationButtons","totalCount"],mf="dx-navigate-button",K1="dx-prev-button",j1="dx-next-button",q1="dx-button-disable",fie="".concat(mf," ").concat(j1),pie="".concat(mf," ").concat(K1),vie="".concat(q1," ").concat(mf," ").concat(j1),_ie="".concat(q1," ").concat(mf," ").concat(K1),mie=e=>{var{navigateToNextPage:t,navigateToPrevPage:i,nextClassName:n,pageIndexChange:r,prevClassName:a,props:{isLargeDisplayMode:o,maxPagesCount:s,pageCount:l,pageIndex:u,pagesCountText:d},renderNextButton:c,renderPrevButton:h}=e;return Qr([h&&Tt(2,Iu,{className:a,label:"Previous page",onClick:i}),o&&Tt(2,H1,{maxPagesCount:s,pageCount:l,pageIndex:u,pageIndexChange:r}),!o&&Tt(2,U1,{pageCount:l,pageIndex:u,pageIndexChange:r,pagesCountText:d}),c&&Tt(2,Iu,{className:n,label:"Next page",onClick:t})],0)};function gie(e){return e==="next"?1:-1}var Cie={isLargeDisplayMode:!0},yie={get pageIndex(){return Ci.pageIndex},get maxPagesCount(){return Ci.maxPagesCount},get pageCount(){return Ci.pageCount},get hasKnownLastPage(){return Ci.hasKnownLastPage},get showNavigationButtons(){return Ci.showNavigationButtons},get totalCount(){return Ci.totalCount},get isLargeDisplayMode(){return Cie.isLargeDisplayMode}};class Y1 extends Vn{constructor(t){super(t),this.state={},this.pageIndexChange=this.pageIndexChange.bind(this),this.navigateToNextPage=this.navigateToNextPage.bind(this),this.navigateToPrevPage=this.navigateToPrevPage.bind(this),this.getNextDirection=this.getNextDirection.bind(this),this.getPrevDirection=this.getPrevDirection.bind(this),this.canNavigateToPage=this.canNavigateToPage.bind(this),this.getNextPageIndex=this.getNextPageIndex.bind(this),this.canNavigateTo=this.canNavigateTo.bind(this),this.navigateToPage=this.navigateToPage.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:af}pageIndexChange(t){this.canNavigateToPage(t)&&this.props.pageIndexChange(t)}navigateToNextPage(){this.navigateToPage(this.getNextDirection())}navigateToPrevPage(){this.navigateToPage(this.getPrevDirection())}getNextDirection(){var t;return(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?"prev":"next"}getPrevDirection(){var t;return(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?"next":"prev"}canNavigateToPage(t){return this.props.hasKnownLastPage?t>=0&&t<=this.props.pageCount-1:t>=0}getNextPageIndex(t){return this.props.pageIndex+gie(t)}canNavigateTo(t){return this.canNavigateToPage(this.getNextPageIndex(t))}navigateToPage(t){this.pageIndexChange(this.getNextPageIndex(t))}get renderPrevButton(){var{isLargeDisplayMode:t,showNavigationButtons:i}=this.props;return!t||i}get renderNextButton(){return this.renderPrevButton||!this.props.hasKnownLastPage}get nextClassName(){var t=this.getNextDirection(),i=this.canNavigateTo(t);return i?fie:vie}get prevClassName(){var t=this.getPrevDirection(),i=this.canNavigateTo(t);return i?pie:_ie}get restAttributes(){var t=this.props,i=Pt(t,hie);return i}render(){var t=this.props;return mie({props:Se({},t),config:this.config,pageIndexChange:this.pageIndexChange,navigateToNextPage:this.navigateToNextPage,navigateToPrevPage:this.navigateToPrevPage,renderPrevButton:this.renderPrevButton,renderNextButton:this.renderNextButton,nextClassName:this.nextClassName,prevClassName:this.prevClassName,restAttributes:this.restAttributes})}}Y1.defaultProps=yie;var xie=["accessKey","activeStateEnabled","className","dataSource","defaultValue","disabled","displayExpr","focusStateEnabled","height","hint","hoverStateEnabled","isValid","label","labelMode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","valueExpr","visible","width"],bie=e=>{var{componentProps:t,restAttributes:i}=e;return ln(Tt(2,cf,Se({componentType:DC,componentProps:t,templateNames:["dropDownButtonTemplate","groupTemplate","itemTemplate"]},i)))},Tn=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(gi),Object.getOwnPropertyDescriptors({defaultValue:null,isReactComponentWrapper:!0}))),Sie={get defaultValue(){return Tn.defaultValue},get readOnly(){return Tn.readOnly},get name(){return Tn.name},get validationError(){return Tn.validationError},get validationErrors(){return Tn.validationErrors},get validationMessageMode(){return Tn.validationMessageMode},get validationStatus(){return Tn.validationStatus},get isValid(){return Tn.isValid},get className(){return Tn.className},get activeStateEnabled(){return Bs.activeStateEnabled},get disabled(){return Tn.disabled},get focusStateEnabled(){return Bs.focusStateEnabled},get hoverStateEnabled(){return Bs.hoverStateEnabled},get tabIndex(){return Tn.tabIndex},get visible(){return Tn.visible},get label(){return Dh.label},get labelMode(){return Dh.labelMode},isReactComponentWrapper:!0};class X1 extends Vn{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){var t=Se({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Pt(t,xie);return i}render(){var t=this.props;return bie({props:Se({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}X1.defaultProps=Sie;var Eie=["pageSize","pageSizeChange","pageSizes","parentRef"],wie=e=>{var{props:{pageSize:t,pageSizeChange:i,pageSizes:n},width:r}=e;return Tt(2,X1,{displayExpr:"text",valueExpr:"value",dataSource:n,value:t,valueChange:i,width:r})},Iie={get pageSize(){return Ci.pageSize}};class Z1 extends gr{constructor(t){super(t),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this)}createEffects(){return[new kt(this.updateWidth,[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes])}updateWidth(){this.setState(t=>({minWidth:B1(this.props.parentRef.current)||t.minWidth}))}get width(){return z1(this.state.minWidth,this.props.pageSizes.map(t=>t.value))}get restAttributes(){var t=this.props,i=Pt(t,Eie);return i}render(){var t=this.props;return wie({props:Se({},t),width:this.width,restAttributes:this.restAttributes})}}Z1.defaultProps=Iie;var Tie=["pageSize","pageSizeChange","pageSizes"],Aie=e=>{var{pageSizesText:t}=e;return Qr(t.map(i=>{var{className:n,click:r,label:a,text:o}=i;return Tt(2,Iu,{className:n,label:a,onClick:r,children:o},o)}),0)},Die={get pageSize(){return Ci.pageSize}};class J1 extends Vn{constructor(t){super(t),this.state={},this.__getterCache={},this.onPageSizeChange=this.onPageSizeChange.bind(this)}get pageSizesText(){return this.__getterCache.pageSizesText!==void 0?this.__getterCache.pageSizesText:this.__getterCache.pageSizesText=(()=>{var{pageSize:t,pageSizes:i}=this.props;return i.map((n,r)=>{var{text:a,value:o}=n,s=o===t,l=Rn({[s?Ute:N1]:!0,[Kte]:r===0});return{className:l,click:this.onPageSizeChange(o),label:"Display ".concat(o," items on page"),text:a}})})()}onPageSizeChange(t){return()=>(this.props.pageSizeChange(t),this.props.pageSize)}get restAttributes(){var t=this.props,i=Pt(t,Tie);return i}componentWillUpdate(t,i,n){(this.props.pageSize!==t.pageSize||this.props.pageSizes!==t.pageSizes||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pageSizesText=void 0)}render(){var t=this.props;return Aie({props:Se({},t),pageSizesText:this.pageSizesText,restAttributes:this.restAttributes})}}J1.defaultProps=Die;var Oie=["isLargeDisplayMode","pageSize","pageSizeChange","pageSizes","rootElementRef"],Rie=e=>{var{htmlRef:t,normalizedPageSizes:i,props:{isLargeDisplayMode:n,pageSize:r,pageSizeChange:a}}=e;return Yt(1,"div",Gte,[n&&Tt(2,J1,{pageSizes:i,pageSize:r,pageSizeChange:a}),!n&&Tt(2,Z1,{parentRef:t,pageSizes:i,pageSize:r,pageSizeChange:a})],0,null,null,t)};function kie(){return fe.getFormatter("dxPager-pageSizesAllText")()}var Bie={isLargeDisplayMode:!0},Lie={get pageSize(){return Ci.pageSize},get pageSizes(){return Ci.pageSizes},get isLargeDisplayMode(){return Bie.isLargeDisplayMode}};class Q1 extends gr{constructor(t){super(t),this.state={},this.htmlRef=Ei(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this)}createEffects(){return[new kt(this.setRootElementRef,[])]}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.htmlRef.current)}get normalizedPageSizes(){return this.__getterCache.normalizedPageSizes!==void 0?this.__getterCache.normalizedPageSizes:this.__getterCache.normalizedPageSizes=(()=>{var{pageSizes:t}=this.props;return t.map(i=>i==="all"||i===0?{text:kie(),value:0}:{text:String(i),value:i})})()}get restAttributes(){var t=this.props,i=Pt(t,Oie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.pageSizes!==t.pageSizes&&(this.__getterCache.normalizedPageSizes=void 0)}render(){var t=this.props;return Rie({props:Se({},t),htmlRef:this.htmlRef,normalizedPageSizes:this.normalizedPageSizes,restAttributes:this.restAttributes})}}Q1.defaultProps=Lie;var Pie=["className","displayMode","gridCompatibility","hasKnownLastPage","infoText","infoTextRef","infoTextVisible","isLargeDisplayMode","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pageSizesRef","pagesCountText","pagesNavigatorVisible","pagesRef","rootElementRef","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],Fie=e=>{var{classes:t,infoVisible:i,isLargeDisplayMode:n,pageIndexSelectorVisible:r,pagesContainerVisibility:a,pagesContainerVisible:o,props:{hasKnownLastPage:s,infoText:l,infoTextRef:u,maxPagesCount:d,pageCount:c,pageIndex:h,pageIndexChange:f,pageSize:p,pageSizeChange:m,pageSizes:g,pageSizesRef:C,pagesCountText:b,pagesRef:A,rtlEnabled:B,showNavigationButtons:D,showPageSizes:U,totalCount:H,visible:W},restAttributes:G,widgetRootElementRef:j}=e;return ln(Tt(2,of,Se({rootElementRef:j,rtlEnabled:B,classes:t,visible:W},G,{children:[U&&Tt(2,Q1,{rootElementRef:C,isLargeDisplayMode:n,pageSize:p,pageSizeChange:m,pageSizes:g}),o&&Yt(1,"div",Hte,[i&&Tt(2,M1,{rootElementRef:u,infoText:l,pageCount:c,pageIndex:h,totalCount:H}),r&&Yt(1,"div",Wte,Tt(2,Y1,{hasKnownLastPage:s,isLargeDisplayMode:n,maxPagesCount:d,pageCount:c,pageIndex:h,pageIndexChange:f,pagesCountText:b,showNavigationButtons:D,totalCount:H}),2,null,null,A)],0,{style:lC({visibility:a})})]})))},Mie=Object.create(Object.prototype,Se(Object.getOwnPropertyDescriptors(Ci),Object.getOwnPropertyDescriptors({infoTextVisible:!0,isLargeDisplayMode:!0})));class ek extends gr{constructor(t){super(t),this.state={},this.widgetRootElementRef=Ei(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this),this.createFakeInstance=this.createFakeInstance.bind(this)}createEffects(){return[new kt(this.setRootElementRef,[])]}getChildContext(){return Se({},this.context,{KeyboardActionContext:this.keyboardAction})}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.widgetRootElementRef.current)}createFakeInstance(){return{option:()=>!1,element:()=>this.widgetRootElementRef.current,_createActionByOption:()=>t=>{var i,n;(i=(n=this.props).onKeyDown)===null||i===void 0||i.call(n,t)}}}get keyboardAction(){return this.__getterCache.keyboardAction!==void 0?this.__getterCache.keyboardAction:this.__getterCache.keyboardAction={registerKeyboardAction:(t,i)=>{var n=this.createFakeInstance();return ZA("pager",n,t,void 0,i)}}}get infoVisible(){var{infoTextVisible:t,showInfo:i}=this.props;return i&&t}get pageIndexSelectorVisible(){return this.props.pageSize!==0}get normalizedDisplayMode(){var{displayMode:t,lightModeEnabled:i}=this.props;return t==="adaptive"&&i!==void 0?i?"compact":"full":t}get pagesContainerVisible(){return!!this.props.pagesNavigatorVisible&&this.props.pageCount>0}get pagesContainerVisibility(){if(this.props.pagesNavigatorVisible==="auto"&&this.props.pageCount===1&&this.props.hasKnownLastPage)return"hidden"}get isLargeDisplayMode(){var t=this.normalizedDisplayMode,i=!1;return t==="adaptive"?i=this.props.isLargeDisplayMode:i=t==="full",i}get classes(){var t={["".concat(this.props.className)]:!!this.props.className,[Nte]:!0,[$te]:!this.isLargeDisplayMode};return Rn(t)}get restAttributes(){var t=this.props,i=Pt(t,Pie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.onKeyDown!==t.onKeyDown&&(this.__getterCache.keyboardAction=void 0)}render(){var t=this.props;return Fie({props:Se({},t),widgetRootElementRef:this.widgetRootElementRef,keyboardAction:this.keyboardAction,infoVisible:this.infoVisible,pageIndexSelectorVisible:this.pageIndexSelectorVisible,pagesContainerVisible:this.pagesContainerVisible,pagesContainerVisibility:this.pagesContainerVisibility,isLargeDisplayMode:this.isLargeDisplayMode,classes:this.classes,restAttributes:this.restAttributes})}}ek.defaultProps=Mie;var Vie=["className","defaultPageIndex","defaultPageSize","displayMode","gridCompatibility","hasKnownLastPage","infoText","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pagesCountText","pagesNavigatorVisible","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],Nie=e=>{var{pagerProps:t,restAttributes:i}=e;return ln(Tt(2,L1,Se({contentTemplate:ek,pagerProps:t},i)))};let tk=class extends ad{constructor(t){super(t),this.__getterCache={},this.state={pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.props.defaultPageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.props.defaultPageIndex},this.pageIndexChange=this.pageIndexChange.bind(this),this.pageSizeChange=this.pageSizeChange.bind(this)}createEffects(){return[od()]}pageIndexChange(t){if(this.props.gridCompatibility){var i;this.setState(r=>(i=t+1,{pageIndex:i})),this.props.pageIndexChange(i)}else{var n;this.setState(r=>(n=t,{pageIndex:n})),this.props.pageIndexChange(n)}}get pageIndex(){return this.props.gridCompatibility?(this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex)-1:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}pageSizeChange(t){var i;this.setState(n=>(i=t,{pageSize:i})),this.props.pageSizeChange(i)}get className(){return this.props.gridCompatibility?Rn({"dx-datagrid-pager":!0,["".concat(this.props.className)]:!!this.props.className}):this.props.className}get pagerProps(){return this.__getterCache.pagerProps!==void 0?this.__getterCache.pagerProps:this.__getterCache.pagerProps=Se({},Se({},this.props,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),{className:this.className,pageIndex:this.pageIndex,pageIndexChange:t=>this.pageIndexChange(t),pageSizeChange:t=>this.pageSizeChange(t)})}get restAttributes(){var t=Se({},this.props,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),i=Pt(t,Vie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props!==t||this.props.gridCompatibility!==t.gridCompatibility||this.props.className!==t.className||this.state.pageIndex!==i.pageIndex||this.props.pageIndex!==t.pageIndex||this.props.pageIndexChange!==t.pageIndexChange||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pagerProps=void 0)}render(){var t=this.props;return Nie({props:Se({},t,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),pageIndexChange:this.pageIndexChange,pageIndex:this.pageIndex,pageSizeChange:this.pageSizeChange,className:this.className,pagerProps:this.pagerProps,restAttributes:this.restAttributes})}};tk.defaultProps=Rte;let ik=class extends bte{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}get _propsInfo(){return{twoWay:[["pageSize","defaultPageSize","pageSizeChange"],["pageIndex","defaultPageIndex","pageIndexChange"]],allowNull:[],elements:[],templates:[],props:["defaultPageSize","pageSizeChange","defaultPageIndex","pageIndexChange","gridCompatibility","className","showInfo","infoText","lightModeEnabled","displayMode","maxPagesCount","pageCount","pagesCountText","visible","hasKnownLastPage","pagesNavigatorVisible","showPageSizes","pageSizes","rtlEnabled","showNavigationButtons","totalCount","onKeyDown","pageSize","pageIndex"]}}get _viewComponent(){return tk}};tt("dxPager",ik);var $ie="pager",Hie=10,ow=function(e){return 1+(parseInt(e.pageIndex())||0)},Wie=Dt.View.inherit({init:function(){var e=this.getController("data");e.changed.add(t=>{if(t&&t.repaintChangesOnly){var i=this._pager;i?i.option({pageIndex:ow(e),pageSize:e.pageSize(),pageCount:e.pageCount(),totalCount:e.totalCount(),hasKnownLastPage:e.hasKnownLastPage()}):this.render()}else(!t||t.changeType!=="update"&&t.changeType!=="updateSelection"&&t.changeType!=="updateFocusedRow")&&(this._pager=null,this.render())})},_renderCore:function(){var e=this.element().addClass(this.addWidgetPrefix($ie)),t=this.option("pager")||{},i=this.getController("data"),n=this.getController("keyboardNavigation"),r={maxPagesCount:Hie,pageIndex:ow(i),pageCount:i.pageCount(),pageSize:i.pageSize(),showPageSizes:t.showPageSizeSelector,showInfo:t.showInfo,displayMode:t.displayMode,pagesNavigatorVisible:t.visible,showNavigationButtons:t.showNavigationButtons,pageSizes:this.getPageSizes(),totalCount:i.totalCount(),hasKnownLastPage:i.hasKnownLastPage(),pageIndexChanged:function(a){i.pageIndex()!==a-1&&i.pageIndex(a-1)},pageSizeChanged:function(a){i.pageSize(a)},onKeyDown:a=>n&&n.executeAction("onKeyDown",a),useLegacyKeyboardNavigation:this.option("useLegacyKeyboardNavigation"),useKeyboard:this.option("keyboardNavigation.enabled")};if(E(t.infoText)&&(r.infoText=t.infoText),this._pager){this._pager.repaint();return}Ue()?this._pager=this._createComponent(e,ik,r):e.addClass("dx-pager").html('<div class="dx-pages"><div class="dx-page"></div></div>')},getPager:function(){return this._pager},getPageSizes:function(){var e=this.getController("data"),t=this.option("pager"),i=t&&t.allowedPageSizes,n=e.pageSize();return(!E(this._pageSizes)||!this._pageSizes.includes(n))&&(this._pageSizes=[],t&&(Array.isArray(i)?this._pageSizes=i:i&&n>1&&(this._pageSizes=[Math.floor(n/2),n,2*n]))),this._pageSizes},isVisible:function(){var e=this.getController("data"),t=this.option("pager"),i=t&&t.visible,n=this.option("scrolling");return i==="auto"&&(n&&(n.mode==="virtual"||n.mode==="infinite")?i=!1:i=e.pageCount()>1||e.isLoaded()&&!e.hasKnownLastPage()),i},getHeight:function(){return this.getElementHeight()},optionChanged:function(e){var t=e.name,i=t==="pager",n=t==="paging",r=t==="dataSource",a=t==="scrolling",o=this.getController("data");if(i||n||a||r){if(e.handled=!0,o.skipProcessingPagingChange(e.fullName))return;(i||n)&&(this._pageSizes=null),r||(this._pager=null,this._invalidate(),Ue()&&i&&this.component&&this.component.resize())}},dispose:function(){this._pager=null}}),zie={defaultOptions:function(){return{pager:{visible:"auto",showPageSizeSelector:!1,allowedPageSizes:"auto"}}},views:{pagerView:Wie}};Oe.registerModule("pager",zie);var Gie="columns-separator",sw="columns-separator-transparent",lw="drag-header",Uie="text-content",Tm="drag-action",uw="tracker",dw="drop-highlight",cw="dx-block-separator",hw="dx-header-row",Kie="dx-widget",jie="dx-drag-command-cell",rn="dxDataGridResizingReordering",qie=10,fw=5,Vv=.5,du=function(e){return e.option("allowColumnResizing")||e.getController("columns").isColumnOptionUsed("allowResizing")},nk=function(e){return e.option("allowColumnReordering")||e.getController("columns").isColumnOptionUsed("allowReordering")},Yie=Dt.View.inherit({_renderCore:function(){this.callBase(),this.element().addClass(this.addWidgetPrefix(uw)),this.hide()},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_subscribeToCallback:function(){var e=this;e._positionChanged=function(t){var i=e.element();i&&i.hasClass(e.addWidgetPrefix(uw))&&(i.css({top:t.top}),gn(i,t.height))},this._tablePositionController.positionChanged.add(e._positionChanged)},optionChanged:function(e){e.name==="allowColumnResizing"&&(this._unsubscribeFromCallback(),e.value&&(this._subscribeToCallback(),this._invalidate())),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()},isVisible:function(){return du(this)},show:function(){this.element().show()},hide:function(){this.element()&&this.element().hide()},setHeight:function(e){gn(this.element(),e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),rk=Dt.View.inherit({_renderSeparator:function(){},_renderCore:function(e){this.callBase(e),this._isShown=!0,this._renderSeparator(),this.hide()},show:function(){this._isShown=!0},hide:function(){this._isShown=!1},height:function(e){var t=this.element();if(t)if(E(e))gn(t,e);else return Ke(t)},width:function(e){var t=this.element();if(t)if(E(e))Fu(t,e);else return He(t)}}),Xie=rk.inherit({_renderSeparator:function(){this.callBase();var e=this.element();e.addClass(this.addWidgetPrefix(Gie))},_subscribeToCallback:function(){var e=this,t;e._positionChanged=function(i){t=e.element(),t&&(t.css({top:i.top}),gn(t,i.height))},e._tablePositionController.positionChanged.add(e._positionChanged)},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_init:function(){this._isTransparent=du(this),this.isVisible()&&this._subscribeToCallback()},isVisible:function(){return this.option("showColumnHeaders")&&(nk(this)||du(this))},optionChanged:function(e){e.name==="allowColumnResizing"&&(e.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=du(this),this.hide(!0))),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._init()},show:function(){var e=this.element();e&&!this._isShown&&(this._isTransparent?e.removeClass(this.addWidgetPrefix(sw)):e.show()),this.callBase()},hide:function(e){var t=this.element(),i=this.addWidgetPrefix(sw);t&&(this._isShown||e)&&(this._isTransparent?(t.addClass(i),t.css("left",""),t.show()):(t.hasClass(i)&&t.removeClass(i),t.hide())),this.callBase()},moveByX:function(e){var t=this.element();t&&t.css("left",e===null?0:e-this._parentElement().offset().left)},changeCursor:function(e){e=E(e)?e:"";var t=this.element();t&&t.css("cursor",e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),Zie=rk.inherit({init:function(){var e=this;this.callBase(),this.getController("data").loadingChanged.add(function(t){t||e.hide()})},_renderSeparator:function(){this.callBase(),this.element().addClass(cw).html("&nbsp;")},hide:function(){var e=this._parentElement(),t=this.element();t&&this._isShown&&t.css("display","none"),e&&!e.children("."+cw).length&&e.prepend(this.element()),this.callBase()},isVisible:function(){var e=this.option("groupPanel"),t=this.option("columnChooser");return e&&e.visible||t&&t.enabled},show:function(e){var t=this.element(),i=function(n){zt.stop(t,!0),zt.animate(t,{type:"slide",from:{width:0,display:n.display},to:n,duration:300,easing:"swing"})};if(t&&!this._isShown)switch(e){case"group":i({width:"50px",display:"inline-block"});break;case"columnChooser":i({width:"100%",display:"block"});break;default:t.css("display","")}this.callBase()}}),Jie=Dt.View.inherit({_isDragging:!1,isDragging:function(){return this._isDragging},_getDraggingPanelByPos:function(e){var t;return V(this._dragOptions.draggingPanels,function(i,n){if(n){var r=n.getBoundingRect();if(r&&(r.bottom===void 0||e.y<r.bottom)&&(r.top===void 0||e.y>r.top)&&(r.left===void 0||e.x>r.left)&&(r.right===void 0||e.x<r.right))return t=n,!1}}),t},_renderCore:function(){this.element().addClass(this.addWidgetPrefix(lw)+" "+this.addWidgetPrefix(Uie)+" "+Kie).hide()},_resetTargetColumnOptions:function(){var e=this._dropOptions;e.targetColumnIndex=-1,delete e.targetColumnElement,delete e.isLast,delete e.posX,delete e.posY},_getVisibleIndexObject:function(e,t){return E(e)?{columnIndex:t,rowIndex:e}:t},dispose:function(){var e=this.element();this._dragOptions=null,e&&e.parent().find("."+this.addWidgetPrefix(lw)).remove()},isVisible:function(){var e=this.getController("columns"),t=e.getCommonSettings();return this.option("showColumnHeaders")&&(nk(this)||t.allowGrouping||t.allowHiding)},init:function(){var e=this;this.callBase(),this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this.getController("data").loadingChanged.add(function(t){var i=e.element();!t&&i&&i.hide()})},dragHeader:function(e){var t=e.columnElement,i=!!e.sourceColumn.type;this._isDragging=!0,this._dragOptions=e,this._dropOptions={sourceIndex:e.index,sourceColumnIndex:this._getVisibleIndexObject(e.rowIndex,e.columnIndex),sourceColumnElement:e.columnElement,sourceLocation:e.sourceLocation};var n=me.getDocument();this._onSelectStart=n.onselectstart,n.onselectstart=function(){return!1},this._controller.drag(this._dropOptions),this.element().css({textAlign:t&&t.css("textAlign"),height:t&&(i&&t.get(0).clientHeight||Ke(t)),width:t&&(i&&t.get(0).clientWidth||He(t)),whiteSpace:t&&t.css("whiteSpace")}).addClass(this.addWidgetPrefix(Tm)).toggleClass(jie,i).text(i?"":e.sourceColumn.caption),this.element().appendTo(iA.getSwatchContainer(t))},moveHeader:function(e){var t=e.event,i=t.data.that,n=Gt(t),r=i._columnsResizerViewController?i._columnsResizerViewController.isResizing():!1,a=i._dragOptions;if(i._isDragging&&!r){var o=i.element(),s=Math.abs(n.x-a.columnElement.offset().left-a.deltaX),l=Math.abs(n.y-a.columnElement.offset().top-a.deltaY);if(o.is(":visible")||s>fw||l>fw){o.show();var u=n.x-a.deltaX,d=n.y-a.deltaY;o.css({left:u,top:d}),i.dockHeader(n)}t.preventDefault()}},dockHeader:function(e){var t=this._getDraggingPanelByPos(e),i=this._controller,n=this._dropOptions,r=this._dragOptions;if(t){var a=this.option("rtlEnabled"),o=t.getName()==="columnChooser",s=o?"y":"x",l=t.getName(),u=l==="headers"?r.rowIndex:void 0,d=r.sourceColumn,c=t.getColumnElements(u,d==null?void 0:d.ownerBand)||[],h=r.pointsByTarget=r.pointsByTarget||{},f=l==="columnChooser"?[]:h[l]||i._generatePointsByColumns(k({},r,{targetDraggingPanel:t,columns:t.getColumns(u),columnElements:c,isVerticalOrientation:o,startColumnIndex:l==="headers"&&v(c[0]).index()}));if(h[l]=f,n.targetLocation=l,f.length>0)for(var p=0;p<f.length;p++){var m=f[p+1]&&(f[p][s]+f[p+1][s])/2;if(m===void 0||(a&&s==="x"?e[s]>m:e[s]<m)){n.targetColumnIndex=this._getVisibleIndexObject(u,f[p].columnIndex),c[p]?(n.targetColumnElement=c.eq(p),n.isLast=!1):(n.targetColumnElement=c.last(),n.isLast=!0),n.posX=f[p].x,n.posY=f[p].y,i.dock(n);break}}else this._resetTargetColumnOptions(),i.dock(n)}},dropHeader:function(e){var t=e.event,i=t.data.that,n=i._controller;i.element().hide(),n&&i._isDragging&&n.drop(i._dropOptions),i.element().appendTo(i._parentElement()),i._dragOptions=null,i._dropOptions=null,i._isDragging=!1,me.getDocument().onselectstart=i._onSelectStart||null}}),Nv=function(e){return e.option("columnResizingMode")!=="widget"},Qie=Dt.ViewController.inherit({_isHeadersRowArea:function(e){if(this._columnHeadersView){var t=this._columnHeadersView.element();if(t){var i=t.offset().top,n=this._columnHeadersView.getHeadersRowHeight();return e>=i&&e<=i+n}}return!1},_isRtlParentStyle:function(){var e;return this.option("rtlEnabled")&&((e=this._$parentContainer)===null||e===void 0?void 0:e.parent().css("direction"))==="rtl"},_pointCreated:function(e,t,i){var n=Nv(this),r=this.option("rtlEnabled"),a=this._isRtlParentStyle(),o=!n&&r&&!a?0:1;if(e.index>=o&&e.index<t+(!n&&(!r||a)?1:0)){e.columnIndex-=o;var s=i[e.columnIndex]||{},l=i[e.columnIndex+1]||{};return!(n?s.allowResizing&&l.allowResizing:s.allowResizing)}return!0},_getTargetPoint:function(e,t,i){if(e){for(var n=0;n<e.length;n++)if(!(e[n].x===e[0].x&&e[n+1]&&e[n].x===e[n+1].x)&&e[n].x-i<=t&&t<=e[n].x+i)return e[n]}return null},_moveSeparator:function(e){var t,i=e.event,n=i.data,r=n._columnsSeparatorView.width(),a=Nv(n),o=r/2,s=n._$parentContainer.offset(),l=s.left,u=Gt(i),d=n.option("rtlEnabled"),c=this._isRtlParentStyle(),h=(t=n._draggingHeaderView)===null||t===void 0?void 0:t.isDragging();if(n._isResizing&&n._resizingInfo){if((l<=u.x||!a&&c)&&(!a||u.x<=l+He(n._$parentContainer))&&n._updateColumnsWidthIfNeeded(u.x)){var f=n._columnHeadersView.getColumnElements().eq(n._resizingInfo.currentColumnIndex),p=f[0];if(p){var m=p.getBoundingClientRect().width;n._columnsSeparatorView.moveByX(f.offset().left+((a||c)&&d?0:m)),n._tablePositionController.update(n._targetPoint.y),i.preventDefault()}}}else h||(n._isHeadersRowArea(u.y)?(n._previousParentOffset&&(n._previousParentOffset.left!==s.left||n._previousParentOffset.top!==s.top)&&n.pointsByColumns(null),n._targetPoint=n._getTargetPoint(n.pointsByColumns(),u.x,r),n._previousParentOffset=s,n._isReadyResizing=!1,n._targetPoint?(n._columnsSeparatorView.changeCursor("col-resize"),n._columnsSeparatorView.moveByX(n._targetPoint.x-o),n._tablePositionController.update(n._targetPoint.y),n._isReadyResizing=!0,i.preventDefault()):(n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null))):(n.pointsByColumns(null),n._isReadyResizing=!1,n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null)))},_endResizing:function(e){var t=e.event,i=t.data;i._isResizing&&(i.pointsByColumns(null),i._resizingInfo=null,i._columnsSeparatorView.hide(),i._columnsSeparatorView.changeCursor(),i._trackerView.hide(),i._isReadyResizing=!1,i._isResizing=!1)},_getNextColumnIndex:function(e){return e+1},_setupResizingInfo:function(e){var t=this._targetPoint.columnIndex,i=this._getNextColumnIndex(t),n=this._columnHeadersView.getHeaderElement(t),r=this._columnHeadersView.getHeaderElement(i);this._resizingInfo={startPosX:e,currentColumnIndex:t,currentColumnWidth:n&&n.length>0?Ut(n[0]).width:0,nextColumnIndex:i,nextColumnWidth:r&&r.length>0?Ut(r[0]).width:0}},_startResizing:function(e){var t=e.event,i=t.data,n=Gt(t);if(Nu(t)&&(i._isHeadersRowArea(n.y)?(i._targetPoint=i._getTargetPoint(i.pointsByColumns(),n.x,qie),i._targetPoint&&(i._columnsSeparatorView.moveByX(i._targetPoint.x-i._columnsSeparatorView.width()/2),i._isReadyResizing=!0)):i._isReadyResizing=!1),i._isReadyResizing){i._setupResizingInfo(n.x),i._isResizing=!0,i._tablePositionController.update(i._targetPoint.y),i._columnsSeparatorView.show(),i._trackerView.show();var r=i.component.getScrollable();r&&i._isRtlParentStyle()&&(i._scrollRight=He(r.$content())-He(r.container())-r.scrollLeft()),t.preventDefault(),t.stopPropagation()}this.isResizing()&&this.getController("editorFactory").loseFocus()},_generatePointsByColumns:function(){var e=this,t=e._columnsController?e._columnsController.getVisibleColumns():[],i=e._columnHeadersView.getColumnElements(),n=[];i&&i.length>0&&(n=be.getPointsByColumns(i,function(r){return e._pointCreated(r,i.length,t)})),e._pointsByColumns=n},_unsubscribeFromEvents:function(){this._moveSeparatorHandler&&R.off(me.getDocument(),ye(lt.move,rn),this._moveSeparatorHandler),this._startResizingHandler&&R.off(this._$parentContainer,ye(lt.down,rn),this._startResizingHandler),this._endResizingHandler&&(R.off(this._columnsSeparatorView.element(),ye(lt.up,rn),this._endResizingHandler),R.off(me.getDocument(),ye(lt.up,rn),this._endResizingHandler))},_subscribeToEvents:function(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),R.on(me.getDocument(),ye(lt.move,rn),this,this._moveSeparatorHandler),R.on(this._$parentContainer,ye(lt.down,rn),this,this._startResizingHandler),R.on(this._columnsSeparatorView.element(),ye(lt.up,rn),this,this._endResizingHandler),R.on(me.getDocument(),ye(lt.up,rn),this,this._endResizingHandler)},_updateColumnsWidthIfNeeded:function(e){var t,i,n=this._rowsView.contentWidth(),r=this._resizingInfo,a=this._columnsController,o=a.getVisibleColumns(),s=this._columnsSeparatorView.width(),l=Nv(this),u=l&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth"),d=this.option("rtlEnabled"),c=this._isRtlParentStyle(),h=o[r.currentColumnIndex],f=o[r.nextColumnIndex];function p(W){return Ve(W)&&W.slice(-1)==="%"}function m(W,G,j,te){if(W){var N=W.width;N&&(te=p(N)),te?(a.columnOption(W.index,"visibleWidth",G),a.columnOption(W.index,"width",(G/j*100).toFixed(3)+"%")):(a.columnOption(W.index,"visibleWidth",null),a.columnOption(W.index,"width",G))}}t=e-r.startPosX,(l||c)&&d&&(t=-t);var{cellWidth:g,nextCellWidth:C}=function(W){var G,j,te,N=r.currentColumnWidth+W,Y=h&&h.minWidth||s,x={};return N>=Y?x.cellWidth=N:(x.cellWidth=Y,te=!0),l&&(j=r.nextColumnWidth-W,G=f&&f.minWidth||s,j>=G?te?x.nextCellWidth=r.nextColumnWidth-(W+Y-N):x.nextCellWidth=j:(x.nextCellWidth=G,x.cellWidth=r.currentColumnWidth+(W-G+j))),x}(t);if(i=h.width!==g,i){if(a.beginUpdate(),g=Math.floor(g),n=function(W,G){var j=G.every(N=>N.width);if(j){var te=G.reduce((N,Y)=>(p(Y.width)&&(N+=parseFloat(Y.width)),N),0);te>100&&(W=W/te*100)}return W}(n,o),m(h,g,n,u),l)C=Math.floor(C),m(f,C,n,u);else{var b=this._columnHeadersView.getColumnWidths();b[r.currentColumnIndex]=g;var A=b.reduce((W,G)=>W+G,0)>this._rowsView.contentWidth();if(!A){var B=be.getLastResizableColumnIndex(o);B>=0&&a.columnOption(o[B].index,"visibleWidth","auto")}for(var D=0;D<b.length;D++)o[D]&&o[D]!==h&&o[D].width===void 0&&a.columnOption(o[D].index,"width",b[D])}if(a.endUpdate(),!l){this.component.updateDimensions();var U=this.component.getScrollable();if(U&&c){var H=He(U.$content())-He(U.container())-this._scrollRight;U.scrollTo({left:H})}}}return i},_subscribeToCallback:function(e,t){e.add(t),this._subscribesToCallbacks.push({callback:e,handler:t})},_unsubscribeFromCallbacks:function(){for(var e=0;e<this._subscribesToCallbacks.length;e++){var t=this._subscribesToCallbacks[e];t.callback.remove(t.handler)}this._subscribesToCallbacks=[]},_unsubscribes:function(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()},_init:function(){var e=this,t=function(){e._isResizing||e.pointsByColumns(null)},i=function(a){e._scrollLeft!==a.left&&(e._scrollLeft=a.left,e.pointsByColumns(null))};e._columnsSeparatorView=e.getView("columnsSeparatorView"),e._columnHeadersView=e.getView("columnHeadersView"),e._trackerView=e.getView("trackerView"),e._rowsView=e.getView("rowsView"),e._columnsController=e.getController("columns"),e._tablePositionController=e.getController("tablePosition"),e._$parentContainer=e.component.$element(),e._draggingHeaderView=e.component.getView("draggingHeaderView"),e._subscribeToCallback(e._columnHeadersView.renderCompleted,t),e._subscribeToCallback(e._columnHeadersView.resizeCompleted,t),e._subscribeToCallback(e._columnsSeparatorView.renderCompleted,function(){e._unsubscribeFromEvents(),e._subscribeToEvents()}),e._subscribeToCallback(e._rowsView.renderCompleted,function(){e._rowsView.scrollChanged.remove(i),e._rowsView.scrollChanged.add(i)});var n=e._rowsView.getScrollbarWidth()!==0,r=0;e._subscribeToCallback(e.getController("tablePosition").positionChanged,function(a){if(e._isResizing&&!e._rowsView.isResizing){var o=e._rowsView.getScrollbarWidth()!==0;n!==o||r&&r!==a.height?(n=o,r=a.height,e.component.updateDimensions()):e._rowsView.updateFreeSpaceRowHeight()}r=a.height})},optionChanged:function(e){this.callBase(e),e.name==="allowColumnResizing"&&(e.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())},isResizing:function(){return this._isResizing},init:function(){this._subscribesToCallbacks=[],du(this)&&this._init()},pointsByColumns:function(e){if(e!==void 0)this._pointsByColumns=e;else return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns},dispose:function(){this._unsubscribes(),this.callBase()}}),ene=Dt.ViewController.inherit({update:function(e){var t={},i=this._columnHeadersView.element(),n=i&&i.offset(),r=n&&n.top||0,a=E(e)?Math.abs(e-r):0,o=this._columnHeadersView?this._columnHeadersView.getHeight():0,s=this._rowsView.getScrollbarWidth(!0),l=this._rowsView?this._rowsView.height()-s:0,u=this.component.getController("columnsResizer"),d=this.component.getView("draggingHeaderView");t.height=o;var c=u.isResizing()!==!1||d.isDragging();c&&(t.height+=l-a),e!==null&&i&&i.length&&(t.top=i[0].offsetTop+a),this.positionChanged.fire(t)},init:function(){var e=this;e.callBase(),e._columnHeadersView=this.getView("columnHeadersView"),e._rowsView=this.getView("rowsView"),e._pagerView=this.getView("pagerView"),e._rowsView.resizeCompleted.add(function(){if(e.option("allowColumnResizing")){var t=e.getController("columnsResizer")._targetPoint;e.update(t?t.y:null)}})},ctor:function(e){this.callBase(e),this.positionChanged=dt()}}),tne=Dt.ViewController.inherit({_generatePointsByColumns:function(e){var t=this;return be.getPointsByColumns(e.columnElements,function(i){return t._pointCreated(i,e.columns,e.targetDraggingPanel.getName(),e.sourceColumn)},e.isVerticalOrientation,e.startColumnIndex)},_pointCreated:function(e,t,i,n){var r=t[e.columnIndex],a=t[e.columnIndex-1];switch(i){case"columnChooser":return!0;case"headers":return n&&!n.allowReordering||(!r||!r.allowReordering)&&(!a||!a.allowReordering);default:return t.length===0}},_subscribeToEvents:function(e,t){var i=this;V(t,function(n,r){if(r)for(var a,o=r.getRowCount?r.getRowCount():1,s=r.getName(),l=function(c,h){if(h){var f=v(h),p=a[c];r.allowDragging(p,s,t)&&(f.addClass(i.addWidgetPrefix(Tm)),R.on(f,ye(yo,rn),i.createAction(function(m){var g=m.event,C=Gt(g);e.dragHeader({deltaX:C.x-v(g.currentTarget).offset().left,deltaY:C.y-v(g.currentTarget).offset().top,sourceColumn:p,index:p.index,columnIndex:c,columnElement:f,sourceLocation:s,draggingPanels:t,rowIndex:i._columnsController.getRowIndex(p.index,!0)})})),R.on(f,ye(Sa,rn),{that:e},i.createAction(e.moveHeader)),R.on(f,ye(xo,rn),{that:e},i.createAction(e.dropHeader)))}},u=0;u<o;u++){var d=r.getColumnElements(u)||[];d.length&&(a=r.getColumns(u)||[],V(d,l))}})},_unsubscribeFromEvents:function(e,t){var i=this;V(t,function(n,r){if(r){var a=r.getColumnElements()||[];V(a,function(o,s){var l=v(s);R.off(l,ye(yo,rn)),R.off(l,ye(Sa,rn)),R.off(l,ye(xo,rn)),l.removeClass(i.addWidgetPrefix(Tm))})}})},_getSeparator:function(e){return e==="headers"?this._columnsSeparatorView:this._blockSeparatorView},hideSeparators:function(e){var t=this._blockSeparatorView,i=this._columnsSeparatorView;this._animationColumnIndex=null,t&&t.hide(),e!=="block"&&i&&i.hide()},init:function(){var e=this;e.callBase(),e._columnsController=e.getController("columns"),e._columnHeadersView=e.getView("columnHeadersView"),e._columnsSeparatorView=e.getView("columnsSeparatorView"),e._draggingHeaderView=e.getView("draggingHeaderView"),e._rowsView=e.getView("rowsView"),e._blockSeparatorView=e.getView("blockSeparatorView"),e._headerPanelView=e.getView("headerPanel"),e._columnChooserView=e.getView("columnChooserView");var t=function(){if(e._draggingHeaderView){var i=[e._columnChooserView,e._columnHeadersView,e._headerPanelView];e._unsubscribeFromEvents(e._draggingHeaderView,i),e._subscribeToEvents(e._draggingHeaderView,i)}};e._columnHeadersView.renderCompleted.add(t),e._headerPanelView&&e._headerPanelView.renderCompleted.add(t),e._columnChooserView&&e._columnChooserView.renderCompleted.add(t)},allowDrop:function(e){return this._columnsController.allowMoveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)},drag:function(e){var t=e.sourceIndex,i=e.sourceLocation,n=e.sourceColumnElement,r=this._columnHeadersView,a=this._rowsView;n&&(n.css({opacity:Vv}),i==="headers"&&(r&&r.setRowsOpacity(t,Vv),a&&a.setRowsOpacity(t,Vv)))},dock:function(e){var t=this,i=$e(e.targetColumnIndex)?e.targetColumnIndex.columnIndex:e.targetColumnIndex,n=e.sourceLocation,r=e.targetLocation,a=t._getSeparator(r),o=i>=0;t._columnHeadersView.element().find("."+hw).toggleClass(t.addWidgetPrefix(dw),n!=="headers"&&r==="headers"&&!o),a&&(t.allowDrop(e)&&o?r==="group"||r==="columnChooser"?function(){t._animationColumnIndex!==i&&(t.hideSeparators(),a.element()[e.isLast?"insertAfter":"insertBefore"](e.targetColumnElement),t._animationColumnIndex=i,a.show(r))}():(t.hideSeparators("block"),t.getController("tablePosition").update(e.posY),a.moveByX(e.posX-a.width()),a.show()):t.hideSeparators())},drop:function(e){var t=e.sourceColumnElement;if(t&&(t.css({opacity:""}),this._columnHeadersView.setRowsOpacity(e.sourceIndex,""),this._rowsView.setRowsOpacity(e.sourceIndex,""),this._columnHeadersView.element().find("."+hw).removeClass(this.addWidgetPrefix(dw))),this.allowDrop(e)){var i=this._getSeparator(e.targetLocation);i&&i.hide(),this._columnsController.moveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}},dispose:function(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}}),Wo={views:{columnsSeparatorView:Xie,blockSeparatorView:Zie,draggingHeaderView:Jie,trackerView:Yie},controllers:{draggingHeader:tne,tablePosition:ene,columnsResizer:Qie},extenders:{views:{rowsView:{_needUpdateRowHeight:function(e){var t=this.option("wordWrapEnabled"),i=this.getController("columnsResizer"),n=i.isResizing();return this.callBase.apply(this,arguments)||e>0&&t&&n}}},controllers:{editorFactory:{renderFocusOverlay:function(){if(!this.getController("columnsResizer").isResizing())return this.callBase.apply(this,arguments)}}}}};Wo.views.draggingHeaderView;Wo.controllers.draggingHeader;Wo.views.columnsSeparatorView;Wo.controllers.tablePosition;Wo.controllers.columnsResizer;Wo.views.trackerView;Oe.registerModule("columnsResizingReordering",Wo);var $v="rowsview",pw="edit-form",ine="group-footer",fs="dx-row",nne="dx-data-row",rne="dx-group-row",ane="dx-header-row",one="edit-form-item",sne="dx-master-detail-row",ak="dx-freespace-row",lne="dx-virtual-row",vw="dx-master-detail-cell",ok="dx-editor-cell",une="dx-dropdowneditor-overlay",cc="dx-command-expand",sk="dx-command-select",dne="dx-command-edit",_w="[class^=dx-command]",hc="dx-cell-focus-disabled",cne="dxDateBox",mw="dx-state-focused",hne="dx-widget",fne="dx-revert-button",Hv="delete",zc="input:not([type='hidden']), textarea, a, select, button, [tabindex], .dx-checkbox",gw="".concat(zc,", .dx-dropdowneditor-icon"),pne="row",lk="form",Cw="batch",yw="cell",xw="row",bw="cell",Sw="columnHeadersView",vne=["shift","control","alt"];function Ds(e){return e&&e.hasClass(rne)}function Gc(e){return e&&e.hasClass(sne)}function Bl(e){return e&&!Ds(e)&&!Gc(e)}function _ne(e){return!e||e.hasClass(ak)||e.hasClass(lne)}function Xl(e){return e.length&&e[0].tagName==="TD"}function Ew(e,t){return!e._isRowEditMode()&&t&&!t.hasClass(sk)&&t.hasClass(ok)}function An(e){return E(e)&&e.length>0}function uk(){return Re.current().deviceType!=="desktop"}function ww(e){return!!e.parent(".".concat(ane)).length}function mne(e,t){var i=e.option("rtlEnabled"),n=!1;return i?n=!(t.fixedPosition==="right"||E(t.command)&&!E(t.fixedPosition)):n=!(!E(t.fixedPosition)||t.fixedPosition==="left"),n}function gne(e){var t=e.getController("keyboardNavigation");return t._isVirtualScrolling()?e.option("focusedRowIndex")===t.getRowIndex():!1}var Cne=Dt.ViewController.inherit({init:function(){this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._editingController=this.getController("editing"),this._headerPanel=this.getView("headerPanel"),this._columnsController=this.getController("columns"),this._editorFactory=this.getController("editorFactory"),this.isKeyboardEnabled()&&(uz(),this._updateFocusTimeout=null,this._fastEditingStarted=!1,this._focusedCellPosition={},this._canceledCellPosition=null,this._editorFactory.focused.add(e=>{this.setupFocusedView(),this._isNeedScroll&&e.is(":visible")&&this._focusedView&&this._focusedView.getScrollable&&(this._focusedView._scrollToElement(e),this._isNeedScroll=!1)}),this._initViewHandlers(),this._initDocumentHandlers(),this.createAction("onKeyDown"))},_initViewHandlers:function(){var e=this.getView("rowsView"),t=i=>{var n=v(i.target),r=v(i.relatedTarget).closest(e.element()).length,a=n.hasClass("dx-link");if(a&&!r&&this._isEventInCurrentGrid(i)){var o=this._getFocusedCell();o=An(o)?o:e.getCellElements(0).filter("[tabindex]").eq(0),n.closest(o).length||(i.preventDefault(),R.trigger(o,"focus"))}};e.renderCompleted.add(i=>{var n=e.element(),r=!i||i.changeType==="refresh",a=this._focusedView&&this._focusedView.name===e.name,o=!1,s=i&&(i.changeType==="append"||i.changeType==="prepend"),l=v(":focus"),u=!l.length||l.closest(n).length;R.off(n,"focusin",t),R.on(n,"focusin",t),this._initPointerEventHandler(),this._initKeyDownHandler(),this._setRowsViewAttributes(),a&&u&&(o=this._isNeedFocus?!s:this._isHiddenFocus&&r&&!(i!=null&&i.virtualColumnsScrolling),o&&this._updateFocus(!0))})},_initDocumentHandlers:function(){var e=me.getDocument();this._documentClickHandler=this.createAction(t=>{var i=v(t.event.target),n=this._isEventInCurrentGrid(t.event)&&i.closest(".".concat(this.addWidgetPrefix($v))).length,r=i.closest(".".concat(une)).length,a=this.getController("columnsResizer"),o=!!a&&a.isResizing();if(!n&&!r&&!o){var s=this._focusedView?i.parents().filter(this._focusedView.element()).length>0:!1;!s&&this._resetFocusedCell(!0),this._resetFocusedView()}}),R.on(e,ye(lt.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler)},_setRowsViewAttributes:function(){var e=this._getRowsViewElement(),t=!this._dataController.getVisibleRows().length;t&&this._applyTabIndexToElement(e)},_initPointerEventHandler:function(){var e=uk()?vt:lt.down,t=".".concat(fs," > td, .").concat(fs),i=this._getRowsViewElement();E(this._pointerEventAction)||(this._pointerEventAction=this.createAction(this._pointerEventHandler)),R.off(i,ye(e,"dxDataGridKeyboardNavigation"),this._pointerEventAction),R.on(i,ye(e,"dxDataGridKeyboardNavigation"),t,this._pointerEventAction)},_initKeyDownHandler:function(){var e=this._getRowsViewElement();ga.off(this._keyDownListener),this._keyDownListener=ga.on(e,null,t=>this._keyDownHandler(t))},dispose:function(){this.callBase(),this._resetFocusedView(),ga.off(this._keyDownListener),R.off(me.getDocument(),ye(lt.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),clearTimeout(this._updateFocusTimeout),dz()},optionChanged:function(e){switch(e.name){case"keyboardNavigation":case"useLegacyKeyboardNavigation":e.handled=!0;break;default:this.callBase(e)}},isRowFocusType:function(){return this.focusType===xw},isCellFocusType:function(){return this.focusType===bw},setRowFocusType:function(){this.option("focusedRowEnabled")&&(this.focusType=xw)},setCellFocusType:function(){this.focusType=bw},_keyDownHandler:function(e){var t=!0;this._isNeedFocus=!0,this._isNeedScroll=!0;var i=this._processOnKeyDown(e),n=this._editingController.isEditing(),r=e.originalEvent;if(r.isDefaultPrevented()){this._isNeedFocus=!1,this._isNeedScroll=!1;return}if(vne.indexOf(e.keyName)<0&&this._updateFocusedCellPositionByTarget(r.target),!i){switch(e.keyName){case"leftArrow":case"rightArrow":this._leftRightKeysHandler(e,n),i=!0;break;case"upArrow":case"downArrow":e.ctrl?Gg("rowsView",this,r):this._upDownKeysHandler(e,n),i=!0;break;case"pageUp":case"pageDown":this._pageUpDownKeyHandler(e),i=!0;break;case"space":i=this._spaceKeyHandler(e,n);break;case"A":vi(e.originalEvent)?(this._ctrlAKeyHandler(e,n),i=!0):i=this._beginFastEditing(e.originalEvent);break;case"tab":this._tabKeyHandler(e,n),i=!0;break;case"enter":this._enterKeyHandler(e,n),i=!0;break;case"escape":this._escapeKeyHandler(e,n),i=!0;break;case"F":vi(e.originalEvent)?(this._ctrlFKeyHandler(e),i=!0):i=this._beginFastEditing(e.originalEvent);break;case"F2":this._f2KeyHandler(),i=!0;break;case"del":case"backspace":this._isFastEditingAllowed()&&!this._isFastEditingStarted()&&(i=this._beginFastEditing(r,!0))}!i&&!this._beginFastEditing(r)&&(this._isNeedFocus=!1,this._isNeedScroll=!1,t=!1),t&&r.stopPropagation()}},_processOnKeyDown:function(e){var t=e.originalEvent,i={handled:!1,event:t};return this.executeAction("onKeyDown",i),e.ctrl=t.ctrlKey,e.alt=t.altKey,e.shift=t.shiftKey,!!i.handled},_closeEditCell:function(){setTimeout(()=>{this._editingController.closeEditCell()})},_leftRightKeysHandler:function(e,t){var i=this.getVisibleRowIndex(),n=e.originalEvent,r=this._focusedView&&this._focusedView.getRow(i),a=this._getDirectionCodeByKey(e.keyName),o=this._isFastEditingStarted(),s=(!t||o)&&Bl(r);if(s){this.setCellFocusType(),o&&this._closeEditCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(a);var l=this._getNextCell(a);An(l)&&this._arrowKeysHandlerFocusCell(n,l,a),n&&n.preventDefault()}},_upDownKeysHandler:function(e,t){var i,n,r=this._focusedCellPosition.rowIndex,a=this.getVisibleRowIndex(),o=this._focusedView&&this._focusedView.getRow(a),s=e.originalEvent,l=e.keyName==="upArrow",u=this._dataController.dataSource(),d=(i=this._editingController)===null||i===void 0||(n=i.isEditRowByIndex)===null||n===void 0?void 0:n.call(i,a),c=this._isFastEditingStarted(),h=(!d||!t||c)&&o&&!Gc(o);if(h){if(c&&this._closeEditCell(),!this._navigateNextCell(s,e.keyName)&&this._isVirtualRowRender()&&l&&u&&!u.isLoading()){var f=nt(o);r=this._focusedCellPosition.rowIndex-1,this._scrollBy(0,-f,r,s)}s&&s.preventDefault()}},_pageUpDownKeyHandler:function(e){var t=this._dataController.pageIndex(),i=this._dataController.pageCount(),n=this.option("paging.enabled"),r=e.keyName==="pageUp",a=r?-1:1,o=this.getView("rowsView").getScrollable();n&&!this._isVirtualScrolling()?(r?t>0:t<i-1)&&!this._isVirtualScrolling()&&(this._dataController.pageIndex(t+a),e.originalEvent.preventDefault()):o&&Ke(o.container())<Ke(o.$content())&&(this._scrollBy(0,Ke(o.container())*a),e.originalEvent.preventDefault())},_spaceKeyHandler:function(e,t){var i=this.getVisibleRowIndex(),n=v(e.originalEvent&&e.originalEvent.target);if(this.option("selection")&&this.option("selection").mode!=="none"&&!t){var r=this._getElementType(n)==="row"&&this.isRowFocusType()&&Bl(n),a=n.hasClass(sk);return a&&this.option("selection.showCheckBoxesMode")==="onClick"&&this._selectionController.startSelectionWithCheckboxes(),r||n.parent().hasClass(nne)||n.hasClass(this.addWidgetPrefix($v))?(this._selectionController.changeItemSelection(i,{shift:e.shift,control:e.ctrl}),e.originalEvent.preventDefault(),!0):!1}else return this._beginFastEditing(e.originalEvent)},_ctrlAKeyHandler:function(e,t){!t&&!e.alt&&this.option("selection.mode")==="multiple"&&this.option("selection.allowSelectAll")&&(this._selectionController.selectAll(),e.originalEvent.preventDefault())},_tabKeyHandler:function(e,t){var i=this.option("editing"),n=e.shift?"previous":"next",r=E(this._focusedCellPosition)&&!Pn(this._focusedCellPosition),a=!r||!e.shift&&this._isLastValidCell(this._focusedCellPosition)||e.shift&&this._isFirstValidCell(this._focusedCellPosition),o=e.originalEvent.target,s=this._focusedView&&this._focusedView.element();if(!this._handleTabKeyOnMasterDetailCell(o,n)){if(v(s).addClass(mw),i&&o&&!a)if(v(o).hasClass(this.addWidgetPrefix($v))&&this._resetFocusedCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(n),t){if(!this._editingCellTabHandler(e,n))return}else this._targetCellTabHandler(e,n)&&(a=!0);a?(this._editorFactory.loseFocus(),this._editingController.isEditing()&&!this._isRowEditMode()&&(this._resetFocusedCell(!0),this._resetFocusedView(),this._closeEditCell())):e.originalEvent.preventDefault()}},_getMaxHorizontalOffset:function(){var e=this.component.getScrollable(),t=this.getView("rowsView"),i=e?e.scrollWidth()-He(t.element()):0;return i},_isColumnRendered:function(e){var t=this._columnsController.getVisibleColumns(null,!0),i=this._columnsController.getVisibleColumns(),n=t[e],r=!1;return n&&(r=i.indexOf(n)>=0),r},_isFixedColumn:function(e){var t=this._columnsController.getVisibleColumns(null,!0),i=t[e];return!!i&&!!i.fixed},_isColumnVirtual:function(e){var t=e-this._columnsController.getColumnIndexOffset(),i=this._columnsController.getVisibleColumns(),n=i[t];return!!n&&n.command==="virtual"},_processVirtualHorizontalPosition:function(e){var t=this.component.getScrollable(),i=this.getColumnIndex(),n,r=0,a=!1;switch(e){case"next":case"nextInRow":var o=this._getVisibleColumnCount();n=i+1,r=this.option("rtlEnabled")?this._getMaxHorizontalOffset():0,e==="next"?a=o===n||this._isFixedColumn(i)&&!this._isColumnRendered(n):a=o>n&&this._isFixedColumn(i)&&!this._isColumnRendered(n);break;case"previous":case"previousInRow":if(n=i-1,r=this.option("rtlEnabled")?0:this._getMaxHorizontalOffset(),e==="previous"){var s=this._columnsController.getColumnIndexOffset(),l=n<0&&s===0;a=l||this._isFixedColumn(i)&&!this._isColumnRendered(n)}else a=n>=0&&this._isFixedColumn(i)&&!this._isColumnRendered(n)}a?t.scrollTo({left:r}):E(n)&&E(e)&&this._isColumnVirtual(n)&&(r=this._getHorizontalScrollPositionOffset(e),r!==0&&t.scrollBy({left:r,top:0}))},_getHorizontalScrollPositionOffset:function(e){var t=0,i=this._getCell(this._focusedCellPosition),n=i&&ot(i);if(n>0){var r=this.option("rtlEnabled")?-1:1;t=e==="nextInRow"||e==="next"?n*r:n*r*-1}return t},_editingCellTabHandler:function(e,t){var i=e.originalEvent.target,n=this._getCellElementFromTarget(i),r,a=e.originalEvent,o=this._getElementType(i);if(n.is(_w))return!this._targetCellTabHandler(e,t);this._updateFocusedCellPosition(n);var s=this._getNextCellByTabKey(a,t,o);if(n=s.$cell,!n||this._handleTabKeyOnMasterDetailCell(n,t))return!1;var l=this._columnsController,u=this.getView("rowsView").getCellIndex(n),d=u+l.getColumnIndexOffset(),c=l.getVisibleColumns(null,!0)[d],h=n.parent(),f=this._getRowIndex(h),p=this._dataController.items()[f],m=this._editingController;if(c&&c.allowEditing){var g=!p||p.rowType==="data";r=m.allowUpdating({row:p})?g:p&&p.isNewRow}return r||this._closeEditCell(),this._focusCell(n,!s.isHighlighted)&&(!this._isRowEditMode()&&r?this._editFocusedCell():this._focusInteractiveElement(n,e.shift)),!0},_targetCellTabHandler:function(e,t){var i=e.originalEvent,n=i.target,r=this._getCellElementFromTarget(n),a=this._getInteractiveElement(r,!e.shift),o=!1,s;if(!Ew(this,r)&&a.length&&n!==a.get(0))o=!0;else{this._focusedCellPosition.rowIndex===void 0&&v(n).hasClass(fs)&&this._updateFocusedCellPosition(r),s=this._getElementType(n),this.isRowFocusType()&&(this.setCellFocusType(),s==="row"&&Bl(v(n))&&(n=this.getFirstValidCellInRow(v(n)),s=this._getElementType(n)));var l=this._getNextCellByTabKey(i,t,s);if(r=l.$cell,!r||(r=this._checkNewLineTransition(i,r),!r))return!1;this._focusCell(r,!l.isHighlighted),Ew(this,r)||this._focusInteractiveElement(r,e.shift)}return o},_getNextCellByTabKey:function(e,t,i){var n=this._getNextCell(t,i),r=n&&this._fireFocusedCellChanging(e,n,!0);return!r||r.cancel?{}:(r.$newCellElement&&(n=r.$newCellElement),{$cell:n,isHighlighted:r.isHighlighted})},_checkNewLineTransition:function(e,t){var i=this.getVisibleRowIndex(),n=t.parent();if(i!==this._getRowIndex(n)){var r=this._getCellPosition(t),a=this._fireFocusedRowChanging(e,n);if(a.cancel)return;a.rowIndexChanged&&(this.setFocusedColumnIndex(r.columnIndex),t=this._getFocusedCell())}return t},_enterKeyHandler:function(e,t){var i=this._getFocusedCell(),n=this.getVisibleRowIndex(),r=this._focusedView&&this._focusedView.getRow(n);if(this.option("grouping.allowCollapsing")&&Ds(r)||this.option("masterDetail.enabled")&&i&&i.hasClass(cc)){var a=this._dataController.getKeyByRowIndex(n),o=this._dataController.items()[n];a!==void 0&&o&&o.data&&!o.data.isContinuation&&this._dataController.changeRowExpand(a)}else this._processEnterKeyForDataCell(e,t)},_processEnterKeyForDataCell:function(e,t){var i=this._getEnterKeyDirection(e),n=this._allowEditingOnEnterKey();t||!n&&i?(this._handleEnterKeyEditingCell(e.originalEvent),i==="next"||i==="previous"?this._targetCellTabHandler(e,i):(i==="upArrow"||i==="downArrow")&&this._navigateNextCell(e.originalEvent,i)):n&&this._startEditing(e)},_getEnterKeyDirection:function(e){var t=this.option("keyboardNavigation.enterKeyDirection"),i=e.shift;if(t==="column")return i?"upArrow":"downArrow";if(t==="row")return i?"previous":"next"},_handleEnterKeyEditingCell:function(e){var t=e.target,i=this._getCellElementFromTarget(t),n=this._isRowEditMode();this._updateFocusedCellPosition(i),n?(this._focusEditFormCell(i),setTimeout(this._editingController.saveEditData.bind(this._editingController))):(R.trigger(v(t),"change"),this._closeEditCell(),e.preventDefault())},_escapeKeyHandler:function(e,t){var i=this._getCellElementFromTarget(e.originalEvent.target);t&&(this._updateFocusedCellPosition(i),this._isRowEditMode()?(this._focusEditFormCell(i),this._editingController.cancelEditData(),this._dataController.items().length===0&&(this._resetFocusedCell(),this._editorFactory.loseFocus())):this._editingController.getEditMode()==="cell"?this._editingController.cancelEditData():this._closeEditCell(),e.originalEvent.preventDefault())},_ctrlFKeyHandler:function(e){if(this.option("searchPanel.visible")){var t=this._headerPanel.getSearchTextEditor();t&&(t.focus(),e.originalEvent.preventDefault())}},_f2KeyHandler:function(){var e=this._editingController.isEditing(),t=this.getVisibleRowIndex(),i=this._focusedView&&this._focusedView.getRow(t);!e&&Bl(i)&&this._startEditing()},_navigateNextCell:function(e,t){var i=this._getNextCell(t),n=this._getDirectionCodeByKey(t),r=i&&this._isCellValid(i),a=r?this._arrowKeysHandlerFocusCell(e,i,n):!1;return a},_arrowKeysHandlerFocusCell:function(e,t,i){var n=i==="prevRow"||i==="nextRow",r=this._fireFocusChangingEvents(e,t,n,!0);return t=r.$newCellElement,!r.cancel&&this._isCellValid(t)?(this._focus(t,!r.isHighlighted),!0):!1},_beginFastEditing:function(e,t){if(!this._isFastEditingAllowed()||e.altKey||e.ctrlKey||this._editingController.isEditing())return!1;if(t)this._startEditing(e,Hv);else{var i=e.key,n=e.keyCode||e.which,r=i||n&&String.fromCharCode(n);r&&(r.length===1||r===Hv)&&this._startEditing(e,r)}return!0},_pointerEventHandler:function(e){var t=e.event||e,i=v(t.currentTarget),n=this.getView("rowsView"),r=n&&n.element(),a=i.parent(),o=v(t.target).is(zc),s=!!v(t.target).closest(".".concat(fne)).length,l=i.hasClass(cc);this._isEventInCurrentGrid(t)&&(!s&&(this._isCellValid(i,!o)||l)?(i=this._isInsideEditForm(i)?v(t.target):i,this._focusView(),v(r).removeClass(mw),a.hasClass(ak)?(this._updateFocusedCellPosition(i),this._applyTabIndexToElement(this._focusedView.element()),this._focusedView.focus()):this._isMasterDetailCell(i)?this._updateFocusedCellPosition(i):this._clickTargetCellHandler(t,i)):i.is("td")&&this._resetFocusedCell())},_clickTargetCellHandler:function(e,t){var i=this.getView("rowsView").getCellIndex(t),n=this._columnsController.getVisibleColumns()[i],r=this._isCellEditMode();this.setCellFocusType();var a=this._fireFocusChangingEvents(e,t,!0);if(t=a.$newCellElement,a.cancel)this.setRowFocusType(),this.setFocusedRowIndex(a.prevRowIndex),t=this._getFocusedCell(),this._editingController.isEditing()&&r&&this._closeEditCell();else{if(a.resetFocusedRow){this.getController("focus")._resetFocusedRow();return}if(a.rowIndexChanged&&(t=this._getFocusedCell()),!a.isHighlighted&&!r&&this.setRowFocusType(),this._updateFocusedCellPosition(t),this._allowRowUpdating()&&r&&n&&n.allowEditing)this._isNeedFocus=!1,this._isHiddenFocus=!1;else{var o=e&&v(e.target).closest(gw+", td"),s=o&&o.not(t).is(gw),l=!!n&&!n.command&&t.hasClass(ok),u=!l&&(!a.isHighlighted||s);this._focus(t,u,s)}}},_allowRowUpdating:function(){var e=this.getVisibleRowIndex(),t=this._dataController.items()[e];return this._editingController.allowUpdating({row:t},"click")},focus:function(e){var t,i=this.option("focusedRowEnabled"),n=Xl(v(e));e||(t=".dx-datagrid-rowsview .dx-row[tabindex]",i||(t+=", .dx-datagrid-rowsview .dx-row > td[tabindex]"),e=this.component.$element().find(t).first()),e&&this._focusElement(v(e),n)},getFocusedView:function(){return this._focusedView},setupFocusedView:function(){this.isKeyboardEnabled()&&!E(this._focusedView)&&this._focusView()},_focusElement:function(e,t){var i=v(this._getRowsViewElement()),n=e.closest(i),r=this.isRowFocusType(),a={};!n.length||Xl(e)&&!this._isCellValid(e)||(this._focusView(),this._isNeedFocus=!0,this._isNeedScroll=!0,(Xl(e)||Ds(e))&&(this.setCellFocusType(),a=this._fireFocusChangingEvents(null,e,!1,t),e=a.$newCellElement,r&&!a.isHighlighted&&this.setRowFocusType()),a.cancel||(this._focus(e,!a.isHighlighted),this._focusInteractiveElement(e)))},_getFocusedViewByElement:function(e){var t=this.getFocusedView(),i=t&&v(t.element());return e&&e.closest(i).length!==0},_focusView:function(){this._focusedView=this.getView("rowsView")},_resetFocusedView:function(){this.setRowFocusType(),this._focusedView=null},_focusInteractiveElement:function(e,t){if(e){var i=this._getInteractiveElement(e,t);be.focusAndSelectElement(this,i)}},_focus:function(e,t,i){var n=e&&!e.hasClass(fs)?e.closest(".".concat(fs)):e;if(!(n&&_ne(n))){var r=this._focusedView,a=r&&r.element(),o;this._isHiddenFocus=t;var s=Ds(n)||this.isRowFocusType();s?(o=n,r&&this.setFocusedRowIndex(this._getRowIndex(n))):Xl(e)&&(o=e,this._updateFocusedCellPosition(e)),o&&(a&&a.find(".dx-row[tabindex], .dx-row > td[tabindex]").not(o).removeClass(hc).removeAttr("tabindex"),R.one(o,"blur",l=>{l.relatedTarget&&o.removeClass(hc)}),i||(this._applyTabIndexToElement(o),R.trigger(o,"focus")),t?(o.addClass(hc),s&&e.addClass(hc)):this._editorFactory.focus(o))}},_updateFocus:function(e){this._updateFocusTimeout=setTimeout(()=>{var t=this._editingController,i=t.getEditMode()===yw,n=t.getEditMode()===Cw;if(i&&t.hasChanges()||n&&t.isNewRowInEditMode()){t._focusEditingCell();return}var r=this._getFocusedCell(),a=t.isEditing();if(r&&!(this._isMasterDetailCell(r)&&!this._isRowEditMode())){if(this._hasSkipRow(r.parent())){var o=this._focusedCellPosition&&this._focusedCellPosition.rowIndex>0?"upArrow":"downArrow";r=this._getNextCell(o)}if(An(r))if(r.is("td")||r.hasClass(this.addWidgetPrefix(one))){var s=r.is(_w),l=r.find(":focus"),u=An(l);if((e||!s)&&this._editorFactory.focus()){if(s&&u){be.focusAndSelectElement(this,l);return}!u&&this._focus(r)}else!u&&(this._isNeedFocus||this._isHiddenFocus)&&this._focus(r,this._isHiddenFocus);a&&this._focusInteractiveElement.bind(this)(r)}else R.trigger(r,"focus")}})},_getFocusedCell:function(){return v(this._getCell(this._focusedCellPosition))},_updateFocusedCellPositionByTarget:function(e){var t,i=this._getElementType(e);if(i==="row"&&E((t=this._focusedCellPosition)===null||t===void 0?void 0:t.columnIndex)){var n=v(e);this._focusedView&&Ds(n)&&this.setFocusedRowIndex(this._getRowIndex(n))}else this._updateFocusedCellPosition(this._getCellElementFromTarget(e))},_updateFocusedCellPosition:function(e,t){var i=this._getCellPosition(e,t);return i&&(!e.length||i.rowIndex>=0&&i.columnIndex>=0)&&this.setFocusedCellPosition(i.rowIndex,i.columnIndex),i},_getFocusedColumnIndexOffset:function(e){var t=0,i=this._columnsController.getVisibleColumns()[e];return i&&i.fixed?t=this._getFixedColumnIndexOffset(i):e>=0&&(t=this._columnsController.getColumnIndexOffset()),t},_getFixedColumnIndexOffset:function(e){var t=mne(this,e)?this._getVisibleColumnCount()-this._columnsController.getVisibleColumns().length:0;return t},_getCellPosition:function(e,t){var i,n=An(e)&&e.closest("tr"),r=this.getView("rowsView");if(An(n)){var a=this._getRowIndex(n);return i=r.getCellIndex(e,a),i+=this._getFocusedColumnIndexOffset(i),t&&(i=t==="previous"?i-1:i+1,i=this._applyColumnIndexBoundaries(i)),{rowIndex:a,columnIndex:i}}},_focusCell:function(e,t){if(this._isCellValid(e))return this._focus(e,t),!0},_focusEditFormCell:function(e){e.hasClass(vw)&&this._editorFactory.focus(e,!0)},_resetFocusedCell:function(e){var t,i=this._getFocusedCell();An(i)&&i.removeAttr("tabindex"),this._isNeedFocus=!1,this._isNeedScroll=!1,this._focusedCellPosition={},clearTimeout(this._updateFocusTimeout),(t=this._focusedView)===null||t===void 0||t.renderFocusState({preventScroll:e})},restoreFocusableElement:function(e,t){var i,n,r=E(e),a=this.getView("rowsView"),o=a.element(),s=this._focusedCellPosition.columnIndex,l=this._dataController.getRowIndexOffset();e=r?e:a.getTopVisibleItemIndex()+l,r?(n=a.getRow(e-l),i=this._fireFocusedRowChanging(t,n),!i.cancel&&i.rowIndexChanged&&(e=i.newRowIndex)):(this._editorFactory.loseFocus(),this._applyTabIndexToElement(o),R.trigger(o,"focus")),(!r||!i.cancel)&&this.setFocusedCellPosition(e,s),r&&this._updateFocus()},_getNewPositionByCode:function(e,t,i){var n=e.columnIndex,r=e.rowIndex,a;if(e.rowIndex===void 0&&i==="next")return{columnIndex:0,rowIndex:0};switch(i){case"nextInRow":case"next":a=this._getVisibleColumnCount(),n<a-1&&t!=="row"&&this._hasValidCellAfterPosition({columnIndex:n,rowIndex:r})?n++:!this._isLastRow(r)&&i==="next"&&(n=0,r++);break;case"previousInRow":case"previous":n>0&&t!=="row"&&this._hasValidCellBeforePosition({columnIndex:n,rowIndex:r})?n--:r>0&&i==="previous"&&(r--,a=this._getVisibleColumnCount(),n=a-1);break;case"upArrow":r=r>0?r-1:r;break;case"downArrow":r=this._isLastRow(r)?r:r+1}return{columnIndex:n,rowIndex:r}},setFocusedCellPosition:function(e,t){this.setFocusedRowIndex(e),this.setFocusedColumnIndex(t)},setFocusedRowIndex:function(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.rowIndex=e},setFocusedColumnIndex:function(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.columnIndex=e},getRowIndex:function(){return this._focusedCellPosition?this._focusedCellPosition.rowIndex:-1},getColumnIndex:function(){return this._focusedCellPosition?this._focusedCellPosition.columnIndex:-1},getVisibleRowIndex:function(){var e=this._focusedCellPosition&&this._focusedCellPosition.rowIndex;return!E(e)||e<0?-1:e-this._dataController.getRowIndexOffset()},getVisibleColumnIndex:function(){var e=this._focusedCellPosition&&this._focusedCellPosition.columnIndex;return E(e)?e-this._columnsController.getColumnIndexOffset():-1},_applyColumnIndexBoundaries:function(e){var t=this._getVisibleColumnCount();return e<0?e=0:e>=t&&(e=t-1),e},_isCellByPositionValid:function(e){var t=v(this._getCell(e));return this._isCellValid(t)},_isLastRow:function(e){var t=this._dataController;return this._isVirtualRowRender()?e>=t.getMaxRowIndex():e===t.items().length-1},_isFirstValidCell:function(e){var t=!1;return e.rowIndex===0&&e.columnIndex>=0&&(t=t||!this._hasValidCellBeforePosition(e)),t},_hasValidCellBeforePosition:function(e){for(var t=e.columnIndex,i=!1;t>0&&!i;){var n={columnIndex:--t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(n)}return i},_hasValidCellAfterPosition:function(e){for(var t=e.columnIndex,i=!1,n=this._getVisibleColumnCount();t<n-1&&!i;){var r={columnIndex:++t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(r)}return i},_isLastValidCell:function(e){var t=e.columnIndex>=0?e.columnIndex+1:0,i=e.rowIndex,n={columnIndex:t,rowIndex:i},r=this._dataController.getVisibleRows(),a=r&&r[i],o=this._isLastRow(i);return o?a&&a.rowType==="group"&&e.columnIndex>0||e.columnIndex===this._getVisibleColumnCount()-1?!0:this._isCellByPositionValid(n)?!1:this._isLastValidCell(n):!1},_isCellValid:function(e,t){if(An(e)){var i=this.getView("rowsView"),n=e.parent(),r=this._columnsController,a=i.getCellIndex(e)+r.getColumnIndexOffset(),o=r.getVisibleColumns(null,!0)[a],s=this._getVisibleColumnCount(),l=this._editingController,u=Gc(n),d=o&&o.showWhenGrouped,c=o&&!e.hasClass(cc)&&Bl(n);if(this._isMasterDetailCell(e))return!0;if(s>a&&(!u&&o&&(!E(o.groupIndex)||d&&c)||parseInt(e.attr("colspan"))>1)){var h=this._dataController.items(),f=i.getRowIndex(n),p=h[f],m=l&&this._isCellEditMode()&&l.isEditing(),g=l&&l.isEditRow(f),C=g||m;return o.command?this._isLegacyNavigation()?!C&&o.command==="expand":m?!1:g?o.command!=="select":!C:m&&p&&p.rowType!=="data"?!1:!C||o.allowEditing||t}}},getFirstValidCellInRow:function(e,t){var i=e.find("> td"),n,r;t=t||0;for(var a=t;a<i.length;++a)if(n=i.eq(a),this._isCellValid(n)){r=n;break}return r},_getNextCell:function(e,t,i){var n=i||this._focusedCellPosition,r=this.isRowFocusType(),a=r||["next","previous"].includes(e),o,s;if(this._focusedView&&n){var l=this._getNewPositionByCode(n,t,e);o=v(this._getCell(l));var u=e==="previous"?this._isFirstValidCell(l):this._isLastValidCell(l);if(An(o)&&!this._isCellValid(o)&&this._isCellInRow(l,a)&&!u&&(r?o=this.getFirstValidCellInRow(o.parent(),l.columnIndex):o=this._getNextCell(e,"cell",l)),s=An(o)&&o.parent(),this._hasSkipRow(s)){var d=this._getRowIndex(s);if(!this._isLastRow(d))o=this._getNextCell(e,"row",{columnIndex:n.columnIndex,rowIndex:d});else return null}return An(o)?o:null}return null},_startEditing:function(e,t){var i=this._focusedCellPosition,n=this.getVisibleRowIndex(),r=this.getVisibleColumnIndex(),a=this._dataController.items()[n],o=this._columnsController.getVisibleColumns()[r];this._isAllowEditing(a,o)&&(this._isRowEditMode()?this._editingController.editRow(n):i&&this._startEditCell(e,t))},_isAllowEditing:function(e,t){return this._editingController.allowUpdating({row:e})&&t&&t.allowEditing},_editFocusedCell:function(){var e=this.getVisibleRowIndex(),t=this.getVisibleColumnIndex();return this._editingController.editCell(e,t)},_startEditCell:function(e,t){this._fastEditingStarted=E(t);var i=this._editFocusedCell();if(this._isFastEditingStarted()){if(i===!0)this._editingCellHandler(e,t);else if(i&&i.done){var n=t!==Hv?t:"";i.done(()=>this._editingCellHandler(e,n))}}},_editingCellHandler:function(e,t){var i,n,r=this._getFocusedCell().find(zc).eq(0),a=uo(e,{type:"keydown",target:r.get(0)}),o=uo(e,{type:"keypress",target:r.get(0)}),s=uo(e,{type:"input",target:r.get(0)});if((i=(n=r.get(0)).select)===null||i===void 0||i.call(n),R.trigger(r,a),!a.isDefaultPrevented()&&(R.trigger(r,o),!o.isDefaultPrevented())){var l=Lt.mozilla?25:0;setTimeout(()=>{r.val(t);var u=r.closest(".".concat(hne));R.off(u,"focusout"),R.one(u,"focusout",function(){R.trigger(r,"change")}),R.trigger(r,s)},l)}},_fireFocusChangingEvents:function(e,t,i,n){var r={},a=this._getCellPosition(t)||{};return this.isCellFocusType()&&(r=this._fireFocusedCellChanging(e,t,n),r.cancel||(a.columnIndex=r.newColumnIndex,a.rowIndex=r.newRowIndex,n=r.isHighlighted,t=v(this._getCell(a)))),!r.cancel&&i&&t&&(r=this._fireFocusedRowChanging(e,t.parent()),r.cancel||(a.rowIndex=r.newRowIndex,r.isHighlighted=n)),r.$newCellElement=v(this._getCell(a)),r.$newCellElement.length||(r.$newCellElement=t),r},_fireFocusedCellChanging:function(e,t,i){var n=this.option("focusedColumnIndex"),r=this.option("focusedRowIndex"),a=this._getCellPosition(t),o=a?a.columnIndex:-1,s=a?a.rowIndex:-1,l={cellElement:t,prevColumnIndex:n,prevRowIndex:r,newColumnIndex:o,newRowIndex:s,rows:this._dataController.getVisibleRows(),columns:this._columnsController.getVisibleColumns(),event:e,isHighlighted:i||!1,cancel:!1};return this._canceledCellPosition=null,this.executeAction("onFocusedCellChanging",l),(l.newColumnIndex!==o||l.newRowIndex!==s)&&(l.$newCellElement=v(this._getCell({columnIndex:l.newColumnIndex,rowIndex:l.newRowIndex}))),l.cancel&&(this._canceledCellPosition={rowIndex:s,columnIndex:o}),l},_fireFocusedCellChanged:function(e,t,i){var n=this._dataController,r=this.getView("rowsView").getCellIndex(e),a=this._getRowIndex(e&&e.parent()),o=Math.min(a-n.getRowIndexOffset(),n.items().length-1),s=this._editingController.isEditCell(o,r),l=n.items()[o];!s&&(t!==r||i!==a)&&this.executeAction("onFocusedCellChanged",{cellElement:e,columnIndex:r,rowIndex:a,row:l,column:this._columnsController.getVisibleColumns()[r]})},_fireFocusedRowChanging:function(e,t){var i=this._getRowIndex(t),n=this._dataController,r=this.option("focusedRowIndex"),a=n.loadingOperationTypes(),o={rowElement:t,prevRowIndex:r,newRowIndex:i,event:e,rows:n.getVisibleRows(),cancel:!1};return!n||n.isLoading()&&(a.reload||a.paging)?(o.cancel=!0,o):(this.option("focusedRowEnabled")&&(this.executeAction("onFocusedRowChanging",o),!o.cancel&&o.newRowIndex!==i&&(o.resetFocusedRow=o.newRowIndex<0,o.resetFocusedRow||this.setFocusedRowIndex(o.newRowIndex),o.rowIndexChanged=!0)),o)},_fireFocusedRowChanged:function(e){var t,i=this.option("focusedRowKey"),n=this.getController("focus"),r=n==null?void 0:n.getFocusedRowIndexByKey(i);if(this.option("focusedRowEnabled")){if(r>=0){var a=this._dataController;t=r>=0&&a.getVisibleRows()[r-a.getRowIndexOffset()]}this.executeAction("onFocusedRowChanged",{rowElement:e,rowIndex:r,row:t})}},_isEventInCurrentGrid:function(e){return be.isElementInCurrentGrid(this,v(e.target))},_isRowEditMode:function(){var e=this._editingController.getEditMode();return e===pne||e===lk},_isCellEditMode:function(){var e=this._editingController.getEditMode();return e===yw||e===Cw},_isFastEditingAllowed:function(){return this._isCellEditMode()&&this.option("keyboardNavigation.editOnKeyPress")},_getInteractiveElement:function(e,t){var i=e.find(zc).filter(":visible");return t?i.last():i.first()},_applyTabIndexToElement:function(e){var t=this.option("tabIndex")||0;e.attr("tabindex",E(t)?t:0)},_getCell:function(e){if(this._focusedView&&e){var t=this._dataController.getRowIndexOffset(),i=this._columnsController.getVisibleColumns(null,!0)[e.columnIndex],n=i&&i.fixed?this._getFixedColumnIndexOffset(i):this._columnsController.getColumnIndexOffset(),r=e.rowIndex>=0?e.rowIndex-t:-1,a=e.columnIndex>=0?e.columnIndex-n:-1;return this._focusedView.getCell({rowIndex:r,columnIndex:a})}},_getRowIndex:function(e){var t=this.getView("rowsView"),i=t.getRowIndex(e);return i>=0&&(i+=this._dataController.getRowIndexOffset()),i},_hasSkipRow:function(e){var t=e&&e.get(0);return t&&(t.style.display==="none"||e.hasClass(this.addWidgetPrefix(ine))||Gc(e)&&!e.hasClass(this.addWidgetPrefix(pw)))},_allowEditingOnEnterKey:function(){return this.option("keyboardNavigation.enterKeyAction")==="startEdit"},_isLegacyNavigation:function(){return this.option("useLegacyKeyboardNavigation")},_getDirectionCodeByKey:function(e){var t;switch(e){case"upArrow":t="prevRow";break;case"downArrow":t="nextRow";break;case"leftArrow":t=this.option("rtlEnabled")?"nextInRow":"previousInRow";break;case"rightArrow":t=this.option("rtlEnabled")?"previousInRow":"nextInRow"}return t},_isVirtualScrolling:function(){var e=this.option("scrolling.mode");return e==="virtual"||e==="infinite"},_isVirtualRowRender:function(){return this._isVirtualScrolling()||be.isVirtualRowRendering(this)},_isVirtualColumnRender:function(){return this.option("scrolling.columnRenderingMode")==="virtual"},_scrollBy:function(e,t,i,n){var r=this,a=this.getView("rowsView").getScrollable();return r._focusedCellPosition&&a.on("scroll",function o(){a.off("scroll",o),setTimeout(r.restoreFocusableElement.bind(r,i,n))}),a.scrollBy({left:e,top:t})},_isInsideEditForm:function(e){var t=v(e).closest("."+this.addWidgetPrefix(pw));return t.length&&this.elementIsInsideGrid(t)},_isMasterDetailCell:function(e){var t=v(e).closest("."+vw);return t.length&&this.elementIsInsideGrid(t)},_processNextCellInMasterDetail:function(e){!this._isInsideEditForm(e)&&e&&this._applyTabIndexToElement(e)},_handleTabKeyOnMasterDetailCell:function(e,t){if(this._isMasterDetailCell(e)){this._updateFocusedCellPosition(v(e),t);var i=this._getNextCell(t,"row");return this._processNextCellInMasterDetail(i),!0}return!1},_getElementType:function(e){return v(e).is("tr")?"row":"cell"},_isFastEditingStarted:function(){return this._isFastEditingAllowed()&&this._fastEditingStarted},_getVisibleColumnCount:function(){return this._columnsController.getVisibleColumns(null,!0).length},_isCellInRow:function(e,t){var i=e.columnIndex,n=this._getVisibleColumnCount();return t?i>=0&&i<=n-1:i>0&&i<n-1},_getCellElementFromTarget:function(e){var t=this._getElementType(e),i=v(e),n;return t==="cell"?n=i.closest(".".concat(fs," > td")):n=i.children().not("."+cc).first(),n},_getRowsViewElement:function(){var e=this.getView("rowsView");return e&&e.element()},isKeyboardEnabled:function(){return this.option("keyboardNavigation.enabled")},_processCanceledEditCellPosition:function(e,t){if(this._canceledCellPosition){var i=this._canceledCellPosition.rowIndex===e&&this._canceledCellPosition.columnIndex===t;return this._canceledCellPosition=null,i}},updateFocusedRowIndex:function(){var e=this._dataController,t=this.getVisibleRowIndex(),i=e.items(),n=i.length?i.length-1:-1,r=e.getRowIndexOffset();n>=0&&t>n&&this.setFocusedRowIndex(n+r)}}),yne={defaultOptions:function(){return{useLegacyKeyboardNavigation:!1,keyboardNavigation:{enabled:!0,enterKeyAction:"startEdit",enterKeyDirection:"none",editOnKeyPress:!1}}},controllers:{keyboardNavigation:Cne},extenders:{views:{rowsView:{_rowClick:function(e){var t=this.getController("editing").getEditRowIndex(),i=this.getController("keyboardNavigation");t===e.rowIndex&&i.setCellFocusType();var n=uk()&&this.option("focusedRowEnabled");n&&this._triggerPointerDownEventHandler(e),this.callBase.apply(this,arguments)},_triggerPointerDownEventHandler:function(e){var t=e.event.originalEvent;if(t){var i=this.getController("keyboardNavigation"),n=v(t.target),r=this.getCellIndex(n),a=this.getController("columns").getVisibleColumns()[r],o=this.getController("data").items()[e.rowIndex];if(i._isAllowEditing(o,a)){var s=uo(t,{currentTarget:t.target});i._pointerEventHandler(s)}}},renderFocusState:function(e){var{preventScroll:t,pageSizeChanged:i}=e??{},n=this.getController("keyboardNavigation"),r=this.element();r&&!ba(r)&&r.attr("tabindex",null),i&&n.updateFocusedRowIndex();var a=n.getVisibleRowIndex();(!E(a)||a<0)&&(a=0);var o=this.getCellElements(a);n.isKeyboardEnabled()&&o.length&&this.updateFocusElementTabIndex(o,t)},updateFocusElementTabIndex:function(e){var t=this.getController("keyboardNavigation"),i=e.eq(0).parent();if(Ds(i))t._applyTabIndexToElement(i);else{var n=t.getColumnIndex();(!E(n)||n<0)&&(n=0),this._updateFocusedCellTabIndex(e,n)}},_updateFocusedCellTabIndex:function(e,t){var i=this.getController("keyboardNavigation"),n=e?e.length:-1,r=function(s){var l=i._isMasterDetailCell(s),u=i._isCellValid(s);if(!l&&u&&Xl(s))return i._applyTabIndexToElement(s),i.setCellFocusType(),!0},a=e.filter("[aria-colindex='".concat(t+1,"']"));if(a.length)r(a);else{n<=t&&(t=n-1);for(var o=t;o<n&&!r(v(e[o]));++o);}},renderDelayedTemplates:function(e){this.callBase.apply(this,arguments),this._renderFocusByChange(e)},_renderFocusByChange(e){var{operationTypes:t,repaintChangesOnly:i}=e??{},{fullReload:n,pageSize:r}=t??{};if(!e||!i||n||r){var a=gne(this);this.renderFocusState({preventScroll:a,pageSizeChanged:r})}},_renderCore:function(e){this.callBase.apply(this,arguments),this._renderFocusByChange(e)},_editCellPrepared:function(e){var t=this._getEditorInstance(e),i=this.getController("keyboardNavigation"),n=i&&i._isFastEditingStarted();t&&n&&this._handleEditingNavigationMode(t),this.callBase.apply(this,arguments)},_handleEditingNavigationMode:function(e){["downArrow","upArrow"].forEach(function(i){var n=e._supportedKeys()[i];e.registerKeyHandler(i,r=>{var a=e._input().attr("aria-expanded")==="true";if(a)return n&&n.call(e,r)})}),e.registerKeyHandler("leftArrow",re),e.registerKeyHandler("rightArrow",re);var t=e.NAME===cne&&e.option("useMaskBehavior");t&&e.registerKeyHandler("enter",re)},_getEditorInstance:function(e){var t=e.find(".dx-texteditor").eq(0);return be.getWidgetInstance(t)}}},controllers:{editing:{editCell:function(e,t){var i=this.getController("keyboardNavigation");if(i._processCanceledEditCellPosition(e,t))return!1;var n=this.callBase(e,t);return n&&i.setupFocusedView(),n},editRow:function(e){var t=this.getController("keyboardNavigation"),i=t.getVisibleColumnIndex(),n=this._columnsController.getVisibleColumns()[i];(n&&n.type||this.option("editing.mode")===lk)&&t._resetFocusedCell(),this.callBase(e)},addRow:function(e){var t=this.getController("keyboardNavigation");return t.setupFocusedView(),t.setCellFocusType(),this.callBase.apply(this,arguments)},getFocusedCellInRow:function(e){var t=this.getController("keyboardNavigation"),i=this.callBase(e);if(t.isKeyboardEnabled()&&t._focusedCellPosition.rowIndex===e){var n=t._getFocusedCell();An(n)&&!n.hasClass(dne)&&(i=n)}return i},_processCanceledEditingCell:function(){this.closeEditCell().done(()=>{var e=this.getController("keyboardNavigation");e._updateFocus()})},init:function(){this.callBase(),this._keyboardNavigationController=this.getController("keyboardNavigation")},closeEditCell:function(){var e=this._keyboardNavigationController;e._fastEditingStarted=!1;var t=this.callBase.apply(this,arguments);return e._updateFocus(),t},_delayedInputFocus:function(){this._keyboardNavigationController._isNeedScroll=!0,this.callBase.apply(this,arguments)},_isEditingStart:function(){var e=this.getController("keyboardNavigation"),t=this.callBase.apply(this,arguments);if(t&&!e._isNeedFocus){var i=e._getFocusedCell();e._focus(i,!0)}return t}},data:{_correctRowIndices:function(e){var t=this,i=t.getController("keyboardNavigation"),n=t.getController("editorFactory"),r=i._focusedCellPosition;if(t.callBase.apply(t,arguments),r&&r.rowIndex>=0){var a=e(r.rowIndex);a&&(r.rowIndex+=a,n.refocus())}},getMaxRowIndex:function(){var e=this.items().length-1,t=this.virtualItemsCount();if(t){var i=this.getRowIndexOffset();e+=i+t.end}return e}},adaptiveColumns:{_showHiddenCellsInView:function(e){var{viewName:t,$cells:i,isCommandColumn:n}=e;this.callBase.apply(this,arguments),t===Sw&&!n&&i.each((r,a)=>{var o=v(a);ww(o)&&o.attr("tabindex",0)})},_hideVisibleCellInView:function(e){var{viewName:t,$cell:i,isCommandColumn:n}=e;this.callBase.apply(this,arguments),t===Sw&&!n&&ww(i)&&i.removeAttr("tabindex")}}}}};Oe.registerModule("keyboardNavigation",yne);function Am(e,t,i,n){var r=0;if(e<t)for(;r<i.items.length;r++)Am(e+1,t,i.items[r],n);e===t&&n(i)}function fc(e,t){var i;if("map"in e)return e.map(t);var n=new Array(e.length);for(i in e)n[i]=t(e[i],i);return n}function xne(e){return e!==e||e===""||e===null||e===void 0}function bne(e){return e===Rg.count}function Iw(e){var t=bt(e.selector),i="skipEmptyValues"in e?e.skipEmptyValues:!0,n=e.aggregator;if(typeof n=="string"&&(n=Rg[n],!n))throw oi.Error("E4001",e.aggregator);return{selector:t,aggregator:n,skipEmptyValues:i}}const Sne=it.inherit({ctor:function(e){this._data=e.data,this._groupLevel=e.groupLevel||0,this._totalAggregates=fc(e.totalAggregates||[],Iw),this._groupAggregates=fc(e.groupAggregates||[],Iw),this._totals=[]},calculate:function(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups({items:this._data})},totalAggregates:function(){return this._totals},_aggregate:function(e,t,i){for(var n=t.items?t.items.length:0,r=0;r<e.length;r++){if(bne(e[r].aggregator)){i[r]=(i[r]||0)+n;continue}for(var a=0;a<n;a++)this._accumulate(r,e[r],i,t.items[a])}},_calculateTotals:function(e,t){if(e===0&&(this._totals=this._seed(this._totalAggregates)),e===this._groupLevel)this._aggregate(this._totalAggregates,t,this._totals);else for(var i=0;i<t.items.length;i++)this._calculateTotals(e+1,t.items[i]);e===0&&(this._totals=this._finalize(this._totalAggregates,this._totals))},_calculateGroups:function(e){var t=this._groupLevel,i=t+1,n=this._seed.bind(this,this._groupAggregates),r=this._aggregate.bind(this,this._groupAggregates),a=this._finalize.bind(this,this._groupAggregates);function o(s){s.aggregates=n(i-1),i===t?r(s,s.aggregates):Am(i,t,s,function(l){r(l,s.aggregates)}),s.aggregates=a(s.aggregates)}for(;--i>0;)Am(0,i,e,o)},_seed:function(e,t){return fc(e,function(i){var n=i.aggregator,r="seed"in n?Ie(n.seed)?n.seed(t):n.seed:NaN;return r})},_accumulate:function(e,t,i,n){var r=t.selector(n),a=t.aggregator,o=t.skipEmptyValues;o&&xne(r)||(i[e]!==i[e]?i[e]=r:i[e]=a.step(i[e],r))},_finalize:function(e,t){return fc(e,function(i,n){var r=i.aggregator.finalize;return r?r(t[n]):t[n]})}});var Ene="dx-datagrid-total-footer",wne="dx-datagrid-summary-item",Ine="dx-datagrid-text-content",Tne="dx-datagrid-group-footer",Ane="dx-datagrid-group-text-content",Dne="dx-datagrid-nowrap",One="dx-footer-row",Wv="groupFooter",dk="totalFooter",ck=function(e,t){var i=v(e),n=t.column,r=t.summaryItems,a=[];if(!n.command&&r){for(var o=0;o<r.length;o++){var s=r[o];a.push(v("<div>").css("textAlign",s.alignment||n.alignment).addClass(wne).addClass(Ine).addClass(s.cssClass).toggleClass(Ane,t.rowType==="group").text(Oe.getSummaryText(s,t.summaryTexts)))}i.append(a)}},hk=function(e,t){var i=e.option("summary.texts")||{};return{totalItem:t.row,summaryItems:t.row.summaryCells[t.columnIndex],summaryTexts:i}},zv=function(e){return e.summary||e.aggregates||[]},Dm=function(e){return e.option("summary.recalculateWhileEditing")},Rne=Yu.inherit({_getRows:function(){return this._dataController.footerItems()},_getCellOptions:function(e){return k(this.callBase(e),hk(this,e))},_renderCellContent:function(e,t){ck(e,t),this.callBase(e,t)},_renderCore:function(e){var t=!1,i=this._dataController.footerItems()[0];(!e||!e.columnIndices)&&(this.element().empty().addClass(Ene).toggleClass(Dne,!this.option("wordWrapEnabled")),t=!0),i&&i.summaryCells&&i.summaryCells.length&&(this._updateContent(this._renderTable({change:e}),e),t&&this._updateScrollLeftPosition())},_updateContent:function(e,t){if(t&&t.changeType==="update"&&t.columnIndices){var i=this.getTableElement().find(".dx-row"),n=e.find(".dx-row");this._updateCells(i,n,t.columnIndices[0])}else return this.callBase.apply(this,arguments)},_rowClick:function(e){var t=this._dataController.footerItems()[e.rowIndex]||{};this.executeAction("onRowClick",k({},e,t))},_columnOptionChanged:function(e){var t=e.optionNames;e.changeTypes.grouping||(t.width||t.visibleWidth)&&this.callBase(e)},_handleDataChanged:function(e){var t=e.changeType;e.changeType==="update"&&e.repaintChangesOnly?e.totalColumnIndices?e.totalColumnIndices.length&&this.render(null,{changeType:"update",columnIndices:[e.totalColumnIndices]}):this.render():(t==="refresh"||t==="append"||t==="prepend")&&this.render()},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e.rowType===dk&&t.addClass(One),t},getHeight:function(){return this.getElementHeight()},isVisible:function(){return!!this._dataController.footerItems().length}}),kne={init:function(){this.callBase.apply(this,arguments),this._totalAggregates=[],this._summaryGetter=re},summaryGetter:function(e){if(!arguments.length)return this._summaryGetter;Ie(e)&&(this._summaryGetter=e)},summary:function(e){if(!arguments.length)return this._summaryGetter();this._summaryGetter=function(){return e}},totalAggregates:function(){return this._totalAggregates},isLastLevelGroupItemsPagingLocal:function(){var e=this.summary(),t=e&&e.sortByGroups();return t&&t.length},sortLastLevelGroupItems:function(e,t,i){var n=qr.multiLevelGroup(Yi(e),t).toArray(),r=[];return i.forEach(function(a){(function o(s,l,u,d){d=d||[];for(var c=0;c<s.length;c++)d.push(s[c].key),l===1?u(d,s[c].items):o(s[c].items,l-1,u,d),d.pop()})(n,t.length,function(o,s){a.toString()===o.toString()&&(r=r.concat(s))})}),r}},Bne=function(){var e=function(i,n,r,a){var o;if(Dm(i)){var s=i.getController("editing");if(s){var l=s.getInsertedData();l.length&&(r=function d(c,h,f){return f?d(c,h.map(p=>({items:[p]}),f-1)):c.concat(h)}(r,l,a));var u=s.getRemovedData();u.length&&(r=function d(c,h,f){return f?c.map(p=>{var m={},g=d(p.items||[],h,f-1);return Object.defineProperty(m,"aggregates",{get:()=>p.aggregates,set:C=>{p.aggregates=C}}),k(m,p,{items:g})}):c.filter(p=>h.indexOf(p)<0)}(r,u,a))}}return n&&(o=new Sne({totalAggregates:n.totalAggregates,groupAggregates:n.groupAggregates,data:r,groupLevel:a}),o.calculate()),o?o.totalAggregates():[]},t=function(i,n,r){var a=r&&r.sortByGroups&&r.sortByGroups();return a&&a.length?function o(s,l,u){if(!s||!l.length)return s;var d=l[0],c=u[0],h;return d&&c&&c.length&&(h=Yi(s),V(c,function(f){f===0?h=h.sortBy(this.selector,this.desc):h=h.thenBy(this.selector,this.desc)}),h.enumerate().done(function(f){s=f})),l=l.slice(1),u=u.slice(1),l.length&&u.length&&V(s,function(){this.items=o(this.items,l,u)}),s}(i,n,a):i};return{_customizeRemoteOperations:function(i){var n=this.summary();n&&(i.remoteOperations.summary?(!i.isCustomLoading||i.storeLoadOptions.isLoadingAll)&&(i.storeLoadOptions.group&&(i.remoteOperations.grouping?i.storeLoadOptions.groupSummary=n.groupAggregates:n.groupAggregates.length&&(i.remoteOperations.paging=!1)),i.storeLoadOptions.totalSummary=n.totalAggregates):(n.totalAggregates.length||n.groupAggregates.length&&i.storeLoadOptions.group)&&(i.remoteOperations.paging=!1)),this.callBase.apply(this,arguments);var r=i.cachedData.extra;r&&r.summary&&!i.isCustomLoading&&(i.storeLoadOptions.totalSummary=void 0)},_handleDataLoadedCore:function(i){var n=jr(i.storeLoadOptions.group||i.loadOptions.group||[]),r=i.remoteOperations||{},a=this.summaryGetter()(r);if(!i.isCustomLoading||i.storeLoadOptions.isLoadingAll){if(r.summary)!r.paging&&n.length&&a&&(r.grouping||e(this,{groupAggregates:a.groupAggregates},i.data,n.length),i.data=t(i.data,n,a));else if(!r.paging&&a){var o,s,l=i.operationTypes||{},u=Object.keys(l).some(c=>l[c]);if(!u||!((o=i.cachedData)!==null&&o!==void 0&&(s=o.extra)!==null&&s!==void 0&&s.summary)||n.length&&a.groupAggregates.length){var d=e(this,a,i.data,n.length);i.extra=Ye(i.extra)?i.extra:{},i.extra.summary=d,i.cachedData&&(i.cachedData.extra=i.extra)}i.data=t(i.data,n,a)}}i.isCustomLoading||(this._totalAggregates=i.extra&&i.extra.summary||this._totalAggregates),this.callBase(i)}}}();Xu.extend(kne);Xu.extend(Bne);Oe.registerModule("summary",{defaultOptions:function(){return{summary:{groupItems:void 0,totalItems:void 0,calculateCustomSummary:void 0,skipEmptyValues:!0,recalculateWhileEditing:!1,texts:{sum:fe.format("dxDataGrid-summarySum"),sumOtherColumn:fe.format("dxDataGrid-summarySumOtherColumn"),min:fe.format("dxDataGrid-summaryMin"),minOtherColumn:fe.format("dxDataGrid-summaryMinOtherColumn"),max:fe.format("dxDataGrid-summaryMax"),maxOtherColumn:fe.format("dxDataGrid-summaryMaxOtherColumn"),avg:fe.format("dxDataGrid-summaryAvg"),avgOtherColumn:fe.format("dxDataGrid-summaryAvgOtherColumn"),count:fe.format("dxDataGrid-summaryCount")}},sortByGroupSummaryInfo:void 0}},views:{footerView:Rne},extenders:{controllers:{data:{_isDataColumn:function(e){return e&&(!E(e.groupIndex)||e.showWhenGrouped)},_isGroupFooterVisible:function(){for(var e=this.option("summary.groupItems")||[],t=0;t<e.length;t++){var i=e[t],n=this._columnsController.columnOption(i.showInColumn||i.column);if(i.showInGroupFooter&&this._isDataColumn(n))return!0}return!1},_processGroupItems:function(e,t,i){var n=i&&i.data,r=this.callBase.apply(this,arguments);return i&&(i.isGroupFooterVisible===void 0&&(i.isGroupFooterVisible=this._isGroupFooterVisible()),n&&n.items&&i.isGroupFooterVisible&&(i.collectContinuationItems||!n.isContinuationOnNextPage)&&r.push({rowType:Wv,key:i.path.slice(),data:n,groupIndex:i.path.length-1,values:[]})),r},_processGroupItem:function(e,t){var i=this;if(t.summaryGroupItems||(t.summaryGroupItems=i.option("summary.groupItems")||[]),e.rowType==="group"){var n=-1,r=-1;V(t.visibleColumns,function(a){var o=t.visibleColumns[a-1];e.groupIndex===this.groupIndex&&(n=this.index),a>0&&o.command==="expand"&&this.command!=="expand"&&(r=this.index)}),e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,zv(e.data),t.visibleColumns,function(a,o){return a.showInGroupFooter?-1:a.alignByColumn&&o&&!E(o.groupIndex)&&o.index!==r?o.index:n},!0)}return e.rowType===Wv&&(e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,zv(e.data),t.visibleColumns,function(a,o){return a.showInGroupFooter&&i._isDataColumn(o)?o.index:-1})),e},_calculateSummaryCells:function(e,t,i,n,r){var a=this,o=[],s={};return V(e,function(l,u){var d=a._columnsController.columnOption(u.column),c=u.showInColumn&&a._columnsController.columnOption(u.showInColumn)||d,h=n(u,c);if(h>=0){s[h]||(s[h]=[]);var f=t[l];if(f===f){var p;E(u.valueFormat)?p=u.valueFormat:u.summaryType!=="count"&&(p=Oe.getFormatByDataType(d&&d.dataType)),s[h].push(k({},u,{value:Ve(f)&&d&&d.deserializeValue?d.deserializeValue(f):f,valueFormat:p,columnCaption:d&&d.index!==h?d.caption:void 0}))}}}),Pn(s)||i.forEach((l,u)=>{var d=i[u-1],c=r&&((d==null?void 0:d.command)==="expand"||l.command==="expand")?d==null?void 0:d.index:l.index;o.push(s[c]||[])}),o},_getSummaryCells:function(e,t){var i=this,n=i._columnsController;return i._calculateSummaryCells(e,t,n.getVisibleColumns(),function(r,a){return i._isDataColumn(a)?a.index:-1})},_updateItemsCore:function(e){var t,i=this._dataSource,n=this._footerItems,r=n&&n[0]&&n[0].summaryCells,a=this.option("summary.totalItems");if(this._footerItems=[],i&&a&&a.length){var o=i.totalAggregates();t=this._getSummaryCells(a,o),e&&e.repaintChangesOnly&&r&&(e.totalColumnIndices=t.map(function(s,l){return JSON.stringify(s)!==JSON.stringify(r[l])?l:-1}).filter(s=>s>=0)),t.length&&this._footerItems.push({rowType:dk,summaryCells:t})}this.callBase(e)},_prepareUnsavedDataSelector:function(e){if(Dm(this)){var t=this.getController("editing");if(t)return function(i){return i=t.getUpdatedData(i),e(i)}}return e},_prepareAggregateSelector:function(e,t){return e=this._prepareUnsavedDataSelector(e),t==="avg"||t==="sum"?function(i){var n=e(i);return E(n)?Number(n):n}:e},_getAggregates:function(e,t){var i=this,n=i.getController("columns"),r=i.option("summary.calculateCustomSummary"),a=i.option("summary.skipEmptyValues");return ti(e||[],function(o){var s=n.columnOption(o.column),l=s&&s.calculateCellValue?s.calculateCellValue.bind(s):bt(s?s.dataField:o.column),u=o.summaryType||"count",d=o.column,c=E(o.skipEmptyValues)?o.skipEmptyValues:a;if(t)return{selector:o.column,summaryType:u};if(d=i._prepareAggregateSelector(l,u),u==="custom"){r||(Qe.log("E1026"),r=function(){});var h={component:i.component,name:o.name};r(h),h.summaryProcess="calculate",u={seed:function(f){return h.summaryProcess="start",h.totalValue=void 0,h.groupIndex=f,delete h.value,r(h),h.totalValue},step:function(f,p){return h.summaryProcess="calculate",h.totalValue=f,h.value=p,r(h),h.totalValue},finalize:function(f){return h.summaryProcess="finalize",h.totalValue=f,delete h.value,r(h),h.totalValue}}}return{selector:d,aggregator:u,skipEmptyValues:c}})},_addSortInfo:function(e,t,i,n){if(t){var r=t.groupIndex;n=n||t.sortOrder,E(r)&&(e[r]=e[r]||[],e[r].push({selector:i,desc:n==="desc"}))}},_findSummaryItem:function(e,t){var i=-1;return E(t)&&V(e||[],function(n){if(this.name===t||n===t||this.summaryType===t||this.column===t||(r=this,a=r.summaryType,o=r.column,(a&&o&&a+"_"+o)===t))return i=n,!1;var r,a,o}),i},_getSummarySortByGroups:function(e,t){var i=this,n=i._columnsController,r=n.getGroupColumns(),a=[];if(!(!t||!t.length))return V(e||[],function(){var o=this.sortOrder,s=this.groupColumn,l=i._findSummaryItem(t,this.summaryItem);if(!(l<0)){var u=function(d){return zv(d)[l]};E(s)?(s=n.columnOption(s),i._addSortInfo(a,s,u,o)):V(r,function(d,c){i._addSortInfo(a,c,u,o)})}}),a},_createDataSourceAdapterCore:function(e,t){var i=this,n=this.callBase(e,t);return n.summaryGetter(function(r){return i._getSummaryOptions(r||t)}),n},_getSummaryOptions:function(e){var t=this,i=t.option("summary.groupItems"),n=t.option("summary.totalItems"),r=t.option("sortByGroupSummaryInfo"),a=t._getAggregates(i,e&&e.grouping&&e.summary),o=t._getAggregates(n,e&&e.summary);if(a.length||o.length)return{groupAggregates:a,totalAggregates:o,sortByGroups:function(){return t._getSummarySortByGroups(r,i)}}},publicMethods:function(){var e=this.callBase();return e.push("getTotalSummaryValue"),e},getTotalSummaryValue:function(e){var t=this._findSummaryItem(this.option("summary.totalItems"),e),i=this._dataSource.totalAggregates();if(i.length&&t>-1)return i[t]},optionChanged:function(e){(e.name==="summary"||e.name==="sortByGroupSummaryInfo")&&(e.name="dataSource"),this.callBase(e)},init:function(){this._footerItems=[],this.callBase()},footerItems:function(){return this._footerItems}},editing:{_refreshSummary:function(){Dm(this)&&!this.isSaving()&&this._dataController.refresh({load:!0,changesOnly:!0})},_addChange:function(e){var t=this.callBase.apply(this,arguments);return e.type&&this._refreshSummary(),t},_removeChange:function(){var e=this.callBase.apply(this,arguments);return this._refreshSummary(),e},cancelEditData:function(){var e=this.callBase.apply(this,arguments);return this._refreshSummary(),e}}},views:{rowsView:{_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&t.addClass(e.rowType===Wv?Tne:""),t},_renderCells:function(e,t){this.callBase.apply(this,arguments),t.row.rowType==="group"&&t.row.summaryCells&&t.row.summaryCells.length&&this._renderGroupSummaryCells(e,t)},_hasAlignByColumnSummaryItems:function(e,t){return!E(t.columns[e].groupIndex)&&t.row.summaryCells[e].length},_getAlignByColumnCellCount:function(e,t){for(var i=0,n=1;n<e;n++){var r=t.row.summaryCells.length-n;i=this._hasAlignByColumnSummaryItems(r,t)?n:i}return i},_renderGroupSummaryCells:function(e,t){var i=e.children().last(),n=Number(i.attr("colSpan"))||1,r=this._getAlignByColumnCellCount(n,t);this._renderGroupSummaryCellsCore(i,t,n,r)},_renderGroupSummaryCellsCore:function(e,t,i,n){if(n>0){e.attr("colSpan",i-n);for(var r=0;r<n;r++){var a=t.columns.length-n+r;this._renderCell(e.parent(),k({column:t.columns[a],columnIndex:this._getSummaryCellIndex(a,t.columns)},t))}}},_getSummaryCellIndex:function(e){return e},_getCellTemplate:function(e){return!e.column.command&&!E(e.column.groupIndex)&&e.summaryItems&&e.summaryItems.length?ck:this.callBase(e)},_getCellOptions:function(e){var t=this.callBase(e);return e.row.summaryCells?k(t,hk(this,e)):t}}}}});var Tw="content",cu="content-fixed",Lne="dx-master-detail-cell",Aw="dx-first-cell",Pne="dx-last-cell",Dw="dx-state-hover",Ow="dx-col-fixed",Fne="dx-fixed-columns",Gv="dx-pointer-events-none",Lr="transparent",Mne="dx-group-row",_a=function(e){var t=-1;return V(e,function(i,n){if(n.command===Lr)return t=i,!1}),t},fk=function(e,t,i){var n=0;if(e&&t&&i)for(var r=0;r<e.length;r++)e[r].command===Lr?n+=e[r].colspan:(t[n]<i[r]&&(t[n]=i[r]),n++);return t},zC={init:function(){this.callBase(),this._isFixedTableRendering=!1,this._isFixedColumns=!1},_createCol:function(e){return this.callBase(e).toggleClass(Ow,!!(this._isFixedTableRendering&&(e.fixed||e.command&&e.command!==Lr)))},_correctColumnIndicesForFixedColumns:function(e,t){var i=_a(e),n=e[i].colspan,r=t&&t.columnIndices;r&&(t.columnIndices=r.map(function(a){if(a)return a.map(function(o){return o<i?o:o>=i+n?o-n+1:-1}).filter(function(o){return o>=0})}))},_partialUpdateFixedTable(e){var t=this._fixedTableElement,i=_a(e),n=e[i],r=this._columnsController.getColumnIndexOffset(),a=this._getRowElementsCore(t),o=t.children("colgroup");o.replaceWith(this._createColGroup(e));for(var s=0;s<a.length;s++)for(var l=a[s].childNodes,u=r+1,d=0;d<l.length;d++)l[d].setAttribute("aria-colindex",u),d===i?(l[d].setAttribute("colspan",n.colspan),u+=n.colspan):u++},_renderTable:function(e){var t,i=this.getFixedColumns();this._isFixedColumns=!!i.length;var n=this.callBase(e);if(this._isFixedColumns){var r=e==null?void 0:e.change;if(this._isFixedTableRendering=!0,r!=null&&r.virtualColumnsScrolling&&this.option("scrolling.legacyMode")!==!0)this._partialUpdateFixedTable(i);else{var a=r==null?void 0:r.columnIndices;this._correctColumnIndicesForFixedColumns(i,r),t=this._createTable(i),this._renderRows(t,k({},e,{columns:i})),this._updateContent(t,r),a&&(r.columnIndices=a)}this._isFixedTableRendering=!1}else this._fixedTableElement&&this._fixedTableElement.parent().remove(),this._fixedTableElement=null;return n},_renderRow:function(e,t){var i,n=t.row.cells;if(this.callBase.apply(this,arguments),this._isFixedTableRendering&&n&&n.length){i=0;var r=t.row.cells||[];n=n.slice(),t.row.cells=n;for(var a=0;a<r.length;a++){if(r[a].column&&r[a].column.command===Lr){i=(r[a].column.colspan||1)-1;continue}n[a+i]=r[a]}}},_createCell:function(e){var t=this,i=e.column,n=i&&i.command,r=e.rowType,a=t.callBase.apply(t,arguments),o,s,l;(t._isFixedTableRendering||r==="filter")&&(o=t.getFixedColumns(),l=_a(o),s=o[l-1]),t._isFixedTableRendering?n===Lr&&(a.addClass(Gv).toggleClass(Aw,l===0||s&&s.command==="expand").toggleClass(Pne,o.length&&l===o.length-1),r!=="freeSpace"&&be.setEmptyText(a)):r==="filter"&&a.toggleClass(Aw,e.columnIndex===l);var u=t.option("rowAlternationEnabled")&&e.isAltRow;return Lt.mozilla&&e.column.fixed&&e.rowType!=="group"&&!u&&a.addClass(Ow),a},_wrapTableInScrollContainer:function(){var e=this.callBase.apply(this,arguments);return this._isFixedTableRendering&&e.addClass(this.addWidgetPrefix(cu)),e},_renderCellContent:function(e,t){var i,n=t.column,r=this._isFixedTableRendering,a=t.rowType==="group"&&E(n.groupIndex);if(r&&a&&!n.command&&!n.groupCellTemplate&&e.css("pointerEvents","none"),!r&&this._isFixedColumns){if(i=n.fixed||n.command&&n.fixed!==!1,a&&(i=!1,t.row.summaryCells&&t.row.summaryCells.length)){var o=this._columnsController.getVisibleColumns(),s=this._getAlignByColumnCellCount?this._getAlignByColumnCellCount(n.colspan,{columns:o,row:t.row,isFixed:!0}):0;if(s>0){var l=_a(this._columnsController.getFixedColumns());i=o.length-s<l}}if(i)if(n.command&&n.type!=="buttons"||t.rowType==="group"){e.html("&nbsp;").addClass(n.cssClass);return}else e.addClass("dx-hidden-cell")}n.command!==Lr&&this.callBase(e,t)},_getCellElementsCore:function(e){var t=this.callBase.apply(this,arguments),i=t.parent().hasClass(Mne),n=this.name==="columnHeadersView"?e:void 0;if(this._fixedTableElement&&t){var r=this.getFixedColumns(n),a=this._getRowElements(this._fixedTableElement).eq(e).children("td");V(a,(o,s)=>{if(i)t[o]&&s.style.visibility!=="hidden"&&(t[o]=s);else{var l=r[o];if(l)if(l.command===Lr)a.eq(o).hasClass(Lne)&&(t[o]=s||t[o]);else{var u=this._columnsController.getVisibleIndexByColumn(l,n);t[u]=s||t[u]}}})}return t},getColumnWidths:function(){var e,t=this.callBase(),i=this.getFixedColumns();return this._fixedTableElement&&t.length&&(e=this.callBase(this._fixedTableElement)),fk(i,t,e)},getTableElement:function(){var e=this._isFixedTableRendering?this._fixedTableElement:this.callBase();return e},setTableElement:function(e){this._isFixedTableRendering?this._fixedTableElement=e.addClass(Gv):this.callBase(e)},getColumns:function(e,t){return t=t||this.getTableElement(),this._isFixedTableRendering||t&&t.closest("table").parent("."+this.addWidgetPrefix(cu)).length?this.getFixedColumns(e):this.callBase(e,t)},getRowIndex:function(e){var t=this._fixedTableElement;return t&&t.find(e).length?this._getRowElements(t).index(e):this.callBase(e)},getTableElements:function(){var e=this.callBase.apply(this,arguments);return this._fixedTableElement&&(e=v([e.get(0),this._fixedTableElement.get(0)])),e},getFixedColumns:function(e){return this._columnsController.getFixedColumns(e)},getFixedColumnsOffset:function(){var e={left:0,right:0},t;if(this._fixedTableElement){t=this.getTransparentColumnElement();var i=t.position();e={left:i.left,right:ot(this.element(),!0)-(ot(t,!0)+i.left)}}return e},getTransparentColumnElement:function(){return this._fixedTableElement&&this._fixedTableElement.find("."+Gv).first()},getFixedTableElement:function(){return this._fixedTableElement},isFixedColumns:function(){return this._isFixedColumns},_resizeCore:function(){this.callBase(),this.synchronizeRows()},setColumnWidths:function(e){var t,i=this._columnsController.getVisibleColumns(),n=e.widths,r=n&&n.length&&E(i[0].visibleWidth),a=e.optionNames,o=a&&a.width,s=!1;if(this.callBase.apply(this,arguments),this._fixedTableElement){var l=n&&n.some(function(u){return u==="auto"});s=l&&(!r||!this.isScrollbarVisible(!0)),s&&(t=i),this.callBase(k({},e,{$tableElement:this._fixedTableElement,columns:t,fixed:!0}))}(r||o&&this.option("wordWrapEnabled"))&&this.synchronizeRows()},_createColGroup:function(e){if(this._isFixedTableRendering&&!this.option("columnAutoWidth")){var t=this._columnsController.getVisibleColumns(),i=t.filter(function(n){return!n.width}).length;i&&(e=t)}return this.callBase(e)},_getClientHeight:function(e){var t=e.getBoundingClientRect&&Ut(e);return t&&t.height?t.height:e.clientHeight},synchronizeRows:function(){var e=[],t=[],i,n,r,a;if(this._isFixedColumns&&this._tableElement&&this._fixedTableElement){var o=this._getClientHeight(this._tableElement.get(0)),s=this._getClientHeight(this._fixedTableElement.get(0));if(n=this._getRowElements(this._tableElement),r=this._getRowElements(this._fixedTableElement),a=this._findContentElement(),o!==s){for(a&&a.css("height",o),n.css("height",""),r.css("height",""),i=0;i<n.length;i++)e.push(this._getClientHeight(n.get(i))),t.push(this._getClientHeight(r.get(i)));for(i=0;i<n.length;i++){var l=e[i],u=t[i];l>u?r.eq(i).css("height",l):l<u&&n.eq(i).css("height",u)}a&&a.css("height","")}}},setScrollerSpacing:function(e){var t=this.option("rtlEnabled");this.callBase(e),this.element().children("."+this.addWidgetPrefix(cu)).css({paddingLeft:t?e:"",paddingRight:t?"":e})}},Vne=k({},zC,{_getRowVisibleColumns:function(e){return this._isFixedTableRendering?this.getFixedColumns(e):this.callBase(e)},getContextMenuItems:function(e){var t=e.column,i=this.option("columnFixing"),n=this.callBase(e);if(e.row&&e.row.rowType==="header"&&i.enabled===!0&&t&&t.allowFixing){var r=a=>{switch(a.itemData.value){case"none":this._columnsController.columnOption(t.index,"fixed",!1);break;case"left":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"left"});break;case"right":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"right"})}};n=n||[],n.push({text:i.texts.fix,beginGroup:!0,items:[{text:i.texts.leftPosition,value:"left",disabled:t.fixed&&(!t.fixedPosition||t.fixedPosition==="left"),onItemClick:r},{text:i.texts.rightPosition,value:"right",disabled:t.fixed&&t.fixedPosition==="right",onItemClick:r}]},{text:i.texts.unfix,value:"none",disabled:!t.fixed,onItemClick:r})}return n},getFixedColumnElements:function(e){if(E(e))return this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(e).children();var t=this.getColumnElements(),i=this.getTransparentColumnElement();if(t&&i&&i.length){var n=_a(this.getFixedColumns());t.splice(n,i.get(0).colSpan,i.get(0))}return t},getColumnWidths:function(){var e,t=this.callBase(),i=this.getFixedColumnElements(),n=this.getFixedColumns();return this._fixedTableElement&&(i&&i.length?e=this._getWidths(i):e=this.callBase(this._fixedTableElement)),fk(n,t,e)}}),Nne=k({},zC,{_detachHoverEvents:function(){this._fixedTableElement&&R.off(this._fixedTableElement,"mouseover mouseout",".dx-data-row"),this._tableElement&&R.off(this._tableElement,"mouseover mouseout",".dx-data-row")},_attachHoverEvents:function(){var e=this,t=function(i){R.on(i,"mouseover mouseout",".dx-data-row",e.createAction(function(n){var r=n.event,a=e.getRowIndex(v(r.target).closest(".dx-row")),o=r.type==="mouseover";a>=0&&(e._tableElement&&e._getRowElements(e._tableElement).eq(a).toggleClass(Dw,o),e._fixedTableElement&&e._getRowElements(e._fixedTableElement).eq(a).toggleClass(Dw,o))}))};e._fixedTableElement&&e._tableElement&&(t(e._fixedTableElement),t(e._tableElement))},_findContentElement:function(){var e=this,t,i,n=e.addWidgetPrefix(Tw),r=e.element(),a=Lt.mozilla?60:0;if(r&&e._isFixedTableRendering){t=r.children("."+n);var o=e.getScrollable();return!t.length&&o&&(t=v("<div>").addClass(n),R.on(t,"scroll",function(s){clearTimeout(e._fixedScrollTimeout),e._fixedScrollTimeout=setTimeout(function(){i=v(s.target).scrollTop(),o.scrollTo({y:i})},a)}),R.on(t,$u,function(s){var l=v(s.target).closest(".dx-scrollable"),u=!1;if(o&&o.$element().is(l))u=!0;else{var d=l.length&&_n.getInstance(l.get(0)),c=d&&d.scrollHeight()-d.clientHeight()>0;u=d&&!c}if(u&&(i=o.scrollTop(),o.scrollTo({y:i-s.delta}),o.scrollTop()>0&&o.scrollTop()+o.clientHeight()<o.scrollHeight()+e.getScrollbarWidth()))return!1}),t.appendTo(r)),t}return e.callBase()},_updateScrollable:function(){this.callBase();var e=this.getScrollable();if(!(e!=null&&e._disposed)){var t=e&&e.scrollOffset().top;this._updateFixedTablePosition(t)}},_renderContent:function(e,t){return this._isFixedTableRendering?e.empty().addClass(this.addWidgetPrefix(Tw)+" "+this.addWidgetPrefix(cu)).append(t):this.callBase(e,t)},_getGroupCellOptions:function(e){return this._isFixedTableRendering?this.callBase(k({},e,{columns:this._columnsController.getVisibleColumns()})):this.callBase(e)},_renderGroupedCells:function(e,t){return this.callBase(e,k({},t,{columns:this._columnsController.getVisibleColumns()}))},_renderGroupSummaryCells:function(e,t){this._isFixedTableRendering?this.callBase(e,k({},t,{columns:this._columnsController.getVisibleColumns()})):this.callBase(e,t)},_hasAlignByColumnSummaryItems:function(e,t){var i=this.callBase.apply(this,arguments),n=t.columns[e];return t.isFixed?n.fixed&&(i||n.fixedPosition==="right"):i&&(!this._isFixedColumns||!n.fixed)},_renderGroupSummaryCellsCore:function(e,t,i,n){var r;if(this._isFixedTableRendering){t.isFixed=!0,r=this._getAlignByColumnCellCount(i,t),t.isFixed=!1;var a=t.columns.length-r;t=k({},t,{columns:this.getFixedColumns()});var o=_a(t.columns);a<o?(r-=t.columns[o].colspan-1||0,i-=t.columns[o].colspan-1||0):n>0&&e.css("visibility","hidden"),n=r}this.callBase(e,t,i,n)},_getSummaryCellIndex:function(e,t){if(this._isFixedTableRendering){var i=_a(t);return e>i&&(e+=t[i].colspan-1),e}return this.callBase.apply(this,arguments)},_renderCore:function(e){this._detachHoverEvents(),this.callBase(e);var t=this._isFixedColumns;this.element().toggleClass(Fne,t),this.option("hoverStateEnabled")&&t&&this._attachHoverEvents()},setRowsOpacity:function(e,t){this.callBase(e,t);var i=this._getRowElements(this._fixedTableElement);this._setRowsOpacityCore(i,this.getFixedColumns(),e,t)},optionChanged:function(e){this.callBase(e),e.name==="hoverStateEnabled"&&this._isFixedColumns&&(e.value?this._attachHoverEvents():this._detachHoverEvents())},getCellIndex:function(e){var t=this._fixedTableElement,i=0;if(t&&e.is("td")&&e.closest(t).length){var n=this.getFixedColumns();return V(n,function(r,a){if(r===e[0].cellIndex)return!1;if(a.colspan){i+=a.colspan;return}i++}),i}return this.callBase.apply(this,arguments)},_updateFixedTablePosition:function(e,t){if(this._fixedTableElement&&this._tableElement){var i,n=this.getController("editorFactory");this._fixedTableElement.parent().scrollTop(e),t&&n&&(i=n.focus(),i&&n.focus(i))}},setScrollerSpacing:function(e,t){var i={marginBottom:0},n=this.element().children("."+this.addWidgetPrefix(cu));if(n.length&&this._fixedTableElement){n.css(i),this._fixedTableElement.css(i),i[this.option("rtlEnabled")?"marginLeft":"marginRight"]=e,i.marginBottom=t;var r=this._scrollable&&this._scrollable.option("useNative");(r?n:this._fixedTableElement).css(i)}},_getElasticScrollTop:function(e){var t=0;if(e.scrollOffset.top<0)t=-e.scrollOffset.top;else if(e.reachedBottom){var i=v(this._findContentElement()),n=v(e.component.container()),r=Math.max(i.get(0).clientHeight-n.get(0).clientHeight,0);t=r-e.scrollOffset.top}return Math.floor(t)},_applyElasticScrolling:function(e){if(this._fixedTableElement){var t=this._getElasticScrollTop(e);Math.ceil(t)!==0?ri(this._fixedTableElement,{top:t}):this._fixedTableElement.css("transform","")}},_handleScroll:function(e){this._updateFixedTablePosition(e.scrollOffset.top,!0),this._applyElasticScrolling(e),this.callBase(e)},_updateContentPosition:function(e){this.callBase.apply(this,arguments),e||this._updateFixedTablePosition(this._scrollTop)},_afterRowPrepared:function(e){this._isFixedTableRendering||this.callBase(e)},_scrollToElement:function(e){this.callBase(e,this.getFixedColumnsOffset())},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._fixedScrollTimeout)}}),$ne=zC,Hne={defaultOptions:function(){return{columnFixing:{enabled:!1,texts:{fix:fe.format("dxDataGrid-columnFixingFix"),unfix:fe.format("dxDataGrid-columnFixingUnfix"),leftPosition:fe.format("dxDataGrid-columnFixingLeftPosition"),rightPosition:fe.format("dxDataGrid-columnFixingRightPosition")}}}},extenders:{views:{columnHeadersView:Vne,rowsView:Nne,footerView:$ne},controllers:function(){var e=function(t,i,n){var r=_a(i),a=t.length-i.length;return V(n,function(o,s){s.index>r&&(s.columnIndex+=a,s.index+=a)}),n};return{draggingHeader:{_generatePointsByColumns:function(t){var i=t.columns,n=t.targetDraggingPanel;if(n&&n.getName()==="headers"&&n.isFixedColumns()&&t.sourceColumn.fixed){t.rowIndex||(t.columnElements=n.getFixedColumnElements(0)),t.columns=n.getFixedColumns(t.rowIndex);var r=this.callBase(t);return e(i,t.columns,r),r}return this.callBase(t)},_pointCreated:function(t,i,n,r){var a=this.callBase.apply(this,arguments),o=i[t.columnIndex],s=this._columnHeadersView.getTransparentColumnElement();if(!a&&n==="headers"&&s&&s.length){var l=Ut(s.get(0));return r&&r.fixed?r.fixedPosition==="right"?t.x<l.right:t.x>l.left:o&&o.fixed&&o.fixedPosition!=="right"?!0:t.x<l.left||t.x>l.right}return a}},columnsResizer:{_generatePointsByColumns:function(){var t=this,i=t._columnsController,n=i&&t._columnsController.getVisibleColumns(),r=i&&t._columnsController.getFixedColumns(),a=t._columnHeadersView.getFixedColumnElements(),o=[];t.callBase(),a&&a.length>0&&(o=be.getPointsByColumns(a,function(s){return t._pointCreated(s,a.length,r)}),t._pointsByFixedColumns=e(n,r,o))},_pointCreated:function(t,i,n){var r=this.option("columnResizingMode")==="widget";if(t.index>0&&t.index<i){var a=n[t.columnIndex-1]||{},o=n[t.columnIndex]||{};if(a.fixed||o.fixed)return t.columnIndex-=1,!((a.allowResizing||a.command===Lr)&&(r||o.allowResizing||o.command===Lr))}return this.callBase.apply(this,arguments)},_getTargetPoint:function(t,i,n){var r=this._columnHeadersView.getTransparentColumnElement();if(r&&r.length){var a=Ut(r.get(0));if(i<=a.left||i>=a.right)return this.callBase(this._pointsByFixedColumns,i,n)}return this.callBase(t,i,n)}}}}()}};Oe.registerModule("columnFixing",Hne);var pk="columnHeadersView",vk="rowsView",Wne="footerView",Uv=[pk,vk,Wne],zne="dxDataGridAdaptivity",Pr="adaptiveHidden",ps="detailAdaptive",Om="dx-field-item-content",Gne="dx-item-modified",hu="hidden-column",Une="adaptive-more",_k="dx-command-adaptive",Kv="dx-command-adaptive-hidden",Kne="dx-adaptive-detail-row",Rw="dx-adaptive-item-text",jne="dx-master-detail-cell",qne="dx-last-data-cell",pc="adaptive",Yne="batch",Rm="row",Xne="form",Zne="popup",Jne="revert-tooltip",kw="dx-group-cell",Qne="dx-group-row",Bw="dxDataGrid-ariaAdaptiveExpand",ere="dxDataGrid-ariaAdaptiveCollapse",tre="scrolling.legacyMode";function vc(e,t){return e._columnsController.getColumnId(t)}function Lw(e){return e.find("td:not(.dx-datagrid-hidden-column):not([class*='dx-command-'])")}function ire(e,t){var i,n=v(e),r=t.component.getController("adaptiveColumns");t.rowType==="data"?(i=v("<span>").addClass(r.addWidgetPrefix(Une)),R.on(i,ye(vt,zne),r.createAction(function(){r.toggleExpandAdaptiveDetailRow(t.key)})),i.appendTo(n)):be.setEmptyText(n)}var nre=Dt.ViewController.inherit({_isRowEditMode:function(){var e=this._getEditMode();return e===Rm},_isItemModified:function(e,t){var i=this._columnsController.getVisibleIndex(e.column.index),n=this._dataController.getRowIndexByKey(t.key),r=this._dataController.items()[n+1];return r&&r.modifiedValues&&E(r.modifiedValues[i])},_renderFormViewTemplate:function(e,t,i){var n=e.column,r=this.createAction(function(){R.trigger(i,vt)}),a=n.calculateCellValue(t.data),o=be.getDisplayValue(n,a,t.data,t.rowType),s=be.formatValue(o,n),l=this._editingController.isCellOrBatchEditMode(),u=this._rowsView;if(n.allowEditing&&this.getController("keyboardNavigation").isKeyboardEnabled()&&(i.attr("tabIndex",this.option("tabIndex")),l&&(R.off(i,"focus",r),R.on(i,"focus",r))),n.cellTemplate){var d=k({},t,{value:a,displayValue:o,text:s,column:n}),c=!!i.closest(je().document).length;u.renderTemplate(i,n.cellTemplate,d,c).done(()=>{u._cellPrepared(i,t)})}else{var h=i.get(0);n.encodeHtml?h.textContent=s:h.innerHTML=s,i.addClass(Rw),(!E(s)||s==="")&&i.html("&nbsp;"),this._isRowEditMode()||this._isItemModified(e,t)&&i.addClass(Gne),u._cellPrepared(i,t)}},_getTemplate:function(e,t){var i=this,n=e.column,r=this.getController("editing");return function(a,o){var s=v(o),l=i._columnsController.getVisibleIndex(n.index),u=k({},t),d=function(){var c=i._isItemEdited(e);u.value=t.row.values[l],c||n.showEditorAlways?r.renderFormEditTemplate(u,e,a,s,!c):(u.column=n,u.columnIndex=l,i._renderFormViewTemplate(e,u,s))};d(),u.watch&&u.watch(function(){return{isItemEdited:i._isItemEdited(e),value:t.row.values[l]}},function(){s.contents().remove(),s.removeClass(Rw),d()})}},_isVisibleColumnsValid:function(e){return!(e<2||e.length-function(){for(var t=0,i=0;i<e.length;i++){var n=e[i];n.command&&t++}return t}()<=1)},_calculatePercentWidths:function(e,t){var i=this,n=0;return t.forEach(function(r,a){e[a]!==Pr&&(n+=i._getItemPercentWidth(r))}),n},_isPercentWidth:function(e){return Ve(e)&&e.slice(-1)==="%"},_isColumnHidden:function(e){return this._hiddenColumns.filter(function(t){return t.index===e.index}).length>0},_getAverageColumnsWidth:function(e,t,i){var n=this,r=0,a=0;return t.forEach(function(o){if(!n._isColumnHidden(o)){var s=o.width;E(s)&&!isNaN(parseFloat(s))?r+=n._isPercentWidth(s)?n._calculatePercentWidth({visibleIndex:o.visibleIndex,columnsCount:t.length,columnsCanFit:i,bestFitWidth:o.bestFitWidth,columnWidth:s,containerWidth:e}):parseFloat(s):a++}}),(e-r)/a},_calculateColumnWidth:function(e,t,i,n){var r=vc(this,e),a=this._columnsController.columnOption(r,"width"),o=this._columnsController.columnOption(r,"bestFitWidth"),s=i.length,l;if(a&&a!=="auto")if(this._isPercentWidth(a))l=this._calculatePercentWidth({visibleIndex:e.visibleIndex,columnsCount:s,columnsCanFit:n,bestFitWidth:o,columnWidth:a,containerWidth:t});else return parseFloat(a);else{var u=this.option("columnAutoWidth");l=u||e.command?o:this._getAverageColumnsWidth(t,i,n)}return l},_calculatePercentWidth:function(e){var t=e.visibleIndex<e.columnsCount-1&&e.columnsCanFit,i=e.containerWidth*parseFloat(e.columnWidth)/100,n=e.columnsCanFit&&i<e.bestFitWidth?e.bestFitWidth:i;return t?e.containerWidth*parseFloat(e.columnWidth)/100:n},_getNotTruncatedColumnWidth:function(e,t,i,n){var r=vc(this,e),a=this._columnsController.columnOption(r,"width"),o=this._columnsController.columnOption(r,"bestFitWidth");if(a&&a!=="auto"&&!this._isPercentWidth(a))return parseFloat(a);var s=this._calculateColumnWidth(e,t,i,n);return s<o?null:s},_getItemPercentWidth:function(e){var t=0;return e.width&&this._isPercentWidth(e.width)&&(t=parseFloat(e.width)),t},_getCommandColumnsWidth:function(){var e=this,t=e._columnsController.getVisibleColumns(),i=0;return V(t,function(n,r){(r.index<0||r.command)&&(i+=e._columnsController.columnOption(vc(e,r),"bestFitWidth")||0)}),i},_isItemEdited:function(e){if(this.isFormOrPopupEditMode())return!1;if(this._isRowEditMode()){var t=this.option("editing.editRowKey");if(Bt(t,this._dataController.adaptiveExpandedKey()))return!0}else{var i=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=this._columnsController.getVisibleIndex(e.column.index);return this._editingController.isEditCell(i,n)}},_getFormItemsByHiddenColumns:function(e){var t=[];return V(e,function(i,n){t.push({column:n,name:n.name,dataField:n.dataField,visibleIndex:n.visibleIndex})}),t},_getAdaptiveColumnVisibleIndex:function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.command===pc)return t}},_hideAdaptiveColumn:function(e,t){var i=this._getAdaptiveColumnVisibleIndex(t);E(i)&&(e[i]=Pr,this._hideVisibleColumn({isCommandColumn:!0,visibleIndex:i}))},_showHiddenCellsInView:function(e){var{$cells:t,isCommandColumn:i}=e,n=i?Kv:this.addWidgetPrefix(hu);t.removeClass(n)},_showHiddenColumns:function(){for(var e=0;e<Uv.length;e++){var t=this.getView(Uv[e]);if(t&&t.isVisible()&&t.element()){var i=t.name,n=t.element().find("."+Kv);this._showHiddenCellsInView({viewName:i,$cells:n,isCommandColumn:!0});var r=t.element().find("."+this.addWidgetPrefix(hu));this._showHiddenCellsInView({viewName:i,$cells:r})}}},_isCellValid:function(e){return e&&e.length&&!e.hasClass(jne)&&!e.hasClass(kw)},_hideVisibleColumn:function(e){var{isCommandColumn:t,visibleIndex:i}=e,n=this;Uv.forEach(function(r){var a=n.getView(r);a&&n._hideVisibleColumnInView({view:a,isCommandColumn:t,visibleIndex:i})})},_hideVisibleColumnInView:function(e){var{view:t,isCommandColumn:i,visibleIndex:n}=e,r=t.name,a,o=this._columnsController.getVisibleColumns()[n],s=this._editingController&&this._editingController.getEditFormRowIndex();if(t&&t.isVisible()&&o)for(var l=t.getRowsCount(),u=t._getRowElements(),d=0;d<l;d++){var c=d===s&&r===vk&&this.option("editing.mode")!=="popup";if(!c){var h=r===pk?this._columnsController.getVisibleIndex(o.index,d):n;if(h>=0){var f=u.eq(d);a=this._findCellElementInRow(f,h),this._isCellValid(a)&&this._hideVisibleCellInView({viewName:r,isCommandColumn:i,$cell:a})}}}},_findCellElementInRow(e,t){var i=e.children(),n=t,r=!1;if(e.hasClass(Qne)){var a=e.find(".".concat(kw)),o=a.attr("colspan");if(a.length&&E(o)){var s=parseInt(o),l=a.index()+s-1;t>l?n=t-s+1:r=!0}}var u=r?void 0:i.eq(n);return u},_hideVisibleCellInView:function(e){var{$cell:t,isCommandColumn:i}=e,n=i?Kv:this.addWidgetPrefix(hu);t.addClass(n)},_getEditMode:function(){return this._editingController.getEditMode()},isFormOrPopupEditMode:function(){var e=this._getEditMode();return e===Xne||e===Zne},hideRedundantColumns:function(e,t,i){if(this._hiddenColumns=[],this._isVisibleColumnsValid(t)&&i.length){var n=0,r=this.component.$element(),a=He(r)-this._getCommandColumnsWidth(),o=(function(){return t.filter(U=>!U.command&&this._hiddenColumns.filter(H=>H.index===U.index).length===0)}).bind(this),s=o(),l=s.length,u,d,c;do{c=!1,n=0;var h=this._calculatePercentWidths(e,t),f=h<100&&h!==0;for(u=0;u<t.length;u++){var p=t[u],m=this._getNotTruncatedColumnWidth(p,a,s,f),g=vc(this,p),C=this._columnsController.columnOption(g,"width"),b=this._columnsController.columnOption(g,"minWidth"),A=this._columnsController.columnOption(g,"bestFitWidth");if(e[u]===Pr){d=!0;continue}if(!m&&!p.command&&!p.fixed){c=!0;break}(!C||C==="auto")&&(m=Math.max(A||0,b||0)),(p.command!==pc||d)&&(n+=m)}if(c=c||n>He(r),c){var B=i.pop(),D=this._columnsController.getVisibleIndex(B.index);a+=this._calculateColumnWidth(B,a,s,f),this._hideVisibleColumn({visibleIndex:D}),e[D]=Pr,this._hiddenColumns.push(B),s=o()}}while(c&&s.length>1&&i.length);l===s.length&&this._hideAdaptiveColumn(e,t)}else this._hideAdaptiveColumn(e,t)},getItemContentByColumnIndex:function(e){for(var t,i=0;i<this._$itemContents.length;i++){t=this._$itemContents.eq(i);var n=t.data("dx-form-item");if(n&&n.column&&this._columnsController.getVisibleIndex(n.column.index)===e)return t}},toggleExpandAdaptiveDetailRow:function(e,t){this.isFormOrPopupEditMode()&&this._editingController.isEditing()||this.getController("data").toggleExpandAdaptiveDetailRow(e,t)},createFormByHiddenColumns:function(e,t){var i=this,n=v(e),r={items:i._getFormItemsByHiddenColumns(i._hiddenColumns),formID:"dx-"+new si},a=ei()?{colCount:2}:{};this.executeAction("onAdaptiveDetailRowPreparing",{formOptions:r}),i._$itemContents=null,i._form=i._createComponent(v("<div>").appendTo(n),LC,k(a,r,{customizeItem:function(o){var s=o.column||i._columnsController.columnOption(o.name||o.dataField);s&&(o.label=o.label||{},o.label.text=o.label.text||s.caption,o.column=s,o.template=i._getTemplate(o,t,i.updateForm.bind(i))),r.customizeItem&&r.customizeItem.call(this,o)},onContentReady:function(o){r.onContentReady&&r.onContentReady.call(this,o),i._$itemContents=n.find("."+Om)}}))},hasAdaptiveDetailRowExpanded:function(){return E(this._dataController.adaptiveExpandedKey())},updateForm:function(e){this.hasAdaptiveDetailRowExpanded()&&this._form&&E(this._form._contentReadyAction)&&(e&&e.length?this._form.option("items",this._getFormItemsByHiddenColumns(e)):this._form.repaint())},updateHidingQueue:function(e){var t=e.filter(function(a){return a.visible&&!a.type&&!a.fixed&&!(E(a.groupIndex)&&a.groupIndex>=0)}),i,n;if(this._hidingColumnsQueue=[],this.option("allowColumnResizing")&&this.option("columnResizingMode")==="widget")return this._hidingColumnsQueue;for(n=0;n<t.length;n++)E(t[n].hidingPriority)&&t[n].hidingPriority>=0&&(i=!0,this._hidingColumnsQueue[t[n].hidingPriority]=t[n]);if(i)this._hidingColumnsQueue.reverse();else if(this.option("columnHidingEnabled"))for(n=0;n<t.length;n++){var r=this._columnsController.getVisibleIndex(t[n].index);this._hidingColumnsQueue[r]=t[n]}return this._hidingColumnsQueue=this._hidingColumnsQueue.filter(Object),this._hidingColumnsQueue},getHiddenColumns:function(){return this._hiddenColumns},hasHiddenColumns:function(){return this._hiddenColumns.length>0},getHidingColumnsQueue:function(){return this._hidingColumnsQueue},init:function(){var e=this;e._columnsController=e.getController("columns"),e._dataController=e.getController("data"),e._rowsView=e.getView("rowsView"),e._columnsController.addCommandColumn({type:pc,command:pc,visible:!0,adaptiveHidden:!0,cssClass:_k,alignment:"center",width:"auto",cellTemplate:ire,fixedPosition:"right"}),e._columnsController.columnsChanged.add(function(){var t=!!e.updateHidingQueue(e._columnsController.getColumns()).length;e._columnsController.columnOption("command:adaptive","adaptiveHidden",!t,!0)}),e._editingController=e.getController("editing"),e._hidingColumnsQueue=[],e._hiddenColumns=[],e.createAction("onAdaptiveDetailRowPreparing"),e.callBase()},optionChanged:function(e){e.name==="columnHidingEnabled"&&this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e.value),this.callBase(e)},publicMethods:function(){return["isAdaptiveDetailRowExpanded","expandAdaptiveDetailRow","collapseAdaptiveDetailRow"]},isAdaptiveDetailRowExpanded:function(e){return this._dataController.adaptiveExpandedKey()&&Bt(this._dataController.adaptiveExpandedKey(),e)},expandAdaptiveDetailRow:function(e){this.hasAdaptiveDetailRowExpanded()||this.toggleExpandAdaptiveDetailRow(e)},collapseAdaptiveDetailRow:function(){this.hasAdaptiveDetailRowExpanded()&&this.toggleExpandAdaptiveDetailRow()},updateCommandAdaptiveAriaLabel:function(e,t){var i=this._dataController.getRowIndexByKey(e);if(i!==-1){var n=v(this.component.getRowElement(i));this.setCommandAdaptiveAriaLabel(n,t)}},setCommandAdaptiveAriaLabel:function(e,t){var i=e.find(".dx-command-adaptive");i.attr("aria-label",fe.format(t))}}),rre={defaultOptions:function(){return{columnHidingEnabled:!1,onAdaptiveDetailRowPreparing:null}},controllers:{adaptiveColumns:nre},extenders:{views:{rowsView:{_getCellTemplate:function(e){var t=this,i=e.column;return e.rowType===ps&&i.command==="detail"?function(n,r){t._adaptiveColumnsController.createFormByHiddenColumns(v(n),r)}:t.callBase(e)},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&e.rowType===ps&&e.key===this._dataController.adaptiveExpandedKey()&&t.addClass(Kne),t},_renderCells:function(e,t){this.callBase(e,t);var i=this._adaptiveColumnsController,n=i.getHidingColumnsQueue().length,r=i.getHiddenColumns().length;n&&!r&&Lw(e).last().addClass(qne),t.row.rowType==="data"&&i.setCommandAdaptiveAriaLabel(e,Bw)},_getColumnIndexByElementCore:function(e){var t=e.closest("."+Om);if(t.length&&t.closest(this.component.$element()).length){var i=t.length?t.first().data("dx-form-item"):null;return i&&i.column&&this._columnsController.getVisibleIndex(i.column.index)}else return this.callBase(e)},_cellPrepared:function(e,t){this.callBase.apply(this,arguments),t.row.rowType!==ps&&t.column.visibleWidth===Pr&&e.addClass(this.addWidgetPrefix(hu))},_getCellElement:function(e,t){var i=this._dataController.items()[e];return i&&i.rowType===ps?this._adaptiveColumnsController.getItemContentByColumnIndex(t):this.callBase.apply(this,arguments)},getContextMenuItems:function(e){if(e.row&&e.row.rowType==="detailAdaptive"){var t=this.component.getView("columnHeadersView"),i=v(e.targetElement).closest(".dx-field-item-label").next().data("dx-form-item");return e.column=i?i.column:e.column,t.getContextMenuItems&&t.getContextMenuItems(e)}return this.callBase&&this.callBase(e)},isClickableElement:function(e){var t=this.callBase?this.callBase(e):!1;return t||!!e.closest("."+_k).length},init:function(){this.callBase(),this._adaptiveColumnsController=this.getController("adaptiveColumns")}}},controllers:{export:{_updateColumnWidth:function(e,t){this.callBase(e,e.visibleWidth===Pr?e.bestFitWidth:t)}},columnsResizer:{_pointCreated:function(e,t,i){var n=this.callBase(e,t,i),r=i[e.columnIndex]||{},a=this._getNextColumnIndex(e.columnIndex),o=i[a]||{},s=a!==e.columnIndex+1&&o.command,l=r.visibleWidth===Pr||s;return n||l},_getNextColumnIndex:function(e){for(var t=this._columnsController.getVisibleColumns(),i=this.callBase(e);t[i]&&t[i].visibleWidth===Pr;)i++;return i}},draggingHeader:{_pointCreated:function(e,t,i,n){var r=this.callBase(e,t,i,n),a=t[e.columnIndex-1]||{},o=a.visibleWidth===Pr;return r||o}},editing:{_isRowEditMode:function(){return this.getEditMode()===Rm},_getFormEditItemTemplate:function(e,t){return this.getEditMode()!==Rm&&e.rowType==="detailAdaptive"?(e.columnIndex=this._columnsController.getVisibleIndex(t.index),this.getColumnTemplate(e)):this.callBase(e,t)},_closeEditItem:function(e){var t=e.closest("."+Om),i=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=t.length?t.first().data("dx-form-item"):null,r=n&&n.column&&this._columnsController.getVisibleIndex(n.column.index);this.isEditCell(i,r)||this.callBase(e)},_beforeUpdateItems:function(e,t){if(!this._adaptiveController.isFormOrPopupEditMode()&&this._adaptiveController.hasHiddenColumns()){var i=this._dataController.items(),n=i[t],r=be.getIndexByKey(this._dataController.adaptiveExpandedKey(),i);this._isForceRowAdaptiveExpand=!this._adaptiveController.hasAdaptiveDetailRowExpanded(),r>=0&&e.push(r+1),e.push(t+1),this._dataController.adaptiveExpandedKey(n.key)}},_afterInsertRow:function(e){this.callBase.apply(this,arguments),this._adaptiveController.hasHiddenColumns()&&(this._adaptiveController.toggleExpandAdaptiveDetailRow(e,this.isRowEditMode()),this._isForceRowAdaptiveExpand=!0)},_collapseAdaptiveDetailRow:function(){this._isRowEditMode()&&this._isForceRowAdaptiveExpand&&(this._adaptiveController.collapseAdaptiveDetailRow(),this._isForceRowAdaptiveExpand=!1)},_cancelEditAdaptiveDetailRow:function(){this._adaptiveController.hasHiddenColumns()&&this._collapseAdaptiveDetailRow()},_afterSaveEditData:function(){this.callBase.apply(this,arguments);var e=new se;return this._isRowEditMode()&&this._adaptiveController.hasHiddenColumns()?De(this.getController("validating").validate(!0)).done(t=>{t&&this._cancelEditAdaptiveDetailRow(),e.resolve()}):e.resolve(),e.promise()},_beforeCancelEditData:function(){this.callBase(),this._cancelEditAdaptiveDetailRow()},_getRowIndicesForCascadeUpdating:function(e){var t=this.callBase.apply(this,arguments);return this._adaptiveController.isAdaptiveDetailRowExpanded(e.key)&&t.push(e.rowType===ps?e.rowIndex-1:e.rowIndex+1),t},_beforeCloseEditCellInBatchMode:function(e){var t=this._dataController._adaptiveExpandedKey;if(t){var i=be.getIndexByKey(t,this._dataController.items());i>-1&&e.unshift(i)}},editRow:function(e){this._adaptiveController.isFormOrPopupEditMode()&&this._adaptiveController.collapseAdaptiveDetailRow(),this.callBase(e)},deleteRow:function(e){var t=this._dataController.getKeyByRowIndex(e);this.getEditMode()===Yne&&this._adaptiveController.isAdaptiveDetailRowExpanded(t)&&this._adaptiveController.collapseAdaptiveDetailRow(),this.callBase(e)},init:function(){this.callBase(),this._adaptiveController=this.getController("adaptiveColumns")}},resizing:{_needBestFit:function(){return this.callBase()||!!this._adaptiveColumnsController.getHidingColumnsQueue().length},_correctColumnWidths:function(e,t){var i=this._adaptiveColumnsController,n=i.getHiddenColumns(),r=i.updateHidingQueue(this._columnsController.getColumns());i.hideRedundantColumns(e,t,r);var a=i.getHiddenColumns();return i.hasAdaptiveDetailRowExpanded()&&n.length!==a.length&&i.updateForm(a),!a.length&&i.collapseAdaptiveDetailRow(),this.callBase.apply(this,arguments)},_toggleBestFitMode:function(e){e&&this._adaptiveColumnsController._showHiddenColumns(),this.callBase(e)},_needStretch:function(){var e=this._adaptiveColumnsController;return this.callBase.apply(this,arguments)||e.getHidingColumnsQueue().length||e.hasHiddenColumns()},init:function(){this._adaptiveColumnsController=this.getController("adaptiveColumns"),this.callBase()},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._updateScrollableTimeoutID)}},data:{_processItems:function(e,t){var i=t.changeType;if(e=this.callBase.apply(this,arguments),i==="loadingAll"||!E(this._adaptiveExpandedKey))return e;var n=be.getIndexByKey(this._adaptiveExpandedKey,e),r=this.option(tre)===!1;if(n>=0){var a=e[n];e.splice(n+1,0,{visible:!0,rowType:ps,key:a.key,data:a.data,node:a.node,modifiedValues:a.modifiedValues,isNewRow:a.isNewRow,values:a.values})}else i==="refresh"&&!(r&&t.repaintChangesOnly)&&(this._adaptiveExpandedKey=void 0);return e},_getRowIndicesForExpand:function(e){var t=this.callBase.apply(this,arguments);if(this.getController("adaptiveColumns").isAdaptiveDetailRowExpanded(e)){var i=t[t.length-1];t.push(i+1)}return t},adaptiveExpandedKey:function(e){if(E(e))this._adaptiveExpandedKey=e;else return this._adaptiveExpandedKey},toggleExpandAdaptiveDetailRow:function(e,t){var i=be.getIndexByKey(this._adaptiveExpandedKey,this._items),n=be.getIndexByKey(e,this._items);i>=0&&i===n&&!t&&(e=void 0,n=-1);var r=this._adaptiveExpandedKey;this._adaptiveExpandedKey=e,i>=0&&i++,n>=0&&n++;var a=this.getRowIndexDelta();this.updateItems({allowInvisibleRowIndices:!0,changeType:"update",rowIndices:[i-a,n-a]});var o=this.getController("adaptiveColumns");o.updateCommandAdaptiveAriaLabel(e,ere),o.updateCommandAdaptiveAriaLabel(r,Bw)},init:function(){this.callBase(),this._adaptiveExpandedKey=void 0}},editorFactory:{_getFocusCellSelector:function(){return this.callBase()+", .dx-adaptive-detail-row .dx-field-item > .dx-field-item-content"},_getTooltipsSelector:function(){return this.callBase()+", .dx-field-item-content ."+this.addWidgetPrefix(Jne)}},columns:{_isColumnVisible:function(e){return this.callBase(e)&&!e.adaptiveHidden}},keyboardNavigation:{_isCellValid:function(e){return this.callBase.apply(this,arguments)&&!e.hasClass(this.addWidgetPrefix(hu))},_processNextCellInMasterDetail:function(e){this.callBase(e);var t=this._editingController.isCellOrBatchEditMode();!this._isInsideEditForm(e)&&e&&t&&R.on(e,"focus",function i(){R.off(e,"focus",i),R.trigger(e,"dxclick")})},_handleTabKeyOnMasterDetailCell:function(e,t){var i=this.callBase(e,t),n=this._getFocusedCell(),r=n&&n.parent();if(!i&&r&&r.length){var a=Lw(r),o=t==="next"?a.last():a.first(),s=r.get(0).rowIndex,l=this._adaptiveController,u=this._dataController.getKeyByRowIndex(t==="next"?s:s-1),d=n&&o&&n.get(0)===o.get(0);return l.isAdaptiveDetailRowExpanded(u)&&d}return i},init:function(){this.callBase(),this._adaptiveController=this.getController("adaptiveColumns")}}}}};Oe.registerModule("adaptivity",rre);function mk(e,t,i,n,r,a){i=i||0,n=n||[],a=a||[],n[i]=n[i]||0;var o=e[i],s=a[i]+1||0,l=0,u;if(o){for(u=s;u<o.length;u++){var d=o[u],c=u+n[i],h=d.colspan||1;if(mk(e,t,i+(d.rowspan||1),n,h,a),n[i]+=h-1,l+=h,d.rowspan)for(var f=i+1;f<i+d.rowspan;f++)n[f]=n[f]||0,n[f]+=d.colspan||1;if(t(d,c,i,u)===!1||r!==void 0&&l>=r)break}a[i]=u}}function jv(e,t,i){var n=[];mk(e,function(a,o,s){var l=a,u,d=l.colspan||1,c=o+d-1>=t&&o<i;if(n[s]=n[s]||[],c)o<t?(u=d-(t-o),o=t):u=d,o+u>i&&(u=i-o),u!==d&&(l=k({},l,{colspan:u})),n[s].push(l);else if(o>i)return!1});for(var r=0;r<n.length;r++)n[r]=n[r]||[];return n}var are=50,ore={_resizeCore:function(){this.callBase.apply(this,arguments),this._columnsController.resize()},_handleScroll:function(e){var t=this,i=this.getScrollable(),n=e.scrollOffset.left;t.callBase.apply(t,arguments),t.option("rtlEnabled")&&i&&(n=He(i.$content())-He(i.$element())-n),t._columnsController.setScrollPosition(n)}},sre={_renderCore:function(){this.callBase.apply(this,arguments),this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition()}},lre=function(){var e=function(i){return i.map(n=>n.visibleWidth||parseFloat(n.width)||are)},t={init:function(){this.callBase(),this._beginPageIndex=0,this._endPageIndex=0,this._position=0,this._virtualVisibleColumns={}},resetColumnsCache:function(){this.callBase(),this._virtualVisibleColumns={}},getBeginPageIndex:function(i){for(var n=this.getVisibleColumns(void 0,!0),r=e(n),a=0,o=0;o<r.length;o++){if(a>=i)return Math.floor(o/this.getColumnPageSize());a+=r[o]}return 0},getTotalWidth:function(){var i=this.option("width");return typeof i=="number"?i:this.getController("resizing")._lastWidth||ot(this.component.$element())},getEndPageIndex:function(i){var n=this.getVisibleColumns(void 0,!0),r=e(n),a=0;i+=this.getTotalWidth();for(var o=0;o<r.length;o++){if(a>=i)return Math.ceil(o/this.getColumnPageSize());a+=r[o]}return Math.ceil(r.length/this.getColumnPageSize())},getColumnPageSize:function(){return this.option("scrolling.columnPageSize")},_fireColumnsChanged:function(){var i=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-i},getScrollingTimeout:function(){var i=this.option("scrolling.columnRenderingThreshold"),n=this.option("scrolling.renderAsync"),r=0;return(!E(n)&&this._renderTime>i||n)&&(r=this.option("scrolling.timeout")),r},setScrollPosition:function(i){var n=this.getScrollingTimeout();n>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout(()=>{this._setScrollPositionCore(i)},n)):this._setScrollPositionCore(i)},isVirtualMode:function(){return Ue()&&this.option("scrolling.columnRenderingMode")==="virtual"},resize:function(){this._setScrollPositionCore(this._position)},_setScrollPositionCore:function(i){if(this.isVirtualMode()){var n=this.getBeginPageIndex(i),r=this.getEndPageIndex(i),a=i<this._position?this._beginPageIndex>n:this._endPageIndex<r;this._position=i,a&&(this._beginPageIndex=n,this._endPageIndex=r,this._fireColumnsChanged())}},getFixedColumns:function(i,n){var r=this.callBase(i);if(this.isVirtualMode()&&!n&&r.length){var a=r.map(o=>o.command).indexOf("transparent");return r[a].colspan=this.getVisibleColumns().length-this.callBase().length+1,r}return r},getVisibleColumns:function(i,n){if(n||!this.isVirtualMode())return this.callBase(i);!this._beginPageIndex&&!this._endPageIndex&&(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));var r=this._beginPageIndex,a=this._endPageIndex,o=i+"-"+r+"-"+a;if(this._virtualVisibleColumns[o])return this._virtualVisibleColumns[o];var s=this.callBase(),l=this.getRowCount(),u=this.getColumnPageSize(),d=r*u,c=a*u,h=this.getFixedColumns(void 0,!0),f=h.map(W=>W.command).indexOf("transparent"),p=h.length?f:0,m=s.slice(0,p),g=s.slice(p,d),C=e(g).reduce((W,G)=>W+G,0);C||(d=0);var b=h.length?h.length-f-1:0,A=s.slice(s.length-b),B=s.slice(c,s.length-b),D=e(B).reduce((W,G)=>W+G,0);if(D||(c=s.length),l>1&&typeof i=="number"){for(var U=[],H=0;H<l;H++)U.push(this.callBase(H));m=jv(U,0,m.length)[i]||[],A=jv(U,s.length-A.length,s.length)[i]||[],s=jv(U,d,c)[i]||[]}else s=s.slice(d,c);return C&&(s.unshift({command:"virtual",width:C}),s=m.concat(s)),D&&(s.push({command:"virtual",width:D}),s=s.concat(A)),this._virtualVisibleColumns[o]=s,s},getColumnIndexOffset:function(){var i=0;if(this._beginPageIndex>0){var n=this.getFixedColumns(),r=n.map(o=>o.command).indexOf("transparent"),a=r>=0?r:0;i=this._beginPageIndex*this.getColumnPageSize()-a-1}return i>0?i:0},dispose:function(){clearTimeout(this._changedTimeout),this.callBase.apply(this,arguments)}};return t}(),ure={defaultOptions:function(){return{scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}},extenders:{controllers:{columns:lre},views:{columnHeadersView:sre,rowsView:ore}}};Oe.registerModule("virtualColumns",ure);function dre(e,t){for(var i=d=>d||1,n=[],r=(e[0]||[]).reduce((d,c)=>d+i(c.colspan),0),a=(d=>{var c=0,h=0;return()=>{var f=d[c]||[],p=f[h++];return h>=f.length&&(c++,h=0),p&&(p.colspan=i(p.colspan),p.rowspan=i(p.rowspan)),p}})(e),o=(d,c,h)=>{var f=n[d]=n[d]||[];if(f[c]=h,h.colspan>1||h.rowspan>1){for(var p=(b=>k({},b,t))(h),m=1;m<h.colspan;m++)o(d,c+m,p);for(var g=1;g<h.rowspan;g++)for(var C=0;C<h.colspan;C++)o(d+g,c+C,p)}},s=a(),l=0;s;){for(var u=0;u<r&&s;u++)n[l]&&n[l][u]||(o(l,u,s),u+=s.colspan-1,s=a());l++}return n}var la=je(),_c=Lu(),Pw={EXCEL:"xlsx",CSS:"css",PNG:"png",JPEG:"jpeg",GIF:"gif",SVG:"svg",PDF:"pdf"},gk={CSS:"text/css",EXCEL:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PNG:"image/png",JPEG:"image/jpeg",GIF:"image/gif",SVG:"image/svg+xml",PDF:"application/pdf"},cre={_revokeObjectURLTimeout:3e4,_getDataUri:function(e,t){var i=this._getMimeType(e);return"data:".concat(i,";base64,").concat(t)},_getMimeType:function(e){return gk[e]||"application/octet-stream"},_linkDownloader:function(e,t){var i=me.createElement("a");return i.download=e,i.href=t,i.target="_blank",i},_formDownloader:function(e,t,i,n){var r={method:"post",action:e,enctype:"multipart/form-data"},a=v("<form>").css({display:"none"}).attr(r);function o(s,l){for(var u in l)s.setAttribute(u,l[u]);return s}a.append(o(me.createElement("input"),{type:"hidden",name:"fileName",value:t})),a.append(o(me.createElement("input"),{type:"hidden",name:"contentType",value:i})),a.append(o(me.createElement("input"),{type:"hidden",name:"data",value:n})),a.appendTo("body"),R.trigger(a,"submit"),R.trigger(a,"submit")&&a.remove()},_saveByProxy:function(e,t,i,n){var r=this._getMimeType(i);return this._formDownloader(e,t,r,n)},_winJSBlobSave:function(e,t,i){var n=new Windows.Storage.Pickers.FileSavePicker;n.suggestedStartLocation=Windows.Storage.Pickers.PickerLocationId.documentsLibrary;var r=Pw[i];if(r){var a=this._getMimeType(i);n.fileTypeChoices.insert(a,["."+r])}n.suggestedFileName=t,n.pickSaveFileAsync().then(function(o){o&&o.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function(s){var l=e.msDetachStream();Windows.Storage.Streams.RandomAccessStream.copyAsync(l,s).then(function(){s.flushAsync().done(function(){l.close(),s.close()})})})})},_click:function(e){try{e.dispatchEvent(new MouseEvent("click",{cancelable:!0}))}catch{var t=me.getDocument().createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,la,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}},_saveBlobAs:function(e,t,i){if(this._blobSaved=!1,E(_c.msSaveOrOpenBlob))_c.msSaveOrOpenBlob(i,e),this._blobSaved=!0;else if(E(la.WinJS))this._winJSBlobSave(i,e,t),this._blobSaved=!0;else{var n=la.URL||la.webkitURL||la.mozURL||la.msURL||la.oURL;if(E(n)){var r=n.createObjectURL(i),a=this._linkDownloader(e,r);setTimeout(()=>{n.revokeObjectURL(r),this._objectUrlRevoked=!0},this._revokeObjectURLTimeout),this._click(a)}else Bu.warn("window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL is not defined")}},saveAs:function(e,t,i,n,r){var a=Pw[t];if(a&&(e+="."+a),E(n)&&Qe.log("W0001","Export","proxyURL","19.2","This option is no longer required"),r)this._saveByProxy(n,e,t,i);else if(Ie(la.Blob))this._saveBlobAs(e,t,i);else if(E(n)&&!E(_c.userAgent.match(/iPad/i)))this._saveByProxy(n,e,t,i);else{E(_c.userAgent.match(/iPad/i))||Qe.log("E1034");var o=this._linkDownloader(e,this._getDataUri(t,i));this._click(o)}}};function mc(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ck={exports:{}};/*!
63
63
 
64
64
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files