cft-builder 0.2.249 → 0.2.251
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.
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -2306,7 +2306,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
2308
|
`}}),ci=b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=F3.getProps(t,r),a=b.useState(i.id),s=kN(a,2),l=s[0],c=s[1],u=b.useState(i.collapsed),d=kN(u,2),f=d[0],h=d[1],p=b.useRef(null),v=b.useRef(null),m=i.toggleable?i.onToggle?i.collapsed:f:!1,A=l+"_header",w=l+"_content",x=F3.setMetaData({props:i,state:{id:l,collapsed:m}}),C=x.ptm,T=x.cx,S=x.isUnstyled;li(F3.css.styles,S,{name:"panel"});var E=function(R){i.toggleable&&(m?_(R):P(R),R&&(i.onToggle&&i.onToggle({originalEvent:R,value:!m}),R.preventDefault()))},_=function(R){i.onToggle||h(!1),i.onExpand&&R&&i.onExpand(R)},P=function(R){i.onToggle||h(!0),i.onCollapse&&R&&i.onCollapse(R)};b.useImperativeHandle(e,function(){return{props:i,toggle:E,expand:_,collapse:P,getElement:function(){return p.current},getContent:function(){return v.current}}}),Li(function(){l||c(xo())});var O=function(){if(i.toggleable){var R=l+"_label",ce=n({className:T("toggler"),onClick:E,id:R,"aria-controls":w,"aria-expanded":!m,type:"button",role:"button","aria-label":i.header},C("toggler")),q=n(C("togglericon")),W=m?i.expandIcon||b.createElement(Vm,q):i.collapseIcon||b.createElement(o8,q),ee=nr.getJSXIcon(W,q,{props:i,collapsed:m});return b.createElement("button",ce,ee,b.createElement(Qt,null))}return null},k=function(){var R=ke.getJSXElement(i.header,i),ce=ke.getJSXElement(i.icons,i),q=O(),W=n({id:A,className:T("title")},C("title")),ee=b.createElement("span",W,R),Q=n({className:T("icons")},C("icons")),H=b.createElement("div",Q,ce,q),X=n({className:T("header")},C("header")),pe=b.createElement("div",X,ee,H);if(i.headerTemplate){var ge={className:"p-panel-header",titleClassName:"p-panel-title",iconsClassName:"p-panel-icons",togglerClassName:"p-panel-header-icon p-panel-toggler p-link",onTogglerClick:E,titleElement:ee,iconsElement:H,togglerElement:q,element:pe,id:l+"_header",props:i,collapsed:m};return ke.getJSXElement(i.headerTemplate,ge)}else if(i.header||i.toggleable)return pe;return null},M=function(){var R=ke.getJSXElement(i.footer,i),ce=n({className:T("footer")},C("footer")),q=b.createElement("div",ce,R);if(i.footerTemplate){var W={className:T("footer"),element:q,props:i};return ke.getJSXElement(i.footerTemplate,W)}else if(i.footer)return q;return null},Y=function(){var R=n({ref:v,className:T("toggleableContent"),"aria-hidden":m,role:"region",id:w,"aria-labelledby":A},C("toggleablecontent")),ce=n({className:T("content")},C("content")),q=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!m,unmountOnExit:!0,options:i.transitionOptions},C("transition"));return b.createElement(Wo,T7({nodeRef:v},q),b.createElement("div",R,b.createElement("div",ce,i.children)))},N=n({id:l,ref:p,style:i.style,className:ft(i.className,T("root"))},F3.getOtherProps(i),C("root")),z=k(),$=Y(),le=M();return b.createElement("div",N,z,$,le)});ci.displayName="Panel";const wse=t=>{var v;const{fieldState:e,setFieldState:n,pageIndex:r,formBuilderFormLayout:i,pageSettingUpdate:a}=t,s=(m,A)=>{const w=`${m.className} justify-content-start`,x=`${m.titleClassName} pl-1`;return o.jsxs("div",{className:w,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:m.togglerClassName,onClick:()=>c(A),"aria-label":"Submit"}),o.jsx("span",{className:x,children:`Rule ${A+1}`})]})},l=(m,A)=>{var x;const w=[...((x=e==null?void 0:e.conditionalTabRules)==null?void 0:x.rules)||[]];w[m].conditions=w[m].conditions.filter((C,T)=>A!==T),n(C=>({...C,conditionalTabRules:{...C.conditionalTabRules,rules:w}}))},c=m=>{var C;const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]],w=A.filter((T,S)=>m!==S);n(T=>({...T,conditionalTabRules:{...T.conditionalTabRules,rules:w}}));const x=A[m];(C=x==null?void 0:x.conditions)==null||C.map(T=>{const S=i?It.findIndex(i,_=>{var P;return(_==null?void 0:_.uuid)===((P=T==null?void 0:T.tab)==null?void 0:P.uuid)}):-1,E=i[S];E&&(E.isHidden=!1,a(S,E))})};let u=[...i].filter(function(m,A){return A!==r});u.map(m=>({uuid:m==null?void 0:m.uuid,title:m==null?void 0:m.title}));const d=(m,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].option=m==null?void 0:m.value,n(C=>({...C,conditionalTabRules:{...C.conditionalTabRules,rules:x}}))},f=(m,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].tab=m==null?void 0:m.value,n(S=>({...S,conditionalTabRules:{...S.conditionalTabRules,rules:x}}));const C=It.findIndex(i,S=>{var E;return(S==null?void 0:S.uuid)===((E=m==null?void 0:m.value)==null?void 0:E.uuid)}),T=i[C];T&&(T.isHidden=!0,a(C,T))},h=()=>{n(m=>({...m,conditionalTabRules:{...m.conditionalTabRules,rules:[...m.conditionalTabRules.rules,{conditions:[]}]}}))},p=m=>{const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];A[m].conditions=[...A[m].conditions,{option:null,tab:null}],n(w=>({...w,conditionalTabRules:{...w.conditionalTabRules,rules:[...A]}}))};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Tabs"}),i&&(i==null?void 0:i.length)>1&&((v=e==null?void 0:e.conditionalTabRules)==null?void 0:v.rules.map((m,A)=>o.jsx(ci,{className:"mb-3",header:`Rule ${A+1}`,headerTemplate:w=>s(w,A),children:o.jsxs("div",{children:[m==null?void 0:m.conditions.map((w,x)=>o.jsx("div",{className:"p-field pb-6",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-2",children:o.jsxs("label",{children:["Show tab",w.value]})}),o.jsx("div",{className:"col-3 p-fluid",children:o.jsx(La,{value:w.tab,options:u,onChange:C=>f(C,A,x),optionLabel:"title.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-3",children:"when option is selected"}),o.jsx("div",{className:"col-3 p-fluid",children:o.jsx(La,{value:w==null?void 0:w.option,options:e==null?void 0:e.options,onChange:C=>d(C,A,x),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>l(A,x),tooltipOptions:{position:"top"}})})]})},x)),o.jsx(Ft,{text:!0,size:"small",onClick:()=>p(A),icon:"pi pi-plus",className:"p-mt-4",label:"Add Condition"})]})},"conditional_tab_rule"+A))),i&&(i==null?void 0:i.length)>1&&o.jsx(Ft,{text:!0,onClick:()=>h(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"}),i&&(i==null?void 0:i.length)<2&&o.jsx("p",{className:"error",children:"Please needs to have two or more tabs to enable the conditional tabs"})]})},Sse=t=>{var C;const{fieldState:e,setFieldState:n,section:r,formBuilderFormLayout:i,sectionSettingUpdate:a,page:s}=t,[l]=F.useState([]),{schemaBuilderUpdate:c,formBuilderFormSchema:u}=sn(),d=(T,S)=>{const E=`${T.className} justify-content-start`,_=`${T.titleClassName} pl-1`;return o.jsxs("div",{className:E,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:T.togglerClassName,onClick:()=>f(S),"aria-label":"Submit"}),o.jsx("span",{className:_,children:`Rule ${S+1}`})]})},f=T=>{var P;const S=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],E=S[T];(P=E==null?void 0:E.conditions)==null||P.map(O=>{var Y;const k=It.findIndex(i,N=>{var z;return(N==null?void 0:N.uuid)===((z=O==null?void 0:O.tab)==null?void 0:z.uuid)}),M=i?It.findIndex(i[k].children,N=>{var z;return(N==null?void 0:N.uuid)===((z=O==null?void 0:O.section)==null?void 0:z.uuid)}):-1;if(M>=0){const N=(Y=i[k])==null?void 0:Y.children[M];N&&(N.isHidden=!1,a(k,M,N))}});const _=S.filter((O,k)=>T!==k);n(O=>({...O,conditionalSectionRules:{...O.conditionalSectionRules,rules:_}}))},h=T=>{var _;let S=!1;const E=i?i.filter(function(P){return(P==null?void 0:P.uuid)===(T==null?void 0:T.uuid)}):[];return(E==null?void 0:E.length)>0&&((_=E[0].children)==null?void 0:_.length)>1&&(S=!0),S},p=(T,S,E)=>{const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];_[S].conditions[E].option=T==null?void 0:T.value,n(P=>({...P,conditionalSectionRules:{...P.conditionalSectionRules,rules:_}}))},v=(T,S)=>{var P;const E=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],_=E[T];(P=_==null?void 0:_.conditions)==null||P.map(O=>{var N;const k=It.findIndex(i,z=>{var $;return(z==null?void 0:z.uuid)===(($=O==null?void 0:O.tab)==null?void 0:$.uuid)}),M=i?It.findIndex(i[k].children,z=>{var $;return(z==null?void 0:z.uuid)===(($=O==null?void 0:O.section)==null?void 0:$.uuid)}):-1,Y=(N=i[k])==null?void 0:N.children[M];console.log("sectionData",Y),Y&&(Y.isHidden=!1,console.log("sectionData",Y),a(k,M,Y))}),E[T].conditions=E[T].conditions.filter((O,k)=>S!==k),n(O=>({...O,conditionalSectionRules:{...O.conditionalSectionRules,rules:E}}))},m=(T,S,E)=>{var Y,N;const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];_[S].conditions[E].section=T==null?void 0:T.value;const P=(N=(Y=_[S].conditions[E])==null?void 0:Y.tab)==null?void 0:N.uuid,O=It.findIndex(i,z=>(z==null?void 0:z.uuid)===P);n(z=>({...z,conditionalSectionRules:{...z.conditionalSectionRules,rules:_}}));const k=i?It.findIndex(i[O].children,z=>{var $;return(z==null?void 0:z.uuid)===(($=T==null?void 0:T.value)==null?void 0:$.uuid)}):-1,M=i[O].children[k];M&&(M.isHidden=!0,a(O,k,M))},A=T=>{const S=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];S[T].conditions=[...S[T].conditions,{option:null,tab:{title:s==null?void 0:s.title,uuid:s==null?void 0:s.uuid},section:null}],n(E=>({...E,conditionalSectionRules:{...E.conditionalSectionRules,rules:S}}))},w=()=>{n(S=>({...S,conditionalSectionRules:{...S.conditionalSectionRules,rules:[...S.conditionalSectionRules.rules,{uuid:tt(),conditions:[]}]}}));const T=[...(u==null?void 0:u.conditionalSectionsRules)||[]];c({conditionalSectionsRules:[...T,{fieldId:e==null?void 0:e.uuid,uuid:tt(),conditions:[]}]})},x=T=>{var E;const S=i==null?void 0:i.filter(function(_){return(_==null?void 0:_.uuid)===(T==null?void 0:T.uuid)});if(S&&(S==null?void 0:S.length)>0){const _=(E=S[0])==null?void 0:E.children.filter(function(P){return(P==null?void 0:P.uuid)!==(r==null?void 0:r.uuid)});if((_==null?void 0:_.length)>0)return _}return l};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Sections"}),(C=e==null?void 0:e.conditionalSectionRules)==null?void 0:C.rules.map((T,S)=>o.jsx(ci,{className:"mb-3",header:`Rule ${S+1}`,headerTemplate:E=>d(E,S),children:o.jsxs("div",{children:[T==null?void 0:T.conditions.map((E,_)=>{var P,O;return o.jsx("div",{className:"p-field pb-2",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsx("label",{children:"In Tab"}),o.jsx("p",{children:(O=(P=E==null?void 0:E.tab)==null?void 0:P.title)==null?void 0:O.english})]}),o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsxs("label",{children:["Select section",E.value]}),o.jsx(La,{disabled:!h(E==null?void 0:E.tab),value:E.section,options:x(E.tab),onChange:k=>m(k,S,_),optionLabel:"heading.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-4 p-fluid",children:["when option is selected",o.jsx(La,{disabled:!h(E==null?void 0:E.tab),value:E==null?void 0:E.option,options:e==null?void 0:e.options,onChange:k=>p(k,S,_),optionLabel:"optionText.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-1",children:[o.jsx("br",{}),o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>v(S,_),tooltipOptions:{position:"top"}})]}),!h(E.tab)&&o.jsx("div",{className:"col-12",children:o.jsxs("p",{className:"error",children:[" ","At least two or more sections should exist in a page"]})})]})},_)}),o.jsx("div",{children:o.jsx("div",{className:"flex",children:o.jsx(Ft,{text:!0,className:"btn-sm mt-3 ",label:"+ Add Condition",onClick:()=>A(S),size:"small"})})})]})},S)),o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>w(),className:"p-mt-4",label:"Add Rule",size:"small"})]})},Cse=t=>{var u;const{fieldState:e,setFieldState:n}=t,r=d=>{var p;const h=[...((p=e==null?void 0:e.inlineConditionalRules)==null?void 0:p.rules)||[]].filter((v,m)=>d!==m);n(v=>({...v,inlineConditionalRules:{...v.inlineConditionalRules,rules:h}}))},i=(d,f)=>{const h=`${d.className} justify-content-start`,p=`${d.titleClassName} pl-1`;return o.jsxs("div",{className:h,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:d.togglerClassName,onClick:()=>r(f),"aria-label":"Submit"}),o.jsx("span",{className:p,children:`Rule ${f+1}`})]})},a=(d,f,h)=>{const p=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];p[f].conditions[h].value=d==null?void 0:d.value,n(v=>({...v,inlineConditionalRules:{...v.inlineConditionalRules,rules:p}}))},s=(d,f)=>{const h=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];h[d].conditions=h[d].conditions.filter((p,v)=>f!==v),n(p=>({...p,inlineConditionalRules:{...p.inlineConditionalRules,rules:h}}))},l=d=>{const f=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];f[d].conditions=[...f[d].conditions,{value:"",children:[]}],n(h=>({...h,inlineConditionalRules:{...h.inlineConditionalRules,rules:f}}))},c=()=>{n(d=>({...d,inlineConditionalRules:{...d.inlineConditionalRules,rules:[...d.inlineConditionalRules.rules,{conditions:[]}]}}))};return o.jsxs("div",{children:[o.jsx("h4",{children:"Inline Conditions"}),(u=e==null?void 0:e.inlineConditionalRules)==null?void 0:u.rules.map((d,f)=>o.jsx(ci,{className:"mb-3",header:`Rule ${f+1}`,headerTemplate:h=>i(h,f),children:o.jsxs("div",{children:[d==null?void 0:d.conditions.map((h,p)=>o.jsx("div",{className:"p-field p-pt-2",children:o.jsxs("div",{className:"grid",children:[o.jsx("label",{className:"block",children:"Show when selected option is:"}),o.jsx("div",{className:" p-fluid col-11",children:o.jsx(La,{value:h.value,options:e==null?void 0:e.options,onChange:v=>a(v,f,p),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>s(f,p),tooltipOptions:{position:"top"}})})]})},"inline-rules-"+p)),o.jsx(Ft,{text:!0,onClick:()=>l(f),className:"p-mt-4",icon:"pi pi-plus",label:"Add Condition",size:"small"})]})},f)),o.jsx(Ft,{text:!0,onClick:()=>c(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"})]})},xse=t=>{const{fieldState:e,pageIndex:n,section:r,setFieldState:i,page:a}=t,{pageSettingUpdate:s,formBuilderFormLayout:l,sectionSettingUpdate:c}=sn();return o.jsx(o.Fragment,{children:o.jsxs("div",{className:" scroll-height-250",children:[o.jsx(Cse,{fieldState:e,setFieldState:i}),o.jsx("hr",{}),o.jsx(wse,{fieldState:e,setFieldState:i,pageIndex:n,formBuilderFormLayout:l,pageSettingUpdate:s}),o.jsx("hr",{}),o.jsx(Sse,{fieldState:e,setFieldState:i,section:r,formBuilderFormLayout:l,sectionSettingUpdate:c,page:a}),o.jsx("hr",{})]})})},Tse=t=>{const{fieldState:e,setFieldState:n}=t,[r,i]=F.useState(""),[a,s]=F.useState([""]),[l,c]=F.useState(!1),[u,d]=F.useState(0),[f,h]=F.useState(!1),{updateGlobalToast:p}=Ht(),v=()=>{h(!0)},m=()=>{var z;const Y=((z=e==null?void 0:e.reviewerChecklist)==null?void 0:z.length)>=0?[...e.reviewerChecklist]:[];Y.push({uuid:tt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const N={...e,reviewerChecklist:Y};n($=>({...$,...N})),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},w=Y=>{const N=[...e.reviewerChecklist];N.splice(Y,1);const z={...e,reviewerChecklist:N};n($=>({...$,...z}))},x=(Y,N)=>{c(!0);const{checklist:z,action:$}=Y;h(!0),d(N),setTimeout(()=>{i(z),s($)},1e3)},C=(Y,N)=>o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>x(Y,N==null?void 0:N.rowIndex)}),o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>w(N==null?void 0:N.rowIndex)})]}),T=Y=>{var N;return o.jsx(o.Fragment,{children:(N=Y==null?void 0:Y.action)==null?void 0:N.length})},S=Y=>{const N=[...a];N.splice(Y,1),s(N)},E=()=>{const Y=[...e.reviewerChecklist];Y[u]={checklist:r,action:a};const N={...e,reviewerChecklist:Y};n(z=>({...z,...N})),h(!1),c(!1)},_=()=>o.jsx("div",{children:l?o.jsx(Ft,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{E()}}):o.jsx(Ft,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{m()}})}),P=Y=>{n(N=>({...N,reviewerChecklist:Y==null?void 0:Y.value}))},O=Y=>{navigator.clipboard.writeText(JSON.stringify(Y))};function k(Y){try{JSON.parse(Y)}catch{return!1}return!0}const M=async()=>{var z;const Y=await navigator.clipboard.readText();let N="";if(k(Y)){const $=JSON.parse(Y);if((z=$[0])!=null&&z.checklist){const le={...It.cloneDeep(e),reviewerChecklist:$};n(G=>({...G,...le}));return}else N="Empty or Invalid Schema"}else N="Invalid Schema";p({showToast:!0,toastMessage:N,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsx(Ks,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:_(),children:o.jsxs("div",{className:"scroll-height-500",children:[o.jsx("h5",{children:"Checklist"}),o.jsx(lo,{rows:2,cols:50,value:r,onChange:Y=>{var N;i((N=Y==null?void 0:Y.target)==null?void 0:N.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map((Y,N)=>o.jsxs("div",{children:[N+1,"."," ",o.jsx(lo,{value:Y,onChange:z=>{var le;const $=[...a];$[N]=(le=z==null?void 0:z.target)==null?void 0:le.value,s($)},rows:2,cols:50})," ",o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>S(N)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${N}`)),o.jsx(Ft,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(Ft,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{v()}}),o.jsx(Ft,{text:!0,label:"Copy Schema ",onClick:()=>{O([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(Ft,{text:!0,label:"Paste Checklist ",onClick:()=>{M()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(ao,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:P,scrollable:!0,children:[o.jsx(xr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(xr,{field:"checklist",header:"Checklist"}),o.jsx(xr,{field:"actions",header:"Actions",body:Y=>T(Y)}),o.jsx(xr,{header:"",body:(Y,N)=>C(Y,N)})]})})]})},Ese=t=>{const{onHandleChangeLayoutSettings:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isFieldAnFilterOption",checked:(n==null?void 0:n.isFieldAnFilterOption)||!1,onChange:r=>e("isFieldAnFilterOption",r.checked)}),o.jsx("label",{htmlFor:"isFieldAnFilterOption",children:"Is field an filter option to filter data"})," ",o.jsx(cn,{target:".isFieldAnFilterOption",content:"Make the field a filter for sorting data"}),o.jsx("i",{className:"isFieldAnFilterOption pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isSortable",checked:(n==null?void 0:n.isSortable)||!1,onChange:r=>e("isSortable",r.checked)}),o.jsx("label",{htmlFor:"isSortable",children:"Enable sortable"})," ",o.jsx(cn,{target:".isSortable",content:"Make the field as column sortable"}),o.jsx("i",{className:"isSortable pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isFilterable",checked:(n==null?void 0:n.isFilterable)||!1,onChange:r=>e("isFilterable",r.checked)}),o.jsx("label",{htmlFor:"isFilterable",children:"Enable filter"})," ",o.jsx(cn,{target:".isFilterable",content:"Filter the column data"}),o.jsx("i",{className:"isFilterable pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"resizableColumns",checked:n==null?void 0:n.resizableColumns,onChange:r=>e("resizableColumns",r.checked)}),o.jsx("label",{htmlFor:"resizableColumns",children:"Enable resizable columns"})," ",o.jsx(cn,{target:".resizableColumns",content:"Column width can be increase or decreased by dragging"}),o.jsx("i",{className:"resizableColumns pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"reorderableColumns",checked:n==null?void 0:n.reorderableColumns,onChange:r=>e("reorderableColumns",r.checked)}),o.jsx("label",{htmlFor:"reorderableColumns",children:"Enable reorderable columns"})," ",o.jsx(cn,{target:".reorderableColumns",content:"Column can ordered to show as first or last"}),o.jsx("i",{className:"reorderableColumns pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"colToggle",checked:(n==null?void 0:n.colToggle)||!1,onChange:r=>e("colToggle",r.checked)}),o.jsx("label",{htmlFor:"colToggle",children:"Enable column toggle"})," ",o.jsx(cn,{target:".colToggle",content:"Column can be shown and hide by settings by user"}),o.jsx("i",{className:"colToggle pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"freezeColumn",checked:(n==null?void 0:n.freezeColumn)||!1,onChange:r=>e("freezeColumn",r.checked)}),o.jsx("label",{htmlFor:"freezeColumn",children:"Enable freeze columns"})," ",o.jsx(cn,{target:".freezeColumn",content:"Column can sticky so the important can be in view all the time"}),o.jsx("i",{className:"freezeColumn pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]})]})},Ise=t=>{var c,u,d;const{fieldState:e,setFieldState:n}=t,{formBuilderSchemaLanguages:r}=sn(),i=()=>{n(f=>Object.assign({},f,{options:[...f.options,{uuid:tt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},a=f=>{n(h=>({...h,fieldType:{...h==null?void 0:h.fieldType,type:f}}))},s=(f,h)=>{n(p=>({...p,[f]:h}))},l=[{label:"Employee",api:"/employees/list",availableId:["user_id","employee_id"],optionValue:"employee_id",optionLabel:"first_name"},{label:"Departments",api:"/department/",availableId:["department_id"],optionValue:"department_id",optionLabel:"department_name"}];return o.jsxs("div",{className:"p-fluid",children:[o.jsx("h4",{children:"Render Type"}),o.jsxs("div",{className:"flex flex-wrap gap-3 my-2",children:[o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(sa,{inputId:"renderType1",name:"renderType",value:"radio",onChange:f=>{a(f==null?void 0:f.value)},checked:((c=e==null?void 0:e.fieldType)==null?void 0:c.type)==="radio"}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:"Radio"})]}),o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(sa,{inputId:"renderType2",name:"renderType",value:"dropdown",onChange:f=>{a(f==null?void 0:f.value)},checked:((u=e==null?void 0:e.fieldType)==null?void 0:u.type)==="dropdown"}),o.jsx("label",{htmlFor:"ingredient2",className:"ml-2",children:"Dropdown"})]})]}),o.jsx("label",{htmlFor:"",className:"pb-2",children:"Data Source"}),o.jsxs("div",{className:"flex flex-wrap gap-3 mt-2",children:[o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(sa,{inputId:"dataSourceType1",name:"dataSourceType",value:"custom",onChange:f=>{s("dataSourceType",f==null?void 0:f.value)},checked:(e==null?void 0:e.dataSourceType)==="custom"}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:"Custom"})]}),o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(sa,{inputId:"dataSourceType2",name:"dataSourceType",value:"database",onChange:f=>{s("dataSourceType",f==null?void 0:f.value)},checked:(e==null?void 0:e.dataSourceType)==="database"}),o.jsx("label",{htmlFor:"ingredient2",className:"ml-2",children:"Database"})]})]}),(e==null?void 0:e.dataSourceType)==="database"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:"Select Data Source"}),o.jsx("div",{children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[o.jsx("div",{className:"py-2",children:o.jsx("label",{children:"Datasources"})}),o.jsx(La,{value:e==null?void 0:e.dataSource,onChange:f=>{var h;s("optionLabel",(h=f.value)==null?void 0:h.optionLabel),s("dataSource",f.value)},options:l,placeholder:"Select a Data Source",className:"w-full "})]}),o.jsxs("div",{className:"col-6",children:[o.jsx("div",{className:"py-2",children:o.jsx("label",{htmlFor:"",className:"py-2",children:"Select Datasource Id"})}),o.jsx(La,{value:e==null?void 0:e.optionValue,onChange:f=>s("optionValue",f.value),options:(d=e==null?void 0:e.dataSource)==null?void 0:d.availableId,placeholder:"Source Id",className:"w-full "})]})]})})]}),(e==null?void 0:e.dataSourceType)==="custom"&&o.jsx(o.Fragment,{children:(e==null?void 0:e.options)!==void 0&&e.componentType!=="grid-component"&&e.componentType!=="matrix-dropdown"&&e.componentType!=="table"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"scroll-height-300 pt-5",children:o.jsx(oo,{activeIndex:0,children:r!=null&&r.length?r.map((f,h)=>o.jsx(so,{tabIndex:h,header:f==null?void 0:f.language,children:o.jsx(ON,{enableCopyPaste:!0,isCustomValue:!0,fieldState:e,setFieldState:n,language:f})},h)):""})}),o.jsx(Ft,{text:!0,className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>i(),"aria-label":"Add"})]})})]})},_se=t=>{var u,d;const{option:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t,{userSelectedLanguage:s}=sn(),l=[{type:"radio",label:"Radio"},{type:"text",label:"Input Text"},{type:"text-area",label:"Text Area"},{type:"date",label:"Date Field"}],c=(f,h)=>{var p;return o.jsxs("div",{onClick:f.onClick,className:f.className,children:[o.jsx("span",{children:f.titleElement}),e.children&&((p=e.children)==null?void 0:p.length)>1&&o.jsx(Ft,{text:!0,icon:"pi pi-trash",size:"small",onClick:()=>{console.log("field",h==null?void 0:h.uuid),a(h==null?void 0:h.uuid)},"aria-label":"Filter"})]})};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox mt-3",children:[o.jsx(Yr,{inputId:"showConditionalFields",onChange:f=>{n(e==null?void 0:e.uuid,f.checked,{enableConditionalField:f.checked})},checked:e==null?void 0:e.enableConditionalField}),o.jsx("label",{htmlFor:"showConditionalFields",children:"Enable Conditional Field"})]}),(e==null?void 0:e.enableConditionalField)===!0&&o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,label:"Add Field",onClick:()=>{i(e==null?void 0:e.uuid)}}),o.jsx(rs,{children:((u=e.children)==null?void 0:u.length)&&((d=e.children)==null?void 0:d.map((f,h)=>{var p,v;return o.jsx(wr,{header:(p=f.label)==null?void 0:p[s==null?void 0:s.type],headerTemplate:m=>c(m,f),children:o.jsxs("div",{className:"card",children:[o.jsx("p",{children:"Choose Field Type"}),o.jsx("div",{className:"flex mb-3",children:(l==null?void 0:l.length)&&(l==null?void 0:l.map(m=>o.jsxs("div",{className:"mr-3",children:[o.jsx(sa,{inputId:"ingredient1",name:"fieldType",value:m==null?void 0:m.type,onChange:()=>r(f==null?void 0:f.uuid,{type:m==null?void 0:m.type}),checked:(f==null?void 0:f.type)===(m==null?void 0:m.type)}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:m==null?void 0:m.label})]},`field_type_${f==null?void 0:f.uuid}`)))}),o.jsxs("div",{className:"field-checkbox mt-3",children:[o.jsx(Yr,{inputId:"isRequired",onChange:m=>{r(f==null?void 0:f.uuid,{attributes:{required:m.checked}})},checked:(v=f==null?void 0:f.attributes)==null?void 0:v.required}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Is Required"," "]})]}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ci,{header:"Text Settings",toggleable:!0,collapsed:!0,children:o.jsx("div",{className:"",children:o.jsx(wD,{language:s,fieldState:f,onHandleChange:(m,A,w)=>{r(f==null?void 0:f.uuid,{[m]:{[A==null?void 0:A.type]:w}})}})})})}),(f==null?void 0:f.type)==="radio"&&o.jsx(wr,{header:"Radio",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(E7,{option:e,fieldState:f,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})})})]})]})},`field-tab-${h}-${f==null?void 0:f.uuid}-${e==null?void 0:e.uuid}`)}))})]})]})},E7=t=>{var s,l;const{fieldState:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t;return o.jsx(o.Fragment,{children:o.jsx(rs,{children:((s=e==null?void 0:e.options)==null?void 0:s.length)&&((l=e==null?void 0:e.options)==null?void 0:l.map((c,u)=>o.jsx(wr,{header:`Option - ${c==null?void 0:c.label}`,children:o.jsx(_se,{option:c,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})},`hirarchey-option-${u}`)))})})};var PN={},Dse=Fi&&Fi.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),k3=Fi&&Fi.__assign||function(){return k3=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},k3.apply(this,arguments)},Nse=Fi&&Fi.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Ose=Fi&&Fi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MN=Fi&&Fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nse(e,t,n);return Ose(e,t),e},Fse=Fi&&Fi.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},kse=Fi&&Fi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PN,"__esModule",{value:!0});var I7=MN(F),Pse=kse(r_),td=MN(ua);function LN(t){return t&&t.replace(/ |\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function Mse(t){var e=document.createTextNode("");t.appendChild(e);var n=document.activeElement===t;if(e!==null&&e.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var i=document.createRange();i.setStart(e,e.nodeValue.length),i.collapse(!0),r.removeAllRanges(),r.addRange(i)}t instanceof HTMLElement&&t.focus()}}var Lse=function(t){Dse(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.lastHtml=n.props.html,n.el=typeof n.props.innerRef=="function"?{current:null}:I7.createRef(),n.getEl=function(){return(n.props.innerRef&&typeof n.props.innerRef!="function"?n.props.innerRef:n.el).current},n.emitChange=function(r){var i=n.getEl();if(i){var a=i.innerHTML;if(n.props.onChange&&a!==n.lastHtml){var s=Object.assign({},r,{target:{value:a}});n.props.onChange(s)}n.lastHtml=a}},n}return e.prototype.render=function(){var n=this,r=this.props,i=r.tagName,a=r.html,s=r.innerRef,l=Fse(r,["tagName","html","innerRef"]);return I7.createElement(i||"div",k3(k3({},l),{ref:typeof s=="function"?function(c){s(c),n.el.current=c}:s||this.el,onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp||this.emitChange,onKeyDown:this.props.onKeyDown||this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:a}}),this.props.children)},e.prototype.shouldComponentUpdate=function(n){var r=this.props,i=this.getEl();return!i||LN(n.html)!==LN(i.innerHTML)?!0:r.disabled!==n.disabled||r.tagName!==n.tagName||r.className!==n.className||r.innerRef!==n.innerRef||r.placeholder!==n.placeholder||!(0,Pse.default)(r.style,n.style)},e.prototype.componentDidUpdate=function(){var n=this.getEl();n&&(this.props.html!==n.innerHTML&&(n.innerHTML=this.props.html),this.lastHtml=this.props.html,Mse(n))},e.propTypes={html:td.string.isRequired,onChange:td.func,disabled:td.bool,tagName:td.string,className:td.string,style:td.object,innerRef:td.oneOfType([td.object,td.func])},e}(I7.Component),P3=PN.default=Lse;const Bse=t=>{var w;const e=F.useRef(null),{field:n,fieldIndex:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,path:c}=t,[u,d]=F.useState(n),{userSelectedLanguage:f,fieldSettingUpdate:h,fieldSettingUpdateInlineConditional:p,gridComponentFieldSettingUpdate:v}=sn(),m=(x,C,T)=>{d(S=>({...S,[x]:{...S[x],[C==null?void 0:C.type]:T}}))};F.useEffect(()=>(A(),()=>{}),[u]);const A=()=>{const x=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?p(x[pa],x[ga],x[Ta],x[Ea],x[Ia],x[Pa],x[Go],x[Co],u):(x==null?void 0:x.length)>Pa&&(x==null?void 0:x.length)===ql+1&&(n!=null&&n.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(x[pa],x[ga],x[Ta],x[Ea],x[Ia],x[5],x[6],x[7],u):h(i,a,s,l,r,{...n,label:u==null?void 0:u.label})};return o.jsx(o.Fragment,{children:o.jsx(P3,{style:{display:"inline-block"},className:"builder-input-label-edit",innerRef:e,html:(w=n==null?void 0:n.label)==null?void 0:w[f==null?void 0:f.type],disabled:!1,onChange:x=>{var C;m("label",f,(C=x==null?void 0:x.target)==null?void 0:C.value)},tagName:"article"})})},da=t=>{const{sectionIndex:e,fieldIndex:n}=t,{formBuilderFormSchema:r}=sn();return(r==null?void 0:r.enableFieldEnumeration)===!0?o.jsx("span",{className:"mr-2",children:o.jsx(F8,{classes:"font-medium p-1 bg-primary",level:"purple",value:`${e+1}.${n+1}`})}):o.jsx(o.Fragment,{})},_7=t=>{var d,f,h,p,v,m,A,w,x,C,T,S,E,_;const{field:e,update:n,value:r,isFirst:i,isDisabled:a}=t,{isBuilderMode:s}=Ht(),{userSelectedLanguage:l}=sn(),[c,u]=F.useState(0);return F.useEffect(()=>{const P=Gt.addListener("onSubmitUserForm",()=>{var k;(k=e==null?void 0:e.attributes)!=null&&k.required?r!=null&&r[e.uuid]?e.isValid=1:e.isValid=0:e.isValid=1}),O=Gt.addListener("OnInvalidFieldCatch",k=>{(e==null?void 0:e.uuid)===(k==null?void 0:k.fieldId)?u(1):u(0)});return()=>{P.remove(),O.remove()}}),o.jsxs("div",{className:"",children:[(e==null?void 0:e.type)==="radio"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex align-items-center mb-3",children:[" ",i===!0&&o.jsx(da,{...t}),((d=e==null?void 0:e.attributes)==null?void 0:d.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(Bse,{...t}):o.jsx("div",{className:"text-gray-900 font-bold text-xl",children:(f=e==null?void 0:e.label)==null?void 0:f[l==null?void 0:l.type]})]}),((h=e==null?void 0:e.options)==null?void 0:h.length)&&((p=e==null?void 0:e.options)==null?void 0:p.map(P=>{var O,k;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex align-items-center mb-2",children:[o.jsx(sa,{inputId:P.uuid,name:e==null?void 0:e.uuid,value:P.uuid,onChange:M=>n(e==null?void 0:e.uuid,M==null?void 0:M.value),checked:(r==null?void 0:r[e.uuid])===P.uuid,disabled:a}),o.jsx("label",{htmlFor:P.uuid,className:"ml-2",children:P.label})]}),(P==null?void 0:P.enableConditionalField)===!0&&(r==null?void 0:r[e==null?void 0:e.uuid])===(P==null?void 0:P.uuid)&&(P==null?void 0:P.children)&&((O=P==null?void 0:P.children)==null?void 0:O.length)>0&&((k=P==null?void 0:P.children)==null?void 0:k.map(()=>o.jsx(_7,{...t},`radio_child_${r==null?void 0:r[e==null?void 0:e.uuid]}`)))]},`${P.uuid}-radio-wrapper-${e==null?void 0:e.uuid}`)}))]}),(e==null?void 0:e.type)==="text"&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(wn,{className:"mt-2",onChange:P=>{var O;return n(e==null?void 0:e.uuid,(O=P==null?void 0:P.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(m=e==null?void 0:e.placeholder)==null?void 0:m[l==null?void 0:l.type]})]})}),(e==null?void 0:e.type)==="date"&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((A=e==null?void 0:e.attributes)==null?void 0:A.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(nf,{className:"mt-2",onChange:P=>{var O;return n(e==null?void 0:e.uuid,(O=P==null?void 0:P.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(w=e==null?void 0:e.placeholder)==null?void 0:w[l==null?void 0:l.type]})]})}),(e==null?void 0:e.type)==="text-area"&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((x=e==null?void 0:e.attributes)==null?void 0:x.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(lo,{className:"mt-2",onChange:P=>{var O;return n(e==null?void 0:e.uuid,(O=P==null?void 0:P.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(C=e==null?void 0:e.placeholder)==null?void 0:C[l==null?void 0:l.type]})]})}),o.jsx("div",{children:((T=e==null?void 0:e.helperText)==null?void 0:T[l==null?void 0:l.type])!==""&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[l==null?void 0:l.type]})}),o.jsx("div",{children:((E=e==null?void 0:e.attributes)==null?void 0:E.required)&&o.jsx("small",{className:"error",children:c===1&&!(r!=null&&r[e.uuid])?(_=e==null?void 0:e.validationMesssage)==null?void 0:_.language:""})})]},`${e==null?void 0:e.uuid}-radio`)},Vse=t=>{const{hirarechicalRadioSchemaState:e}=t,[n,r]=F.useState({});return o.jsx("div",{children:o.jsx(_7,{schema:e,field:e,update:(i,a)=>{const s={...n};s[i]=a,r(s)},value:n,sectionIndex:0,fieldIndex:0,pageIndex:0,rowIndex:0,columnIndex:0,path:""})})},D7={showHeaderText:!1,showHelperText:!1,showToolTip:!1,showLabel:!0,label:{english:"Field label"},abbreviationLabel:{english:""},helperText:{english:"Helper Text"},guidelines:{english:""},headerText:{english:"Header text"},textTable:{english:""},toolTip:{english:""},validationMesssage:{english:"This field is required"},placeholder:{english:""},enableConditionalField:!0},qse={uuid:tt(),...D7,type:"radio",value:null,options:[{uuid:tt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:tt(),label:"No",value:null,enableConditionalField:!0,children:[]}]};({uuid:tt(),...D7,options:(tt(),{uuid:tt(),...D7,options:(tt(),tt())},tt())});const Use=t=>{const{fieldState:e,setFieldState:n}=t,r=(f,h,p)=>p==null?void 0:p.map(v=>{var m;return v.uuid===f?{...v,...h}:{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>A.type==="radio"?{...A,options:r(f,h,(A==null?void 0:A.options)||[])}:{...A})]:[]}}),i=(f,h,p)=>{const v=r(f,p,e.options);n(m=>({...m,options:v}))},a=(f,h,p)=>p==null?void 0:p.map(v=>{var m;return{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>A.uuid===f?{...A,...h}:{...A,options:a(f,h,A==null?void 0:A.options)})]:[]}}),s=(f,h)=>{const p=a(f,h,e.options);n(v=>({...v,options:p}))},l=(f,h)=>h==null?void 0:h.map(p=>{var v;return{...p,children:p!=null&&p.children&&((v=p==null?void 0:p.children)==null?void 0:v.length)>0?[...p.children.filter(m=>{if(m.uuid!==f)return{...m,options:l(f,m==null?void 0:m.options)}})]:[]}}),c=(f,h,p)=>p==null?void 0:p.map(v=>{var m;return v.children&&v.uuid===f?{...v,children:[...v.children,h]}:{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>({...A,options:c(f,h,A==null?void 0:A.options)}))]:[]}}),u=f=>{const h=c(f,{...qse,isValid:0,uuid:tt(),options:[{uuid:tt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:tt(),label:"No",value:null,enableConditionalField:!0,children:[]}],isPostField:!1,showAlphabetList:!1,showButtonLayout:!1,answerOptions:[],isExternalSource:!1,underLined:!1,noOfMultpleAnswer:void 0,isAllowMultipleAnswer:!1,isIcon:!1,isTodayBtn:!1,resizableColumns:!1,isFilterable:!1,freezeColumn:!1,colToggle:!1,isFieldAnFilterOption:!1,isSortable:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1,fieldData:void 0},e.options);n(p=>({...p,options:h}))},d=f=>{const h=l(f,e.options);n(p=>({...p,options:h}))};return o.jsx("div",{children:o.jsx("div",{className:" px-4",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-6 scroll-height-200",children:(e==null?void 0:e.isHierarchalCondionalTabEnabled)===!0&&o.jsx(E7,{fieldState:e,updateCondtionOption:i,updateChildrenField:s,addChildrenField:u,removeChildrenField:d})}),o.jsxs("div",{className:"col-6 p-3 scroll-height-200",children:[o.jsx("h4",{className:"flex justify-content-center align-items-center",children:"Preview"}),o.jsx(Vse,{hirarechicalRadioSchemaState:e})]})]})})})},Zi=t=>{var Q;const{formBuilderFormSchema:e,fieldSettingUpdate:n,fieldSettingUpdateInlineConditional:r,formBuilderSchemaLanguages:i,pageSettingUpdate:a,formBuilderFormLayout:s,formBuilderPublishedStatus:l,gridComponentFieldSettingUpdate:c}=sn(),{renderType:u}=Ht(),{visibilty:d,field:f,closeSettingFieldSidebar:h,pageIndex:p,sectionIndex:v,rowIndex:m,columnIndex:A,fieldIndex:w,path:x,row:C,typeName:T}=t,{updateGlobalToast:S}=Ht(),[E,_]=F.useState(f),P=x.split("-"),O=()=>{const H=x.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?r(H[pa],H[ga],H[Ta],H[Ea],H[Ia],H[Pa],H[Go],H[Co],E):(H==null?void 0:H.length)>Pa&&(H==null?void 0:H.length)===ql+1&&(E!=null&&E.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?c(H[pa],H[ga],H[Ta],H[Ea],H[Ia],H[5],H[6],H[7],E):(n(p,v,m,A,w,{...E}),setTimeout(()=>{Gt.emit("OnSignatureSettingChange",{})},1e3),setTimeout(()=>{Gt.emit("onUpdateField",{})},1e3)),S({showToast:!0,toastMessage:"Updated",toastDetail:`${T} updated`,toastType:"success"})},k=(H,X,pe)=>{_(ge=>({...ge,[H]:{...ge[H],[X==null?void 0:X.type]:pe}}))},M=(H,X)=>{_(pe=>({...pe,attributes:{...pe.attributes,[H]:X}}))},Y=(H,X)=>{_(pe=>({...pe,[H]:X}))},N=(H,X)=>{_(pe=>({...pe,inlineConditional:{...pe.inlineConditional,[H]:X}}))},z=()=>{},$=()=>{_(H=>({...H,data:[...H.data,{uuid:tt(),dataKey:"",value:""}]}))},le=()=>{_(H=>Object.assign({},H,{options:[...H.options,{uuid:tt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},G=()=>{},R=()=>{},ce=()=>{},q=()=>{},W=H=>{var Ae;const X=[...(E==null?void 0:E.conditionalTabRules.rules)||[]],pe=X.filter((ye,oe)=>H!==oe);_(ye=>({...ye,conditionalTabRules:{...ye.conditionalTabRules,rules:pe}}));const ge=X[H];(Ae=ge==null?void 0:ge.conditions)==null||Ae.map(ye=>{const oe=It.findIndex(s,B=>{var ne;return(B==null?void 0:B.uuid)===((ne=ye==null?void 0:ye.tab)==null?void 0:ne.uuid)}),re=s[oe];re&&(re.isHidden=!1,a(oe,re))})},ee=(H,X)=>{const pe=[...(E==null?void 0:E.conditionalTabRules.rules)||[]];pe[H].conditions=pe[H].conditions.filter((ge,Ae)=>X!==Ae),_(ge=>({...ge,conditionalTabRules:{...ge.conditionalTabRules,rules:pe}}))};return o.jsx(o.Fragment,{children:o.jsxs(Io,{style:{width:"80vw",zIndex:7e3},visible:d,position:"left",className:"p-sidebar-lg",onHide:()=>h(),header:()=>{var H;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[(H=f==null?void 0:f.label)==null?void 0:H.english," "]})})},"aria-label":"Field Setting Sidebar",children:[o.jsx("div",{className:"",children:o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(oo,{activeIndex:0,children:i!=null&&i.length?i.map((H,X)=>o.jsx(so,{tabIndex:X,header:H==null?void 0:H.language,children:o.jsx(wD,{language:H,fieldState:E,onHandleChange:k,...t})},X)):""})})}),(E==null?void 0:E.isValidationTabEnabled)===!0&&o.jsx(wr,{header:"Validation",children:o.jsx(Yte,{fieldState:E,onHandleChangeLayoutSettings:Y,onHandleChangeAttributesSetttings:M,...t})}),o.jsx(wr,{header:"Attributes",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Kte,{fieldState:E,onHandleChangeLayoutSettings:Y,onHandleChangeAttributesSetttings:M})})}),(E==null?void 0:E.isLayoutTabEnabled)===!0&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(ine,{fieldState:E,onHandleChangeLayoutSettings:Y})})}),(E==null?void 0:E.isDynamicListingTabEnabled)===!0&&o.jsx(wr,{header:"Dynamic Options",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Ise,{fieldState:E,setFieldState:_})})}),(E==null?void 0:E.options)!==void 0&&(E==null?void 0:E.data)&&o.jsx(wr,{header:"Data",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(ane,{onHandleChangeLayoutSettings:Y,fieldState:E,setFieldState:_}),o.jsx(Ft,{className:"mr-3",label:"Data Option",icon:"pi pi-plus",onClick:()=>$(),"aria-label":"Add"})]})}),o.jsx(wr,{header:"Table view options",children:o.jsx(Ese,{fieldState:E,onHandleChangeLayoutSettings:Y})}),(E==null?void 0:E.componentType)!=="radio-hierarchal"&&(E==null?void 0:E.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsxs(wr,{header:"Options",children:[(E==null?void 0:E.componentType)!=="radio-hierarchal"&&o.jsx("div",{className:"flex justify-content-end",children:o.jsx(Ft,{className:"mr-3 mb-2",label:"Option",icon:"pi pi-plus",onClick:()=>le(),"aria-label":"Option"})}),o.jsxs("div",{className:"scroll-height-200 px-4",children:[o.jsx(oo,{activeIndex:0,children:i!=null&&i.length?i.map((H,X)=>o.jsx(so,{tabIndex:X,header:H==null?void 0:H.language,children:o.jsx(ON,{enableAbbreviationColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableHyperTextColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableAddNewColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableCopyPaste:(E==null?void 0:E.componentType)!=="radio-hierarchal",isCustomValue:!1,fieldState:E,setFieldState:_,language:H})},X)):""}),(E==null?void 0:E.isHierarchalCondionalTabEnabled)===!0&&o.jsx(E7,{fieldState:E,onHandleChangeLayoutSettings:Y,removeChildrenField:q,addChildrenField:ce,updateChildrenField:R,updateCondtionOption:G})]})]}),(E==null?void 0:E.componentType)==="radio-hierarchal"&&(E==null?void 0:E.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsx(wr,{header:"Hierarchal Options",children:o.jsx(Use,{fieldState:E,setFieldState:_})}),u===Ip&&(E==null?void 0:E.inlineConditionalRules)!==void 0&&!(C!=null&&C.rowIsRepeatable)&&(P==null?void 0:P.length)<Co+1&&o.jsx(wr,{header:"Conditional",children:o.jsx(xse,{handleRemoveConditionalTabRule:W,handleRemoveConditionalTabRuleCondition:ee,onHandleSelectInlineConditionalOption:z,onHandleChangeLayoutSettings:Y,onHandleChangeInlineConditionaltSetttings:N,fieldState:E,setFieldState:_,pageIndex:p,sectionIndex:v,...t})}),!((Q=t==null?void 0:t.row)!=null&&Q.rowIsRepeatable)&&(e==null?void 0:e.enableReviewTask)===!0&&o.jsx(wr,{header:"Admin",children:o.jsx(Tse,{fieldState:E,setFieldState:_})})]})}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[o.jsx(Ft,{text:!0,label:"Close",type:"button",icon:"pi pi-times",onClick:()=>h(),"aria-label":"Close",size:"small",className:"p-button-danger"}),!l&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>O(),"aria-label":"Update"})]})})]})})},ki=t=>{const[e,n]=F.useState(null),{field:r}=t,{userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar();F.useEffect(()=>{var h,p;if(i!==null&&e===null){let v=0;r!=null&&r.rowIsRepeatable?v=i.findIndex(m=>(m==null?void 0:m.rowId)===(r==null?void 0:r.uuid)):v=i.findIndex(m=>(m==null?void 0:m.fieldId)===(r==null?void 0:r.uuid)),n((h=i[v])!=null&&h.reviewerChecklist?(p=i[v])==null?void 0:p.reviewerChecklist:[])}return()=>{}},[r==null?void 0:r.rowIsRepeatable,r==null?void 0:r.uuid,e,i]);const s=h=>{const p=i.findIndex(m=>(m==null?void 0:m.fieldId)===(r==null?void 0:r.uuid)),v=[...i];v[p]={...v[p],reviewerChecklist:h},a(v)},l=(h,p)=>{const v=e;v[p]={...v[p],agree:h==null?void 0:h.value},n([...v]),s(v)},c=(h,p)=>{const v=e;if(p!=null&&p.checked)v[h].selectAction.push(p==null?void 0:p.value);else{const m=v[h].selectAction.findIndex(A=>A===(p==null?void 0:p.value));v[h].selectAction.splice(m,1)}n([...v]),s(v)},u=(h,p)=>{const v=e;h!=null&&h.checked?v[p]={...v[p],other:{...v[p].other,isOther:!0}}:v[p]={...v[p],other:{...v[p].other,isOther:!1}},n([...v]),s(v)},d=(h,p)=>{var m;const v=e;v[p]={...v[p],other:{...v[p].other,description:(m=h==null?void 0:h.target)==null?void 0:m.value}},n([...v]),s(v)},f=(h,p,v)=>{var A;const m=e;m[v]={...m[v],[p]:(A=h==null?void 0:h.target)==null?void 0:A.value},n([...m]),s(m)};return o.jsx(o.Fragment,{children:e!==null&&(e==null?void 0:e.length)>0?o.jsx("div",{className:"col-12",children:o.jsx(rs,{children:o.jsx(wr,{header:"Admin Review",children:o.jsx("div",{className:"grid",children:e==null?void 0:e.map((h,p)=>{var v,m,A,w,x;return o.jsx("div",{className:"col-4 p-fluid p-3",children:o.jsxs("div",{className:"card",children:[o.jsx("h6",{className:"mb-2",children:h==null?void 0:h.checklist}),o.jsx("br",{}),o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:`yes-${p}`,name:"action",value:!0,onChange:C=>{l(C,p)},checked:(h==null?void 0:h.agree)===!0}),o.jsx("label",{htmlFor:`yes-${p}`,children:"Yes"})]}),o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:`no-${p}`,name:"action",value:!1,onChange:C=>{l(C,p)},checked:(h==null?void 0:h.agree)===!1}),o.jsx("label",{htmlFor:`no-${p}`,children:"No"})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"px-5 mb-3",children:[(h==null?void 0:h.action)&&Array.isArray(h.action)&&((v=h==null?void 0:h.action)==null?void 0:v.length)>0&&((m=h==null?void 0:h.action)==null?void 0:m.map((C,T)=>{var S;return o.jsxs("div",{children:[o.jsx(Yr,{value:C,checked:((S=h==null?void 0:h.selectAction)==null?void 0:S.length)>0?h==null?void 0:h.selectAction.some(E=>E===C):!1,onChange:E=>{c(p,E)}})," ",C," ",o.jsx("br",{}),o.jsx("br",{})]},`action-${p}-${T}`)})),o.jsx(Yr,{checked:(A=h==null?void 0:h.other)==null?void 0:A.isOther,onChange:C=>{u(C,p)}})," Other ",o.jsx("br",{}),o.jsx("br",{}),((w=h==null?void 0:h.other)==null?void 0:w.isOther)===!0&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"If other please specify the action point"}),o.jsx("br",{}),o.jsx(lo,{className:"mt-3",value:(x=h==null?void 0:h.other)==null?void 0:x.description,onChange:C=>d(C,p)})]})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Feedback "}),o.jsx("br",{}),o.jsx(lo,{className:"mt-3",value:h==null?void 0:h.reviewerFeedback,onChange:C=>f(C,"reviewerFeedback",p)})]}),o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Comments / Notes (internal use only)"}),o.jsx("br",{}),o.jsx(lo,{className:"mt-3",value:h==null?void 0:h.reviewerComments,onChange:C=>f(C,"reviewerComments",p)})]})]})},`checklistIndex-${p}`)})})})})}):o.jsx(o.Fragment,{})})},xi=t=>{const{isPreview:e,field:n,isAdmin:r,fieldWrap:i}=t,{userSelectedLanguage:a}=sn(),{globalAlignment:s}=Ht(),l=p=>{const v=p.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${p.className} justify-content-start`,A=`${p.titleClassName} pl-1`;return o.jsxs("div",{className:m,children:[o.jsxs("button",{className:p.togglerClassName,onClick:p.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:d})]})},{TASK_PUBLISHED:c,task_status:u}=Ar(),[d,f]=F.useState("");F.useEffect(()=>{var p;f((p=n==null?void 0:n.label)==null?void 0:p[a==null?void 0:a.type])},[n,a==null?void 0:a.type]);const h=()=>{let p="";return e||(p=p+" field-form-builder"),u===c&&r===!0&&(p=p+" card"),p};return o.jsx(o.Fragment,{children:o.jsx("div",{dir:s,className:h(),children:u===c&&r===!0?o.jsx(ci,{headerTemplate:l,toggleable:!0,children:i}):i})})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:BN,setPrototypeOf:VN,isFrozen:$se,getPrototypeOf:jse,getOwnPropertyDescriptor:zse}=Object;let{freeze:_o,seal:Hl,create:qN}=Object,{apply:N7,construct:O7}=typeof Reflect<"u"&&Reflect;_o||(_o=function(e){return e}),Hl||(Hl=function(e){return e}),N7||(N7=function(e,n,r){return e.apply(n,r)}),O7||(O7=function(e,n){return new e(...n)});const M3=bl(Array.prototype.forEach),UN=bl(Array.prototype.pop),t2=bl(Array.prototype.push),L3=bl(String.prototype.toLowerCase),F7=bl(String.prototype.toString),$N=bl(String.prototype.match),n2=bl(String.prototype.replace),Hse=bl(String.prototype.indexOf),Yse=bl(String.prototype.trim),Ec=bl(Object.prototype.hasOwnProperty),Do=bl(RegExp.prototype.test),r2=Kse(TypeError);function bl(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N7(t,e,r)}}function Kse(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return O7(t,n)}}function hi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:L3;VN&&VN(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const a=n(i);a!==i&&($se(e)||(e[r]=a),i=a)}t[i]=!0}return t}function Xse(t){for(let e=0;e<t.length;e++)Ec(t,e)||(t[e]=null);return t}function e1(t){const e=qN(null);for(const[n,r]of BN(t))Ec(t,n)&&(Array.isArray(r)?e[n]=Xse(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=e1(r):e[n]=r);return e}function i2(t,e){for(;t!==null;){const r=zse(t,e);if(r){if(r.get)return bl(r.get);if(typeof r.value=="function")return bl(r.value)}t=jse(t)}function n(){return null}return n}const jN=_o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k7=_o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P7=_o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Rse=_o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M7=_o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Gse=_o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zN=_o(["#text"]),HN=_o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L7=_o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),YN=_o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B3=_o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wse=Hl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qse=Hl(/<%[\w\W]*|[\w\W]*%>/gm),Jse=Hl(/\${[\w\W]*}/gm),Zse=Hl(/^data-[\-\w.\u00B7-\uFFFF]/),eoe=Hl(/^aria-[\-\w]+$/),KN=Hl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),toe=Hl(/^(?:\w+script|data):/i),noe=Hl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),XN=Hl(/^html$/i),roe=Hl(/^[a-z][.\w]*(-[.\w]+)+$/i);var RN=Object.freeze({__proto__:null,MUSTACHE_EXPR:Wse,ERB_EXPR:Qse,TMPLIT_EXPR:Jse,DATA_ATTR:Zse,ARIA_ATTR:eoe,IS_ALLOWED_URI:KN,IS_SCRIPT_OR_DATA:toe,ATTR_WHITESPACE:noe,DOCTYPE_NAME:XN,CUSTOM_ELEMENT:roe});const a2={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ioe=function(){return typeof window>"u"?null:window},aoe=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function GN(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ioe();const e=Et=>GN(Et);if(e.version="3.1.7",e.removed=[],!t||!t.document||t.document.nodeType!==a2.document)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:p}=t,v=c.prototype,m=i2(v,"cloneNode"),A=i2(v,"remove"),w=i2(v,"nextSibling"),x=i2(v,"childNodes"),C=i2(v,"parentNode");if(typeof s=="function"){const Et=n.createElement("template");Et.content&&Et.content.ownerDocument&&(n=Et.content.ownerDocument)}let T,S="";const{implementation:E,createNodeIterator:_,createDocumentFragment:P,getElementsByTagName:O}=n,{importNode:k}=r;let M={};e.isSupported=typeof BN=="function"&&typeof C=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Y,ERB_EXPR:N,TMPLIT_EXPR:z,DATA_ATTR:$,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:ce}=RN;let{IS_ALLOWED_URI:q}=RN,W=null;const ee=hi({},[...jN,...k7,...P7,...M7,...zN]);let Q=null;const H=hi({},[...HN,...L7,...YN,...B3]);let X=Object.seal(qN(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,ge=null,Ae=!0,ye=!0,oe=!1,re=!0,B=!1,ne=!0,se=!1,me=!1,Ne=!1,we=!1,ve=!1,ue=!1,Te=!0,_e=!1;const K="user-content-";let Ee=!0,be=!1,he={},fe=null;const xe=hi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Me=null;const Be=hi({},["audio","video","img","source","image","track"]);let Je=null;const st=hi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ut="http://www.w3.org/1998/Math/MathML",St="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let pn=zt,Lt=!1,mn=null;const Rn=hi({},[ut,St,zt],F7);let xt=null;const ze=["application/xhtml+xml","text/html"],He="text/html";let at=null,rn=null;const nn=n.createElement("form"),Jt=function(Fe){return Fe instanceof RegExp||Fe instanceof Function},In=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rn&&rn===Fe)){if((!Fe||typeof Fe!="object")&&(Fe={}),Fe=e1(Fe),xt=ze.indexOf(Fe.PARSER_MEDIA_TYPE)===-1?He:Fe.PARSER_MEDIA_TYPE,at=xt==="application/xhtml+xml"?F7:L3,W=Ec(Fe,"ALLOWED_TAGS")?hi({},Fe.ALLOWED_TAGS,at):ee,Q=Ec(Fe,"ALLOWED_ATTR")?hi({},Fe.ALLOWED_ATTR,at):H,mn=Ec(Fe,"ALLOWED_NAMESPACES")?hi({},Fe.ALLOWED_NAMESPACES,F7):Rn,Je=Ec(Fe,"ADD_URI_SAFE_ATTR")?hi(e1(st),Fe.ADD_URI_SAFE_ATTR,at):st,Me=Ec(Fe,"ADD_DATA_URI_TAGS")?hi(e1(Be),Fe.ADD_DATA_URI_TAGS,at):Be,fe=Ec(Fe,"FORBID_CONTENTS")?hi({},Fe.FORBID_CONTENTS,at):xe,pe=Ec(Fe,"FORBID_TAGS")?hi({},Fe.FORBID_TAGS,at):{},ge=Ec(Fe,"FORBID_ATTR")?hi({},Fe.FORBID_ATTR,at):{},he=Ec(Fe,"USE_PROFILES")?Fe.USE_PROFILES:!1,Ae=Fe.ALLOW_ARIA_ATTR!==!1,ye=Fe.ALLOW_DATA_ATTR!==!1,oe=Fe.ALLOW_UNKNOWN_PROTOCOLS||!1,re=Fe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=Fe.SAFE_FOR_TEMPLATES||!1,ne=Fe.SAFE_FOR_XML!==!1,se=Fe.WHOLE_DOCUMENT||!1,we=Fe.RETURN_DOM||!1,ve=Fe.RETURN_DOM_FRAGMENT||!1,ue=Fe.RETURN_TRUSTED_TYPE||!1,Ne=Fe.FORCE_BODY||!1,Te=Fe.SANITIZE_DOM!==!1,_e=Fe.SANITIZE_NAMED_PROPS||!1,Ee=Fe.KEEP_CONTENT!==!1,be=Fe.IN_PLACE||!1,q=Fe.ALLOWED_URI_REGEXP||KN,pn=Fe.NAMESPACE||zt,X=Fe.CUSTOM_ELEMENT_HANDLING||{},Fe.CUSTOM_ELEMENT_HANDLING&&Jt(Fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=Fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Fe.CUSTOM_ELEMENT_HANDLING&&Jt(Fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=Fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Fe.CUSTOM_ELEMENT_HANDLING&&typeof Fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=Fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),B&&(ye=!1),ve&&(we=!0),he&&(W=hi({},zN),Q=[],he.html===!0&&(hi(W,jN),hi(Q,HN)),he.svg===!0&&(hi(W,k7),hi(Q,L7),hi(Q,B3)),he.svgFilters===!0&&(hi(W,P7),hi(Q,L7),hi(Q,B3)),he.mathMl===!0&&(hi(W,M7),hi(Q,YN),hi(Q,B3))),Fe.ADD_TAGS&&(W===ee&&(W=e1(W)),hi(W,Fe.ADD_TAGS,at)),Fe.ADD_ATTR&&(Q===H&&(Q=e1(Q)),hi(Q,Fe.ADD_ATTR,at)),Fe.ADD_URI_SAFE_ATTR&&hi(Je,Fe.ADD_URI_SAFE_ATTR,at),Fe.FORBID_CONTENTS&&(fe===xe&&(fe=e1(fe)),hi(fe,Fe.FORBID_CONTENTS,at)),Ee&&(W["#text"]=!0),se&&hi(W,["html","head","body"]),W.table&&(hi(W,["tbody"]),delete pe.tbody),Fe.TRUSTED_TYPES_POLICY){if(typeof Fe.TRUSTED_TYPES_POLICY.createHTML!="function")throw r2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Fe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw r2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=Fe.TRUSTED_TYPES_POLICY,S=T.createHTML("")}else T===void 0&&(T=aoe(p,i)),T!==null&&typeof S=="string"&&(S=T.createHTML(""));_o&&_o(Fe),rn=Fe}},yt=hi({},["mi","mo","mn","ms","mtext"]),Ue=hi({},["annotation-xml"]),it=hi({},["title","style","font","a","script"]),Dt=hi({},[...k7,...P7,...Rse]),qt=hi({},[...M7,...Gse]),kn=function(Fe){let We=C(Fe);(!We||!We.tagName)&&(We={namespaceURI:pn,tagName:"template"});const bt=L3(Fe.tagName),$t=L3(We.tagName);return mn[Fe.namespaceURI]?Fe.namespaceURI===St?We.namespaceURI===zt?bt==="svg":We.namespaceURI===ut?bt==="svg"&&($t==="annotation-xml"||yt[$t]):!!Dt[bt]:Fe.namespaceURI===ut?We.namespaceURI===zt?bt==="math":We.namespaceURI===St?bt==="math"&&Ue[$t]:!!qt[bt]:Fe.namespaceURI===zt?We.namespaceURI===St&&!Ue[$t]||We.namespaceURI===ut&&!yt[$t]?!1:!qt[bt]&&(it[bt]||!Dt[bt]):!!(xt==="application/xhtml+xml"&&mn[Fe.namespaceURI]):!1},Gn=function(Fe){t2(e.removed,{element:Fe});try{C(Fe).removeChild(Fe)}catch{A(Fe)}},lr=function(Fe,We){try{t2(e.removed,{attribute:We.getAttributeNode(Fe),from:We})}catch{t2(e.removed,{attribute:null,from:We})}if(We.removeAttribute(Fe),Fe==="is"&&!Q[Fe])if(we||ve)try{Gn(We)}catch{}else try{We.setAttribute(Fe,"")}catch{}},Wn=function(Fe){let We=null,bt=null;if(Ne)Fe="<remove></remove>"+Fe;else{const Zt=$N(Fe,/^[\r\n\t ]+/);bt=Zt&&Zt[0]}xt==="application/xhtml+xml"&&pn===zt&&(Fe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Fe+"</body></html>");const $t=T?T.createHTML(Fe):Fe;if(pn===zt)try{We=new h().parseFromString($t,xt)}catch{}if(!We||!We.documentElement){We=E.createDocument(pn,"template",null);try{We.documentElement.innerHTML=Lt?S:$t}catch{}}const Xt=We.body||We.documentElement;return Fe&&bt&&Xt.insertBefore(n.createTextNode(bt),Xt.childNodes[0]||null),pn===zt?O.call(We,se?"html":"body")[0]:se?We.documentElement:Xt},vr=function(Fe){return _.call(Fe.ownerDocument||Fe,Fe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Nr=function(Fe){return Fe instanceof f&&(typeof Fe.nodeName!="string"||typeof Fe.textContent!="string"||typeof Fe.removeChild!="function"||!(Fe.attributes instanceof d)||typeof Fe.removeAttribute!="function"||typeof Fe.setAttribute!="function"||typeof Fe.namespaceURI!="string"||typeof Fe.insertBefore!="function"||typeof Fe.hasChildNodes!="function")},yn=function(Fe){return typeof l=="function"&&Fe instanceof l},ot=function(Fe,We,bt){M[Fe]&&M3(M[Fe],$t=>{$t.call(e,We,bt,rn)})},ct=function(Fe){let We=null;if(ot("beforeSanitizeElements",Fe,null),Nr(Fe))return Gn(Fe),!0;const bt=at(Fe.nodeName);if(ot("uponSanitizeElement",Fe,{tagName:bt,allowedTags:W}),Fe.hasChildNodes()&&!yn(Fe.firstElementChild)&&Do(/<[/\w]/g,Fe.innerHTML)&&Do(/<[/\w]/g,Fe.textContent)||Fe.nodeType===a2.progressingInstruction||ne&&Fe.nodeType===a2.comment&&Do(/<[/\w]/g,Fe.data))return Gn(Fe),!0;if(!W[bt]||pe[bt]){if(!pe[bt]&&Nt(bt)&&(X.tagNameCheck instanceof RegExp&&Do(X.tagNameCheck,bt)||X.tagNameCheck instanceof Function&&X.tagNameCheck(bt)))return!1;if(Ee&&!fe[bt]){const $t=C(Fe)||Fe.parentNode,Xt=x(Fe)||Fe.childNodes;if(Xt&&$t){const Zt=Xt.length;for(let Sn=Zt-1;Sn>=0;--Sn){const Pn=m(Xt[Sn],!0);Pn.__removalCount=(Fe.__removalCount||0)+1,$t.insertBefore(Pn,w(Fe))}}}return Gn(Fe),!0}return Fe instanceof c&&!kn(Fe)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&Do(/<\/no(script|embed|frames)/i,Fe.innerHTML)?(Gn(Fe),!0):(B&&Fe.nodeType===a2.text&&(We=Fe.textContent,M3([Y,N,z],$t=>{We=n2(We,$t," ")}),Fe.textContent!==We&&(t2(e.removed,{element:Fe.cloneNode()}),Fe.textContent=We)),ot("afterSanitizeElements",Fe,null),!1)},vt=function(Fe,We,bt){if(Te&&(We==="id"||We==="name")&&(bt in n||bt in nn))return!1;if(!(ye&&!ge[We]&&Do($,We))){if(!(Ae&&Do(le,We))){if(!Q[We]||ge[We]){if(!(Nt(Fe)&&(X.tagNameCheck instanceof RegExp&&Do(X.tagNameCheck,Fe)||X.tagNameCheck instanceof Function&&X.tagNameCheck(Fe))&&(X.attributeNameCheck instanceof RegExp&&Do(X.attributeNameCheck,We)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(We))||We==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&Do(X.tagNameCheck,bt)||X.tagNameCheck instanceof Function&&X.tagNameCheck(bt))))return!1}else if(!Je[We]){if(!Do(q,n2(bt,R,""))){if(!((We==="src"||We==="xlink:href"||We==="href")&&Fe!=="script"&&Hse(bt,"data:")===0&&Me[Fe])){if(!(oe&&!Do(G,n2(bt,R,"")))){if(bt)return!1}}}}}}return!0},Nt=function(Fe){return Fe!=="annotation-xml"&&$N(Fe,ce)},An=function(Fe){ot("beforeSanitizeAttributes",Fe,null);const{attributes:We}=Fe;if(!We)return;const bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q};let $t=We.length;for(;$t--;){const Xt=We[$t],{name:Zt,namespaceURI:Sn,value:Pn}=Xt,$n=at(Zt);let rt=Zt==="value"?Pn:Yse(Pn);if(bt.attrName=$n,bt.attrValue=rt,bt.keepAttr=!0,bt.forceKeepAttr=void 0,ot("uponSanitizeAttribute",Fe,bt),rt=bt.attrValue,bt.forceKeepAttr||(lr(Zt,Fe),!bt.keepAttr))continue;if(!re&&Do(/\/>/i,rt)){lr(Zt,Fe);continue}B&&M3([Y,N,z],Pe=>{rt=n2(rt,Pe," ")});const ae=at(Fe.nodeName);if(vt(ae,$n,rt)){if(_e&&($n==="id"||$n==="name")&&(lr(Zt,Fe),rt=K+rt),ne&&Do(/((--!?|])>)|<\/(style|title)/i,rt)){lr(Zt,Fe);continue}if(T&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Sn)switch(p.getAttributeType(ae,$n)){case"TrustedHTML":{rt=T.createHTML(rt);break}case"TrustedScriptURL":{rt=T.createScriptURL(rt);break}}try{Sn?Fe.setAttributeNS(Sn,Zt,rt):Fe.setAttribute(Zt,rt),Nr(Fe)?Gn(Fe):UN(e.removed)}catch{}}}ot("afterSanitizeAttributes",Fe,null)},Dn=function Et(Fe){let We=null;const bt=vr(Fe);for(ot("beforeSanitizeShadowDOM",Fe,null);We=bt.nextNode();)ot("uponSanitizeShadowNode",We,null),!ct(We)&&(We.content instanceof a&&Et(We.content),An(We));ot("afterSanitizeShadowDOM",Fe,null)};return e.sanitize=function(Et){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},We=null,bt=null,$t=null,Xt=null;if(Lt=!Et,Lt&&(Et="<!-->"),typeof Et!="string"&&!yn(Et))if(typeof Et.toString=="function"){if(Et=Et.toString(),typeof Et!="string")throw r2("dirty is not a string, aborting")}else throw r2("toString is not a function");if(!e.isSupported)return Et;if(me||In(Fe),e.removed=[],typeof Et=="string"&&(be=!1),be){if(Et.nodeName){const Pn=at(Et.nodeName);if(!W[Pn]||pe[Pn])throw r2("root node is forbidden and cannot be sanitized in-place")}}else if(Et instanceof l)We=Wn("<!---->"),bt=We.ownerDocument.importNode(Et,!0),bt.nodeType===a2.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?We=bt:We.appendChild(bt);else{if(!we&&!B&&!se&&Et.indexOf("<")===-1)return T&&ue?T.createHTML(Et):Et;if(We=Wn(Et),!We)return we?null:ue?S:""}We&&Ne&&Gn(We.firstChild);const Zt=vr(be?Et:We);for(;$t=Zt.nextNode();)ct($t)||($t.content instanceof a&&Dn($t.content),An($t));if(be)return Et;if(we){if(ve)for(Xt=P.call(We.ownerDocument);We.firstChild;)Xt.appendChild(We.firstChild);else Xt=We;return(Q.shadowroot||Q.shadowrootmode)&&(Xt=k.call(r,Xt,!0)),Xt}let Sn=se?We.outerHTML:We.innerHTML;return se&&W["!doctype"]&&We.ownerDocument&&We.ownerDocument.doctype&&We.ownerDocument.doctype.name&&Do(XN,We.ownerDocument.doctype.name)&&(Sn="<!DOCTYPE "+We.ownerDocument.doctype.name+`>
|
|
2309
|
-
`+Sn),B&&M3([Y,N,z],Pn=>{Sn=n2(Sn,Pn," ")}),T&&ue?T.createHTML(Sn):Sn},e.setConfig=function(){let Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};In(Et),me=!0},e.clearConfig=function(){rn=null,me=!1},e.isValidAttribute=function(Et,Fe,We){rn||In({});const bt=at(Et),$t=at(Fe);return vt(bt,$t,We)},e.addHook=function(Et,Fe){typeof Fe=="function"&&(M[Et]=M[Et]||[],t2(M[Et],Fe))},e.removeHook=function(Et){if(M[Et])return UN(M[Et])},e.removeHooks=function(Et){M[Et]&&(M[Et]=[])},e.removeAllHooks=function(){M={}},e}var V3=GN();const oa=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=F.useState(e);F.useEffect(()=>{var C;return A((C=e==null?void 0:e.label)==null?void 0:C[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:p}=sn(),v=(C,T,S)=>{u(E=>({...E,[C]:{...E[C],[T==null?void 0:T.type]:S}}))},[m,A]=F.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);F.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(C[pa],C[ga],C[Ta],C[Ea],C[Ia],C[Pa],C[Go],C[Co],c):(C==null?void 0:C.length)>Pa&&(C==null?void 0:C.length)===ql+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?p(C[pa],C[ga],C[Ta],C[Ea],C[Ia],C[5],C[6],C[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(P3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:m,disabled:!1,onChange:C=>{var T;A(V3.sanitize((T=C==null?void 0:C.target)==null?void 0:T.value))},onBlur:C=>{var S;const T=V3.sanitize((S=C==null?void 0:C.target)==null?void 0:S.innerText);A(T),v("label",d,T)},tagName:"article"})})},t1=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(jp,{checked:l,onLabel:e,onChange:c=>{a(s,c.value)},offLabel:n,onIcon:r,offIcon:i,className:"mr-1 px-1",style:{fontSize:"0.8rem"}})})},Wr=t=>{var le,G,R,ce;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,type:l,path:c,handleFieldSettingsSidebar:u,showFieldIcons:d=!0,showSettingsIcon:f=!0}=t,{emitSocketData:h,renderType:p}=Ht(),v=(q,W)=>{M(ee=>({...ee,[q]:W}))},{fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:A,cloneField:w,gridComponentFieldSettingUpdate:x,fieldSettingDeleteInlineConditional:C,gridComponentFieldDelete:T,removeField:S}=sn(),{updateGlobalToast:E}=Ht(),_=q=>{const W=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?A(W[pa],W[ga],W[Ta],W[Ea],W[Ia],W[Pa],W[Go],W[Co],q):(W==null?void 0:W.length)>Pa&&(W==null?void 0:W.length)===ql+1&&(q!=null&&q.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?x(W[pa],W[ga],W[Ta],W[Ea],W[Ia],W[5],W[6],W[7],q):m(s,i,a,r,n,q),E({showToast:!0,toastMessage:"Updated",toastDetail:"Field updated",toastType:"success"})},[P,O]=F.useState(!1),[k,M]=F.useState({custom_component_title:"",custom_component_description:""}),Y=()=>{M(q=>({...q,custom_component_schema:e})),O(!0)},N=()=>{const q=c.split("-").map(Number);l==="inline-conditional"?C(q[pa],q[ga],q[Ta],q[Ea],q[Ia],q[Pa],q[Go],q[Co]):(q==null?void 0:q.length)>Pa&&(q==null?void 0:q.length)===ql+1&&(e!=null&&e.componentType)&&l==="grid"?T(q[pa],q[ga],q[Ta],q[Ea],q[Ia],q[5],q[6],q[7]):S(s,i,a,r,n)},z=(q,W)=>{const ee={...e,attributes:{...e.attributes,[q]:W}};_(ee)},$=(q,W)=>{const ee={...e,[q]:W};_(ee)};return o.jsx(o.Fragment,{children:o.jsxs("div",{className:`${(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question","builder-element-quick-options mb-2 w-3 justify-content-center"} flex quick-setting`,children:[o.jsx(o.Fragment,{children:(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question"&&d===!1&&o.jsxs("div",{className:" ",children:[o.jsx(t1,{field:e,onHandleChangeSetttings:z,settingsKey:"required",settingsKeyValue:(le=e==null?void 0:e.attributes)==null?void 0:le.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(G=e==null?void 0:e.attributes)==null?void 0:G.required}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showToolTip",settingsKeyValue:e==null?void 0:e.showToolTip,onLabel:"Tooltip",offLabel:"Tooltip",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showToolTip}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showHelperText",settingsKeyValue:e==null?void 0:e.showHelperText,onLabel:"Helper text",offLabel:"Helper text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHelperText}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showHeaderText",settingsKeyValue:e==null?void 0:e.showHeaderText,onLabel:"Header text",offLabel:"Header text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHeaderText}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"isFluid",settingsKeyValue:e==null?void 0:e.isFluid,onLabel:"Fluid",offLabel:"Fluid",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.isFluid}),(e==null?void 0:e.componentType)=="radio"&&o.jsxs(o.Fragment,{children:[o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showAlphabetList",settingsKeyValue:e==null?void 0:e.showAlphabetList,onLabel:"Alpha",offLabel:"Alpha",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showAlphabetList}),o.jsx(t1,{field:e,onHandleChangeSetttings:z,settingsKey:"style",settingsKeyValue:(R=e==null?void 0:e.attributes)==null?void 0:R.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(ce=e==null?void 0:e.attributes)==null?void 0:ce.style})]})]})}),o.jsxs("div",{className:"quick-setting",children:[f===!0&&o.jsxs("span",{className:"p-buttonset",children:[(e==null?void 0:e.componentType)!=="hr"&&o.jsx(Ft,{text:!0,size:"small",tooltip:"Advanced settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Ft,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{w(e,s,i,a,r,n),h()},tooltip:"Clone"}),o.jsx(Ft,{text:!0,className:"p-button-danger",size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{N()},tooltip:"Delete"}),(p===Ip||p===M0)&&o.jsx(Ft,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",tooltip:"Save as custom component",onClick:()=>{Y()}})]}),o.jsxs(Ks,{header:"Custom component save",visible:P,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Ft,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>O(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Ft,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{O(!1)},autoFocus:!0})]})}),onHide:()=>O(!1),children:[o.jsxs("span",{className:"p-float-label",children:[o.jsx(wn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(k==null?void 0:k.custom_component_title)||"",onChange:q=>{var W;return v("custom_component_title",(W=q==null?void 0:q.target)==null?void 0:W.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(lo,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(k==null?void 0:k.custom_component_description)||"",onChange:q=>{var W;return v("custom_component_description",(W=q==null?void 0:q.target)==null?void 0:W.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},soe=t=>{var ee,Q,H,X,pe,ge,Ae,ye;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{taskRegisterData:p,updateTaskRegisterData:v,updateTaskProgressValue:m,updateUserFormDataSubmit:A,userTaskSubmitFormData:w}=Ar(),[x,C]=F.useState(!1),[T,S]=F.useState(!1),[E,_]=F.useState(null),[P,O]=F.useState(0),[k,M]=F.useState(!1),Y=()=>{M(!0)},N=()=>{M(!1)},z=oe=>{C(oe)},$=()=>{C(!1)},le=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(r==null?void 0:r.uuid)});se>=0&&ne[se].fieldData?_(ne[se].fieldData):(r.isValid=0,_(null))}}else{const ne=w,se=It.cloneDeep(p);if(ne!=null&&ne.length){for(const me of ne)if(me.fieldId===t.field.uuid&&((oe=me==null?void 0:me.postData)!=null&&oe.length)){_((re=me==null?void 0:me.postData[0])==null?void 0:re.postValue),se[r==null?void 0:r.uuid]=(B=me==null?void 0:me.postData[0])==null?void 0:B.postValue;const Ne=Object.keys(se).length;m(Ne);break}}}S(!0)},G=oe=>{var se;_(oe.target.value);const re=w,B=It.cloneDeep(p);if((se=oe==null?void 0:oe.target)!=null&&se.value&&(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(B[r==null?void 0:r.uuid]=oe==null?void 0:oe.value,me.postData[0]={postValue:oe.value});else delete B[r==null?void 0:r.uuid];v(B);const ne=Object.keys(B).length;m(ne)};F.useEffect(()=>{T||le();const oe=Gt.addListener("clearRepeatableFields",ne=>{ne===(a==null?void 0:a.uuid)&&(_(null),O(0),r.isValid=0,h(e,n,s,l,i,r))}),re=Gt.addListener("onSubmitUserForm",()=>{var ne;(ne=r==null?void 0:r.attributes)!=null&&ne.required?E!==null||E!==void 0?r.isValid=1:(console.log("Countr field in valid ",E),r.isValid=0):r.isValid=1}),B=Gt.addListener("OnInvalidFieldCatch",ne=>{console.log("OnInvalidFieldCatch listener"),console.log("field.uuid === value?.fieldId",r.uuid===(ne==null?void 0:ne.fieldId)),r.uuid===(ne==null?void 0:ne.fieldId)?O(1):O(0)});return()=>{re.remove(),B.remove(),oe.remove()}});const R=(oe,re)=>{var B;if(w){const ne=[...w],se=It.findIndex(ne,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let me=(B=w[se])==null?void 0:B.repeatableFields;me={...me,[oe==null?void 0:oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},A(ne)}_(re),re!==null?oe.isValid=1:oe.isValid=0},ce=(oe,re)=>oe?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:oe.name,src:oe==null?void 0:oe.image,onError:B=>B.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:oe.name})]}):o.jsx("span",{children:re.placeholder}),q=oe=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:oe.name,src:oe==null?void 0:oe.image,onError:re=>re.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:oe.name})]}),W=o.jsxs("div",{onMouseOver:Y,onMouseOut:N,children:[d&&k&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(ee=r==null?void 0:r.headerText)==null?void 0:ee[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=r==null?void 0:r.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(H=r==null?void 0:r.label)==null?void 0:H[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(X=r==null?void 0:r.toolTip)==null?void 0:X[f==null?void 0:f.type],position:"right"})})]}),o.jsx(La,{className:"country-select-builder-component",onFocus:()=>O(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?R(r,oe.target.value):G(oe)},options:r==null?void 0:r.countries,optionLabel:"name",value:E,placeholder:(pe=r==null?void 0:r.placeholder)==null?void 0:pe[f==null?void 0:f.type],disabled:c,valueTemplate:ce,itemTemplate:q,filter:!0,filterBy:"name",showClear:!0}),((ge=r==null?void 0:r.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:P===1&&E===null?((Ae=r==null?void 0:r.validationMesssage)==null?void 0:Ae[f==null?void 0:f.type])||"field is required":""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:$,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:W})]})},ooe=t=>{var ee,Q,H,X,pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v,isDisabled:m}=t,{isAdmin:A,isBuilderMode:w}=Ht(),[x,C]=F.useState(!1),[T,S]=F.useState(""),[E,_]=F.useState(null),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),z=()=>{N(!0)},$=()=>{N(!1)},le=()=>{var we,ve,ue;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const Te=[...h.repeatableFields],_e=It.findIndex(Te,function(K){return K.uuid===(c==null?void 0:c.uuid)});_e>=0&&Te[_e].fieldData?S(Te[_e].fieldData):S("")}}else{const Te=a;if(Te!=null&&Te.length){for(const _e of Te)if(_e.fieldId===t.field.uuid&&((we=_e==null?void 0:_e.postData[0])==null?void 0:we.postValue)!==""&&((ve=_e==null?void 0:_e.postData[0])!=null&&ve.postValue)){S((ue=_e==null?void 0:_e.postData[0])==null?void 0:ue.postValue);break}}}M(!0)};F.useEffect(()=>{k||le();const we=Gt.addListener("clearRepeatableFields",K=>{K===(h==null?void 0:h.uuid)&&(S(""),O(0),c.isValid=0,l(f,d,p,v,u,c))}),ve=Gt.addListener("onSubmitUserForm",()=>{var K,Ee;(K=c==null?void 0:c.attributes)!=null&&K.required?T&&T.length&&(T==null?void 0:T.length)<((Ee=c==null?void 0:c.attributes)==null?void 0:Ee.minLength)?c.isValid=1:c.isValid=0:c.isValid=1}),ue=Gt.addListener("OnInvalidFieldCatch",K=>{c.uuid===(K==null?void 0:K.fieldId)?O(1):O(0)}),Te=Gt.addListener("OnGetFieldValue",K=>{var be;const Ee=(be=K==null?void 0:K.repeatableColumn)==null?void 0:be.filter(he=>(he==null?void 0:he.fieldUuid)===(c==null?void 0:c.uuid));Ee!=null&&Ee.length}),_e=Gt.addListener("formFieldAdded",K=>{E===null&&_(K==null?void 0:K.uuid)});return()=>{ve.remove(),ue.remove(),Te.remove(),we.remove(),_e.remove()}}),F.useEffect(()=>(E!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[E]);const G=we=>{C(we)},R=()=>{C(!1)},ce=we=>{var Te,_e;S(we.target.value);const ve=a,ue=It.cloneDeep(e);if(ve!==null){if((Te=we==null?void 0:we.target)!=null&&Te.value){if(ue[c==null?void 0:c.uuid]=(_e=we==null?void 0:we.target)==null?void 0:_e.value,(ve==null?void 0:ve.length)>0)for(const K of ve)K.fieldId===t.field.uuid&&(K.postData[0]={postValue:we.target.value})}else if(delete ue[c==null?void 0:c.uuid],(ve==null?void 0:ve.length)>0)for(const K of ve)K.fieldId===t.field.uuid&&(K.postData[0]={postValue:""})}if(console.log("row?.rowIsRepeatable",h==null?void 0:h.rowIsRepeatable),!(h!=null&&h.rowIsRepeatable)){n(ue);const K=Object.keys(ue).length;r(K)}},q=(we,ve)=>{var ue;if(a){const Te=[...a],_e=It.findIndex(Te,function(Ee){return Ee.rowId===(h==null?void 0:h.uuid)});let K=(ue=a[_e])==null?void 0:ue.repeatableFields;K={...K,[we==null?void 0:we.uuid]:ve},Te[_e]={...Te[_e],repeatableFields:K},i(Te)}S(ve),ve!==""?we.isValid=1:we.isValid=0},W=o.jsxs("div",{onMouseOver:z,onMouseOut:$,children:[w&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${w&&" py-3 px-4 builder-element-wrapper "} ${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:A?"col-6 ":"col-12 p-fluid",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ee=c==null?void 0:c.headerText)==null?void 0:ee[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:c==null?void 0:c.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",w===!1?o.jsx(o.Fragment,{children:(H=c==null?void 0:c.label)==null?void 0:H[s==null?void 0:s.type]}):o.jsx(oa,{...t}),(c==null?void 0:c.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(X=c==null?void 0:c.toolTip)==null?void 0:X[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(c==null?void 0:c.iconAlignment),children:[(c==null?void 0:c.showIcon)&&o.jsx("i",{className:"pi pi-"+((ge=(pe=c==null?void 0:c.icon)==null?void 0:pe.properties)==null?void 0:ge.name)}),o.jsx(wn,{id:c==null?void 0:c.uuid,placeholder:(Ae=c==null?void 0:c.placeholder)==null?void 0:Ae[s==null?void 0:s.type],minLength:(ye=c==null?void 0:c.attributes)==null?void 0:ye.minLength,maxLength:(oe=c==null?void 0:c.attributes)==null?void 0:oe.maxLength,value:T,onFocus:()=>O(1),onChange:we=>{h!=null&&h.rowIsRepeatable?q(c,we.target.value):ce(we)},className:P===1&&((re=c==null?void 0:c.attributes)!=null&&re.required)?T?"valid":"invalid":"valid'",readOnly:m,disabled:A})]}),o.jsx("div",{children:((B=c==null?void 0:c.attributes)==null?void 0:B.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:P===1&&!T?(ne=c==null?void 0:c.validationMesssage)==null?void 0:ne.english:""}),o.jsx("small",{className:"error",children:P===1&&T.length&&(T==null?void 0:T.length)<((se=c==null?void 0:c.attributes)==null?void 0:se.minLength)?`Mini length ${(me=c==null?void 0:c.attributes)==null?void 0:me.minLength}`:""})]})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ne=c==null?void 0:c.helperText)==null?void 0:Ne[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:W})]})},loe=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink text"}),o.jsx(wn,{value:(i=r==null?void 0:r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r==null?void 0:r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value)})]})]})},coe=t=>{var r;const{onHandleChangeStyling:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{className:"mr-2",children:"Hyperlink color"}),o.jsx(w3,{value:n==null?void 0:n.color,onChange:i=>{e("color",i.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Font Size"}),o.jsx(wn,{type:"number",maxLength:2,placeholder:"eg 20px",value:(r=Number(n==null?void 0:n.fontSize))==null?void 0:r.toFixed(0),onChange:i=>{e("fontSize",i.target.value)}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},uoe=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,typeName:u}=t,[d,f]=F.useState(n),{fieldSettingUpdate:h,formBuilderSchemaLanguages:p,formBuilderPublishedStatus:v}=sn(),{updateGlobalToast:m}=Ht(),A=(C,T,S)=>{f(E=>({...E,[C]:{...E[C],[T==null?void 0:T.type]:S}}))},w=(C,T)=>{f(S=>({...S,[C]:T}))},x=()=>{h(i,a,s,l,c,d),m({showToast:!0,toastMessage:"Updated",toastDetail:`${u} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),header:()=>{var C,T;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"," ",(C=n==null?void 0:n.label)!=null&&C.english?`- ${(T=n==null?void 0:n.label)==null?void 0:T.english}`:""," "]})})},children:[o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:p!=null&&p.length?p.map((C,T)=>o.jsx(so,{tabIndex:T,header:C==null?void 0:C.language,children:o.jsx(loe,{language:C,fieldState:d,onHandleChange:A,...t})},T)):""})}),o.jsx(wr,{header:"Styling",children:o.jsx(coe,{fieldState:d,onHandleChangeStyling:w,...t})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!v&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>x(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>r(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},doe=t=>{var p,v,m,A,w,x,C,T,S;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isBuilderMode:r}=Ht(),[i,a]=F.useState(!1),[s,l]=F.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=E=>{a(E)},f=()=>{a(!1)};F.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[r&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?"field-form-builder px-4":" px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(p=e==null?void 0:e.headerText)==null?void 0:p[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsx("a",{style:{fontSize:parseInt(e==null?void 0:e.fontSize),color:`#${e==null?void 0:e.color}`,textDecoration:e!=null&&e.underLined?"underline":"none"},className:"atag-style",href:(w=e==null?void 0:e.hrefLink)==null?void 0:w[n==null?void 0:n.type],children:(x=e==null?void 0:e.text)==null?void 0:x[n==null?void 0:n.type]}),((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(uoe,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(xi,{...t,fieldWrap:h})]})},foe=t=>{var H,X,pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e,K,Ee,be;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:p,updateUserFormDataSubmit:v,userTaskSubmitFormData:m,TASK_PUBLISHED:A,task_status:w}=Ar(),{userSelectedLanguage:x,fieldSettingUpdate:C}=sn(),[T,S]=F.useState(null),[E,_]=F.useState(!1),[P,O]=F.useState(null),[k,M]=F.useState(0),[Y,N]=F.useState(!1),[z,$]=F.useState(!1),le=()=>{$(!0)},G=()=>{$(!1)},R=()=>{var he,fe;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const xe=[...a.repeatableFields],Me=It.findIndex(xe,function(Be){return Be.uuid===(e==null?void 0:e.uuid)});Me>=0&&xe[Me].fieldData?O(Number(xe[Me].fieldData)||null):O(null)}}else{const xe=m;if(xe!=null&&xe.length){for(const Me of xe)if(Me.fieldId===t.field.uuid&&((he=Me==null?void 0:Me.postData)!=null&&he.length)){O(Number((fe=Me==null?void 0:Me.postData[0])==null?void 0:fe.postValue)||null);break}}}N(!0)};F.useEffect(()=>{Y||R();const he=Gt.addListener("clearRepeatableFields",Je=>{Je===(a==null?void 0:a.uuid)&&(O(null),M(0),e.isValid=0,C(i,r,s,l,n,e))}),fe=Gt.addListener("onSubmitUserForm",()=>{var Je;(Je=e==null?void 0:e.attributes)!=null&&Je.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),xe=Gt.addListener("OnInvalidFieldCatch",Je=>{e.uuid===(Je==null?void 0:Je.fieldId)?M(1):M(0)}),Me=Gt.addListener("OnGetFieldValue",Je=>{var ut;const st=(ut=Je==null?void 0:Je.repeatableColumn)==null?void 0:ut.filter(St=>(St==null?void 0:St.fieldUuid)===(e==null?void 0:e.uuid));st!=null&&st.length}),Be=Gt.addListener("formFieldAdded",Je=>{T===null&&S(Je.uuid)});return()=>{fe.remove(),xe.remove(),Me.remove(),he.remove(),Be.remove()}}),F.useEffect(()=>(T!==null&&setTimeout(()=>{S(null)},1e3),()=>{}),[T]);const ce=he=>{_(he)},q=()=>{_(!1)},W=he=>{const fe=m,xe=It.cloneDeep(f);if(fe!==null){if(he){if(xe[e==null?void 0:e.uuid]=he,(fe==null?void 0:fe.length)>0)for(const Me of fe)Me.fieldId===t.field.uuid&&(Me.postData[0]={postValue:he})}else if(delete xe[e==null?void 0:e.uuid],(fe==null?void 0:fe.length)>0)for(const Me of fe)Me.fieldId===t.field.uuid&&(Me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(xe);const Me=Object.keys(xe).length;p(Me)}},ee=(he,fe)=>{var xe;if(m!=null&&m.length){const Me=[...m],Be=It.findIndex(Me,function(st){return st.rowId===(a==null?void 0:a.uuid)});let Je=(xe=m[Be])==null?void 0:xe.repeatableFields;Je={...Je,[he==null?void 0:he.uuid]:fe},Me[Be]={...Me[Be],repeatableFields:Je},v(Me)}O(fe),fe!==""?he.isValid=1:he.isValid=0},Q=o.jsxs("div",{onMouseOver:le,onMouseOut:G,children:[d===!0&&z===!0&&o.jsx(Wr,{handleFieldSettingsSidebar:ce,...t}),o.jsxs("div",{className:`field ${d===!0&&" py-3 px-4 builder-element-wrapper "} ${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:u?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((X=e==null?void 0:e.attributes)==null?void 0:X.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(pe=e==null?void 0:e.label)==null?void 0:pe[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ge=e==null?void 0:e.toolTip)==null?void 0:ge[x==null?void 0:x.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(Ae=e==null?void 0:e.icon)==null?void 0:Ae.properties)==null?void 0:ye.name)}),o.jsx(no,{readOnly:c,id:e==null?void 0:e.uuid,placeholder:(oe=e==null?void 0:e.placeholder)==null?void 0:oe[x==null?void 0:x.type],value:P,min:(re=e==null?void 0:e.attributes)==null?void 0:re.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(B=e==null?void 0:e.attributes)==null?void 0:B.prefix,showButtons:(ne=e==null?void 0:e.attributes)==null?void 0:ne.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(se=e==null?void 0:e.attributes)==null?void 0:se.minFractionDigits,maxFractionDigits:(me=e==null?void 0:e.attributes)==null?void 0:me.maxFractionDigits,locale:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.locale,mode:(we=e==null?void 0:e.attributes)==null?void 0:we.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(ue=e==null?void 0:e.attributes)==null?void 0:ue.currencyDisplay,useGrouping:(Te=e==null?void 0:e.attributes)==null?void 0:Te.useGrouping,onFocus:()=>M(1),onChange:he=>{a!=null&&a.rowIsRepeatable?ee(e,he.value):W(he.value)},className:k===1&&((_e=e==null?void 0:e.attributes)!=null&&_e.required)?P?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("small",{className:"error",children:k===1&&!P?(Ee=e==null?void 0:e.validationMesssage)==null?void 0:Ee.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[x==null?void 0:x.type]})})]})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&d===!0&&o.jsx(Zi,{visibilty:E,closeSettingFieldSidebar:q,...t}),o.jsx(xi,{...t,fieldWrap:Q})]})};//! moment.js
|
|
2309
|
+
`+Sn),B&&M3([Y,N,z],Pn=>{Sn=n2(Sn,Pn," ")}),T&&ue?T.createHTML(Sn):Sn},e.setConfig=function(){let Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};In(Et),me=!0},e.clearConfig=function(){rn=null,me=!1},e.isValidAttribute=function(Et,Fe,We){rn||In({});const bt=at(Et),$t=at(Fe);return vt(bt,$t,We)},e.addHook=function(Et,Fe){typeof Fe=="function"&&(M[Et]=M[Et]||[],t2(M[Et],Fe))},e.removeHook=function(Et){if(M[Et])return UN(M[Et])},e.removeHooks=function(Et){M[Et]&&(M[Et]=[])},e.removeAllHooks=function(){M={}},e}var V3=GN();const oa=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=F.useState(e);F.useEffect(()=>{var C;return A((C=e==null?void 0:e.label)==null?void 0:C[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:p}=sn(),v=(C,T,S)=>{u(E=>({...E,[C]:{...E[C],[T==null?void 0:T.type]:S}}))},[m,A]=F.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);F.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(C[pa],C[ga],C[Ta],C[Ea],C[Ia],C[Pa],C[Go],C[Co],c):(C==null?void 0:C.length)>Pa&&(C==null?void 0:C.length)===ql+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?p(C[pa],C[ga],C[Ta],C[Ea],C[Ia],C[5],C[6],C[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(P3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:m,disabled:!1,onChange:C=>{var T;A(V3.sanitize((T=C==null?void 0:C.target)==null?void 0:T.value))},onBlur:C=>{var S;const T=V3.sanitize((S=C==null?void 0:C.target)==null?void 0:S.innerText);A(T),v("label",d,T)},tagName:"article"})})},t1=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(jp,{checked:l,onLabel:e,onChange:c=>{a(s,c.value)},offLabel:n,onIcon:r,offIcon:i,className:"mr-1 px-1",style:{fontSize:"0.8rem"}})})},Wr=t=>{var le,G,R,ce;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,type:l,path:c,handleFieldSettingsSidebar:u,showFieldIcons:d=!0,showSettingsIcon:f=!0}=t,{emitSocketData:h,renderType:p}=Ht(),v=(q,W)=>{M(ee=>({...ee,[q]:W}))},{fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:A,cloneField:w,gridComponentFieldSettingUpdate:x,fieldSettingDeleteInlineConditional:C,gridComponentFieldDelete:T,removeField:S}=sn(),{updateGlobalToast:E}=Ht(),_=q=>{const W=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?A(W[pa],W[ga],W[Ta],W[Ea],W[Ia],W[Pa],W[Go],W[Co],q):(W==null?void 0:W.length)>Pa&&(W==null?void 0:W.length)===ql+1&&(q!=null&&q.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?x(W[pa],W[ga],W[Ta],W[Ea],W[Ia],W[5],W[6],W[7],q):m(s,i,a,r,n,q),E({showToast:!0,toastMessage:"Updated",toastDetail:"Field updated",toastType:"success"})},[P,O]=F.useState(!1),[k,M]=F.useState({custom_component_title:"",custom_component_description:""}),Y=()=>{M(q=>({...q,custom_component_schema:e})),O(!0)},N=()=>{const q=c.split("-").map(Number);l==="inline-conditional"?C(q[pa],q[ga],q[Ta],q[Ea],q[Ia],q[Pa],q[Go],q[Co]):(q==null?void 0:q.length)>Pa&&(q==null?void 0:q.length)===ql+1&&(e!=null&&e.componentType)&&l==="grid"?T(q[pa],q[ga],q[Ta],q[Ea],q[Ia],q[5],q[6],q[7]):S(s,i,a,r,n)},z=(q,W)=>{const ee={...e,attributes:{...e.attributes,[q]:W}};_(ee)},$=(q,W)=>{const ee={...e,[q]:W};_(ee)};return o.jsx(o.Fragment,{children:o.jsxs("div",{className:`${(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question","builder-element-quick-options mb-2 w-3 justify-content-center"} flex quick-setting`,children:[o.jsx(o.Fragment,{children:(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question"&&d===!1&&o.jsxs("div",{className:" ",children:[o.jsx(t1,{field:e,onHandleChangeSetttings:z,settingsKey:"required",settingsKeyValue:(le=e==null?void 0:e.attributes)==null?void 0:le.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(G=e==null?void 0:e.attributes)==null?void 0:G.required}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showToolTip",settingsKeyValue:e==null?void 0:e.showToolTip,onLabel:"Tooltip",offLabel:"Tooltip",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showToolTip}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showHelperText",settingsKeyValue:e==null?void 0:e.showHelperText,onLabel:"Helper text",offLabel:"Helper text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHelperText}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showHeaderText",settingsKeyValue:e==null?void 0:e.showHeaderText,onLabel:"Header text",offLabel:"Header text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHeaderText}),o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"isFluid",settingsKeyValue:e==null?void 0:e.isFluid,onLabel:"Fluid",offLabel:"Fluid",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.isFluid}),(e==null?void 0:e.componentType)=="radio"&&o.jsxs(o.Fragment,{children:[o.jsx(t1,{field:e,onHandleChangeSetttings:$,settingsKey:"showAlphabetList",settingsKeyValue:e==null?void 0:e.showAlphabetList,onLabel:"Alpha",offLabel:"Alpha",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showAlphabetList}),o.jsx(t1,{field:e,onHandleChangeSetttings:z,settingsKey:"style",settingsKeyValue:(R=e==null?void 0:e.attributes)==null?void 0:R.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(ce=e==null?void 0:e.attributes)==null?void 0:ce.style})]})]})}),o.jsxs("div",{className:"quick-setting",children:[f===!0&&o.jsxs("span",{className:"p-buttonset",children:[(e==null?void 0:e.componentType)!=="hr"&&o.jsx(Ft,{text:!0,size:"small",tooltip:"Advanced settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Ft,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{w(e,s,i,a,r,n),h()},tooltip:"Clone"}),o.jsx(Ft,{text:!0,className:"p-button-danger",size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{N()},tooltip:"Delete"}),(p===Ip||p===M0)&&o.jsx(Ft,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",tooltip:"Save as custom component",onClick:()=>{Y()}})]}),o.jsxs(Ks,{header:"Custom component save",visible:P,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Ft,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>O(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Ft,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{O(!1)},autoFocus:!0})]})}),onHide:()=>O(!1),children:[o.jsxs("span",{className:"p-float-label",children:[o.jsx(wn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(k==null?void 0:k.custom_component_title)||"",onChange:q=>{var W;return v("custom_component_title",(W=q==null?void 0:q.target)==null?void 0:W.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(lo,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(k==null?void 0:k.custom_component_description)||"",onChange:q=>{var W;return v("custom_component_description",(W=q==null?void 0:q.target)==null?void 0:W.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},soe=t=>{var ee,Q,H,X,pe,ge,Ae,ye;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{taskRegisterData:p,updateTaskRegisterData:v,updateTaskProgressValue:m,updateUserFormDataSubmit:A,userTaskSubmitFormData:w}=Ar(),[x,C]=F.useState(!1),[T,S]=F.useState(!1),[E,_]=F.useState(null),[P,O]=F.useState(0),[k,M]=F.useState(!1),Y=()=>{M(!0)},N=()=>{M(!1)},z=oe=>{C(oe)},$=()=>{C(!1)},le=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(r==null?void 0:r.uuid)});se>=0&&ne[se].fieldData?_(ne[se].fieldData):(r.isValid=0,_(null))}}else{const ne=w,se=It.cloneDeep(p);if(ne!=null&&ne.length){for(const me of ne)if(me.fieldId===t.field.uuid&&((oe=me==null?void 0:me.postData)!=null&&oe.length)){_((re=me==null?void 0:me.postData[0])==null?void 0:re.postValue),se[r==null?void 0:r.uuid]=(B=me==null?void 0:me.postData[0])==null?void 0:B.postValue;const Ne=Object.keys(se).length;m(Ne);break}}}S(!0)},G=oe=>{var se;_(oe.target.value);const re=w,B=It.cloneDeep(p);if((se=oe==null?void 0:oe.target)!=null&&se.value&&(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(B[r==null?void 0:r.uuid]=oe==null?void 0:oe.value,me.postData[0]={postValue:oe.value});else delete B[r==null?void 0:r.uuid];v(B);const ne=Object.keys(B).length;m(ne)};F.useEffect(()=>{T||le();const oe=Gt.addListener("clearRepeatableFields",ne=>{ne===(a==null?void 0:a.uuid)&&(_(null),O(0),r.isValid=0,h(e,n,s,l,i,r))}),re=Gt.addListener("onSubmitUserForm",()=>{var ne;(ne=r==null?void 0:r.attributes)!=null&&ne.required?E!==null||E!==void 0?r.isValid=1:(console.log("Countr field in valid ",E),r.isValid=0):r.isValid=1}),B=Gt.addListener("OnInvalidFieldCatch",ne=>{console.log("OnInvalidFieldCatch listener"),console.log("field.uuid === value?.fieldId",r.uuid===(ne==null?void 0:ne.fieldId)),r.uuid===(ne==null?void 0:ne.fieldId)?O(1):O(0)});return()=>{re.remove(),B.remove(),oe.remove()}});const R=(oe,re)=>{var B;if(w){const ne=[...w],se=It.findIndex(ne,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let me=(B=w[se])==null?void 0:B.repeatableFields;me={...me,[oe==null?void 0:oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},A(ne)}_(re),re!==null?oe.isValid=1:oe.isValid=0},ce=(oe,re)=>oe?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:oe.name,src:oe==null?void 0:oe.image,onError:B=>B.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:oe.name})]}):o.jsx("span",{children:re.placeholder}),q=oe=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:oe.name,src:oe==null?void 0:oe.image,onError:re=>re.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:oe.name})]}),W=o.jsxs("div",{onMouseOver:Y,onMouseOut:N,children:[d&&k&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(ee=r==null?void 0:r.headerText)==null?void 0:ee[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=r==null?void 0:r.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(H=r==null?void 0:r.label)==null?void 0:H[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(X=r==null?void 0:r.toolTip)==null?void 0:X[f==null?void 0:f.type],position:"right"})})]}),o.jsx(La,{className:"country-select-builder-component",onFocus:()=>O(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?R(r,oe.target.value):G(oe)},options:r==null?void 0:r.countries,optionLabel:"name",value:E,placeholder:(pe=r==null?void 0:r.placeholder)==null?void 0:pe[f==null?void 0:f.type],disabled:c,valueTemplate:ce,itemTemplate:q,filter:!0,filterBy:"name",showClear:!0}),((ge=r==null?void 0:r.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:P===1&&E===null?((Ae=r==null?void 0:r.validationMesssage)==null?void 0:Ae[f==null?void 0:f.type])||"field is required":""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:$,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:W})]})},ooe=t=>{var ee,Q,H,X,pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v,isDisabled:m}=t,{isAdmin:A,isBuilderMode:w}=Ht(),[x,C]=F.useState(!1),[T,S]=F.useState(""),[E,_]=F.useState(null),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),z=()=>{N(!0)},$=()=>{N(!1)},le=()=>{var we,ve,ue;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const Te=[...h.repeatableFields],_e=It.findIndex(Te,function(K){return K.uuid===(c==null?void 0:c.uuid)});_e>=0&&Te[_e].fieldData?S(Te[_e].fieldData):S("")}}else{const Te=a;if(Te!=null&&Te.length){for(const _e of Te)if(_e.fieldId===t.field.uuid&&((we=_e==null?void 0:_e.postData[0])==null?void 0:we.postValue)!==""&&((ve=_e==null?void 0:_e.postData[0])!=null&&ve.postValue)){S((ue=_e==null?void 0:_e.postData[0])==null?void 0:ue.postValue);break}}}M(!0)};F.useEffect(()=>{k||le();const we=Gt.addListener("clearRepeatableFields",K=>{K===(h==null?void 0:h.uuid)&&(S(""),O(0),c.isValid=0,l(f,d,p,v,u,c))}),ve=Gt.addListener("onSubmitUserForm",()=>{var K,Ee;(K=c==null?void 0:c.attributes)!=null&&K.required?T&&T.length&&(T==null?void 0:T.length)<((Ee=c==null?void 0:c.attributes)==null?void 0:Ee.minLength)?c.isValid=1:c.isValid=0:c.isValid=1}),ue=Gt.addListener("OnInvalidFieldCatch",K=>{c.uuid===(K==null?void 0:K.fieldId)?O(1):O(0)}),Te=Gt.addListener("OnGetFieldValue",K=>{var be;const Ee=(be=K==null?void 0:K.repeatableColumn)==null?void 0:be.filter(he=>(he==null?void 0:he.fieldUuid)===(c==null?void 0:c.uuid));Ee!=null&&Ee.length}),_e=Gt.addListener("formFieldAdded",K=>{E===null&&_(K==null?void 0:K.uuid)});return()=>{ve.remove(),ue.remove(),Te.remove(),we.remove(),_e.remove()}}),F.useEffect(()=>(E!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[E]);const G=we=>{C(we)},R=()=>{C(!1)},ce=we=>{var Te,_e;S(we.target.value);const ve=a,ue=It.cloneDeep(e);if(ve!==null){if((Te=we==null?void 0:we.target)!=null&&Te.value){if(ue[c==null?void 0:c.uuid]=(_e=we==null?void 0:we.target)==null?void 0:_e.value,(ve==null?void 0:ve.length)>0)for(const K of ve)K.fieldId===t.field.uuid&&(K.postData[0]={postValue:we.target.value})}else if(delete ue[c==null?void 0:c.uuid],(ve==null?void 0:ve.length)>0)for(const K of ve)K.fieldId===t.field.uuid&&(K.postData[0]={postValue:""})}if(console.log("row?.rowIsRepeatable",h==null?void 0:h.rowIsRepeatable),!(h!=null&&h.rowIsRepeatable)){n(ue);const K=Object.keys(ue).length;r(K)}},q=(we,ve)=>{var ue;if(a){const Te=[...a],_e=It.findIndex(Te,function(Ee){return Ee.rowId===(h==null?void 0:h.uuid)});let K=(ue=a[_e])==null?void 0:ue.repeatableFields;K={...K,[we==null?void 0:we.uuid]:ve},Te[_e]={...Te[_e],repeatableFields:K},i(Te)}S(ve),ve!==""?we.isValid=1:we.isValid=0},W=o.jsxs("div",{onMouseOver:z,onMouseOut:$,children:[w&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${w&&" py-3 px-4 builder-element-wrapper "} ${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:A?"col-6 ":"col-12 p-fluid",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ee=c==null?void 0:c.headerText)==null?void 0:ee[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:c==null?void 0:c.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",w===!1?o.jsx(o.Fragment,{children:(H=c==null?void 0:c.label)==null?void 0:H[s==null?void 0:s.type]}):o.jsx(oa,{...t}),(c==null?void 0:c.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(X=c==null?void 0:c.toolTip)==null?void 0:X[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(c==null?void 0:c.iconAlignment),children:[(c==null?void 0:c.showIcon)&&o.jsx("i",{className:"pi pi-"+((ge=(pe=c==null?void 0:c.icon)==null?void 0:pe.properties)==null?void 0:ge.name)}),o.jsx(wn,{id:c==null?void 0:c.uuid,placeholder:(Ae=c==null?void 0:c.placeholder)==null?void 0:Ae[s==null?void 0:s.type],minLength:(ye=c==null?void 0:c.attributes)==null?void 0:ye.minLength,maxLength:(oe=c==null?void 0:c.attributes)==null?void 0:oe.maxLength,value:T,onFocus:()=>O(1),onChange:we=>{h!=null&&h.rowIsRepeatable?q(c,we.target.value):ce(we)},className:P===1&&((re=c==null?void 0:c.attributes)!=null&&re.required)?T?"valid":"invalid":"valid'",readOnly:m,disabled:A})]}),o.jsx("div",{children:((B=c==null?void 0:c.attributes)==null?void 0:B.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:P===1&&!T?(ne=c==null?void 0:c.validationMesssage)==null?void 0:ne.english:""}),o.jsx("small",{className:"error",children:P===1&&T.length&&(T==null?void 0:T.length)<((se=c==null?void 0:c.attributes)==null?void 0:se.minLength)?`Mini length ${(me=c==null?void 0:c.attributes)==null?void 0:me.minLength}`:""})]})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ne=c==null?void 0:c.helperText)==null?void 0:Ne[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:W})]})},loe=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink text"}),o.jsx(wn,{value:(i=r==null?void 0:r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r==null?void 0:r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value)})]})]})},coe=t=>{var r;const{onHandleChangeStyling:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{className:"mr-2",children:"Hyperlink color"}),o.jsx(w3,{value:n==null?void 0:n.color,onChange:i=>{e("color",i.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Font Size"}),o.jsx(wn,{type:"number",maxLength:2,placeholder:"eg 20px",value:(r=Number(n==null?void 0:n.fontSize))==null?void 0:r.toFixed(0),onChange:i=>{e("fontSize",i.target.value)}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},uoe=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,typeName:u}=t,[d,f]=F.useState(n),{fieldSettingUpdate:h,formBuilderSchemaLanguages:p,formBuilderPublishedStatus:v}=sn(),{updateGlobalToast:m}=Ht(),A=(C,T,S)=>{f(E=>({...E,[C]:{...E[C],[T==null?void 0:T.type]:S}}))},w=(C,T)=>{f(S=>({...S,[C]:T}))},x=()=>{h(i,a,s,l,c,d),m({showToast:!0,toastMessage:"Updated",toastDetail:`${u} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),header:()=>{var C,T;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"," ",(C=n==null?void 0:n.label)!=null&&C.english?`- ${(T=n==null?void 0:n.label)==null?void 0:T.english}`:""," "]})})},children:[o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:p!=null&&p.length?p.map((C,T)=>o.jsx(so,{tabIndex:T,header:C==null?void 0:C.language,children:o.jsx(loe,{language:C,fieldState:d,onHandleChange:A,...t})},T)):""})}),o.jsx(wr,{header:"Styling",children:o.jsx(coe,{fieldState:d,onHandleChangeStyling:w,...t})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!v&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>x(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>r(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},doe=t=>{var p,v,m,A,w,x,C,T,S;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isBuilderMode:r}=Ht(),[i,a]=F.useState(!1),[s,l]=F.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=E=>{a(E)},f=()=>{a(!1)};F.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[r&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?"field-form-builder px-4":" px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(p=e==null?void 0:e.headerText)==null?void 0:p[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsx("a",{style:{fontSize:parseInt(e==null?void 0:e.fontSize),color:`#${e==null?void 0:e.color}`,textDecoration:e!=null&&e.underLined?"underline":"none"},className:"atag-style",href:(w=e==null?void 0:e.hrefLink)==null?void 0:w[n==null?void 0:n.type],children:(x=e==null?void 0:e.text)==null?void 0:x[n==null?void 0:n.type]}),((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(uoe,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(xi,{...t,fieldWrap:h})]})},foe=t=>{var H,X,pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e,K,Ee,be;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:p,updateUserFormDataSubmit:v,userTaskSubmitFormData:m,TASK_PUBLISHED:A,task_status:w}=Ar(),{userSelectedLanguage:x,fieldSettingUpdate:C}=sn(),[T,S]=F.useState(null),[E,_]=F.useState(!1),[P,O]=F.useState(null),[k,M]=F.useState(0),[Y,N]=F.useState(!1),[z,$]=F.useState(!1),le=()=>{$(!0)},G=()=>{$(!1)},R=()=>{var he,fe;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const xe=[...a.repeatableFields],Me=It.findIndex(xe,function(Be){return Be.uuid===(e==null?void 0:e.uuid)});Me>=0&&xe[Me].fieldData?O(Number(xe[Me].fieldData)||null):O(null)}}else{const xe=m;if(xe!=null&&xe.length){for(const Me of xe)if(Me.fieldId===t.field.uuid&&((he=Me==null?void 0:Me.postData)!=null&&he.length)){O(Number((fe=Me==null?void 0:Me.postData[0])==null?void 0:fe.postValue)||null);break}}}N(!0)};F.useEffect(()=>{Y||R();const he=Gt.addListener("clearRepeatableFields",Je=>{Je===(a==null?void 0:a.uuid)&&(O(null),M(0),e.isValid=0,C(i,r,s,l,n,e))}),fe=Gt.addListener("onSubmitUserForm",()=>{var Je;(Je=e==null?void 0:e.attributes)!=null&&Je.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),xe=Gt.addListener("OnInvalidFieldCatch",Je=>{e.uuid===(Je==null?void 0:Je.fieldId)?M(1):M(0)}),Me=Gt.addListener("OnGetFieldValue",Je=>{var ut;const st=(ut=Je==null?void 0:Je.repeatableColumn)==null?void 0:ut.filter(St=>(St==null?void 0:St.fieldUuid)===(e==null?void 0:e.uuid));st!=null&&st.length}),Be=Gt.addListener("formFieldAdded",Je=>{T===null&&S(Je.uuid)});return()=>{fe.remove(),xe.remove(),Me.remove(),he.remove(),Be.remove()}}),F.useEffect(()=>(T!==null&&setTimeout(()=>{S(null)},1e3),()=>{}),[T]);const ce=he=>{_(he)},q=()=>{_(!1)},W=he=>{const fe=m,xe=It.cloneDeep(f);if(fe!==null){if(he){if(xe[e==null?void 0:e.uuid]=he,(fe==null?void 0:fe.length)>0)for(const Me of fe)Me.fieldId===t.field.uuid&&(Me.postData[0]={postValue:he})}else if(delete xe[e==null?void 0:e.uuid],(fe==null?void 0:fe.length)>0)for(const Me of fe)Me.fieldId===t.field.uuid&&(Me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(xe);const Me=Object.keys(xe).length;p(Me)}},ee=(he,fe)=>{var xe;if(m!=null&&m.length){const Me=[...m],Be=It.findIndex(Me,function(st){return st.rowId===(a==null?void 0:a.uuid)});let Je=(xe=m[Be])==null?void 0:xe.repeatableFields;Je={...Je,[he==null?void 0:he.uuid]:fe},Me[Be]={...Me[Be],repeatableFields:Je},v(Me)}O(fe),fe!==""?he.isValid=1:he.isValid=0},Q=o.jsxs("div",{onMouseOver:le,onMouseOut:G,children:[d===!0&&z===!0&&o.jsx(Wr,{handleFieldSettingsSidebar:ce,...t}),o.jsxs("div",{className:`field ${d===!0&&" py-3 px-4 builder-element-wrapper "} ${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:u?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((X=e==null?void 0:e.attributes)==null?void 0:X.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(pe=e==null?void 0:e.label)==null?void 0:pe[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ge=e==null?void 0:e.toolTip)==null?void 0:ge[x==null?void 0:x.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(Ae=e==null?void 0:e.icon)==null?void 0:Ae.properties)==null?void 0:ye.name)}),o.jsx(no,{readOnly:c,id:e==null?void 0:e.uuid,disabled:u||c,placeholder:(oe=e==null?void 0:e.placeholder)==null?void 0:oe[x==null?void 0:x.type],value:P,min:(re=e==null?void 0:e.attributes)==null?void 0:re.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(B=e==null?void 0:e.attributes)==null?void 0:B.prefix,showButtons:(ne=e==null?void 0:e.attributes)==null?void 0:ne.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(se=e==null?void 0:e.attributes)==null?void 0:se.minFractionDigits,maxFractionDigits:(me=e==null?void 0:e.attributes)==null?void 0:me.maxFractionDigits,locale:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.locale,mode:(we=e==null?void 0:e.attributes)==null?void 0:we.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(ue=e==null?void 0:e.attributes)==null?void 0:ue.currencyDisplay,useGrouping:(Te=e==null?void 0:e.attributes)==null?void 0:Te.useGrouping,onFocus:()=>M(1),onChange:he=>{a!=null&&a.rowIsRepeatable?ee(e,he.value):W(he.value)},className:k===1&&((_e=e==null?void 0:e.attributes)!=null&&_e.required)?P?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("small",{className:"error",children:k===1&&!P?(Ee=e==null?void 0:e.validationMesssage)==null?void 0:Ee.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[x==null?void 0:x.type]})})]})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&d===!0&&o.jsx(Zi,{visibilty:E,closeSettingFieldSidebar:q,...t}),o.jsx(xi,{...t,fieldWrap:Q})]})};//! moment.js
|
|
2310
2310
|
//! version : 2.30.1
|
|
2311
2311
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
2312
2312
|
//! license : MIT
|
|
@@ -2315,7 +2315,7 @@ var WN;function Mn(){return WN.apply(null,arguments)}function hoe(t){WN=t}functi
|
|
|
2315
2315
|
[`+a+"] ";for(s in arguments[0])qi(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}ZN(t+`
|
|
2316
2316
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
2317
2317
|
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var eO={};function tO(t,e){Mn.deprecationHandler!=null&&Mn.deprecationHandler(t,e),eO[t]||(ZN(e),eO[t]=!0)}Mn.suppressDeprecationWarnings=!1,Mn.deprecationHandler=null;function uu(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function goe(t){var e,n;for(n in t)qi(t,n)&&(e=t[n],uu(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function j7(t,e){var n=Zd({},t),r;for(r in e)qi(e,r)&&(n1(t[r])&&n1(e[r])?(n[r]={},Zd(n[r],t[r]),Zd(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)qi(t,r)&&!qi(e,r)&&n1(t[r])&&(n[r]=Zd({},n[r]));return n}function z7(t){t!=null&&this.set(t)}var H7;Object.keys?H7=Object.keys:H7=function(t){var e,n=[];for(e in t)qi(t,e)&&n.push(e);return n};var moe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function voe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return uu(r)?r.call(e,n):r}function du(t,e,n){var r=""+Math.abs(t),i=e-r.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y7=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U3=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,K7={},wf={};function mr(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(wf[t]=i),e&&(wf[e[0]]=function(){return du(i.apply(this,arguments),e[1],e[2])}),n&&(wf[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function boe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function yoe(t){var e=t.match(Y7),n,r;for(n=0,r=e.length;n<r;n++)wf[e[n]]?e[n]=wf[e[n]]:e[n]=boe(e[n]);return function(i){var a="",s;for(s=0;s<r;s++)a+=uu(e[s])?e[s].call(i,t):e[s];return a}}function $3(t,e){return t.isValid()?(e=nO(e,t.localeData()),K7[e]=K7[e]||yoe(e),K7[e](t)):t.localeData().invalidDate()}function nO(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(U3.lastIndex=0;n>=0&&U3.test(t);)t=t.replace(U3,r),U3.lastIndex=0,n-=1;return t}var Aoe={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"};function woe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Y7).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var Soe="Invalid date";function Coe(){return this._invalidDate}var xoe="%d",Toe=/\d{1,2}/;function Eoe(t){return this._ordinal.replace("%d",t)}var Ioe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _oe(t,e,n,r){var i=this._relativeTime[n];return uu(i)?i(t,e,n,r):i.replace(/%d/i,t)}function Doe(t,e){var n=this._relativeTime[t>0?"future":"past"];return uu(n)?n(e):n.replace(/%s/i,e)}var rO={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Kl(t){return typeof t=="string"?rO[t]||rO[t.toLowerCase()]:void 0}function X7(t){var e={},n,r;for(r in t)qi(t,r)&&(n=Kl(r),n&&(e[n]=t[r]));return e}var Noe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ooe(t){var e=[],n;for(n in t)qi(t,n)&&e.push({unit:n,priority:Noe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var iO=/\d/,yl=/\d\d/,aO=/\d{3}/,R7=/\d{4}/,j3=/[+-]?\d{6}/,Va=/\d\d?/,sO=/\d\d\d\d?/,oO=/\d\d\d\d\d\d?/,z3=/\d{1,3}/,G7=/\d{1,4}/,H3=/[+-]?\d{1,6}/,Sf=/\d+/,Y3=/[+-]?\d+/,Foe=/Z|[+-]\d\d:?\d\d/gi,K3=/Z|[+-]\d\d(?::?\d\d)?/gi,koe=/[+-]?\d+(\.\d{1,3})?/,l2=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Cf=/^[1-9]\d?/,W7=/^([1-9]\d|\d)/,X3;X3={};function Qn(t,e,n){X3[t]=uu(e)?e:function(r,i){return r&&n?n:e}}function Poe(t,e){return qi(X3,t)?X3[t](e._strict,e._locale):new RegExp(Moe(t))}function Moe(t){return rd(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,a){return n||r||i||a}))}function rd(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Xl(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Ai(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Xl(e)),n}var Q7={};function fa(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),nd(e)&&(r=function(a,s){s[e]=Ai(a)}),i=t.length,n=0;n<i;n++)Q7[t[n]]=r}function c2(t,e){fa(t,function(n,r,i,a){i._w=i._w||{},e(n,i._w,i,a)})}function Loe(t,e,n){e!=null&&qi(Q7,t)&&Q7[t](e,n._a,n,t)}function R3(t){return t%4===0&&t%100!==0||t%400===0}var co=0,id=1,fu=2,Es=3,Dc=4,ad=5,r1=6,Boe=7,Voe=8;mr("Y",0,0,function(){var t=this.year();return t<=9999?du(t,4):"+"+t}),mr(0,["YY",2],0,function(){return this.year()%100}),mr(0,["YYYY",4],0,"year"),mr(0,["YYYYY",5],0,"year"),mr(0,["YYYYYY",6,!0],0,"year"),Qn("Y",Y3),Qn("YY",Va,yl),Qn("YYYY",G7,R7),Qn("YYYYY",H3,j3),Qn("YYYYYY",H3,j3),fa(["YYYYY","YYYYYY"],co),fa("YYYY",function(t,e){e[co]=t.length===2?Mn.parseTwoDigitYear(t):Ai(t)}),fa("YY",function(t,e){e[co]=Mn.parseTwoDigitYear(t)}),fa("Y",function(t,e){e[co]=parseInt(t,10)});function u2(t){return R3(t)?366:365}Mn.parseTwoDigitYear=function(t){return Ai(t)+(Ai(t)>68?1900:2e3)};var lO=xf("FullYear",!0);function qoe(){return R3(this.year())}function xf(t,e){return function(n){return n!=null?(cO(this,t,n),Mn.updateOffset(this,e),this):d2(this,t)}}function d2(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function cO(t,e,n){var r,i,a,s,l;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,s=t.month(),l=t.date(),l=l===29&&s===1&&!R3(a)?28:l,i?r.setUTCFullYear(a,s,l):r.setFullYear(a,s,l)}}function Uoe(t){return t=Kl(t),uu(this[t])?this[t]():this}function $oe(t,e){if(typeof t=="object"){t=X7(t);var n=Ooe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Kl(t),uu(this[t]))return this[t](e);return this}function joe(t,e){return(t%e+e)%e}var cs;Array.prototype.indexOf?cs=Array.prototype.indexOf:cs=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function J7(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=joe(e,12);return t+=(e-n)/12,n===1?R3(t)?29:28:31-n%7%2}mr("M",["MM",2],"Mo",function(){return this.month()+1}),mr("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),mr("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Qn("M",Va,Cf),Qn("MM",Va,yl),Qn("MMM",function(t,e){return e.monthsShortRegex(t)}),Qn("MMMM",function(t,e){return e.monthsRegex(t)}),fa(["M","MM"],function(t,e){e[id]=Ai(t)-1}),fa(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[id]=i:Qr(n).invalidMonth=t});var zoe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),uO="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),dO=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Hoe=l2,Yoe=l2;function Koe(t,e){return t?Ic(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||dO).test(e)?"format":"standalone"][t.month()]:Ic(this._months)?this._months:this._months.standalone}function Xoe(t,e){return t?Ic(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[dO.test(e)?"format":"standalone"][t.month()]:Ic(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Roe(t,e,n){var r,i,a,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=cu([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(i=cs.call(this._shortMonthsParse,s),i!==-1?i:null):(i=cs.call(this._longMonthsParse,s),i!==-1?i:null):e==="MMM"?(i=cs.call(this._shortMonthsParse,s),i!==-1?i:(i=cs.call(this._longMonthsParse,s),i!==-1?i:null)):(i=cs.call(this._longMonthsParse,s),i!==-1?i:(i=cs.call(this._shortMonthsParse,s),i!==-1?i:null))}function Goe(t,e,n){var r,i,a;if(this._monthsParseExact)return Roe.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=cu([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function fO(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=Ai(e);else if(e=t.localeData().monthsParse(e),!nd(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,J7(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function hO(t){return t!=null?(fO(this,t),Mn.updateOffset(this,!0),this):d2(this,"Month")}function Woe(){return J7(this.year(),this.month())}function Qoe(t){return this._monthsParseExact?(qi(this,"_monthsRegex")||pO.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(qi(this,"_monthsShortRegex")||(this._monthsShortRegex=Hoe),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Joe(t){return this._monthsParseExact?(qi(this,"_monthsRegex")||pO.call(this),t?this._monthsStrictRegex:this._monthsRegex):(qi(this,"_monthsRegex")||(this._monthsRegex=Yoe),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function pO(){function t(c,u){return u.length-c.length}var e=[],n=[],r=[],i,a,s,l;for(i=0;i<12;i++)a=cu([2e3,i]),s=rd(this.monthsShort(a,"")),l=rd(this.months(a,"")),e.push(s),n.push(l),r.push(l),r.push(s);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Zoe(t,e,n,r,i,a,s){var l;return t<100&&t>=0?(l=new Date(t+400,e,n,r,i,a,s),isFinite(l.getFullYear())&&l.setFullYear(t)):l=new Date(t,e,n,r,i,a,s),l}function f2(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function G3(t,e,n){var r=7+e-n,i=(7+f2(t,0,r).getUTCDay()-e)%7;return-i+r-1}function gO(t,e,n,r,i){var a=(7+n-r)%7,s=G3(t,r,i),l=1+7*(e-1)+a+s,c,u;return l<=0?(c=t-1,u=u2(c)+l):l>u2(t)?(c=t+1,u=l-u2(t)):(c=t,u=l),{year:c,dayOfYear:u}}function h2(t,e,n){var r=G3(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,a,s;return i<1?(s=t.year()-1,a=i+sd(s,e,n)):i>sd(t.year(),e,n)?(a=i-sd(t.year(),e,n),s=t.year()+1):(s=t.year(),a=i),{week:a,year:s}}function sd(t,e,n){var r=G3(t,e,n),i=G3(t+1,e,n);return(u2(t)-r+i)/7}mr("w",["ww",2],"wo","week"),mr("W",["WW",2],"Wo","isoWeek"),Qn("w",Va,Cf),Qn("ww",Va,yl),Qn("W",Va,Cf),Qn("WW",Va,yl),c2(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=Ai(t)});function ele(t){return h2(t,this._week.dow,this._week.doy).week}var tle={dow:0,doy:6};function nle(){return this._week.dow}function rle(){return this._week.doy}function ile(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function ale(t){var e=h2(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}mr("d",0,"do","day"),mr("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),mr("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),mr("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),mr("e",0,0,"weekday"),mr("E",0,0,"isoWeekday"),Qn("d",Va),Qn("e",Va),Qn("E",Va),Qn("dd",function(t,e){return e.weekdaysMinRegex(t)}),Qn("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Qn("dddd",function(t,e){return e.weekdaysRegex(t)}),c2(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:Qr(n).invalidWeekday=t}),c2(["d","e","E"],function(t,e,n,r){e[r]=Ai(t)});function sle(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function ole(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Z7(t,e){return t.slice(e,7).concat(t.slice(0,e))}var lle="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mO="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cle="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ule=l2,dle=l2,fle=l2;function hle(t,e){var n=Ic(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Z7(n,this._week.dow):t?n[t.day()]:n}function ple(t){return t===!0?Z7(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function gle(t){return t===!0?Z7(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function mle(t,e,n){var r,i,a,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=cu([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(i=cs.call(this._weekdaysParse,s),i!==-1?i:null):e==="ddd"?(i=cs.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=cs.call(this._minWeekdaysParse,s),i!==-1?i:null):e==="dddd"?(i=cs.call(this._weekdaysParse,s),i!==-1||(i=cs.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=cs.call(this._minWeekdaysParse,s),i!==-1?i:null)):e==="ddd"?(i=cs.call(this._shortWeekdaysParse,s),i!==-1||(i=cs.call(this._weekdaysParse,s),i!==-1)?i:(i=cs.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=cs.call(this._minWeekdaysParse,s),i!==-1||(i=cs.call(this._weekdaysParse,s),i!==-1)?i:(i=cs.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function vle(t,e,n){var r,i,a;if(this._weekdaysParseExact)return mle.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=cu([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function ble(t){if(!this.isValid())return t!=null?this:NaN;var e=d2(this,"Day");return t!=null?(t=sle(t,this.localeData()),this.add(t-e,"d")):e}function yle(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function Ale(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=ole(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function wle(t){return this._weekdaysParseExact?(qi(this,"_weekdaysRegex")||eb.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(qi(this,"_weekdaysRegex")||(this._weekdaysRegex=ule),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Sle(t){return this._weekdaysParseExact?(qi(this,"_weekdaysRegex")||eb.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(qi(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=dle),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Cle(t){return this._weekdaysParseExact?(qi(this,"_weekdaysRegex")||eb.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(qi(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fle),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function eb(){function t(d,f){return f.length-d.length}var e=[],n=[],r=[],i=[],a,s,l,c,u;for(a=0;a<7;a++)s=cu([2e3,1]).day(a),l=rd(this.weekdaysMin(s,"")),c=rd(this.weekdaysShort(s,"")),u=rd(this.weekdays(s,"")),e.push(l),n.push(c),r.push(u),i.push(l),i.push(c),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function tb(){return this.hours()%12||12}function xle(){return this.hours()||24}mr("H",["HH",2],0,"hour"),mr("h",["hh",2],0,tb),mr("k",["kk",2],0,xle),mr("hmm",0,0,function(){return""+tb.apply(this)+du(this.minutes(),2)}),mr("hmmss",0,0,function(){return""+tb.apply(this)+du(this.minutes(),2)+du(this.seconds(),2)}),mr("Hmm",0,0,function(){return""+this.hours()+du(this.minutes(),2)}),mr("Hmmss",0,0,function(){return""+this.hours()+du(this.minutes(),2)+du(this.seconds(),2)});function vO(t,e){mr(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}vO("a",!0),vO("A",!1);function bO(t,e){return e._meridiemParse}Qn("a",bO),Qn("A",bO),Qn("H",Va,W7),Qn("h",Va,Cf),Qn("k",Va,Cf),Qn("HH",Va,yl),Qn("hh",Va,yl),Qn("kk",Va,yl),Qn("hmm",sO),Qn("hmmss",oO),Qn("Hmm",sO),Qn("Hmmss",oO),fa(["H","HH"],Es),fa(["k","kk"],function(t,e,n){var r=Ai(t);e[Es]=r===24?0:r}),fa(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),fa(["h","hh"],function(t,e,n){e[Es]=Ai(t),Qr(n).bigHour=!0}),fa("hmm",function(t,e,n){var r=t.length-2;e[Es]=Ai(t.substr(0,r)),e[Dc]=Ai(t.substr(r)),Qr(n).bigHour=!0}),fa("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Es]=Ai(t.substr(0,r)),e[Dc]=Ai(t.substr(r,2)),e[ad]=Ai(t.substr(i)),Qr(n).bigHour=!0}),fa("Hmm",function(t,e,n){var r=t.length-2;e[Es]=Ai(t.substr(0,r)),e[Dc]=Ai(t.substr(r))}),fa("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Es]=Ai(t.substr(0,r)),e[Dc]=Ai(t.substr(r,2)),e[ad]=Ai(t.substr(i))});function Tle(t){return(t+"").toLowerCase().charAt(0)==="p"}var Ele=/[ap]\.?m?\.?/i,Ile=xf("Hours",!0);function _le(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var yO={calendar:moe,longDateFormat:Aoe,invalidDate:Soe,ordinal:xoe,dayOfMonthOrdinalParse:Toe,relativeTime:Ioe,months:zoe,monthsShort:uO,week:tle,weekdays:lle,weekdaysMin:cle,weekdaysShort:mO,meridiemParse:Ele},Ya={},p2={},g2;function Dle(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function AO(t){return t&&t.toLowerCase().replace("_","-")}function Nle(t){for(var e=0,n,r,i,a;e<t.length;){for(a=AO(t[e]).split("-"),n=a.length,r=AO(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=W3(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Dle(a,r)>=n-1)break;n--}e++}return g2}function Ole(t){return!!(t&&t.match("^[^/\\\\]*$"))}function W3(t){var e=null,n;if(Ya[t]===void 0&&typeof module<"u"&&module&&module.exports&&Ole(t))try{e=g2._abbr,n=require,n("./locale/"+t),e0(e)}catch{Ya[t]=null}return Ya[t]}function e0(t,e){var n;return t&&(Jo(e)?n=od(t):n=nb(t,e),n?g2=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),g2._abbr}function nb(t,e){if(e!==null){var n,r=yO;if(e.abbr=t,Ya[t]!=null)tO("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ya[t]._config;else if(e.parentLocale!=null)if(Ya[e.parentLocale]!=null)r=Ya[e.parentLocale]._config;else if(n=W3(e.parentLocale),n!=null)r=n._config;else return p2[e.parentLocale]||(p2[e.parentLocale]=[]),p2[e.parentLocale].push({name:t,config:e}),null;return Ya[t]=new z7(j7(r,e)),p2[t]&&p2[t].forEach(function(i){nb(i.name,i.config)}),e0(t),Ya[t]}else return delete Ya[t],null}function Fle(t,e){if(e!=null){var n,r,i=yO;Ya[t]!=null&&Ya[t].parentLocale!=null?Ya[t].set(j7(Ya[t]._config,e)):(r=W3(t),r!=null&&(i=r._config),e=j7(i,e),r==null&&(e.abbr=t),n=new z7(e),n.parentLocale=Ya[t],Ya[t]=n),e0(t)}else Ya[t]!=null&&(Ya[t].parentLocale!=null?(Ya[t]=Ya[t].parentLocale,t===e0()&&e0(t)):Ya[t]!=null&&delete Ya[t]);return Ya[t]}function od(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return g2;if(!Ic(t)){if(e=W3(t),e)return e;t=[t]}return Nle(t)}function kle(){return H7(Ya)}function rb(t){var e,n=t._a;return n&&Qr(t).overflow===-2&&(e=n[id]<0||n[id]>11?id:n[fu]<1||n[fu]>J7(n[co],n[id])?fu:n[Es]<0||n[Es]>24||n[Es]===24&&(n[Dc]!==0||n[ad]!==0||n[r1]!==0)?Es:n[Dc]<0||n[Dc]>59?Dc:n[ad]<0||n[ad]>59?ad:n[r1]<0||n[r1]>999?r1:-1,Qr(t)._overflowDayOfYear&&(e<co||e>fu)&&(e=fu),Qr(t)._overflowWeeks&&e===-1&&(e=Boe),Qr(t)._overflowWeekday&&e===-1&&(e=Voe),Qr(t).overflow=e),t}var Ple=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mle=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lle=/Z|[+-]\d\d(?::?\d\d)?/,Q3=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ib=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ble=/^\/?Date\((-?\d+)/i,Vle=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,qle={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function wO(t){var e,n,r=t._i,i=Ple.exec(r)||Mle.exec(r),a,s,l,c,u=Q3.length,d=ib.length;if(i){for(Qr(t).iso=!0,e=0,n=u;e<n;e++)if(Q3[e][1].exec(i[1])){s=Q3[e][0],a=Q3[e][2]!==!1;break}if(s==null){t._isValid=!1;return}if(i[3]){for(e=0,n=d;e<n;e++)if(ib[e][1].exec(i[3])){l=(i[2]||" ")+ib[e][0];break}if(l==null){t._isValid=!1;return}}if(!a&&l!=null){t._isValid=!1;return}if(i[4])if(Lle.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=s+(l||"")+(c||""),sb(t)}else t._isValid=!1}function Ule(t,e,n,r,i,a){var s=[$le(t),uO.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&s.push(parseInt(a,10)),s}function $le(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function jle(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function zle(t,e,n){if(t){var r=mO.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return Qr(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Hle(t,e,n){if(t)return qle[t];if(e)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function SO(t){var e=Vle.exec(jle(t._i)),n;if(e){if(n=Ule(e[4],e[3],e[2],e[5],e[6],e[7]),!zle(e[1],n,t))return;t._a=n,t._tzm=Hle(e[8],e[9],e[10]),t._d=f2.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Qr(t).rfc2822=!0}else t._isValid=!1}function Yle(t){var e=Ble.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(wO(t),t._isValid===!1)delete t._isValid;else return;if(SO(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Mn.createFromInputFallback(t)}Mn.createFromInputFallback=Yl("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Tf(t,e,n){return t??e??n}function Kle(t){var e=new Date(Mn.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ab(t){var e,n,r=[],i,a,s;if(!t._d){for(i=Kle(t),t._w&&t._a[fu]==null&&t._a[id]==null&&Xle(t),t._dayOfYear!=null&&(s=Tf(t._a[co],i[co]),(t._dayOfYear>u2(s)||t._dayOfYear===0)&&(Qr(t)._overflowDayOfYear=!0),n=f2(s,0,t._dayOfYear),t._a[id]=n.getUTCMonth(),t._a[fu]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Es]===24&&t._a[Dc]===0&&t._a[ad]===0&&t._a[r1]===0&&(t._nextDay=!0,t._a[Es]=0),t._d=(t._useUTC?f2:Zoe).apply(null,r),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Es]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(Qr(t).weekdayMismatch=!0)}}function Xle(t){var e,n,r,i,a,s,l,c,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,s=4,n=Tf(e.GG,t._a[co],h2(qa(),1,4).year),r=Tf(e.W,1),i=Tf(e.E,1),(i<1||i>7)&&(c=!0)):(a=t._locale._week.dow,s=t._locale._week.doy,u=h2(qa(),a,s),n=Tf(e.gg,t._a[co],u.year),r=Tf(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a),r<1||r>sd(n,a,s)?Qr(t)._overflowWeeks=!0:c!=null?Qr(t)._overflowWeekday=!0:(l=gO(n,r,i,a,s),t._a[co]=l.year,t._dayOfYear=l.dayOfYear)}Mn.ISO_8601=function(){},Mn.RFC_2822=function(){};function sb(t){if(t._f===Mn.ISO_8601){wO(t);return}if(t._f===Mn.RFC_2822){SO(t);return}t._a=[],Qr(t).empty=!0;var e=""+t._i,n,r,i,a,s,l=e.length,c=0,u,d;for(i=nO(t._f,t._locale).match(Y7)||[],d=i.length,n=0;n<d;n++)a=i[n],r=(e.match(Poe(a,t))||[])[0],r&&(s=e.substr(0,e.indexOf(r)),s.length>0&&Qr(t).unusedInput.push(s),e=e.slice(e.indexOf(r)+r.length),c+=r.length),wf[a]?(r?Qr(t).empty=!1:Qr(t).unusedTokens.push(a),Loe(a,r,t)):t._strict&&!r&&Qr(t).unusedTokens.push(a);Qr(t).charsLeftOver=l-c,e.length>0&&Qr(t).unusedInput.push(e),t._a[Es]<=12&&Qr(t).bigHour===!0&&t._a[Es]>0&&(Qr(t).bigHour=void 0),Qr(t).parsedDateParts=t._a.slice(0),Qr(t).meridiem=t._meridiem,t._a[Es]=Rle(t._locale,t._a[Es],t._meridiem),u=Qr(t).era,u!==null&&(t._a[co]=t._locale.erasConvertYear(u,t._a[co])),ab(t),rb(t)}function Rle(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function Gle(t){var e,n,r,i,a,s,l=!1,c=t._f.length;if(c===0){Qr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,s=!1,e=$7({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],sb(e),q7(e)&&(s=!0),a+=Qr(e).charsLeftOver,a+=Qr(e).unusedTokens.length*10,Qr(e).score=a,l?a<r&&(r=a,n=e):(r==null||a<r||s)&&(r=a,n=e,s&&(l=!0));Zd(t,n||e)}function Wle(t){if(!t._d){var e=X7(t._i),n=e.day===void 0?e.date:e.day;t._a=QN([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),ab(t)}}function Qle(t){var e=new o2(rb(CO(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function CO(t){var e=t._i,n=t._f;return t._locale=t._locale||od(t._l),e===null||n===void 0&&e===""?q3({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),_c(e)?new o2(rb(e)):(s2(e)?t._d=e:Ic(n)?Gle(t):n?sb(t):Jle(t),q7(t)||(t._d=null),t))}function Jle(t){var e=t._i;Jo(e)?t._d=new Date(Mn.now()):s2(e)?t._d=new Date(e.valueOf()):typeof e=="string"?Yle(t):Ic(e)?(t._a=QN(e.slice(0),function(n){return parseInt(n,10)}),ab(t)):n1(e)?Wle(t):nd(e)?t._d=new Date(e):Mn.createFromInputFallback(t)}function xO(t,e,n,r,i){var a={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(n1(t)&&B7(t)||Ic(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,Qle(a)}function qa(t,e,n,r){return xO(t,e,n,r,!1)}var Zle=Yl("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qa.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:q3()}),ece=Yl("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qa.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:q3()});function TO(t,e){var n,r;if(e.length===1&&Ic(e[0])&&(e=e[0]),!e.length)return qa();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function tce(){var t=[].slice.call(arguments,0);return TO("isBefore",t)}function nce(){var t=[].slice.call(arguments,0);return TO("isAfter",t)}var rce=function(){return Date.now?Date.now():+new Date},m2=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ice(t){var e,n=!1,r,i=m2.length;for(e in t)if(qi(t,e)&&!(cs.call(m2,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[m2[r]]){if(n)return!1;parseFloat(t[m2[r]])!==Ai(t[m2[r]])&&(n=!0)}return!0}function ace(){return this._isValid}function sce(){return Nc(NaN)}function J3(t){var e=X7(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,s=e.day||0,l=e.hour||0,c=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=ice(e),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+s+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=od(),this._bubble()}function Z3(t){return t instanceof J3}function ob(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function oce(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0,s;for(s=0;s<r;s++)Ai(t[s])!==Ai(e[s])&&a++;return a+i}function EO(t,e){mr(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+du(~~(n/60),2)+e+du(~~n%60,2)})}EO("Z",":"),EO("ZZ",""),Qn("Z",K3),Qn("ZZ",K3),fa(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=lb(K3,t)});var lce=/([\+\-]|\d\d)/gi;function lb(t,e){var n=(e||"").match(t),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(lce)||["-",0,0],a=+(i[1]*60)+Ai(i[2]),a===0?0:i[0]==="+"?a:-a)}function cb(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_c(t)||s2(t)?t.valueOf():qa(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Mn.updateOffset(n,!1),n):qa(t).local()}function ub(t){return-Math.round(t._d.getTimezoneOffset())}Mn.updateOffset=function(){};function cce(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=lb(K3,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=ub(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?NO(this,Nc(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Mn.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:ub(this)}function uce(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function dce(t){return this.utcOffset(0,t)}function fce(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ub(this),"m")),this}function hce(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=lb(Foe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function pce(t){return this.isValid()?(t=t?qa(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function gce(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function mce(){if(!Jo(this._isDSTShifted))return this._isDSTShifted;var t={},e;return $7(t,this),t=CO(t),t._a?(e=t._isUTC?cu(t._a):qa(t._a),this._isDSTShifted=this.isValid()&&oce(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function vce(){return this.isValid()?!this._isUTC:!1}function bce(){return this.isValid()?this._isUTC:!1}function IO(){return this.isValid()?this._isUTC&&this._offset===0:!1}var yce=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ace=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nc(t,e){var n=t,r=null,i,a,s;return Z3(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:nd(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=yce.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:Ai(r[fu])*i,h:Ai(r[Es])*i,m:Ai(r[Dc])*i,s:Ai(r[ad])*i,ms:Ai(ob(r[r1]*1e3))*i}):(r=Ace.exec(t))?(i=r[1]==="-"?-1:1,n={y:i1(r[2],i),M:i1(r[3],i),w:i1(r[4],i),d:i1(r[5],i),h:i1(r[6],i),m:i1(r[7],i),s:i1(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=wce(qa(n.from),qa(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new J3(n),Z3(t)&&qi(t,"_locale")&&(a._locale=t._locale),Z3(t)&&qi(t,"_isValid")&&(a._isValid=t._isValid),a}Nc.fn=J3.prototype,Nc.invalid=sce;function i1(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function _O(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function wce(t,e){var n;return t.isValid()&&e.isValid()?(e=cb(e,t),t.isBefore(e)?n=_O(t,e):(n=_O(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function DO(t,e){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(tO(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Nc(n,r),NO(this,i,t),this}}function NO(t,e,n,r){var i=e._milliseconds,a=ob(e._days),s=ob(e._months);t.isValid()&&(r=r??!0,s&&fO(t,d2(t,"Month")+s*n),a&&cO(t,"Date",d2(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&Mn.updateOffset(t,a||s))}var Sce=DO(1,"add"),Cce=DO(-1,"subtract");function OO(t){return typeof t=="string"||t instanceof String}function xce(t){return _c(t)||s2(t)||OO(t)||nd(t)||Ece(t)||Tce(t)||t===null||t===void 0}function Tce(t){var e=n1(t)&&!B7(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=r.length;for(i=0;i<s;i+=1)a=r[i],n=n||qi(t,a);return e&&n}function Ece(t){var e=Ic(t),n=!1;return e&&(n=t.filter(function(r){return!nd(r)&&OO(t)}).length===0),e&&n}function Ice(t){var e=n1(t)&&!B7(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||qi(t,a);return e&&n}function _ce(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Dce(t,e){arguments.length===1&&(arguments[0]?xce(arguments[0])?(t=arguments[0],e=void 0):Ice(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||qa(),r=cb(n,this).startOf("day"),i=Mn.calendarFormat(this,r)||"sameElse",a=e&&(uu(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,qa(n)))}function Nce(){return new o2(this)}function Oce(t,e){var n=_c(t)?t:qa(t);return this.isValid()&&n.isValid()?(e=Kl(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function Fce(t,e){var n=_c(t)?t:qa(t);return this.isValid()&&n.isValid()?(e=Kl(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function kce(t,e,n,r){var i=_c(t)?t:qa(t),a=_c(e)?e:qa(e);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Pce(t,e){var n=_c(t)?t:qa(t),r;return this.isValid()&&n.isValid()?(e=Kl(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function Mce(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Lce(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Bce(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(r=cb(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Kl(e),e){case"year":a=e4(this,r)/12;break;case"month":a=e4(this,r);break;case"quarter":a=e4(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:Xl(a)}function e4(t,e){if(t.date()<e.date())return-e4(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,a;return e-r<0?(i=t.clone().add(n-1,"months"),a=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),a=(e-r)/(i-r)),-(n+a)||0}Mn.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Mn.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Vce(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function qce(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?$3(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):uu(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",$3(n,"Z")):$3(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Uce(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+r+i+a)}function $ce(t){t||(t=this.isUtc()?Mn.defaultFormatUtc:Mn.defaultFormat);var e=$3(this,t);return this.localeData().postformat(e)}function jce(t,e){return this.isValid()&&(_c(t)&&t.isValid()||qa(t).isValid())?Nc({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function zce(t){return this.from(qa(),t)}function Hce(t,e){return this.isValid()&&(_c(t)&&t.isValid()||qa(t).isValid())?Nc({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Yce(t){return this.to(qa(),t)}function FO(t){var e;return t===void 0?this._locale._abbr:(e=od(t),e!=null&&(this._locale=e),this)}var kO=Yl("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function PO(){return this._locale}var t4=1e3,Ef=60*t4,n4=60*Ef,MO=(365*400+97)*24*n4;function If(t,e){return(t%e+e)%e}function LO(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-MO:new Date(t,e,n).valueOf()}function BO(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-MO:Date.UTC(t,e,n)}function Kce(t){var e,n;if(t=Kl(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?BO:LO,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=If(e+(this._isUTC?0:this.utcOffset()*Ef),n4);break;case"minute":e=this._d.valueOf(),e-=If(e,Ef);break;case"second":e=this._d.valueOf(),e-=If(e,t4);break}return this._d.setTime(e),Mn.updateOffset(this,!0),this}function Xce(t){var e,n;if(t=Kl(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?BO:LO,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=n4-If(e+(this._isUTC?0:this.utcOffset()*Ef),n4)-1;break;case"minute":e=this._d.valueOf(),e+=Ef-If(e,Ef)-1;break;case"second":e=this._d.valueOf(),e+=t4-If(e,t4)-1;break}return this._d.setTime(e),Mn.updateOffset(this,!0),this}function Rce(){return this._d.valueOf()-(this._offset||0)*6e4}function Gce(){return Math.floor(this.valueOf()/1e3)}function Wce(){return new Date(this.valueOf())}function Qce(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Jce(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Zce(){return this.isValid()?this.toISOString():null}function eue(){return q7(this)}function tue(){return Zd({},Qr(this))}function nue(){return Qr(this).overflow}function rue(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}mr("N",0,0,"eraAbbr"),mr("NN",0,0,"eraAbbr"),mr("NNN",0,0,"eraAbbr"),mr("NNNN",0,0,"eraName"),mr("NNNNN",0,0,"eraNarrow"),mr("y",["y",1],"yo","eraYear"),mr("y",["yy",2],0,"eraYear"),mr("y",["yyy",3],0,"eraYear"),mr("y",["yyyy",4],0,"eraYear"),Qn("N",db),Qn("NN",db),Qn("NNN",db),Qn("NNNN",pue),Qn("NNNNN",gue),fa(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Qr(n).era=i:Qr(n).invalidEra=t}),Qn("y",Sf),Qn("yy",Sf),Qn("yyy",Sf),Qn("yyyy",Sf),Qn("yo",mue),fa(["y","yy","yyy","yyyy"],co),fa(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[co]=n._locale.eraYearOrdinalParse(t,i):e[co]=parseInt(t,10)});function iue(t,e){var n,r,i,a=this._eras||od("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Mn(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Mn(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function aue(t,e,n){var r,i,a=this.eras(),s,l,c;for(t=t.toUpperCase(),r=0,i=a.length;r<i;++r)if(s=a[r].name.toUpperCase(),l=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(l===t)return a[r];break;case"NNNN":if(s===t)return a[r];break;case"NNNNN":if(c===t)return a[r];break}else if([s,l,c].indexOf(t)>=0)return a[r]}function sue(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Mn(t.since).year():Mn(t.since).year()+(e-t.offset)*n}function oue(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function lue(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function cue(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function uue(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-Mn(i[t].since).year())*n+i[t].offset;return this.year()}function due(t){return qi(this,"_erasNameRegex")||fb.call(this),t?this._erasNameRegex:this._erasRegex}function fue(t){return qi(this,"_erasAbbrRegex")||fb.call(this),t?this._erasAbbrRegex:this._erasRegex}function hue(t){return qi(this,"_erasNarrowRegex")||fb.call(this),t?this._erasNarrowRegex:this._erasRegex}function db(t,e){return e.erasAbbrRegex(t)}function pue(t,e){return e.erasNameRegex(t)}function gue(t,e){return e.erasNarrowRegex(t)}function mue(t,e){return e._eraYearOrdinalRegex||Sf}function fb(){var t=[],e=[],n=[],r=[],i,a,s,l,c,u=this.eras();for(i=0,a=u.length;i<a;++i)s=rd(u[i].name),l=rd(u[i].abbr),c=rd(u[i].narrow),e.push(s),t.push(l),n.push(c),r.push(s),r.push(l),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}mr(0,["gg",2],0,function(){return this.weekYear()%100}),mr(0,["GG",2],0,function(){return this.isoWeekYear()%100});function r4(t,e){mr(0,[t,t.length],0,e)}r4("gggg","weekYear"),r4("ggggg","weekYear"),r4("GGGG","isoWeekYear"),r4("GGGGG","isoWeekYear"),Qn("G",Y3),Qn("g",Y3),Qn("GG",Va,yl),Qn("gg",Va,yl),Qn("GGGG",G7,R7),Qn("gggg",G7,R7),Qn("GGGGG",H3,j3),Qn("ggggg",H3,j3),c2(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=Ai(t)}),c2(["gg","GG"],function(t,e,n,r){e[r]=Mn.parseTwoDigitYear(t)});function vue(t){return VO.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function bue(t){return VO.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function yue(){return sd(this.year(),1,4)}function Aue(){return sd(this.isoWeekYear(),1,4)}function wue(){var t=this.localeData()._week;return sd(this.year(),t.dow,t.doy)}function Sue(){var t=this.localeData()._week;return sd(this.weekYear(),t.dow,t.doy)}function VO(t,e,n,r,i){var a;return t==null?h2(this,r,i).year:(a=sd(t,r,i),e>a&&(e=a),Cue.call(this,t,e,n,r,i))}function Cue(t,e,n,r,i){var a=gO(t,e,n,r,i),s=f2(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}mr("Q",0,"Qo","quarter"),Qn("Q",iO),fa("Q",function(t,e){e[id]=(Ai(t)-1)*3});function xue(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}mr("D",["DD",2],"Do","date"),Qn("D",Va,Cf),Qn("DD",Va,yl),Qn("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),fa(["D","DD"],fu),fa("Do",function(t,e){e[fu]=Ai(t.match(Va)[0])});var qO=xf("Date",!0);mr("DDD",["DDDD",3],"DDDo","dayOfYear"),Qn("DDD",z3),Qn("DDDD",aO),fa(["DDD","DDDD"],function(t,e,n){n._dayOfYear=Ai(t)});function Tue(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}mr("m",["mm",2],0,"minute"),Qn("m",Va,W7),Qn("mm",Va,yl),fa(["m","mm"],Dc);var Eue=xf("Minutes",!1);mr("s",["ss",2],0,"second"),Qn("s",Va,W7),Qn("ss",Va,yl),fa(["s","ss"],ad);var Iue=xf("Seconds",!1);mr("S",0,0,function(){return~~(this.millisecond()/100)}),mr(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),mr(0,["SSS",3],0,"millisecond"),mr(0,["SSSS",4],0,function(){return this.millisecond()*10}),mr(0,["SSSSS",5],0,function(){return this.millisecond()*100}),mr(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),mr(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),mr(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),mr(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Qn("S",z3,iO),Qn("SS",z3,yl),Qn("SSS",z3,aO);var t0,UO;for(t0="SSSS";t0.length<=9;t0+="S")Qn(t0,Sf);function _ue(t,e){e[r1]=Ai(("0."+t)*1e3)}for(t0="S";t0.length<=9;t0+="S")fa(t0,_ue);UO=xf("Milliseconds",!1),mr("z",0,0,"zoneAbbr"),mr("zz",0,0,"zoneName");function Due(){return this._isUTC?"UTC":""}function Nue(){return this._isUTC?"Coordinated Universal Time":""}var Cn=o2.prototype;Cn.add=Sce,Cn.calendar=Dce,Cn.clone=Nce,Cn.diff=Bce,Cn.endOf=Xce,Cn.format=$ce,Cn.from=jce,Cn.fromNow=zce,Cn.to=Hce,Cn.toNow=Yce,Cn.get=Uoe,Cn.invalidAt=nue,Cn.isAfter=Oce,Cn.isBefore=Fce,Cn.isBetween=kce,Cn.isSame=Pce,Cn.isSameOrAfter=Mce,Cn.isSameOrBefore=Lce,Cn.isValid=eue,Cn.lang=kO,Cn.locale=FO,Cn.localeData=PO,Cn.max=ece,Cn.min=Zle,Cn.parsingFlags=tue,Cn.set=$oe,Cn.startOf=Kce,Cn.subtract=Cce,Cn.toArray=Qce,Cn.toObject=Jce,Cn.toDate=Wce,Cn.toISOString=qce,Cn.inspect=Uce,typeof Symbol<"u"&&Symbol.for!=null&&(Cn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Cn.toJSON=Zce,Cn.toString=Vce,Cn.unix=Gce,Cn.valueOf=Rce,Cn.creationData=rue,Cn.eraName=oue,Cn.eraNarrow=lue,Cn.eraAbbr=cue,Cn.eraYear=uue,Cn.year=lO,Cn.isLeapYear=qoe,Cn.weekYear=vue,Cn.isoWeekYear=bue,Cn.quarter=Cn.quarters=xue,Cn.month=hO,Cn.daysInMonth=Woe,Cn.week=Cn.weeks=ile,Cn.isoWeek=Cn.isoWeeks=ale,Cn.weeksInYear=wue,Cn.weeksInWeekYear=Sue,Cn.isoWeeksInYear=yue,Cn.isoWeeksInISOWeekYear=Aue,Cn.date=qO,Cn.day=Cn.days=ble,Cn.weekday=yle,Cn.isoWeekday=Ale,Cn.dayOfYear=Tue,Cn.hour=Cn.hours=Ile,Cn.minute=Cn.minutes=Eue,Cn.second=Cn.seconds=Iue,Cn.millisecond=Cn.milliseconds=UO,Cn.utcOffset=cce,Cn.utc=dce,Cn.local=fce,Cn.parseZone=hce,Cn.hasAlignedHourOffset=pce,Cn.isDST=gce,Cn.isLocal=vce,Cn.isUtcOffset=bce,Cn.isUtc=IO,Cn.isUTC=IO,Cn.zoneAbbr=Due,Cn.zoneName=Nue,Cn.dates=Yl("dates accessor is deprecated. Use date instead.",qO),Cn.months=Yl("months accessor is deprecated. Use month instead",hO),Cn.years=Yl("years accessor is deprecated. Use year instead",lO),Cn.zone=Yl("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",uce),Cn.isDSTShifted=Yl("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",mce);function Oue(t){return qa(t*1e3)}function Fue(){return qa.apply(null,arguments).parseZone()}function $O(t){return t}var Ui=z7.prototype;Ui.calendar=voe,Ui.longDateFormat=woe,Ui.invalidDate=Coe,Ui.ordinal=Eoe,Ui.preparse=$O,Ui.postformat=$O,Ui.relativeTime=_oe,Ui.pastFuture=Doe,Ui.set=goe,Ui.eras=iue,Ui.erasParse=aue,Ui.erasConvertYear=sue,Ui.erasAbbrRegex=fue,Ui.erasNameRegex=due,Ui.erasNarrowRegex=hue,Ui.months=Koe,Ui.monthsShort=Xoe,Ui.monthsParse=Goe,Ui.monthsRegex=Joe,Ui.monthsShortRegex=Qoe,Ui.week=ele,Ui.firstDayOfYear=rle,Ui.firstDayOfWeek=nle,Ui.weekdays=hle,Ui.weekdaysMin=gle,Ui.weekdaysShort=ple,Ui.weekdaysParse=vle,Ui.weekdaysRegex=wle,Ui.weekdaysShortRegex=Sle,Ui.weekdaysMinRegex=Cle,Ui.isPM=Tle,Ui.meridiem=_le;function i4(t,e,n,r){var i=od(),a=cu().set(r,e);return i[n](a,t)}function jO(t,e,n){if(nd(t)&&(e=t,t=void 0),t=t||"",e!=null)return i4(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=i4(t,r,n,"month");return i}function hb(t,e,n,r){typeof t=="boolean"?(nd(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,nd(e)&&(n=e,e=void 0),e=e||"");var i=od(),a=t?i._week.dow:0,s,l=[];if(n!=null)return i4(e,(n+a)%7,r,"day");for(s=0;s<7;s++)l[s]=i4(e,(s+a)%7,r,"day");return l}function kue(t,e){return jO(t,e,"months")}function Pue(t,e){return jO(t,e,"monthsShort")}function Mue(t,e,n){return hb(t,e,n,"weekdays")}function Lue(t,e,n){return hb(t,e,n,"weekdaysShort")}function Bue(t,e,n){return hb(t,e,n,"weekdaysMin")}e0("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=Ai(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),Mn.lang=Yl("moment.lang is deprecated. Use moment.locale instead.",e0),Mn.langData=Yl("moment.langData is deprecated. Use moment.localeData instead.",od);var ld=Math.abs;function Vue(){var t=this._data;return this._milliseconds=ld(this._milliseconds),this._days=ld(this._days),this._months=ld(this._months),t.milliseconds=ld(t.milliseconds),t.seconds=ld(t.seconds),t.minutes=ld(t.minutes),t.hours=ld(t.hours),t.months=ld(t.months),t.years=ld(t.years),this}function zO(t,e,n,r){var i=Nc(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function que(t,e){return zO(this,t,e,1)}function Uue(t,e){return zO(this,t,e,-1)}function HO(t){return t<0?Math.floor(t):Math.ceil(t)}function $ue(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,a,s,l,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=HO(pb(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Xl(t/1e3),r.seconds=i%60,a=Xl(i/60),r.minutes=a%60,s=Xl(a/60),r.hours=s%24,e+=Xl(s/24),c=Xl(YO(e)),n+=c,e-=HO(pb(c)),l=Xl(n/12),n%=12,r.days=e,r.months=n,r.years=l,this}function YO(t){return t*4800/146097}function pb(t){return t*146097/4800}function jue(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Kl(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+YO(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(pb(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function cd(t){return function(){return this.as(t)}}var KO=cd("ms"),zue=cd("s"),Hue=cd("m"),Yue=cd("h"),Kue=cd("d"),Xue=cd("w"),Rue=cd("M"),Gue=cd("Q"),Wue=cd("y"),Que=KO;function Jue(){return Nc(this)}function Zue(t){return t=Kl(t),this.isValid()?this[t+"s"]():NaN}function a1(t){return function(){return this.isValid()?this._data[t]:NaN}}var ede=a1("milliseconds"),tde=a1("seconds"),nde=a1("minutes"),rde=a1("hours"),ide=a1("days"),ade=a1("months"),sde=a1("years");function ode(){return Xl(this.days()/7)}var ud=Math.round,_f={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function lde(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function cde(t,e,n,r){var i=Nc(t).abs(),a=ud(i.as("s")),s=ud(i.as("m")),l=ud(i.as("h")),c=ud(i.as("d")),u=ud(i.as("M")),d=ud(i.as("w")),f=ud(i.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||s<=1&&["m"]||s<n.m&&["mm",s]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,lde.apply(null,h)}function ude(t){return t===void 0?ud:typeof t=="function"?(ud=t,!0):!1}function dde(t,e){return _f[t]===void 0?!1:e===void 0?_f[t]:(_f[t]=e,t==="s"&&(_f.ss=e-1),!0)}function fde(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=_f,i,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},_f,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),a=cde(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var gb=Math.abs;function Df(t){return(t>0)-(t<0)||+t}function a4(){if(!this.isValid())return this.localeData().invalidDate();var t=gb(this._milliseconds)/1e3,e=gb(this._days),n=gb(this._months),r,i,a,s,l=this.asSeconds(),c,u,d,f;return l?(r=Xl(t/60),i=Xl(r/60),t%=60,r%=60,a=Xl(n/12),n%=12,s=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=Df(this._months)!==Df(l)?"-":"",d=Df(this._days)!==Df(l)?"-":"",f=Df(this._milliseconds)!==Df(l)?"-":"",c+"P"+(a?u+a+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+s+"S":"")):"P0D"}var Ni=J3.prototype;Ni.isValid=ace,Ni.abs=Vue,Ni.add=que,Ni.subtract=Uue,Ni.as=jue,Ni.asMilliseconds=KO,Ni.asSeconds=zue,Ni.asMinutes=Hue,Ni.asHours=Yue,Ni.asDays=Kue,Ni.asWeeks=Xue,Ni.asMonths=Rue,Ni.asQuarters=Gue,Ni.asYears=Wue,Ni.valueOf=Que,Ni._bubble=$ue,Ni.clone=Jue,Ni.get=Zue,Ni.milliseconds=ede,Ni.seconds=tde,Ni.minutes=nde,Ni.hours=rde,Ni.days=ide,Ni.weeks=ode,Ni.months=ade,Ni.years=sde,Ni.humanize=fde,Ni.toISOString=a4,Ni.toString=a4,Ni.toJSON=a4,Ni.locale=FO,Ni.localeData=PO,Ni.toIsoString=Yl("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",a4),Ni.lang=kO,mr("X",0,0,"unix"),mr("x",0,0,"valueOf"),Qn("x",Y3),Qn("X",koe),fa("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),fa("x",function(t,e,n){n._d=new Date(Ai(t))});//! moment.js
|
|
2318
|
-
Mn.version="2.30.1",hoe(qa),Mn.fn=Cn,Mn.min=tce,Mn.max=nce,Mn.now=rce,Mn.utc=cu,Mn.unix=Oue,Mn.months=kue,Mn.isDate=s2,Mn.locale=e0,Mn.invalid=q3,Mn.duration=Nc,Mn.isMoment=_c,Mn.weekdays=Mue,Mn.parseZone=Fue,Mn.localeData=od,Mn.isDuration=Z3,Mn.monthsShort=Pue,Mn.weekdaysMin=Bue,Mn.defineLocale=nb,Mn.updateLocale=Fle,Mn.locales=kle,Mn.weekdaysShort=Lue,Mn.normalizeUnits=Kl,Mn.relativeTimeRounding=ude,Mn.relativeTimeThreshold=dde,Mn.calendarFormat=_ce,Mn.prototype=Cn,Mn.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const mb=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],s4=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/,hu=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+\$,\\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%\/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function hde(t){try{JSON.parse(t)}catch{return!1}return!0}function XO(t){if(t<26)return mb[t];{const e=Math.floor(t/26)-1,n=t%26;return mb[e]+mb[n]}}function pde(t,e){const n=Mn(t,"YYYY-MM-DD HH:mm:ss"),i=Mn(e,"YYYY-MM-DD HH:mm:ss").diff(n),a=Mn.duration(i),s=a.hours(),l=a.minutes(),c=a.seconds();return(s===0?"":`${s} hours `)+(l===0?"":`${l} minutes `)+(c===0?"":`${c} seconds `)}const gde=t=>{var W,ee,Q,H,X,pe,ge,Ae,ye,oe,re;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{task_status:f,taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,TASK_PUBLISHED:w}=Ar(),{userSelectedLanguage:x}=sn(),[C,T]=F.useState(!1),[S,E]=F.useState(""),[_,P]=F.useState(0),[O,k]=F.useState(!1),M=()=>{k(!0)},Y=()=>{k(!1)};F.useEffect(()=>{C||G();const B=Gt.addListener("clearRepeatableFields",se=>{se===(a==null?void 0:a.uuid)&&(E(""),P(0),e.isValid=0)}),ne=Gt.addListener("onSubmitUserForm",()=>{var se;(se=e==null?void 0:e.attributes)!=null&&se.required?S!==""&&s4.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ne.remove(),B.remove()}});const[N,z]=F.useState(!1),$=B=>{z(B)},le=()=>{z(!1)},G=()=>{var B,ne,se;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const me=[...a.repeatableFields],Ne=It.findIndex(me,function(we){return we.uuid===(e==null?void 0:e.uuid)});Ne>=0&&me[Ne].fieldData?E(me[Ne].fieldData):E("")}}else{const me=A;if(me!=null&&me.length){for(const Ne of me)if(Ne.fieldId===t.field.uuid&&((B=Ne==null?void 0:Ne.postData[0])==null?void 0:B.postValue)!==""&&((ne=Ne==null?void 0:Ne.postData[0])!=null&&ne.postValue)){E((se=Ne==null?void 0:Ne.postData[0])==null?void 0:se.postValue),T(!0);break}}}T(!0)},R=B=>{E(B);const ne=A,se=It.cloneDeep(h);if(ne!==null){if(B!==""&&s4.test(B)===!0){if(se[e==null?void 0:e.uuid]=B,(ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:B})}else if(delete se[e==null?void 0:e.uuid],(ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){p(se);const me=Object.keys(se).length;v(me)}},ce=(B,ne,se,me)=>{var Ne;if(E(me),A!==null){const we=[...A],ve=It.findIndex(we,function(Te){return Te.rowId===(a==null?void 0:a.uuid)});let ue=(Ne=A[ve])==null?void 0:Ne.repeatableFields;ue={...ue,[se==null?void 0:se.uuid]:me},we[ve]={...we[ve],repeatableFields:ue},m(we),me!==""&&s4.test(me)===!0?e.isValid=1:e.isValid=0}},q=o.jsxs("div",{onMouseOver:M,onMouseOut:Y,children:[d&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:$,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(W=e==null?void 0:e.headerText)==null?void 0:W[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-700 text-xl",children:[o.jsx(da,{...t,update:s,value:l}),((ee=e==null?void 0:e.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(Q=e==null?void 0:e.label)==null?void 0:Q[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-2",children:(e==null?void 0:e.showToolTip)&&o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(H=e==null?void 0:e.toolTip)==null?void 0:H[x==null?void 0:x.type],position:"right"})})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((pe=(X=e==null?void 0:e.icon)==null?void 0:X.properties)==null?void 0:pe.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(ge=e==null?void 0:e.placeholder)==null?void 0:ge[x==null?void 0:x.type],value:S,onFocus:()=>P(1),onChange:B=>{a!=null&&a.rowIsRepeatable?ce(r,i,{uuid:e.uuid},B.target.value):R(B.target.value)},className:_===1&&((Ae=e==null?void 0:e.attributes)!=null&&Ae.required)?S?"valid":"invalid":"valid'",readOnly:c})]}),((ye=e==null?void 0:e.attributes)==null?void 0:ye.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:_===1&&(S===null||S==="")?(oe=e==null?void 0:e.validationMesssage)==null?void 0:oe[x==null?void 0:x.language]:""})}),S!==""&&_===1&&s4.test(S)===!1&&o.jsx("small",{className:"error",children:"Please enter correct email"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(re=e==null?void 0:e.helperText)==null?void 0:re[x==null?void 0:x.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[N===!0&&o.jsx(Zi,{visibilty:N,closeSettingFieldSidebar:le,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:q})]})},mde=t=>{var H,X,pe,ge,Ae,ye,oe,re,B;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{task_status:p,taskRegisterData:v,updateTaskRegisterData:m,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:C}=Ar(),[T,S]=F.useState(!1),[E,_]=F.useState(""),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),[z,$]=F.useState(!1),le=()=>{N(!0)},G=()=>{N(!1)},R=ne=>{S(ne)},ce=()=>{S(!1)},q=()=>{var se,me,Ne;const ne=x;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const we=[...l.repeatableFields],ve=It.findIndex(we,function(ue){return ue.uuid===(e==null?void 0:e.uuid)});ve>=0&&we[ve].fieldData?_(we[ve].fieldData):(e.isValid=0,_(""))}}else if(ne!=null&&ne.length){for(const we of ne)if(we.fieldId===t.field.uuid&&((se=we==null?void 0:we.postData[0])!=null&&se.postValue)&&((me=we==null?void 0:we.postData[0])==null?void 0:me.postValue)!==""){_((Ne=we==null?void 0:we.postData[0])==null?void 0:Ne.postValue),M(!0);break}}M(!0)},W=(ne,se,me,Ne)=>{var we;if(x!=null&&x.length){const ve=[...x],ue=It.findIndex(ve,function(_e){return _e.rowId===(l==null?void 0:l.uuid)});let Te=(we=x[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},w(ve)}_(Ne),Ne!==""?e.isValid=1:e.isValid=0,h(ne,se,a,s,n,e)};F.useEffect(()=>{k||q();const ne=Gt.addListener("clearRepeatableFields",ve=>{ve===(l==null?void 0:l.uuid)&&(_(""),O(0),e.isValid=0)}),se=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required?E?e.isValid=1:e.isValid=0:e.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",ve=>{e.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),Ne=Gt.addListener("OnGetFieldValue",ve=>{var Te;const ue=(Te=ve==null?void 0:ve.repeatableColumn)==null?void 0:Te.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(e==null?void 0:e.uuid));ue!=null&&ue.length}),we=Gt.addListener("onUpdateField",()=>{$(!z)});return()=>{we.remove(),se.remove(),me.remove(),Ne.remove(),ne.remove()}});const ee=ne=>{var Ne,we;_(ne.target.value);const se=x,me=It.cloneDeep(v);if(se!==null){if((Ne=ne==null?void 0:ne.target)!=null&&Ne.value){if(me[e==null?void 0:e.uuid]=(we=ne==null?void 0:ne.target)==null?void 0:we.value,(se==null?void 0:se.length)>0)for(const ve of se)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:ne.target.value})}else if(delete me[e==null?void 0:e.uuid],(se==null?void 0:se.length)>0)for(const ve of se)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){m(me);const ve=Object.keys(me).length;A(ve)}},Q=o.jsxs("div",{onMouseOver:le,onMouseOut:G,children:[d&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 field-form-builder ":"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[f==null?void 0:f.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((X=e==null?void 0:e.attributes)==null?void 0:X.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(pe=e==null?void 0:e.label)==null?void 0:pe[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ge=e==null?void 0:e.toolTip)==null?void 0:ge[f==null?void 0:f.type],position:"right"})})]}),o.jsx(lo,{rows:e==null?void 0:e.textareaRows,cols:e==null?void 0:e.textareaCols,autoResize:e==null?void 0:e.resizable,id:e==null?void 0:e.uuid,placeholder:(Ae=e==null?void 0:e.placeholder)==null?void 0:Ae[f==null?void 0:f.type],value:E,onFocus:()=>O(1),onChange:ne=>{l!=null&&l.rowIsRepeatable?W(r,i,e,ne.target.value):ee(ne)},className:P===1&&((ye=e==null?void 0:e.attributes)!=null&&ye.required)?E?"valid":"invalid":"valid",readOnly:c}),o.jsx("div",{children:((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("small",{className:"error",children:P===1&&!E?(re=e==null?void 0:e.validationMesssage)==null?void 0:re[f==null?void 0:f.type]:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(B=e==null?void 0:e.helperText)==null?void 0:B[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Zi,{visibilty:T,closeSettingFieldSidebar:ce,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:Q})]})},vde={},vb=t=>{var _,P,O,k;const{isAdmin:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,conditionIndex:f,ruleIndex:h,condition:p,page:v,section:m,row:A,column:w}=t,x=F.useRef(null),[{isDragging:C},T]=aa({type:mx,item:{type:mx,uuid:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),S=C?0:1;T(x);const E=(M,Y,N,z,$,le,G)=>{const R=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(Vc,{type:"inline-conditional",field:M,data:M,path:Y,page:v,section:m,row:A,column:w,pageIndex:N,sectionIndex:z,rowIndex:$,columnIndex:le,fieldIndex:G,isAdmin:e,fieldContainer:R},M.uuid)};return o.jsxs("div",{ref:r===!0?x:null,style:{...vde,opacity:S},className:"draggable column",children:[p&&((_=p.children)==null?void 0:_.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),p&&p.children&&((P=p.children)==null?void 0:P.length)>0&&p.children.map((M,Y)=>{var N;return o.jsxs(F.Fragment,{children:[r===!0&&o.jsx(Fr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${Y}`,childrenCount:(N=p==null?void 0:p.children)==null?void 0:N.length,droppedField:p},onDrop:i}),E(M,`${s}-${h}-${f}-${Y}`,l,c,u,d,Y)]},M.uuid)}),r===!0&&o.jsx(Fr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(O=p==null?void 0:p.children)==null?void 0:O.length}`,childrenCount:(k=p==null?void 0:p.children)==null?void 0:k.length,droppedField:p},onDrop:i,isLast:!0})]})},n0=t=>{const{inputValue:e,condition:n,ruleIndex:r,conditionIndex:i,field:a,section:s,page:l,row:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,isConditionTrue:p}=t,{taskRegisterData:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,updateProgressDataValuesHook:w}=Ar(),x=F.useCallback((C,T,S)=>{var _,P,O;const E=A;if(E!=null&&E.length){const k=v,M=(_=a==null?void 0:a.inlineConditionalRules)==null?void 0:_.rules[T].conditions[S].children;for(const[N,z]of M.entries()){(P=z==null?void 0:z.attributes)!=null&&P.required;const $=It.findIndex(E,function(le){return le.fieldId===z.uuid});C?$===-1&&(E.push({postData:[],tabId:l.uuid,tabIndex:u,...a.inlineConditionalRules?{inlineConditionalRules:a.inlineConditionalRules}:{},...a.conditionalTabRules?{conditionalTabRules:a.conditionalTabRules}:{},...a.conditionalSectionRules?{conditionalSectionRules:a.conditionalSectionRules}:{},sectionId:s.uuid,sectionIndex:d,sectionHeading:s.heading,subHeadingText:s.subHeadingText,reviewerChecklist:a==null?void 0:a.reviewerChecklist,rowId:c.uuid,rowIndex:f,columnId:s.uuid,columnIndex:h,inlineConditionalField:!0,fieldIndex:N,fieldId:z.uuid,fieldInputType:a.componentType,fieldTitle:(O=a.label)==null?void 0:O.english,fieldDescription:a.description||null,fieldHelperText:a.helperText||null,fieldHeaderText:a.headerText||null,fieldFooterText:a.footerText||null,fieldTitleAbb:a.abbreviationLabel||a.label,question_abb_table:a.textForTable||null,language:"english",isHiddenfield:a.isHidden&&a.isHidden===1?1:0,isHiddenSection:s.isHidden&&s.isHidden===1?1:0}),k[z==null?void 0:z.uuid]&&delete k[z==null?void 0:z.uuid]):(k[z==null?void 0:z.uuid]&&delete k[z==null?void 0:z.uuid],$>=0&&E.splice($,1))}const Y=Object.keys(k).length;w({progressMaxValue:E==null?void 0:E.length,progressValue:Y}),m(E)}},[h,a.abbreviationLabel,a.componentType,a.conditionalSectionRules,a.conditionalTabRules,a.description,a.footerText,a.headerText,a.helperText,a.inlineConditionalRules,a.isHidden,a.label,a==null?void 0:a.reviewerChecklist,a.textForTable,l.uuid,u,c.uuid,f,s.heading,s.isHidden,s.subHeadingText,s.uuid,d,v,w,m,A]);return F.useEffect(()=>(x(p,r,i),()=>{}),[i,e,p,r,x]),o.jsx("div",{children:p&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};function v2(t){"@babel/helpers - typeof";return v2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v2(t)}function bde(t,e){if(v2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(v2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yde(t){var e=bde(t,"string");return v2(e)=="symbol"?e:e+""}function bb(t,e,n){return(e=yde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ade={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return ft("p-tag p-component",bb(bb({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},wde=`
|
|
2318
|
+
Mn.version="2.30.1",hoe(qa),Mn.fn=Cn,Mn.min=tce,Mn.max=nce,Mn.now=rce,Mn.utc=cu,Mn.unix=Oue,Mn.months=kue,Mn.isDate=s2,Mn.locale=e0,Mn.invalid=q3,Mn.duration=Nc,Mn.isMoment=_c,Mn.weekdays=Mue,Mn.parseZone=Fue,Mn.localeData=od,Mn.isDuration=Z3,Mn.monthsShort=Pue,Mn.weekdaysMin=Bue,Mn.defineLocale=nb,Mn.updateLocale=Fle,Mn.locales=kle,Mn.weekdaysShort=Lue,Mn.normalizeUnits=Kl,Mn.relativeTimeRounding=ude,Mn.relativeTimeThreshold=dde,Mn.calendarFormat=_ce,Mn.prototype=Cn,Mn.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const mb=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],s4=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/,hu=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+\$,\\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%\/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function hde(t){try{JSON.parse(t)}catch{return!1}return!0}function XO(t){if(t<26)return mb[t];{const e=Math.floor(t/26)-1,n=t%26;return mb[e]+mb[n]}}function pde(t,e){const n=Mn(t,"YYYY-MM-DD HH:mm:ss"),i=Mn(e,"YYYY-MM-DD HH:mm:ss").diff(n),a=Mn.duration(i),s=a.hours(),l=a.minutes(),c=a.seconds();return(s===0?"":`${s} hours `)+(l===0?"":`${l} minutes `)+(c===0?"":`${c} seconds `)}const gde=t=>{var W,ee,Q,H,X,pe,ge,Ae,ye,oe,re;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{task_status:f,taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,TASK_PUBLISHED:w}=Ar(),{userSelectedLanguage:x}=sn(),[C,T]=F.useState(!1),[S,E]=F.useState(""),[_,P]=F.useState(0),[O,k]=F.useState(!1),M=()=>{k(!0)},Y=()=>{k(!1)};F.useEffect(()=>{C||G();const B=Gt.addListener("clearRepeatableFields",se=>{se===(a==null?void 0:a.uuid)&&(E(""),P(0),e.isValid=0)}),ne=Gt.addListener("onSubmitUserForm",()=>{var se;(se=e==null?void 0:e.attributes)!=null&&se.required?S!==""&&s4.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ne.remove(),B.remove()}});const[N,z]=F.useState(!1),$=B=>{z(B)},le=()=>{z(!1)},G=()=>{var B,ne,se;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const me=[...a.repeatableFields],Ne=It.findIndex(me,function(we){return we.uuid===(e==null?void 0:e.uuid)});Ne>=0&&me[Ne].fieldData?E(me[Ne].fieldData):E("")}}else{const me=A;if(me!=null&&me.length){for(const Ne of me)if(Ne.fieldId===t.field.uuid&&((B=Ne==null?void 0:Ne.postData[0])==null?void 0:B.postValue)!==""&&((ne=Ne==null?void 0:Ne.postData[0])!=null&&ne.postValue)){E((se=Ne==null?void 0:Ne.postData[0])==null?void 0:se.postValue),T(!0);break}}}T(!0)},R=B=>{E(B);const ne=A,se=It.cloneDeep(h);if(ne!==null){if(B!==""&&s4.test(B)===!0){if(se[e==null?void 0:e.uuid]=B,(ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:B})}else if(delete se[e==null?void 0:e.uuid],(ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){p(se);const me=Object.keys(se).length;v(me)}},ce=(B,ne,se,me)=>{var Ne;if(E(me),A!==null){const we=[...A],ve=It.findIndex(we,function(Te){return Te.rowId===(a==null?void 0:a.uuid)});let ue=(Ne=A[ve])==null?void 0:Ne.repeatableFields;ue={...ue,[se==null?void 0:se.uuid]:me},we[ve]={...we[ve],repeatableFields:ue},m(we),me!==""&&s4.test(me)===!0?e.isValid=1:e.isValid=0}},q=o.jsxs("div",{onMouseOver:M,onMouseOut:Y,children:[d&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:$,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(W=e==null?void 0:e.headerText)==null?void 0:W[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-700 text-xl",children:[o.jsx(da,{...t,update:s,value:l}),((ee=e==null?void 0:e.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(Q=e==null?void 0:e.label)==null?void 0:Q[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-2",children:(e==null?void 0:e.showToolTip)&&o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(H=e==null?void 0:e.toolTip)==null?void 0:H[x==null?void 0:x.type],position:"right"})})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((pe=(X=e==null?void 0:e.icon)==null?void 0:X.properties)==null?void 0:pe.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(ge=e==null?void 0:e.placeholder)==null?void 0:ge[x==null?void 0:x.type],value:S,onFocus:()=>P(1),onChange:B=>{a!=null&&a.rowIsRepeatable?ce(r,i,{uuid:e.uuid},B.target.value):R(B.target.value)},className:_===1&&((Ae=e==null?void 0:e.attributes)!=null&&Ae.required)?S?"valid":"invalid":"valid'",disabled:u,readOnly:c})]}),((ye=e==null?void 0:e.attributes)==null?void 0:ye.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:_===1&&(S===null||S==="")?(oe=e==null?void 0:e.validationMesssage)==null?void 0:oe[x==null?void 0:x.language]:""})}),S!==""&&_===1&&s4.test(S)===!1&&o.jsx("small",{className:"error",children:"Please enter correct email"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(re=e==null?void 0:e.helperText)==null?void 0:re[x==null?void 0:x.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[N===!0&&o.jsx(Zi,{visibilty:N,closeSettingFieldSidebar:le,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:q})]})},mde=t=>{var H,X,pe,ge,Ae,ye,oe,re,B;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{task_status:p,taskRegisterData:v,updateTaskRegisterData:m,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:C}=Ar(),[T,S]=F.useState(!1),[E,_]=F.useState(""),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),[z,$]=F.useState(!1),le=()=>{N(!0)},G=()=>{N(!1)},R=ne=>{S(ne)},ce=()=>{S(!1)},q=()=>{var se,me,Ne;const ne=x;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const we=[...l.repeatableFields],ve=It.findIndex(we,function(ue){return ue.uuid===(e==null?void 0:e.uuid)});ve>=0&&we[ve].fieldData?_(we[ve].fieldData):(e.isValid=0,_(""))}}else if(ne!=null&&ne.length){for(const we of ne)if(we.fieldId===t.field.uuid&&((se=we==null?void 0:we.postData[0])!=null&&se.postValue)&&((me=we==null?void 0:we.postData[0])==null?void 0:me.postValue)!==""){_((Ne=we==null?void 0:we.postData[0])==null?void 0:Ne.postValue),M(!0);break}}M(!0)},W=(ne,se,me,Ne)=>{var we;if(x!=null&&x.length){const ve=[...x],ue=It.findIndex(ve,function(_e){return _e.rowId===(l==null?void 0:l.uuid)});let Te=(we=x[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},w(ve)}_(Ne),Ne!==""?e.isValid=1:e.isValid=0,h(ne,se,a,s,n,e)};F.useEffect(()=>{k||q();const ne=Gt.addListener("clearRepeatableFields",ve=>{ve===(l==null?void 0:l.uuid)&&(_(""),O(0),e.isValid=0)}),se=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required?E?e.isValid=1:e.isValid=0:e.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",ve=>{e.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),Ne=Gt.addListener("OnGetFieldValue",ve=>{var Te;const ue=(Te=ve==null?void 0:ve.repeatableColumn)==null?void 0:Te.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(e==null?void 0:e.uuid));ue!=null&&ue.length}),we=Gt.addListener("onUpdateField",()=>{$(!z)});return()=>{we.remove(),se.remove(),me.remove(),Ne.remove(),ne.remove()}});const ee=ne=>{var Ne,we;_(ne.target.value);const se=x,me=It.cloneDeep(v);if(se!==null){if((Ne=ne==null?void 0:ne.target)!=null&&Ne.value){if(me[e==null?void 0:e.uuid]=(we=ne==null?void 0:ne.target)==null?void 0:we.value,(se==null?void 0:se.length)>0)for(const ve of se)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:ne.target.value})}else if(delete me[e==null?void 0:e.uuid],(se==null?void 0:se.length)>0)for(const ve of se)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){m(me);const ve=Object.keys(me).length;A(ve)}},Q=o.jsxs("div",{onMouseOver:le,onMouseOut:G,children:[d&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 field-form-builder ":"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[f==null?void 0:f.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((X=e==null?void 0:e.attributes)==null?void 0:X.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(pe=e==null?void 0:e.label)==null?void 0:pe[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ge=e==null?void 0:e.toolTip)==null?void 0:ge[f==null?void 0:f.type],position:"right"})})]}),o.jsx(lo,{rows:e==null?void 0:e.textareaRows,cols:e==null?void 0:e.textareaCols,autoResize:e==null?void 0:e.resizable,id:e==null?void 0:e.uuid,placeholder:(Ae=e==null?void 0:e.placeholder)==null?void 0:Ae[f==null?void 0:f.type],value:E,onFocus:()=>O(1),onChange:ne=>{l!=null&&l.rowIsRepeatable?W(r,i,e,ne.target.value):ee(ne)},disabled:u||c,className:P===1&&((ye=e==null?void 0:e.attributes)!=null&&ye.required)?E?"valid":"invalid":"valid",readOnly:c}),o.jsx("div",{children:((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("small",{className:"error",children:P===1&&!E?(re=e==null?void 0:e.validationMesssage)==null?void 0:re[f==null?void 0:f.type]:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(B=e==null?void 0:e.helperText)==null?void 0:B[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Zi,{visibilty:T,closeSettingFieldSidebar:ce,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:Q})]})},vde={},vb=t=>{var _,P,O,k;const{isAdmin:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,conditionIndex:f,ruleIndex:h,condition:p,page:v,section:m,row:A,column:w}=t,x=F.useRef(null),[{isDragging:C},T]=aa({type:mx,item:{type:mx,uuid:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),S=C?0:1;T(x);const E=(M,Y,N,z,$,le,G)=>{const R=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(Vc,{type:"inline-conditional",field:M,data:M,path:Y,page:v,section:m,row:A,column:w,pageIndex:N,sectionIndex:z,rowIndex:$,columnIndex:le,fieldIndex:G,isAdmin:e,fieldContainer:R},M.uuid)};return o.jsxs("div",{ref:r===!0?x:null,style:{...vde,opacity:S},className:"draggable column",children:[p&&((_=p.children)==null?void 0:_.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),p&&p.children&&((P=p.children)==null?void 0:P.length)>0&&p.children.map((M,Y)=>{var N;return o.jsxs(F.Fragment,{children:[r===!0&&o.jsx(Fr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${Y}`,childrenCount:(N=p==null?void 0:p.children)==null?void 0:N.length,droppedField:p},onDrop:i}),E(M,`${s}-${h}-${f}-${Y}`,l,c,u,d,Y)]},M.uuid)}),r===!0&&o.jsx(Fr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(O=p==null?void 0:p.children)==null?void 0:O.length}`,childrenCount:(k=p==null?void 0:p.children)==null?void 0:k.length,droppedField:p},onDrop:i,isLast:!0})]})},n0=t=>{const{inputValue:e,condition:n,ruleIndex:r,conditionIndex:i,field:a,section:s,page:l,row:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,isConditionTrue:p}=t,{taskRegisterData:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,updateProgressDataValuesHook:w}=Ar(),x=F.useCallback((C,T,S)=>{var _,P,O;const E=A;if(E!=null&&E.length){const k=v,M=(_=a==null?void 0:a.inlineConditionalRules)==null?void 0:_.rules[T].conditions[S].children;for(const[N,z]of M.entries()){(P=z==null?void 0:z.attributes)!=null&&P.required;const $=It.findIndex(E,function(le){return le.fieldId===z.uuid});C?$===-1&&(E.push({postData:[],tabId:l.uuid,tabIndex:u,...a.inlineConditionalRules?{inlineConditionalRules:a.inlineConditionalRules}:{},...a.conditionalTabRules?{conditionalTabRules:a.conditionalTabRules}:{},...a.conditionalSectionRules?{conditionalSectionRules:a.conditionalSectionRules}:{},sectionId:s.uuid,sectionIndex:d,sectionHeading:s.heading,subHeadingText:s.subHeadingText,reviewerChecklist:a==null?void 0:a.reviewerChecklist,rowId:c.uuid,rowIndex:f,columnId:s.uuid,columnIndex:h,inlineConditionalField:!0,fieldIndex:N,fieldId:z.uuid,fieldInputType:a.componentType,fieldTitle:(O=a.label)==null?void 0:O.english,fieldDescription:a.description||null,fieldHelperText:a.helperText||null,fieldHeaderText:a.headerText||null,fieldFooterText:a.footerText||null,fieldTitleAbb:a.abbreviationLabel||a.label,question_abb_table:a.textForTable||null,language:"english",isHiddenfield:a.isHidden&&a.isHidden===1?1:0,isHiddenSection:s.isHidden&&s.isHidden===1?1:0}),k[z==null?void 0:z.uuid]&&delete k[z==null?void 0:z.uuid]):(k[z==null?void 0:z.uuid]&&delete k[z==null?void 0:z.uuid],$>=0&&E.splice($,1))}const Y=Object.keys(k).length;w({progressMaxValue:E==null?void 0:E.length,progressValue:Y}),m(E)}},[h,a.abbreviationLabel,a.componentType,a.conditionalSectionRules,a.conditionalTabRules,a.description,a.footerText,a.headerText,a.helperText,a.inlineConditionalRules,a.isHidden,a.label,a==null?void 0:a.reviewerChecklist,a.textForTable,l.uuid,u,c.uuid,f,s.heading,s.isHidden,s.subHeadingText,s.uuid,d,v,w,m,A]);return F.useEffect(()=>(x(p,r,i),()=>{}),[i,e,p,r,x]),o.jsx("div",{children:p&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};function v2(t){"@babel/helpers - typeof";return v2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v2(t)}function bde(t,e){if(v2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(v2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yde(t){var e=bde(t,"string");return v2(e)=="symbol"?e:e+""}function bb(t,e,n){return(e=yde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ade={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return ft("p-tag p-component",bb(bb({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},wde=`
|
|
2319
2319
|
@layer primereact {
|
|
2320
2320
|
.p-tag {
|
|
2321
2321
|
display: inline-flex;
|
|
@@ -2333,7 +2333,7 @@ Mn.version="2.30.1",hoe(qa),Mn.fn=Cn,Mn.min=tce,Mn.max=nce,Mn.now=rce,Mn.utc=cu,
|
|
|
2333
2333
|
border-radius: 10rem;
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
|
-
`,o4=Bn.extend({defaultProps:{__TYPE:"Tag",value:null,severity:null,rounded:!1,icon:null,style:null,className:null,children:void 0},css:{classes:Ade,styles:wde}});function RO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sde(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?RO(Object(n),!0).forEach(function(r){bb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var pu=b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=o4.getProps(t,r),a=o4.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;li(o4.css.styles,c,{name:"tag"});var u=b.useRef(null),d=n({className:l("icon")},s("icon")),f=nr.getJSXIcon(i.icon,Sde({},d),{props:i});b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return u.current}}});var h=n({ref:u,className:ft(i.className,l("root")),style:i.style},o4.getOtherProps(i),s("root")),p=n({className:l("value")},s("value"));return b.createElement("span",h,f,b.createElement("span",p,i.value),b.createElement("span",null,i.children))});pu.displayName="Tag";const Cde=t=>{var Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,section:c,page:u,isDisabled:d}=t,{isAdmin:f,isBuilderMode:h}=Ht(),{pageSettingUpdate:p,formBuilderFormLayout:v,userSelectedLanguage:m,fieldSettingUpdate:A}=sn(),{task_status:w,taskRegisterData:x,updateTaskRegisterData:C,updateTaskProgressValue:T,updateUserFormDataSubmit:S,userTaskSubmitFormData:E,TASK_PUBLISHED:_}=Ar(),[P,O]=F.useState(!1),[k,M]=F.useState(!1),[Y,N]=F.useState(null),[z,$]=F.useState(0),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=K=>{O(K)},W=()=>{O(!1)},ee=()=>{var K,Ee,be,he;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const fe=[...a.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(r==null?void 0:r.uuid)});xe>=0&&fe[xe].fieldData?N(Number(fe[xe].fieldData)||null):N(null)}}else{const fe=E,xe=It.cloneDeep(x);if(fe!=null&&fe.length){for(const Me of fe)if(Me.fieldId===t.field.uuid&&((K=Me==null?void 0:Me.postData)!=null&&K.length)){N((Ee=Me==null?void 0:Me.postData[0])==null?void 0:Ee.postValue),xe[r==null?void 0:r.uuid]=(be=Me==null?void 0:Me.postData[0])==null?void 0:be.postValue;const Be=Object.keys(xe).length;T(Be);const Je=(he=Me==null?void 0:Me.postData[0])==null?void 0:he.postValue;r==null||r.conditionalTabRules.rules.map(st=>{var ut;(ut=st==null?void 0:st.conditions)==null||ut.map(St=>{if(Je===(St==null?void 0:St.option)){const zt=It.findIndex(v,Lt=>{var mn;return Lt.uuid===((mn=St==null?void 0:St.tab)==null?void 0:mn.uuid)}),pn=v[zt];pn.isHidden=!1,p(zt,pn)}})});break}}}setTimeout(()=>{M(!0)},2e3)},Q=K=>{var xe,Me;N(K.target.value);const Ee={value:K.target.value};H(Ee),X(Ee);const be=E,he=It.cloneDeep(x);if((xe=K==null?void 0:K.target)!=null&&xe.value&&(be==null?void 0:be.length)>0)for(const Be of be)Be.fieldId===t.field.uuid&&(he[r==null?void 0:r.uuid]=(Me=K==null?void 0:K.target)==null?void 0:Me.value,Be.postData[0]={postValue:K.target.value});else delete he[r==null?void 0:r.uuid];C(he);const fe=Object.keys(he).length;T(fe)};F.useEffect(()=>{k||ee();const K=Gt.addListener("clearRepeatableFields",he=>{he===(a==null?void 0:a.uuid)&&(N(null),$(0),r.isValid=0,A(e,n,s,l,i,r))}),Ee=Gt.addListener("onSubmitUserForm",()=>{var he;(he=r==null?void 0:r.attributes)!=null&&he.required?Y?r.isValid=1:r.isValid=0:r.isValid=1}),be=Gt.addListener("OnInvalidFieldCatch",he=>{r.uuid===(he==null?void 0:he.fieldId)?$(1):$(0)});return()=>{Ee.remove(),be.remove(),K.remove()}});const H=K=>{const Ee=K.value;r==null||r.conditionalTabRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(v,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.tab)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=v[xe];Me.isHidden=!1,p(xe,Me)}else{let Me=v[xe];Me={...Me,isHidden:!0},p(xe,Me)}})})},X=K=>{const Ee=K.value;r==null||r.conditionalSectionRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(v,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.section)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=v[xe];Me.isHidden=!1,p(xe,Me)}else{let Me=v[xe];Me={...Me,isHidden:!0},p(xe,Me)}})})},pe=(K,Ee)=>{var be;if(E){const he=[...E],fe=It.findIndex(he,function(Me){return Me.rowId===(a==null?void 0:a.uuid)});let xe=(be=E[fe])==null?void 0:be.repeatableFields;xe={...xe,[K==null?void 0:K.uuid]:Ee},he[fe]={...he[fe],repeatableFields:xe},S(he)}N(Ee),Ee!==null?K.isValid=1:K.isValid=0},ge=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[h&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${h&&" card py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:h?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(Ae=r==null?void 0:r.headerText)==null?void 0:Ae[m==null?void 0:m.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:r.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ye=r==null?void 0:r.attributes)==null?void 0:ye.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(oe=r==null?void 0:r.label)==null?void 0:oe[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(re=r==null?void 0:r.toolTip)==null?void 0:re[m==null?void 0:m.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(r==null?void 0:r.iconAlignment),children:[(r==null?void 0:r.showIcon)&&o.jsx("i",{className:"pi pi-"+((ne=(B=r==null?void 0:r.icon)==null?void 0:B.properties)==null?void 0:ne.name)}),o.jsx(La,{onFocus:()=>$(1),onChange:K=>{a!=null&&a.rowIsRepeatable?pe(r,K.target.value):Q(K)},options:r==null?void 0:r.options,optionLabel:`optionText.${m.type}`,value:Y,placeholder:(se=r==null?void 0:r.placeholder)==null?void 0:se[m==null?void 0:m.type],disabled:d})]}),((me=r==null?void 0:r.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:z===1&&!Y?(Ne=r==null?void 0:r.validationMesssage)==null?void 0:Ne.english:""}),(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(we=r==null?void 0:r.helperText)==null?void 0:we[m==null?void 0:m.type]}),((ve=r==null?void 0:r.inlineConditionalRules)==null?void 0:ve.rules.length)>0&&h===!0&&o.jsx("p",{children:"Inline conditional rules"}),k===!0&&((Te=(ue=r==null?void 0:r.inlineConditionalRules)==null?void 0:ue.rules)==null?void 0:Te.length)>0&&((_e=r==null?void 0:r.inlineConditionalRules)==null?void 0:_e.rules.map((K,Ee)=>h===!1?o.jsx("div",{children:K==null?void 0:K.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!(Y===be.value||h),inputValue:Y,condition:be,ruleIndex:Ee,conditionIndex:he,field:r,section:c,page:u,row:a,pageIndex:e,sectionIndex:n,rowIndex:s,columnIndex:l,isAdmin:f,...t})},`select-rule-${Ee}-`+he))},`select-rule-${Ee}`):o.jsx(ci,{className:"mt-4",header:`Rule ${Ee+1}`,children:o.jsx("div",{children:K==null?void 0:K.conditions.map((be,he)=>{const fe=Y;return o.jsx(F.Fragment,{children:o.jsxs("div",{className:"card",children:[o.jsx(pu,{style:{marginTop:-20},className:"mr-2",severity:"success",value:`Condition: ${be==null?void 0:be.value}`,rounded:!0}),o.jsx(n0,{isConditionTrue:!!((fe==null?void 0:fe.value)===be.value||h),inputValue:Y,condition:be,ruleIndex:Ee,conditionIndex:he,field:r,section:c,page:u,row:a,pageIndex:e,sectionIndex:n,rowIndex:s,columnIndex:l,...t})]})},`select-rule-${Ee}-`+he)})})},Ee)))]}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:ge})]})};function yb(){return yb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yb.apply(null,arguments)}function b2(t){"@babel/helpers - typeof";return b2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b2(t)}function xde(t,e){if(b2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(b2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tde(t){var e=xde(t,"string");return b2(e)=="symbol"?e:e+""}function Ede(t,e,n){return(e=Tde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ide(t){if(Array.isArray(t))return t}function _de(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function GO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Dde(t,e){if(t){if(typeof t=="string")return GO(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GO(t,e):void 0}}function Nde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2336
|
+
`,o4=Bn.extend({defaultProps:{__TYPE:"Tag",value:null,severity:null,rounded:!1,icon:null,style:null,className:null,children:void 0},css:{classes:Ade,styles:wde}});function RO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sde(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?RO(Object(n),!0).forEach(function(r){bb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var pu=b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=o4.getProps(t,r),a=o4.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;li(o4.css.styles,c,{name:"tag"});var u=b.useRef(null),d=n({className:l("icon")},s("icon")),f=nr.getJSXIcon(i.icon,Sde({},d),{props:i});b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return u.current}}});var h=n({ref:u,className:ft(i.className,l("root")),style:i.style},o4.getOtherProps(i),s("root")),p=n({className:l("value")},s("value"));return b.createElement("span",h,f,b.createElement("span",p,i.value),b.createElement("span",null,i.children))});pu.displayName="Tag";const Cde=t=>{var Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,section:c,page:u,isDisabled:d}=t,{isAdmin:f,isBuilderMode:h}=Ht(),{pageSettingUpdate:p,formBuilderFormLayout:v,userSelectedLanguage:m,fieldSettingUpdate:A}=sn(),{task_status:w,taskRegisterData:x,updateTaskRegisterData:C,updateTaskProgressValue:T,updateUserFormDataSubmit:S,userTaskSubmitFormData:E,TASK_PUBLISHED:_}=Ar(),[P,O]=F.useState(!1),[k,M]=F.useState(!1),[Y,N]=F.useState(null),[z,$]=F.useState(0),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=K=>{O(K)},W=()=>{O(!1)},ee=()=>{var K,Ee,be,he;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const fe=[...a.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(r==null?void 0:r.uuid)});xe>=0&&fe[xe].fieldData?N(Number(fe[xe].fieldData)||null):N(null)}}else{const fe=E,xe=It.cloneDeep(x);if(fe!=null&&fe.length){for(const Me of fe)if(Me.fieldId===t.field.uuid&&((K=Me==null?void 0:Me.postData)!=null&&K.length)){N((Ee=Me==null?void 0:Me.postData[0])==null?void 0:Ee.postValue),xe[r==null?void 0:r.uuid]=(be=Me==null?void 0:Me.postData[0])==null?void 0:be.postValue;const Be=Object.keys(xe).length;T(Be);const Je=(he=Me==null?void 0:Me.postData[0])==null?void 0:he.postValue;r==null||r.conditionalTabRules.rules.map(st=>{var ut;(ut=st==null?void 0:st.conditions)==null||ut.map(St=>{if(Je===(St==null?void 0:St.option)){const zt=It.findIndex(v,Lt=>{var mn;return Lt.uuid===((mn=St==null?void 0:St.tab)==null?void 0:mn.uuid)}),pn=v[zt];pn.isHidden=!1,p(zt,pn)}})});break}}}setTimeout(()=>{M(!0)},2e3)},Q=K=>{var xe,Me;N(K.target.value);const Ee={value:K.target.value};H(Ee),X(Ee);const be=E,he=It.cloneDeep(x);if((xe=K==null?void 0:K.target)!=null&&xe.value&&(be==null?void 0:be.length)>0)for(const Be of be)Be.fieldId===t.field.uuid&&(he[r==null?void 0:r.uuid]=(Me=K==null?void 0:K.target)==null?void 0:Me.value,Be.postData[0]={postValue:K.target.value});else delete he[r==null?void 0:r.uuid];C(he);const fe=Object.keys(he).length;T(fe)};F.useEffect(()=>{k||ee();const K=Gt.addListener("clearRepeatableFields",he=>{he===(a==null?void 0:a.uuid)&&(N(null),$(0),r.isValid=0,A(e,n,s,l,i,r))}),Ee=Gt.addListener("onSubmitUserForm",()=>{var he;(he=r==null?void 0:r.attributes)!=null&&he.required?Y?r.isValid=1:r.isValid=0:r.isValid=1}),be=Gt.addListener("OnInvalidFieldCatch",he=>{r.uuid===(he==null?void 0:he.fieldId)?$(1):$(0)});return()=>{Ee.remove(),be.remove(),K.remove()}});const H=K=>{const Ee=K.value;r==null||r.conditionalTabRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(v,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.tab)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=v[xe];Me.isHidden=!1,p(xe,Me)}else{let Me=v[xe];Me={...Me,isHidden:!0},p(xe,Me)}})})},X=K=>{const Ee=K.value;r==null||r.conditionalSectionRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(v,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.section)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=v[xe];Me.isHidden=!1,p(xe,Me)}else{let Me=v[xe];Me={...Me,isHidden:!0},p(xe,Me)}})})},pe=(K,Ee)=>{var be;if(E){const he=[...E],fe=It.findIndex(he,function(Me){return Me.rowId===(a==null?void 0:a.uuid)});let xe=(be=E[fe])==null?void 0:be.repeatableFields;xe={...xe,[K==null?void 0:K.uuid]:Ee},he[fe]={...he[fe],repeatableFields:xe},S(he)}N(Ee),Ee!==null?K.isValid=1:K.isValid=0},ge=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[h&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${h&&" card py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:h?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(Ae=r==null?void 0:r.headerText)==null?void 0:Ae[m==null?void 0:m.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:r.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ye=r==null?void 0:r.attributes)==null?void 0:ye.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(oe=r==null?void 0:r.label)==null?void 0:oe[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(re=r==null?void 0:r.toolTip)==null?void 0:re[m==null?void 0:m.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(r==null?void 0:r.iconAlignment),children:[(r==null?void 0:r.showIcon)&&o.jsx("i",{className:"pi pi-"+((ne=(B=r==null?void 0:r.icon)==null?void 0:B.properties)==null?void 0:ne.name)}),o.jsx(La,{onFocus:()=>$(1),onChange:K=>{a!=null&&a.rowIsRepeatable?pe(r,K.target.value):Q(K)},options:r==null?void 0:r.options,optionLabel:`optionText.${m.type}`,value:Y,placeholder:(se=r==null?void 0:r.placeholder)==null?void 0:se[m==null?void 0:m.type],disabled:f||d})]}),((me=r==null?void 0:r.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:z===1&&!Y?(Ne=r==null?void 0:r.validationMesssage)==null?void 0:Ne.english:""}),(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(we=r==null?void 0:r.helperText)==null?void 0:we[m==null?void 0:m.type]}),((ve=r==null?void 0:r.inlineConditionalRules)==null?void 0:ve.rules.length)>0&&h===!0&&o.jsx("p",{children:"Inline conditional rules"}),k===!0&&((Te=(ue=r==null?void 0:r.inlineConditionalRules)==null?void 0:ue.rules)==null?void 0:Te.length)>0&&((_e=r==null?void 0:r.inlineConditionalRules)==null?void 0:_e.rules.map((K,Ee)=>h===!1?o.jsx("div",{children:K==null?void 0:K.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!(Y===be.value||h),inputValue:Y,condition:be,ruleIndex:Ee,conditionIndex:he,field:r,section:c,page:u,row:a,pageIndex:e,sectionIndex:n,rowIndex:s,columnIndex:l,isAdmin:f,...t})},`select-rule-${Ee}-`+he))},`select-rule-${Ee}`):o.jsx(ci,{className:"mt-4",header:`Rule ${Ee+1}`,children:o.jsx("div",{children:K==null?void 0:K.conditions.map((be,he)=>{const fe=Y;return o.jsx(F.Fragment,{children:o.jsxs("div",{className:"card",children:[o.jsx(pu,{style:{marginTop:-20},className:"mr-2",severity:"success",value:`Condition: ${be==null?void 0:be.value}`,rounded:!0}),o.jsx(n0,{isConditionTrue:!!((fe==null?void 0:fe.value)===be.value||h),inputValue:Y,condition:be,ruleIndex:Ee,conditionIndex:he,field:r,section:c,page:u,row:a,pageIndex:e,sectionIndex:n,rowIndex:s,columnIndex:l,...t})]})},`select-rule-${Ee}-`+he)})})},Ee)))]}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:ge})]})};function yb(){return yb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yb.apply(null,arguments)}function b2(t){"@babel/helpers - typeof";return b2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b2(t)}function xde(t,e){if(b2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(b2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tde(t){var e=xde(t,"string");return b2(e)=="symbol"?e:e+""}function Ede(t,e,n){return(e=Tde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ide(t){if(Array.isArray(t))return t}function _de(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function GO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Dde(t,e){if(t){if(typeof t=="string")return GO(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GO(t,e):void 0}}function Nde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2337
2337
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ode(t,e){return Ide(t)||_de(t,e)||Dde(t,e)||Nde()}var Fde={root:function(e){var n=e.props;return ft("",n.className)},toolbar:"",content:""},kde=`
|
|
2338
2338
|
/*!
|
|
2339
2339
|
* Quill Editor v2.0.2
|
|
@@ -3394,7 +3394,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3394
3394
|
.ql-container.ql-snow {
|
|
3395
3395
|
border: 1px solid #ccc;
|
|
3396
3396
|
}
|
|
3397
|
-
`,l4=Bn.extend({defaultProps:{__TYPE:"Editor",id:null,value:null,style:null,className:null,placeholder:null,readOnly:!1,modules:null,formats:null,theme:"snow",showHeader:!0,headerTemplate:null,onTextChange:null,onSelectionChange:null,onLoad:null,maxLength:null,children:void 0},css:{classes:Fde,styles:kde}});function WO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function QO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?WO(Object(n),!0).forEach(function(r){Ede(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Pde=function(){try{return Quill}catch{return null}}(),c4=b.memo(b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=l4.getProps(t,r),a=l4.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;li(l4.css.styles,c,{name:"editor"});var u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),h=b.useRef(null),p=b.useRef(!1),v=b.useState(!1),m=Ode(v,2),A=m[0],w=m[1];Li(function(){if(!p.current){var M={modules:QO({toolbar:i.showHeader?f.current:!1},i.modules),placeholder:i.placeholder,readOnly:i.readOnly,theme:i.theme,formats:i.formats};Pde?S(new Quill(d.current,M)):Promise.resolve().then(()=>aTe).then(function(Y){if(Y&&Ie.isExist(d.current)){var N;Y.default?N=new Y.default(d.current,M):N=new Y(d.current,M),S(N)}}),p.current=!0}});var x=function(Y,N,z){var $=d.current.children[0],le=$?$.innerHTML:null,G=h.current.getText();if(le==="<p><br></p>"&&(le=null),z==="api"){var R=d.current.children[0],ce=document.createElement("div");if(ce.innerHTML=i.value||"",Ie.isEqualElement(R,ce))return}if(i.maxLength){var q=h.current.getLength();q>i.maxLength&&h.current.deleteText(i.maxLength,q)}i.onTextChange&&i.onTextChange({htmlValue:le,textValue:G,delta:Y,source:z})},C=function(Y,N,z){i.onSelectionChange&&i.onSelectionChange({range:Y,oldRange:N,source:z})},T=F.useRef(i.value);T.current=i.value;var S=function(Y){h.current=Y,T.current&&Y.setContents(Y.clipboard.convert({html:T.current,text:""})),w(!0)};fr(function(){if(A)return h.current.on("text-change",x),h.current.on("selection-change",C),function(){h.current.off("text-change",x),h.current.off("selection-change",C)}}),fr(function(){A&&h.current&&h.current.getModule("toolbar")&&i.onLoad&&i.onLoad(h.current)},[A]),fr(function(){h.current&&!h.current.hasFocus()&&(i.value?h.current.setContents(h.current.clipboard.convert({html:i.value,text:""})):h.current.setText(""))},[i.value]),b.useImperativeHandle(e,function(){return{props:i,getQuill:function(){return h.current},getElement:function(){return u.current},getContent:function(){return d.current},getToolbar:function(){return f.current}}});var E=function(){var Y=n({ref:f,className:l("toolbar")},s("toolbar"));if(i.showHeader===!1)return null;if(i.headerTemplate)return b.createElement("div",Y,i.headerTemplate);var N=function(le,G){return n(le&&QO({},le),s(G))},z=n({className:"ql-formats"},s("formats"));return b.createElement("div",Y,b.createElement("span",z,b.createElement("select",N({className:"ql-header",defaultValue:"0"},"header"),b.createElement("option",N({value:"1"},"option"),"Heading"),b.createElement("option",N({value:"2"},"option"),"Subheading"),b.createElement("option",N({value:"0"},"option"),"Normal")),b.createElement("select",N({className:"ql-font"},"font"),b.createElement("option",N(void 0,"option")),b.createElement("option",N({value:"serif"},"option")),b.createElement("option",N({value:"monospace"},"option")))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-bold","aria-label":"Bold"},"bold")),b.createElement("button",N({type:"button",className:"ql-italic","aria-label":"Italic"},"italic")),b.createElement("button",N({type:"button",className:"ql-underline","aria-label":"Underline"},"underline"))),b.createElement("span",z,b.createElement("select",N({className:"ql-color"},"color")),b.createElement("select",N({className:"ql-background"},"background"))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-list",value:"ordered","aria-label":"Ordered List"},"list")),b.createElement("button",N({type:"button",className:"ql-list",value:"bullet","aria-label":"Unordered List"},"list")),b.createElement("select",N({className:"ql-align"},"select"),b.createElement("option",N({defaultValue:!0},"option")),b.createElement("option",N({value:"center"},"option")),b.createElement("option",N({value:"right"},"option")),b.createElement("option",N({value:"justify"},"option")))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-link","aria-label":"Insert Link"},"link")),b.createElement("button",N({type:"button",className:"ql-image","aria-label":"Insert Image"},"image")),b.createElement("button",N({type:"button",className:"ql-code-block","aria-label":"Insert Code Block"},"codeBlock"))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-clean","aria-label":"Remove Styles"},"clean"))))},_=E(),P=n({ref:d,className:l("content"),style:i.style},s("content")),O=b.createElement("div",P),k=n({className:ft(i.className,l("root"))},l4.getOtherProps(i),s("root"));return b.createElement("div",yb({id:i.id,ref:u},k),_,O)}));c4.displayName="Editor";const Mde=t=>{var le,G,R,ce,q,W,ee,Q,H;const{field:e,fieldIndex:n,row:r,isDisabled:i}=t,{isBuilderMode:a,isAdmin:s}=Ht(),{userSelectedLanguage:l}=sn(),{taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,userTaskSubmitFormData:f,onSetValuetoRepeatableData:h}=Ar(),[p,v]=F.useState(!1),[m,A]=F.useState(""),[w,x]=F.useState(0),[C,T]=F.useState(!1),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)},O=X=>{v(X)},k=()=>{v(!1)},M=()=>{var ge,Ae,ye;const X=f;let pe="";if(r!=null&&r.rowIsRepeatable){if(r!=null&&r.repeatableFields){const oe=[...r.repeatableFields],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?pe=oe[re].fieldData:pe=""}}else if((X==null?void 0:X.length)>0)for(const oe of X)oe.fieldId===t.field.uuid&&((ge=oe==null?void 0:oe.postData[0])!=null&&ge.postValue)&&((Ae=oe==null?void 0:oe.postData[0])==null?void 0:Ae.postValue)!==""&&(pe=(ye=oe==null?void 0:oe.postData[0])==null?void 0:ye.postValue);return A(pe),T(!0),pe};F.useEffect(()=>{const X=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(r==null?void 0:r.uuid)&&(A(""),x(0),e.isValid=0)}),pe=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?m?e.isValid=1:e.isValid=0:e.isValid=1}),ge=Gt.addListener("OnInvalidFieldCatch",Ae=>{e.uuid===(Ae==null?void 0:Ae.fieldId)?x(1):x(0)});return()=>{pe.remove(),ge.remove(),X.remove()}});const Y=X=>{A(X==null?void 0:X.htmlValue);const pe=f,ge=It.cloneDeep(c);if(pe!==null){if(X!=null&&X.htmlValue){if(ge[e==null?void 0:e.uuid]=X==null?void 0:X.htmlValue,(pe==null?void 0:pe.length)>0)for(const Ae of pe)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:X==null?void 0:X.htmlValue})}else if(delete ge[e==null?void 0:e.uuid],(pe==null?void 0:pe.length)>0)for(const Ae of pe)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:""})}if(!(r!=null&&r.rowIsRepeatable)){u(ge);const Ae=Object.keys(ge).length;d(Ae)}},N=o.jsxs("span",{className:"ql-formats",children:[(e==null?void 0:e.sizeOption)===!0&&o.jsxs("select",{className:"ql-size",children:[o.jsx("option",{value:"small","aria-label":"small"}),o.jsx("option",{value:"large","aria-label":"large"}),o.jsx("option",{value:"huge","aria-label":"huge"})]}),(e==null?void 0:e.TextEditorProps)===!0&&o.jsx("select",{className:"ql-font","aria-label":"Font"}),(e==null?void 0:e.boldOption)===!0&&o.jsx("button",{className:"ql-bold","aria-label":"Bold"}),(e==null?void 0:e.italicOption)===!0&&o.jsx("button",{className:"ql-italic","aria-label":"Italic"}),(e==null?void 0:e.underlineOption)===!0&&o.jsx("button",{className:"ql-underline","aria-label":"Underline"}),(e==null?void 0:e.listOption)===!0&&o.jsx("button",{className:"ql-list",value:"ordered"}),(e==null?void 0:e.listOption)===!0&&o.jsx("button",{className:"ql-list",value:"bullet"}),(e==null?void 0:e.alignOption)===!0&&o.jsx("button",{className:"ql-align",value:"right","aria-label":"Text Align"}),(e==null?void 0:e.colorOption)===!0&&o.jsx("select",{className:"ql-color","aria-label":"Color"})]}),z=(X,pe,ge)=>{h(X,pe,ge),A(ge),ge!==""&&ge!==null?e.isValid=1:e.isValid=0},$=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[a&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:a?"col-11 field-form-builder":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(le=e==null?void 0:e.headerText)==null?void 0:le[l==null?void 0:l.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((G=e==null?void 0:e.attributes)==null?void 0:G.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(R=e==null?void 0:e.label)==null?void 0:R[l==null?void 0:l.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ce=e==null?void 0:e.toolTip)==null?void 0:ce[l==null?void 0:l.type],position:"right"})})]}),o.jsx("div",{className:"mt-3",children:o.jsx(c4,{headerTemplate:N,style:{height:"320px"},id:e==null?void 0:e.uuid,readOnly:((q=e==null?void 0:e.attributes)==null?void 0:q.readOnly)||i,value:m,onFocus:()=>x(1),onTextChange:X=>{r!=null&&r.rowIsRepeatable?z(t,e,X.htmlValue):Y(X)},onLoad:X=>X.root.innerHTML=M(),className:w===1&&((W=e==null?void 0:e.attributes)!=null&&W.required)?m?"valid mb-3":"invalid mb-3":"valid mb-3"})}),((ee=e==null?void 0:e.attributes)==null?void 0:ee.required)&&o.jsx("small",{className:"error",children:w===1&&!m?(Q=e==null?void 0:e.validationMesssage)==null?void 0:Q[l==null?void 0:l.type]:""}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(H=e==null?void 0:e.helperText)==null?void 0:H[l==null?void 0:l.type]})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[p===!0&&o.jsx(Zi,{visibilty:p,closeSettingFieldSidebar:k,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:$})]})};function Ab(){return Ab=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ab.apply(null,arguments)}var wb=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",Ab({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));wb.displayName="TimesCircleIcon";function Ms(){return Ms=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ms.apply(null,arguments)}function y2(t){"@babel/helpers - typeof";return y2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y2(t)}function Lde(t,e){if(y2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(y2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bde(t){var e=Lde(t,"string");return y2(e)=="symbol"?e:e+""}function Nf(t,e,n){return(e=Bde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vde(t){if(Array.isArray(t))return Sb(t)}function qde(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JO(t,e){if(t){if(typeof t=="string")return Sb(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sb(t,e):void 0}}function Ude(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3397
|
+
`,l4=Bn.extend({defaultProps:{__TYPE:"Editor",id:null,value:null,style:null,className:null,placeholder:null,readOnly:!1,modules:null,formats:null,theme:"snow",showHeader:!0,headerTemplate:null,onTextChange:null,onSelectionChange:null,onLoad:null,maxLength:null,children:void 0},css:{classes:Fde,styles:kde}});function WO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function QO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?WO(Object(n),!0).forEach(function(r){Ede(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Pde=function(){try{return Quill}catch{return null}}(),c4=b.memo(b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=l4.getProps(t,r),a=l4.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;li(l4.css.styles,c,{name:"editor"});var u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),h=b.useRef(null),p=b.useRef(!1),v=b.useState(!1),m=Ode(v,2),A=m[0],w=m[1];Li(function(){if(!p.current){var M={modules:QO({toolbar:i.showHeader?f.current:!1},i.modules),placeholder:i.placeholder,readOnly:i.readOnly,theme:i.theme,formats:i.formats};Pde?S(new Quill(d.current,M)):Promise.resolve().then(()=>aTe).then(function(Y){if(Y&&Ie.isExist(d.current)){var N;Y.default?N=new Y.default(d.current,M):N=new Y(d.current,M),S(N)}}),p.current=!0}});var x=function(Y,N,z){var $=d.current.children[0],le=$?$.innerHTML:null,G=h.current.getText();if(le==="<p><br></p>"&&(le=null),z==="api"){var R=d.current.children[0],ce=document.createElement("div");if(ce.innerHTML=i.value||"",Ie.isEqualElement(R,ce))return}if(i.maxLength){var q=h.current.getLength();q>i.maxLength&&h.current.deleteText(i.maxLength,q)}i.onTextChange&&i.onTextChange({htmlValue:le,textValue:G,delta:Y,source:z})},C=function(Y,N,z){i.onSelectionChange&&i.onSelectionChange({range:Y,oldRange:N,source:z})},T=F.useRef(i.value);T.current=i.value;var S=function(Y){h.current=Y,T.current&&Y.setContents(Y.clipboard.convert({html:T.current,text:""})),w(!0)};fr(function(){if(A)return h.current.on("text-change",x),h.current.on("selection-change",C),function(){h.current.off("text-change",x),h.current.off("selection-change",C)}}),fr(function(){A&&h.current&&h.current.getModule("toolbar")&&i.onLoad&&i.onLoad(h.current)},[A]),fr(function(){h.current&&!h.current.hasFocus()&&(i.value?h.current.setContents(h.current.clipboard.convert({html:i.value,text:""})):h.current.setText(""))},[i.value]),b.useImperativeHandle(e,function(){return{props:i,getQuill:function(){return h.current},getElement:function(){return u.current},getContent:function(){return d.current},getToolbar:function(){return f.current}}});var E=function(){var Y=n({ref:f,className:l("toolbar")},s("toolbar"));if(i.showHeader===!1)return null;if(i.headerTemplate)return b.createElement("div",Y,i.headerTemplate);var N=function(le,G){return n(le&&QO({},le),s(G))},z=n({className:"ql-formats"},s("formats"));return b.createElement("div",Y,b.createElement("span",z,b.createElement("select",N({className:"ql-header",defaultValue:"0"},"header"),b.createElement("option",N({value:"1"},"option"),"Heading"),b.createElement("option",N({value:"2"},"option"),"Subheading"),b.createElement("option",N({value:"0"},"option"),"Normal")),b.createElement("select",N({className:"ql-font"},"font"),b.createElement("option",N(void 0,"option")),b.createElement("option",N({value:"serif"},"option")),b.createElement("option",N({value:"monospace"},"option")))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-bold","aria-label":"Bold"},"bold")),b.createElement("button",N({type:"button",className:"ql-italic","aria-label":"Italic"},"italic")),b.createElement("button",N({type:"button",className:"ql-underline","aria-label":"Underline"},"underline"))),b.createElement("span",z,b.createElement("select",N({className:"ql-color"},"color")),b.createElement("select",N({className:"ql-background"},"background"))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-list",value:"ordered","aria-label":"Ordered List"},"list")),b.createElement("button",N({type:"button",className:"ql-list",value:"bullet","aria-label":"Unordered List"},"list")),b.createElement("select",N({className:"ql-align"},"select"),b.createElement("option",N({defaultValue:!0},"option")),b.createElement("option",N({value:"center"},"option")),b.createElement("option",N({value:"right"},"option")),b.createElement("option",N({value:"justify"},"option")))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-link","aria-label":"Insert Link"},"link")),b.createElement("button",N({type:"button",className:"ql-image","aria-label":"Insert Image"},"image")),b.createElement("button",N({type:"button",className:"ql-code-block","aria-label":"Insert Code Block"},"codeBlock"))),b.createElement("span",z,b.createElement("button",N({type:"button",className:"ql-clean","aria-label":"Remove Styles"},"clean"))))},_=E(),P=n({ref:d,className:l("content"),style:i.style},s("content")),O=b.createElement("div",P),k=n({className:ft(i.className,l("root"))},l4.getOtherProps(i),s("root"));return b.createElement("div",yb({id:i.id,ref:u},k),_,O)}));c4.displayName="Editor";const Mde=t=>{var le,G,R,ce,q,W,ee,Q,H;const{field:e,fieldIndex:n,row:r,isDisabled:i}=t,{isBuilderMode:a,isAdmin:s}=Ht(),{userSelectedLanguage:l}=sn(),{taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,userTaskSubmitFormData:f,onSetValuetoRepeatableData:h}=Ar(),[p,v]=F.useState(!1),[m,A]=F.useState(""),[w,x]=F.useState(0),[C,T]=F.useState(!1),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)},O=X=>{v(X)},k=()=>{v(!1)},M=()=>{var ge,Ae,ye;const X=f;let pe="";if(r!=null&&r.rowIsRepeatable){if(r!=null&&r.repeatableFields){const oe=[...r.repeatableFields],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?pe=oe[re].fieldData:pe=""}}else if((X==null?void 0:X.length)>0)for(const oe of X)oe.fieldId===t.field.uuid&&((ge=oe==null?void 0:oe.postData[0])!=null&&ge.postValue)&&((Ae=oe==null?void 0:oe.postData[0])==null?void 0:Ae.postValue)!==""&&(pe=(ye=oe==null?void 0:oe.postData[0])==null?void 0:ye.postValue);return A(pe),T(!0),pe};F.useEffect(()=>{const X=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(r==null?void 0:r.uuid)&&(A(""),x(0),e.isValid=0)}),pe=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?m?e.isValid=1:e.isValid=0:e.isValid=1}),ge=Gt.addListener("OnInvalidFieldCatch",Ae=>{e.uuid===(Ae==null?void 0:Ae.fieldId)?x(1):x(0)});return()=>{pe.remove(),ge.remove(),X.remove()}});const Y=X=>{A(X==null?void 0:X.htmlValue);const pe=f,ge=It.cloneDeep(c);if(pe!==null){if(X!=null&&X.htmlValue){if(ge[e==null?void 0:e.uuid]=X==null?void 0:X.htmlValue,(pe==null?void 0:pe.length)>0)for(const Ae of pe)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:X==null?void 0:X.htmlValue})}else if(delete ge[e==null?void 0:e.uuid],(pe==null?void 0:pe.length)>0)for(const Ae of pe)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:""})}if(!(r!=null&&r.rowIsRepeatable)){u(ge);const Ae=Object.keys(ge).length;d(Ae)}},N=o.jsxs("span",{className:"ql-formats",children:[(e==null?void 0:e.sizeOption)===!0&&o.jsxs("select",{className:"ql-size",children:[o.jsx("option",{value:"small","aria-label":"small"}),o.jsx("option",{value:"large","aria-label":"large"}),o.jsx("option",{value:"huge","aria-label":"huge"})]}),(e==null?void 0:e.TextEditorProps)===!0&&o.jsx("select",{className:"ql-font","aria-label":"Font"}),(e==null?void 0:e.boldOption)===!0&&o.jsx("button",{className:"ql-bold","aria-label":"Bold"}),(e==null?void 0:e.italicOption)===!0&&o.jsx("button",{className:"ql-italic","aria-label":"Italic"}),(e==null?void 0:e.underlineOption)===!0&&o.jsx("button",{className:"ql-underline","aria-label":"Underline"}),(e==null?void 0:e.listOption)===!0&&o.jsx("button",{className:"ql-list",value:"ordered"}),(e==null?void 0:e.listOption)===!0&&o.jsx("button",{className:"ql-list",value:"bullet"}),(e==null?void 0:e.alignOption)===!0&&o.jsx("button",{className:"ql-align",value:"right","aria-label":"Text Align"}),(e==null?void 0:e.colorOption)===!0&&o.jsx("select",{className:"ql-color","aria-label":"Color"})]}),z=(X,pe,ge)=>{h(X,pe,ge),A(ge),ge!==""&&ge!==null?e.isValid=1:e.isValid=0},$=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[a&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:a?"col-11 field-form-builder":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(le=e==null?void 0:e.headerText)==null?void 0:le[l==null?void 0:l.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((G=e==null?void 0:e.attributes)==null?void 0:G.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(R=e==null?void 0:e.label)==null?void 0:R[l==null?void 0:l.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ce=e==null?void 0:e.toolTip)==null?void 0:ce[l==null?void 0:l.type],position:"right"})})]}),o.jsx("div",{className:"mt-3",children:o.jsx(c4,{headerTemplate:N,style:{height:"320px"},id:e==null?void 0:e.uuid,disabled:s||i,readOnly:((q=e==null?void 0:e.attributes)==null?void 0:q.readOnly)||i,value:m,onFocus:()=>x(1),onTextChange:X=>{r!=null&&r.rowIsRepeatable?z(t,e,X.htmlValue):Y(X)},onLoad:X=>X.root.innerHTML=M(),className:w===1&&((W=e==null?void 0:e.attributes)!=null&&W.required)?m?"valid mb-3":"invalid mb-3":"valid mb-3"})}),((ee=e==null?void 0:e.attributes)==null?void 0:ee.required)&&o.jsx("small",{className:"error",children:w===1&&!m?(Q=e==null?void 0:e.validationMesssage)==null?void 0:Q[l==null?void 0:l.type]:""}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(H=e==null?void 0:e.helperText)==null?void 0:H[l==null?void 0:l.type]})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[p===!0&&o.jsx(Zi,{visibilty:p,closeSettingFieldSidebar:k,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:$})]})};function Ab(){return Ab=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ab.apply(null,arguments)}var wb=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",Ab({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));wb.displayName="TimesCircleIcon";function Ms(){return Ms=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ms.apply(null,arguments)}function y2(t){"@babel/helpers - typeof";return y2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y2(t)}function Lde(t,e){if(y2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(y2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bde(t){var e=Lde(t,"string");return y2(e)=="symbol"?e:e+""}function Nf(t,e,n){return(e=Bde(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vde(t){if(Array.isArray(t))return Sb(t)}function qde(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JO(t,e){if(t){if(typeof t=="string")return Sb(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sb(t,e):void 0}}function Ude(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3398
3398
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $de(t){return Vde(t)||qde(t)||JO(t)||Ude()}function jde(t){throw new TypeError('"'+t+'" is read-only')}function zde(t){if(Array.isArray(t))return t}function Hde(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Yde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3399
3399
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dd(t,e){return zde(t)||Hde(t,e)||JO(t,e)||Yde()}var Kde={root:function(e){var n,r=e.props,i=e.context,a=e.focusedState,s=e.overlayVisibleState;return ft("p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":r.display==="chip"&&(r.maxSelectedLabels==null?!0:((n=r.value)===null||n===void 0?void 0:n.length)<=r.maxSelectedLabels),"p-disabled":r.disabled,"p-invalid":r.invalid,"p-variant-filled":r.variant?r.variant==="filled":i&&i.inputStyle==="filled","p-multiselect-clearable":r.showClear&&!r.disabled,"p-focus":a,"p-inputwrapper-filled":ke.isNotEmpty(r.value),"p-inputwrapper-focus":a||s})},label:function(e){var n,r=e.props,i=e.empty;return ft("p-multiselect-label",{"p-placeholder":i&&r.placeholder,"p-multiselect-label-empty":i&&!r.placeholder&&!r.selectedItemTemplate,"p-multiselect-items-label":!i&&r.display!=="chip"&&((n=r.value)===null||n===void 0?void 0:n.length)>r.maxSelectedLabels})},panel:function(e){var n=e.panelProps,r=e.context,i=e.allowOptionSelect;return ft("p-multiselect-panel p-component",{"p-multiselect-inline":n.inline,"p-multiselect-flex":n.flex,"p-multiselect-limited":!i,"p-input-filled":r&&r.inputStyle==="filled"||zn.inputStyle==="filled","p-ripple-disabled":r&&r.ripple===!1||zn.ripple===!1})},list:function(e){var n=e.virtualScrollerOptions;return"p-multiselect-items p-component"},labelContainer:"p-multiselect-label-container",triggerIcon:"p-multiselect-trigger-icon p-c",trigger:"p-multiselect-trigger",clearIcon:"p-multiselect-clear-icon",tokenLabel:"p-multiselect-token-label",token:"p-multiselect-token",removeTokenIcon:"p-multiselect-token-icon",wrapper:"p-multiselect-items-wrapper",emptyMessage:"p-multiselect-empty-message",itemGroup:"p-multiselect-item-group",closeButton:"p-multiselect-close p-link",header:"p-multiselect-header",closeIcon:"p-multiselect-close-icon",headerCheckboxContainer:"p-multiselect-select-all",headerCheckboxIcon:"p-multiselect-select-all p-checkbox-icon p-c",headerSelectAllLabel:"p-multiselect-select-all-label",filterContainer:"p-multiselect-filter-container",filterIcon:"p-multiselect-filter-icon",item:function(e){var n=e.itemProps;return ft("p-multiselect-item",{"p-highlight":n.selected,"p-disabled":n.disabled,"p-focus":n.focusedOptionIndex===n.index})},checkboxContainer:"p-multiselect-checkbox",checkboxIcon:"p-checkbox-icon p-c",transition:"p-connected-overlay"},Xde=`
|
|
3400
3400
|
@layer primereact {
|
|
@@ -3530,7 +3530,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3530
3530
|
}
|
|
3531
3531
|
}
|
|
3532
3532
|
`,Rde={root:function(e){var n=e.props;return n.showClear&&!n.disabled&&{position:"relative"}},itemGroup:function(e){var n=e.scrollerOptions;return{height:n.props?n.props.itemSize:void 0}}},A2=Bn.extend({defaultProps:{__TYPE:"MultiSelect",appendTo:null,ariaLabelledBy:null,checkboxIcon:null,className:null,clearIcon:null,closeIcon:null,dataKey:null,disabled:!1,display:"comma",dropdownIcon:null,emptyFilterMessage:null,emptyMessage:null,filter:!1,filterBy:null,filterDelay:300,filterInputAutoFocus:!0,filterLocale:void 0,selectOnFocus:!1,focusOnHover:!0,autoOptionFocus:!1,filterMatchMode:"contains",filterPlaceholder:null,filterTemplate:null,fixedPlaceholder:!1,flex:!1,id:null,inline:!1,inputId:null,inputRef:null,invalid:!1,variant:null,itemCheckboxIcon:null,itemClassName:null,itemTemplate:null,loading:!1,loadingIcon:null,maxSelectedLabels:null,name:null,onBlur:null,onChange:null,onClick:null,onFilter:null,onFocus:null,onHide:null,onRemove:null,onSelectAll:null,onShow:null,optionDisabled:null,optionGroupChildren:null,optionGroupLabel:null,optionGroupTemplate:null,optionLabel:null,optionValue:null,options:null,overlayVisible:!1,panelClassName:null,panelFooterTemplate:null,panelHeaderTemplate:null,panelStyle:null,placeholder:null,removeIcon:null,resetFilterOnHide:!1,scrollHeight:"200px",selectAll:!1,selectAllLabel:null,selectedItemTemplate:null,selectedItemsLabel:void 0,selectionLimit:null,showClear:!1,showSelectAll:!0,style:null,tabIndex:0,tooltip:null,tooltipOptions:null,transitionOptions:null,useOptionAsValue:!1,value:null,virtualScrollerOptions:null,children:void 0},css:{classes:Kde,styles:Xde,inlineStyles:Rde}}),Gde={box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon",root:function(e){var n=e.props,r=e.checked,i=e.context;return ft("p-checkbox p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid,"p-variant-filled":n.variant?n.variant==="filled":i&&i.inputStyle==="filled"})}},u4=Bn.extend({defaultProps:{__TYPE:"Checkbox",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,icon:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,name:null,onChange:null,onContextMenu:null,onMouseDown:null,readOnly:!1,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,value:null,children:void 0},css:{classes:Gde}});function ZO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eF(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ZO(Object(n),!0).forEach(function(r){Nf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Cb=b.memo(b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=u4.getProps(t,r),a=b.useState(!1),s=dd(a,2),l=s[0],c=s[1],u=u4.setMetaData({props:i,state:{focused:l},context:{checked:i.checked===i.trueValue,disabled:i.disabled}}),d=u.ptm,f=u.cx,h=u.isUnstyled;li(u4.css.styles,h,{name:"checkbox"});var p=b.useRef(null),v=b.useRef(i.inputRef),m=function(){return i.checked===i.trueValue},A=function(k){if(!(i.disabled||i.readOnly)&&i.onChange){var M,Y=m(),N=Y?i.falseValue:i.trueValue,z={originalEvent:k,value:i.value,checked:N,stopPropagation:function(){k==null||k.stopPropagation()},preventDefault:function(){k==null||k.preventDefault()},target:{type:"checkbox",name:i.name,id:i.id,value:i.value,checked:N}};if(i==null||(M=i.onChange)===null||M===void 0||M.call(i,z),k.defaultPrevented)return;Ie.focus(v.current)}},w=function(k){var M;c(!0),i==null||(M=i.onFocus)===null||M===void 0||M.call(i,k)},x=function(k){var M;c(!1),i==null||(M=i.onBlur)===null||M===void 0||M.call(i,k)};b.useImperativeHandle(e,function(){return{props:i,focus:function(){return Ie.focus(v.current)},getElement:function(){return p.current},getInput:function(){return v.current}}}),b.useEffect(function(){ke.combinedRefs(v,i.inputRef)},[v,i.inputRef]),fr(function(){v.current.checked=m()},[i.checked,i.trueValue]),Li(function(){i.autoFocus&&Ie.focus(v.current,i.autoFocus)});var C=m(),T=ke.isNotEmpty(i.tooltip),S=u4.getOtherProps(i),E=n({id:i.id,className:ft(i.className,f("root",{checked:C,context:r})),style:i.style,"data-p-highlight":C,"data-p-disabled":i.disabled,onContextMenu:i.onContextMenu,onMouseDown:i.onMouseDown},S,d("root")),_=function(){var k=ke.reduceKeys(S,Ie.ARIA_PROPS),M=n(eF({id:i.inputId,type:"checkbox",className:f("input"),name:i.name,tabIndex:i.tabIndex,onFocus:function(N){return w(N)},onBlur:function(N){return x(N)},onChange:function(N){return A(N)},disabled:i.disabled,readOnly:i.readOnly,required:i.required,"aria-invalid":i.invalid,checked:C},k),d("input"));return b.createElement("input",Ms({ref:v},M))},P=function(){var k=n({className:f("icon")},d("icon")),M=n({className:f("box",{checked:C}),"data-p-highlight":C,"data-p-disabled":i.disabled},d("box")),Y=C?i.icon||b.createElement(yc,k):null,N=nr.getJSXIcon(Y,eF({},k),{props:i,checked:C});return b.createElement("div",M,N)};return b.createElement(b.Fragment,null,b.createElement("div",Ms({ref:p},E),_(),P()),T&&b.createElement(cn,Ms({target:p,content:i.tooltip,pt:d("tooltip")},i.tooltipOptions)))}));Cb.displayName="Checkbox";function tF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function d4(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tF(Object(n),!0).forEach(function(r){Nf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var nF=b.memo(function(t){var e=Hn(),n=t.ptm,r=t.cx,i=t.isUnstyled,a={filter:function(M){return l(M)},reset:function(){return t.resetFilter()}},s=function(M,Y){return n(M,d4({hostName:t.hostName},Y))},l=function(M){t.onFilter&&t.onFilter({originalEvent:M,query:M.target.value})},c=function(M){if(t.onSelectAll)t.onSelectAll({originalEvent:M,checked:t.selectAll});else{var Y=t.isAllSelected()?[]:t.visibleOptions.filter(function(N){return t.isValidOption(N)}).map(function(N){return t.getOptionValue(N)});t.updateModel(M,Y,Y)}},u=function(){var M=e({className:r("filterIcon")},s("filterIcon")),Y=t.filterIcon||b.createElement(U6,M),N=nr.getJSXIcon(Y,d4({},M),{props:t});if(t.filter){var z=e({className:r("filterContainer")},s("filterContainer")),$=b.createElement("div",z,b.createElement(wn,{ref:t.filterRef,type:"text",role:"searchbox",value:t.filterValue,onChange:l,className:"p-multiselect-filter",placeholder:t.filterPlaceholder,pt:n("filterInput"),unstyled:t.unstyled,__parentMetadata:{parent:t.metaData}}),N);if(t.filterTemplate){var le={className:z.className,element:$,filterOptions:a,onFilter:l,filterIconClassName:t.filterIconClassName,props:t};$=ke.getJSXElement(t.filterTemplate,le)}return b.createElement(b.Fragment,null,$)}return null},d=u(),f=t.id?t.id+"_selectall":xo(),h=e({htmlFor:f,className:r("headerSelectAllLabel")},s("headerSelectAllLabel")),p=e({className:r("headerCheckboxIcon")},s("headerCheckbox.icon")),v=e({className:r("headerCheckboxContainer")},s("headerCheckboxContainer")),m=t.itemCheckboxIcon||b.createElement(yc,p),A=nr.getJSXIcon(m,d4({},p),{selected:t.selected}),w=t.showSelectAll&&b.createElement("div",v,b.createElement(Cb,{id:f,checked:t.selectAll,onChange:c,role:"checkbox","aria-checked":t.selectAll,icon:A,pt:n("headerCheckbox"),unstyled:i()}),!t.filter&&b.createElement("label",h,t.selectAllLabel)),x=e({className:r("closeIcon"),"aria-hidden":!0},s("closeIcon")),C=t.closeIcon||b.createElement(bc,x),T=nr.getJSXIcon(C,d4({},x),{props:t}),S=e({className:r("header")},s("header")),E=e({type:"button",className:r("closeButton"),"aria-label":ma("close"),onClick:t.onClose},s("closeButton")),_=b.createElement("button",E,T,b.createElement(Qt,null)),P=b.createElement("div",S,w,d,_);if(t.template){var O={className:"p-multiselect-header",checkboxElement:w,checked:t.selectAll,onChange:c,filterElement:d,closeElement:_,closeElementClassName:"p-multiselect-close p-link",closeIconClassName:"p-multiselect-close-icon",onCloseClick:t.onClose,element:P,itemCheckboxIcon:A,props:t};return ke.getJSXElement(t.template,O)}return P});nF.displayName="MultiSelectHeader";function rF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wde(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rF(Object(n),!0).forEach(function(r){Nf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var iF=b.memo(function(t){var e=b.useState(!1),n=dd(e,2),r=n[0],i=n[1],a=b.useRef(null),s=Hn(),l=t.ptm,c=t.cx,u=t.isUnstyled,d=function(S){return l(S,{hostName:t.hostName,context:{selected:t.selected,disabled:t.disabled,focused:r,focusedIndex:t.focusedIndex,index:t.index}})},f=function(S){var E;i(!0),a==null||(E=a.current)===null||E===void 0||E.getInput().focus()},h=function(S){i(!1)},p=function(S){t.onClick&&t.onClick(S,t.option),S.preventDefault(),S.stopPropagation()},v=s({className:c("checkboxIcon")},d("checkbox.icon")),m=t.checkboxIcon||b.createElement(yc,v),A=t.selected?nr.getJSXIcon(m,Wde({},v),{selected:t.selected}):null,w=t.template?ke.getJSXElement(t.template,t.option):t.label,x=s({className:c("checkboxContainer")},d("checkboxContainer")),C=s({className:ft(t.className,t.option.className,c("item",{itemProps:t})),style:t.style,onClick:p,onFocus:f,onBlur:h,onMouseMove:function(S){return t==null?void 0:t.onMouseMove(S,t.index)},role:"option","aria-selected":t.selected,"data-p-highlight":t.selected,"data-p-disabled":t.disabled},d("item"));return b.createElement("li",Ms({},C,{key:t.index+"_multiselectitem"}),b.createElement("div",x,b.createElement(Cb,{ref:a,checked:t.selected,icon:A,pt:l("checkbox"),unstyled:u(),tabIndex:-1})),b.createElement("span",null,w),b.createElement(Qt,null))});iF.displayName="MultiSelectItem";function aF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function s1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aF(Object(n),!0).forEach(function(r){Nf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var sF=b.memo(b.forwardRef(function(t,e){var n=b.useRef(null),r=b.useRef(null),i=Hn(),a=b.useContext(ar),s=t.ptm,l=t.cx,c=t.sx,u=t.isUnstyled,d=function(k,M){return s(k,s1({hostName:t.hostName},M))},f=function(){t.onEnter(function(){if(n.current){var k=t.getSelectedOptionIndex();k!==-1&&setTimeout(function(){return n.current.scrollToIndex(k)},0)}})},h=function(){t.onEntered(function(){t.filter&&t.filterInputAutoFocus&&r.current&&Ie.focus(r.current,!1)})},p=function(k){n.current&&n.current.scrollToIndex(0),t.onFilterInputChange&&t.onFilterInputChange(k)},v=function(){return!(t.visibleOptions&&t.visibleOptions.length)&&t.hasFilter},m=function(){return b.createElement(nF,{hostName:t.hostName,id:t.id,filter:t.filter,filterRef:r,filterValue:t.filterValue,filterTemplate:t.filterTemplate,visibleOptions:t.visibleOptions,isValidOption:t.isValidOption,getOptionValue:t.getOptionValue,updateModel:t.updateModel,onFilter:p,filterPlaceholder:t.filterPlaceholder,onClose:t.onCloseClick,showSelectAll:t.showSelectAll,selectAll:t.isAllSelected(),selectAllLabel:t.selectAllLabel,onSelectAll:t.onSelectAll,template:t.panelHeaderTemplate,resetFilter:t.resetFilter,closeIcon:t.closeIcon,filterIcon:t.filterIcon,itemCheckboxIcon:t.itemCheckboxIcon,ptm:s,cx:l,isUnstyled:u,metaData:t.metaData})},A=function(){if(t.panelFooterTemplate){var k=ke.getJSXElement(t.panelFooterTemplate,t,t.onOverlayHide);return b.createElement("div",{className:"p-multiselect-footer"},k)}return null},w=function(k,M){if(t.focusOnHover){var Y;t==null||(Y=t.changeFocusedOptionIndex)===null||Y===void 0||Y.call(t,k,M)}},x=function(){var k=ke.getJSXElement(t.emptyFilterMessage,t)||ni("emptyFilterMessage"),M=i({className:l("emptyMessage")},d("emptyMessage"));return b.createElement("li",Ms({},M,{key:"emptyFilterMessage"}),k)},C=function(){var k=ke.getJSXElement(t.emptyMessage,t)||ni("emptyMessage"),M=i({className:l("emptyMessage")},d("emptyMessage"));return b.createElement("li",Ms({},M,{key:"emptyMessage"}),k)},T=function(k,M){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N={height:Y.props?Y.props.itemSize:void 0},z=k.group===!0&&t.optionGroupLabel;if(z){var $=t.optionGroupTemplate?ke.getJSXElement(t.optionGroupTemplate,k,M):t.getOptionGroupLabel(k),le=M+"_"+t.getOptionGroupRenderKey(k),G=i({className:l("itemGroup"),style:c("itemGroup",{scrollerOptions:Y})},d("itemGroup"));return b.createElement("li",Ms({key:le},G),$)}var R=t.getOptionLabel(k),ce=M+"_"+t.getOptionRenderKey(k),q=t.isOptionDisabled(k),W=t.isSelected(k);return b.createElement(iF,{hostName:t.hostName,key:ce,focusedOptionIndex:t.focusedOptionIndex,label:R,option:k,style:N,index:M,template:t.itemTemplate,selected:W,onClick:t.onOptionSelect,onMouseMove:w,disabled:q,className:t.itemClassName,checkboxIcon:t.checkboxIcon,isUnstyled:u,ptm:s,cx:l})},S=function(){return ke.isNotEmpty(t.visibleOptions)?t.visibleOptions.map(T):t.hasFilter?x():C()},E=function(){if(t.virtualScrollerOptions){var k=s1(s1({},t.virtualScrollerOptions),{style:s1(s1({},t.virtualScrollerOptions.style),{height:t.scrollHeight}),className:ft("p-multiselect-items-wrapper",t.virtualScrollerOptions.className),items:t.visibleOptions,autoSize:!0,onLazyLoad:function($){return t.virtualScrollerOptions.onLazyLoad(s1(s1({},$),{filter:t.filterValue}))},itemTemplate:function($,le){return $&&T($,le.index,le)},contentTemplate:function($){var le=v()?x():$.children,G=i({ref:$.contentRef,style:$.style,className:ft($.className,l("list",{virtualScrollerProps:t.virtualScrollerOptions})),role:"listbox","aria-multiselectable":!0},d("list"));return b.createElement("ul",G,le)}});return b.createElement(Pm,Ms({ref:n},k,{pt:s("virtualScroller"),__parentMetadata:{parent:t.metaData}}))}var M=S(),Y=i({className:l("wrapper"),style:{maxHeight:t.scrollHeight}},d("wrapper")),N=i({className:l("list"),role:"listbox","aria-multiselectable":!0},d("list"));return b.createElement("div",Y,b.createElement("ul",N,M))},_=function(){var k=t.allowOptionSelect(),M=m(),Y=E(),N=A(),z=i({className:ft(t.panelClassName,l("panel",{panelProps:t,context:a,allowOptionSelect:k})),style:t.panelStyle,onClick:t.onClick},d("panel"));if(t.inline)return b.createElement("div",Ms({ref:e},z),Y,N);var $=i({classNames:l("transition"),in:t.in,timeout:{enter:120,exit:100},options:t.transitionOptions,appear:!0,unmountOnExit:!0,onEnter:f,onEntered:h,onExit:t.onExit,onExited:t.onExited},d("transition")),le=i({ref:t.firstHiddenFocusableElementOnOverlay,role:"presentation",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:t.onFirstHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},s("hiddenFirstFocusableEl")),G=i({ref:t.lastHiddenFocusableElementOnOverlay,role:"presentation",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:t.onLastHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},s("hiddenLastFocusableEl"));return b.createElement(Wo,Ms({nodeRef:e},$),b.createElement("div",Ms({ref:e},z),b.createElement("span",le),M,Y,N,b.createElement("span",G)))},P=_();return t.inline?P:b.createElement(Ul,{element:P,appendTo:t.appendTo})}));sF.displayName="MultiSelectPanel";function oF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Al(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oF(Object(n),!0).forEach(function(r){Nf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lF(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Qde(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3533
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return s=u.done,u},e:function(u){l=!0,a=u},f:function(){try{s||n.return==null||n.return()}finally{if(l)throw a}}}}function Qde(t,e){if(t){if(typeof t=="string")return cF(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cF(t,e):void 0}}function cF(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var uF=b.memo(b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=A2.getProps(t,r),a=b.useState(null),s=dd(a,2),l=s[0],c=s[1],u=b.useState(!1),d=dd(u,2),f=d[0],h=d[1],p=Qx("",i.filterDelay||0),v=dd(p,3),m=v[0],A=v[1],w=v[2],x=b.useState(-1),C=dd(x,2),T=C[0],S=C[1],E=b.useState(!1),_=dd(E,2),P=_[0],O=_[1],k=b.useState(i.inline),M=dd(k,2),Y=M[0],N=M[1],z=b.useRef(null),$=b.useRef(null),le=b.useRef(null),G=b.useRef(null),R=b.useRef(null),ce=b.useRef(i.inputRef),q=b.useRef(null),W=b.useRef(null),ee=b.useRef(null),Q=A&&A.trim().length>0,H=ke.isEmpty(i.value),X=i.optionValue?null:i.dataKey,pe={props:i,state:{filterState:A,focused:P,overlayVisible:Y}},ge=A2.setMetaData(pe),Ae=ge.ptm,ye=ge.cx,oe=ge.sx,re=ge.isUnstyled;li(A2.css.styles,re,{name:"multiselect"});var B=np({target:z,overlay:W,listener:function(Ye,Tt){var Wt=Tt.type,Jn=Tt.valid;Jn&&(Wt==="outside"?!Ue(Ye)&&!it(Ye)&&at():r.hideOverlaysOnDocumentScrolling?at():Ie.isDocument(Ye.target)||yt())},when:Y}),ne=dd(B,2),se=ne[0],me=ne[1],Ne=function(Ye){var Tt=Ye.relatedTarget===ce.current?Ie.getFirstFocusableElement(W.current,':not([data-p-hidden-focusable="true"])'):ce.current;Ie.focus(Tt)},we=function(Ye){var Tt=Ye.relatedTarget===ce.current?Ie.getLastFocusableElement(W.current,':not([data-p-hidden-focusable="true"])'):ce.current;Ie.focus(Tt)},ve=function(Ye){Cs.emit("overlay-click",{originalEvent:Ye,target:z.current})},ue=function(){return!i.selectionLimit||!i.value||i.value&&i.value.length<i.selectionLimit},Te=function(Ye){var Tt=Xt()&&Ye<tr.length-1?tr.slice(Ye+1).findIndex(function(Wt){return $n(Wt)}):-1;return Tt>-1?Tt+Ye+1:-1},_e=function(Ye){var Tt=Xt()&&Ye>0?ke.findLastIndex(tr.slice(0,Ye),function(Wt){return $n(Wt)}):-1;return Tt>-1?Tt:-1},K=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=-1;return Xt()&&(Tt?(Wt=_e(Ye),Wt=Wt===-1?Te(Ye):Wt):(Wt=Te(Ye),Wt=Wt===-1?_e(Ye):Wt)),Wt>-1?Wt:Ye},Ee=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(Tt===-1&&(Tt=K(Wt,!0)),Wt===-1&&(Wt=K(Tt)),Tt!==-1&&Wt!==-1){var Jn=Math.min(Tt,Wt),br=Math.max(Tt,Wt),Pr=tr.slice(Jn,br+1).filter(function(ca){return Pn(ca)}).map(function(ca){return Nt(ca)});mn(Ye,Pr,Pr)}},be=function(Ye,Tt){var Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(!(i.disabled||We(Tt))){var Jn=Wn(Tt),br=null;Jn?br=i.value.filter(function(Pr){return!ke.equals(Pr,Nt(Tt),X)}):br=[].concat($de(i.value||[]),[Nt(Tt)]),mn(Ye,br,Tt),Wt!==-1&&c(Wt)}},he=function(Ye){!i.inline&&!i.disabled&&!i.loading&&!Dt(Ye)&&!Ue(Ye)&&(Y?at():He(),Ie.focus(ce.current),Ye.preventDefault()),h(!0)},fe=function(Ye){if(!Y)He(),i.editable&&On(Ye,rt());else{var Tt=l!==-1?Ct(l):f?Ge():ae();Ye.shiftKey&&Ee(Ye,T,Tt),On(Ye,Tt)}Ye.preventDefault()},xe=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ye.altKey&&!Tt)l!==-1&&be(Ye,tr[l]),Y&&at(),Ye.preventDefault();else{var Wt=l!==-1?Rt(l):f?dt():Pe();On(Ye,Wt),!Y&&He(),Ye.preventDefault()}},Me=function(Ye){Y?l!==-1&&(Ye.shiftKey?Ee(Ye,l):be(Ye,tr[l])):(c(-1),fe(Ye)),Ye.preventDefault()},Be=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=Ye.currentTarget;if(Tt){var Jn=Wt.value.length;Wt.setSelectionRange(0,Ye.shiftKey?Jn:0),c(-1)}else{var br=Ye.metaKey||Ye.ctrlKey,Pr=Ge();Ye.shiftKey&&br&&Ee(Ye,Pr,T),On(Ye,Pr),!Y&&He()}Ye.preventDefault()},Je=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=Ye.currentTarget;if(Tt){var Jn=Wt.value.length;Wt.setSelectionRange(Ye.shiftKey?0:Jn,Jn),jde("focusedOptionIndex")}else{var br=Ye.metaKey||Ye.ctrlKey,Pr=dt();Ye.shiftKey&&br&&Ee(Ye,T,Pr),On(Ye,Pr),!Y&&He()}Ye.preventDefault()},st=function(Ye){Ye.preventDefault()},ut=function(Ye){Ye.preventDefault()},St=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Tt||(Y&&Zt()?(Ie.focus(Ye.shiftKey?R.current:G.current),Ye.preventDefault()):(l!==-1&&be(Ye,tr[l]),Y&&at(filter)))},zt=function(){S(l)},pn=function(Ye){var Tt=Ye.metaKey||Ye.ctrlKey;switch(Ye.code){case"ArrowUp":if(i.inline)break;xe(Ye);break;case"ArrowDown":if(i.inline)break;fe(Ye);break;case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;Me(Ye);break;case"Home":if(i.inline)break;Be(Ye),Ye.preventDefault();break;case"End":if(i.inline)break;Je(Ye),Ye.preventDefault();break;case"PageDown":ut(Ye);break;case"PageUp":st(Ye);break;case"Escape":if(i.inline)break;at();break;case"Tab":St(Ye);break;case"ShiftLeft":case"ShiftRight":zt();break;default:if(Ye.key==="a"&&Tt){var Wt=tr.filter(function(Jn){return Pn(Jn)}).map(function(Jn){return Nt(Jn)});mn(Ye,Wt,Wt),Ye.preventDefault();break}!Tt&&ke.isPrintableCharacter(Ye.key)&&(!Y&&He(),_n(Ye),Ye.preventDefault());break}h(!1)},Lt=function(Ye){if(i.onSelectAll)i.onSelectAll(Ye);else{var Tt=null;if(Ye.checked)Tt=[];else{var Wt=tr.filter(function(Jn){return Pn(Jn)&&!We(Jn)});Wt&&(Tt=Wt.map(function(Jn){return Nt(Jn)}))}i.selectionLimit&&Tt&&Tt.length&&(Tt=Tt.slice(0,i.selectionLimit)),mn(Ye.originalEvent,Tt,Tt)}},mn=function(Ye,Tt,Wt){i.onChange&&(i.onChange({originalEvent:Ye,value:Tt,selectedOption:Wt,stopPropagation:function(){Ye==null||Ye.stopPropagation()},preventDefault:function(){Ye==null||Ye.preventDefault()},target:{name:i.name,id:i.id,value:Tt}}),Ie.focus(ce.current))},Rn=function(Ye){var Tt=Ye.query;w(Tt),i.onFilter&&i.onFilter({originalEvent:Ye,filter:Tt})},xt=function(){w(""),i.onFilter&&i.onFilter({filter:""})},ze=function(Ye){if(Y){var Tt;Ye?Tt=Ye.currentTarget:Tt=Ie.findSingle(W.current,'li[data-p-highlight="true"]'),Tt&&Tt.scrollIntoView&&Tt.scrollIntoView({block:"nearest",inline:"nearest"})}},He=function(){N(!0),c(l!==-1?l:i.autoOptionFocus?ae():rt()),Ie.focus(ce.current)},at=function(){c(-1),N(!1),h(!1)},rn=function(Ye){Di.set("overlay",W.current,r&&r.autoZIndex||zn.autoZIndex,r&&r.zIndex.overlay||zn.zIndex.overlay),Ie.addStyles(W.current,{position:"absolute",top:"0",left:"0"}),yt(),ze(),Ye&&Ye()},nn=function(Ye){Ye&&Ye(),se(),i.onShow&&i.onShow()},Jt=function(){me()},In=function(){i.filter&&i.resetFilterOnHide&&xt(),Di.clear(W.current),i.onHide&&i.onHide()},yt=function(){!i.inline&&Ie.alignOverlay(W.current,q.current.parentElement,i.appendTo||r&&r.appendTo||zn.appendTo)},Ue=function(Ye){return Ie.getAttribute(Ye.target,"data-pc-section")==="clearicon"},it=function(Ye){return Ie.getAttribute(Ye.target,"data-pc-section")==="headercheckboxcontainer"},Dt=function(Ye){return W.current&&W.current.contains(Ye.target)},qt=function(Ye){at(),Ie.focus(ce.current),Ye.preventDefault(),Ye.stopPropagation()},kn=function(){if(i.value!=null&&i.options){if(i.optionGroupLabel){var Ye=0,Tt=i.options.findIndex(function(Wt,Jn){return(Ye=Jn)&&Gn(i.value,Fe(Wt))!==-1});return Tt!==-1?{group:Ye,option:Tt}:-1}return Gn(i.value,i.options)}return-1},Gn=function(Ye,Tt){return Tt.findIndex(function(Wt){return Ye.some(function(Jn){return ke.equals(Jn,Nt(Wt),X)})})},lr=function(Ye,Tt){return ke.equals(Ye,Tt,X)},Wn=function(Ye){if(i.value){var Tt=Nt(Ye),Wt=bt(Ye);return i.value.some(function(Jn){return ke.equals(Wt?Jn:Nt(Jn),Tt,X)})}return!1},vr=function(Ye){var Tt;if(i.options)if(i.optionGroupLabel){var Wt=lF(i.options),Jn;try{for(Wt.s();!(Jn=Wt.n()).done;){var br=Jn.value;if(Tt=Nr(Ye,Fe(br)),Tt)break}}catch(Pr){Wt.e(Pr)}finally{Wt.f()}}else Tt=Nr(Ye,i.options),ke.isEmpty(Tt)&&(Tt=Nr(Ye,i.value));return Tt?vt(Tt):null},Nr=function(Ye,Tt){return Tt.find(function(Wt){return ke.equals(Nt(Wt),Ye,X)})},yn=function(Ye){O(!0),i.onFocus&&i.onFocus(Ye)},ot=function(Ye){O(!1),i.onBlur&&i.onBlur(Ye)},ct=function(){if(i.onSelectAll)return i.selectAll;if(ke.isEmpty(tr))return!1;var Ye=tr.filter(function(Tt){return!We(Tt)&&Pn(Tt)});return!Ye.some(function(Tt){return!Wn(Tt)})},vt=function(Ye){return i.optionLabel?ke.resolveFieldData(Ye,i.optionLabel):Ye&&Ye.label!==void 0?Ye.label:Ye},Nt=function(Ye){return i.useOptionAsValue?Ye:i.optionValue?ke.resolveFieldData(Ye,i.optionValue):Ye&&Ye.value!==void 0?Ye.value:Ye},An=function(Ye){return i.dataKey?ke.resolveFieldData(Ye,i.dataKey):vt(Ye)},Dn=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupLabel)},Et=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupLabel)},Fe=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupChildren)},We=function(Ye){var Tt;if(!ue()&&!Wn(Ye))return!0;var Wt=i.optionDisabled;return Wt?ke.isFunction(Wt)?Wt(Ye):ke.resolveFieldData(Ye,Wt):Ye&&((Tt=Ye.disabled)!==null&&Tt!==void 0?Tt:!1)},bt=function(Ye){return!i.useOptionAsValue&&i.optionValue||Ye&&Ye.value!==void 0},$t=function(Ye){return i.optionGroupLabel&&Ye.group},Xt=function(){return ke.isNotEmpty(i.value)},Zt=function(){return Ie.getFocusableElements(W.current,':not([data-p-hidden-focusable="true"])').length>0},Sn=function(Ye){var Tt;return Pn(Ye)&&((Tt=vt(Ye))===null||Tt===void 0?void 0:Tt.toLocaleLowerCase(i.filterLocale).startsWith($.current.toLocaleLowerCase(i.filterLocale)))},Pn=function(Ye){return ke.isNotEmpty(Ye)&&!(We(Ye)||$t(Ye))},$n=function(Ye){return Pn(Ye)&&Wn(Ye)},rt=function(){if(Xt()){for(var Ye=function(){var br=i.value[Wt],Pr=tr.findIndex(function(ca){return $n(ca)&&lr(br,Nt(ca))});if(Pr>-1)return{v:Pr}},Tt,Wt=i.value.length-1;Wt>=0;Wt--)if(Tt=Ye(),Tt)return Tt.v}return-1},ae=function(){var Ye=rt();return Ye<0?Ge():Ye},Pe=function(){var Ye=rt();return Ye<0?dt():Ye},Ge=function(){return tr.findIndex(function(Ye){return Pn(Ye)})},dt=function(){return ke.findLastIndex(tr,function(Ye){return Pn(Ye)})},Ct=function(Ye){var Tt=Ye<tr.length-1?tr.slice(Ye+1).findIndex(function(Wt){return Pn(Wt)}):-1;return Tt>-1?Tt+Ye+1:Ye},Rt=function(Ye){var Tt=Ye>0?ke.findLastIndex(tr.slice(0,Ye),function(Wt){return Pn(Wt)}):-1;return Tt>-1?Tt:Ye},_n=function(Ye){$.current=($.current||"")+Ye.key;var Tt=-1;ke.isNotEmpty($.current)&&(l!==-1?(Tt=tr.slice(l).findIndex(function(Wt){return Sn(Wt)}),Tt=Tt===-1?tr.slice(0,l).findIndex(function(Wt){return Sn(Wt)}):Tt+l):Tt=tr.findIndex(function(Wt){return Sn(Wt)}),Tt===-1&&l===-1&&(Tt=ae()),Tt!==-1&&On(Ye,Tt)),le.current&&clearTimeout(le.current),le.current=setTimeout(function(){$.current="",le.current=null},500)},On=function(Ye,Tt){l!==Tt&&(c(Tt),ze(Ye),i.selectOnFocus&&be(Ye,tr[Tt],!1))},jn=function(Ye,Tt){if(Ye.stopPropagation(),!!Mr(Ye.currentTarget)){var Wt=i.value.filter(function(Jn){return!ke.equals(Jn,Tt,X)});i.onRemove&&i.onRemove({originalEvent:Ye,value:Wt}),mn(Ye,Wt,Tt)}},Mr=function(Ye){var Tt=ee.current,Wt=Tt.clientWidth<Tt.scrollWidth;if(!Wt)return!0;var Jn=Ye.closest('[data-pc-section="token"]'),br=window.getComputedStyle(Tt),Pr=window.getComputedStyle(Jn),ca=Tt.clientWidth-parseFloat(br.paddingLeft)-parseFloat(br.paddingRight),ha=Jn.getBoundingClientRect().right+parseFloat(Pr.marginRight)-Tt.getBoundingClientRect().left;return ha<=ca},Kr=function(){var Ye=/{(.*?)}/,Tt=i.selectedItemsLabel||ni("selectionMessage"),Wt=i.value?i.value.length:0;return Ye.test(Tt)?Tt.replace(Tt.match(Ye)[0],Wt+""):Tt},Vn=function(){var Ye;if(!H&&!i.fixedPlaceholder){var Tt;return ke.isNotEmpty(i.maxSelectedLabels)&&((Tt=i.value)===null||Tt===void 0?void 0:Tt.length)>i.maxSelectedLabels?Kr():ke.isArray(i.value)?i.value.reduce(function(Wt,Jn,br){return Wt+(br!==0?", ":"")+vr(Jn)},""):""}return Ye},Nn=function(){var Ye=i.value?i.value.length:0;if(ke.isNotEmpty(i.maxSelectedLabels)&&Ye>i.maxSelectedLabels)return Kr();if(i.selectedItemTemplate)return H?ke.getJSXElement(i.selectedItemTemplate):i.value.map(function(Wt,Jn){var br=ke.getJSXElement(i.selectedItemTemplate,Wt);return b.createElement(b.Fragment,{key:Jn},br)});if(i.display==="chip"&&!H){var Tt=i.value.slice(0,i.maxSelectedLabels||Ye);return Tt.map(function(Wt,Jn){var br={context:{value:Wt,index:Jn}},Pr=vr(Wt),ca=Pr+"_"+Jn,ha=n({"aria-label":ni("removeTokenIcon"),className:ye("removeTokenIcon"),onClick:function(ie){return jn(ie,Wt)},onKeyDown:function(ie){return ai(ie,Wt)},tabIndex:i.tabIndex||"0"},Ae("removeTokenIcon",br)),Us=!i.disabled&&(i.removeIcon?nr.getJSXIcon(i.removeIcon,Al({},ha),{props:i}):b.createElement(wb,ha)),bo=n({className:ye("token")},Ae("token",br)),Xr=n({className:ye("tokenLabel")},Ae("tokenLabel",br));return b.createElement("div",Ms({},bo,{key:ca}),b.createElement("span",Xr,Pr),Us)})}return Vn()},sr=function(){var Ye=i.optionGroupLabel?Lr(i.options):i.options;if(Q){var Tt=A.trim().toLocaleLowerCase(i.filterLocale),Wt=i.filterBy?i.filterBy.split(","):[i.optionLabel||"label"];if(i.optionGroupLabel){var Jn=[],br=lF(i.options),Pr;try{for(br.s();!(Pr=br.n()).done;){var ca=Pr.value,ha=L0.filter(Fe(ca),Wt,Tt,i.filterMatchMode,i.filterLocale);ha&&ha.length&&Jn.push(Al(Al({},ca),Nf({},i.optionGroupChildren,ha)))}}catch(Us){br.e(Us)}finally{br.f()}return Lr(Jn)}return L0.filter(Ye,Wt,Tt,i.filterMatchMode,i.filterLocale)}return Ye},Lr=function(Ye){return(Ye||[]).reduce(function(Tt,Wt,Jn){Tt.push(Al(Al({},Wt),{},{group:!0,index:Jn}));var br=Fe(Wt);return br&&br.forEach(function(Pr){return Tt.push(Pr)}),Tt},[])},pi=function(Ye){switch(Ye.code){case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;mn(Ye,[],[]),Ye.preventDefault(),Ye.stopPropagation();break}},ai=function(Ye,Tt){switch(Ye.code){case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;jn(Ye,Tt),Ye.preventDefault(),Ye.stopPropagation();break}};b.useImperativeHandle(e,function(){return{props:i,show:He,hide:at,focus:function(){return Ie.focus(ce.current)},getElement:function(){return z.current},getOverlay:function(){return W.current},getInput:function(){return ce.current}}}),Li(function(){yt()}),b.useEffect(function(){ke.combinedRefs(ce,i.inputRef)},[ce,i.inputRef]),b.useEffect(function(){i.overlayVisible===!0?He():i.overlayVisible===!1&&at()},[i.overlayVisible]),fr(function(){Y&&A&&Q&&yt()},[Y,A,Q]),Ha(function(){Di.clear(W.current)});var ui=function(){var Ye=n({className:ye("clearIcon"),"aria-label":ni("clear"),onClick:function(br){return mn(br,[],[])},onKeyDown:function(br){return pi(br)},tabIndex:i.tabIndex||"0"},Ae("clearIcon")),Tt=i.clearIcon||b.createElement(bc,Ye),Wt=nr.getJSXIcon(Tt,Al({},Ye),{props:i});return!H&&i.showClear&&!i.disabled?Wt:null},Pi=function(){var Ye=Nn(),Tt=n({ref:q,className:ye("labelContainer")},Ae("labelContainer")),Wt=n({ref:ee,className:ye("label",{empty:H})},Ae("label"));return b.createElement("div",Tt,b.createElement("div",Wt,Ye||i.placeholder||i.emptyMessage||"empty"))},tr=sr(),$i=ke.isNotEmpty(i.tooltip),Ti=A2.getOtherProps(i),Si=ke.reduceKeys(Ti,Ie.ARIA_PROPS),Hi=n({className:ye("triggerIcon")},Ae("triggerIcon")),fn=n({className:ye("trigger")},Ae("trigger")),$e=i.loadingIcon?nr.getJSXIcon(i.loadingIcon,Al({},Hi),{props:i}):b.createElement(W1,Ms({spin:!0},Hi)),Kt=i.dropdownIcon?nr.getJSXIcon(i.dropdownIcon,Al({},Hi),{props:i}):b.createElement(Xd,Hi),Un=b.createElement("div",fn,i.loading?$e:Kt),jr=!i.inline&&Pi(),kr=!i.inline&&ui(),Ra=n(Al(Al({ref:z,id:i.id,style:Al(Al({},i.style),oe("root")),className:ft(i.className,ye("root",{focusedState:P,context:r,overlayVisibleState:Y}))},Ti),{},{onClick:he}),A2.getOtherProps(i),Ae("root")),Vr=n({className:"p-hidden-accessible","data-p-hidden-accessible":!0},Ae("hiddenInputWrapper")),_s=n(Al({ref:ce,id:i.inputId,name:i.name,type:"text",onFocus:yn,onBlur:ot,onKeyDown:pn,role:"combobox","aria-expanded":Y,disabled:i.disabled,tabIndex:i.disabled?-1:i.tabIndex,value:Vn()},Si),Ae("input"));return b.createElement(b.Fragment,null,b.createElement("div",Ra,b.createElement("div",Vr,b.createElement("input",Ms({},_s,{readOnly:!0}))),!i.inline&&b.createElement(b.Fragment,null,jr,kr,Un),b.createElement(sF,Ms({hostName:"MultiSelect",ref:W,visibleOptions:tr},i,{onClick:ve,onOverlayHide:at,filterValue:m,focusedOptionIndex:l,onFirstHiddenFocus:Ne,onLastHiddenFocus:we,firstHiddenFocusableElementOnOverlay:G,lastHiddenFocusableElementOnOverlay:R,setFocusedOptionIndex:c,hasFilter:Q,isValidOption:Pn,getOptionValue:Nt,updateModel:mn,onFilterInputChange:Rn,resetFilter:xt,onCloseClick:qt,onSelectAll:Lt,getOptionLabel:vt,getOptionRenderKey:An,isOptionDisabled:We,getOptionGroupChildren:Fe,getOptionGroupLabel:Et,getOptionGroupRenderKey:Dn,isSelected:Wn,getSelectedOptionIndex:kn,isAllSelected:ct,onOptionSelect:be,allowOptionSelect:ue,in:Y,onEnter:rn,onEntered:nn,onExit:Jt,onExited:In,ptm:Ae,cx:ye,sx:oe,isUnstyled:re,metaData:pe,changeFocusedOptionIndex:On}))),$i&&b.createElement(cn,Ms({target:z,content:i.tooltip,pt:Ae("tooltip")},i.tooltipOptions)))}));uF.displayName="MultiSelect";const Jde=t=>{var Ae,ye,oe,re,B,ne,se,me,Ne,we;const{field:e,fieldIndex:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isBuilderMode:u,isAdmin:d}=Ht(),[f,h]=F.useState([]),[p,v]=F.useState(!1),[m,A]=F.useState(!1),{userSelectedLanguage:w,formBuilderFormLayout:x,sectionSettingUpdate:C,pageSettingUpdate:T,fieldSettingUpdate:S}=sn(),{taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:P,userTaskSubmitFormData:O,updateUserFormDataSubmit:k,task_status:M,TASK_PUBLISHED:Y}=Ar(),[N,z]=F.useState(0),[$,le]=F.useState(!1),G=()=>{le(!0)},R=()=>{le(!1)},ce=ve=>{A(ve)},q=()=>{A(!1)},W=ve=>{h(ve.value),r!=null&&r.rowIsRepeatable?X(i,a,e,ve.value):H(ve.value)},ee=ve=>{e==null||e.conditionalTabRules.rules.map(ue=>{var Te;(Te=ue==null?void 0:ue.conditions)==null||Te.map(_e=>{var K;if((K=ve.value)!=null&&K.some(Ee=>Ee===_e.option)){const Ee=It.findIndex(x,he=>{var fe;return he.uuid===((fe=_e==null?void 0:_e.tab)==null?void 0:fe.uuid)}),be=x[Ee];be.isHidden=!1,T(Ee,be)}else{const Ee=It.findIndex(x,he=>{var fe;return he.uuid===((fe=_e==null?void 0:_e.tab)==null?void 0:fe.uuid)}),be=x[Ee];be.isHidden=!0,T(Ee,be)}})})},Q=ve=>{e==null||e.conditionalSectionRules.rules.map(ue=>{var Te;(Te=ue==null?void 0:ue.conditions)==null||Te.map(_e=>{var K;if((K=ve.value)!=null&&K.some(Ee=>Ee===_e.option)){const Ee=It.findIndex(x,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.tab)==null?void 0:xe.uuid)}),be=It.findIndex(x[Ee].children,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.section)==null?void 0:xe.uuid)}),he=x[Ee].children[be];he.isHidden=!1,C(Ee,be,he)}else{const Ee=It.findIndex(x,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.tab)==null?void 0:xe.uuid)}),be=It.findIndex(x[Ee].children,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.section)==null?void 0:xe.uuid)}),he=x[Ee].children[be];he.isHidden=!0,C(Ee,be,he)}})})},H=ve=>{const ue=O,Te=It.cloneDeep(E);if((ve==null?void 0:ve.length)>0&&(ue==null?void 0:ue.length)>0){Te[e==null?void 0:e.uuid]=ve;for(const _e of ue)_e.fieldId===t.field.uuid&&(_e.postData[0]={postValue:ve})}else if(delete Te[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const _e of ue)_e.fieldId===t.field.uuid&&(_e.postData[0]={postValue:[]});if(!(r!=null&&r.rowIsRepeatable)){_(Te);const _e=Object.keys(Te).length;P(_e)}},X=(ve,ue,Te,_e)=>{var K;if(h(_e),O){const Ee=[...O],be=It.findIndex(Ee,function(xe){return xe.rowId===(r==null?void 0:r.uuid)});let he=(K=O[be])==null?void 0:K.repeatableFields,fe="<ol class='card '>";_e==null||_e.map(xe=>{fe=fe+`<li>${xe}</li>`}),fe=fe+"</ol>",he={...he,[Te==null?void 0:Te.uuid]:fe},Ee[be]={...Ee[be],repeatableFields:he},k(Ee)}(_e==null?void 0:_e.length)>0?Te.isValid=1:Te.isValid=0,S(ve,ue,s,l,n,Te)},pe=()=>{var ve,ue,Te;if(r!=null&&r.rowIsRepeatable){if(r!=null&&r.repeatableFields){const _e=[...r.repeatableFields],K=It.findIndex(_e,function(Ee){return Ee.uuid===(e==null?void 0:e.uuid)});K>=0&&_e[K].fieldData?h(Ee=>[...Ee,_e[K].fieldData]):(e.isValid=0,h([]))}}else{const _e=O,K=It.cloneDeep(E);if(_e!=null&&_e.length){for(const Ee of _e)if(Ee.fieldId===t.field.uuid&&((ve=Ee==null?void 0:Ee.postData)!=null&&ve.length)){h((ue=Ee==null?void 0:Ee.postData[0])==null?void 0:ue.postValue),K[e==null?void 0:e.uuid]=(Te=Ee==null?void 0:Ee.postData[0])==null?void 0:Te.postValue;const be=Object.keys(K).length;P(be);break}}}v(!0)};F.useEffect(()=>{!p&&(O==null?void 0:O.length)>0&&pe();const ve=Gt.addListener("onSubmitUserForm",()=>{var _e;(_e=e==null?void 0:e.attributes)!=null&&_e.required?(f==null?void 0:f.length)>0?e.isValid=1:e.isValid=0:e.isValid=1}),ue=Gt.addListener("clearRepeatableFields",_e=>{_e===(r==null?void 0:r.uuid)&&(h([]),z(0),e.isValid=0)}),Te=Gt.addListener("OnInvalidFieldCatch",_e=>{e.uuid===(_e==null?void 0:_e.fieldId)?z(1):z(0)});return()=>{ve.remove(),Te.remove(),ue.remove()}});const ge=o.jsxs("div",{onMouseOver:G,onMouseOut:R,children:[u&&$&&o.jsx(Wr,{handleFieldSettingsSidebar:ce,...t}),o.jsxs("div",{className:`field ${u&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:u?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Ae=e==null?void 0:e.headerText)==null?void 0:Ae[w==null?void 0:w.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ye=e==null?void 0:e.attributes)==null?void 0:ye.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(oe=e==null?void 0:e.label)==null?void 0:oe[w==null?void 0:w.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(re=e==null?void 0:e.toolTip)==null?void 0:re[w==null?void 0:w.type],position:"right"})})]}),o.jsx(uF,{onFocus:()=>z(1),value:f,onChange:ve=>{W(ve),ee(ve),Q(ve)},options:e==null?void 0:e.options,optionLabel:`optionText.${w.type}`,placeholder:(B=e==null?void 0:e.placeholder)==null?void 0:B[w==null?void 0:w.type],display:"chip",disabled:c}),((ne=e==null?void 0:e.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:N===1&&!((f==null?void 0:f.length)>0)?(se=e==null?void 0:e.validationMesssage)==null?void 0:se.english:""})]}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[w==null?void 0:w.type]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]}),((Ne=e==null?void 0:e.inlineConditionalRules)==null?void 0:Ne.rules.length)>0&&u===!0&&o.jsx("p",{children:"Inline conditional rules"}),(we=e==null?void 0:e.inlineConditionalRules)==null?void 0:we.rules.map((ve,ue)=>u===!1?o.jsx("div",{children:ve==null?void 0:ve.conditions.map((Te,_e)=>{if(f!=null&&f.some(K=>K===Te.value)||u)return o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{data:e,ruleIndex:ue,conditionIndex:_e,condition:Te,...t})})},_e)})},`rule-${ue}`):o.jsx(ci,{className:"mt-4",header:`Rule ${ue+1}`,children:o.jsx("div",{children:ve==null?void 0:ve.conditions.map((Te,_e)=>{if(f!=null&&f.some(K=>K===Te.value)||u)return o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{data:e,...t,ruleIndex:ue,conditionIndex:_e,condition:Te})})},_e)})},`rule-${ue}`)},ue))]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:m,closeSettingFieldSidebar:q,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:ge})]})},xb=t=>{const{options:e,title:n}=t,r=e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",i=`${e.className} justify-content-start`,a=`${e.titleClassName} pl-1`;return o.jsxs("div",{className:i,children:[o.jsxs("button",{className:e.togglerClassName,onClick:e.onTogglerClick,children:[o.jsx("span",{className:r}),o.jsx(Qt,{})]}),o.jsx("span",{className:a,children:n})]})};xb.defaultProps={field:{},isPreview:!1},xb.propTypes={field:g3.any,isPreview:g3.bool};const dF=t=>{const e=F.useRef(null),{optionIndex:n,option:r,field:i,fieldIndex:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,path:d}=t,{userSelectedLanguage:f,fieldSettingUpdate:h,fieldSettingUpdateInlineConditional:p,gridComponentFieldSettingUpdate:v}=sn(),[m,A]=F.useState(r==null?void 0:r.optionText[f==null?void 0:f.type]);F.useEffect(()=>(A(r==null?void 0:r.optionText[f==null?void 0:f.type]),()=>{}),[i]),F.useEffect(()=>{const C=setTimeout(()=>{x("optionText",r.uuid,m,f)},1500);return()=>{clearTimeout(C)}},[m]);const w=C=>{const T=d.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?p(T[pa],T[ga],T[Ta],T[Ea],T[Ia],T[Pa],T[Go],T[Co],C):(T==null?void 0:T.length)>Pa&&(T==null?void 0:T.length)===ql+1&&(i!=null&&i.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(T[pa],T[ga],T[Ta],T[Ea],T[Ia],T[5],T[6],T[7],C):h(s,l,c,u,a,{...C})},x=(C,T,S,E)=>{if(i!=null&&i.options){const _=[...i.options];_[n][C][E==null?void 0:E.type]=S,w({...i,options:_})}};return o.jsx(o.Fragment,{children:o.jsx(P3,{id:r==null?void 0:r.uuid,style:{display:"inline-block"},className:"builder-input-label-edit",innerRef:e,html:m||"",disabled:!1,onChange:C=>{A(C.target.value)},tagName:"article"},r==null?void 0:r.uuid)})},fF=t=>{const{optionId:e,field:n,fieldIndex:r,columnIndex:i,sectionIndex:a,rowIndex:s,pageIndex:l,path:c}=t,{fieldSettingUpdate:u,fieldSettingUpdateInlineConditional:d,gridComponentFieldSettingUpdate:f}=sn(),h=m=>{const A=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?d(A[pa],A[ga],A[Ta],A[Ea],A[Ia],A[Pa],A[Go],A[Co],m):(A==null?void 0:A.length)>Pa&&(A==null?void 0:A.length)===ql+1&&(m!=null&&m.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?f(A[pa],A[ga],A[Ta],A[Ea],A[Ia],A[5],A[6],A[7],m):u(l,a,s,i,r,m)},p=()=>{const m=n==null?void 0:n.options.filter(function(w){return(w==null?void 0:w.uuid)!==e}),A={...n,options:m};h(A)},v=()=>{const m=It.cloneDeep(n),A={...m,options:[...m.options,{uuid:tt(),optionText:{english:"Unititled"},value:tt(),score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]};h(A)};return o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,label:"Add",className:"w-5rem ml-3 mr-3",onClick:()=>v(),size:"small"}),o.jsx(Ft,{text:!0,className:"w-3rem",size:"small",onClick:()=>{p()},icon:"pi pi-trash"})]})},Zde=t=>{var we,ve,ue,Te,_e,K,Ee,be,he;const[e,n]=F.useState([]),[r,i]=F.useState(0),{taskRegisterData:a,updateTaskRegisterData:s,updateTaskProgressValue:l,userTaskSubmitFormData:c,task_status:u,updateUserFormDataSubmit:d,taskFieldUpdateHook:f,TASK_PUBLISHED:h,updateProgressDataValuesHook:p}=Ar(),{globalAlignment:v,isBuilderMode:m,isRenderView:A,isAdmin:w}=Ht(),{sectionSettingUpdate:x,userSelectedLanguage:C,fieldSettingUpdate:T,formBuilderFormLayout:S,pageSettingUpdate:E}=sn(),{field:_,fieldIndex:P,sectionIndex:O,pageIndex:k,row:M,rowIndex:Y,columnIndex:N,section:z,page:$,isDisabled:le}=t,[G,R]=F.useState(!1),[ce,q]=F.useState(!1),[W,ee]=F.useState(!1),Q=()=>{ee(!0)},H=()=>{ee(!1)},X=fe=>{R(fe)},pe=()=>{R(!1)},ge=fe=>{const xe=[...e];fe.checked?xe.push(fe.value):xe.splice(xe.indexOf(fe.value),1),n(xe),M!=null&&M.rowIsRepeatable?c&&se(k,O,_,xe):(Ae(fe),oe(xe),c&&(B(xe),(xe==null?void 0:xe.length)>0?_.isValid=1:_.isValid=0,f(k,O,Y,N,P,_)))},Ae=fe=>{var Me;const xe=(Me=fe==null?void 0:fe.value)==null?void 0:Me.value;_==null||_.conditionalTabRules.rules.map(Be=>{var Je;(Je=Be==null?void 0:Be.conditions)==null||Je.map(st=>{if(xe===(st==null?void 0:st.option)&&(fe!=null&&fe.checked)){const ut=It.findIndex(S,zt=>{var pn;return zt.uuid===((pn=st==null?void 0:st.tab)==null?void 0:pn.uuid)}),St=S[ut];St.isHidden=!1,E(ut,St)}else if(xe===(st==null?void 0:st.option)&&!(fe!=null&&fe.checked)){const ut=It.findIndex(S,zt=>{var pn;return zt.uuid===((pn=st==null?void 0:st.tab)==null?void 0:pn.uuid)}),St=S[ut];St.isHidden=!0,E(ut,St)}})})},ye=F.useCallback((fe,xe)=>{var Me;if((c==null?void 0:c.length)>0){const Be=c;if(Be!=null&&Be.length){const Je=a;for(const[ut,St]of xe.children.entries())for(const[,zt]of St.children.entries())for(const[pn,Lt]of zt.children.entries())if(St!=null&&St.rowIsRepeatable){if((St==null?void 0:St.rowIsRepeatable)===!0){const mn=It.findIndex(Be,function(Rn){return Rn.rowId===St.uuid});fe===!0?mn===-1&&(Be.push({postData:[],tabId:$.uuid,rowId:St==null?void 0:St.uuid,tabIndex:k,sectionId:z.uuid,minimumEntries:z==null?void 0:z.minimumEntries,sectionIndex:O,sectionHeading:z.heading,subHeadingText:z.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:z.isHidden&&z.isHidden===1?1:0,reviewerChecklist:St==null?void 0:St.reviewerChecklist}),Je[St==null?void 0:St.uuid]&&delete Je[St==null?void 0:St.uuid]):(Je[St==null?void 0:St.uuid]&&delete Je[St==null?void 0:St.uuid],mn>=0&&Be.splice(mn,1))}}else{const mn=It.findIndex(Be,function(Rn){return Rn.fieldId===Lt.uuid});fe?mn===-1&&(Be.push({postData:[],tabId:$.uuid,tabIndex:k,...Lt.inlineConditionalRules?{inlineConditionalRules:Lt.inlineConditionalRules}:{},...Lt.conditionalTabRules?{conditionalTabRules:Lt.conditionalTabRules}:{},...Lt.conditionalSectionRules?{conditionalSectionRules:Lt.conditionalSectionRules}:{},sectionId:z.uuid,sectionIndex:O,sectionHeading:z.heading,subHeadingText:z.subHeadingText,reviewerChecklist:Lt==null?void 0:Lt.reviewerChecklist,rowId:St.uuid,rowIndex:ut,columnId:z.uuid,columnIndex:N,inlineConditionalField:!0,fieldIndex:pn,fieldId:Lt.uuid,fieldInputType:Lt.componentType,fieldTitle:(Me=Lt.label)==null?void 0:Me.english,fieldDescription:Lt.description||null,fieldHelperText:Lt.helperText||null,fieldHeaderText:Lt.headerText||null,fieldFooterText:Lt.footerText||null,fieldTitleAbb:Lt.abbreviationLabel||Lt.label,question_abb_table:Lt.textForTable||null,language:"english",isHiddenfield:Lt.isHidden&&Lt.isHidden===1?1:0,isHiddenSection:z.isHidden&&z.isHidden===1?1:0}),Je[Lt==null?void 0:Lt.uuid]&&delete Je[Lt==null?void 0:Lt.uuid]):(Je[Lt==null?void 0:Lt.uuid]&&delete Je[Lt==null?void 0:Lt.uuid],mn>=0&&Be.splice(mn,1))}const st=Object.keys(Je).length;p({progressMaxValue:Be==null?void 0:Be.length,progressValue:st}),d([...Be])}}},[N,_==null?void 0:_.abbreviationLabel,_==null?void 0:_.componentType,_==null?void 0:_.conditionalSectionRules,_==null?void 0:_.conditionalTabRules,_==null?void 0:_.description,_==null?void 0:_.footerText,_==null?void 0:_.headerText,_==null?void 0:_.helperText,_==null?void 0:_.inlineConditionalRules,_==null?void 0:_.isHidden,_==null?void 0:_.label,_==null?void 0:_.reviewerChecklist,_==null?void 0:_.textForTable,$==null?void 0:$.uuid,k,M==null?void 0:M.uuid,Y,z==null?void 0:z.heading,z==null?void 0:z.isHidden,z==null?void 0:z.subHeadingText,z==null?void 0:z.uuid,O,a,p,d,c]),oe=fe=>{_==null||_.conditionalSectionRules.rules.map(xe=>{var Me;(Me=xe==null?void 0:xe.conditions)==null||Me.map(Be=>{if(fe!=null&&fe.some(Je=>Je.value===Be.option)){const Je=It.findIndex(S,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.tab)==null?void 0:zt.uuid)}),st=It.findIndex(S[Je].children,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.section)==null?void 0:zt.uuid)}),ut=S[Je].children[st];ut.isHidden=!1,ye(!0,S[Je].children[st]),x(Je,st,ut)}else{const Je=It.findIndex(S,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.tab)==null?void 0:zt.uuid)}),st=It.findIndex(S[Je].children,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.section)==null?void 0:zt.uuid)}),ut=S[Je].children[st];ut.isHidden=!0,ye(!1,S[Je].children[st]),x(Je,st,ut)}})})},re=()=>{var xe,Me,Be,Je;const fe=c;if((fe==null?void 0:fe.length)>0){for(const st of fe)if(st.fieldId===t.field.uuid){n(((xe=st==null?void 0:st.postData[0])==null?void 0:xe.postValue.length)>0?(Me=st==null?void 0:st.postData[0])==null?void 0:Me.postValue:[]);const ut=((Be=st==null?void 0:st.postData[0])==null?void 0:Be.postValue.length)>0?(Je=st==null?void 0:st.postData[0])==null?void 0:Je.postValue:[];_==null||_.conditionalTabRules.rules.map(St=>{var zt;(zt=St==null?void 0:St.conditions)==null||zt.map(pn=>{if(ut.some(Lt=>Lt.value===(pn==null?void 0:pn.option))){const Lt=It.findIndex(S,Rn=>{var xt;return Rn.uuid===((xt=pn==null?void 0:pn.tab)==null?void 0:xt.uuid)}),mn=S[Lt];mn.isHidden=!1,E(Lt,mn)}})}),q(!0);break}}},B=fe=>{const xe=c,Me=It.cloneDeep(a);if((fe==null?void 0:fe.length)>0&&(xe==null?void 0:xe.length)>0){Me[_==null?void 0:_.uuid]=fe;for(const Je of xe)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe});s(Me);const Be=Object.keys(Me).length;l(Be)}else{if(delete Me[_==null?void 0:_.uuid],(xe==null?void 0:xe.length)>0)for(const Je of xe)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:[]});s(Me);const Be=Object.keys(Me).length;l(Be)}},ne=()=>{const fe=[];return _==null||_.options.map((xe,Me)=>{var Je,st,ut,St;const Be=e;fe.push(o.jsxs("div",{className:`field ${m&&" py-3 px-4 builder-element-wrapper "}${(_==null?void 0:_.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"flex align-items-center gap-2",children:[o.jsx(Yr,{id:`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`,onFocus:()=>i(1),disabled:le,onChange:zt=>{ge(zt)},value:xe,checked:Be==null?void 0:Be.some(zt=>zt.uuid===xe.uuid)}),((Je=xe==null?void 0:xe.hyperlinkText)==null?void 0:Je[C==null?void 0:C.type])===""?o.jsxs("label",{htmlFor:`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`,children:[_!=null&&_.showAlphabetList?o.jsxs("span",{className:"mx-2",children:[" ",XO(Me)," "]}):o.jsx(o.Fragment,{}),m?o.jsx(o.Fragment,{children:o.jsx(dF,{...t,option:xe,optionIndex:Me})}):o.jsx(o.Fragment,{children:(st=xe==null?void 0:xe.optionText)==null?void 0:st[C==null?void 0:C.type]})]}):o.jsx("label",{children:o.jsx("a",{href:(ut=xe==null?void 0:xe.hyperlinkText)==null?void 0:ut[C==null?void 0:C.type],target:"_blank",rel:"noreferrer",children:(St=xe==null?void 0:xe.optionText)==null?void 0:St[C==null?void 0:C.type]})})]}),m&&o.jsx("div",{className:"builder-radio-option-settings",children:o.jsx(fF,{optionId:xe==null?void 0:xe.uuid,...t})})]},`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`))}),fe};F.useEffect(()=>{ce||re();const fe=Gt.addListener("clearRepeatableFields",Be=>{Be===(M==null?void 0:M.uuid)&&(n([]),i(0),_.isValid=0,T(k,O,Y,N,P,_))}),xe=Gt.addListener("onSubmitUserForm",()=>{var Je;const Be=e;(Je=_==null?void 0:_.attributes)!=null&&Je.required?(Be.length>0?_.isValid=1:_.isValid=0,f(k,O,Y,N,P,_)):_.isValid=1}),Me=Gt.addListener("OnInvalidFieldCatch",Be=>{_.uuid===(Be==null?void 0:Be.fieldId)?i(1):i(0)});return()=>{xe.remove(),Me.remove(),fe.remove()}});const se=(fe,xe,Me,Be)=>{var zt;n(Be);const Je=[...c],st=It.findIndex(Je,function(pn){return pn.rowId===(M==null?void 0:M.uuid)});let ut=(zt=c[st])==null?void 0:zt.repeatableFields,St="<ol class='card '>";Be==null||Be.map(pn=>{St=St+`<li>${pn.value}</li>`}),St=St+"</ol>",ut={...ut,[Me==null?void 0:Me.uuid]:St},Je[st]={...Je[st],repeatableFields:ut},d(Je),(Be==null?void 0:Be.length)>0?Me.isValid=1:Me.isValid=0,T(fe,xe,Y,N,st,Me)},me=o.jsxs("div",{onMouseOver:Q,onMouseOut:H,children:[m&&W&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsx("div",{className:`field ${m&&" py-3 px-4 builder-element-wrapper "}${(_==null?void 0:_.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(_==null?void 0:_.showHeaderText)&&o.jsx("h6",{children:(we=_==null?void 0:_.headerText)==null?void 0:we[C==null?void 0:C.type]}),(_==null?void 0:_.showLabel)&&o.jsxs("label",{htmlFor:`${P}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ve=_==null?void 0:_.attributes)==null?void 0:ve.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",m?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ue=_==null?void 0:_.label)==null?void 0:ue[C==null?void 0:C.type]}),o.jsx("span",{className:"ml-3",children:(_==null?void 0:_.showToolTip)&&o.jsx(Vi,{message:(Te=_==null?void 0:_.toolTip)==null?void 0:Te[C==null?void 0:C.type],position:"right"})})]}),ne(),o.jsx("div",{children:((_e=_==null?void 0:_.attributes)==null?void 0:_e.required)&&o.jsx("small",{className:"error",children:r===1&&!(e&&(e==null?void 0:e.length)>0)?(K=_==null?void 0:_.validationMesssage)==null?void 0:K.language:""})}),o.jsx("div",{children:(_==null?void 0:_.showHelperText)&&o.jsx("small",{children:(Ee=_==null?void 0:_.helperText)==null?void 0:Ee[C==null?void 0:C.type]})}),((be=_==null?void 0:_.inlineConditionalRules)==null?void 0:be.rules.length)>0&&m===!0&&o.jsx("p",{children:"Inline conditional rules"}),(he=_==null?void 0:_.inlineConditionalRules)==null?void 0:he.rules.map((fe,xe)=>{if(m===!1){const Me=e;return o.jsx("div",{children:fe==null?void 0:fe.conditions.map((Be,Je)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:Me==null?void 0:Me.some(st=>st.value===Be.value),inputValue:e,condition:Be,ruleIndex:xe,conditionIndex:Je,field:_,section:z,page:$,row:M,pageIndex:k,sectionIndex:O,rowIndex:Y,columnIndex:N,...t})},`select-rule-${xe}-`+Je))},`rule-${xe}`)}else return o.jsx(ci,{className:"mt-4",header:`Rule ${xe+1}`,children:o.jsx("div",{children:fe==null?void 0:fe.conditions.map((Me,Be)=>o.jsx(F.Fragment,{children:o.jsxs("div",{className:"card",children:[o.jsx(pu,{style:{marginTop:-20},className:"mr-2",severity:"success",value:`Condition: ${Me==null?void 0:Me.value}`,rounded:!0}),o.jsx(n0,{isConditionTrue:(e==null?void 0:e.some(Je=>Je.value===Me.value))||m,inputValue:e,condition:Me,ruleIndex:xe,conditionIndex:Be,field:_,section:z,page:$,row:M,pageIndex:k,sectionIndex:O,rowIndex:Y,columnIndex:N,...t})]})},`select-rule-${xe}-`+Be))},`rule-${xe}`)},xe)})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]}),Ne=()=>{let fe="";return m&&(fe=fe+" field-form-builder"),u===h&&w===!0&&(fe=fe+" card"),fe};return o.jsxs(o.Fragment,{children:[G===!0&&o.jsx(Zi,{visibilty:G,closeSettingFieldSidebar:pe,...t},_==null?void 0:_.uuid),o.jsx("div",{className:Ne(),dir:v,children:u===h&&w===!0?o.jsx(ci,{headerTemplate:fe=>{var xe;return o.jsx(xb,{options:fe,title:(xe=_==null?void 0:_.label)==null?void 0:xe[C==null?void 0:C.type]})},toggleable:!0,children:me}):me})]})},e0e=t=>{var re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{task_status:e,taskRegisterData:n,updateTaskRegisterData:r,updateTaskProgressValue:i,userTaskSubmitFormData:a,updateUserFormDataSubmit:s,updateProgressDataValuesHook:l,TASK_PUBLISHED:c}=Ar(),{field:u,row:d,pageIndex:f,sectionIndex:h,section:p,page:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:C}=Ht(),{pageSettingUpdate:T,formBuilderFormLayout:S,sectionSettingUpdate:E,userSelectedLanguage:_}=sn(),[P,O]=F.useState(!1),[k,M]=F.useState(null),[Y,N]=F.useState(0),[z,$]=F.useState(!1),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=K=>{O(K)},W=()=>{O(!1)},ee=()=>{var K,Ee,be,he;if((a==null?void 0:a.length)>0)if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const fe=[...d.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(u==null?void 0:u.uuid)});xe>=0&&fe[xe].fieldData?M(fe[xe].fieldData):(u.isValid=0,M(null))}}else{const fe=a,xe=It.cloneDeep(n);let Me=null;if(fe!=null&&fe.length){for(const Be of fe)if(Be.fieldId===t.field.uuid&&((K=Be==null?void 0:Be.postData)!=null&&K.length)){Me=(Ee=Be==null?void 0:Be.postData[0])==null?void 0:Ee.postValue,M((be=Be==null?void 0:Be.postData[0])==null?void 0:be.postValue),xe[u==null?void 0:u.uuid]=(he=Be==null?void 0:Be.postData[0])==null?void 0:he.postValue;const Je=Object.keys(xe).length;i(Je);break}}Q({value:Me}),X({value:Me})}setTimeout(()=>{$(!0)},2e3)},Q=K=>{const Ee=K.value;u==null||u.conditionalTabRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(S,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.tab)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=S[xe];Me.isHidden=!1,T(xe,Me)}else{let Me=S[xe];Me={...Me,isHidden:!0},T(xe,Me)}})})},H=F.useCallback((K,Ee)=>{var be;if((a==null?void 0:a.length)>0){const he=a;if(he!=null&&he.length){const fe=n;for(const[Me,Be]of Ee.children.entries())for(const[,Je]of Be.children.entries())for(const[st,ut]of Je.children.entries())if(Be!=null&&Be.rowIsRepeatable){if((Be==null?void 0:Be.rowIsRepeatable)===!0){const St=It.findIndex(he,function(zt){return zt.rowId===Be.uuid});K===!0?St===-1&&(he.push({postData:[],tabId:v.uuid,rowId:Be==null?void 0:Be.uuid,tabIndex:f,sectionId:p.uuid,minimumEntries:p==null?void 0:p.minimumEntries,sectionIndex:h,sectionHeading:p.heading,subHeadingText:p.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:!!(p.isHidden&&p.isHidden===!0),reviewerChecklist:Be==null?void 0:Be.reviewerChecklist}),fe[Be==null?void 0:Be.uuid]&&delete fe[Be==null?void 0:Be.uuid]):(fe[Be==null?void 0:Be.uuid]&&delete fe[Be==null?void 0:Be.uuid],St>=0&&he.splice(St,1))}}else{const St=It.findIndex(he,function(zt){return zt.fieldId===ut.uuid});K?St===-1&&(he.push({postData:[],tabId:v.uuid,tabIndex:f,...ut.inlineConditionalRules?{inlineConditionalRules:ut.inlineConditionalRules}:{},...ut.conditionalTabRules?{conditionalTabRules:ut.conditionalTabRules}:{},...ut.conditionalSectionRules?{conditionalSectionRules:ut.conditionalSectionRules}:{},sectionId:p.uuid,sectionIndex:h,sectionHeading:p.heading,subHeadingText:p.subHeadingText,reviewerChecklist:ut==null?void 0:ut.reviewerChecklist,rowId:Be.uuid,rowIndex:Me,columnId:p.uuid,columnIndex:A,inlineConditionalField:!0,fieldIndex:st,fieldId:ut.uuid,fieldInputType:ut.componentType,fieldTitle:(be=ut.label)==null?void 0:be.english,fieldDescription:ut.description||null,fieldHelperText:ut.helperText||null,fieldHeaderText:ut.headerText||null,fieldFooterText:ut.footerText||null,fieldTitleAbb:ut.abbreviationLabel||ut.label,question_abb_table:ut.textForTable||null,language:"english",isHiddenfield:ut.isHidden&&ut.isHidden===1?1:0,isHiddenSection:!!(p.isHidden&&p.isHidden===!0)}),fe[ut==null?void 0:ut.uuid]&&delete fe[ut==null?void 0:ut.uuid]):(fe[ut==null?void 0:ut.uuid]&&delete fe[ut==null?void 0:ut.uuid],St>=0&&he.splice(St,1))}const xe=Object.keys(fe).length;l({progressMaxValue:he==null?void 0:he.length,progressValue:xe}),s([...he])}}},[A,u==null?void 0:u.abbreviationLabel,u==null?void 0:u.componentType,u==null?void 0:u.conditionalSectionRules,u==null?void 0:u.conditionalTabRules,u==null?void 0:u.description,u==null?void 0:u.footerText,u==null?void 0:u.headerText,u==null?void 0:u.helperText,u==null?void 0:u.inlineConditionalRules,u==null?void 0:u.isHidden,u==null?void 0:u.label,u==null?void 0:u.reviewerChecklist,u==null?void 0:u.textForTable,v==null?void 0:v.uuid,f,d==null?void 0:d.uuid,m,p==null?void 0:p.heading,p==null?void 0:p.isHidden,p==null?void 0:p.subHeadingText,p==null?void 0:p.uuid,h,n,l,s,a]),X=K=>{const Ee=K.value;u==null||u.conditionalSectionRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{if(Ee===(fe==null?void 0:fe.option)){const xe=It.findIndex(S,Je=>{var st;return Je.uuid===((st=fe==null?void 0:fe.tab)==null?void 0:st.uuid)}),Me=It.findIndex(S[xe].children,Je=>{var st;return Je.uuid===((st=fe==null?void 0:fe.section)==null?void 0:st.uuid)}),Be=S[xe].children[Me];Be.isHidden=!1,H(!0,S[xe].children[Me]),E(xe,Me,Be)}else{const xe=It.findIndex(S,Je=>{var st;return(Je==null?void 0:Je.uuid)===((st=fe==null?void 0:fe.tab)==null?void 0:st.uuid)}),Me=It.findIndex(S[xe].children,Je=>{var st;return(Je==null?void 0:Je.uuid)===((st=fe==null?void 0:fe.section)==null?void 0:st.uuid)}),Be=S[xe].children[Me];Be.isHidden=!0,H(!1,S[xe].children[Me]),E(xe,Me,Be)}})})};F.useEffect(()=>{z||ee();const K=Gt.addListener("clearRepeatableFields",he=>{he===(d==null?void 0:d.uuid)&&(M(""),N(0),u.isValid=1)}),Ee=Gt.addListener("onSubmitUserForm",()=>{var he;if((he=u==null?void 0:u.attributes)!=null&&he.required){const fe=k;fe!=null&&fe.uuid&&(fe!=null&&fe.value)?u.isValid=1:u.isValid=0}else u.isValid=1}),be=Gt.addListener("OnInvalidFieldCatch",he=>{(u==null?void 0:u.uuid)===(he==null?void 0:he.fieldId)?N(1):N(0)});return()=>{Ee.remove(),be.remove(),K.remove()}});const pe=(K,Ee)=>{var be;if(a){const he=[...a],fe=It.findIndex(he,function(Me){return Me.rowId===(d==null?void 0:d.uuid)});let xe=(be=a[fe])==null?void 0:be.repeatableFields;xe={...xe,[K==null?void 0:K.uuid]:Ee},he[fe]={...he[fe],repeatableFields:xe},s(he)}M(Ee),Ee!==null?K.isValid=1:K.isValid=0},ge=K=>{var Ee;M(K.target.value),Q(K),X(K),d!=null&&d.rowIsRepeatable?pe(u,(Ee=K==null?void 0:K.target)==null?void 0:Ee.value):ye(K),setTimeout(()=>{Gt.emit("updatePageRender","complete")},1e3)};console.log("field",u);const Ae=()=>{var K;if(((K=u==null?void 0:u.fieldType)==null?void 0:K.type)==="radio"){const Ee=[];return u==null||u.options.map((be,he)=>{var xe,Me,Be,Je;const fe=k;Ee.push(o.jsxs("div",{className:`field-radiobutton ${u!=null&&u.showButtonLayout?"col-6 field-radiobutton-builder":""}`,onClick:()=>{ge({value:be,target:{value:be}})},style:(fe==null?void 0:fe.uuid)===(be==null?void 0:be.uuid)&&(u!=null&&u.showButtonLayout)?{backgroundColor:"#0F8BFD",padding:5,borderRadius:8}:{padding:5},children:[o.jsx(sa,{onFocus:()=>N(1),inputId:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder-radio":"preview"}`,onChange:st=>{ge(st)},value:be,name:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder":"preview"}`,checked:(fe==null?void 0:fe.uuid)===(be==null?void 0:be.uuid),disabled:w}),((xe=be==null?void 0:be.hyperlinkText)==null?void 0:xe[_==null?void 0:_.type])===""?o.jsxs("label",{htmlFor:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder-label":"preview"}`,children:[u!=null&&u.showAlphabetList?o.jsxs("span",{className:"mx-2",children:[" ",XO(he)," "]}):"",C?o.jsx(o.Fragment,{children:o.jsx(dF,{...t,option:be,optionIndex:he})}):o.jsxs(o.Fragment,{children:[" ",(Me=be==null?void 0:be.optionText)==null?void 0:Me[_==null?void 0:_.type]]})]}):o.jsx("label",{children:o.jsx("a",{href:(Be=be==null?void 0:be.hyperlinkText)==null?void 0:Be[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(Je=be==null?void 0:be.optionText)==null?void 0:Je[_==null?void 0:_.type]})}),C&&o.jsx("div",{className:"builder-radio-option-settings",children:o.jsx(fF,{optionId:be==null?void 0:be.uuid,...t})})]},"li-item-"+he))}),Ee}},ye=K=>{var xe,Me;M(K.target.value);const Ee={value:K.target.value};Q(Ee),X(Ee);const be=a,he=It.cloneDeep(n);if((xe=K==null?void 0:K.target)!=null&&xe.value&&(be==null?void 0:be.length)>0)for(const Be of be)Be.fieldId===t.field.uuid&&(he[u==null?void 0:u.uuid]=(Me=K==null?void 0:K.target)==null?void 0:Me.value,Be.postData[0]={postValue:K.target.value});else delete he[u==null?void 0:u.uuid];r(he);const fe=Object.keys(he).length;i(fe)},oe=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[C&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${C&&" py-3 px-4 builder-element-wrapper "}${(u==null?void 0:u.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(u==null?void 0:u.showHeaderText)&&o.jsx("h6",{children:(re=u==null?void 0:u.headerText)==null?void 0:re[_==null?void 0:_.type]}),(u==null?void 0:u.showLabel)&&o.jsxs("label",{htmlFor:u.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((B=u==null?void 0:u.attributes)==null?void 0:B.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",C?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ne=u==null?void 0:u.label)==null?void 0:ne[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:u!=null&&u.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(se=u==null?void 0:u.toolTip)==null?void 0:se[_==null?void 0:_.type],position:"right"})}):""})]}),(u==null?void 0:u.showButtonLayout)===!0?o.jsxs("div",{className:"grid",children:[Ae()," "]}):Ae(),o.jsx("div",{children:((me=u==null?void 0:u.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:Y===1&&k!==null?(Ne=u==null?void 0:u.validationMesssage)==null?void 0:Ne.language:""})}),o.jsx("div",{children:(u==null?void 0:u.showHelperText)&&o.jsx("small",{children:(we=u==null?void 0:u.helperText)==null?void 0:we[_==null?void 0:_.type]})}),((ve=u==null?void 0:u.inlineConditionalRules)==null?void 0:ve.rules.length)>0&&C===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((Te=(ue=u==null?void 0:u.inlineConditionalRules)==null?void 0:ue.rules)==null?void 0:Te.length)>0&&((_e=u==null?void 0:u.inlineConditionalRules)==null?void 0:_e.rules.map((K,Ee)=>{const be=k;return C===!1?o.jsx("div",{children:K==null?void 0:K.conditions.map((he,fe)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((be==null?void 0:be.value)===he.value||C),inputValue:k,condition:he,ruleIndex:Ee,conditionIndex:fe,field:u,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,isAdmin:x,...t})},`select-rule-${Ee}-`+fe))},`rule-${Ee}`):o.jsx(ci,{className:"mt-4",header:`Rule ${Ee+1}`,children:o.jsx("div",{children:K==null?void 0:K.conditions.map((he,fe)=>{const xe=k;return o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((xe==null?void 0:xe.value)===he.value||C),inputValue:k,condition:he,ruleIndex:Ee,conditionIndex:fe,field:u,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,...t})},`select-rule-${Ee}-`+fe)})},`rule-${Ee}`)},Ee)}))]}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},u==null?void 0:u.uuid),o.jsx(xi,{...t,fieldWrap:oe})]})},t0e=F.memo(e0e),n0e=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Text"}),o.jsx(wn,{value:(i=r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value),placeholder:"Heading text",id:r==null?void 0:r.uuid})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value),placeholder:"Link"})]})]})},r0e=t=>{const{onHandleChangeHeadingTypeSetttings:e,fieldState:n}=t,r=[{name:"H1",type:"h1"},{name:"H2",type:"h2"},{name:"H3",type:"h3"},{name:"H4",type:"h4"},{name:"H5",type:"h5"}];return o.jsxs("form",{className:"p-fluid",children:[o.jsx("h3",{children:"Select heading type"}),r.map((i,a)=>o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:i==null?void 0:i.type,name:"heading",value:i==null?void 0:i.type,onChange:s=>e(s),checked:n.headingType===i.type}),o.jsx("label",{htmlFor:i.type,children:i.name})]},a))]})},i0e=t=>{const{fieldSettingUpdate:e,formBuilderSchemaLanguages:n,formBuilderPublishedStatus:r,fieldSettingUpdateInlineConditional:i,gridComponentFieldSettingUpdate:a}=sn(),{path:s,visibilty:l,field:c,closeSettingFieldSidebar:u,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p,fieldIndex:v,typeName:m}=t,[A,w]=F.useState(c),{updateGlobalToast:x}=Ht(),C=(E,_,P)=>{w(O=>({...O,[E]:{...O[E],[_==null?void 0:_.type]:P}}))},T=E=>{w(_=>({..._,headingType:E==null?void 0:E.value}))},S=()=>{const E=s.split("-").map(Number);(E==null?void 0:E.length)>5&&(E==null?void 0:E.length)===8&&(A!=null&&A.inlineConditionalRules)?i(E[pa],E[ga],E[Ta],E[Ea],E[Ia],E[Pa],E[Go],E[Co],A):(E==null?void 0:E.length)>Pa&&(E==null?void 0:E.length)===ql+1&&(A!=null&&A.componentType)?a(E[pa],E[ga],E[Ta],E[Ea],E[Ia],E[vx],E[bx],E[yx],A):e(d,f,h,p,v,A),x({showToast:!0,toastMessage:"Updated",toastDetail:`${m} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{style:{width:"750px"},visible:l,position:"left",className:"p-sidebar-lg",onHide:()=>u(),header:()=>o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"]})}),children:[o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:n!=null&&n.length?n.map((E,_)=>o.jsx(so,{tabIndex:_,header:E==null?void 0:E.language,children:o.jsx(n0e,{language:E,fieldState:A,onHandleChange:C,...t})},_)):""})}),o.jsx(wr,{header:"Setting",children:o.jsx(r0e,{onHandleChangeHeadingTypeSetttings:T,fieldState:A})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!r&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>S(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>u(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},a0e=t=>{var v,m;const{field:e}=t,{isBuilderMode:n}=Ht(),{userSelectedLanguage:r}=sn(),[i,a]=F.useState(!1),[s,l]=F.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=A=>{a(A)},f=()=>{a(!1)},h=()=>{var A,w,x,C,T,S;return(e==null?void 0:e.headingType)==="h1"?o.jsx("h1",{children:(A=e==null?void 0:e.text)==null?void 0:A[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h2"?o.jsx("h2",{children:(w=e==null?void 0:e.text)==null?void 0:w[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h3"?o.jsx("h3",{children:(x=e==null?void 0:e.text)==null?void 0:x[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h4"?o.jsx("h4",{children:(C=e==null?void 0:e.text)==null?void 0:C[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h5"?o.jsx("h5",{children:(T=e==null?void 0:e.text)==null?void 0:T[r==null?void 0:r.type]}):o.jsx("h1",{children:(S=e==null?void 0:e.text)==null?void 0:S[r==null?void 0:r.type]})},p=o.jsxs("div",{className:n?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[n&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsx("div",{className:n?"field-form-builder px-2":" px-2",children:o.jsx("div",{className:"col-12",children:((v=e==null?void 0:e.hrefLink)==null?void 0:v[r==null?void 0:r.type])!==""?o.jsx("a",{href:(m=e==null?void 0:e.hrefLink)==null?void 0:m[r==null?void 0:r.type],target:"_blank",rel:"noreferrer",children:h()}):h()})})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(i0e,{visibilty:i,closeSettingFieldSidebar:f,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:p})]})},s0e=t=>{var i,a;const{language:e,onHandleQuestionTextChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Question text"}),o.jsx(wn,{placeholder:"Enter question",value:(i=r.questionText)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("questionText",e.type,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Correct answer"}),o.jsx(wn,{placeholder:"Enter correct answer",value:(a=r.correctAnswerComment)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("correctAnswerComment",e.type,s.target.value)})]})]})},o0e=t=>{var i;const{onHandleChange:e,fieldState:n,onHandleChangeAttributesSetttings:r}=t;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",style:{display:"inline-block",width:"150px"},children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Time limit"}),o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(no,{inputId:"horizontal",showButtons:!0,buttonLayout:"horizontal",step:1,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},value:n==null?void 0:n.timeLimit,onChange:a=>e("timeLimit",a.value)}),o.jsx("span",{className:"p-inputgroup-addon",children:"mins"})]})]})}),o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",style:{display:"inline-block",width:"100px"},children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Score"}),o.jsx("div",{className:"p-inputgroup",children:o.jsx(no,{inputId:"horizontal",showButtons:!0,buttonLayout:"horizontal",step:1,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},value:n==null?void 0:n.score,onChange:a=>e("score",a.value)})})]})}),o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"required",checked:(i=n==null?void 0:n.attributes)==null?void 0:i.required,onChange:a=>r("required",a.checked)}),o.jsx("label",{htmlFor:"required",children:"Is complusory?"})]})})]})},l0e=t=>{const{onHandleChange:e,fieldState:n}=t,[r,i]=F.useState([{type:"radio"},{type:"checkbox"}]);return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field field-checkbox",children:[o.jsx(Yr,{inputId:"isAllowMultipleAnswer",value:"isAllowMultipleAnswer",onChange:a=>{e("isAllowMultipleAnswer",a==null?void 0:a.checked),a!=null&&a.checked?(i([{type:"checkbox"}]),e("answerInputType","checkbox")):(i([{type:"radio"}]),e("answerInputType","radio"))},checked:n==null?void 0:n.isAllowMultipleAnswer}),o.jsx("label",{htmlFor:"isAllowMultipleAnswer",className:"p-checkbox-label ",children:"Allow multiple answer"})]}),(n==null?void 0:n.isAllowMultipleAnswer)&&o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Number of options"}),o.jsx(wn,{type:"number",value:(n==null?void 0:n.noOfMultpleAnswer)||0,onChange:a=>{var s;e("noOfMultpleAnswer",(s=a==null?void 0:a.target)==null?void 0:s.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Answer input type"}),r.map((a,s)=>o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:a.type,name:"answerInputType",value:a.type,onChange:()=>{if(e("answerInputType",a.type),a.type==="checkbox"&&e("isAllowMultipleAnswer",!0),a.type==="radio"){let l=[...(n==null?void 0:n.answerOptions)||[]];l=l.map(c=>({...c,isCorrect:!1})),e("answerOptions",l),e("isAllowMultipleAnswer",!1)}},checked:(n==null?void 0:n.answerInputType)===a.type}),o.jsx("label",{htmlFor:a.type,children:a.type})]},s))]})]})},c0e=t=>{const{fieldState:e,setFieldState:n,language:r}=t,i=()=>{var p;let f=!1;const h=(p=e==null?void 0:e.answerOptions)==null?void 0:p.filter(v=>(v==null?void 0:v.isCorrect)===!0);return(h==null?void 0:h.length)===parseInt(e==null?void 0:e.noOfMultpleAnswer)&&(f=!0),f},a=f=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space",onClick:()=>d((f==null?void 0:f.uuid)||""),icon:"pi pi-trash"})}),s=f=>o.jsx(o.Fragment,{children:o.jsx(wn,{value:f==null?void 0:f.answersText[r],onChange:h=>c("answersText",(f==null?void 0:f.uuid)||"",h.target.value)})}),l=(f,h)=>o.jsx(o.Fragment,{children:o.jsx(Yr,{inputId:"binary",checked:(f==null?void 0:f.isCorrect)||!1,onChange:p=>{p.checked&&i()||u("isCorrect",(f==null?void 0:f.uuid)||"",p.checked,h)}})}),c=(f,h,p)=>{n(v=>({...v,answerOptions:v!=null&&v.answerOptions?v==null?void 0:v.answerOptions.map(m=>m.uuid!==h?m:{...m,[f]:{...m[f],[r]:p}}):[]}))},u=(f,h,p,v)=>{n(m=>{const{answerOptions:A,isAllowMultipleAnswer:w,answerInputType:x}=m,C=v.rowIndex,T=A.map((S,E)=>{const _=E===C;return w||x==="checkbox"?_?{...S,[f]:p}:S:{...S,[f]:_?p:!1}});return{...m,answerOptions:T}})},d=f=>{const h=It.findIndex(e==null?void 0:e.answerOptions,v=>v.uuid===f),p=(e==null?void 0:e.answerOptions)&&(e==null?void 0:e.answerOptions.filter(function(v,m){return m!==h}));p!=null&&p.length&&(p==null?void 0:p.length)>0&&n(v=>({...v,answerOptions:p}))};return o.jsx("div",{children:o.jsx("div",{className:"card",children:o.jsxs(ao,{value:e==null?void 0:e.answerOptions,scrollable:!0,children:[o.jsx(xr,{header:"Answer text",body:f=>s(f),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}}),o.jsx(xr,{body:(f,h)=>l(f,h),header:"Is answer ?",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}}),o.jsx(xr,{header:"Action",body:f=>a(f),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]})})})},u0e=t=>{const e=[],[n]=F.useState([]),{onHandleChange:r,fieldState:i}=t;return F.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field mt-3 w-full",children:[o.jsx("label",{children:"Subject"}),o.jsx(La,{id:"subject",name:"subject",optionLabel:"subject_title",value:(n==null?void 0:n.length)>0&&(i==null?void 0:i.subject_id)!==null?n.filter(a=>(i==null?void 0:i.subject_id)===(a==null?void 0:a.subject_id))[0]:null,placeholder:"Select a Subject",options:n,className:"w-full",onChange:a=>{var s;r("subject_id",(s=a==null?void 0:a.value)==null?void 0:s.subject_id)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Course category"}),o.jsx(La,{id:"course_category",name:"course_category",optionLabel:"course_category_title",value:(e==null?void 0:e.length)>0&&(i==null?void 0:i.course_category_id)!==null?e.filter(a=>(i==null?void 0:i.course_category_id)===(a==null?void 0:a.course_category_id))[0]:null,placeholder:"Select a category",options:e,className:"w-full",onChange:a=>{var s;r("course_category_id",(s=a==null?void 0:a.value)==null?void 0:s.course_category_id)}})]})]})},d0e=t=>{const{formBuilderSchemaLanguages:e,fieldSettingUpdate:n}=sn(),{visibilty:r,setVisibility:i,rowIndex:a,columnIndex:s,fieldIndex:l,pageIndex:c,sectionIndex:u,field:d,typeName:f}=t,[h,p]=F.useState(d),{updateGlobalToast:v}=Ht(),m=(S,E)=>{p(_=>({..._,attributes:{..._.attributes,[S]:E}}))},A=(S,E,_)=>{p(P=>({...P,[S]:{[E]:_}}))},w=(S,E)=>{p(_=>({..._,[S]:E}))},x=()=>{const S=[],_=((h==null?void 0:h.answerOptions)||[]).filter(M=>M.isCorrect===!0),{answerInputType:P,isAllowMultipleAnswer:O,noOfMultpleAnswer:k}=h||{};if(P==="radio")_.length!==1&&S.push("Please select one answer");else if(P==="checkbox"){const M=O?parseInt(k,10)||0:1;_.length!==M&&S.push(M>1?`Select ${M} answers`:"Please select one answer")}return S.length?(v({showToast:!0,toastMessage:"Validation error",toastDetail:S.join(", "),toastType:"error"}),!1):!0},C=()=>{x()&&(n(c,u,a,s,l,h),v({showToast:!0,toastMessage:"Updated",toastDetail:`${f} updated`,toastType:"success"}))},T=()=>{p(S=>Object.assign({},S,{answerOptions:[...S.answerOptions||[],{uuid:tt(),answersText:{english:""},isCorrect:!1}]}))};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:r,position:"left",className:"p-sidebar-lg",onHide:()=>i(!1),children:[o.jsx("div",{className:"flex justify-content-between flex-wrap card-container ",children:o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:[t==null?void 0:t.typeName," settings"," "]})," "]})}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:e!=null&&e.length?e.map((S,E)=>o.jsx(so,{tabIndex:E,header:S==null?void 0:S.language,children:o.jsx(s0e,{language:S,fieldState:h,onHandleQuestionTextChange:A,...t})},E)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(o0e,{fieldState:h,onHandleChangeAttributesSetttings:m,onHandleChange:w,...t})}),o.jsx(wr,{header:"Answers",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(l0e,{fieldState:h,onHandleChange:w,...t}),o.jsxs("div",{className:"flex justify-content-between mb-2",children:[o.jsx("h4",{children:"Answers options"}),o.jsx(Ft,{className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>T(),"aria-label":"Add"})]}),(h==null?void 0:h.answerOptions)!==void 0&&o.jsx(o.Fragment,{children:o.jsx(oo,{activeIndex:0,children:e!=null&&e.length?e.map((S,E)=>o.jsx(so,{tabIndex:E,header:S==null?void 0:S.language,children:o.jsx(c0e,{language:S==null?void 0:S.type,fieldState:h,setFieldState:p})},E)):""})})]})}),o.jsx(wr,{header:"Information",children:o.jsx(u0e,{fieldState:h,onHandleChange:w})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>C(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>i(!1),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},f0e=t=>{var O,k,M,Y,N,z;const{isBuilderMode:e}=Ht(),{field:n}=t,{taskRegisterData:r,updateTaskRegisterData:i,updateTaskProgressValue:a,userTaskSubmitFormData:s}=Ar(),{userSelectedLanguage:l}=sn(),{media:c}=Ht(),u=(O=c==null?void 0:c.image)!=null&&O.MediaImage?(k=c==null?void 0:c.image)==null?void 0:k.MediaImage:o.jsx(o.Fragment,{}),[d,f]=F.useState(!1),[h,p]=F.useState([]),[v,m]=F.useState(!1),A=$=>{m($)},w=()=>{m(!1)},x=()=>{f(!0)},C=()=>{f(!1)},T=$=>{var ce;const le=It.cloneDeep(r),G=[...h];$.checked?(le[n==null?void 0:n.uuid]=(ce=$==null?void 0:$.target)==null?void 0:ce.value,G.push($.value)):(delete le[n==null?void 0:n.uuid],G.splice(G.indexOf($.value),1)),p(G),S($,G),i(le);const R=Object.keys(le).length;a(R)},S=($,le)=>{const G=s;if((G==null?void 0:G.length)>0&&$!=null&&$.value)for(const R of G)R.fieldId===t.field.uuid&&(R.postData[0]={postValue:le})},E=$=>{var ce;const le=s,G=It.cloneDeep(r);if((le==null?void 0:le.length)>0)if((ce=$==null?void 0:$.target)!=null&&ce.value)for(const q of le)q.fieldId===t.field.uuid&&(G[n==null?void 0:n.uuid]=$==null?void 0:$.value,q.postData[0]={postValue:$.value});else delete G[n==null?void 0:n.uuid];i(G);const R=Object.keys(G).length;a(R)};F.useEffect(()=>{p([])},[n==null?void 0:n.answerInputType]);const _=()=>{const $=[];return(n==null?void 0:n.answerInputType)==="radio"?n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var ce,q,W,ee;const R=h;$.push(o.jsxs("div",{className:"flex align-items-center p-field-radiobutton mb-3",children:[o.jsx(sa,{inputId:`${G}`,onChange:Q=>{p(Q.target.value),E(Q)},checked:(R==null?void 0:R.uuid)===(le==null?void 0:le.uuid),name:"category",value:le})," ",((ce=le.answersTextImage)==null?void 0:ce[l==null?void 0:l.type])&&((q=le.answersTextImage)==null?void 0:q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(W=le.answersTextImage)==null?void 0:W[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${G}`,children:(ee=le==null?void 0:le.answersText)==null?void 0:ee[l==null?void 0:l.type]})]},G))})):(n==null?void 0:n.answerInputType)==="checkbox"?n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var R;$.push(o.jsxs("div",{className:"p-field-radiobutton mb-3",children:[o.jsx(Yr,{inputId:`${G}`,name:"category",onChange:ce=>{T(ce)},value:le,checked:h!=null&&h.length?h==null?void 0:h.some(ce=>ce.uuid===le.uuid):!1})," ",o.jsx("label",{htmlFor:`${G}`,children:(R=le==null?void 0:le.answersText)==null?void 0:R[l==null?void 0:l.type]})]},G))})):n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var ce,q,W,ee,Q,H,X;const R=h;$.push(o.jsxs("div",{className:"p-field-radiobutton mb-3",children:[o.jsx(sa,{inputId:`${G}`,onChange:pe=>{p(pe.target.value),E(pe)},checked:(R==null?void 0:R.uuid)===(le==null?void 0:le.uuid),name:"category",value:le})," ",((ce=le.answersTextImage)==null?void 0:ce[l==null?void 0:l.type])&&((q=le.answersTextImage)==null?void 0:q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(W=le.answersTextImage)==null?void 0:W[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsxs("label",{htmlFor:`${G}`,children:[((ee=le.answersTextImage)==null?void 0:ee[l==null?void 0:l.type])&&((Q=le.answersTextImage)==null?void 0:Q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(H=le.answersTextImage)==null?void 0:H[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),(X=le==null?void 0:le.answersText)==null?void 0:X[l==null?void 0:l.type]]})]},G))})),$},P=o.jsxs("div",{onMouseOver:x,onMouseOut:C,children:[e&&d&&o.jsx(Wr,{handleFieldSettingsSidebar:A,...t}),o.jsx("div",{className:`field ${e&&" py-3 px-4 builder-element-wrapper "}${(n==null?void 0:n.isFluid)===!0&&" p-fluid"}`,children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[((M=n==null?void 0:n.questionTextImage)==null?void 0:M[l==null?void 0:l.type])&&((Y=n==null?void 0:n.questionTextImage)==null?void 0:Y[l==null?void 0:l.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(u,{mediaId:(N=n==null?void 0:n.questionTextImage)==null?void 0:N[l==null?void 0:l.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h5",{children:(z=n==null?void 0:n.questionText)==null?void 0:z[l==null?void 0:l.type]}),_()]})})})]});return o.jsxs(o.Fragment,{children:[v===!0&&o.jsx(d0e,{visibilty:v,setVisibility:w,...t},n==null?void 0:n.uuid),o.jsx(xi,{...t,fieldWrap:P})]})},h0e=t=>{var i,a;const{onHandleChange:e,fieldState:n,language:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Title"}),o.jsx(wn,{value:(i=n.title)==null?void 0:i[r==null?void 0:r.type],onChange:s=>e("title",r,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Image Url"}),o.jsx(wn,{value:(a=n.media_url)==null?void 0:a[r==null?void 0:r.type],onChange:s=>e("media_url",r,s.target.value)})]})]})};class hF{constructor(){Kn(this,"formatBytes",(e,n=2)=>{if(e===0||e===void 0||e===null)return"0 Bytes";const r=1024,i=n<0?0:n,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(i))+" "+a[s]})}}function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w2(t)}function p0e(t,e){if(w2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(w2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function g0e(t){var e=p0e(t,"string");return w2(e)=="symbol"?e:e+""}function pF(t,e,n){return(e=g0e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m0e={root:function(e){var n=e.props;return ft("p-badge p-component",pF({"p-badge-no-gutter":ke.isNotEmpty(n.value)&&String(n.value).length===1,"p-badge-dot":ke.isEmpty(n.value),"p-badge-lg":n.size==="large","p-badge-xl":n.size==="xlarge"},"p-badge-".concat(n.severity),n.severity!==null))}},v0e=`
|
|
3533
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return s=u.done,u},e:function(u){l=!0,a=u},f:function(){try{s||n.return==null||n.return()}finally{if(l)throw a}}}}function Qde(t,e){if(t){if(typeof t=="string")return cF(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cF(t,e):void 0}}function cF(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var uF=b.memo(b.forwardRef(function(t,e){var n=Hn(),r=b.useContext(ar),i=A2.getProps(t,r),a=b.useState(null),s=dd(a,2),l=s[0],c=s[1],u=b.useState(!1),d=dd(u,2),f=d[0],h=d[1],p=Qx("",i.filterDelay||0),v=dd(p,3),m=v[0],A=v[1],w=v[2],x=b.useState(-1),C=dd(x,2),T=C[0],S=C[1],E=b.useState(!1),_=dd(E,2),P=_[0],O=_[1],k=b.useState(i.inline),M=dd(k,2),Y=M[0],N=M[1],z=b.useRef(null),$=b.useRef(null),le=b.useRef(null),G=b.useRef(null),R=b.useRef(null),ce=b.useRef(i.inputRef),q=b.useRef(null),W=b.useRef(null),ee=b.useRef(null),Q=A&&A.trim().length>0,H=ke.isEmpty(i.value),X=i.optionValue?null:i.dataKey,pe={props:i,state:{filterState:A,focused:P,overlayVisible:Y}},ge=A2.setMetaData(pe),Ae=ge.ptm,ye=ge.cx,oe=ge.sx,re=ge.isUnstyled;li(A2.css.styles,re,{name:"multiselect"});var B=np({target:z,overlay:W,listener:function(Ye,Tt){var Wt=Tt.type,Jn=Tt.valid;Jn&&(Wt==="outside"?!Ue(Ye)&&!it(Ye)&&at():r.hideOverlaysOnDocumentScrolling?at():Ie.isDocument(Ye.target)||yt())},when:Y}),ne=dd(B,2),se=ne[0],me=ne[1],Ne=function(Ye){var Tt=Ye.relatedTarget===ce.current?Ie.getFirstFocusableElement(W.current,':not([data-p-hidden-focusable="true"])'):ce.current;Ie.focus(Tt)},we=function(Ye){var Tt=Ye.relatedTarget===ce.current?Ie.getLastFocusableElement(W.current,':not([data-p-hidden-focusable="true"])'):ce.current;Ie.focus(Tt)},ve=function(Ye){Cs.emit("overlay-click",{originalEvent:Ye,target:z.current})},ue=function(){return!i.selectionLimit||!i.value||i.value&&i.value.length<i.selectionLimit},Te=function(Ye){var Tt=Xt()&&Ye<tr.length-1?tr.slice(Ye+1).findIndex(function(Wt){return $n(Wt)}):-1;return Tt>-1?Tt+Ye+1:-1},_e=function(Ye){var Tt=Xt()&&Ye>0?ke.findLastIndex(tr.slice(0,Ye),function(Wt){return $n(Wt)}):-1;return Tt>-1?Tt:-1},K=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=-1;return Xt()&&(Tt?(Wt=_e(Ye),Wt=Wt===-1?Te(Ye):Wt):(Wt=Te(Ye),Wt=Wt===-1?_e(Ye):Wt)),Wt>-1?Wt:Ye},Ee=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(Tt===-1&&(Tt=K(Wt,!0)),Wt===-1&&(Wt=K(Tt)),Tt!==-1&&Wt!==-1){var Jn=Math.min(Tt,Wt),br=Math.max(Tt,Wt),Pr=tr.slice(Jn,br+1).filter(function(ca){return Pn(ca)}).map(function(ca){return Nt(ca)});mn(Ye,Pr,Pr)}},be=function(Ye,Tt){var Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(!(i.disabled||We(Tt))){var Jn=Wn(Tt),br=null;Jn?br=i.value.filter(function(Pr){return!ke.equals(Pr,Nt(Tt),X)}):br=[].concat($de(i.value||[]),[Nt(Tt)]),mn(Ye,br,Tt),Wt!==-1&&c(Wt)}},he=function(Ye){!i.inline&&!i.disabled&&!i.loading&&!Dt(Ye)&&!Ue(Ye)&&(Y?at():He(),Ie.focus(ce.current),Ye.preventDefault()),h(!0)},fe=function(Ye){if(!Y)He(),i.editable&&On(Ye,rt());else{var Tt=l!==-1?Ct(l):f?Ge():ae();Ye.shiftKey&&Ee(Ye,T,Tt),On(Ye,Tt)}Ye.preventDefault()},xe=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ye.altKey&&!Tt)l!==-1&&be(Ye,tr[l]),Y&&at(),Ye.preventDefault();else{var Wt=l!==-1?Rt(l):f?dt():Pe();On(Ye,Wt),!Y&&He(),Ye.preventDefault()}},Me=function(Ye){Y?l!==-1&&(Ye.shiftKey?Ee(Ye,l):be(Ye,tr[l])):(c(-1),fe(Ye)),Ye.preventDefault()},Be=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=Ye.currentTarget;if(Tt){var Jn=Wt.value.length;Wt.setSelectionRange(0,Ye.shiftKey?Jn:0),c(-1)}else{var br=Ye.metaKey||Ye.ctrlKey,Pr=Ge();Ye.shiftKey&&br&&Ee(Ye,Pr,T),On(Ye,Pr),!Y&&He()}Ye.preventDefault()},Je=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=Ye.currentTarget;if(Tt){var Jn=Wt.value.length;Wt.setSelectionRange(Ye.shiftKey?0:Jn,Jn),jde("focusedOptionIndex")}else{var br=Ye.metaKey||Ye.ctrlKey,Pr=dt();Ye.shiftKey&&br&&Ee(Ye,T,Pr),On(Ye,Pr),!Y&&He()}Ye.preventDefault()},st=function(Ye){Ye.preventDefault()},ut=function(Ye){Ye.preventDefault()},St=function(Ye){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Tt||(Y&&Zt()?(Ie.focus(Ye.shiftKey?R.current:G.current),Ye.preventDefault()):(l!==-1&&be(Ye,tr[l]),Y&&at(filter)))},zt=function(){S(l)},pn=function(Ye){var Tt=Ye.metaKey||Ye.ctrlKey;switch(Ye.code){case"ArrowUp":if(i.inline)break;xe(Ye);break;case"ArrowDown":if(i.inline)break;fe(Ye);break;case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;Me(Ye);break;case"Home":if(i.inline)break;Be(Ye),Ye.preventDefault();break;case"End":if(i.inline)break;Je(Ye),Ye.preventDefault();break;case"PageDown":ut(Ye);break;case"PageUp":st(Ye);break;case"Escape":if(i.inline)break;at();break;case"Tab":St(Ye);break;case"ShiftLeft":case"ShiftRight":zt();break;default:if(Ye.key==="a"&&Tt){var Wt=tr.filter(function(Jn){return Pn(Jn)}).map(function(Jn){return Nt(Jn)});mn(Ye,Wt,Wt),Ye.preventDefault();break}!Tt&&ke.isPrintableCharacter(Ye.key)&&(!Y&&He(),_n(Ye),Ye.preventDefault());break}h(!1)},Lt=function(Ye){if(i.onSelectAll)i.onSelectAll(Ye);else{var Tt=null;if(Ye.checked)Tt=[];else{var Wt=tr.filter(function(Jn){return Pn(Jn)&&!We(Jn)});Wt&&(Tt=Wt.map(function(Jn){return Nt(Jn)}))}i.selectionLimit&&Tt&&Tt.length&&(Tt=Tt.slice(0,i.selectionLimit)),mn(Ye.originalEvent,Tt,Tt)}},mn=function(Ye,Tt,Wt){i.onChange&&(i.onChange({originalEvent:Ye,value:Tt,selectedOption:Wt,stopPropagation:function(){Ye==null||Ye.stopPropagation()},preventDefault:function(){Ye==null||Ye.preventDefault()},target:{name:i.name,id:i.id,value:Tt}}),Ie.focus(ce.current))},Rn=function(Ye){var Tt=Ye.query;w(Tt),i.onFilter&&i.onFilter({originalEvent:Ye,filter:Tt})},xt=function(){w(""),i.onFilter&&i.onFilter({filter:""})},ze=function(Ye){if(Y){var Tt;Ye?Tt=Ye.currentTarget:Tt=Ie.findSingle(W.current,'li[data-p-highlight="true"]'),Tt&&Tt.scrollIntoView&&Tt.scrollIntoView({block:"nearest",inline:"nearest"})}},He=function(){N(!0),c(l!==-1?l:i.autoOptionFocus?ae():rt()),Ie.focus(ce.current)},at=function(){c(-1),N(!1),h(!1)},rn=function(Ye){Di.set("overlay",W.current,r&&r.autoZIndex||zn.autoZIndex,r&&r.zIndex.overlay||zn.zIndex.overlay),Ie.addStyles(W.current,{position:"absolute",top:"0",left:"0"}),yt(),ze(),Ye&&Ye()},nn=function(Ye){Ye&&Ye(),se(),i.onShow&&i.onShow()},Jt=function(){me()},In=function(){i.filter&&i.resetFilterOnHide&&xt(),Di.clear(W.current),i.onHide&&i.onHide()},yt=function(){!i.inline&&Ie.alignOverlay(W.current,q.current.parentElement,i.appendTo||r&&r.appendTo||zn.appendTo)},Ue=function(Ye){return Ie.getAttribute(Ye.target,"data-pc-section")==="clearicon"},it=function(Ye){return Ie.getAttribute(Ye.target,"data-pc-section")==="headercheckboxcontainer"},Dt=function(Ye){return W.current&&W.current.contains(Ye.target)},qt=function(Ye){at(),Ie.focus(ce.current),Ye.preventDefault(),Ye.stopPropagation()},kn=function(){if(i.value!=null&&i.options){if(i.optionGroupLabel){var Ye=0,Tt=i.options.findIndex(function(Wt,Jn){return(Ye=Jn)&&Gn(i.value,Fe(Wt))!==-1});return Tt!==-1?{group:Ye,option:Tt}:-1}return Gn(i.value,i.options)}return-1},Gn=function(Ye,Tt){return Tt.findIndex(function(Wt){return Ye.some(function(Jn){return ke.equals(Jn,Nt(Wt),X)})})},lr=function(Ye,Tt){return ke.equals(Ye,Tt,X)},Wn=function(Ye){if(i.value){var Tt=Nt(Ye),Wt=bt(Ye);return i.value.some(function(Jn){return ke.equals(Wt?Jn:Nt(Jn),Tt,X)})}return!1},vr=function(Ye){var Tt;if(i.options)if(i.optionGroupLabel){var Wt=lF(i.options),Jn;try{for(Wt.s();!(Jn=Wt.n()).done;){var br=Jn.value;if(Tt=Nr(Ye,Fe(br)),Tt)break}}catch(Pr){Wt.e(Pr)}finally{Wt.f()}}else Tt=Nr(Ye,i.options),ke.isEmpty(Tt)&&(Tt=Nr(Ye,i.value));return Tt?vt(Tt):null},Nr=function(Ye,Tt){return Tt.find(function(Wt){return ke.equals(Nt(Wt),Ye,X)})},yn=function(Ye){O(!0),i.onFocus&&i.onFocus(Ye)},ot=function(Ye){O(!1),i.onBlur&&i.onBlur(Ye)},ct=function(){if(i.onSelectAll)return i.selectAll;if(ke.isEmpty(tr))return!1;var Ye=tr.filter(function(Tt){return!We(Tt)&&Pn(Tt)});return!Ye.some(function(Tt){return!Wn(Tt)})},vt=function(Ye){return i.optionLabel?ke.resolveFieldData(Ye,i.optionLabel):Ye&&Ye.label!==void 0?Ye.label:Ye},Nt=function(Ye){return i.useOptionAsValue?Ye:i.optionValue?ke.resolveFieldData(Ye,i.optionValue):Ye&&Ye.value!==void 0?Ye.value:Ye},An=function(Ye){return i.dataKey?ke.resolveFieldData(Ye,i.dataKey):vt(Ye)},Dn=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupLabel)},Et=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupLabel)},Fe=function(Ye){return ke.resolveFieldData(Ye,i.optionGroupChildren)},We=function(Ye){var Tt;if(!ue()&&!Wn(Ye))return!0;var Wt=i.optionDisabled;return Wt?ke.isFunction(Wt)?Wt(Ye):ke.resolveFieldData(Ye,Wt):Ye&&((Tt=Ye.disabled)!==null&&Tt!==void 0?Tt:!1)},bt=function(Ye){return!i.useOptionAsValue&&i.optionValue||Ye&&Ye.value!==void 0},$t=function(Ye){return i.optionGroupLabel&&Ye.group},Xt=function(){return ke.isNotEmpty(i.value)},Zt=function(){return Ie.getFocusableElements(W.current,':not([data-p-hidden-focusable="true"])').length>0},Sn=function(Ye){var Tt;return Pn(Ye)&&((Tt=vt(Ye))===null||Tt===void 0?void 0:Tt.toLocaleLowerCase(i.filterLocale).startsWith($.current.toLocaleLowerCase(i.filterLocale)))},Pn=function(Ye){return ke.isNotEmpty(Ye)&&!(We(Ye)||$t(Ye))},$n=function(Ye){return Pn(Ye)&&Wn(Ye)},rt=function(){if(Xt()){for(var Ye=function(){var br=i.value[Wt],Pr=tr.findIndex(function(ca){return $n(ca)&&lr(br,Nt(ca))});if(Pr>-1)return{v:Pr}},Tt,Wt=i.value.length-1;Wt>=0;Wt--)if(Tt=Ye(),Tt)return Tt.v}return-1},ae=function(){var Ye=rt();return Ye<0?Ge():Ye},Pe=function(){var Ye=rt();return Ye<0?dt():Ye},Ge=function(){return tr.findIndex(function(Ye){return Pn(Ye)})},dt=function(){return ke.findLastIndex(tr,function(Ye){return Pn(Ye)})},Ct=function(Ye){var Tt=Ye<tr.length-1?tr.slice(Ye+1).findIndex(function(Wt){return Pn(Wt)}):-1;return Tt>-1?Tt+Ye+1:Ye},Rt=function(Ye){var Tt=Ye>0?ke.findLastIndex(tr.slice(0,Ye),function(Wt){return Pn(Wt)}):-1;return Tt>-1?Tt:Ye},_n=function(Ye){$.current=($.current||"")+Ye.key;var Tt=-1;ke.isNotEmpty($.current)&&(l!==-1?(Tt=tr.slice(l).findIndex(function(Wt){return Sn(Wt)}),Tt=Tt===-1?tr.slice(0,l).findIndex(function(Wt){return Sn(Wt)}):Tt+l):Tt=tr.findIndex(function(Wt){return Sn(Wt)}),Tt===-1&&l===-1&&(Tt=ae()),Tt!==-1&&On(Ye,Tt)),le.current&&clearTimeout(le.current),le.current=setTimeout(function(){$.current="",le.current=null},500)},On=function(Ye,Tt){l!==Tt&&(c(Tt),ze(Ye),i.selectOnFocus&&be(Ye,tr[Tt],!1))},jn=function(Ye,Tt){if(Ye.stopPropagation(),!!Mr(Ye.currentTarget)){var Wt=i.value.filter(function(Jn){return!ke.equals(Jn,Tt,X)});i.onRemove&&i.onRemove({originalEvent:Ye,value:Wt}),mn(Ye,Wt,Tt)}},Mr=function(Ye){var Tt=ee.current,Wt=Tt.clientWidth<Tt.scrollWidth;if(!Wt)return!0;var Jn=Ye.closest('[data-pc-section="token"]'),br=window.getComputedStyle(Tt),Pr=window.getComputedStyle(Jn),ca=Tt.clientWidth-parseFloat(br.paddingLeft)-parseFloat(br.paddingRight),ha=Jn.getBoundingClientRect().right+parseFloat(Pr.marginRight)-Tt.getBoundingClientRect().left;return ha<=ca},Kr=function(){var Ye=/{(.*?)}/,Tt=i.selectedItemsLabel||ni("selectionMessage"),Wt=i.value?i.value.length:0;return Ye.test(Tt)?Tt.replace(Tt.match(Ye)[0],Wt+""):Tt},Vn=function(){var Ye;if(!H&&!i.fixedPlaceholder){var Tt;return ke.isNotEmpty(i.maxSelectedLabels)&&((Tt=i.value)===null||Tt===void 0?void 0:Tt.length)>i.maxSelectedLabels?Kr():ke.isArray(i.value)?i.value.reduce(function(Wt,Jn,br){return Wt+(br!==0?", ":"")+vr(Jn)},""):""}return Ye},Nn=function(){var Ye=i.value?i.value.length:0;if(ke.isNotEmpty(i.maxSelectedLabels)&&Ye>i.maxSelectedLabels)return Kr();if(i.selectedItemTemplate)return H?ke.getJSXElement(i.selectedItemTemplate):i.value.map(function(Wt,Jn){var br=ke.getJSXElement(i.selectedItemTemplate,Wt);return b.createElement(b.Fragment,{key:Jn},br)});if(i.display==="chip"&&!H){var Tt=i.value.slice(0,i.maxSelectedLabels||Ye);return Tt.map(function(Wt,Jn){var br={context:{value:Wt,index:Jn}},Pr=vr(Wt),ca=Pr+"_"+Jn,ha=n({"aria-label":ni("removeTokenIcon"),className:ye("removeTokenIcon"),onClick:function(ie){return jn(ie,Wt)},onKeyDown:function(ie){return ai(ie,Wt)},tabIndex:i.tabIndex||"0"},Ae("removeTokenIcon",br)),Us=!i.disabled&&(i.removeIcon?nr.getJSXIcon(i.removeIcon,Al({},ha),{props:i}):b.createElement(wb,ha)),bo=n({className:ye("token")},Ae("token",br)),Xr=n({className:ye("tokenLabel")},Ae("tokenLabel",br));return b.createElement("div",Ms({},bo,{key:ca}),b.createElement("span",Xr,Pr),Us)})}return Vn()},sr=function(){var Ye=i.optionGroupLabel?Lr(i.options):i.options;if(Q){var Tt=A.trim().toLocaleLowerCase(i.filterLocale),Wt=i.filterBy?i.filterBy.split(","):[i.optionLabel||"label"];if(i.optionGroupLabel){var Jn=[],br=lF(i.options),Pr;try{for(br.s();!(Pr=br.n()).done;){var ca=Pr.value,ha=L0.filter(Fe(ca),Wt,Tt,i.filterMatchMode,i.filterLocale);ha&&ha.length&&Jn.push(Al(Al({},ca),Nf({},i.optionGroupChildren,ha)))}}catch(Us){br.e(Us)}finally{br.f()}return Lr(Jn)}return L0.filter(Ye,Wt,Tt,i.filterMatchMode,i.filterLocale)}return Ye},Lr=function(Ye){return(Ye||[]).reduce(function(Tt,Wt,Jn){Tt.push(Al(Al({},Wt),{},{group:!0,index:Jn}));var br=Fe(Wt);return br&&br.forEach(function(Pr){return Tt.push(Pr)}),Tt},[])},pi=function(Ye){switch(Ye.code){case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;mn(Ye,[],[]),Ye.preventDefault(),Ye.stopPropagation();break}},ai=function(Ye,Tt){switch(Ye.code){case"Space":case"NumpadEnter":case"Enter":if(i.inline)break;jn(Ye,Tt),Ye.preventDefault(),Ye.stopPropagation();break}};b.useImperativeHandle(e,function(){return{props:i,show:He,hide:at,focus:function(){return Ie.focus(ce.current)},getElement:function(){return z.current},getOverlay:function(){return W.current},getInput:function(){return ce.current}}}),Li(function(){yt()}),b.useEffect(function(){ke.combinedRefs(ce,i.inputRef)},[ce,i.inputRef]),b.useEffect(function(){i.overlayVisible===!0?He():i.overlayVisible===!1&&at()},[i.overlayVisible]),fr(function(){Y&&A&&Q&&yt()},[Y,A,Q]),Ha(function(){Di.clear(W.current)});var ui=function(){var Ye=n({className:ye("clearIcon"),"aria-label":ni("clear"),onClick:function(br){return mn(br,[],[])},onKeyDown:function(br){return pi(br)},tabIndex:i.tabIndex||"0"},Ae("clearIcon")),Tt=i.clearIcon||b.createElement(bc,Ye),Wt=nr.getJSXIcon(Tt,Al({},Ye),{props:i});return!H&&i.showClear&&!i.disabled?Wt:null},Pi=function(){var Ye=Nn(),Tt=n({ref:q,className:ye("labelContainer")},Ae("labelContainer")),Wt=n({ref:ee,className:ye("label",{empty:H})},Ae("label"));return b.createElement("div",Tt,b.createElement("div",Wt,Ye||i.placeholder||i.emptyMessage||"empty"))},tr=sr(),$i=ke.isNotEmpty(i.tooltip),Ti=A2.getOtherProps(i),Si=ke.reduceKeys(Ti,Ie.ARIA_PROPS),Hi=n({className:ye("triggerIcon")},Ae("triggerIcon")),fn=n({className:ye("trigger")},Ae("trigger")),$e=i.loadingIcon?nr.getJSXIcon(i.loadingIcon,Al({},Hi),{props:i}):b.createElement(W1,Ms({spin:!0},Hi)),Kt=i.dropdownIcon?nr.getJSXIcon(i.dropdownIcon,Al({},Hi),{props:i}):b.createElement(Xd,Hi),Un=b.createElement("div",fn,i.loading?$e:Kt),jr=!i.inline&&Pi(),kr=!i.inline&&ui(),Ra=n(Al(Al({ref:z,id:i.id,style:Al(Al({},i.style),oe("root")),className:ft(i.className,ye("root",{focusedState:P,context:r,overlayVisibleState:Y}))},Ti),{},{onClick:he}),A2.getOtherProps(i),Ae("root")),Vr=n({className:"p-hidden-accessible","data-p-hidden-accessible":!0},Ae("hiddenInputWrapper")),_s=n(Al({ref:ce,id:i.inputId,name:i.name,type:"text",onFocus:yn,onBlur:ot,onKeyDown:pn,role:"combobox","aria-expanded":Y,disabled:i.disabled,tabIndex:i.disabled?-1:i.tabIndex,value:Vn()},Si),Ae("input"));return b.createElement(b.Fragment,null,b.createElement("div",Ra,b.createElement("div",Vr,b.createElement("input",Ms({},_s,{readOnly:!0}))),!i.inline&&b.createElement(b.Fragment,null,jr,kr,Un),b.createElement(sF,Ms({hostName:"MultiSelect",ref:W,visibleOptions:tr},i,{onClick:ve,onOverlayHide:at,filterValue:m,focusedOptionIndex:l,onFirstHiddenFocus:Ne,onLastHiddenFocus:we,firstHiddenFocusableElementOnOverlay:G,lastHiddenFocusableElementOnOverlay:R,setFocusedOptionIndex:c,hasFilter:Q,isValidOption:Pn,getOptionValue:Nt,updateModel:mn,onFilterInputChange:Rn,resetFilter:xt,onCloseClick:qt,onSelectAll:Lt,getOptionLabel:vt,getOptionRenderKey:An,isOptionDisabled:We,getOptionGroupChildren:Fe,getOptionGroupLabel:Et,getOptionGroupRenderKey:Dn,isSelected:Wn,getSelectedOptionIndex:kn,isAllSelected:ct,onOptionSelect:be,allowOptionSelect:ue,in:Y,onEnter:rn,onEntered:nn,onExit:Jt,onExited:In,ptm:Ae,cx:ye,sx:oe,isUnstyled:re,metaData:pe,changeFocusedOptionIndex:On}))),$i&&b.createElement(cn,Ms({target:z,content:i.tooltip,pt:Ae("tooltip")},i.tooltipOptions)))}));uF.displayName="MultiSelect";const Jde=t=>{var Ae,ye,oe,re,B,ne,se,me,Ne,we;const{field:e,fieldIndex:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isBuilderMode:u,isAdmin:d}=Ht(),[f,h]=F.useState([]),[p,v]=F.useState(!1),[m,A]=F.useState(!1),{userSelectedLanguage:w,formBuilderFormLayout:x,sectionSettingUpdate:C,pageSettingUpdate:T,fieldSettingUpdate:S}=sn(),{taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:P,userTaskSubmitFormData:O,updateUserFormDataSubmit:k,task_status:M,TASK_PUBLISHED:Y}=Ar(),[N,z]=F.useState(0),[$,le]=F.useState(!1),G=()=>{le(!0)},R=()=>{le(!1)},ce=ve=>{A(ve)},q=()=>{A(!1)},W=ve=>{h(ve.value),r!=null&&r.rowIsRepeatable?X(i,a,e,ve.value):H(ve.value)},ee=ve=>{e==null||e.conditionalTabRules.rules.map(ue=>{var Te;(Te=ue==null?void 0:ue.conditions)==null||Te.map(_e=>{var K;if((K=ve.value)!=null&&K.some(Ee=>Ee===_e.option)){const Ee=It.findIndex(x,he=>{var fe;return he.uuid===((fe=_e==null?void 0:_e.tab)==null?void 0:fe.uuid)}),be=x[Ee];be.isHidden=!1,T(Ee,be)}else{const Ee=It.findIndex(x,he=>{var fe;return he.uuid===((fe=_e==null?void 0:_e.tab)==null?void 0:fe.uuid)}),be=x[Ee];be.isHidden=!0,T(Ee,be)}})})},Q=ve=>{e==null||e.conditionalSectionRules.rules.map(ue=>{var Te;(Te=ue==null?void 0:ue.conditions)==null||Te.map(_e=>{var K;if((K=ve.value)!=null&&K.some(Ee=>Ee===_e.option)){const Ee=It.findIndex(x,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.tab)==null?void 0:xe.uuid)}),be=It.findIndex(x[Ee].children,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.section)==null?void 0:xe.uuid)}),he=x[Ee].children[be];he.isHidden=!1,C(Ee,be,he)}else{const Ee=It.findIndex(x,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.tab)==null?void 0:xe.uuid)}),be=It.findIndex(x[Ee].children,fe=>{var xe;return fe.uuid===((xe=_e==null?void 0:_e.section)==null?void 0:xe.uuid)}),he=x[Ee].children[be];he.isHidden=!0,C(Ee,be,he)}})})},H=ve=>{const ue=O,Te=It.cloneDeep(E);if((ve==null?void 0:ve.length)>0&&(ue==null?void 0:ue.length)>0){Te[e==null?void 0:e.uuid]=ve;for(const _e of ue)_e.fieldId===t.field.uuid&&(_e.postData[0]={postValue:ve})}else if(delete Te[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const _e of ue)_e.fieldId===t.field.uuid&&(_e.postData[0]={postValue:[]});if(!(r!=null&&r.rowIsRepeatable)){_(Te);const _e=Object.keys(Te).length;P(_e)}},X=(ve,ue,Te,_e)=>{var K;if(h(_e),O){const Ee=[...O],be=It.findIndex(Ee,function(xe){return xe.rowId===(r==null?void 0:r.uuid)});let he=(K=O[be])==null?void 0:K.repeatableFields,fe="<ol class='card '>";_e==null||_e.map(xe=>{fe=fe+`<li>${xe}</li>`}),fe=fe+"</ol>",he={...he,[Te==null?void 0:Te.uuid]:fe},Ee[be]={...Ee[be],repeatableFields:he},k(Ee)}(_e==null?void 0:_e.length)>0?Te.isValid=1:Te.isValid=0,S(ve,ue,s,l,n,Te)},pe=()=>{var ve,ue,Te;if(r!=null&&r.rowIsRepeatable){if(r!=null&&r.repeatableFields){const _e=[...r.repeatableFields],K=It.findIndex(_e,function(Ee){return Ee.uuid===(e==null?void 0:e.uuid)});K>=0&&_e[K].fieldData?h(Ee=>[...Ee,_e[K].fieldData]):(e.isValid=0,h([]))}}else{const _e=O,K=It.cloneDeep(E);if(_e!=null&&_e.length){for(const Ee of _e)if(Ee.fieldId===t.field.uuid&&((ve=Ee==null?void 0:Ee.postData)!=null&&ve.length)){h((ue=Ee==null?void 0:Ee.postData[0])==null?void 0:ue.postValue),K[e==null?void 0:e.uuid]=(Te=Ee==null?void 0:Ee.postData[0])==null?void 0:Te.postValue;const be=Object.keys(K).length;P(be);break}}}v(!0)};F.useEffect(()=>{!p&&(O==null?void 0:O.length)>0&&pe();const ve=Gt.addListener("onSubmitUserForm",()=>{var _e;(_e=e==null?void 0:e.attributes)!=null&&_e.required?(f==null?void 0:f.length)>0?e.isValid=1:e.isValid=0:e.isValid=1}),ue=Gt.addListener("clearRepeatableFields",_e=>{_e===(r==null?void 0:r.uuid)&&(h([]),z(0),e.isValid=0)}),Te=Gt.addListener("OnInvalidFieldCatch",_e=>{e.uuid===(_e==null?void 0:_e.fieldId)?z(1):z(0)});return()=>{ve.remove(),Te.remove(),ue.remove()}});const ge=o.jsxs("div",{onMouseOver:G,onMouseOut:R,children:[u&&$&&o.jsx(Wr,{handleFieldSettingsSidebar:ce,...t}),o.jsxs("div",{className:`field ${u&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:u?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Ae=e==null?void 0:e.headerText)==null?void 0:Ae[w==null?void 0:w.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ye=e==null?void 0:e.attributes)==null?void 0:ye.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(oe=e==null?void 0:e.label)==null?void 0:oe[w==null?void 0:w.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(re=e==null?void 0:e.toolTip)==null?void 0:re[w==null?void 0:w.type],position:"right"})})]}),o.jsx(uF,{onFocus:()=>z(1),value:f,onChange:ve=>{W(ve),ee(ve),Q(ve)},options:e==null?void 0:e.options,optionLabel:`optionText.${w.type}`,placeholder:(B=e==null?void 0:e.placeholder)==null?void 0:B[w==null?void 0:w.type],display:"chip",disabled:d||c}),((ne=e==null?void 0:e.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:N===1&&!((f==null?void 0:f.length)>0)?(se=e==null?void 0:e.validationMesssage)==null?void 0:se.english:""})]}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[w==null?void 0:w.type]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]}),((Ne=e==null?void 0:e.inlineConditionalRules)==null?void 0:Ne.rules.length)>0&&u===!0&&o.jsx("p",{children:"Inline conditional rules"}),(we=e==null?void 0:e.inlineConditionalRules)==null?void 0:we.rules.map((ve,ue)=>u===!1?o.jsx("div",{children:ve==null?void 0:ve.conditions.map((Te,_e)=>{if(f!=null&&f.some(K=>K===Te.value)||u)return o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{data:e,ruleIndex:ue,conditionIndex:_e,condition:Te,...t})})},_e)})},`rule-${ue}`):o.jsx(ci,{className:"mt-4",header:`Rule ${ue+1}`,children:o.jsx("div",{children:ve==null?void 0:ve.conditions.map((Te,_e)=>{if(f!=null&&f.some(K=>K===Te.value)||u)return o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(vb,{data:e,...t,ruleIndex:ue,conditionIndex:_e,condition:Te})})},_e)})},`rule-${ue}`)},ue))]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:m,closeSettingFieldSidebar:q,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:ge})]})},xb=t=>{const{options:e,title:n}=t,r=e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",i=`${e.className} justify-content-start`,a=`${e.titleClassName} pl-1`;return o.jsxs("div",{className:i,children:[o.jsxs("button",{className:e.togglerClassName,onClick:e.onTogglerClick,children:[o.jsx("span",{className:r}),o.jsx(Qt,{})]}),o.jsx("span",{className:a,children:n})]})};xb.defaultProps={field:{},isPreview:!1},xb.propTypes={field:g3.any,isPreview:g3.bool};const dF=t=>{const e=F.useRef(null),{optionIndex:n,option:r,field:i,fieldIndex:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,path:d}=t,{userSelectedLanguage:f,fieldSettingUpdate:h,fieldSettingUpdateInlineConditional:p,gridComponentFieldSettingUpdate:v}=sn(),[m,A]=F.useState(r==null?void 0:r.optionText[f==null?void 0:f.type]);F.useEffect(()=>(A(r==null?void 0:r.optionText[f==null?void 0:f.type]),()=>{}),[i]),F.useEffect(()=>{const C=setTimeout(()=>{x("optionText",r.uuid,m,f)},1500);return()=>{clearTimeout(C)}},[m]);const w=C=>{const T=d.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?p(T[pa],T[ga],T[Ta],T[Ea],T[Ia],T[Pa],T[Go],T[Co],C):(T==null?void 0:T.length)>Pa&&(T==null?void 0:T.length)===ql+1&&(i!=null&&i.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(T[pa],T[ga],T[Ta],T[Ea],T[Ia],T[5],T[6],T[7],C):h(s,l,c,u,a,{...C})},x=(C,T,S,E)=>{if(i!=null&&i.options){const _=[...i.options];_[n][C][E==null?void 0:E.type]=S,w({...i,options:_})}};return o.jsx(o.Fragment,{children:o.jsx(P3,{id:r==null?void 0:r.uuid,style:{display:"inline-block"},className:"builder-input-label-edit",innerRef:e,html:m||"",disabled:!1,onChange:C=>{A(C.target.value)},tagName:"article"},r==null?void 0:r.uuid)})},fF=t=>{const{optionId:e,field:n,fieldIndex:r,columnIndex:i,sectionIndex:a,rowIndex:s,pageIndex:l,path:c}=t,{fieldSettingUpdate:u,fieldSettingUpdateInlineConditional:d,gridComponentFieldSettingUpdate:f}=sn(),h=m=>{const A=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?d(A[pa],A[ga],A[Ta],A[Ea],A[Ia],A[Pa],A[Go],A[Co],m):(A==null?void 0:A.length)>Pa&&(A==null?void 0:A.length)===ql+1&&(m!=null&&m.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?f(A[pa],A[ga],A[Ta],A[Ea],A[Ia],A[5],A[6],A[7],m):u(l,a,s,i,r,m)},p=()=>{const m=n==null?void 0:n.options.filter(function(w){return(w==null?void 0:w.uuid)!==e}),A={...n,options:m};h(A)},v=()=>{const m=It.cloneDeep(n),A={...m,options:[...m.options,{uuid:tt(),optionText:{english:"Unititled"},value:tt(),score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]};h(A)};return o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,label:"Add",className:"w-5rem ml-3 mr-3",onClick:()=>v(),size:"small"}),o.jsx(Ft,{text:!0,className:"w-3rem",size:"small",onClick:()=>{p()},icon:"pi pi-trash"})]})},Zde=t=>{var we,ve,ue,Te,_e,K,Ee,be,he;const[e,n]=F.useState([]),[r,i]=F.useState(0),{taskRegisterData:a,updateTaskRegisterData:s,updateTaskProgressValue:l,userTaskSubmitFormData:c,task_status:u,updateUserFormDataSubmit:d,taskFieldUpdateHook:f,TASK_PUBLISHED:h,updateProgressDataValuesHook:p}=Ar(),{globalAlignment:v,isBuilderMode:m,isRenderView:A,isAdmin:w}=Ht(),{sectionSettingUpdate:x,userSelectedLanguage:C,fieldSettingUpdate:T,formBuilderFormLayout:S,pageSettingUpdate:E}=sn(),{field:_,fieldIndex:P,sectionIndex:O,pageIndex:k,row:M,rowIndex:Y,columnIndex:N,section:z,page:$,isDisabled:le}=t,[G,R]=F.useState(!1),[ce,q]=F.useState(!1),[W,ee]=F.useState(!1),Q=()=>{ee(!0)},H=()=>{ee(!1)},X=fe=>{R(fe)},pe=()=>{R(!1)},ge=fe=>{const xe=[...e];fe.checked?xe.push(fe.value):xe.splice(xe.indexOf(fe.value),1),n(xe),M!=null&&M.rowIsRepeatable?c&&se(k,O,_,xe):(Ae(fe),oe(xe),c&&(B(xe),(xe==null?void 0:xe.length)>0?_.isValid=1:_.isValid=0,f(k,O,Y,N,P,_)))},Ae=fe=>{var Me;const xe=(Me=fe==null?void 0:fe.value)==null?void 0:Me.value;_==null||_.conditionalTabRules.rules.map(Be=>{var Je;(Je=Be==null?void 0:Be.conditions)==null||Je.map(st=>{if(xe===(st==null?void 0:st.option)&&(fe!=null&&fe.checked)){const ut=It.findIndex(S,zt=>{var pn;return zt.uuid===((pn=st==null?void 0:st.tab)==null?void 0:pn.uuid)}),St=S[ut];St.isHidden=!1,E(ut,St)}else if(xe===(st==null?void 0:st.option)&&!(fe!=null&&fe.checked)){const ut=It.findIndex(S,zt=>{var pn;return zt.uuid===((pn=st==null?void 0:st.tab)==null?void 0:pn.uuid)}),St=S[ut];St.isHidden=!0,E(ut,St)}})})},ye=F.useCallback((fe,xe)=>{var Me;if((c==null?void 0:c.length)>0){const Be=c;if(Be!=null&&Be.length){const Je=a;for(const[ut,St]of xe.children.entries())for(const[,zt]of St.children.entries())for(const[pn,Lt]of zt.children.entries())if(St!=null&&St.rowIsRepeatable){if((St==null?void 0:St.rowIsRepeatable)===!0){const mn=It.findIndex(Be,function(Rn){return Rn.rowId===St.uuid});fe===!0?mn===-1&&(Be.push({postData:[],tabId:$.uuid,rowId:St==null?void 0:St.uuid,tabIndex:k,sectionId:z.uuid,minimumEntries:z==null?void 0:z.minimumEntries,sectionIndex:O,sectionHeading:z.heading,subHeadingText:z.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:z.isHidden&&z.isHidden===1?1:0,reviewerChecklist:St==null?void 0:St.reviewerChecklist}),Je[St==null?void 0:St.uuid]&&delete Je[St==null?void 0:St.uuid]):(Je[St==null?void 0:St.uuid]&&delete Je[St==null?void 0:St.uuid],mn>=0&&Be.splice(mn,1))}}else{const mn=It.findIndex(Be,function(Rn){return Rn.fieldId===Lt.uuid});fe?mn===-1&&(Be.push({postData:[],tabId:$.uuid,tabIndex:k,...Lt.inlineConditionalRules?{inlineConditionalRules:Lt.inlineConditionalRules}:{},...Lt.conditionalTabRules?{conditionalTabRules:Lt.conditionalTabRules}:{},...Lt.conditionalSectionRules?{conditionalSectionRules:Lt.conditionalSectionRules}:{},sectionId:z.uuid,sectionIndex:O,sectionHeading:z.heading,subHeadingText:z.subHeadingText,reviewerChecklist:Lt==null?void 0:Lt.reviewerChecklist,rowId:St.uuid,rowIndex:ut,columnId:z.uuid,columnIndex:N,inlineConditionalField:!0,fieldIndex:pn,fieldId:Lt.uuid,fieldInputType:Lt.componentType,fieldTitle:(Me=Lt.label)==null?void 0:Me.english,fieldDescription:Lt.description||null,fieldHelperText:Lt.helperText||null,fieldHeaderText:Lt.headerText||null,fieldFooterText:Lt.footerText||null,fieldTitleAbb:Lt.abbreviationLabel||Lt.label,question_abb_table:Lt.textForTable||null,language:"english",isHiddenfield:Lt.isHidden&&Lt.isHidden===1?1:0,isHiddenSection:z.isHidden&&z.isHidden===1?1:0}),Je[Lt==null?void 0:Lt.uuid]&&delete Je[Lt==null?void 0:Lt.uuid]):(Je[Lt==null?void 0:Lt.uuid]&&delete Je[Lt==null?void 0:Lt.uuid],mn>=0&&Be.splice(mn,1))}const st=Object.keys(Je).length;p({progressMaxValue:Be==null?void 0:Be.length,progressValue:st}),d([...Be])}}},[N,_==null?void 0:_.abbreviationLabel,_==null?void 0:_.componentType,_==null?void 0:_.conditionalSectionRules,_==null?void 0:_.conditionalTabRules,_==null?void 0:_.description,_==null?void 0:_.footerText,_==null?void 0:_.headerText,_==null?void 0:_.helperText,_==null?void 0:_.inlineConditionalRules,_==null?void 0:_.isHidden,_==null?void 0:_.label,_==null?void 0:_.reviewerChecklist,_==null?void 0:_.textForTable,$==null?void 0:$.uuid,k,M==null?void 0:M.uuid,Y,z==null?void 0:z.heading,z==null?void 0:z.isHidden,z==null?void 0:z.subHeadingText,z==null?void 0:z.uuid,O,a,p,d,c]),oe=fe=>{_==null||_.conditionalSectionRules.rules.map(xe=>{var Me;(Me=xe==null?void 0:xe.conditions)==null||Me.map(Be=>{if(fe!=null&&fe.some(Je=>Je.value===Be.option)){const Je=It.findIndex(S,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.tab)==null?void 0:zt.uuid)}),st=It.findIndex(S[Je].children,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.section)==null?void 0:zt.uuid)}),ut=S[Je].children[st];ut.isHidden=!1,ye(!0,S[Je].children[st]),x(Je,st,ut)}else{const Je=It.findIndex(S,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.tab)==null?void 0:zt.uuid)}),st=It.findIndex(S[Je].children,St=>{var zt;return St.uuid===((zt=Be==null?void 0:Be.section)==null?void 0:zt.uuid)}),ut=S[Je].children[st];ut.isHidden=!0,ye(!1,S[Je].children[st]),x(Je,st,ut)}})})},re=()=>{var xe,Me,Be,Je;const fe=c;if((fe==null?void 0:fe.length)>0){for(const st of fe)if(st.fieldId===t.field.uuid){n(((xe=st==null?void 0:st.postData[0])==null?void 0:xe.postValue.length)>0?(Me=st==null?void 0:st.postData[0])==null?void 0:Me.postValue:[]);const ut=((Be=st==null?void 0:st.postData[0])==null?void 0:Be.postValue.length)>0?(Je=st==null?void 0:st.postData[0])==null?void 0:Je.postValue:[];_==null||_.conditionalTabRules.rules.map(St=>{var zt;(zt=St==null?void 0:St.conditions)==null||zt.map(pn=>{if(ut.some(Lt=>Lt.value===(pn==null?void 0:pn.option))){const Lt=It.findIndex(S,Rn=>{var xt;return Rn.uuid===((xt=pn==null?void 0:pn.tab)==null?void 0:xt.uuid)}),mn=S[Lt];mn.isHidden=!1,E(Lt,mn)}})}),q(!0);break}}},B=fe=>{const xe=c,Me=It.cloneDeep(a);if((fe==null?void 0:fe.length)>0&&(xe==null?void 0:xe.length)>0){Me[_==null?void 0:_.uuid]=fe;for(const Je of xe)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe});s(Me);const Be=Object.keys(Me).length;l(Be)}else{if(delete Me[_==null?void 0:_.uuid],(xe==null?void 0:xe.length)>0)for(const Je of xe)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:[]});s(Me);const Be=Object.keys(Me).length;l(Be)}},ne=()=>{const fe=[];return _==null||_.options.map((xe,Me)=>{var Je,st,ut,St;const Be=e;fe.push(o.jsxs("div",{className:`field ${m&&" py-3 px-4 builder-element-wrapper "}${(_==null?void 0:_.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"flex align-items-center gap-2",children:[o.jsx(Yr,{id:`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`,onFocus:()=>i(1),disabled:w||le,onChange:zt=>{ge(zt)},value:xe,checked:Be==null?void 0:Be.some(zt=>zt.uuid===xe.uuid)}),((Je=xe==null?void 0:xe.hyperlinkText)==null?void 0:Je[C==null?void 0:C.type])===""?o.jsxs("label",{htmlFor:`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`,children:[_!=null&&_.showAlphabetList?o.jsxs("span",{className:"mx-2",children:[" ",XO(Me)," "]}):o.jsx(o.Fragment,{}),m?o.jsx(o.Fragment,{children:o.jsx(dF,{...t,option:xe,optionIndex:Me})}):o.jsx(o.Fragment,{children:(st=xe==null?void 0:xe.optionText)==null?void 0:st[C==null?void 0:C.type]})]}):o.jsx("label",{children:o.jsx("a",{href:(ut=xe==null?void 0:xe.hyperlinkText)==null?void 0:ut[C==null?void 0:C.type],target:"_blank",rel:"noreferrer",children:(St=xe==null?void 0:xe.optionText)==null?void 0:St[C==null?void 0:C.type]})})]}),m&&o.jsx("div",{className:"builder-radio-option-settings",children:o.jsx(fF,{optionId:xe==null?void 0:xe.uuid,...t})})]},`checkbox-option-${Me}-${xe==null?void 0:xe.uuid}-${m?"builder":"preview"}`))}),fe};F.useEffect(()=>{ce||re();const fe=Gt.addListener("clearRepeatableFields",Be=>{Be===(M==null?void 0:M.uuid)&&(n([]),i(0),_.isValid=0,T(k,O,Y,N,P,_))}),xe=Gt.addListener("onSubmitUserForm",()=>{var Je;const Be=e;(Je=_==null?void 0:_.attributes)!=null&&Je.required?(Be.length>0?_.isValid=1:_.isValid=0,f(k,O,Y,N,P,_)):_.isValid=1}),Me=Gt.addListener("OnInvalidFieldCatch",Be=>{_.uuid===(Be==null?void 0:Be.fieldId)?i(1):i(0)});return()=>{xe.remove(),Me.remove(),fe.remove()}});const se=(fe,xe,Me,Be)=>{var zt;n(Be);const Je=[...c],st=It.findIndex(Je,function(pn){return pn.rowId===(M==null?void 0:M.uuid)});let ut=(zt=c[st])==null?void 0:zt.repeatableFields,St="<ol class='card '>";Be==null||Be.map(pn=>{St=St+`<li>${pn.value}</li>`}),St=St+"</ol>",ut={...ut,[Me==null?void 0:Me.uuid]:St},Je[st]={...Je[st],repeatableFields:ut},d(Je),(Be==null?void 0:Be.length)>0?Me.isValid=1:Me.isValid=0,T(fe,xe,Y,N,st,Me)},me=o.jsxs("div",{onMouseOver:Q,onMouseOut:H,children:[m&&W&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsx("div",{className:`field ${m&&" py-3 px-4 builder-element-wrapper "}${(_==null?void 0:_.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(_==null?void 0:_.showHeaderText)&&o.jsx("h6",{children:(we=_==null?void 0:_.headerText)==null?void 0:we[C==null?void 0:C.type]}),(_==null?void 0:_.showLabel)&&o.jsxs("label",{htmlFor:`${P}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ve=_==null?void 0:_.attributes)==null?void 0:ve.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",m?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ue=_==null?void 0:_.label)==null?void 0:ue[C==null?void 0:C.type]}),o.jsx("span",{className:"ml-3",children:(_==null?void 0:_.showToolTip)&&o.jsx(Vi,{message:(Te=_==null?void 0:_.toolTip)==null?void 0:Te[C==null?void 0:C.type],position:"right"})})]}),ne(),o.jsx("div",{children:((_e=_==null?void 0:_.attributes)==null?void 0:_e.required)&&o.jsx("small",{className:"error",children:r===1&&!(e&&(e==null?void 0:e.length)>0)?(K=_==null?void 0:_.validationMesssage)==null?void 0:K.language:""})}),o.jsx("div",{children:(_==null?void 0:_.showHelperText)&&o.jsx("small",{children:(Ee=_==null?void 0:_.helperText)==null?void 0:Ee[C==null?void 0:C.type]})}),((be=_==null?void 0:_.inlineConditionalRules)==null?void 0:be.rules.length)>0&&m===!0&&o.jsx("p",{children:"Inline conditional rules"}),(he=_==null?void 0:_.inlineConditionalRules)==null?void 0:he.rules.map((fe,xe)=>{if(m===!1){const Me=e;return o.jsx("div",{children:fe==null?void 0:fe.conditions.map((Be,Je)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:Me==null?void 0:Me.some(st=>st.value===Be.value),inputValue:e,condition:Be,ruleIndex:xe,conditionIndex:Je,field:_,section:z,page:$,row:M,pageIndex:k,sectionIndex:O,rowIndex:Y,columnIndex:N,...t})},`select-rule-${xe}-`+Je))},`rule-${xe}`)}else return o.jsx(ci,{className:"mt-4",header:`Rule ${xe+1}`,children:o.jsx("div",{children:fe==null?void 0:fe.conditions.map((Me,Be)=>o.jsx(F.Fragment,{children:o.jsxs("div",{className:"card",children:[o.jsx(pu,{style:{marginTop:-20},className:"mr-2",severity:"success",value:`Condition: ${Me==null?void 0:Me.value}`,rounded:!0}),o.jsx(n0,{isConditionTrue:(e==null?void 0:e.some(Je=>Je.value===Me.value))||m,inputValue:e,condition:Me,ruleIndex:xe,conditionIndex:Be,field:_,section:z,page:$,row:M,pageIndex:k,sectionIndex:O,rowIndex:Y,columnIndex:N,...t})]})},`select-rule-${xe}-`+Be))},`rule-${xe}`)},xe)})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]}),Ne=()=>{let fe="";return m&&(fe=fe+" field-form-builder"),u===h&&w===!0&&(fe=fe+" card"),fe};return o.jsxs(o.Fragment,{children:[G===!0&&o.jsx(Zi,{visibilty:G,closeSettingFieldSidebar:pe,...t},_==null?void 0:_.uuid),o.jsx("div",{className:Ne(),dir:v,children:u===h&&w===!0?o.jsx(ci,{headerTemplate:fe=>{var xe;return o.jsx(xb,{options:fe,title:(xe=_==null?void 0:_.label)==null?void 0:xe[C==null?void 0:C.type]})},toggleable:!0,children:me}):me})]})},e0e=t=>{var re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{task_status:e,taskRegisterData:n,updateTaskRegisterData:r,updateTaskProgressValue:i,userTaskSubmitFormData:a,updateUserFormDataSubmit:s,updateProgressDataValuesHook:l,TASK_PUBLISHED:c}=Ar(),{field:u,row:d,pageIndex:f,sectionIndex:h,section:p,page:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:C}=Ht(),{pageSettingUpdate:T,formBuilderFormLayout:S,sectionSettingUpdate:E,userSelectedLanguage:_}=sn(),[P,O]=F.useState(!1),[k,M]=F.useState(null),[Y,N]=F.useState(0),[z,$]=F.useState(!1),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=K=>{O(K)},W=()=>{O(!1)},ee=()=>{var K,Ee,be,he;if((a==null?void 0:a.length)>0)if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const fe=[...d.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(u==null?void 0:u.uuid)});xe>=0&&fe[xe].fieldData?M(fe[xe].fieldData):(u.isValid=0,M(null))}}else{const fe=a,xe=It.cloneDeep(n);let Me=null;if(fe!=null&&fe.length){for(const Be of fe)if(Be.fieldId===t.field.uuid&&((K=Be==null?void 0:Be.postData)!=null&&K.length)){Me=(Ee=Be==null?void 0:Be.postData[0])==null?void 0:Ee.postValue,M((be=Be==null?void 0:Be.postData[0])==null?void 0:be.postValue),xe[u==null?void 0:u.uuid]=(he=Be==null?void 0:Be.postData[0])==null?void 0:he.postValue;const Je=Object.keys(xe).length;i(Je);break}}Q({value:Me}),X({value:Me})}setTimeout(()=>{$(!0)},2e3)},Q=K=>{const Ee=K.value;u==null||u.conditionalTabRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{const xe=It.findIndex(S,Me=>{var Be;return Me.uuid===((Be=fe==null?void 0:fe.tab)==null?void 0:Be.uuid)});if(Ee===(fe==null?void 0:fe.option)){const Me=S[xe];Me.isHidden=!1,T(xe,Me)}else{let Me=S[xe];Me={...Me,isHidden:!0},T(xe,Me)}})})},H=F.useCallback((K,Ee)=>{var be;if((a==null?void 0:a.length)>0){const he=a;if(he!=null&&he.length){const fe=n;for(const[Me,Be]of Ee.children.entries())for(const[,Je]of Be.children.entries())for(const[st,ut]of Je.children.entries())if(Be!=null&&Be.rowIsRepeatable){if((Be==null?void 0:Be.rowIsRepeatable)===!0){const St=It.findIndex(he,function(zt){return zt.rowId===Be.uuid});K===!0?St===-1&&(he.push({postData:[],tabId:v.uuid,rowId:Be==null?void 0:Be.uuid,tabIndex:f,sectionId:p.uuid,minimumEntries:p==null?void 0:p.minimumEntries,sectionIndex:h,sectionHeading:p.heading,subHeadingText:p.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:!!(p.isHidden&&p.isHidden===!0),reviewerChecklist:Be==null?void 0:Be.reviewerChecklist}),fe[Be==null?void 0:Be.uuid]&&delete fe[Be==null?void 0:Be.uuid]):(fe[Be==null?void 0:Be.uuid]&&delete fe[Be==null?void 0:Be.uuid],St>=0&&he.splice(St,1))}}else{const St=It.findIndex(he,function(zt){return zt.fieldId===ut.uuid});K?St===-1&&(he.push({postData:[],tabId:v.uuid,tabIndex:f,...ut.inlineConditionalRules?{inlineConditionalRules:ut.inlineConditionalRules}:{},...ut.conditionalTabRules?{conditionalTabRules:ut.conditionalTabRules}:{},...ut.conditionalSectionRules?{conditionalSectionRules:ut.conditionalSectionRules}:{},sectionId:p.uuid,sectionIndex:h,sectionHeading:p.heading,subHeadingText:p.subHeadingText,reviewerChecklist:ut==null?void 0:ut.reviewerChecklist,rowId:Be.uuid,rowIndex:Me,columnId:p.uuid,columnIndex:A,inlineConditionalField:!0,fieldIndex:st,fieldId:ut.uuid,fieldInputType:ut.componentType,fieldTitle:(be=ut.label)==null?void 0:be.english,fieldDescription:ut.description||null,fieldHelperText:ut.helperText||null,fieldHeaderText:ut.headerText||null,fieldFooterText:ut.footerText||null,fieldTitleAbb:ut.abbreviationLabel||ut.label,question_abb_table:ut.textForTable||null,language:"english",isHiddenfield:ut.isHidden&&ut.isHidden===1?1:0,isHiddenSection:!!(p.isHidden&&p.isHidden===!0)}),fe[ut==null?void 0:ut.uuid]&&delete fe[ut==null?void 0:ut.uuid]):(fe[ut==null?void 0:ut.uuid]&&delete fe[ut==null?void 0:ut.uuid],St>=0&&he.splice(St,1))}const xe=Object.keys(fe).length;l({progressMaxValue:he==null?void 0:he.length,progressValue:xe}),s([...he])}}},[A,u==null?void 0:u.abbreviationLabel,u==null?void 0:u.componentType,u==null?void 0:u.conditionalSectionRules,u==null?void 0:u.conditionalTabRules,u==null?void 0:u.description,u==null?void 0:u.footerText,u==null?void 0:u.headerText,u==null?void 0:u.helperText,u==null?void 0:u.inlineConditionalRules,u==null?void 0:u.isHidden,u==null?void 0:u.label,u==null?void 0:u.reviewerChecklist,u==null?void 0:u.textForTable,v==null?void 0:v.uuid,f,d==null?void 0:d.uuid,m,p==null?void 0:p.heading,p==null?void 0:p.isHidden,p==null?void 0:p.subHeadingText,p==null?void 0:p.uuid,h,n,l,s,a]),X=K=>{const Ee=K.value;u==null||u.conditionalSectionRules.rules.map(be=>{var he;(he=be==null?void 0:be.conditions)==null||he.map(fe=>{if(Ee===(fe==null?void 0:fe.option)){const xe=It.findIndex(S,Je=>{var st;return Je.uuid===((st=fe==null?void 0:fe.tab)==null?void 0:st.uuid)}),Me=It.findIndex(S[xe].children,Je=>{var st;return Je.uuid===((st=fe==null?void 0:fe.section)==null?void 0:st.uuid)}),Be=S[xe].children[Me];Be.isHidden=!1,H(!0,S[xe].children[Me]),E(xe,Me,Be)}else{const xe=It.findIndex(S,Je=>{var st;return(Je==null?void 0:Je.uuid)===((st=fe==null?void 0:fe.tab)==null?void 0:st.uuid)}),Me=It.findIndex(S[xe].children,Je=>{var st;return(Je==null?void 0:Je.uuid)===((st=fe==null?void 0:fe.section)==null?void 0:st.uuid)}),Be=S[xe].children[Me];Be.isHidden=!0,H(!1,S[xe].children[Me]),E(xe,Me,Be)}})})};F.useEffect(()=>{z||ee();const K=Gt.addListener("clearRepeatableFields",he=>{he===(d==null?void 0:d.uuid)&&(M(""),N(0),u.isValid=1)}),Ee=Gt.addListener("onSubmitUserForm",()=>{var he;if((he=u==null?void 0:u.attributes)!=null&&he.required){const fe=k;fe!=null&&fe.uuid&&(fe!=null&&fe.value)?u.isValid=1:u.isValid=0}else u.isValid=1}),be=Gt.addListener("OnInvalidFieldCatch",he=>{(u==null?void 0:u.uuid)===(he==null?void 0:he.fieldId)?N(1):N(0)});return()=>{Ee.remove(),be.remove(),K.remove()}});const pe=(K,Ee)=>{var be;if(a){const he=[...a],fe=It.findIndex(he,function(Me){return Me.rowId===(d==null?void 0:d.uuid)});let xe=(be=a[fe])==null?void 0:be.repeatableFields;xe={...xe,[K==null?void 0:K.uuid]:Ee},he[fe]={...he[fe],repeatableFields:xe},s(he)}M(Ee),Ee!==null?K.isValid=1:K.isValid=0},ge=K=>{var Ee;M(K.target.value),Q(K),X(K),d!=null&&d.rowIsRepeatable?pe(u,(Ee=K==null?void 0:K.target)==null?void 0:Ee.value):ye(K),setTimeout(()=>{Gt.emit("updatePageRender","complete")},1e3)},Ae=()=>{var K;if(((K=u==null?void 0:u.fieldType)==null?void 0:K.type)==="radio"){const Ee=[];return u==null||u.options.map((be,he)=>{var xe,Me,Be,Je;const fe=k;Ee.push(o.jsxs("div",{className:`field-radiobutton ${u!=null&&u.showButtonLayout?"col-6 field-radiobutton-builder":""}`,onClick:()=>{ge({value:be,target:{value:be}})},style:(fe==null?void 0:fe.uuid)===(be==null?void 0:be.uuid)&&(u!=null&&u.showButtonLayout)?{backgroundColor:"#0F8BFD",padding:5,borderRadius:8}:{padding:5},children:[o.jsx(sa,{onFocus:()=>N(1),inputId:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder-radio":"preview"}`,onChange:st=>{ge(st)},value:be,name:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder":"preview"}`,checked:(fe==null?void 0:fe.uuid)===(be==null?void 0:be.uuid),disabled:x||w,readOnly:x||w}),((xe=be==null?void 0:be.hyperlinkText)==null?void 0:xe[_==null?void 0:_.type])===""?o.jsxs("label",{htmlFor:`radio-option-${he}-${be==null?void 0:be.uuid}-${C?"builder-label":"preview"}`,children:[u!=null&&u.showAlphabetList?o.jsxs("span",{className:"mx-2",children:[" ",XO(he)," "]}):"",C?o.jsx(o.Fragment,{children:o.jsx(dF,{...t,option:be,optionIndex:he})}):o.jsxs(o.Fragment,{children:[" ",(Me=be==null?void 0:be.optionText)==null?void 0:Me[_==null?void 0:_.type]]})]}):o.jsx("label",{children:o.jsx("a",{href:(Be=be==null?void 0:be.hyperlinkText)==null?void 0:Be[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(Je=be==null?void 0:be.optionText)==null?void 0:Je[_==null?void 0:_.type]})}),C&&o.jsx("div",{className:"builder-radio-option-settings",children:o.jsx(fF,{optionId:be==null?void 0:be.uuid,...t})})]},"li-item-"+he))}),Ee}},ye=K=>{var xe,Me;M(K.target.value);const Ee={value:K.target.value};Q(Ee),X(Ee);const be=a,he=It.cloneDeep(n);if((xe=K==null?void 0:K.target)!=null&&xe.value&&(be==null?void 0:be.length)>0)for(const Be of be)Be.fieldId===t.field.uuid&&(he[u==null?void 0:u.uuid]=(Me=K==null?void 0:K.target)==null?void 0:Me.value,Be.postData[0]={postValue:K.target.value});else delete he[u==null?void 0:u.uuid];r(he);const fe=Object.keys(he).length;i(fe)},oe=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[C&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${C&&" py-3 px-4 builder-element-wrapper "}${(u==null?void 0:u.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(u==null?void 0:u.showHeaderText)&&o.jsx("h6",{children:(re=u==null?void 0:u.headerText)==null?void 0:re[_==null?void 0:_.type]}),(u==null?void 0:u.showLabel)&&o.jsxs("label",{htmlFor:u.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((B=u==null?void 0:u.attributes)==null?void 0:B.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",C?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ne=u==null?void 0:u.label)==null?void 0:ne[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:u!=null&&u.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(se=u==null?void 0:u.toolTip)==null?void 0:se[_==null?void 0:_.type],position:"right"})}):""})]}),(u==null?void 0:u.showButtonLayout)===!0?o.jsxs("div",{className:"grid",children:[Ae()," "]}):Ae(),o.jsx("div",{children:((me=u==null?void 0:u.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:Y===1&&k!==null?(Ne=u==null?void 0:u.validationMesssage)==null?void 0:Ne.language:""})}),o.jsx("div",{children:(u==null?void 0:u.showHelperText)&&o.jsx("small",{children:(we=u==null?void 0:u.helperText)==null?void 0:we[_==null?void 0:_.type]})}),((ve=u==null?void 0:u.inlineConditionalRules)==null?void 0:ve.rules.length)>0&&C===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((Te=(ue=u==null?void 0:u.inlineConditionalRules)==null?void 0:ue.rules)==null?void 0:Te.length)>0&&((_e=u==null?void 0:u.inlineConditionalRules)==null?void 0:_e.rules.map((K,Ee)=>{const be=k;return C===!1?o.jsx("div",{children:K==null?void 0:K.conditions.map((he,fe)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((be==null?void 0:be.value)===he.value||C),inputValue:k,condition:he,ruleIndex:Ee,conditionIndex:fe,field:u,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,isAdmin:x,...t})},`select-rule-${Ee}-`+fe))},`rule-${Ee}`):o.jsx(ci,{className:"mt-4",header:`Rule ${Ee+1}`,children:o.jsx("div",{children:K==null?void 0:K.conditions.map((he,fe)=>{const xe=k;return o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((xe==null?void 0:xe.value)===he.value||C),inputValue:k,condition:he,ruleIndex:Ee,conditionIndex:fe,field:u,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,...t})},`select-rule-${Ee}-`+fe)})},`rule-${Ee}`)},Ee)}))]}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},u==null?void 0:u.uuid),o.jsx(xi,{...t,fieldWrap:oe})]})},t0e=F.memo(e0e),n0e=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Text"}),o.jsx(wn,{value:(i=r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value),placeholder:"Heading text",id:r==null?void 0:r.uuid})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value),placeholder:"Link"})]})]})},r0e=t=>{const{onHandleChangeHeadingTypeSetttings:e,fieldState:n}=t,r=[{name:"H1",type:"h1"},{name:"H2",type:"h2"},{name:"H3",type:"h3"},{name:"H4",type:"h4"},{name:"H5",type:"h5"}];return o.jsxs("form",{className:"p-fluid",children:[o.jsx("h3",{children:"Select heading type"}),r.map((i,a)=>o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:i==null?void 0:i.type,name:"heading",value:i==null?void 0:i.type,onChange:s=>e(s),checked:n.headingType===i.type}),o.jsx("label",{htmlFor:i.type,children:i.name})]},a))]})},i0e=t=>{const{fieldSettingUpdate:e,formBuilderSchemaLanguages:n,formBuilderPublishedStatus:r,fieldSettingUpdateInlineConditional:i,gridComponentFieldSettingUpdate:a}=sn(),{path:s,visibilty:l,field:c,closeSettingFieldSidebar:u,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p,fieldIndex:v,typeName:m}=t,[A,w]=F.useState(c),{updateGlobalToast:x}=Ht(),C=(E,_,P)=>{w(O=>({...O,[E]:{...O[E],[_==null?void 0:_.type]:P}}))},T=E=>{w(_=>({..._,headingType:E==null?void 0:E.value}))},S=()=>{const E=s.split("-").map(Number);(E==null?void 0:E.length)>5&&(E==null?void 0:E.length)===8&&(A!=null&&A.inlineConditionalRules)?i(E[pa],E[ga],E[Ta],E[Ea],E[Ia],E[Pa],E[Go],E[Co],A):(E==null?void 0:E.length)>Pa&&(E==null?void 0:E.length)===ql+1&&(A!=null&&A.componentType)?a(E[pa],E[ga],E[Ta],E[Ea],E[Ia],E[vx],E[bx],E[yx],A):e(d,f,h,p,v,A),x({showToast:!0,toastMessage:"Updated",toastDetail:`${m} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{style:{width:"750px"},visible:l,position:"left",className:"p-sidebar-lg",onHide:()=>u(),header:()=>o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"]})}),children:[o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:n!=null&&n.length?n.map((E,_)=>o.jsx(so,{tabIndex:_,header:E==null?void 0:E.language,children:o.jsx(n0e,{language:E,fieldState:A,onHandleChange:C,...t})},_)):""})}),o.jsx(wr,{header:"Setting",children:o.jsx(r0e,{onHandleChangeHeadingTypeSetttings:T,fieldState:A})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!r&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>S(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>u(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},a0e=t=>{var v,m;const{field:e}=t,{isBuilderMode:n}=Ht(),{userSelectedLanguage:r}=sn(),[i,a]=F.useState(!1),[s,l]=F.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=A=>{a(A)},f=()=>{a(!1)},h=()=>{var A,w,x,C,T,S;return(e==null?void 0:e.headingType)==="h1"?o.jsx("h1",{children:(A=e==null?void 0:e.text)==null?void 0:A[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h2"?o.jsx("h2",{children:(w=e==null?void 0:e.text)==null?void 0:w[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h3"?o.jsx("h3",{children:(x=e==null?void 0:e.text)==null?void 0:x[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h4"?o.jsx("h4",{children:(C=e==null?void 0:e.text)==null?void 0:C[r==null?void 0:r.type]}):(e==null?void 0:e.headingType)==="h5"?o.jsx("h5",{children:(T=e==null?void 0:e.text)==null?void 0:T[r==null?void 0:r.type]}):o.jsx("h1",{children:(S=e==null?void 0:e.text)==null?void 0:S[r==null?void 0:r.type]})},p=o.jsxs("div",{className:n?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[n&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsx("div",{className:n?"field-form-builder px-2":" px-2",children:o.jsx("div",{className:"col-12",children:((v=e==null?void 0:e.hrefLink)==null?void 0:v[r==null?void 0:r.type])!==""?o.jsx("a",{href:(m=e==null?void 0:e.hrefLink)==null?void 0:m[r==null?void 0:r.type],target:"_blank",rel:"noreferrer",children:h()}):h()})})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(i0e,{visibilty:i,closeSettingFieldSidebar:f,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:p})]})},s0e=t=>{var i,a;const{language:e,onHandleQuestionTextChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Question text"}),o.jsx(wn,{placeholder:"Enter question",value:(i=r.questionText)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("questionText",e.type,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Correct answer"}),o.jsx(wn,{placeholder:"Enter correct answer",value:(a=r.correctAnswerComment)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("correctAnswerComment",e.type,s.target.value)})]})]})},o0e=t=>{var i;const{onHandleChange:e,fieldState:n,onHandleChangeAttributesSetttings:r}=t;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",style:{display:"inline-block",width:"150px"},children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Time limit"}),o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(no,{inputId:"horizontal",showButtons:!0,buttonLayout:"horizontal",step:1,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},value:n==null?void 0:n.timeLimit,onChange:a=>e("timeLimit",a.value)}),o.jsx("span",{className:"p-inputgroup-addon",children:"mins"})]})]})}),o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",style:{display:"inline-block",width:"100px"},children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Score"}),o.jsx("div",{className:"p-inputgroup",children:o.jsx(no,{inputId:"horizontal",showButtons:!0,buttonLayout:"horizontal",step:1,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},value:n==null?void 0:n.score,onChange:a=>e("score",a.value)})})]})}),o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"required",checked:(i=n==null?void 0:n.attributes)==null?void 0:i.required,onChange:a=>r("required",a.checked)}),o.jsx("label",{htmlFor:"required",children:"Is complusory?"})]})})]})},l0e=t=>{const{onHandleChange:e,fieldState:n}=t,[r,i]=F.useState([{type:"radio"},{type:"checkbox"}]);return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field field-checkbox",children:[o.jsx(Yr,{inputId:"isAllowMultipleAnswer",value:"isAllowMultipleAnswer",onChange:a=>{e("isAllowMultipleAnswer",a==null?void 0:a.checked),a!=null&&a.checked?(i([{type:"checkbox"}]),e("answerInputType","checkbox")):(i([{type:"radio"}]),e("answerInputType","radio"))},checked:n==null?void 0:n.isAllowMultipleAnswer}),o.jsx("label",{htmlFor:"isAllowMultipleAnswer",className:"p-checkbox-label ",children:"Allow multiple answer"})]}),(n==null?void 0:n.isAllowMultipleAnswer)&&o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Number of options"}),o.jsx(wn,{type:"number",value:(n==null?void 0:n.noOfMultpleAnswer)||0,onChange:a=>{var s;e("noOfMultpleAnswer",(s=a==null?void 0:a.target)==null?void 0:s.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Answer input type"}),r.map((a,s)=>o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:a.type,name:"answerInputType",value:a.type,onChange:()=>{if(e("answerInputType",a.type),a.type==="checkbox"&&e("isAllowMultipleAnswer",!0),a.type==="radio"){let l=[...(n==null?void 0:n.answerOptions)||[]];l=l.map(c=>({...c,isCorrect:!1})),e("answerOptions",l),e("isAllowMultipleAnswer",!1)}},checked:(n==null?void 0:n.answerInputType)===a.type}),o.jsx("label",{htmlFor:a.type,children:a.type})]},s))]})]})},c0e=t=>{const{fieldState:e,setFieldState:n,language:r}=t,i=()=>{var p;let f=!1;const h=(p=e==null?void 0:e.answerOptions)==null?void 0:p.filter(v=>(v==null?void 0:v.isCorrect)===!0);return(h==null?void 0:h.length)===parseInt(e==null?void 0:e.noOfMultpleAnswer)&&(f=!0),f},a=f=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space",onClick:()=>d((f==null?void 0:f.uuid)||""),icon:"pi pi-trash"})}),s=f=>o.jsx(o.Fragment,{children:o.jsx(wn,{value:f==null?void 0:f.answersText[r],onChange:h=>c("answersText",(f==null?void 0:f.uuid)||"",h.target.value)})}),l=(f,h)=>o.jsx(o.Fragment,{children:o.jsx(Yr,{inputId:"binary",checked:(f==null?void 0:f.isCorrect)||!1,onChange:p=>{p.checked&&i()||u("isCorrect",(f==null?void 0:f.uuid)||"",p.checked,h)}})}),c=(f,h,p)=>{n(v=>({...v,answerOptions:v!=null&&v.answerOptions?v==null?void 0:v.answerOptions.map(m=>m.uuid!==h?m:{...m,[f]:{...m[f],[r]:p}}):[]}))},u=(f,h,p,v)=>{n(m=>{const{answerOptions:A,isAllowMultipleAnswer:w,answerInputType:x}=m,C=v.rowIndex,T=A.map((S,E)=>{const _=E===C;return w||x==="checkbox"?_?{...S,[f]:p}:S:{...S,[f]:_?p:!1}});return{...m,answerOptions:T}})},d=f=>{const h=It.findIndex(e==null?void 0:e.answerOptions,v=>v.uuid===f),p=(e==null?void 0:e.answerOptions)&&(e==null?void 0:e.answerOptions.filter(function(v,m){return m!==h}));p!=null&&p.length&&(p==null?void 0:p.length)>0&&n(v=>({...v,answerOptions:p}))};return o.jsx("div",{children:o.jsx("div",{className:"card",children:o.jsxs(ao,{value:e==null?void 0:e.answerOptions,scrollable:!0,children:[o.jsx(xr,{header:"Answer text",body:f=>s(f),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}}),o.jsx(xr,{body:(f,h)=>l(f,h),header:"Is answer ?",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}}),o.jsx(xr,{header:"Action",body:f=>a(f),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]})})})},u0e=t=>{const e=[],[n]=F.useState([]),{onHandleChange:r,fieldState:i}=t;return F.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field mt-3 w-full",children:[o.jsx("label",{children:"Subject"}),o.jsx(La,{id:"subject",name:"subject",optionLabel:"subject_title",value:(n==null?void 0:n.length)>0&&(i==null?void 0:i.subject_id)!==null?n.filter(a=>(i==null?void 0:i.subject_id)===(a==null?void 0:a.subject_id))[0]:null,placeholder:"Select a Subject",options:n,className:"w-full",onChange:a=>{var s;r("subject_id",(s=a==null?void 0:a.value)==null?void 0:s.subject_id)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Course category"}),o.jsx(La,{id:"course_category",name:"course_category",optionLabel:"course_category_title",value:(e==null?void 0:e.length)>0&&(i==null?void 0:i.course_category_id)!==null?e.filter(a=>(i==null?void 0:i.course_category_id)===(a==null?void 0:a.course_category_id))[0]:null,placeholder:"Select a category",options:e,className:"w-full",onChange:a=>{var s;r("course_category_id",(s=a==null?void 0:a.value)==null?void 0:s.course_category_id)}})]})]})},d0e=t=>{const{formBuilderSchemaLanguages:e,fieldSettingUpdate:n}=sn(),{visibilty:r,setVisibility:i,rowIndex:a,columnIndex:s,fieldIndex:l,pageIndex:c,sectionIndex:u,field:d,typeName:f}=t,[h,p]=F.useState(d),{updateGlobalToast:v}=Ht(),m=(S,E)=>{p(_=>({..._,attributes:{..._.attributes,[S]:E}}))},A=(S,E,_)=>{p(P=>({...P,[S]:{[E]:_}}))},w=(S,E)=>{p(_=>({..._,[S]:E}))},x=()=>{const S=[],_=((h==null?void 0:h.answerOptions)||[]).filter(M=>M.isCorrect===!0),{answerInputType:P,isAllowMultipleAnswer:O,noOfMultpleAnswer:k}=h||{};if(P==="radio")_.length!==1&&S.push("Please select one answer");else if(P==="checkbox"){const M=O?parseInt(k,10)||0:1;_.length!==M&&S.push(M>1?`Select ${M} answers`:"Please select one answer")}return S.length?(v({showToast:!0,toastMessage:"Validation error",toastDetail:S.join(", "),toastType:"error"}),!1):!0},C=()=>{x()&&(n(c,u,a,s,l,h),v({showToast:!0,toastMessage:"Updated",toastDetail:`${f} updated`,toastType:"success"}))},T=()=>{p(S=>Object.assign({},S,{answerOptions:[...S.answerOptions||[],{uuid:tt(),answersText:{english:""},isCorrect:!1}]}))};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:r,position:"left",className:"p-sidebar-lg",onHide:()=>i(!1),children:[o.jsx("div",{className:"flex justify-content-between flex-wrap card-container ",children:o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:[t==null?void 0:t.typeName," settings"," "]})," "]})}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:e!=null&&e.length?e.map((S,E)=>o.jsx(so,{tabIndex:E,header:S==null?void 0:S.language,children:o.jsx(s0e,{language:S,fieldState:h,onHandleQuestionTextChange:A,...t})},E)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(o0e,{fieldState:h,onHandleChangeAttributesSetttings:m,onHandleChange:w,...t})}),o.jsx(wr,{header:"Answers",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(l0e,{fieldState:h,onHandleChange:w,...t}),o.jsxs("div",{className:"flex justify-content-between mb-2",children:[o.jsx("h4",{children:"Answers options"}),o.jsx(Ft,{className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>T(),"aria-label":"Add"})]}),(h==null?void 0:h.answerOptions)!==void 0&&o.jsx(o.Fragment,{children:o.jsx(oo,{activeIndex:0,children:e!=null&&e.length?e.map((S,E)=>o.jsx(so,{tabIndex:E,header:S==null?void 0:S.language,children:o.jsx(c0e,{language:S==null?void 0:S.type,fieldState:h,setFieldState:p})},E)):""})})]})}),o.jsx(wr,{header:"Information",children:o.jsx(u0e,{fieldState:h,onHandleChange:w})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>C(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>i(!1),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},f0e=t=>{var O,k,M,Y,N,z;const{isBuilderMode:e}=Ht(),{field:n}=t,{taskRegisterData:r,updateTaskRegisterData:i,updateTaskProgressValue:a,userTaskSubmitFormData:s}=Ar(),{userSelectedLanguage:l}=sn(),{media:c}=Ht(),u=(O=c==null?void 0:c.image)!=null&&O.MediaImage?(k=c==null?void 0:c.image)==null?void 0:k.MediaImage:o.jsx(o.Fragment,{}),[d,f]=F.useState(!1),[h,p]=F.useState([]),[v,m]=F.useState(!1),A=$=>{m($)},w=()=>{m(!1)},x=()=>{f(!0)},C=()=>{f(!1)},T=$=>{var ce;const le=It.cloneDeep(r),G=[...h];$.checked?(le[n==null?void 0:n.uuid]=(ce=$==null?void 0:$.target)==null?void 0:ce.value,G.push($.value)):(delete le[n==null?void 0:n.uuid],G.splice(G.indexOf($.value),1)),p(G),S($,G),i(le);const R=Object.keys(le).length;a(R)},S=($,le)=>{const G=s;if((G==null?void 0:G.length)>0&&$!=null&&$.value)for(const R of G)R.fieldId===t.field.uuid&&(R.postData[0]={postValue:le})},E=$=>{var ce;const le=s,G=It.cloneDeep(r);if((le==null?void 0:le.length)>0)if((ce=$==null?void 0:$.target)!=null&&ce.value)for(const q of le)q.fieldId===t.field.uuid&&(G[n==null?void 0:n.uuid]=$==null?void 0:$.value,q.postData[0]={postValue:$.value});else delete G[n==null?void 0:n.uuid];i(G);const R=Object.keys(G).length;a(R)};F.useEffect(()=>{p([])},[n==null?void 0:n.answerInputType]);const _=()=>{const $=[];return(n==null?void 0:n.answerInputType)==="radio"?n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var ce,q,W,ee;const R=h;$.push(o.jsxs("div",{className:"flex align-items-center p-field-radiobutton mb-3",children:[o.jsx(sa,{inputId:`${G}`,onChange:Q=>{p(Q.target.value),E(Q)},checked:(R==null?void 0:R.uuid)===(le==null?void 0:le.uuid),name:"category",value:le})," ",((ce=le.answersTextImage)==null?void 0:ce[l==null?void 0:l.type])&&((q=le.answersTextImage)==null?void 0:q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(W=le.answersTextImage)==null?void 0:W[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${G}`,children:(ee=le==null?void 0:le.answersText)==null?void 0:ee[l==null?void 0:l.type]})]},G))})):(n==null?void 0:n.answerInputType)==="checkbox"?n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var R;$.push(o.jsxs("div",{className:"p-field-radiobutton mb-3",children:[o.jsx(Yr,{inputId:`${G}`,name:"category",onChange:ce=>{T(ce)},value:le,checked:h!=null&&h.length?h==null?void 0:h.some(ce=>ce.uuid===le.uuid):!1})," ",o.jsx("label",{htmlFor:`${G}`,children:(R=le==null?void 0:le.answersText)==null?void 0:R[l==null?void 0:l.type]})]},G))})):n!=null&&n.answerOptions&&(n==null||n.answerOptions.map((le,G)=>{var ce,q,W,ee,Q,H,X;const R=h;$.push(o.jsxs("div",{className:"p-field-radiobutton mb-3",children:[o.jsx(sa,{inputId:`${G}`,onChange:pe=>{p(pe.target.value),E(pe)},checked:(R==null?void 0:R.uuid)===(le==null?void 0:le.uuid),name:"category",value:le})," ",((ce=le.answersTextImage)==null?void 0:ce[l==null?void 0:l.type])&&((q=le.answersTextImage)==null?void 0:q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(W=le.answersTextImage)==null?void 0:W[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsxs("label",{htmlFor:`${G}`,children:[((ee=le.answersTextImage)==null?void 0:ee[l==null?void 0:l.type])&&((Q=le.answersTextImage)==null?void 0:Q[l==null?void 0:l.type])!==""&&o.jsx(u,{mediaId:(H=le.answersTextImage)==null?void 0:H[l==null?void 0:l.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),(X=le==null?void 0:le.answersText)==null?void 0:X[l==null?void 0:l.type]]})]},G))})),$},P=o.jsxs("div",{onMouseOver:x,onMouseOut:C,children:[e&&d&&o.jsx(Wr,{handleFieldSettingsSidebar:A,...t}),o.jsx("div",{className:`field ${e&&" py-3 px-4 builder-element-wrapper "}${(n==null?void 0:n.isFluid)===!0&&" p-fluid"}`,children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[((M=n==null?void 0:n.questionTextImage)==null?void 0:M[l==null?void 0:l.type])&&((Y=n==null?void 0:n.questionTextImage)==null?void 0:Y[l==null?void 0:l.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(u,{mediaId:(N=n==null?void 0:n.questionTextImage)==null?void 0:N[l==null?void 0:l.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h5",{children:(z=n==null?void 0:n.questionText)==null?void 0:z[l==null?void 0:l.type]}),_()]})})})]});return o.jsxs(o.Fragment,{children:[v===!0&&o.jsx(d0e,{visibilty:v,setVisibility:w,...t},n==null?void 0:n.uuid),o.jsx(xi,{...t,fieldWrap:P})]})},h0e=t=>{var i,a;const{onHandleChange:e,fieldState:n,language:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Title"}),o.jsx(wn,{value:(i=n.title)==null?void 0:i[r==null?void 0:r.type],onChange:s=>e("title",r,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Image Url"}),o.jsx(wn,{value:(a=n.media_url)==null?void 0:a[r==null?void 0:r.type],onChange:s=>e("media_url",r,s.target.value)})]})]})};class hF{constructor(){Kn(this,"formatBytes",(e,n=2)=>{if(e===0||e===void 0||e===null)return"0 Bytes";const r=1024,i=n<0?0:n,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(i))+" "+a[s]})}}function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w2(t)}function p0e(t,e){if(w2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(w2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function g0e(t){var e=p0e(t,"string");return w2(e)=="symbol"?e:e+""}function pF(t,e,n){return(e=g0e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m0e={root:function(e){var n=e.props;return ft("p-badge p-component",pF({"p-badge-no-gutter":ke.isNotEmpty(n.value)&&String(n.value).length===1,"p-badge-dot":ke.isEmpty(n.value),"p-badge-lg":n.size==="large","p-badge-xl":n.size==="xlarge"},"p-badge-".concat(n.severity),n.severity!==null))}},v0e=`
|
|
3534
3534
|
@layer primereact {
|
|
3535
3535
|
.p-badge {
|
|
3536
3536
|
display: inline-block;
|
|
@@ -3783,7 +3783,7 @@ ${hh(e)}`),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),
|
|
|
3783
3783
|
`.split("").map(t=>t.charCodeAt(0)));class Vge extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class qge extends wA{constructor(e,n={}){super(e,n),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Rs();const e=this.subtitlesTrack_.cues,n=e[0].startTime,r=e[e.length-1].startTime;return Rs([[n,r]])}initSegmentForMap(e,n=!1){if(!e)return null;const r=bv(e);let i=this.initSegments_[r];if(n&&!i&&e.bytes){const a=QL.byteLength+e.bytes.byteLength,s=new Uint8Array(a);s.set(e.bytes),s.set(QL,e.bytes.byteLength),this.initSegments_[r]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return i||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,n){ig(e,n,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const n=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",n),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,n,r){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(n.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Eu.TIMEOUT&&this.handleTimeout_(),e.code===Eu.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,n.stats),n.key&&this.segmentKey(n.key,!0),this.state="APPENDING",this.trigger("appending");const a=i.segment;if(a.map&&(a.map.bytes=n.map.bytes),i.bytes=n.bytes,typeof Re.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,n,r),()=>this.stopForError({message:"Error loading vtt.js"}));return}a.requested=!0;try{this.parseVTTCues_(i)}catch(s){this.stopForError({message:s.message,metadata:{errorType:_t.Error.StreamingVttParserError,error:s}});return}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,i.cues.forEach(s=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Re.VTTCue(s.startTime,s.endTime,s.text):s)}),Age(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let n,r=!1;if(typeof Re.WebVTT!="function")throw new Vge;typeof Re.TextDecoder=="function"?n=new Re.TextDecoder("utf8"):(n=Re.WebVTT.StringDecoder(),r=!0);const i=new Re.WebVTT.Parser(Re,Re.vttjs,n);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=s=>{e.timestampmap=s},i.onparsingerror=s=>{_t.log.warn("Error encountered when parsing cues: "+s.message)},e.segment.map){let s=e.segment.map.bytes;r&&(s=WL(s)),i.parse(s)}let a=e.bytes;r&&(a=WL(a)),i.parse(a),i.flush()}updateTimeMapping_(e,n,r){const i=e.segment;if(!n)return;if(!e.cues.length){i.empty=!0;return}const{MPEGTS:a,LOCAL:s}=e.timestampmap,c=a/u1.ONE_SECOND_IN_TS-s+n.mapping;if(e.cues.forEach(u=>{const d=u.endTime-u.startTime,f=a===0?u.startTime+c:this.handleRollover_(u.startTime+c,n.time);u.startTime=Math.max(f,0),u.endTime=Math.max(f+d,0)}),!r.syncInfo){const u=e.cues[0].startTime,d=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(u,d-i.duration)}}}handleRollover_(e,n){if(n===null)return e;let r=e*u1.ONE_SECOND_IN_TS;const i=n*u1.ONE_SECOND_IN_TS;let a;for(i<r?a=-8589934592:a=8589934592;Math.abs(r-i)>4294967296;)r+=a;return r/u1.ONE_SECOND_IN_TS}}const Uge=function(t,e){const n=t.cues;for(let r=0;r<n.length;r++){const i=n[r];if(e>=i.adStartTime&&e<=i.adEndTime)return i}return null},$ge=function(t,e,n=0){if(!t.segments)return;let r=n,i;for(let a=0;a<t.segments.length;a++){const s=t.segments[a];if(i||(i=Uge(e,r+s.duration/2)),i){if("cueIn"in s){i.endTime=r,i.adEndTime=r,r+=s.duration,i=null;continue}if(r<i.endTime){r+=s.duration;continue}i.endTime+=s.duration}else if("cueOut"in s&&(i=new Re.VTTCue(r,r+s.duration,s.cueOut),i.adStartTime=r,i.adEndTime=r+parseFloat(s.cueOut),e.addCue(i)),"cueOutCont"in s){const[l,c]=s.cueOutCont.split("/").map(parseFloat);i=new Re.VTTCue(r,r+s.duration,""),i.adStartTime=r-l,i.adEndTime=i.adStartTime+c,e.addCue(i)}r+=s.duration}};class JL{constructor({start:e,end:n,segmentIndex:r,partIndex:i=null,appended:a=!1}){this.start_=e,this.end_=n,this.segmentIndex_=r,this.partIndex_=i,this.appended_=a}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class jge{constructor(e,n=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=n}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class ZL{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,n){const{mediaSequence:r,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(r,i),!!this.isReliable_)return this.updateStorage_(i,r,this.calculateBaseTime_(r,n))}getSyncInfoForTime(e){for(const{segmentSyncInfo:n,partsSyncInfo:r}of this.storage_.values())if(r.length){for(const i of r)if(i.isInRange(e))return i}else if(n.isInRange(e))return n;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,n,r){const i=new Map;let a=`
|
|
3784
3784
|
`,s=r,l=n;this.start_=s,e.forEach((c,u)=>{const d=this.storage_.get(l),f=s,h=f+c.duration,p=!!(d&&d.segmentSyncInfo&&d.segmentSyncInfo.isAppended),v=new JL({start:f,end:h,appended:p,segmentIndex:u});c.syncInfo=v;let m=s;const A=(c.parts||[]).map((w,x)=>{const C=m,T=m+w.duration,S=!!(d&&d.partsSyncInfo&&d.partsSyncInfo[x]&&d.partsSyncInfo[x].isAppended),E=new JL({start:C,end:T,appended:S,segmentIndex:u,partIndex:x});return m=T,a+=`Media Sequence: ${l}.${x} | Range: ${C} --> ${T} | Appended: ${S}
|
|
3785
3785
|
`,w.syncInfo=E,E});i.set(l,new jge(v,A)),a+=`${$L(c.resolvedUri)} | Media Sequence: ${l} | Range: ${f} --> ${h} | Appended: ${p}
|
|
3786
|
-
`,l++,s=h}),this.end_=s,this.storage_=i,this.diagnostics_=a}calculateBaseTime_(e,n){return this.storage_.size?this.storage_.has(e)?this.storage_.get(e).segmentSyncInfo.start:n:0}isReliablePlaylist_(e,n){return e!=null&&Array.isArray(n)&&n.length}}class eB extends ZL{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,n){if(!this.storage_.size){const r=this.parent_.getSyncInfoForMediaSequence(e);return r?r.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,n)}}const zge=86400,CA=[{name:"VOD",run:(t,e,n,r,i)=>n!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(t,e,n,r,i,a)=>{const s=t.getMediaSequenceSync(a);if(!s||!s.isReliable)return null;const l=s.getSyncInfoForTime(i);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,e,n,r,i)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let a=null,s=null;const l=sA(e);i=i||0;for(let c=0;c<l.length;c++){const u=e.endList||i===0?c:l.length-(c+1),d=l[u],f=d.segment,h=t.timelineToDatetimeMappings[f.timeline];if(!h||!f.dateTimeObject)continue;let v=f.dateTimeObject.getTime()/1e3+h;if(f.parts&&typeof d.partIndex=="number")for(let A=0;A<d.partIndex;A++)v+=f.parts[A].duration;const m=Math.abs(i-v);if(s!==null&&(m===0||s<m))break;s=m,a={time:v,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}return a}},{name:"Segment",run:(t,e,n,r,i)=>{let a=null,s=null;i=i||0;const l=sA(e);for(let c=0;c<l.length;c++){const u=e.endList||i===0?c:l.length-(c+1),d=l[u],f=d.segment,h=d.part&&d.part.start||f&&f.start;if(f.timeline===r&&typeof h<"u"){const p=Math.abs(i-h);if(s!==null&&s<p)break;(!a||s===null||s>=p)&&(s=p,a={time:h,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return a}},{name:"Discontinuity",run:(t,e,n,r,i)=>{let a=null;if(i=i||0,e.discontinuityStarts&&e.discontinuityStarts.length){let s=null;for(let l=0;l<e.discontinuityStarts.length;l++){const c=e.discontinuityStarts[l],u=e.discontinuitySequence+l+1,d=t.discontinuities[u];if(d){const f=Math.abs(i-d.time);if(s!==null&&s<f)break;(!a||s===null||s>=f)&&(s=f,a={time:d.time,segmentIndex:c,partIndex:null})}}}return a}},{name:"Playlist",run:(t,e,n,r,i)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class Hge extends _t.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const n=new ZL,r=new eB(n),i=new eB(n);this.mediaSequenceStorage_={main:n,audio:r,vtt:i},this.logger_=Jl("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,n,r,i,a){if(n!==1/0)return CA.find(({name:c})=>c==="VOD").run(this,e,n);const s=this.runStrategies_(e,n,r,i,a);if(!s.length)return null;for(const l of s){const{syncPoint:c,strategy:u}=l,{segmentIndex:d,time:f}=c;if(d<0)continue;const h=e.segments[d],p=f,v=p+h.duration;if(this.logger_(`Strategy: ${u}. Current time: ${i}. selected segment: ${d}. Time: [${p} -> ${v}]}`),i>=p&&i<v)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(s,{key:"time",value:i})}getExpiredTime(e,n){if(!e||!e.segments)return null;const r=this.runStrategies_(e,n,e.discontinuitySequence,0);if(!r.length)return null;const i=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+eg({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(e,n,r,i,a){const s=[];for(let l=0;l<CA.length;l++){const c=CA[l],u=c.run(this,e,n,r,i,a);u&&(u.strategy=c.name,s.push({strategy:c.name,syncPoint:u}))}return s}selectSyncPoint_(e,n){let r=e[0].syncPoint,i=Math.abs(e[0].syncPoint[n.key]-n.value),a=e[0].strategy;for(let s=1;s<e.length;s++){const l=Math.abs(e[s].syncPoint[n.key]-n.value);l<i&&(i=l,r=e[s].syncPoint,a=e[s].strategy)}return this.logger_(`syncPoint for [${n.key}: ${n.value}] chosen with strategy [${a}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,n){const r=n.mediaSequence-e.mediaSequence;if(r>zge){_t.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let i=r-1;i>=0;i--){const a=e.segments[i];if(a&&typeof a.start<"u"){n.syncInfo={mediaSequence:e.mediaSequence+i,time:a.start},this.logger_(`playlist refresh sync: [time:${n.syncInfo.time}, mediaSequence: ${n.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const n=e.segments[0],r=n.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[n.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:n}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,n),i=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:i.start}));const a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,n,r){const i=e.segment,a=e.part;let s=this.timelines[e.timeline],l,c;if(typeof e.timestampOffset=="number")s={time:e.startOfSegment,mapping:e.startOfSegment-n.start},r&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${s.time}] [mapping: ${s.mapping}]`)),l=e.startOfSegment,c=n.end+s.mapping;else if(s)l=n.start+s.mapping,c=n.end+s.mapping;else return!1;return a&&(a.start=l,a.end=c),(!i.start||l<i.start)&&(i.start=l),i.end=c,!0}saveDiscontinuitySyncInfo_(e){const n=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(n.discontinuityStarts&&n.discontinuityStarts.length)for(let i=0;i<n.discontinuityStarts.length;i++){const a=n.discontinuityStarts[i],s=n.discontinuitySequence+i+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>c){let u;l<0?u=r.start-eg({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex,endIndex:a}):u=r.end+eg({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[s]={time:u,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class Yge extends _t.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:n,to:r}){return typeof n=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:n,to:r}){if(typeof n=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:n,to:r},delete this.pendingTimelineChanges_[e];const i={timelineChangeInfo:{from:n,to:r}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Kge=TL(EL(function(){var t=function(){function m(){this.listeners={}}var A=m.prototype;return A.on=function(x,C){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push(C)},A.off=function(x,C){if(!this.listeners[x])return!1;var T=this.listeners[x].indexOf(C);return this.listeners[x]=this.listeners[x].slice(0),this.listeners[x].splice(T,1),T>-1},A.trigger=function(x){var C=this.listeners[x];if(C)if(arguments.length===2)for(var T=C.length,S=0;S<T;++S)C[S].call(this,arguments[1]);else for(var E=Array.prototype.slice.call(arguments,1),_=C.length,P=0;P<_;++P)C[P].apply(this,E)},A.dispose=function(){this.listeners={}},A.pipe=function(x){this.on("data",function(C){x.push(C)})},m}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(m){return m.subarray(0,m.byteLength-m[m.byteLength-1])}/*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const n=function(){const m=[[[],[],[],[],[]],[[],[],[],[],[]]],A=m[0],w=m[1],x=A[4],C=w[4];let T,S,E;const _=[],P=[];let O,k,M,Y,N,z;for(T=0;T<256;T++)P[(_[T]=T<<1^(T>>7)*283)^T]=T;for(S=E=0;!x[S];S^=O||1,E=P[E]||1)for(Y=E^E<<1^E<<2^E<<3^E<<4,Y=Y>>8^Y&255^99,x[S]=Y,C[Y]=S,M=_[k=_[O=_[S]]],z=M*16843009^k*65537^O*257^S*16843008,N=_[Y]*257^Y*16843008,T=0;T<4;T++)A[T][S]=N=N<<24^N>>>8,w[T][Y]=z=z<<24^z>>>8;for(T=0;T<5;T++)A[T]=A[T].slice(0),w[T]=w[T].slice(0);return m};let r=null;class i{constructor(A){r||(r=n()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];let w,x,C;const T=this._tables[0][4],S=this._tables[1],E=A.length;let _=1;if(E!==4&&E!==6&&E!==8)throw new Error("Invalid aes key size");const P=A.slice(0),O=[];for(this._key=[P,O],w=E;w<4*E+28;w++)C=P[w-1],(w%E===0||E===8&&w%E===4)&&(C=T[C>>>24]<<24^T[C>>16&255]<<16^T[C>>8&255]<<8^T[C&255],w%E===0&&(C=C<<8^C>>>24^_<<24,_=_<<1^(_>>7)*283)),P[w]=P[w-E]^C;for(x=0;w;x++,w--)C=P[x&3?w:w-4],w<=4||x<4?O[x]=C:O[x]=S[0][T[C>>>24]]^S[1][T[C>>16&255]]^S[2][T[C>>8&255]]^S[3][T[C&255]]}decrypt(A,w,x,C,T,S){const E=this._key[1];let _=A^E[0],P=C^E[1],O=x^E[2],k=w^E[3],M,Y,N;const z=E.length/4-2;let $,le=4;const G=this._tables[1],R=G[0],ce=G[1],q=G[2],W=G[3],ee=G[4];for($=0;$<z;$++)M=R[_>>>24]^ce[P>>16&255]^q[O>>8&255]^W[k&255]^E[le],Y=R[P>>>24]^ce[O>>16&255]^q[k>>8&255]^W[_&255]^E[le+1],N=R[O>>>24]^ce[k>>16&255]^q[_>>8&255]^W[P&255]^E[le+2],k=R[k>>>24]^ce[_>>16&255]^q[P>>8&255]^W[O&255]^E[le+3],le+=4,_=M,P=Y,O=N;for($=0;$<4;$++)T[(3&-$)+S]=ee[_>>>24]<<24^ee[P>>16&255]<<16^ee[O>>8&255]<<8^ee[k&255]^E[le++],M=_,_=P,P=O,O=k,k=M}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(A){this.jobs.push(A),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(m){return m<<24|(m&65280)<<8|(m&16711680)>>8|m>>>24},l=function(m,A,w){const x=new Int32Array(m.buffer,m.byteOffset,m.byteLength>>2),C=new i(Array.prototype.slice.call(A)),T=new Uint8Array(m.byteLength),S=new Int32Array(T.buffer);let E,_,P,O,k,M,Y,N,z;for(E=w[0],_=w[1],P=w[2],O=w[3],z=0;z<x.length;z+=4)k=s(x[z]),M=s(x[z+1]),Y=s(x[z+2]),N=s(x[z+3]),C.decrypt(k,M,Y,N,S,z),S[z]=s(S[z]^E),S[z+1]=s(S[z+1]^_),S[z+2]=s(S[z+2]^P),S[z+3]=s(S[z+3]^O),E=k,_=M,P=Y,O=N;return T};class c{constructor(A,w,x,C){const T=c.STEP,S=new Int32Array(A.buffer),E=new Uint8Array(A.byteLength);let _=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(S.subarray(_,_+T),w,x,E)),_=T;_<S.length;_+=T)x=new Uint32Array([s(S[_-4]),s(S[_-3]),s(S[_-2]),s(S[_-1])]),this.asyncStream_.push(this.decryptChunk_(S.subarray(_,_+T),w,x,E));this.asyncStream_.push(function(){C(null,e(E))})}static get STEP(){return 32e3}decryptChunk_(A,w,x,C){return function(){const T=l(A,w,x);C.set(T,A.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d;typeof window<"u"?d=window:typeof u<"u"?d=u:typeof self<"u"?d=self:d={};var f=d,h=function(A){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(A):A&&A.buffer instanceof ArrayBuffer},p=f.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000"),function(){var m=new Uint16Array([65484]),A=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);return A[0]===255?"big":A[0]===204?"little":"unknown"}();const v=function(m){const A={};return Object.keys(m).forEach(w=>{const x=m[w];h(x)?A[w]={bytes:x.buffer,byteOffset:x.byteOffset,byteLength:x.byteLength}:A[w]=x}),A};self.onmessage=function(m){const A=m.data,w=new Uint8Array(A.encrypted.bytes,A.encrypted.byteOffset,A.encrypted.byteLength),x=new Uint32Array(A.key.bytes,A.key.byteOffset,A.key.byteLength/4),C=new Uint32Array(A.iv.bytes,A.iv.byteOffset,A.iv.byteLength/4);new c(w,x,C,function(T,S){self.postMessage(v({source:A.source,decrypted:S}),[S.buffer])})}}));var Xge=xL(Kge);const Rge=t=>{let e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},tB=(t,e)=>{t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},xA=(t,e)=>{e.activePlaylistLoader=t,t.load()},Gge=(t,e)=>()=>{const{segmentLoaders:{[t]:n,main:r},mediaTypes:{[t]:i}}=e,a=i.activeTrack(),s=i.getActiveGroup(),l=i.activePlaylistLoader,c=i.lastGroup_;if(!(s&&c&&s.id===c.id)&&(i.lastGroup_=s,i.lastTrack_=a,tB(n,i),!(!s||s.isMainPlaylist))){if(!s.playlistLoader){l&&r.resetEverything();return}n.resyncLoader(),xA(s.playlistLoader,i)}},Wge=(t,e)=>()=>{const{segmentLoaders:{[t]:n},mediaTypes:{[t]:r}}=e;r.lastGroup_=null,n.abort(),n.pause()},Qge=(t,e)=>()=>{const{mainPlaylistLoader:n,segmentLoaders:{[t]:r,main:i},mediaTypes:{[t]:a}}=e,s=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,u=a.lastTrack_;if(!(u&&s&&u.id===s.id)&&(a.lastGroup_=l,a.lastTrack_=s,tB(r,a),!!l)){if(l.isMainPlaylist){if(!s||!u||s.id===u.id)return;const d=e.vhs.playlistController_,f=d.selectPlaylist();if(d.media()===f)return;a.logger_(`track change. Switching main audio from ${u.id} to ${s.id}`),n.pause(),i.resetEverything(),d.fastQualityChange_(f);return}if(t==="AUDIO"){if(!l.playlistLoader){i.setAudio(!0),i.resetEverything();return}r.setAudio(!0),i.setAudio(!1)}if(c===l.playlistLoader){xA(l.playlistLoader,a);return}r.track&&r.track(s),r.resetEverything(),xA(l.playlistLoader,a)}},Cv={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:n},excludePlaylist:r}=e,i=n.activeTrack(),a=n.activeGroup(),s=(a.filter(c=>c.default)[0]||a[0]).id,l=n.tracks[s];if(i===l){r({error:{message:"Problem encountered loading the default audio track."}});return}_t.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in n.tracks)n.tracks[c].enabled=n.tracks[c]===l;n.onTrackChanged()},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:n}}=e;_t.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}},nB={AUDIO:(t,e,n)=>{if(!e)return;const{tech:r,requestOptions:i,segmentLoaders:{[t]:a}}=n;e.on("loadedmetadata",()=>{const s=e.media();a.playlist(s,i),(!r.paused()||s.endList&&r.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),i),r.paused()||a.load()}),e.on("error",Cv[t](t,n))},SUBTITLES:(t,e,n)=>{const{tech:r,requestOptions:i,segmentLoaders:{[t]:a},mediaTypes:{[t]:s}}=n;e.on("loadedmetadata",()=>{const l=e.media();a.playlist(l,i),a.track(s.activeTrack()),(!r.paused()||l.endList&&r.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),i),r.paused()||a.load()}),e.on("error",Cv[t](t,n))}},Jge={AUDIO:(t,e)=>{const{vhs:n,sourceType:r,segmentLoaders:{[t]:i},requestOptions:a,main:{mediaGroups:s},mediaTypes:{[t]:{groups:l,tracks:c,logger_:u}},mainPlaylistLoader:d}=e,f=tg(d.main);(!s[t]||Object.keys(s[t]).length===0)&&(s[t]={main:{default:{default:!0}}},f&&(s[t].main.default.playlists=d.main.playlists));for(const h in s[t]){l[h]||(l[h]=[]);for(const p in s[t][h]){let v=s[t][h][p],m;if(f?(u(`AUDIO group '${h}' label '${p}' is a main playlist`),v.isMainPlaylist=!0,m=null):r==="vhs-json"&&v.playlists?m=new dh(v.playlists[0],n,a):v.resolvedUri?m=new dh(v.resolvedUri,n,a):v.playlists&&r==="dash"?m=new gA(v.playlists[0],n,a,d):m=null,v=ea({id:p,playlistLoader:m},v),nB[t](t,v.playlistLoader,e),l[h].push(v),typeof c[p]>"u"){const A=new _t.AudioTrack({id:p,kind:Rge(v),enabled:!1,language:v.language,default:v.default,label:p});c[p]=A}}}i.on("error",Cv[t](t,e))},SUBTITLES:(t,e)=>{const{tech:n,vhs:r,sourceType:i,segmentLoaders:{[t]:a},requestOptions:s,main:{mediaGroups:l},mediaTypes:{[t]:{groups:c,tracks:u}},mainPlaylistLoader:d}=e;for(const f in l[t]){c[f]||(c[f]=[]);for(const h in l[t][f]){if(!r.options_.useForcedSubtitles&&l[t][f][h].forced)continue;let p=l[t][f][h],v;if(i==="hls")v=new dh(p.resolvedUri,r,s);else if(i==="dash"){if(!p.playlists.filter(A=>A.excludeUntil!==1/0).length)return;v=new gA(p.playlists[0],r,s,d)}else i==="vhs-json"&&(v=new dh(p.playlists?p.playlists[0]:p.resolvedUri,r,s));if(p=ea({id:h,playlistLoader:v},p),nB[t](t,p.playlistLoader,e),c[f].push(p),typeof u[h]>"u"){const m=n.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;u[h]=m}}}a.on("error",Cv[t](t,e))},"CLOSED-CAPTIONS":(t,e)=>{const{tech:n,main:{mediaGroups:r},mediaTypes:{[t]:{groups:i,tracks:a}}}=e;for(const s in r[t]){i[s]||(i[s]=[]);for(const l in r[t][s]){const c=r[t][s][l];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const u=n.options_.vhs&&n.options_.vhs.captionServices||{};let d={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(u[d.instreamId]&&(d=ea(d,u[d.instreamId])),d.default===void 0&&delete d.default,i[s].push(ea({id:l},c)),typeof a[l]>"u"){const f=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;a[l]=f}}}}},rB=(t,e)=>{for(let n=0;n<t.length;n++)if(cA(e,t[n])||t[n].playlists&&rB(t[n].playlists,e))return!0;return!1},Zge=(t,e)=>n=>{const{mainPlaylistLoader:r,mediaTypes:{[t]:{groups:i}}}=e,a=r.media();if(!a)return null;let s=null;a.attributes[t]&&(s=i[a.attributes[t]]);const l=Object.keys(i);if(!s)if(t==="AUDIO"&&l.length>1&&tg(e.main))for(let c=0;c<l.length;c++){const u=i[l[c]];if(rB(u,a)){s=u;break}}else i.main?s=i.main:l.length===1&&(s=i[l[0]]);return typeof n>"u"?s:n===null||!s?null:s.filter(c=>c.id===n.id)[0]||null},eme={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].enabled)return n[r];return null},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].mode==="showing"||n[r].mode==="hidden")return n[r];return null}},tme=(t,{mediaTypes:e})=>()=>{const n=e[t].activeTrack();return n?e[t].activeGroup(n):null},nme=t=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{Jge[u](u,t)});const{mediaTypes:e,mainPlaylistLoader:n,tech:r,vhs:i,segmentLoaders:{["AUDIO"]:a,main:s}}=t;["AUDIO","SUBTITLES"].forEach(u=>{e[u].activeGroup=Zge(u,t),e[u].activeTrack=eme[u](u,t),e[u].onGroupChanged=Gge(u,t),e[u].onGroupChanging=Wge(u,t),e[u].onTrackChanged=Qge(u,t),e[u].getActiveGroup=tme(u,t)});const l=e.AUDIO.activeGroup();if(l){const u=(l.filter(f=>f.default)[0]||l[0]).id;e.AUDIO.tracks[u].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),a.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanged())}),n.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),i.on("dispose",()=>{r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const u in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[u])},rme=()=>{const t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ad,activeTrack:Ad,getActiveGroup:Ad,onGroupChanged:Ad,onTrackChanged:Ad,lastTrack_:null,logger_:Jl(`MediaGroups[${e}]`)}}),t};class iB{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=il(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(n=>[n.ID,n])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class ime extends _t.EventTarget{constructor(e,n){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new iB,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Jl("Content Steering"),this.xhr_=e,this.getBandwidth_=n}assignTagProperties(e,n){this.manifestType_=n.serverUri?"HLS":"DASH";const r=n.serverUri||n.serverURL;if(!r){this.logger_(`steering manifest URL is ${r}, cannot request steering manifest.`),this.trigger("error");return}if(r.startsWith("data:")){this.decodeDataUriManifest_(r.substring(r.indexOf(",")+1));return}this.steeringManifest.reloadUri=il(e,r),this.defaultPathway=n.pathwayId||n.defaultServiceLocation,this.queryBeforeStart=n.queryBeforeStart,this.proxyServerUrl_=n.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const n=this.steeringManifest.reloadUri;if(!n)return;const r=e?n:this.getRequestURI(n);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(a,s)=>{if(a){if(s.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(s.status===429){const u=s.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let l;try{l=JSON.parse(this.request_.responseText)}catch(u){const d={errorType:_t.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:d})}this.assignSteeringProperties_(l);const c={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const n=new Re.URL(e),r=new Re.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(n.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const n=JSON.parse(Re.atob(e));this.assignSteeringProperties_(n)}setSteeringParams_(e){const n=new Re.URL(e),r=this.getPathway(),i=this.getBandwidth_();if(r){const a=`_${this.manifestType_}_pathway`;n.searchParams.set(a,r)}if(i){const a=`_${this.manifestType_}_throughput`;n.searchParams.set(a,i)}return n.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const r=(i=>{for(const a of i)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==r&&(this.currentPathway=r,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const n=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!n(i))return i}const r=this.setSteeringParams_(e);return n(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const n=e*1e3;this.ttlTimeout_=Re.setTimeout(()=>{this.requestSteeringManifest()},n)}clearTTLTimeout_(){Re.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new iB}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,n){return!n&&this.steeringManifest.reloadUri||n&&(il(e,n.serverURL)!==this.steeringManifest.reloadUri||n.defaultServiceLocation!==this.defaultPathway||n.queryBeforeStart!==this.queryBeforeStart||n.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const ame=10;let wd;const sme=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],ome=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},lme=function({currentPlaylist:t,buffered:e,currentTime:n,nextPlaylist:r,bufferLowWaterLine:i,bufferHighWaterLine:a,duration:s,bufferBasedABR:l,log:c}){if(!r)return _t.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${t&&t.id||"null"} -> ${r.id}`;if(!t)return c(`${u} as current playlist is not set`),!0;if(r.id===t.id)return!1;const d=!!lh(e,n).length;if(!t.endList)return!d&&typeof t.partTargetDuration=="number"?(c(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${u} as current playlist is live`),!0);const f=iA(e,n),h=l?Vs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Vs.MAX_BUFFER_LOW_WATER_LINE;if(s<h)return c(`${u} as duration < max low water line (${s} < ${h})`),!0;const p=r.attributes.BANDWIDTH,v=t.attributes.BANDWIDTH;if(p<v&&(!l||f<a)){let m=`${u} as next bandwidth < current bandwidth (${p} < ${v})`;return l&&(m+=` and forwardBuffer < bufferHighWaterLine (${f} < ${a})`),c(m),!0}if((!l||p>v)&&f>=i){let m=`${u} as forwardBuffer >= bufferLowWaterLine (${f} >= ${i})`;return l&&(m+=` and next bandwidth > current bandwidth (${p} > ${v})`),c(m),!0}return c(`not ${u} as no switching criteria met`),!1};class cme extends _t.EventTarget{constructor(e){super();const{src:n,withCredentials:r,tech:i,bandwidth:a,externVhs:s,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:u,sourceType:d,cacheEncryptionKeys:f,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:v}=e;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;(m===null||typeof m>"u")&&(m=1/0),wd=s,this.bufferBasedABR=!!h,this.leastPixelDiffSelector=!!p,this.withCredentials=r,this.tech_=i,this.vhs_=i.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=u,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=rme(),this.mediaSource=new Re.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Rs(),this.hasPlayed_=!1,this.syncController_=new Hge(e),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Xge,this.sourceUpdater_=new GL(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Yge,this.keyStatusMap_=new Map;const A={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:v,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:f,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new gA(n,this.vhs_,ea(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new dh(n,this.vhs_,ea(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new wA(ea(A,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new wA(ea(A,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new qge(ea(A,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((C,T)=>{function S(){i.off("vttjserror",E),C()}function E(){i.off("vttjsloaded",S),T()}i.one("vttjsloaded",S),i.one("vttjserror",E),i.addWebVttScript_()})}),e);const w=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new ime(this.vhs_.xhr,w),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),sme.forEach(C=>{this[C+"_"]=ome.bind(this,C)}),this.logger_=Jl("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const x=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(x,()=>{const C=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-C,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),n=this.audioAppendsToLoadedData_();return e===-1||n===-1?-1:e+n}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const n=this.selectPlaylist();n&&this.shouldSwitchToMedia_(n)&&this.switchMedia_(n,e)}switchMedia_(e,n,r){const i=this.media(),a=i&&(i.id||i.uri),s=e&&(e.id||e.uri);if(a&&a!==s){this.logger_(`switch media ${a} -> ${s} from ${n}`);const l={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:n};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${n}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const n=this.mediaTypes_[e],r=n?n.activeGroup():null,i=this.contentSteeringController_.getPathway();if(r&&i){const s=(r.length?r[0].playlists:r.playlists).filter(l=>l.attributes.serviceLocation===i);s.length&&this.mediaTypes_[e].activePlaylistLoader.media(s[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Re.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Re.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),n=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return n;const r=e.mediaGroups.AUDIO,i=Object.keys(r);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const l=r.main||i.length&&r[i[0]];for(const c in l)if(l[c].default){a={label:c};break}}if(!a)return n;const s=[];for(const l in r)if(r[l][a.label]){const c=r[l][a.label];if(c.playlists&&c.playlists.length)s.push.apply(s,c.playlists);else if(c.uri)s.push(c);else if(e.playlists.length)for(let u=0;u<e.playlists.length;u++){const d=e.playlists[u];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===l&&s.push(d)}}return s.length?s:n}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;lA(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,n.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.mainSegmentLoader_.load()),nme({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),n),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let n=this.mainPlaylistLoader_.media();if(!n){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let r;if(this.enableLowInitialPlaylist&&(r=this.selectInitialPlaylist()),r||(r=this.selectPlaylist()),!r||!this.shouldSwitchToMedia_(r)||(this.initialMedia_=r,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;n=this.initialMedia_}this.handleUpdatedMediaPlaylist(n)}),this.mainPlaylistLoader_.on("error",()=>{const n=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;lA(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const n=this.mainPlaylistLoader_.media();if(n.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(n)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(n=>{this.mainPlaylistLoader_.on(n,r=>{this.player_.trigger(Ma({},r))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,n){const r=e.mediaGroups||{};let i=!0;const a=Object.keys(r.AUDIO);for(const s in r.AUDIO)for(const l in r.AUDIO[s])r.AUDIO[s][l].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),wd.Playlist.isAes(n)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(r.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const n=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),i=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),s=this.tech_.buffered();return lme({buffered:s,currentTime:r,currentPlaylist:n,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const r=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:r.playlist,error:r})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.sourceType_==="dash"&&this.timelineChangeController_.on("audioTimelineBehind",()=>{const r=this.audioSegmentLoader_.pendingSegment_;if(!r||!r.segment||!r.segment.syncInfo)return;const i=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),this.mainSegmentLoader_.on("earlyabort",r=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:ame}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const r=this.getCodecsOrExclude_();r&&this.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(r=>{this.mainSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))}),this.audioSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))}),this.subtitleSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.mainSegmentLoader_.load()})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const n=this.seekable();if(!n.length)return!1;const r=n.end(0);let i=r;if(e.start){const a=e.start.timeOffset;a<0?i=Math.max(r+a,n.start(0)):i=Math.min(r,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,n=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const n=this.duration();e[e.length-1].endTime=isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const n=this.mainSegmentLoader_.getCurrentMediaInfo_();!n||n.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const r=this.syncController_.getExpiredTime(e,this.duration());if(r===null)return!1;const i=wd.Playlist.playlistEnd(e,r),a=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return i-a<=Tu;const l=s.end(s.length-1);return l-a<=Tu&&i-l<=Tu}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||n.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=n,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,a=i.filter(vv),s=a.length===1&&a[0]===e;if(i.length===1&&r!==1/0)return _t.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(s);if(s){if(this.main().contentSteering){const v=this.pathwayAttribute_(e),m=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(v),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(v)},m);return}let p=!1;i.forEach(v=>{if(v===e)return;const m=v.excludeUntil;typeof m<"u"&&m!==1/0&&(p=!0,delete v.excludeUntil)}),p&&(_t.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+r*1e3,e.excludeUntil=l,n.reason&&(e.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=n.internal?this.logger_:_t.log.warn,d=n.message?" "+n.message:"";u(`${n.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const f=c.targetDuration/2*1e3||5*1e3,h=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=f;return this.switchMedia_(c,"exclude",s||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,n){const r=[],i=e==="all";(i||e==="main")&&r.push(this.mainPlaylistLoader_);const a=[];(i||e==="audio")&&a.push("AUDIO"),(i||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(s=>{const l=this.mediaTypes_[s]&&this.mediaTypes_[s].activePlaylistLoader;l&&r.push(l)}),["main","audio","subtitle"].forEach(s=>{const l=this[`${s}SegmentLoader_`];l&&(e===s||e==="all")&&r.push(l)}),r.forEach(s=>n.forEach(l=>{typeof s[l]=="function"&&s[l]()}))}setCurrentTime(e){const n=lh(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(n&&n.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:wd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let n=this.mainPlaylistLoader_.media();if(!n)return;let r=this.syncController_.getExpiredTime(n,this.duration());if(r===null)return;const i=this.mainPlaylistLoader_.main,a=wd.Playlist.seekable(n,r,wd.Playlist.liveEdgeDelay(i,n));if(a.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),r=this.syncController_.getExpiredTime(n,this.duration()),r===null||(e=wd.Playlist.seekable(n,r,wd.Playlist.liveEdgeDelay(i,n)),e.length===0)))return;let s,l;if(this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),l=this.seekable_.start(0)),e?e.start(0)>a.end(0)||a.start(0)>e.end(0)?this.seekable_=a:this.seekable_=Rs([[e.start(0)>a.start(0)?e.start(0):a.start(0),e.end(0)<a.end(0)?e.end(0):a.end(0)]]):this.seekable_=a,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===l)return;this.logger_(`seekable updated [${GM(this.seekable_)}]`);const c={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:c}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const n=this.tech_.buffered();let r=wd.Playlist.duration(this.mainPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const n=this.mediaTypes_[e].groups;for(const r in n)n[r].forEach(i=>{i.playlistLoader&&i.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,n=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!n||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=rg(this.main(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=r.video||e.main.videoCodec||O1e),e.main.isMuxed&&(i.video+=`,${r.audio||e.main.audioCodec||UF}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(i.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||UF,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:n,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const s=(u,d)=>u?y4(d):Mb(d),l={};let c;if(["video","audio"].forEach(function(u){if(i.hasOwnProperty(u)&&!s(e[u].isFmp4,i[u])){const d=e[u].isFmp4?"browser":"muxer";l[d]=l[d]||[],l[d].push(i[u]),u==="audio"&&(c=d)}}),a&&c&&n.attributes.AUDIO){const u=n.attributes.AUDIO;this.main().playlists.forEach(d=>{(d.attributes&&d.attributes.AUDIO)===u&&d!==n&&(d.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${c} does not support codec(s): "${i.audio}"`)}if(Object.keys(l).length){const u=Object.keys(l).reduce((d,f)=>(d&&(d+=", "),d+=`${f} does not support codec(s): "${l[f].join(",")}"`,d),"")+".";this.excludePlaylist({playlistToExclude:n,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(d=>{const f=(gu(this.sourceUpdater_.codecs[d]||"")[0]||{}).type,h=(gu(i[d]||"")[0]||{}).type;f&&h&&f.toLowerCase()!==h.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[d]}" -> "${i[d]}"`)}),u.length){this.excludePlaylist({playlistToExclude:n,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const n=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(n)}excludeUnsupportedVariants_(){const e=this.main().playlists,n=[];Object.keys(e).forEach(r=>{const i=e[r];if(n.indexOf(i.id)!==-1)return;n.push(i.id);const a=rg(this.main,i),s=[];a.audio&&!Mb(a.audio)&&!y4(a.audio)&&s.push(`audio codec ${a.audio}`),a.video&&!Mb(a.video)&&!y4(a.video)&&s.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&s.push(`text codec ${a.text}`),s.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${s.join(", ")}`))})}excludeIncompatibleVariants_(e){const n=[],r=this.main().playlists,i=yv(gu(e)),a=BL(i),s=i.video&&gu(i.video)[0]||null,l=i.audio&&gu(i.audio)[0]||null;Object.keys(r).forEach(c=>{const u=r[c];if(n.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;n.push(u.id);const d=[],f=rg(this.mainPlaylistLoader_.main,u),h=BL(f);if(!(!f.audio&&!f.video)){if(h!==a&&d.push(`codec count "${h}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const p=f.video&&gu(f.video)[0]||null,v=f.audio&&gu(f.audio)[0]||null;p&&s&&p.type.toLowerCase()!==s.type.toLowerCase()&&d.push(`video codec "${p.type}" !== "${s.type}"`),v&&l&&v.type.toLowerCase()!==l.type.toLowerCase()&&d.push(`audio codec "${v.type}" !== "${l.type}"`)}d.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${d.join(" && ")}`))}})}updateAdCues_(e){let n=0;const r=this.seekable();r.length&&(n=r.start(0)),$ge(e,this.cueTagsTrack_,n)}goalBufferLength(){const e=this.tech_.currentTime(),n=Vs.GOAL_BUFFER_LENGTH,r=Vs.GOAL_BUFFER_LENGTH_RATE,i=Math.max(n,Vs.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+e*r,i)}bufferLowWaterLine(){const e=this.tech_.currentTime(),n=Vs.BUFFER_LOW_WATER_LINE,r=Vs.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(n,Vs.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(n,Vs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+e*r,this.bufferBasedABR?a:i)}bufferHighWaterLine(){return Vs.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){jL(this.inbandTextTracks_,"com.apple.streaming",this.tech_),yge({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,n,r){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();jL(this.inbandTextTracks_,e,this.tech_),mge({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:i,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const n of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(n));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(n=>{this.contentSteeringController_.on(n,r=>{this.trigger(Ma({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const n=this.main();(this.contentSteeringController_.didDASHTagChange(n.uri,n.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),s=[];for(const l of n.playlists){const c=l.attributes.serviceLocation;if(c&&(s.push(c),!a.has(c)))return!0}return!!(!s.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,i=new Set;let a=!1;Object.keys(r).forEach(s=>{const l=r[s],c=this.pathwayAttribute_(l),u=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!u&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const f=!l.excludeUntil&&l.excludeUntil!==1/0;!i.has(l.id)&&u&&f&&(i.add(l.id),l.excludeUntil=1/0,l.lastExcludeReason_="content-steering",this.logger_(`excluding ${l.id} for ${l.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(s=>{const l=this.mediaTypes_[s];if(l.activePlaylistLoader){const c=l.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const n=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||i&&i.size){for(const[s,l]of r.entries())i.get(s)||(this.mainPlaylistLoader_.updateOrDeleteClone(l),this.contentSteeringController_.excludePathway(s));for(const[s,l]of i.entries()){const c=r.get(s);if(!c){n.filter(d=>d.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(d=>{this.mainPlaylistLoader_.addClonePathway(l,d)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(c,l)||(this.mainPlaylistLoader_.updateOrDeleteClone(l,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,n){if(e["BASE-ID"]!==n["BASE-ID"]||e.ID!==n.ID||e["URI-REPLACEMENT"].HOST!==n["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,i=n["URI-REPLACEMENT"].PARAMS;for(const a in r)if(r[a]!==i[a])return!1;for(const a in i)if(r[a]!==i[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=this.mainPlaylistLoader_.getKeyIdSet(r);!i||!i.size||i.forEach(a=>{const s="usable",l=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===s,c=r.lastExcludeReason_===n&&r.excludeUntil===1/0;l?l&&c&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${a} is ${s}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==n&&(r.excludeUntil=1/0,r.lastExcludeReason_=n,this.logger_(`excluding playlist ${r.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${s}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,a=r.excludeUntil===1/0&&r.lastExcludeReason_===n;i&&a&&(delete r.excludeUntil,_t.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${n} key IDs`))})}addKeyStatus_(e,n){const a=(typeof e=="string"?e:Bge(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${n}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,n)}updatePlaylistByKeyStatus(e,n){this.addKeyStatus_(e,n),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const ume=(t,e,n)=>r=>{const i=t.main.playlists[e],a=oA(i),s=vv(i);if(typeof r>"u")return s;r?delete i.disabled:i.disabled=!0;const l={renditionInfo:{id:e,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return r!==s&&!a&&(n(i),r?t.trigger({type:"renditionenabled",metadata:l}):t.trigger({type:"renditiondisabled",metadata:l})),r};class dme{constructor(e,n,r){const{playlistController_:i}=e,a=i.fastQualityChange_.bind(i);if(n.attributes){const s=n.attributes.RESOLUTION;this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=n.attributes.BANDWIDTH,this.frameRate=n.attributes["FRAME-RATE"]}this.codecs=rg(i.main(),n),this.playlist=n,this.id=r,this.enabled=ume(e.playlists,n.id,a)}}const fme=function(t){t.representations=()=>{const e=t.playlistController_.main(),n=tg(e)?t.playlistController_.getAudioTrackPlaylists_():e.playlists;return n?n.filter(r=>!oA(r)).map((r,i)=>new dme(t,r,r.id)):[]}},aB=["seeking","seeked","pause","playing","error"];class hme extends _t.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Jl("PlaybackWatcher"),this.logger_("initialize");const n=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),s=this.playlistController_,l=["main","subtitle","audio"],c={};l.forEach(d=>{c[d]={reset:()=>this.resetSegmentDownloads_(d),updateend:()=>this.checkSegmentDownloads_(d)},s[`${d}SegmentLoader_`].on("appendsdone",c[d].updateend),s[`${d}SegmentLoader_`].on("playlistupdate",c[d].reset),this.tech_.on(["seeked","seeking"],c[d].reset)});const u=d=>{["main","audio"].forEach(f=>{s[`${f}SegmentLoader_`][d]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(aB,a),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(aB,a),this.tech_.off("canplay",r),this.tech_.off("play",n),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(d=>{s[`${d}SegmentLoader_`].off("appendsdone",c[d].updateend),s[`${d}SegmentLoader_`].off("playlistupdate",c[d].reset),this.tech_.off(["seeked","seeking"],c[d].reset)}),this.checkCurrentTimeTimeout_&&Re.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Re.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Re.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const n=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=n.buffered_()}checkSegmentDownloads_(e){const n=this.playlistController_,r=n[`${e}SegmentLoader_`],i=r.buffered_(),a=n2e(this[`${e}Buffered_`],i);if(this[`${e}Buffered_`]=i,a){const s={bufferedRanges:i};n.trigger({type:"bufferedrangeschanged",metadata:s}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:r.playlist_&&r.playlist_.id,buffered:v1(i)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&n.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),n=this.tech_.buffered();if(this.lastRecordedTime===e&&(!n.length||e+Tu>=n.end(n.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Rs([this.lastRecordedTime,e]));const r={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:r}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const n=this.seekable(),r=this.tech_.currentTime(),i=this.afterSeekableWindow_(n,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(i&&(a=n.end(n.length-1)),this.beforeSeekableWindow_(n,r)){const v=n.start(0);a=v+(v===n.end(0)?0:Tu)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${GM(n)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const s=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=s.audioBuffer?s.audioBuffered():null,u=s.videoBuffer?s.videoBuffered():null,d=this.media(),f=d.partTargetDuration?d.partTargetDuration:(d.targetDuration-xu)*2,h=[c,u];for(let v=0;v<h.length;v++){if(!h[v])continue;if(iA(h[v],r)<f)return!1}const p=mv(l,r);return p.length===0?!1:(a=p.start(0)+Tu,this.logger_(`Buffered region starts (${p.start(0)}) just beyond seek point (${r}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),n=this.tech_.buffered(),r=lh(n,e);if(r.length&&e+3<=r.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${r.start(0)} -> ${r.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),n=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,n)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${n}. Seeking to live point (seekable end) ${l}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(l),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:n}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=mv(i,n);return s.length>0?(this.logger_(`Stopped at ${n} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(n),!0):!1}afterSeekableWindow_(e,n,r,i=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Tu;const s=!r.endList,l=typeof r.partTargetDuration=="number";return s&&(l||i)&&(a=e.end(e.length-1)+r.targetDuration*3),n>a}beforeSeekableWindow_(e,n){return!!(e.length&&e.start(0)>0&&n<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:n,currentTime:r}){if(!e)return;let i;if(e.length&&n.length){const a=lh(e,r-3),s=lh(e,r),l=lh(n,r);l.length&&!s.length&&a.length&&(i={start:a.end(0),end:l.end(0)})}else mv(e,r).length||(i=this.gapFromVideoUnderflow_(e,r));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const n=this.tech_.buffered(),r=this.tech_.currentTime(),i=mv(n,r);if(this.resetTimeUpdate_(),i.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+xu);const a={gapInfo:{from:r,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,n){const r=Zpe(e);for(let i=0;i<r.length;i++){const a=r.start(i),s=r.end(i);if(n-a<4&&n-a>2)return{start:a,end:s}}return null}}const pme={errorInterval:30,getSource(t){const n=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return t(n)}},sB=function(t,e){let n=0,r=0;const i=ea(pme,e);t.ready(()=>{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){r&&t.currentTime(r)},s=function(d){d!=null&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(d),t.trigger({type:"usage",name:"vhs-error-reload"}),t.play())},l=function(){if(Date.now()-n<i.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){_t.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),i.getSource.call(t,s)},c=function(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",c)},u=function(d){c(),sB(t,d)};t.on("error",l),t.on("dispose",c),t.reloadSourceOnError=u},gme=function(t){sB(this,t)};var oB="3.13.3",mme="7.0.3",vme="1.3.0",bme="7.1.0",yme="4.0.1";const Ja={PlaylistLoader:dh,Playlist:al,utils:x2e,STANDARD_PLAYLIST_SELECTOR:UL,INITIAL_PLAYLIST_SELECTOR:dge,lastBandwidthSelector:UL,movingAverageBandwidthSelector:cge,comparePlaylistBandwidth:yA,comparePlaylistResolution:lge,xhr:gL()};Object.keys(Vs).forEach(t=>{Object.defineProperty(Ja,t,{get(){return _t.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),Vs[t]},set(e){if(_t.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){_t.log.warn(`value of Vhs.${t} must be greater than or equal to 0`);return}Vs[t]=e}})});const lB="videojs-vhs",cB=function(t,e){const n=e.media();let r=-1;for(let i=0;i<t.length;i++)if(t[i].id===n.id){r=i;break}t.selectedIndex_=r,t.trigger({selectedIndex:r,type:"change"})},Ame=function(t,e){e.representations().forEach(n=>{t.addQualityLevel(n)}),cB(t,e.playlists)};Ja.canPlaySource=function(){return _t.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const wme=(t,e,n)=>{if(!t)return t;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=yv(gu(e.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);const i=I2(r.video),a=I2(r.audio),s={};for(const l in t)s[l]={},a&&(s[l].audioContentType=a),i&&(s[l].videoContentType=i),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(s[l].pssh=e.contentProtection[l].pssh),typeof t[l]=="string"&&(s[l].url=t[l]);return ea(t,s)},Sme=(t,e)=>t.reduce((n,r)=>{if(!r.contentProtection)return n;const i=e.reduce((a,s)=>{const l=r.contentProtection[s];return l&&l.pssh&&(a[s]={pssh:l.pssh}),a},{});return Object.keys(i).length&&n.push(i),n},[]),Cme=({player:t,sourceKeySystems:e,audioMedia:n,mainPlaylists:r})=>{if(!t.eme.initializeMediaKeys)return Promise.resolve();const i=n?r.concat([n]):r,a=Sme(i,Object.keys(e)),s=[],l=[];return a.forEach(c=>{l.push(new Promise((u,d)=>{t.tech_.one("keysessioncreated",u)})),s.push(new Promise((u,d)=>{t.eme.initializeMediaKeys({keySystems:c},f=>{if(f){d(f);return}u()})}))}),Promise.race([Promise.all(s),Promise.race(l)])},xme=({player:t,sourceKeySystems:e,media:n,audioMedia:r})=>{const i=wme(e,n,r);return i?(t.currentSource().keySystems=i,i&&!t.eme?(_t.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},uB=()=>{if(!Re.localStorage)return null;const t=Re.localStorage.getItem(lB);if(!t)return null;try{return JSON.parse(t)}catch{return null}},Tme=t=>{if(!Re.localStorage)return!1;let e=uB();e=e?ea(e,t):t;try{Re.localStorage.setItem(lB,JSON.stringify(e))}catch{return!1}return e},Eme=t=>t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t,dB=(t,e)=>{t._requestCallbackSet||(t._requestCallbackSet=new Set),t._requestCallbackSet.add(e)},fB=(t,e)=>{t._responseCallbackSet||(t._responseCallbackSet=new Set),t._responseCallbackSet.add(e)},hB=(t,e)=>{t._requestCallbackSet&&(t._requestCallbackSet.delete(e),t._requestCallbackSet.size||delete t._requestCallbackSet)},pB=(t,e)=>{t._responseCallbackSet&&(t._responseCallbackSet.delete(e),t._responseCallbackSet.size||delete t._responseCallbackSet)};Ja.supportsNativeHls=function(){if(!xn||!xn.createElement)return!1;const t=xn.createElement("video");return _t.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(n){return/maybe|probably/i.test(t.canPlayType(n))}):!1}(),Ja.supportsNativeDash=function(){return!xn||!xn.createElement||!_t.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(xn.createElement("video").canPlayType("application/dash+xml"))}(),Ja.supportsTypeNatively=t=>t==="hls"?Ja.supportsNativeHls:t==="dash"?Ja.supportsNativeDash:!1,Ja.isSupported=function(){return _t.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Ja.xhr.onRequest=function(t){dB(Ja.xhr,t)},Ja.xhr.onResponse=function(t){fB(Ja.xhr,t)},Ja.xhr.offRequest=function(t){hB(Ja.xhr,t)},Ja.xhr.offResponse=function(t){pB(Ja.xhr,t)};const Ime=_t.getComponent("Component");class gB extends Ime{constructor(e,n,r){if(super(n,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=Jl("VhsHandler"),n.options_&&n.options_.playerId){const i=_t.getPlayer(n.options_.playerId);this.player_=i}if(this.tech_=n,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(xn,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const a=xn.fullscreenElement||xn.webkitFullscreenElement||xn.mozFullScreenElement||xn.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=ea(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const r=uB();r&&r.bandwidth&&(this.options_.bandwidth=r.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),r&&r.throughput&&(this.options_.throughput=r.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Vs.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Vs.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(r=>{typeof this.source_[r]<"u"&&(this.options_[r]=this.source_[r])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const n=this.options_.customPixelRatio;typeof n=="number"&&n>=0&&(this.customPixelRatio=n)}setOptions(e={}){this.setOptions_(e)}src(e,n){if(!e)return;this.setOptions_(),this.options_.src=Eme(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Ja,this.options_.sourceType=$F(n),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new cme(this.options_);const r=ea({liveRangeSafeTimeDelta:Tu},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new hme(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=_t.players[this.tech_.options_.playerId];let s=this.playlistController_.error;typeof s=="object"&&!s.code?s.code=3:typeof s=="string"&&(s={message:s,code:3}),a.error(s)});const i=this.options_.bufferBasedABR?Ja.movingAverageBandwidthSelector(.55):Ja.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=Ja.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const s=Re.navigator.connection||Re.navigator.mozConnection||Re.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&s){const c=s.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let s;return this.throughput>0?s=1/this.throughput:s=0,Math.floor(1/(a+s))},set(){_t.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>v1(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>v1(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Tme({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{fme(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Re.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Cme({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(n=>{this.logger_("error while creating EME key session",n),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=xme({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",r=>{this.playlistController_.updatePlaylistByKeyStatus(r.keyId,r.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!n){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=_t.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Ame(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{cB(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":oB,"mux.js":mme,"mpd-parser":vme,"m3u8-parser":bme,"aes-decrypter":yme}}version(){return this.constructor.version()}canChangeType(){return GL.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Re.URL.revokeObjectURL&&(Re.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,n){return O2e({playlist:this.playlistController_.media(),time:e,callback:n})}seekToProgramTime(e,n,r=!0,i=2){return AL({programTime:e,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:n})}setupXhrHooks_(){this.xhr.onRequest=e=>{dB(this.xhr,e)},this.xhr.onResponse=e=>{fB(this.xhr,e)},this.xhr.offRequest=e=>{hB(this.xhr,e)},this.xhr.offResponse=e=>{pB(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],n=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,i=>{this.player_.trigger(Ma({},i))})}),n.forEach(r=>{this.playbackWatcher_.on(r,i=>{this.player_.trigger(Ma({},i))})})}}const xv={name:"videojs-http-streaming",VERSION:oB,canHandleSource(t,e={}){const n=ea(_t.options,e);return xv.canPlayType(t.type,n)},handleSource(t,e,n={}){const r=ea(_t.options,n);return e.vhs=new gB(t,e,r),e.vhs.xhr=gL(),e.vhs.setupXhrHooks_(),e.vhs.src(t.src,t.type),e.vhs},canPlayType(t,e){const n=$F(t);if(!n)return"";const r=xv.getOverrideNative(e);return!Ja.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative(t={}){const{vhs:e={}}=t,n=!(_t.browser.IS_ANY_SAFARI||_t.browser.IS_IOS),{overrideNative:r=n}=e;return r}};y4("avc1.4d400d,mp4a.40.2")&&_t.getTech("Html5").registerSourceHandler(xv,0),_t.VhsHandler=gB,_t.VhsSourceHandler=xv,_t.Vhs=Ja,_t.use||_t.registerComponent("Vhs",Ja),_t.options.vhs=_t.options.vhs||{},(!_t.getPlugin||!_t.getPlugin("reloadSourceOnError"))&&_t.registerPlugin("reloadSourceOnError",gme);const mB=t=>{const{userTrainingSaveData:e,updateUserTraining:n}=Ar(),r=F.useRef(null),i=F.useRef(null),{options:a,onReady:s,currentItem:l}=t,[c,u]=F.useState(!1),d=p=>{if(e!==null){const v=e==null?void 0:e.findIndex(m=>(m==null?void 0:m.fieldId)===(l==null?void 0:l.uuid));if(v>=0){const m=p.target;e[v].seenTime=m.currentTime}}},f=p=>{const v=[...e],m=v==null?void 0:v.findIndex(A=>(A==null?void 0:A.fieldId)===(p==null?void 0:p.uuid));m>=0&&(v[m]={...e[m],isSeen:!0},n(v),h("Ended"))};F.useEffect(()=>{if(i.current){const p=i.current;p.autoplay(a.autoplay),p.src(a.sources)}else{const p=r.current;if(!p)return;const v=i.current=_t(p,a,()=>{_t.log("player is ready"),s&&s(v)})}},[a,r]);const h=p=>{const v=i.current,m=e!==null?e.findIndex(A=>(A==null?void 0:A.fieldId)===(l==null?void 0:l.uuid)):-1;m>=0&&e[m].logs.push({action:p,videoTime:e[m].seenTime,totalTime:v.duration(),timeState:new Date}),n(e)};return F.useEffect(()=>{if(!c&&e!==null){const p=e.findIndex(v=>(v==null?void 0:v.fieldId)===(l==null?void 0:l.uuid));p>=0&&(u(!0),i.current.currentTime(e[p].seenTime))}},[e]),F.useEffect(()=>{const p=i.current;return()=>{p&&(p.dispose(),i.current=null)}},[i]),o.jsx("div",{"data-vjs-player":!0,children:o.jsx("video",{onPause:()=>{h("Pause")},onPlay:()=>{h("Play")},onEnded:()=>{f(l)},onTimeUpdate:d,ref:r,className:"video-js vjs-big-play-centered"})})},_me=t=>{var C,T,S,E,_;const{field:e}=t,n=F.useRef(null),{userSelectedLanguage:r}=sn(),{isBuilderMode:i,media:a}=Ht(),s=(C=a==null?void 0:a.video)!=null&&C.MediaVideo?(T=a==null?void 0:a.video)==null?void 0:T.MediaVideo:()=>o.jsx(o.Fragment,{}),l=P=>{n.current=P,P.on("waiting",()=>{_t.log("player is waiting")}),P.on("dispose",()=>{_t.log("player will dispose")})},[c,u]=F.useState(!1),[d,f]=F.useState(!1),h=()=>{f(!0)},p=()=>{f(!1)},v=P=>{u(P)},m=()=>{u(!1)},A=F.useCallback(P=>o.jsx(mB,{options:{autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:P}]},currentItem:e,onReady:l,onUpdate:()=>{}}),[e==null?void 0:e.media_file_id]),w=F.useCallback(P=>o.jsx(s,{mediaId:P,alt:""}),[e==null?void 0:e.media_file_id]),x=o.jsxs("div",{onMouseOver:h,onMouseOut:p,children:[i&&d&&o.jsx(Wr,{handleFieldSettingsSidebar:v,...t}),o.jsx("div",{className:i?"field-form-builder py-4 px-2":"py-4 px-2",children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsxs("div",{className:"mt-3",children:[o.jsxs("label",{className:"flex font-bold mb-3 text-gray-900 text-xl",children:[" ",(S=e==null?void 0:e.title)==null?void 0:S[r==null?void 0:r.type]," -"," ",e==null?void 0:e.videoDuration]}),(e==null?void 0:e.isExternalSource)===!0&&o.jsx(o.Fragment,{children:(e==null?void 0:e.media_url)&&A((E=e==null?void 0:e.media_url)==null?void 0:E[r==null?void 0:r.type])}),(e==null?void 0:e.isExternalSource)===!1?(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:w(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:(e==null?void 0:e.media_url)&&A((_=e==null?void 0:e.media_url)==null?void 0:_[r==null?void 0:r.type])}):o.jsx(o.Fragment,{})]})})})})})]});return o.jsxs(o.Fragment,{children:[o.jsx(w0e,{visibilty:c,closeSettingFieldSidebar:m,...t}),o.jsx(xi,{...t,fieldWrap:x})]})},Dme=t=>{const{isBuilderMode:e}=Ht(),[n,r]=F.useState(!1),i=()=>{r(!0)},a=()=>{r(!1)},s=o.jsxs("div",{onMouseOver:i,onMouseOut:a,children:[e&&n&&o.jsx(Wr,{handleFieldSettingsSidebar:()=>{},...t}),o.jsx("div",{className:e?"field-form-builder":"",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsx(va,{}),o.jsx("div",{className:"hr-divider"})]})})})]});return o.jsx(o.Fragment,{children:o.jsx(xi,{...t,fieldWrap:s})})},Nme=t=>{var ce,q,W,ee,Q,H,X,pe,ge,Ae,ye;const{isAdmin:e,isBuilderMode:n}=Ht(),{field:r,fieldIndex:i,row:a}=t,{task_status:s,taskRegisterData:l,updateTaskRegisterData:c,updateTaskProgressValue:u,userTaskSubmitFormData:d,updateUserFormDataSubmit:f,TASK_PUBLISHED:h}=Ar(),{userSelectedLanguage:p}=sn(),[v,m]=F.useState(!1),[A,w]=F.useState(""),[x,C]=F.useState(0),[T,S]=F.useState(!1),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)},k=oe=>new Date(oe),M=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(r==null?void 0:r.uuid)});se>=0&&ne[se].fieldData?w(ne[se].fieldData):w("")}}else{const ne=d;if(ne!=null&&ne.length){for(const se of ne)if(se.fieldId===t.field.uuid&&((oe=se==null?void 0:se.postData[0])==null?void 0:oe.postValue)!==""&&((re=se==null?void 0:se.postData[0])!=null&&re.postValue)){w(k((B=se==null?void 0:se.postData[0])==null?void 0:B.postValue));break}}}S(!0)};F.useEffect(()=>{T||M();const oe=Gt.addListener("clearRepeatableFields",se=>{se===(a==null?void 0:a.uuid)&&(w(""),C(0),r.isValid=0)}),re=Gt.addListener("onSubmitUserForm",()=>{var se;(se=r==null?void 0:r.attributes)!=null&&se.required?A?r.isValid=1:r.isValid=0:r.isValid=1}),B=Gt.addListener("OnInvalidFieldCatch",se=>{r.uuid===(se==null?void 0:se.fieldId)?C(1):C(0)}),ne=Gt.addListener("OnGetFieldValue",se=>{var Ne;const me=(Ne=se==null?void 0:se.repeatableColumn)==null?void 0:Ne.filter(we=>(we==null?void 0:we.fieldUuid)===(r==null?void 0:r.uuid));me!=null&&me.length});return()=>{re.remove(),B.remove(),oe.remove(),ne.remove()}});const Y=oe=>{m(oe)},N=()=>{m(!1)},z=oe=>{var ne,se;w(oe.target.value);const re=d,B=It.cloneDeep(l);if(re!==null){if((ne=oe==null?void 0:oe.target)!=null&&ne.value){if(B[r==null?void 0:r.uuid]=(se=oe==null?void 0:oe.target)==null?void 0:se.value,(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:oe.target.value})}else if(delete B[r==null?void 0:r.uuid],(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){c(B);const me=Object.keys(B).length;u(me)}},$=(oe,re)=>{var B;if(w(re),(d==null?void 0:d.length)>0){const ne=[...d],se=It.findIndex(ne,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let me=(B=d[se])==null?void 0:B.repeatableFields;me={...me,[oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},f(ne),re!==""?oe.isValid=1:oe.isValid=0}},le=new Date(r==null?void 0:r.minDate),G=new Date(r==null?void 0:r.maxDate),R=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[n&&E&&o.jsx(Wr,{type:"",handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${n&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(ce=r==null?void 0:r.headerText)==null?void 0:ce[p==null?void 0:p.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{update:function(){throw new Error("Function not implemented.")},value:{fieldId:void 0,uuid:void 0},...t}),((q=r==null?void 0:r.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",n?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(W=r==null?void 0:r.label)==null?void 0:W[p==null?void 0:p.type]}),(r==null?void 0:r.showToolTip)&&o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(ee=r==null?void 0:r.toolTip)==null?void 0:ee[p==null?void 0:p.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(r==null?void 0:r.iconAlignment),children:[(r==null?void 0:r.showIcon)&&o.jsx("i",{className:"pi pi-"+((H=(Q=r==null?void 0:r.icon)==null?void 0:Q.properties)==null?void 0:H.name)}),o.jsx(nf,{readOnlyInput:!0,numberOfMonths:r==null?void 0:r.noOfMonths,selectionMode:(r==null?void 0:r.dateRange)||"single",view:(r==null?void 0:r.calenderView)||!1,showButtonBar:(r==null?void 0:r.isTodayBtn)||!1,showIcon:(r==null?void 0:r.isIcon)||!1,id:r==null?void 0:r.uuid,dateFormat:r==null?void 0:r.dateFormat,placeholder:(X=r==null?void 0:r.placeholder)==null?void 0:X[p==null?void 0:p.type],value:A,onFocus:()=>C(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?$(r,oe.target.value):z(oe)},minDate:le,maxDate:G,className:x===1&&((pe=r==null?void 0:r.attributes)!=null&&pe.required)?A?"valid":"invalid":"valid'",disabled:!!(e||s===h)})]}),o.jsx("div",{children:((ge=r==null?void 0:r.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:x===1&&!A?(Ae=r==null?void 0:r.validationMesssage)==null?void 0:Ae.english:""})}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[p==null?void 0:p.type]})})]})]})}),e&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[v===!0&&o.jsx(Zi,{visibilty:v,closeSettingFieldSidebar:N,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},Ome=t=>{var X,pe,ge,Ae,ye,oe,re,B;const e=F.useRef(null),{task_status:n,taskRegisterData:r,updateTaskRegisterData:i,updateTaskProgressValue:a,updateUserFormDataSubmit:s,userTaskSubmitFormData:l,onSetValuetoPostDataHook:c,TASK_PUBLISHED:u}=Ar(),{userSelectedLanguage:d,fieldSettingUpdate:f}=sn(),{field:h,fieldIndex:p,columnIndex:v,sectionIndex:m,rowIndex:A,pageIndex:w,row:x}=t,{isAdmin:C,isBuilderMode:T}=Ht(),[S,E]=F.useState(!1),[_,P]=F.useState(0),[O,k]=F.useState(!1),[M,Y]=F.useState(null),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=()=>{var se,me,Ne;(se=e==null?void 0:e.current)==null||se.clear(),h.isValid=0,f(w,m,A,v,p,h),Y(null);const ne=l;if(l!=null&&l.length){const we=It.cloneDeep(r);if(we[h==null?void 0:h.uuid]=(me=e.current)==null?void 0:me.toDataURL(),(ne==null?void 0:ne.length)>0){for(const ve of ne)if(ve.fieldId===t.field.uuid){ve.postData[0]={postValue:null},Y(null);break}}if(!(x!=null&&x.rowIsRepeatable)){i(we);const ve=(Ne=Object.keys(we))==null?void 0:Ne.length;a(ve)}}},R=()=>{var se,me,Ne;const ne=l;if((ne==null?void 0:ne.length)>0)for(const we of ne)we.fieldId===t.field.uuid&&((se=we==null?void 0:we.postData[0])!=null&&se.postValue&&((me=we==null?void 0:we.postData[0])==null?void 0:me.postValue)!==""&&(Y((Ne=we==null?void 0:we.postData[0])==null?void 0:Ne.postValue),k(!0)),h.isValid=1);k(!0)},ce=()=>{var ne,se,me,Ne;if(l!=null&&l.length){const we=[...l],ve=It.findIndex(we,function(Te){return Te.rowId===(x==null?void 0:x.uuid)});let ue=(ne=l[ve])==null?void 0:ne.repeatableFields;ue={...ue,[h==null?void 0:h.uuid]:`<img src="${(se=e.current)==null?void 0:se.toDataURL()}" >`},we[ve]={...we[ve],repeatableFields:ue},s(we)}Y(((me=e.current)==null?void 0:me.toDataURL())||""),((Ne=e.current)==null?void 0:Ne.toDataURL())!==""?h.isValid=1:h.isValid=0};F.useEffect(()=>{O||R();const ne=Gt.addListener("clearRepeatableFields",we=>{we===(x==null?void 0:x.uuid)&&(Y(null),G(),P(0),h.isValid=0,f(w,m,A,v,p,h))}),se=Gt.addListener("onSubmitUserForm",()=>{var we;(we=h==null?void 0:h.attributes)!=null&&we.required?(M!==null?h.isValid=1:h.isValid=0,f(w,m,A,v,p,h)):h.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",we=>{h.uuid===(we==null?void 0:we.fieldId)?P(1):P(0)}),Ne=Gt.addListener("OnSignatureSettingChange",()=>{G()});return()=>{se.remove(),me.remove(),Ne.remove(),ne.remove()}});const q=ne=>{E(ne)},W=()=>{E(!1)},ee=()=>{var se,me,Ne,we;const ne=l;if(l!=null&&l.length){const ve=It.cloneDeep(r);if(ve[h==null?void 0:h.uuid]=(se=e.current)==null?void 0:se.toDataURL(),(ne==null?void 0:ne.length)>0){for(const ue of ne)if(ue.fieldId===t.field.uuid){ue.postData[0]={postValue:(me=e.current)==null?void 0:me.toDataURL()},Y(((Ne=e.current)==null?void 0:Ne.toDataURL())||null);break}}if(!(x!=null&&x.rowIsRepeatable)){i(ve);const ue=(we=Object.keys(ve))==null?void 0:we.length;a(ue)}}},Q=()=>{var ne,se,me;return`rgba(${(ne=h==null?void 0:h.backgroundColor)==null?void 0:ne.r}, ${(se=h==null?void 0:h.backgroundColor)==null?void 0:se.g}, ${(me=h==null?void 0:h.backgroundColor)==null?void 0:me.b}, 0.8)`},H=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[T&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${T&&" py-3 px-4 builder-element-wrapper "}${(h==null?void 0:h.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:T?"col-11":"col-12",children:[(h==null?void 0:h.showHeaderText)&&o.jsx("h6",{children:(X=h==null?void 0:h.headerText)==null?void 0:X[d==null?void 0:d.type]}),(h==null?void 0:h.showLabel)&&o.jsxs("label",{htmlFor:h.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((pe=h==null?void 0:h.attributes)==null?void 0:pe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ge=h==null?void 0:h.label)==null?void 0:ge[d==null?void 0:d.type]}),o.jsx("span",{className:"ml-3",children:(h==null?void 0:h.showToolTip)&&o.jsx(Vi,{message:(Ae=h==null?void 0:h.toolTip)==null?void 0:Ae[d==null?void 0:d.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[n!==u&&M===null&&!C&&o.jsx(VT,{backgroundColor:Q(),penColor:`#${h==null?void 0:h.penColor}`,canvasProps:{width:`${h==null?void 0:h.canvasWidth}`,height:h==null?void 0:h.canvasHeight,className:"sigCanvas"},ref:e,onEnd:()=>{x!=null&&x.rowIsRepeatable?ce():ee()}},h==null?void 0:h.uuid),n===u&&M==null&&o.jsx("p",{children:"Not signed"}),n===u&&M!==null&&o.jsx("img",{alt:"",src:M,style:{width:350,height:200}}),n!==u&&M!==null&&o.jsx("img",{alt:"",src:M,style:{width:350,height:200}}),o.jsx("div",{children:((ye=h==null?void 0:h.attributes)==null?void 0:ye.required)&&o.jsx("small",{className:"error",children:_===1&&!M?(oe=h==null?void 0:h.validationMesssage)==null?void 0:oe.english:""})}),o.jsx("div",{className:"mt-3",children:(h==null?void 0:h.showHelperText)&&o.jsx("small",{children:(re=h==null?void 0:h.helperText)==null?void 0:re[d==null?void 0:d.type]})}),n===e3&&o.jsx(o.Fragment,{children:C===!1&&o.jsx(Ft,{text:!0,label:(B=h==null?void 0:h.clearSignatureButtonLabel)==null?void 0:B[d==null?void 0:d.type],onClick:()=>G(),className:"p-button-raised p-button-text mt-3"})})]})]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:W,...t}),o.jsx(xi,{...t,fieldWrap:H})]})};function A1(){return A1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},A1.apply(null,arguments)}function sg(t){"@babel/helpers - typeof";return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sg(t)}function Fme(t,e){if(sg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(sg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kme(t){var e=Fme(t,"string");return sg(e)=="symbol"?e:e+""}function TA(t,e,n){return(e=kme(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pme(t){if(Array.isArray(t))return t}function Mme(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function EA(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function vB(t,e){if(t){if(typeof t=="string")return EA(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?EA(t,e):void 0}}function Lme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3786
|
+
`,l++,s=h}),this.end_=s,this.storage_=i,this.diagnostics_=a}calculateBaseTime_(e,n){return this.storage_.size?this.storage_.has(e)?this.storage_.get(e).segmentSyncInfo.start:n:0}isReliablePlaylist_(e,n){return e!=null&&Array.isArray(n)&&n.length}}class eB extends ZL{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,n){if(!this.storage_.size){const r=this.parent_.getSyncInfoForMediaSequence(e);return r?r.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,n)}}const zge=86400,CA=[{name:"VOD",run:(t,e,n,r,i)=>n!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(t,e,n,r,i,a)=>{const s=t.getMediaSequenceSync(a);if(!s||!s.isReliable)return null;const l=s.getSyncInfoForTime(i);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,e,n,r,i)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let a=null,s=null;const l=sA(e);i=i||0;for(let c=0;c<l.length;c++){const u=e.endList||i===0?c:l.length-(c+1),d=l[u],f=d.segment,h=t.timelineToDatetimeMappings[f.timeline];if(!h||!f.dateTimeObject)continue;let v=f.dateTimeObject.getTime()/1e3+h;if(f.parts&&typeof d.partIndex=="number")for(let A=0;A<d.partIndex;A++)v+=f.parts[A].duration;const m=Math.abs(i-v);if(s!==null&&(m===0||s<m))break;s=m,a={time:v,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}return a}},{name:"Segment",run:(t,e,n,r,i)=>{let a=null,s=null;i=i||0;const l=sA(e);for(let c=0;c<l.length;c++){const u=e.endList||i===0?c:l.length-(c+1),d=l[u],f=d.segment,h=d.part&&d.part.start||f&&f.start;if(f.timeline===r&&typeof h<"u"){const p=Math.abs(i-h);if(s!==null&&s<p)break;(!a||s===null||s>=p)&&(s=p,a={time:h,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return a}},{name:"Discontinuity",run:(t,e,n,r,i)=>{let a=null;if(i=i||0,e.discontinuityStarts&&e.discontinuityStarts.length){let s=null;for(let l=0;l<e.discontinuityStarts.length;l++){const c=e.discontinuityStarts[l],u=e.discontinuitySequence+l+1,d=t.discontinuities[u];if(d){const f=Math.abs(i-d.time);if(s!==null&&s<f)break;(!a||s===null||s>=f)&&(s=f,a={time:d.time,segmentIndex:c,partIndex:null})}}}return a}},{name:"Playlist",run:(t,e,n,r,i)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class Hge extends _t.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const n=new ZL,r=new eB(n),i=new eB(n);this.mediaSequenceStorage_={main:n,audio:r,vtt:i},this.logger_=Jl("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,n,r,i,a){if(n!==1/0)return CA.find(({name:c})=>c==="VOD").run(this,e,n);const s=this.runStrategies_(e,n,r,i,a);if(!s.length)return null;for(const l of s){const{syncPoint:c,strategy:u}=l,{segmentIndex:d,time:f}=c;if(d<0)continue;const h=e.segments[d],p=f,v=p+h.duration;if(this.logger_(`Strategy: ${u}. Current time: ${i}. selected segment: ${d}. Time: [${p} -> ${v}]}`),i>=p&&i<v)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(s,{key:"time",value:i})}getExpiredTime(e,n){if(!e||!e.segments)return null;const r=this.runStrategies_(e,n,e.discontinuitySequence,0);if(!r.length)return null;const i=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+eg({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(e,n,r,i,a){const s=[];for(let l=0;l<CA.length;l++){const c=CA[l],u=c.run(this,e,n,r,i,a);u&&(u.strategy=c.name,s.push({strategy:c.name,syncPoint:u}))}return s}selectSyncPoint_(e,n){let r=e[0].syncPoint,i=Math.abs(e[0].syncPoint[n.key]-n.value),a=e[0].strategy;for(let s=1;s<e.length;s++){const l=Math.abs(e[s].syncPoint[n.key]-n.value);l<i&&(i=l,r=e[s].syncPoint,a=e[s].strategy)}return this.logger_(`syncPoint for [${n.key}: ${n.value}] chosen with strategy [${a}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,n){const r=n.mediaSequence-e.mediaSequence;if(r>zge){_t.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let i=r-1;i>=0;i--){const a=e.segments[i];if(a&&typeof a.start<"u"){n.syncInfo={mediaSequence:e.mediaSequence+i,time:a.start},this.logger_(`playlist refresh sync: [time:${n.syncInfo.time}, mediaSequence: ${n.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const n=e.segments[0],r=n.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[n.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:n}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,n),i=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:i.start}));const a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,n,r){const i=e.segment,a=e.part;let s=this.timelines[e.timeline],l,c;if(typeof e.timestampOffset=="number")s={time:e.startOfSegment,mapping:e.startOfSegment-n.start},r&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${s.time}] [mapping: ${s.mapping}]`)),l=e.startOfSegment,c=n.end+s.mapping;else if(s)l=n.start+s.mapping,c=n.end+s.mapping;else return!1;return a&&(a.start=l,a.end=c),(!i.start||l<i.start)&&(i.start=l),i.end=c,!0}saveDiscontinuitySyncInfo_(e){const n=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(n.discontinuityStarts&&n.discontinuityStarts.length)for(let i=0;i<n.discontinuityStarts.length;i++){const a=n.discontinuityStarts[i],s=n.discontinuitySequence+i+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>c){let u;l<0?u=r.start-eg({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex,endIndex:a}):u=r.end+eg({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[s]={time:u,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class Yge extends _t.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:n,to:r}){return typeof n=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:n,to:r}){if(typeof n=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:n,to:r},delete this.pendingTimelineChanges_[e];const i={timelineChangeInfo:{from:n,to:r}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Kge=TL(EL(function(){var t=function(){function m(){this.listeners={}}var A=m.prototype;return A.on=function(x,C){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push(C)},A.off=function(x,C){if(!this.listeners[x])return!1;var T=this.listeners[x].indexOf(C);return this.listeners[x]=this.listeners[x].slice(0),this.listeners[x].splice(T,1),T>-1},A.trigger=function(x){var C=this.listeners[x];if(C)if(arguments.length===2)for(var T=C.length,S=0;S<T;++S)C[S].call(this,arguments[1]);else for(var E=Array.prototype.slice.call(arguments,1),_=C.length,P=0;P<_;++P)C[P].apply(this,E)},A.dispose=function(){this.listeners={}},A.pipe=function(x){this.on("data",function(C){x.push(C)})},m}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(m){return m.subarray(0,m.byteLength-m[m.byteLength-1])}/*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const n=function(){const m=[[[],[],[],[],[]],[[],[],[],[],[]]],A=m[0],w=m[1],x=A[4],C=w[4];let T,S,E;const _=[],P=[];let O,k,M,Y,N,z;for(T=0;T<256;T++)P[(_[T]=T<<1^(T>>7)*283)^T]=T;for(S=E=0;!x[S];S^=O||1,E=P[E]||1)for(Y=E^E<<1^E<<2^E<<3^E<<4,Y=Y>>8^Y&255^99,x[S]=Y,C[Y]=S,M=_[k=_[O=_[S]]],z=M*16843009^k*65537^O*257^S*16843008,N=_[Y]*257^Y*16843008,T=0;T<4;T++)A[T][S]=N=N<<24^N>>>8,w[T][Y]=z=z<<24^z>>>8;for(T=0;T<5;T++)A[T]=A[T].slice(0),w[T]=w[T].slice(0);return m};let r=null;class i{constructor(A){r||(r=n()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];let w,x,C;const T=this._tables[0][4],S=this._tables[1],E=A.length;let _=1;if(E!==4&&E!==6&&E!==8)throw new Error("Invalid aes key size");const P=A.slice(0),O=[];for(this._key=[P,O],w=E;w<4*E+28;w++)C=P[w-1],(w%E===0||E===8&&w%E===4)&&(C=T[C>>>24]<<24^T[C>>16&255]<<16^T[C>>8&255]<<8^T[C&255],w%E===0&&(C=C<<8^C>>>24^_<<24,_=_<<1^(_>>7)*283)),P[w]=P[w-E]^C;for(x=0;w;x++,w--)C=P[x&3?w:w-4],w<=4||x<4?O[x]=C:O[x]=S[0][T[C>>>24]]^S[1][T[C>>16&255]]^S[2][T[C>>8&255]]^S[3][T[C&255]]}decrypt(A,w,x,C,T,S){const E=this._key[1];let _=A^E[0],P=C^E[1],O=x^E[2],k=w^E[3],M,Y,N;const z=E.length/4-2;let $,le=4;const G=this._tables[1],R=G[0],ce=G[1],q=G[2],W=G[3],ee=G[4];for($=0;$<z;$++)M=R[_>>>24]^ce[P>>16&255]^q[O>>8&255]^W[k&255]^E[le],Y=R[P>>>24]^ce[O>>16&255]^q[k>>8&255]^W[_&255]^E[le+1],N=R[O>>>24]^ce[k>>16&255]^q[_>>8&255]^W[P&255]^E[le+2],k=R[k>>>24]^ce[_>>16&255]^q[P>>8&255]^W[O&255]^E[le+3],le+=4,_=M,P=Y,O=N;for($=0;$<4;$++)T[(3&-$)+S]=ee[_>>>24]<<24^ee[P>>16&255]<<16^ee[O>>8&255]<<8^ee[k&255]^E[le++],M=_,_=P,P=O,O=k,k=M}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(A){this.jobs.push(A),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(m){return m<<24|(m&65280)<<8|(m&16711680)>>8|m>>>24},l=function(m,A,w){const x=new Int32Array(m.buffer,m.byteOffset,m.byteLength>>2),C=new i(Array.prototype.slice.call(A)),T=new Uint8Array(m.byteLength),S=new Int32Array(T.buffer);let E,_,P,O,k,M,Y,N,z;for(E=w[0],_=w[1],P=w[2],O=w[3],z=0;z<x.length;z+=4)k=s(x[z]),M=s(x[z+1]),Y=s(x[z+2]),N=s(x[z+3]),C.decrypt(k,M,Y,N,S,z),S[z]=s(S[z]^E),S[z+1]=s(S[z+1]^_),S[z+2]=s(S[z+2]^P),S[z+3]=s(S[z+3]^O),E=k,_=M,P=Y,O=N;return T};class c{constructor(A,w,x,C){const T=c.STEP,S=new Int32Array(A.buffer),E=new Uint8Array(A.byteLength);let _=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(S.subarray(_,_+T),w,x,E)),_=T;_<S.length;_+=T)x=new Uint32Array([s(S[_-4]),s(S[_-3]),s(S[_-2]),s(S[_-1])]),this.asyncStream_.push(this.decryptChunk_(S.subarray(_,_+T),w,x,E));this.asyncStream_.push(function(){C(null,e(E))})}static get STEP(){return 32e3}decryptChunk_(A,w,x,C){return function(){const T=l(A,w,x);C.set(T,A.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d;typeof window<"u"?d=window:typeof u<"u"?d=u:typeof self<"u"?d=self:d={};var f=d,h=function(A){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(A):A&&A.buffer instanceof ArrayBuffer},p=f.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000"),function(){var m=new Uint16Array([65484]),A=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);return A[0]===255?"big":A[0]===204?"little":"unknown"}();const v=function(m){const A={};return Object.keys(m).forEach(w=>{const x=m[w];h(x)?A[w]={bytes:x.buffer,byteOffset:x.byteOffset,byteLength:x.byteLength}:A[w]=x}),A};self.onmessage=function(m){const A=m.data,w=new Uint8Array(A.encrypted.bytes,A.encrypted.byteOffset,A.encrypted.byteLength),x=new Uint32Array(A.key.bytes,A.key.byteOffset,A.key.byteLength/4),C=new Uint32Array(A.iv.bytes,A.iv.byteOffset,A.iv.byteLength/4);new c(w,x,C,function(T,S){self.postMessage(v({source:A.source,decrypted:S}),[S.buffer])})}}));var Xge=xL(Kge);const Rge=t=>{let e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},tB=(t,e)=>{t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},xA=(t,e)=>{e.activePlaylistLoader=t,t.load()},Gge=(t,e)=>()=>{const{segmentLoaders:{[t]:n,main:r},mediaTypes:{[t]:i}}=e,a=i.activeTrack(),s=i.getActiveGroup(),l=i.activePlaylistLoader,c=i.lastGroup_;if(!(s&&c&&s.id===c.id)&&(i.lastGroup_=s,i.lastTrack_=a,tB(n,i),!(!s||s.isMainPlaylist))){if(!s.playlistLoader){l&&r.resetEverything();return}n.resyncLoader(),xA(s.playlistLoader,i)}},Wge=(t,e)=>()=>{const{segmentLoaders:{[t]:n},mediaTypes:{[t]:r}}=e;r.lastGroup_=null,n.abort(),n.pause()},Qge=(t,e)=>()=>{const{mainPlaylistLoader:n,segmentLoaders:{[t]:r,main:i},mediaTypes:{[t]:a}}=e,s=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,u=a.lastTrack_;if(!(u&&s&&u.id===s.id)&&(a.lastGroup_=l,a.lastTrack_=s,tB(r,a),!!l)){if(l.isMainPlaylist){if(!s||!u||s.id===u.id)return;const d=e.vhs.playlistController_,f=d.selectPlaylist();if(d.media()===f)return;a.logger_(`track change. Switching main audio from ${u.id} to ${s.id}`),n.pause(),i.resetEverything(),d.fastQualityChange_(f);return}if(t==="AUDIO"){if(!l.playlistLoader){i.setAudio(!0),i.resetEverything();return}r.setAudio(!0),i.setAudio(!1)}if(c===l.playlistLoader){xA(l.playlistLoader,a);return}r.track&&r.track(s),r.resetEverything(),xA(l.playlistLoader,a)}},Cv={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:n},excludePlaylist:r}=e,i=n.activeTrack(),a=n.activeGroup(),s=(a.filter(c=>c.default)[0]||a[0]).id,l=n.tracks[s];if(i===l){r({error:{message:"Problem encountered loading the default audio track."}});return}_t.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in n.tracks)n.tracks[c].enabled=n.tracks[c]===l;n.onTrackChanged()},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:n}}=e;_t.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}},nB={AUDIO:(t,e,n)=>{if(!e)return;const{tech:r,requestOptions:i,segmentLoaders:{[t]:a}}=n;e.on("loadedmetadata",()=>{const s=e.media();a.playlist(s,i),(!r.paused()||s.endList&&r.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),i),r.paused()||a.load()}),e.on("error",Cv[t](t,n))},SUBTITLES:(t,e,n)=>{const{tech:r,requestOptions:i,segmentLoaders:{[t]:a},mediaTypes:{[t]:s}}=n;e.on("loadedmetadata",()=>{const l=e.media();a.playlist(l,i),a.track(s.activeTrack()),(!r.paused()||l.endList&&r.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),i),r.paused()||a.load()}),e.on("error",Cv[t](t,n))}},Jge={AUDIO:(t,e)=>{const{vhs:n,sourceType:r,segmentLoaders:{[t]:i},requestOptions:a,main:{mediaGroups:s},mediaTypes:{[t]:{groups:l,tracks:c,logger_:u}},mainPlaylistLoader:d}=e,f=tg(d.main);(!s[t]||Object.keys(s[t]).length===0)&&(s[t]={main:{default:{default:!0}}},f&&(s[t].main.default.playlists=d.main.playlists));for(const h in s[t]){l[h]||(l[h]=[]);for(const p in s[t][h]){let v=s[t][h][p],m;if(f?(u(`AUDIO group '${h}' label '${p}' is a main playlist`),v.isMainPlaylist=!0,m=null):r==="vhs-json"&&v.playlists?m=new dh(v.playlists[0],n,a):v.resolvedUri?m=new dh(v.resolvedUri,n,a):v.playlists&&r==="dash"?m=new gA(v.playlists[0],n,a,d):m=null,v=ea({id:p,playlistLoader:m},v),nB[t](t,v.playlistLoader,e),l[h].push(v),typeof c[p]>"u"){const A=new _t.AudioTrack({id:p,kind:Rge(v),enabled:!1,language:v.language,default:v.default,label:p});c[p]=A}}}i.on("error",Cv[t](t,e))},SUBTITLES:(t,e)=>{const{tech:n,vhs:r,sourceType:i,segmentLoaders:{[t]:a},requestOptions:s,main:{mediaGroups:l},mediaTypes:{[t]:{groups:c,tracks:u}},mainPlaylistLoader:d}=e;for(const f in l[t]){c[f]||(c[f]=[]);for(const h in l[t][f]){if(!r.options_.useForcedSubtitles&&l[t][f][h].forced)continue;let p=l[t][f][h],v;if(i==="hls")v=new dh(p.resolvedUri,r,s);else if(i==="dash"){if(!p.playlists.filter(A=>A.excludeUntil!==1/0).length)return;v=new gA(p.playlists[0],r,s,d)}else i==="vhs-json"&&(v=new dh(p.playlists?p.playlists[0]:p.resolvedUri,r,s));if(p=ea({id:h,playlistLoader:v},p),nB[t](t,p.playlistLoader,e),c[f].push(p),typeof u[h]>"u"){const m=n.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;u[h]=m}}}a.on("error",Cv[t](t,e))},"CLOSED-CAPTIONS":(t,e)=>{const{tech:n,main:{mediaGroups:r},mediaTypes:{[t]:{groups:i,tracks:a}}}=e;for(const s in r[t]){i[s]||(i[s]=[]);for(const l in r[t][s]){const c=r[t][s][l];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const u=n.options_.vhs&&n.options_.vhs.captionServices||{};let d={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(u[d.instreamId]&&(d=ea(d,u[d.instreamId])),d.default===void 0&&delete d.default,i[s].push(ea({id:l},c)),typeof a[l]>"u"){const f=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;a[l]=f}}}}},rB=(t,e)=>{for(let n=0;n<t.length;n++)if(cA(e,t[n])||t[n].playlists&&rB(t[n].playlists,e))return!0;return!1},Zge=(t,e)=>n=>{const{mainPlaylistLoader:r,mediaTypes:{[t]:{groups:i}}}=e,a=r.media();if(!a)return null;let s=null;a.attributes[t]&&(s=i[a.attributes[t]]);const l=Object.keys(i);if(!s)if(t==="AUDIO"&&l.length>1&&tg(e.main))for(let c=0;c<l.length;c++){const u=i[l[c]];if(rB(u,a)){s=u;break}}else i.main?s=i.main:l.length===1&&(s=i[l[0]]);return typeof n>"u"?s:n===null||!s?null:s.filter(c=>c.id===n.id)[0]||null},eme={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].enabled)return n[r];return null},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].mode==="showing"||n[r].mode==="hidden")return n[r];return null}},tme=(t,{mediaTypes:e})=>()=>{const n=e[t].activeTrack();return n?e[t].activeGroup(n):null},nme=t=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{Jge[u](u,t)});const{mediaTypes:e,mainPlaylistLoader:n,tech:r,vhs:i,segmentLoaders:{["AUDIO"]:a,main:s}}=t;["AUDIO","SUBTITLES"].forEach(u=>{e[u].activeGroup=Zge(u,t),e[u].activeTrack=eme[u](u,t),e[u].onGroupChanged=Gge(u,t),e[u].onGroupChanging=Wge(u,t),e[u].onTrackChanged=Qge(u,t),e[u].getActiveGroup=tme(u,t)});const l=e.AUDIO.activeGroup();if(l){const u=(l.filter(f=>f.default)[0]||l[0]).id;e.AUDIO.tracks[u].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),a.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanged())}),n.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),i.on("dispose",()=>{r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const u in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[u])},rme=()=>{const t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ad,activeTrack:Ad,getActiveGroup:Ad,onGroupChanged:Ad,onTrackChanged:Ad,lastTrack_:null,logger_:Jl(`MediaGroups[${e}]`)}}),t};class iB{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=il(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(n=>[n.ID,n])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class ime extends _t.EventTarget{constructor(e,n){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new iB,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Jl("Content Steering"),this.xhr_=e,this.getBandwidth_=n}assignTagProperties(e,n){this.manifestType_=n.serverUri?"HLS":"DASH";const r=n.serverUri||n.serverURL;if(!r){this.logger_(`steering manifest URL is ${r}, cannot request steering manifest.`),this.trigger("error");return}if(r.startsWith("data:")){this.decodeDataUriManifest_(r.substring(r.indexOf(",")+1));return}this.steeringManifest.reloadUri=il(e,r),this.defaultPathway=n.pathwayId||n.defaultServiceLocation,this.queryBeforeStart=n.queryBeforeStart,this.proxyServerUrl_=n.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const n=this.steeringManifest.reloadUri;if(!n)return;const r=e?n:this.getRequestURI(n);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(a,s)=>{if(a){if(s.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(s.status===429){const u=s.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let l;try{l=JSON.parse(this.request_.responseText)}catch(u){const d={errorType:_t.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:d})}this.assignSteeringProperties_(l);const c={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const n=new Re.URL(e),r=new Re.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(n.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const n=JSON.parse(Re.atob(e));this.assignSteeringProperties_(n)}setSteeringParams_(e){const n=new Re.URL(e),r=this.getPathway(),i=this.getBandwidth_();if(r){const a=`_${this.manifestType_}_pathway`;n.searchParams.set(a,r)}if(i){const a=`_${this.manifestType_}_throughput`;n.searchParams.set(a,i)}return n.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const r=(i=>{for(const a of i)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==r&&(this.currentPathway=r,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const n=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!n(i))return i}const r=this.setSteeringParams_(e);return n(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const n=e*1e3;this.ttlTimeout_=Re.setTimeout(()=>{this.requestSteeringManifest()},n)}clearTTLTimeout_(){Re.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new iB}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,n){return!n&&this.steeringManifest.reloadUri||n&&(il(e,n.serverURL)!==this.steeringManifest.reloadUri||n.defaultServiceLocation!==this.defaultPathway||n.queryBeforeStart!==this.queryBeforeStart||n.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const ame=10;let wd;const sme=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],ome=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},lme=function({currentPlaylist:t,buffered:e,currentTime:n,nextPlaylist:r,bufferLowWaterLine:i,bufferHighWaterLine:a,duration:s,bufferBasedABR:l,log:c}){if(!r)return _t.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${t&&t.id||"null"} -> ${r.id}`;if(!t)return c(`${u} as current playlist is not set`),!0;if(r.id===t.id)return!1;const d=!!lh(e,n).length;if(!t.endList)return!d&&typeof t.partTargetDuration=="number"?(c(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${u} as current playlist is live`),!0);const f=iA(e,n),h=l?Vs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Vs.MAX_BUFFER_LOW_WATER_LINE;if(s<h)return c(`${u} as duration < max low water line (${s} < ${h})`),!0;const p=r.attributes.BANDWIDTH,v=t.attributes.BANDWIDTH;if(p<v&&(!l||f<a)){let m=`${u} as next bandwidth < current bandwidth (${p} < ${v})`;return l&&(m+=` and forwardBuffer < bufferHighWaterLine (${f} < ${a})`),c(m),!0}if((!l||p>v)&&f>=i){let m=`${u} as forwardBuffer >= bufferLowWaterLine (${f} >= ${i})`;return l&&(m+=` and next bandwidth > current bandwidth (${p} > ${v})`),c(m),!0}return c(`not ${u} as no switching criteria met`),!1};class cme extends _t.EventTarget{constructor(e){super();const{src:n,withCredentials:r,tech:i,bandwidth:a,externVhs:s,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:u,sourceType:d,cacheEncryptionKeys:f,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:v}=e;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;(m===null||typeof m>"u")&&(m=1/0),wd=s,this.bufferBasedABR=!!h,this.leastPixelDiffSelector=!!p,this.withCredentials=r,this.tech_=i,this.vhs_=i.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=u,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=rme(),this.mediaSource=new Re.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Rs(),this.hasPlayed_=!1,this.syncController_=new Hge(e),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Xge,this.sourceUpdater_=new GL(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Yge,this.keyStatusMap_=new Map;const A={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:v,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:f,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new gA(n,this.vhs_,ea(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new dh(n,this.vhs_,ea(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new wA(ea(A,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new wA(ea(A,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new qge(ea(A,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((C,T)=>{function S(){i.off("vttjserror",E),C()}function E(){i.off("vttjsloaded",S),T()}i.one("vttjsloaded",S),i.one("vttjserror",E),i.addWebVttScript_()})}),e);const w=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new ime(this.vhs_.xhr,w),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),sme.forEach(C=>{this[C+"_"]=ome.bind(this,C)}),this.logger_=Jl("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const x=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(x,()=>{const C=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-C,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),n=this.audioAppendsToLoadedData_();return e===-1||n===-1?-1:e+n}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const n=this.selectPlaylist();n&&this.shouldSwitchToMedia_(n)&&this.switchMedia_(n,e)}switchMedia_(e,n,r){const i=this.media(),a=i&&(i.id||i.uri),s=e&&(e.id||e.uri);if(a&&a!==s){this.logger_(`switch media ${a} -> ${s} from ${n}`);const l={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:n};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${n}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const n=this.mediaTypes_[e],r=n?n.activeGroup():null,i=this.contentSteeringController_.getPathway();if(r&&i){const s=(r.length?r[0].playlists:r.playlists).filter(l=>l.attributes.serviceLocation===i);s.length&&this.mediaTypes_[e].activePlaylistLoader.media(s[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Re.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Re.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),n=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return n;const r=e.mediaGroups.AUDIO,i=Object.keys(r);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const l=r.main||i.length&&r[i[0]];for(const c in l)if(l[c].default){a={label:c};break}}if(!a)return n;const s=[];for(const l in r)if(r[l][a.label]){const c=r[l][a.label];if(c.playlists&&c.playlists.length)s.push.apply(s,c.playlists);else if(c.uri)s.push(c);else if(e.playlists.length)for(let u=0;u<e.playlists.length;u++){const d=e.playlists[u];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===l&&s.push(d)}}return s.length?s:n}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;lA(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,n.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.mainSegmentLoader_.load()),nme({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),n),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let n=this.mainPlaylistLoader_.media();if(!n){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let r;if(this.enableLowInitialPlaylist&&(r=this.selectInitialPlaylist()),r||(r=this.selectPlaylist()),!r||!this.shouldSwitchToMedia_(r)||(this.initialMedia_=r,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;n=this.initialMedia_}this.handleUpdatedMediaPlaylist(n)}),this.mainPlaylistLoader_.on("error",()=>{const n=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;lA(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const n=this.mainPlaylistLoader_.media();if(n.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(n)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(n=>{this.mainPlaylistLoader_.on(n,r=>{this.player_.trigger(Ma({},r))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,n){const r=e.mediaGroups||{};let i=!0;const a=Object.keys(r.AUDIO);for(const s in r.AUDIO)for(const l in r.AUDIO[s])r.AUDIO[s][l].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),wd.Playlist.isAes(n)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(r.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const n=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),i=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),s=this.tech_.buffered();return lme({buffered:s,currentTime:r,currentPlaylist:n,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const r=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:r.playlist,error:r})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.sourceType_==="dash"&&this.timelineChangeController_.on("audioTimelineBehind",()=>{const r=this.audioSegmentLoader_.pendingSegment_;if(!r||!r.segment||!r.segment.syncInfo)return;const i=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),this.mainSegmentLoader_.on("earlyabort",r=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:ame}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const r=this.getCodecsOrExclude_();r&&this.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(r=>{this.mainSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))}),this.audioSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))}),this.subtitleSegmentLoader_.on(r,i=>{this.player_.trigger(Ma({},i))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.mainSegmentLoader_.load()})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const n=this.seekable();if(!n.length)return!1;const r=n.end(0);let i=r;if(e.start){const a=e.start.timeOffset;a<0?i=Math.max(r+a,n.start(0)):i=Math.min(r,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,n=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const n=this.duration();e[e.length-1].endTime=isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const n=this.mainSegmentLoader_.getCurrentMediaInfo_();!n||n.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const r=this.syncController_.getExpiredTime(e,this.duration());if(r===null)return!1;const i=wd.Playlist.playlistEnd(e,r),a=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return i-a<=Tu;const l=s.end(s.length-1);return l-a<=Tu&&i-l<=Tu}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||n.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=n,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,a=i.filter(vv),s=a.length===1&&a[0]===e;if(i.length===1&&r!==1/0)return _t.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(s);if(s){if(this.main().contentSteering){const v=this.pathwayAttribute_(e),m=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(v),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(v)},m);return}let p=!1;i.forEach(v=>{if(v===e)return;const m=v.excludeUntil;typeof m<"u"&&m!==1/0&&(p=!0,delete v.excludeUntil)}),p&&(_t.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+r*1e3,e.excludeUntil=l,n.reason&&(e.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=n.internal?this.logger_:_t.log.warn,d=n.message?" "+n.message:"";u(`${n.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const f=c.targetDuration/2*1e3||5*1e3,h=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=f;return this.switchMedia_(c,"exclude",s||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,n){const r=[],i=e==="all";(i||e==="main")&&r.push(this.mainPlaylistLoader_);const a=[];(i||e==="audio")&&a.push("AUDIO"),(i||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(s=>{const l=this.mediaTypes_[s]&&this.mediaTypes_[s].activePlaylistLoader;l&&r.push(l)}),["main","audio","subtitle"].forEach(s=>{const l=this[`${s}SegmentLoader_`];l&&(e===s||e==="all")&&r.push(l)}),r.forEach(s=>n.forEach(l=>{typeof s[l]=="function"&&s[l]()}))}setCurrentTime(e){const n=lh(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(n&&n.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:wd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let n=this.mainPlaylistLoader_.media();if(!n)return;let r=this.syncController_.getExpiredTime(n,this.duration());if(r===null)return;const i=this.mainPlaylistLoader_.main,a=wd.Playlist.seekable(n,r,wd.Playlist.liveEdgeDelay(i,n));if(a.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),r=this.syncController_.getExpiredTime(n,this.duration()),r===null||(e=wd.Playlist.seekable(n,r,wd.Playlist.liveEdgeDelay(i,n)),e.length===0)))return;let s,l;if(this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),l=this.seekable_.start(0)),e?e.start(0)>a.end(0)||a.start(0)>e.end(0)?this.seekable_=a:this.seekable_=Rs([[e.start(0)>a.start(0)?e.start(0):a.start(0),e.end(0)<a.end(0)?e.end(0):a.end(0)]]):this.seekable_=a,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===l)return;this.logger_(`seekable updated [${GM(this.seekable_)}]`);const c={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:c}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const n=this.tech_.buffered();let r=wd.Playlist.duration(this.mainPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const n=this.mediaTypes_[e].groups;for(const r in n)n[r].forEach(i=>{i.playlistLoader&&i.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,n=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!n||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=rg(this.main(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=r.video||e.main.videoCodec||O1e),e.main.isMuxed&&(i.video+=`,${r.audio||e.main.audioCodec||UF}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(i.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||UF,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:n,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const s=(u,d)=>u?y4(d):Mb(d),l={};let c;if(["video","audio"].forEach(function(u){if(i.hasOwnProperty(u)&&!s(e[u].isFmp4,i[u])){const d=e[u].isFmp4?"browser":"muxer";l[d]=l[d]||[],l[d].push(i[u]),u==="audio"&&(c=d)}}),a&&c&&n.attributes.AUDIO){const u=n.attributes.AUDIO;this.main().playlists.forEach(d=>{(d.attributes&&d.attributes.AUDIO)===u&&d!==n&&(d.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${c} does not support codec(s): "${i.audio}"`)}if(Object.keys(l).length){const u=Object.keys(l).reduce((d,f)=>(d&&(d+=", "),d+=`${f} does not support codec(s): "${l[f].join(",")}"`,d),"")+".";this.excludePlaylist({playlistToExclude:n,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(d=>{const f=(gu(this.sourceUpdater_.codecs[d]||"")[0]||{}).type,h=(gu(i[d]||"")[0]||{}).type;f&&h&&f.toLowerCase()!==h.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[d]}" -> "${i[d]}"`)}),u.length){this.excludePlaylist({playlistToExclude:n,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const n=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(n)}excludeUnsupportedVariants_(){const e=this.main().playlists,n=[];Object.keys(e).forEach(r=>{const i=e[r];if(n.indexOf(i.id)!==-1)return;n.push(i.id);const a=rg(this.main,i),s=[];a.audio&&!Mb(a.audio)&&!y4(a.audio)&&s.push(`audio codec ${a.audio}`),a.video&&!Mb(a.video)&&!y4(a.video)&&s.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&s.push(`text codec ${a.text}`),s.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${s.join(", ")}`))})}excludeIncompatibleVariants_(e){const n=[],r=this.main().playlists,i=yv(gu(e)),a=BL(i),s=i.video&&gu(i.video)[0]||null,l=i.audio&&gu(i.audio)[0]||null;Object.keys(r).forEach(c=>{const u=r[c];if(n.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;n.push(u.id);const d=[],f=rg(this.mainPlaylistLoader_.main,u),h=BL(f);if(!(!f.audio&&!f.video)){if(h!==a&&d.push(`codec count "${h}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const p=f.video&&gu(f.video)[0]||null,v=f.audio&&gu(f.audio)[0]||null;p&&s&&p.type.toLowerCase()!==s.type.toLowerCase()&&d.push(`video codec "${p.type}" !== "${s.type}"`),v&&l&&v.type.toLowerCase()!==l.type.toLowerCase()&&d.push(`audio codec "${v.type}" !== "${l.type}"`)}d.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${d.join(" && ")}`))}})}updateAdCues_(e){let n=0;const r=this.seekable();r.length&&(n=r.start(0)),$ge(e,this.cueTagsTrack_,n)}goalBufferLength(){const e=this.tech_.currentTime(),n=Vs.GOAL_BUFFER_LENGTH,r=Vs.GOAL_BUFFER_LENGTH_RATE,i=Math.max(n,Vs.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+e*r,i)}bufferLowWaterLine(){const e=this.tech_.currentTime(),n=Vs.BUFFER_LOW_WATER_LINE,r=Vs.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(n,Vs.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(n,Vs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+e*r,this.bufferBasedABR?a:i)}bufferHighWaterLine(){return Vs.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){jL(this.inbandTextTracks_,"com.apple.streaming",this.tech_),yge({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,n,r){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();jL(this.inbandTextTracks_,e,this.tech_),mge({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:i,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const n of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(n));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(n=>{this.contentSteeringController_.on(n,r=>{this.trigger(Ma({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const n=this.main();(this.contentSteeringController_.didDASHTagChange(n.uri,n.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),s=[];for(const l of n.playlists){const c=l.attributes.serviceLocation;if(c&&(s.push(c),!a.has(c)))return!0}return!!(!s.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,i=new Set;let a=!1;Object.keys(r).forEach(s=>{const l=r[s],c=this.pathwayAttribute_(l),u=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!u&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const f=!l.excludeUntil&&l.excludeUntil!==1/0;!i.has(l.id)&&u&&f&&(i.add(l.id),l.excludeUntil=1/0,l.lastExcludeReason_="content-steering",this.logger_(`excluding ${l.id} for ${l.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(s=>{const l=this.mediaTypes_[s];if(l.activePlaylistLoader){const c=l.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const n=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||i&&i.size){for(const[s,l]of r.entries())i.get(s)||(this.mainPlaylistLoader_.updateOrDeleteClone(l),this.contentSteeringController_.excludePathway(s));for(const[s,l]of i.entries()){const c=r.get(s);if(!c){n.filter(d=>d.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(d=>{this.mainPlaylistLoader_.addClonePathway(l,d)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(c,l)||(this.mainPlaylistLoader_.updateOrDeleteClone(l,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,n){if(e["BASE-ID"]!==n["BASE-ID"]||e.ID!==n.ID||e["URI-REPLACEMENT"].HOST!==n["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,i=n["URI-REPLACEMENT"].PARAMS;for(const a in r)if(r[a]!==i[a])return!1;for(const a in i)if(r[a]!==i[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=this.mainPlaylistLoader_.getKeyIdSet(r);!i||!i.size||i.forEach(a=>{const s="usable",l=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===s,c=r.lastExcludeReason_===n&&r.excludeUntil===1/0;l?l&&c&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${a} is ${s}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==n&&(r.excludeUntil=1/0,r.lastExcludeReason_=n,this.logger_(`excluding playlist ${r.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${s}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,a=r.excludeUntil===1/0&&r.lastExcludeReason_===n;i&&a&&(delete r.excludeUntil,_t.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${n} key IDs`))})}addKeyStatus_(e,n){const a=(typeof e=="string"?e:Bge(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${n}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,n)}updatePlaylistByKeyStatus(e,n){this.addKeyStatus_(e,n),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const ume=(t,e,n)=>r=>{const i=t.main.playlists[e],a=oA(i),s=vv(i);if(typeof r>"u")return s;r?delete i.disabled:i.disabled=!0;const l={renditionInfo:{id:e,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return r!==s&&!a&&(n(i),r?t.trigger({type:"renditionenabled",metadata:l}):t.trigger({type:"renditiondisabled",metadata:l})),r};class dme{constructor(e,n,r){const{playlistController_:i}=e,a=i.fastQualityChange_.bind(i);if(n.attributes){const s=n.attributes.RESOLUTION;this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=n.attributes.BANDWIDTH,this.frameRate=n.attributes["FRAME-RATE"]}this.codecs=rg(i.main(),n),this.playlist=n,this.id=r,this.enabled=ume(e.playlists,n.id,a)}}const fme=function(t){t.representations=()=>{const e=t.playlistController_.main(),n=tg(e)?t.playlistController_.getAudioTrackPlaylists_():e.playlists;return n?n.filter(r=>!oA(r)).map((r,i)=>new dme(t,r,r.id)):[]}},aB=["seeking","seeked","pause","playing","error"];class hme extends _t.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Jl("PlaybackWatcher"),this.logger_("initialize");const n=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),s=this.playlistController_,l=["main","subtitle","audio"],c={};l.forEach(d=>{c[d]={reset:()=>this.resetSegmentDownloads_(d),updateend:()=>this.checkSegmentDownloads_(d)},s[`${d}SegmentLoader_`].on("appendsdone",c[d].updateend),s[`${d}SegmentLoader_`].on("playlistupdate",c[d].reset),this.tech_.on(["seeked","seeking"],c[d].reset)});const u=d=>{["main","audio"].forEach(f=>{s[`${f}SegmentLoader_`][d]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(aB,a),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(aB,a),this.tech_.off("canplay",r),this.tech_.off("play",n),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(d=>{s[`${d}SegmentLoader_`].off("appendsdone",c[d].updateend),s[`${d}SegmentLoader_`].off("playlistupdate",c[d].reset),this.tech_.off(["seeked","seeking"],c[d].reset)}),this.checkCurrentTimeTimeout_&&Re.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Re.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Re.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const n=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=n.buffered_()}checkSegmentDownloads_(e){const n=this.playlistController_,r=n[`${e}SegmentLoader_`],i=r.buffered_(),a=n2e(this[`${e}Buffered_`],i);if(this[`${e}Buffered_`]=i,a){const s={bufferedRanges:i};n.trigger({type:"bufferedrangeschanged",metadata:s}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:r.playlist_&&r.playlist_.id,buffered:v1(i)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&n.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),n=this.tech_.buffered();if(this.lastRecordedTime===e&&(!n.length||e+Tu>=n.end(n.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Rs([this.lastRecordedTime,e]));const r={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:r}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const n=this.seekable(),r=this.tech_.currentTime(),i=this.afterSeekableWindow_(n,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(i&&(a=n.end(n.length-1)),this.beforeSeekableWindow_(n,r)){const v=n.start(0);a=v+(v===n.end(0)?0:Tu)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${GM(n)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const s=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=s.audioBuffer?s.audioBuffered():null,u=s.videoBuffer?s.videoBuffered():null,d=this.media(),f=d.partTargetDuration?d.partTargetDuration:(d.targetDuration-xu)*2,h=[c,u];for(let v=0;v<h.length;v++){if(!h[v])continue;if(iA(h[v],r)<f)return!1}const p=mv(l,r);return p.length===0?!1:(a=p.start(0)+Tu,this.logger_(`Buffered region starts (${p.start(0)}) just beyond seek point (${r}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),n=this.tech_.buffered(),r=lh(n,e);if(r.length&&e+3<=r.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${r.start(0)} -> ${r.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),n=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,n)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${n}. Seeking to live point (seekable end) ${l}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(l),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:n}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=mv(i,n);return s.length>0?(this.logger_(`Stopped at ${n} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(n),!0):!1}afterSeekableWindow_(e,n,r,i=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Tu;const s=!r.endList,l=typeof r.partTargetDuration=="number";return s&&(l||i)&&(a=e.end(e.length-1)+r.targetDuration*3),n>a}beforeSeekableWindow_(e,n){return!!(e.length&&e.start(0)>0&&n<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:n,currentTime:r}){if(!e)return;let i;if(e.length&&n.length){const a=lh(e,r-3),s=lh(e,r),l=lh(n,r);l.length&&!s.length&&a.length&&(i={start:a.end(0),end:l.end(0)})}else mv(e,r).length||(i=this.gapFromVideoUnderflow_(e,r));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const n=this.tech_.buffered(),r=this.tech_.currentTime(),i=mv(n,r);if(this.resetTimeUpdate_(),i.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+xu);const a={gapInfo:{from:r,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,n){const r=Zpe(e);for(let i=0;i<r.length;i++){const a=r.start(i),s=r.end(i);if(n-a<4&&n-a>2)return{start:a,end:s}}return null}}const pme={errorInterval:30,getSource(t){const n=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return t(n)}},sB=function(t,e){let n=0,r=0;const i=ea(pme,e);t.ready(()=>{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){r&&t.currentTime(r)},s=function(d){d!=null&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(d),t.trigger({type:"usage",name:"vhs-error-reload"}),t.play())},l=function(){if(Date.now()-n<i.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){_t.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),i.getSource.call(t,s)},c=function(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",c)},u=function(d){c(),sB(t,d)};t.on("error",l),t.on("dispose",c),t.reloadSourceOnError=u},gme=function(t){sB(this,t)};var oB="3.13.3",mme="7.0.3",vme="1.3.0",bme="7.1.0",yme="4.0.1";const Ja={PlaylistLoader:dh,Playlist:al,utils:x2e,STANDARD_PLAYLIST_SELECTOR:UL,INITIAL_PLAYLIST_SELECTOR:dge,lastBandwidthSelector:UL,movingAverageBandwidthSelector:cge,comparePlaylistBandwidth:yA,comparePlaylistResolution:lge,xhr:gL()};Object.keys(Vs).forEach(t=>{Object.defineProperty(Ja,t,{get(){return _t.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),Vs[t]},set(e){if(_t.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){_t.log.warn(`value of Vhs.${t} must be greater than or equal to 0`);return}Vs[t]=e}})});const lB="videojs-vhs",cB=function(t,e){const n=e.media();let r=-1;for(let i=0;i<t.length;i++)if(t[i].id===n.id){r=i;break}t.selectedIndex_=r,t.trigger({selectedIndex:r,type:"change"})},Ame=function(t,e){e.representations().forEach(n=>{t.addQualityLevel(n)}),cB(t,e.playlists)};Ja.canPlaySource=function(){return _t.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const wme=(t,e,n)=>{if(!t)return t;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=yv(gu(e.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);const i=I2(r.video),a=I2(r.audio),s={};for(const l in t)s[l]={},a&&(s[l].audioContentType=a),i&&(s[l].videoContentType=i),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(s[l].pssh=e.contentProtection[l].pssh),typeof t[l]=="string"&&(s[l].url=t[l]);return ea(t,s)},Sme=(t,e)=>t.reduce((n,r)=>{if(!r.contentProtection)return n;const i=e.reduce((a,s)=>{const l=r.contentProtection[s];return l&&l.pssh&&(a[s]={pssh:l.pssh}),a},{});return Object.keys(i).length&&n.push(i),n},[]),Cme=({player:t,sourceKeySystems:e,audioMedia:n,mainPlaylists:r})=>{if(!t.eme.initializeMediaKeys)return Promise.resolve();const i=n?r.concat([n]):r,a=Sme(i,Object.keys(e)),s=[],l=[];return a.forEach(c=>{l.push(new Promise((u,d)=>{t.tech_.one("keysessioncreated",u)})),s.push(new Promise((u,d)=>{t.eme.initializeMediaKeys({keySystems:c},f=>{if(f){d(f);return}u()})}))}),Promise.race([Promise.all(s),Promise.race(l)])},xme=({player:t,sourceKeySystems:e,media:n,audioMedia:r})=>{const i=wme(e,n,r);return i?(t.currentSource().keySystems=i,i&&!t.eme?(_t.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},uB=()=>{if(!Re.localStorage)return null;const t=Re.localStorage.getItem(lB);if(!t)return null;try{return JSON.parse(t)}catch{return null}},Tme=t=>{if(!Re.localStorage)return!1;let e=uB();e=e?ea(e,t):t;try{Re.localStorage.setItem(lB,JSON.stringify(e))}catch{return!1}return e},Eme=t=>t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t,dB=(t,e)=>{t._requestCallbackSet||(t._requestCallbackSet=new Set),t._requestCallbackSet.add(e)},fB=(t,e)=>{t._responseCallbackSet||(t._responseCallbackSet=new Set),t._responseCallbackSet.add(e)},hB=(t,e)=>{t._requestCallbackSet&&(t._requestCallbackSet.delete(e),t._requestCallbackSet.size||delete t._requestCallbackSet)},pB=(t,e)=>{t._responseCallbackSet&&(t._responseCallbackSet.delete(e),t._responseCallbackSet.size||delete t._responseCallbackSet)};Ja.supportsNativeHls=function(){if(!xn||!xn.createElement)return!1;const t=xn.createElement("video");return _t.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(n){return/maybe|probably/i.test(t.canPlayType(n))}):!1}(),Ja.supportsNativeDash=function(){return!xn||!xn.createElement||!_t.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(xn.createElement("video").canPlayType("application/dash+xml"))}(),Ja.supportsTypeNatively=t=>t==="hls"?Ja.supportsNativeHls:t==="dash"?Ja.supportsNativeDash:!1,Ja.isSupported=function(){return _t.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Ja.xhr.onRequest=function(t){dB(Ja.xhr,t)},Ja.xhr.onResponse=function(t){fB(Ja.xhr,t)},Ja.xhr.offRequest=function(t){hB(Ja.xhr,t)},Ja.xhr.offResponse=function(t){pB(Ja.xhr,t)};const Ime=_t.getComponent("Component");class gB extends Ime{constructor(e,n,r){if(super(n,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=Jl("VhsHandler"),n.options_&&n.options_.playerId){const i=_t.getPlayer(n.options_.playerId);this.player_=i}if(this.tech_=n,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(xn,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const a=xn.fullscreenElement||xn.webkitFullscreenElement||xn.mozFullScreenElement||xn.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=ea(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const r=uB();r&&r.bandwidth&&(this.options_.bandwidth=r.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),r&&r.throughput&&(this.options_.throughput=r.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Vs.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Vs.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(r=>{typeof this.source_[r]<"u"&&(this.options_[r]=this.source_[r])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const n=this.options_.customPixelRatio;typeof n=="number"&&n>=0&&(this.customPixelRatio=n)}setOptions(e={}){this.setOptions_(e)}src(e,n){if(!e)return;this.setOptions_(),this.options_.src=Eme(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Ja,this.options_.sourceType=$F(n),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new cme(this.options_);const r=ea({liveRangeSafeTimeDelta:Tu},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new hme(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=_t.players[this.tech_.options_.playerId];let s=this.playlistController_.error;typeof s=="object"&&!s.code?s.code=3:typeof s=="string"&&(s={message:s,code:3}),a.error(s)});const i=this.options_.bufferBasedABR?Ja.movingAverageBandwidthSelector(.55):Ja.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=Ja.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const s=Re.navigator.connection||Re.navigator.mozConnection||Re.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&s){const c=s.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let s;return this.throughput>0?s=1/this.throughput:s=0,Math.floor(1/(a+s))},set(){_t.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>v1(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>v1(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Tme({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{fme(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Re.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Cme({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(n=>{this.logger_("error while creating EME key session",n),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=xme({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",r=>{this.playlistController_.updatePlaylistByKeyStatus(r.keyId,r.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!n){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=_t.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Ame(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{cB(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":oB,"mux.js":mme,"mpd-parser":vme,"m3u8-parser":bme,"aes-decrypter":yme}}version(){return this.constructor.version()}canChangeType(){return GL.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Re.URL.revokeObjectURL&&(Re.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,n){return O2e({playlist:this.playlistController_.media(),time:e,callback:n})}seekToProgramTime(e,n,r=!0,i=2){return AL({programTime:e,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:n})}setupXhrHooks_(){this.xhr.onRequest=e=>{dB(this.xhr,e)},this.xhr.onResponse=e=>{fB(this.xhr,e)},this.xhr.offRequest=e=>{hB(this.xhr,e)},this.xhr.offResponse=e=>{pB(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],n=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,i=>{this.player_.trigger(Ma({},i))})}),n.forEach(r=>{this.playbackWatcher_.on(r,i=>{this.player_.trigger(Ma({},i))})})}}const xv={name:"videojs-http-streaming",VERSION:oB,canHandleSource(t,e={}){const n=ea(_t.options,e);return xv.canPlayType(t.type,n)},handleSource(t,e,n={}){const r=ea(_t.options,n);return e.vhs=new gB(t,e,r),e.vhs.xhr=gL(),e.vhs.setupXhrHooks_(),e.vhs.src(t.src,t.type),e.vhs},canPlayType(t,e){const n=$F(t);if(!n)return"";const r=xv.getOverrideNative(e);return!Ja.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative(t={}){const{vhs:e={}}=t,n=!(_t.browser.IS_ANY_SAFARI||_t.browser.IS_IOS),{overrideNative:r=n}=e;return r}};y4("avc1.4d400d,mp4a.40.2")&&_t.getTech("Html5").registerSourceHandler(xv,0),_t.VhsHandler=gB,_t.VhsSourceHandler=xv,_t.Vhs=Ja,_t.use||_t.registerComponent("Vhs",Ja),_t.options.vhs=_t.options.vhs||{},(!_t.getPlugin||!_t.getPlugin("reloadSourceOnError"))&&_t.registerPlugin("reloadSourceOnError",gme);const mB=t=>{const{userTrainingSaveData:e,updateUserTraining:n}=Ar(),r=F.useRef(null),i=F.useRef(null),{options:a,onReady:s,currentItem:l}=t,[c,u]=F.useState(!1),d=p=>{if(e!==null){const v=e==null?void 0:e.findIndex(m=>(m==null?void 0:m.fieldId)===(l==null?void 0:l.uuid));if(v>=0){const m=p.target;e[v].seenTime=m.currentTime}}},f=p=>{const v=[...e],m=v==null?void 0:v.findIndex(A=>(A==null?void 0:A.fieldId)===(p==null?void 0:p.uuid));m>=0&&(v[m]={...e[m],isSeen:!0},n(v),h("Ended"))};F.useEffect(()=>{if(i.current){const p=i.current;p.autoplay(a.autoplay),p.src(a.sources)}else{const p=r.current;if(!p)return;const v=i.current=_t(p,a,()=>{_t.log("player is ready"),s&&s(v)})}},[a,r]);const h=p=>{const v=i.current,m=e!==null?e.findIndex(A=>(A==null?void 0:A.fieldId)===(l==null?void 0:l.uuid)):-1;m>=0&&e[m].logs.push({action:p,videoTime:e[m].seenTime,totalTime:v.duration(),timeState:new Date}),n(e)};return F.useEffect(()=>{if(!c&&e!==null){const p=e.findIndex(v=>(v==null?void 0:v.fieldId)===(l==null?void 0:l.uuid));p>=0&&(u(!0),i.current.currentTime(e[p].seenTime))}},[e]),F.useEffect(()=>{const p=i.current;return()=>{p&&(p.dispose(),i.current=null)}},[i]),o.jsx("div",{"data-vjs-player":!0,children:o.jsx("video",{onPause:()=>{h("Pause")},onPlay:()=>{h("Play")},onEnded:()=>{f(l)},onTimeUpdate:d,ref:r,className:"video-js vjs-big-play-centered"})})},_me=t=>{var C,T,S,E,_;const{field:e}=t,n=F.useRef(null),{userSelectedLanguage:r}=sn(),{isBuilderMode:i,media:a}=Ht(),s=(C=a==null?void 0:a.video)!=null&&C.MediaVideo?(T=a==null?void 0:a.video)==null?void 0:T.MediaVideo:()=>o.jsx(o.Fragment,{}),l=P=>{n.current=P,P.on("waiting",()=>{_t.log("player is waiting")}),P.on("dispose",()=>{_t.log("player will dispose")})},[c,u]=F.useState(!1),[d,f]=F.useState(!1),h=()=>{f(!0)},p=()=>{f(!1)},v=P=>{u(P)},m=()=>{u(!1)},A=F.useCallback(P=>o.jsx(mB,{options:{autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:P}]},currentItem:e,onReady:l,onUpdate:()=>{}}),[e==null?void 0:e.media_file_id]),w=F.useCallback(P=>o.jsx(s,{mediaId:P,alt:""}),[e==null?void 0:e.media_file_id]),x=o.jsxs("div",{onMouseOver:h,onMouseOut:p,children:[i&&d&&o.jsx(Wr,{handleFieldSettingsSidebar:v,...t}),o.jsx("div",{className:i?"field-form-builder py-4 px-2":"py-4 px-2",children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsxs("div",{className:"mt-3",children:[o.jsxs("label",{className:"flex font-bold mb-3 text-gray-900 text-xl",children:[" ",(S=e==null?void 0:e.title)==null?void 0:S[r==null?void 0:r.type]," -"," ",e==null?void 0:e.videoDuration]}),(e==null?void 0:e.isExternalSource)===!0&&o.jsx(o.Fragment,{children:(e==null?void 0:e.media_url)&&A((E=e==null?void 0:e.media_url)==null?void 0:E[r==null?void 0:r.type])}),(e==null?void 0:e.isExternalSource)===!1?(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:w(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:(e==null?void 0:e.media_url)&&A((_=e==null?void 0:e.media_url)==null?void 0:_[r==null?void 0:r.type])}):o.jsx(o.Fragment,{})]})})})})})]});return o.jsxs(o.Fragment,{children:[o.jsx(w0e,{visibilty:c,closeSettingFieldSidebar:m,...t}),o.jsx(xi,{...t,fieldWrap:x})]})},Dme=t=>{const{isBuilderMode:e}=Ht(),[n,r]=F.useState(!1),i=()=>{r(!0)},a=()=>{r(!1)},s=o.jsxs("div",{onMouseOver:i,onMouseOut:a,children:[e&&n&&o.jsx(Wr,{handleFieldSettingsSidebar:()=>{},...t}),o.jsx("div",{className:e?"field-form-builder":"",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsx(va,{}),o.jsx("div",{className:"hr-divider"})]})})})]});return o.jsx(o.Fragment,{children:o.jsx(xi,{...t,fieldWrap:s})})},Nme=t=>{var ce,q,W,ee,Q,H,X,pe,ge,Ae,ye;const{isAdmin:e,isBuilderMode:n}=Ht(),{field:r,fieldIndex:i,row:a}=t,{task_status:s,taskRegisterData:l,updateTaskRegisterData:c,updateTaskProgressValue:u,userTaskSubmitFormData:d,updateUserFormDataSubmit:f,TASK_PUBLISHED:h}=Ar(),{userSelectedLanguage:p}=sn(),[v,m]=F.useState(!1),[A,w]=F.useState(""),[x,C]=F.useState(0),[T,S]=F.useState(!1),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)},k=oe=>new Date(oe),M=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(r==null?void 0:r.uuid)});se>=0&&ne[se].fieldData?w(ne[se].fieldData):w("")}}else{const ne=d;if(ne!=null&&ne.length){for(const se of ne)if(se.fieldId===t.field.uuid&&((oe=se==null?void 0:se.postData[0])==null?void 0:oe.postValue)!==""&&((re=se==null?void 0:se.postData[0])!=null&&re.postValue)){w(k((B=se==null?void 0:se.postData[0])==null?void 0:B.postValue));break}}}S(!0)};F.useEffect(()=>{T||M();const oe=Gt.addListener("clearRepeatableFields",se=>{se===(a==null?void 0:a.uuid)&&(w(""),C(0),r.isValid=0)}),re=Gt.addListener("onSubmitUserForm",()=>{var se;(se=r==null?void 0:r.attributes)!=null&&se.required?A?r.isValid=1:r.isValid=0:r.isValid=1}),B=Gt.addListener("OnInvalidFieldCatch",se=>{r.uuid===(se==null?void 0:se.fieldId)?C(1):C(0)}),ne=Gt.addListener("OnGetFieldValue",se=>{var Ne;const me=(Ne=se==null?void 0:se.repeatableColumn)==null?void 0:Ne.filter(we=>(we==null?void 0:we.fieldUuid)===(r==null?void 0:r.uuid));me!=null&&me.length});return()=>{re.remove(),B.remove(),oe.remove(),ne.remove()}});const Y=oe=>{m(oe)},N=()=>{m(!1)},z=oe=>{var ne,se;w(oe.target.value);const re=d,B=It.cloneDeep(l);if(re!==null){if((ne=oe==null?void 0:oe.target)!=null&&ne.value){if(B[r==null?void 0:r.uuid]=(se=oe==null?void 0:oe.target)==null?void 0:se.value,(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:oe.target.value})}else if(delete B[r==null?void 0:r.uuid],(re==null?void 0:re.length)>0)for(const me of re)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){c(B);const me=Object.keys(B).length;u(me)}},$=(oe,re)=>{var B;if(w(re),(d==null?void 0:d.length)>0){const ne=[...d],se=It.findIndex(ne,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let me=(B=d[se])==null?void 0:B.repeatableFields;me={...me,[oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},f(ne),re!==""?oe.isValid=1:oe.isValid=0}},le=new Date(r==null?void 0:r.minDate),G=new Date(r==null?void 0:r.maxDate),R=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[n&&E&&o.jsx(Wr,{type:"",handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${n&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(ce=r==null?void 0:r.headerText)==null?void 0:ce[p==null?void 0:p.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{update:function(){throw new Error("Function not implemented.")},value:{fieldId:void 0,uuid:void 0},...t}),((q=r==null?void 0:r.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",n?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(W=r==null?void 0:r.label)==null?void 0:W[p==null?void 0:p.type]}),(r==null?void 0:r.showToolTip)&&o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(ee=r==null?void 0:r.toolTip)==null?void 0:ee[p==null?void 0:p.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(r==null?void 0:r.iconAlignment),children:[(r==null?void 0:r.showIcon)&&o.jsx("i",{className:"pi pi-"+((H=(Q=r==null?void 0:r.icon)==null?void 0:Q.properties)==null?void 0:H.name)}),o.jsx(nf,{readOnlyInput:!0,numberOfMonths:r==null?void 0:r.noOfMonths,selectionMode:(r==null?void 0:r.dateRange)||"single",view:(r==null?void 0:r.calenderView)||!1,showButtonBar:(r==null?void 0:r.isTodayBtn)||!1,showIcon:(r==null?void 0:r.isIcon)||!1,id:r==null?void 0:r.uuid,dateFormat:r==null?void 0:r.dateFormat,placeholder:(X=r==null?void 0:r.placeholder)==null?void 0:X[p==null?void 0:p.type],value:A,onFocus:()=>C(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?$(r,oe.target.value):z(oe)},minDate:le,maxDate:G,className:x===1&&((pe=r==null?void 0:r.attributes)!=null&&pe.required)?A?"valid":"invalid":"valid'",disabled:e||s===h})]}),o.jsx("div",{children:((ge=r==null?void 0:r.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:x===1&&!A?(Ae=r==null?void 0:r.validationMesssage)==null?void 0:Ae.english:""})}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[p==null?void 0:p.type]})})]})]})}),e&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[v===!0&&o.jsx(Zi,{visibilty:v,closeSettingFieldSidebar:N,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},Ome=t=>{var X,pe,ge,Ae,ye,oe,re,B;const e=F.useRef(null),{task_status:n,taskRegisterData:r,updateTaskRegisterData:i,updateTaskProgressValue:a,updateUserFormDataSubmit:s,userTaskSubmitFormData:l,onSetValuetoPostDataHook:c,TASK_PUBLISHED:u}=Ar(),{userSelectedLanguage:d,fieldSettingUpdate:f}=sn(),{field:h,fieldIndex:p,columnIndex:v,sectionIndex:m,rowIndex:A,pageIndex:w,row:x}=t,{isAdmin:C,isBuilderMode:T}=Ht(),[S,E]=F.useState(!1),[_,P]=F.useState(0),[O,k]=F.useState(!1),[M,Y]=F.useState(null),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=()=>{var se,me,Ne;(se=e==null?void 0:e.current)==null||se.clear(),h.isValid=0,f(w,m,A,v,p,h),Y(null);const ne=l;if(l!=null&&l.length){const we=It.cloneDeep(r);if(we[h==null?void 0:h.uuid]=(me=e.current)==null?void 0:me.toDataURL(),(ne==null?void 0:ne.length)>0){for(const ve of ne)if(ve.fieldId===t.field.uuid){ve.postData[0]={postValue:null},Y(null);break}}if(!(x!=null&&x.rowIsRepeatable)){i(we);const ve=(Ne=Object.keys(we))==null?void 0:Ne.length;a(ve)}}},R=()=>{var se,me,Ne;const ne=l;if((ne==null?void 0:ne.length)>0)for(const we of ne)we.fieldId===t.field.uuid&&((se=we==null?void 0:we.postData[0])!=null&&se.postValue&&((me=we==null?void 0:we.postData[0])==null?void 0:me.postValue)!==""&&(Y((Ne=we==null?void 0:we.postData[0])==null?void 0:Ne.postValue),k(!0)),h.isValid=1);k(!0)},ce=()=>{var ne,se,me,Ne;if(l!=null&&l.length){const we=[...l],ve=It.findIndex(we,function(Te){return Te.rowId===(x==null?void 0:x.uuid)});let ue=(ne=l[ve])==null?void 0:ne.repeatableFields;ue={...ue,[h==null?void 0:h.uuid]:`<img src="${(se=e.current)==null?void 0:se.toDataURL()}" >`},we[ve]={...we[ve],repeatableFields:ue},s(we)}Y(((me=e.current)==null?void 0:me.toDataURL())||""),((Ne=e.current)==null?void 0:Ne.toDataURL())!==""?h.isValid=1:h.isValid=0};F.useEffect(()=>{O||R();const ne=Gt.addListener("clearRepeatableFields",we=>{we===(x==null?void 0:x.uuid)&&(Y(null),G(),P(0),h.isValid=0,f(w,m,A,v,p,h))}),se=Gt.addListener("onSubmitUserForm",()=>{var we;(we=h==null?void 0:h.attributes)!=null&&we.required?(M!==null?h.isValid=1:h.isValid=0,f(w,m,A,v,p,h)):h.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",we=>{h.uuid===(we==null?void 0:we.fieldId)?P(1):P(0)}),Ne=Gt.addListener("OnSignatureSettingChange",()=>{G()});return()=>{se.remove(),me.remove(),Ne.remove(),ne.remove()}});const q=ne=>{E(ne)},W=()=>{E(!1)},ee=()=>{var se,me,Ne,we;const ne=l;if(l!=null&&l.length){const ve=It.cloneDeep(r);if(ve[h==null?void 0:h.uuid]=(se=e.current)==null?void 0:se.toDataURL(),(ne==null?void 0:ne.length)>0){for(const ue of ne)if(ue.fieldId===t.field.uuid){ue.postData[0]={postValue:(me=e.current)==null?void 0:me.toDataURL()},Y(((Ne=e.current)==null?void 0:Ne.toDataURL())||null);break}}if(!(x!=null&&x.rowIsRepeatable)){i(ve);const ue=(we=Object.keys(ve))==null?void 0:we.length;a(ue)}}},Q=()=>{var ne,se,me;return`rgba(${(ne=h==null?void 0:h.backgroundColor)==null?void 0:ne.r}, ${(se=h==null?void 0:h.backgroundColor)==null?void 0:se.g}, ${(me=h==null?void 0:h.backgroundColor)==null?void 0:me.b}, 0.8)`},H=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[T&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${T&&" py-3 px-4 builder-element-wrapper "}${(h==null?void 0:h.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:T?"col-11":"col-12",children:[(h==null?void 0:h.showHeaderText)&&o.jsx("h6",{children:(X=h==null?void 0:h.headerText)==null?void 0:X[d==null?void 0:d.type]}),(h==null?void 0:h.showLabel)&&o.jsxs("label",{htmlFor:h.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((pe=h==null?void 0:h.attributes)==null?void 0:pe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ge=h==null?void 0:h.label)==null?void 0:ge[d==null?void 0:d.type]}),o.jsx("span",{className:"ml-3",children:(h==null?void 0:h.showToolTip)&&o.jsx(Vi,{message:(Ae=h==null?void 0:h.toolTip)==null?void 0:Ae[d==null?void 0:d.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[n!==u&&M===null&&!C&&o.jsx(VT,{backgroundColor:Q(),penColor:`#${h==null?void 0:h.penColor}`,canvasProps:{width:`${h==null?void 0:h.canvasWidth}`,height:h==null?void 0:h.canvasHeight,className:"sigCanvas"},ref:e,onEnd:()=>{x!=null&&x.rowIsRepeatable?ce():ee()}},h==null?void 0:h.uuid),n===u&&M==null&&o.jsx("p",{children:"Not signed"}),n===u&&M!==null&&o.jsx("img",{alt:"",src:M,style:{width:350,height:200}}),n!==u&&M!==null&&o.jsx("img",{alt:"",src:M,style:{width:350,height:200}}),o.jsx("div",{children:((ye=h==null?void 0:h.attributes)==null?void 0:ye.required)&&o.jsx("small",{className:"error",children:_===1&&!M?(oe=h==null?void 0:h.validationMesssage)==null?void 0:oe.english:""})}),o.jsx("div",{className:"mt-3",children:(h==null?void 0:h.showHelperText)&&o.jsx("small",{children:(re=h==null?void 0:h.helperText)==null?void 0:re[d==null?void 0:d.type]})}),n===e3&&o.jsx(o.Fragment,{children:C===!1&&o.jsx(Ft,{text:!0,label:(B=h==null?void 0:h.clearSignatureButtonLabel)==null?void 0:B[d==null?void 0:d.type],onClick:()=>G(),className:"p-button-raised p-button-text mt-3"})})]})]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:W,...t}),o.jsx(xi,{...t,fieldWrap:H})]})};function A1(){return A1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},A1.apply(null,arguments)}function sg(t){"@babel/helpers - typeof";return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sg(t)}function Fme(t,e){if(sg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(sg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kme(t){var e=Fme(t,"string");return sg(e)=="symbol"?e:e+""}function TA(t,e,n){return(e=kme(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pme(t){if(Array.isArray(t))return t}function Mme(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function EA(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function vB(t,e){if(t){if(typeof t=="string")return EA(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?EA(t,e):void 0}}function Lme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3787
3787
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w1(t,e){return Pme(t)||Mme(t,e)||vB(t,e)||Lme()}var Bme={header:"p-galleria-header",footer:"p-galleria-footer",closeIcon:"p-galleria-close-icon",closeButton:"p-galleria-close p-link",root:function(e){var n=e.props,r=e.context,i=e.thumbnailsPosClassName,a=e.indicatorPosClassName;return ft("p-galleria p-component",{"p-galleria-fullscreen":n.fullScreen,"p-galleria-indicator-onitem":n.showIndicatorsOnItem,"p-galleria-item-nav-onhover":n.showItemNavigatorsOnHover&&!n.fullScreen,"p-input-filled":r&&r.inputStyle==="filled"||zn.inputStyle==="filled","p-ripple-disabled":r&&r.ripple===!1||zn.ripple===!1},i,a)},content:"p-galleria-content",mask:function(e){var n=e.visibleState;return ft("p-galleria-mask",{"p-galleria-visible":n})},thumbnailItem:function(e){var n=e.subProps;return ft("p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":n.current,"p-galleria-thumbnail-item-active":n.active,"p-galleria-thumbnail-item-start":n.start,"p-galleria-thumbnail-item-end":n.end})},thumbnailItemContent:"p-galleria-thumbnail-item-content",previousThumbnailIcon:"p-galleria-thumbnail-prev-icon",previousThumbnailButton:function(e){var n=e.isDisabled;return ft("p-galleria-thumbnail-prev p-link",{"p-disabled":n})},nextThumbnailIcon:"p-galleria-thumbnail-next-icon",nextThumbnailButton:function(e){var n=e.isDisabled;return ft("p-galleria-thumbnail-next p-link",{"p-disabled":n})},thumbnailContainer:"p-galleria-thumbnail-container",thumbnailItemsContainer:"p-galleria-thumbnail-items-container",thumbnailItems:"p-galleria-thumbnail-items",thumbnailWrapper:"p-galleria-thumbnail-wrapper",previousItemIcon:"p-galleria-item-prev-icon",previousItemButton:function(e){var n=e.isDisabled;return ft("p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":n})},nextItemIcon:"p-galleria-item-next-icon",nextItemButton:function(e){var n=e.isDisabled;return ft("p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":n})},caption:"p-galleria-caption",indicator:function(e){var n=e.isActive;return ft("p-galleria-indicator",{"p-highlight":n})},indicators:"p-galleria-indicators p-reset",itemWrapper:"p-galleria-item-wrapper",itemContainer:"p-galleria-item-container",item:"p-galleria-item",transition:"p-galleria"},Vme=`
|
|
3788
3788
|
@layer primereact {
|
|
3789
3789
|
.p-galleria-content {
|
|
@@ -4282,7 +4282,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4282
4282
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wbe(t,e){if(t){if(typeof t=="string")return BU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BU(t,e)}}function BU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Sbe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cbe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xbe(t,e,n){return e&&Cbe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var zw="9",Tbe=15,Ebe=b5(zw,Tbe),Ibe=/[- ]/,_be=function(){return/\[([^\[\]])*\]/g},Dbe=function(){return/\d(?=[^,}][^,}])/g},Nbe=new RegExp("["+m0+"]*\\$1["+m0+"]*(\\$\\d["+m0+"]*)*$"),VU=3,Obe=function(){function t(e){e.state;var n=e.metadata;Sbe(this,t),this.metadata=n,this.resetFormat()}return xbe(t,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(n,r){this.resetFormat(),n?(this.isNANP=n.callingCode()==="1",this.matchingFormats=n.formats(),r.nationalSignificantNumber&&this.narrowDownMatchingFormats(r)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(n,r){var i=this;if(sbe(r.nationalSignificantNumber,this.metadata))for(var a=LU(this.matchingFormats),s;!(s=a()).done;){var l=s.value,c=abe(r,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(d){return i.shouldTryNationalPrefixFormattingRule(d,{international:r.international,nationalPrefix:r.nationalPrefix})},getSeparatorAfterNationalPrefix:function(d){return i.getSeparatorAfterNationalPrefix(d)}});if(c)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(c.replace(/\d/g,Bc),r),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(Bc),c}return this.formatNationalNumberWithNextDigits(n,r)}},{key:"formatNationalNumberWithNextDigits",value:function(n,r){var i=this.chosenFormat,a=this.chooseFormat(r);if(a)return a===i?this.formatNextNationalNumberDigits(n):this.formatNextNationalNumberDigits(r.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(n){var r=this,i=n.nationalSignificantNumber,a=n.nationalPrefix,s=n.international,l=i,c=l.length-VU;c<0&&(c=0),this.matchingFormats=this.matchingFormats.filter(function(u){return r.formatSuits(u,s,a)&&r.formatMatches(u,l,c)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(n,r,i){return!(i&&!n.usesNationalPrefix()&&!n.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!r&&!i&&n.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(n,r,i){var a=n.leadingDigitsPatterns().length;if(a===0)return!0;i=Math.min(i,a-1);var s=n.leadingDigitsPatterns()[i];if(r.length<VU)try{return new Abe(s).match(r,{allowOverflow:!0})!==void 0}catch(l){return console.error(l),!0}return new RegExp("^(".concat(s,")")).test(r)}},{key:"getFormatFormat",value:function(n,r){return r?n.internationalFormat():n.format()}},{key:"chooseFormat",value:function(n){for(var r=this,i=function(){var u=s.value;return r.chosenFormat===u?"break":Nbe.test(r.getFormatFormat(u,n.international))?r.createTemplateForFormat(u,n)?(r.chosenFormat=u,"break"):(r.matchingFormats=r.matchingFormats.filter(function(d){return d!==u}),"continue"):"continue"},a=LU(this.matchingFormats.slice()),s;!(s=a()).done;){var l=i();if(l==="break")break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(n,r){if(!(n.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(n,r);if(i)return this.setNationalNumberTemplate(i,r),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(n){return this.isNANP||n&&n.nationalPrefixFormattingRule()&&Ibe.test(n.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(n,r){var i=n.IDDPrefix,a=n.missingPlus;return i?r&&r.spacing===!1?i:i+" ":a?"":"+"}},{key:"getTemplate",value:function(n){if(this.template){for(var r=-1,i=0,a=n.international?this.getInternationalPrefixBeforeCountryCallingCode(n,{spacing:!1}):"";i<a.length+n.getDigitsWithoutInternationalPrefix().length;)r=this.template.indexOf(Bc,r+1),i++;return FU(this.template,r+1)}}},{key:"setNationalNumberTemplate",value:function(n,r){this.nationalNumberTemplate=n,this.populatedNationalNumberTemplate=n,this.populatedNationalNumberTemplatePosition=-1,r.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g,Bc)+b5(Bc,r.callingCode.length)+" "+n:this.template=n}},{key:"getTemplateForFormat",value:function(n,r){var i=r.nationalSignificantNumber,a=r.international,s=r.nationalPrefix,l=r.complexPrefixBeforeNationalSignificantNumber,c=n.pattern();c=c.replace(_be(),"\\d").replace(Dbe(),"\\d");var u=Ebe.match(c)[0];if(!(i.length>u.length)){var d=new RegExp("^"+c+"$"),f=i.replace(/\d/g,zw);d.test(f)&&(u=f);var h=this.getFormatFormat(n,a),p;if(this.shouldTryNationalPrefixFormattingRule(n,{international:a,nationalPrefix:s})){var v=h.replace(bU,n.nationalPrefixFormattingRule());if(k1(n.nationalPrefixFormattingRule())===(s||"")+k1("$1")&&(h=v,p=!0,s))for(var m=s.length;m>0;)h=h.replace(/\d/,Bc),m--}var A=u.replace(new RegExp(c),h).replace(new RegExp(zw,"g"),Bc);return p||(l?A=b5(Bc,l.length)+" "+A:s&&(A=b5(Bc,s.length)+this.getSeparatorAfterNationalPrefix(n)+A)),a&&(A=vU(A)),A}}},{key:"formatNextNationalNumberDigits",value:function(n){var r=ibe(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,n);if(!r){this.resetFormat();return}return this.populatedNationalNumberTemplate=r[0],this.populatedNationalNumberTemplatePosition=r[1],FU(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(n,r){var i=r.international,a=r.nationalPrefix;if(n.nationalPrefixFormattingRule()){var s=n.usesNationalPrefix();if(s&&a||!s&&!i)return!0}}}]),t}();function qU(t,e){return Mbe(t)||Pbe(t,e)||kbe(t,e)||Fbe()}function Fbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4283
4283
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kbe(t,e){if(t){if(typeof t=="string")return UU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UU(t,e)}}function UU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Pbe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function Mbe(t){if(Array.isArray(t))return t}function Lbe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bbe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vbe(t,e,n){return e&&Bbe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var qbe="["+m0+yg+"]+",Ube=new RegExp("^"+qbe+"$","i"),$be="(?:["+n7e+"]["+m0+yg+"]*|["+m0+yg+"]+)",jbe=new RegExp("[^"+m0+yg+"]+.*$"),zbe=/[^\d\[\]]/,Hbe=function(){function t(e){var n=e.defaultCountry,r=e.defaultCallingCode,i=e.metadata,a=e.onNationalSignificantNumberChange;Lbe(this,t),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return Vbe(t,[{key:"input",value:function(n,r){var i=Xbe(n),a=qU(i,2),s=a[0],l=a[1],c=k1(s),u;return l&&(r.digits||(r.startInternationalNumber(),c||(u=!0))),c&&this.inputDigits(c,r),{digits:c,justLeadingPlus:u}}},{key:"inputDigits",value:function(n,r){var i=r.digits,a=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),a&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=X7e("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,a=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&zbe.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=qw(n,this.metadata),a=i.nationalPrefix,s=i.nationalNumber,l=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,l,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=qw(n,this.metadata),s=a.nationalPrefix,l=a.nationalNumber,c=a.carrierCode;if(l!==r)return this.onExtractedNationalNumber(s,c,l,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,a,s){var l,c,u=a.lastIndexOf(i);if(u>=0&&u===a.length-i.length){c=!0;var d=a.slice(0,u);d!==n&&(l=d)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,a=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=EU(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==a)return n.update({IDDPrefix:a.slice(0,a.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=_U(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(r.number,i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,a=r.callingCode;n.startInternationalNumber(i,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}]),t}();function Ybe(t){var e=t.search($be);if(!(e<0)){t=t.slice(e);var n;return t[0]==="+"&&(n=!0,t=t.slice(1)),t=t.replace(jbe,""),n&&(t="+"+t),t}}function Kbe(t){var e=Ybe(t)||"";return e[0]==="+"?[e.slice(1),!0]:[e]}function Xbe(t){var e=Kbe(t),n=qU(e,2),r=n[0],i=n[1];return Ube.test(r)||(r=""),[r,i]}function Rbe(t,e){return Jbe(t)||Qbe(t,e)||Wbe(t,e)||Gbe()}function Gbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4284
4284
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wbe(t,e){if(t){if(typeof t=="string")return $U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $U(t,e)}}function $U(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qbe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function Jbe(t){if(Array.isArray(t))return t}function Zbe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tye(t,e,n){return e&&eye(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var y5=function(){function t(e,n){Zbe(this,t),this.metadata=new go(n);var r=this.getCountryAndCallingCode(e),i=Rbe(r,2),a=i[0],s=i[1];this.defaultCountry=a,this.defaultCallingCode=s,this.reset()}return tye(t,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(h5(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,a=r.justLeadingPlus;if(a)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var l=this.state.getNationalDigits();l&&(s=this.formatter.format(l,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new ebe({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,a){n.metadata.selectNumberingPlan(a,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new Obe({state:this.state,metadata:this.metadata}),this.parser=new Hbe({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(l){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!l})+l},a=this.state.callingCode;return i(a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.complexPrefixBeforeNationalSignificantNumber,a=n.nationalPrefix,s=r,l=i||a;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Bc)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(W7e(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,a=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(a||i){var l=a?this.metadata.countryCallingCode():i;return"+"+l+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,a=n.callingCode,s=this._getCountry();if(r&&!(!s&&!a)){if(s&&s===this.defaultCountry){var l=new go(this.metadata.metadata);l.selectNumberingPlan(s);var c=l.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(c);if(u.length>1){var d=NU(r,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});d&&(s=d)}}var f=new $7e(s||a,r,this.metadata.metadata);return i&&(f.carrierCode=i),f}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function nye(t,e,n){return n||(n=e,e=void 0),new y5(e,n).input(t)}function jU(t){var e=t.inputFormat,n=t.country,r=t.metadata;return e==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(F1(n,r)):""}function A5(t,e){return e&&(t=t.slice(e.length),t[0]===" "&&(t=t.slice(1))),t}function rye(t,e,n){if(!(n&&n.ignoreRest)){var r=function(a){if(n)switch(a){case"end":n.ignoreRest=!0;break}};return gU(t,e,r)}}function zU(t){var e=t.onKeyDown,n=t.inputFormat;return F.useCallback(function(r){if(r.keyCode===aye&&n==="INTERNATIONAL"&&r.target instanceof HTMLInputElement&&iye(r.target)===sye.length){r.preventDefault();return}e&&e(r)},[e,n])}function iye(t){return t.selectionStart}var aye=8,sye="+",oye=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Hw.apply(this,arguments)}function lye(t,e){if(t==null)return{};var n=cye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function cye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function uye(t){function e(n,r){var i=n.onKeyDown,a=n.country,s=n.inputFormat,l=n.metadata,c=l===void 0?t:l;n.international,n.withCountryCallingCode;var u=lye(n,oye),d=F.useCallback(function(h){var p=new y5(a,c),v=jU({inputFormat:s,country:a,metadata:c}),m=p.input(v+h),A=p.getTemplate();return v&&(m=A5(m,v),A&&(A=A5(A,v))),{text:m,template:A}},[a,c]),f=zU({onKeyDown:i,inputFormat:s});return F.createElement(bg,Hw({},u,{ref:r,parse:rye,format:d,onKeyDown:f}))}return e=F.forwardRef(e),e.propTypes={value:Tn.string.isRequired,onChange:Tn.func.isRequired,onKeyDown:Tn.func,country:Tn.string,inputFormat:Tn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Tn.object},e}const dye=uye();var fye=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yw.apply(this,arguments)}function hye(t,e){if(t==null)return{};var n=pye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function pye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function gye(t){function e(n,r){var i=n.value,a=n.onChange,s=n.onKeyDown,l=n.country,c=n.inputFormat,u=n.metadata,d=u===void 0?t:u,f=n.inputComponent,h=f===void 0?"input":f;n.international,n.withCountryCallingCode;var p=hye(n,fye),v=jU({inputFormat:c,country:l,metadata:d}),m=F.useCallback(function(w){var x=b7e(w.target.value);if(x===i){var C=HU(v,x,l,d);C.indexOf(w.target.value)===0&&(x=x.slice(0,-1))}a(x)},[v,i,a,l,d]),A=zU({onKeyDown:s,inputFormat:c});return F.createElement(h,Yw({},p,{ref:r,value:HU(v,i,l,d),onChange:m,onKeyDown:A}))}return e=F.forwardRef(e),e.propTypes={value:Tn.string.isRequired,onChange:Tn.func.isRequired,onKeyDown:Tn.func,country:Tn.string,inputFormat:Tn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Tn.object,inputComponent:Tn.elementType},e}const mye=gye();function HU(t,e,n,r){return A5(nye(t+e,n,r),t)}function vye(t){if(t.length<2||t[0]!=="+")return!1;for(var e=1;e<t.length;){var n=t.charCodeAt(e);if(!(n>=48&&n<=57))return!1;e++}return!0}function bye(t){vye(t)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",t)}var yye=Tn.shape({country_calling_codes:Tn.object.isRequired,countries:Tn.object.isRequired});Tn.objectOf(Tn.string);function Kw(t,e){var n="+"+F1(t,e);return n}function Ag(t,e){return Cye(t)||Sye(t,e)||wye(t,e)||Aye()}function Aye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4285
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wye(t,e){if(t){if(typeof t=="string")return YU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YU(t,e)}}function YU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Sye(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Cye(t){if(Array.isArray(t))return t}function xye(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&s)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&a&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof s=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=Eye({international:s,country:i,defaultCountry:a,withCountryCallingCode:l}),f=F.useRef(),h=function(W,ee,Q){console.error("[react-phone-number-input] Expected phone number ".concat(W," to correspond to country ").concat(ee," but ").concat(Q?"in reality it corresponds to country "+Q:"it doesn't",".")),f.current=!0},p=function(W){return n&&bye(n),Tye(n,i,a,d,c,u,function(){W&&W.onCountryMismatch&&W.onCountryMismatch();for(var ee=arguments.length,Q=new Array(ee),H=0;H<ee;H++)Q[H]=arguments[H];h.apply(e,Q)})},v=F.useState(i),m=Ag(v,2),A=m[0],w=m[1],x=F.useState(a),C=Ag(x,2),T=C[0],S=C[1],E=F.useState(p()),_=Ag(E,2),P=_[0],O=_[1],k=F.useState(n),M=Ag(k,2),Y=M[0],N=M[1],z=F.useState(),$=Ag(z,2);$[0];var le=$[1],G=F.useCallback(function(){return le({})},[le]);function R(q){if(q){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(q="+".concat(F1(i,u)).concat(q));var W=new y5(i||a,u);return W.input(q),W.getNumberValue()}}F.useEffect(function(){n!==Y&&(N(n),O(p()))},[n]),F.useEffect(function(){if(i!==A){w(i);var q,W=p({onCountryMismatch:function(){q=!0}});O(W),q&&N(R(W))}},[i]),F.useEffect(function(){a!==T&&(S(a),O(p()))},[a]),F.useEffect(function(){Y!==n&&r(Y)},[Y]);var ce=F.useCallback(function(q){var W;if(i)if(d==="INTERNATIONAL"){var ee=Kw(i,u);if(q.indexOf(ee)!==0){if(q&&q[0]!=="+")q=ee+q;else if(!f.current)return O(ee),N(void 0),G()}}else q&&q[0]==="+"&&(q=q.slice(1));else a||q&&q[0]!=="+"&&(q="+"+q);q&&(W=R(q)),O(q),N(W)},[i,d,a,u,O,N,G,f]);return{phoneDigits:P,setPhoneDigits:ce,inputFormat:d}}function Tye(t,e,n,r,i,a,s){if(e&&r==="INTERNATIONAL"){var l=Kw(e,a);return t?(t.indexOf(l)!==0&&s(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new y5(void 0,a);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?s(t,e,u.country):u.countryCallingCode!==F1(e,a)&&s(t,e),r){case"NATIONAL":return k1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return k1(A5(u.formatInternational(),Kw(e,a)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===F1(n,a)&&i?k1(u.formatNational()):t;else return""}function Eye(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var Iye=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function Xw(){return Xw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xw.apply(this,arguments)}function _ye(t,e){if(t==null)return{};var n=Dye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Dye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function w5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=_ye(t,Iye),p=xye({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),v=p.phoneDigits,m=p.setPhoneDigits,A=p.inputFormat;return F.createElement(n,Xw({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:m}))}w5=F.forwardRef(w5),w5.propTypes={value:Tn.string,onChange:Tn.func.isRequired,country:Tn.string,defaultCountry:Tn.string,international:Tn.bool,withCountryCallingCode:Tn.bool,Component:Tn.elementType.isRequired,useNationalFormatForDefaultCountryValue:Tn.bool,metadata:yye};var Nye=["type","autoComplete","smartCaret","metadata"];function Rw(){return Rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rw.apply(this,arguments)}function Oye(t,e){if(t==null)return{};var n=Fye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Fye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function KU(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=Oye(n,Nye);return F.createElement(w5,Rw({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?dye:mye}))}return e=F.forwardRef(e),e.propTypes={type:Tn.string,autoComplete:Tn.string,smartCaret:Tn.bool,metadata:Tn.object},e}KU();const kye=KU(E8e),Pye=t=>{var Q,H,X,pe,ge,Ae,ye,oe,re,B,ne;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:p,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:C}=Ht(),[T,S]=F.useState(!1),[E,_]=F.useState(""),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),z=()=>{N(!0)},$=()=>{N(!1)},le=()=>{var se,me,Ne;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const we=[...v.repeatableFields],ve=It.findIndex(we,function(ue){return ue.uuid===(d==null?void 0:d.uuid)});ve>=0&&we[ve].fieldData?_(we[ve].fieldData):_("")}}else{const we=a;if(we!=null&&we.length){for(const ve of we)if(ve.fieldId===t.field.uuid&&((se=ve==null?void 0:ve.postData[0])==null?void 0:se.postValue)!==""&&((me=ve==null?void 0:ve.postData[0])!=null&&me.postValue)){_((Ne=ve==null?void 0:ve.postData[0])==null?void 0:Ne.postValue);break}}}M(!0)};F.useEffect(()=>{k||le();const se=Gt.addListener("clearRepeatableFields",ve=>{ve===(v==null?void 0:v.uuid)&&(_(""),O(0),d.isValid=0,u(p,h,m,A,f,d))}),me=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=d==null?void 0:d.attributes)!=null&&ve.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",ve=>{d.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),we=Gt.addListener("OnGetFieldValue",ve=>{var Te;const ue=(Te=ve==null?void 0:ve.repeatableColumn)==null?void 0:Te.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(d==null?void 0:d.uuid));ue!=null&&ue.length});return()=>{me.remove(),Ne.remove(),we.remove(),se.remove()}});const G=se=>{S(se)},R=()=>{S(!1)},ce=(se,me)=>{const Ne=a,we=It.cloneDeep(e);if(we[d==null?void 0:d.uuid]=se,(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:se});if(!(v!=null&&v.rowIsRepeatable)){n(we);const ve=Object.keys(we).length;r(ve)}},q=(se,me)=>{var Ne;if(a){const we=[...a],ve=It.findIndex(we,function(Te){return Te.rowId===(v==null?void 0:v.uuid)});let ue=(Ne=a[ve])==null?void 0:Ne.repeatableFields;ue={...ue,[se==null?void 0:se.uuid]:me},we[ve]={...we[ve],repeatableFields:ue},i(we)}_(me),me!==""?se.isValid=1:se.isValid=0},W=se=>{v!=null&&v.rowIsRepeatable?q(d,se):ce(se)},ee=o.jsxs("div",{onMouseOver:z,onMouseOut:$,children:[C&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${C&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:C?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Q=d==null?void 0:d.headerText)==null?void 0:Q[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((H=d==null?void 0:d.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",C?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(X=d==null?void 0:d.label)==null?void 0:X[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Vi,{message:(pe=d==null?void 0:d.toolTip)==null?void 0:pe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ae=(ge=d==null?void 0:d.icon)==null?void 0:ge.properties)==null?void 0:Ae.name)}),o.jsx(kye,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:E,onFocus:()=>O(1),onChange:W,international:!0,country:"GB",className:`${P===1&&((oe=d==null?void 0:d.attributes)!=null&&oe.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:w})]}),o.jsx("div",{children:((re=d==null?void 0:d.attributes)==null?void 0:re.required)&&o.jsx("small",{className:"error",children:P===1&&!E?(B=d==null?void 0:d.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ne=d==null?void 0:d.helperText)==null?void 0:ne[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Zi,{visibilty:T,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:ee})]})},Mye=t=>{var ce,q,W,ee,Q,H,X,pe,ge,Ae,ye;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isAdmin:l,isBuilderMode:c}=Ht(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:p,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=Ar(),{userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(""),[S,E]=F.useState(0),[_,P]=F.useState(!1),O=()=>{P(!0)},k=()=>{P(!1)};F.useEffect(()=>{w||$();const oe=Gt.addListener("clearRepeatableFields",B=>{B===(a==null?void 0:a.uuid)&&(T(""),E(0),e.isValid=0)}),re=Gt.addListener("onSubmitUserForm",()=>{var B;(B=e==null?void 0:e.attributes)!=null&&B.required?C!==""&&hu.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{re.remove(),oe.remove()}});const[M,Y]=F.useState(!1),N=oe=>{Y(oe)},z=()=>{Y(!1)},$=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(e==null?void 0:e.uuid)});se>=0&&ne[se].fieldData?T(ne[se].fieldData):T("")}}else{const ne=v;if(ne!=null&&ne.length){for(const se of ne)if(se.fieldId===t.field.uuid&&((oe=se==null?void 0:se.postData[0])==null?void 0:oe.postValue)!==""&&((re=se==null?void 0:se.postData[0])!=null&&re.postValue)){T((B=se==null?void 0:se.postData[0])==null?void 0:B.postValue),x(!0);break}}}x(!0)},le=oe=>{T(oe);const re=v,B=It.cloneDeep(d);if(oe!==""&&hu.test(oe)===!0){if(B[e==null?void 0:e.uuid]=oe,(re==null?void 0:re.length)>0)for(const ne of re)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:oe})}else if(delete B[e==null?void 0:e.uuid],(re==null?void 0:re.length)>0)for(const ne of re)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){f(B);const ne=Object.keys(B).length;h(ne)}},G=(oe,re)=>{var we;const B=[...v],ne=It.findIndex(B,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let se=(we=v[ne])==null?void 0:we.repeatableFields;const me=oe,Ne=me==null?void 0:me.uuid;se={...se,[Ne]:re},B[ne]={...B[ne],repeatableFields:se},p(B),T(re),re!==""&&hu.test(re)===!0?e.isValid=1:e.isValid=0},R=o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[c&&_&&o.jsx(Wr,{handleFieldSettingsSidebar:N,...t}),o.jsxs("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ce=e==null?void 0:e.headerText)==null?void 0:ce[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(W=e==null?void 0:e.label)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ee=e==null?void 0:e.toolTip)==null?void 0:ee[A==null?void 0:A.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((H=(Q=e==null?void 0:e.icon)==null?void 0:Q.properties)==null?void 0:H.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(X=e==null?void 0:e.placeholder)==null?void 0:X[A==null?void 0:A.type],value:C,onFocus:()=>E(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?G(r,i):le(oe.target.value)},className:S===1&&((pe=e==null?void 0:e.attributes)!=null&&pe.required)?C?"valid":"invalid":"valid'",readOnly:s})]}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:S===1&&!C?(Ae=e==null?void 0:e.validationMesssage)==null?void 0:Ae[A==null?void 0:A.type]:""})}),C!==""&&S===1&&hu.test(C)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ye=e==null?void 0:e.helperText)==null?void 0:ye[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(Zi,{visibilty:M,closeSettingFieldSidebar:z,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},Lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUNKldUhspzagxl0bNbFhRNGxSzqThgpTbYraJKUcAQAEAgIc0vHjxwWpu7jbpGEndkjolJSUdIb7Bj6u8pE0uDZvZsNyHXLrJo+gvXY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ghWlwRR7MtUwZJBRJtxqa2BY5j8m6B/kvZxsRa8zkAGaSb2Ys9uIfEvn265N0kPhdtbuzT9SSVVBrirKmnCR7Zp0s+zhZeF2t4qk/X0xRXADKINTxF4j/24VJbCa5iGyc6+UuajmhzI9s4keAqYGvvL8h/cPLPwxWATNJNDLKY7wPtHl3iW8Al0eIXPfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",qye=t=>{var R,ce,q,W,ee,Q,H,X,pe;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:p,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=F.useState(!1),[x,C]=F.useState(""),[T,S]=F.useState(0),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)};F.useEffect(()=>{A||z();const ge=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(C(""),S(0),e.isValid=0)}),Ae=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&hu.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Ae.remove(),ge.remove()}});const[k,M]=F.useState(!1),Y=ge=>{M(ge)},N=()=>{M(!1)},z=()=>{var ge,Ae,ye;if(i!=null&&i.rowIsRepeatable){const oe=[...(i==null?void 0:i.repeatableFields)||[]],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?C(oe[re].fieldData):C("")}else{const oe=p;if(oe!=null&&oe.length){for(const re of oe)if(re.fieldId===t.field.uuid&&((ge=re==null?void 0:re.postData[0])==null?void 0:ge.postValue)!==""&&((Ae=re==null?void 0:re.postData[0])!=null&&Ae.postValue)){C((ye=re==null?void 0:re.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},$=(ge,Ae)=>{C(Ae);const ye=p,oe=It.cloneDeep(u);if(ye!==null){if(Ae){if(oe[e==null?void 0:e.uuid]=Ae,(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:Ae})}else if(delete oe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(oe);const re=Object.keys(oe).length;f(re)}},le=(ge,Ae,ye,oe)=>{var se;const re=[...p],B=It.findIndex(re,function(me){return me.rowId===(i==null?void 0:i.uuid)});let ne=(se=p[B])==null?void 0:se.repeatableFields;ne={...ne,[ye==null?void 0:ye.uuid]:oe},re[B]={...re[B],repeatableFields:ne},h(re),C(oe),oe!==""&&hu.test(oe)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(q=e==null?void 0:e.label)==null?void 0:q[m==null?void 0:m.type]}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(W=e==null?void 0:e.toolTip)==null?void 0:W[m==null?void 0:m.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(S6,{cancelIcon:o.jsx("img",{src:Lye,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:Bye,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:Vye,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(ee=e==null?void 0:e.placeholder)==null?void 0:ee[m==null?void 0:m.type],value:x,onFocus:()=>S(1),onChange:ge=>{i!=null&&i.rowIsRepeatable?le(n,r,e,ge.value):$(ge,ge.value)},className:T===1&&((Q=e==null?void 0:e.attributes)!=null&&Q.required)?x?"valid":"invalid":"valid'",readOnly:a})}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(X=e==null?void 0:e.validationMesssage)==null?void 0:X[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(pe=e==null?void 0:e.helperText)==null?void 0:pe[m==null?void 0:m.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Zi,{visibilty:k,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:G})]})},Uye=t=>{var R,ce,q,W,ee,Q,H,X,pe;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:p,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=F.useState(!1),[x,C]=F.useState(""),[T,S]=F.useState(0),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)};F.useEffect(()=>{A||z();const ge=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(C(""),S(0),e.isValid=0)}),Ae=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&hu.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Ae.remove(),ge.remove()}});const[k,M]=F.useState(!1),Y=ge=>{M(ge)},N=()=>{M(!1)},z=()=>{var ge,Ae,ye;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const oe=[...i.repeatableFields],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?C(oe[re].fieldData):C("")}}else{const oe=p;if(oe!=null&&oe.length){for(const re of oe)if(re.fieldId===t.field.uuid&&((ge=re==null?void 0:re.postData[0])==null?void 0:ge.postValue)!==""&&((Ae=re==null?void 0:re.postData[0])!=null&&Ae.postValue)){C((ye=re==null?void 0:re.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},$=(ge,Ae)=>{C(Ae);const ye=p,oe=It.cloneDeep(u);if(ye!==null){if(Ae){if(oe[e==null?void 0:e.uuid]=Ae,(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:Ae})}else if(delete oe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(oe);const re=Object.keys(oe).length;f(re)}},le=(ge,Ae,ye,oe)=>{var se;const re=[...p],B=It.findIndex(re,function(me){return me.rowId===(i==null?void 0:i.uuid)});let ne=(se=p[B])==null?void 0:se.repeatableFields;ne={...ne,[ye==null?void 0:ye.uuid]:oe},re[B]={...re[B],repeatableFields:ne},h(re),C(oe),oe!==""&&hu.test(oe)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:l?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(q=e==null?void 0:e.label)==null?void 0:q[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(W=e==null?void 0:e.toolTip)==null?void 0:W[m==null?void 0:m.type],position:"right"})})]}),o.jsx(T6,{id:e==null?void 0:e.uuid,placeholder:(ee=e==null?void 0:e.placeholder)==null?void 0:ee[m==null?void 0:m.type],value:x,onFocus:()=>S(1),onChange:ge=>{i!=null&&i.rowIsRepeatable?le(n,r,e,ge.value):$(ge,ge.value)},className:T===1&&((Q=e==null?void 0:e.attributes)!=null&&Q.required)?x?"valid":"invalid":"valid'",readOnly:a}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(X=e==null?void 0:e.validationMesssage)==null?void 0:X[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(pe=e==null?void 0:e.helperText)==null?void 0:pe[m==null?void 0:m.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Zi,{visibilty:k,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:G})]})},$ye=t=>{var G,R,ce,q,W,ee;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,updateUserFormDataSubmit:f,userTaskSubmitFormData:h,TASK_PUBLISHED:p}=Ar(),{userSelectedLanguage:v}=sn(),[m,A]=F.useState(!1),[w,x]=F.useState(""),[C,T]=F.useState(0),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)};F.useEffect(()=>{m||N();const Q=Gt.addListener("clearRepeatableFields",X=>{X===(i==null?void 0:i.uuid)&&(x(""),T(0),e.isValid=0)}),H=Gt.addListener("onSubmitUserForm",()=>{var X;(X=e==null?void 0:e.attributes)!=null&&X.required&&(w!==""&&hu.test(w)===!0?e.isValid=1:e.isValid=0)});return()=>{H.remove(),Q.remove()}});const[O,k]=F.useState(!1),M=Q=>{k(Q)},Y=()=>{k(!1)},N=()=>{var Q,H,X;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const pe=[...i.repeatableFields],ge=It.findIndex(pe,function(Ae){return Ae.uuid===(e==null?void 0:e.uuid)});ge>=0&&pe[ge].fieldData?x(pe[ge].fieldData):x("")}}else{const pe=h;if(pe!=null&&pe.length){for(const ge of pe)if(ge.fieldId===t.field.uuid&&((Q=ge==null?void 0:ge.postData[0])==null?void 0:Q.postValue)!==""&&((H=ge==null?void 0:ge.postData[0])!=null&&H.postValue)){x((X=ge==null?void 0:ge.postData[0])==null?void 0:X.postValue),A(!0);break}}}A(!0)},z=(Q,H)=>{x(H);const X=h,pe=It.cloneDeep(c);if(H){if(pe[e==null?void 0:e.uuid]=H,(X==null?void 0:X.length)>0)for(const ge of X)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:H})}else if(delete pe[e==null?void 0:e.uuid],(X==null?void 0:X.length)>0)for(const ge of X)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){u(pe);const ge=Object.keys(pe).length;d(ge)}},$=(Q,H,X,pe)=>{var oe;const ge=[...h],Ae=It.findIndex(ge,function(re){return re.rowId===(i==null?void 0:i.uuid)});let ye=(oe=h[Ae])==null?void 0:oe.repeatableFields;ye={...ye,[X==null?void 0:X.uuid]:pe},ge[Ae]={...ge[Ae],repeatableFields:ye},f(ge),x(pe),pe!==""&&hu.test(pe)===!0?e.isValid=1:e.isValid=0},le=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[s&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:M,...t}),o.jsxs("div",{className:`field ${s&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:s?"card p-fluid field-form-builder":"p-fluid",children:[s&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(wn,{type:s===!1?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(G=e==null?void 0:e.placeholder)==null?void 0:G[v==null?void 0:v.type],value:(R=e==null?void 0:e.defaultValue)==null?void 0:R[v==null?void 0:v.type],onFocus:()=>T(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?$(n,r,e,e==null?void 0:e.defaultValue):z("",e==null?void 0:e.defaultValue)},className:C===1&&((ce=e==null?void 0:e.attributes)!=null&&ce.required)?w?"valid":"invalid":"valid'",readOnly:l===p}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ee=e==null?void 0:e.helperText)==null?void 0:ee[v==null?void 0:v.type]})})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[O===!0&&o.jsx(Zi,{visibilty:O,closeSettingFieldSidebar:Y,...t}),o.jsx(xi,{...t,fieldWrap:le})]})},XU=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=F.useState(e),{isBuilderMode:f}=Ht();F.useEffect(()=>{var S;return x((S=e[c])==null?void 0:S[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:p,fieldSettingUpdateInlineConditional:v,gridComponentFieldSettingUpdate:m}=sn(),A=(S,E,_)=>{d(P=>({...P,[S]:{...P[S],[E==null?void 0:E.type]:_}}))},[w,x]=F.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);F.useEffect(()=>(C(),()=>{}),[u]);const C=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(S[pa],S[ga],S[Ta],S[Ea],S[Ia],S[Pa],S[Go],S[Co],u):(S==null?void 0:S.length)>Pa&&(S==null?void 0:S.length)===ql+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(S[pa],S[ga],S[Ta],S[Ea],S[Ia],S[5],S[6],S[7],u):p(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(P3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:w,disabled:!f,onChange:S=>{var E;x(V3.sanitize((E=S==null?void 0:S.target)==null?void 0:E.value))},onBlur:S=>{var _;const E=V3.sanitize((_=S==null?void 0:S.target)==null?void 0:_.innerText);x(E),A(c,h,E)},tagName:"article"})})},jye=t=>{var ee,Q,H,X,pe,ge,Ae;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v,isDisabled:m}=t,{isBuilderMode:A,isAdmin:w}=Ht(),[x,C]=F.useState(!1),[T,S]=F.useState(""),[E,_]=F.useState(0),[P,O]=F.useState(!1),[k,M]=F.useState(!1),Y=()=>{M(!0)},N=()=>{M(!1)},z=()=>{var ye,oe,re;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const B=[...h.repeatableFields],ne=It.findIndex(B,function(se){return se.uuid===(c==null?void 0:c.uuid)});ne>=0&&B[ne].fieldData?S(B[ne].fieldData):S("")}}else{const B=a;if(B!=null&&B.length){for(const ne of B)if(ne.fieldId===t.field.uuid&&((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue)!==""&&((oe=ne==null?void 0:ne.postData[0])!=null&&oe.postValue)){S((re=ne==null?void 0:ne.postData[0])==null?void 0:re.postValue);break}}}O(!0)};F.useEffect(()=>{P||z();const ye=Gt.addListener("clearRepeatableFields",ne=>{ne===(h==null?void 0:h.uuid)&&(S(""),_(0),c.isValid=0,l(f,d,p,v,u,c))}),oe=Gt.addListener("onSubmitUserForm",()=>{var ne;(ne=c==null?void 0:c.attributes)!=null&&ne.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),re=Gt.addListener("OnInvalidFieldCatch",ne=>{c.uuid===(ne==null?void 0:ne.fieldId)?_(1):_(0)}),B=Gt.addListener("OnGetFieldValue",ne=>{var me;const se=(me=ne==null?void 0:ne.repeatableColumn)==null?void 0:me.filter(Ne=>(Ne==null?void 0:Ne.fieldUuid)===(c==null?void 0:c.uuid));se!=null&&se.length});return()=>{oe.remove(),re.remove(),B.remove(),ye.remove()}});const $=ye=>{C(ye)},le=()=>{C(!1)},G=ye=>{var B,ne;S(ye.target.value);const oe=a,re=It.cloneDeep(e);if(oe!==null){if((B=ye==null?void 0:ye.target)!=null&&B.value){if(re[c==null?void 0:c.uuid]=(ne=ye==null?void 0:ye.target)==null?void 0:ne.value,(oe==null?void 0:oe.length)>0)for(const se of oe)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:ye.target.value})}else if(delete re[c==null?void 0:c.uuid],(oe==null?void 0:oe.length)>0)for(const se of oe)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(re);const se=Object.keys(re).length;r(se)}},R=(ye,oe,re,B)=>{var ne;if(a){const se=[...a],me=It.findIndex(se,function(we){return we.rowId===(h==null?void 0:h.uuid)});let Ne=(ne=a[me])==null?void 0:ne.repeatableFields;Ne={...Ne,[re==null?void 0:re.uuid]:B},se[me]={...se[me],repeatableFields:Ne},i(se)}S(B),B!==""?re.isValid=1:re.isValid=0},ce=10,q=()=>{const ye=[];for(let oe=0;oe<=ce;oe++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:re=>{h!=null&&h.rowIsRepeatable?R(f,d,c,re.target.value):G(re)},checked:parseInt(T)===oe,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:oe,disabled:m}),o.jsx("span",{children:oe})]},`field-${c==null?void 0:c.uuid}-likertScale-${oe} ${parseInt(T)===oe?"scale-selected":""}`));return ye},W=o.jsxs("div",{onMouseOver:Y,onMouseOut:N,children:[A&&k&&o.jsx(Wr,{handleFieldSettingsSidebar:$,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ee=c==null?void 0:c.headerText)==null?void 0:ee[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(H=c==null?void 0:c.label)==null?void 0:H[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Vi,{message:(X=c==null?void 0:c.toolTip)==null?void 0:X[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(XU,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(XU,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:q()})]})}),o.jsx("div",{children:((pe=c==null?void 0:c.attributes)==null?void 0:pe.required)&&o.jsx("small",{className:"error",children:E===1&&!T?(ge=c==null?void 0:c.validationMesssage)==null?void 0:ge.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ae=c==null?void 0:c.helperText)==null?void 0:Ae[s==null?void 0:s.type]})})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:le,...t}),o.jsx(xi,{...t,fieldWrap:W})]})},zye=t=>{var Q,H,X,pe,ge,Ae,ye,oe,re,B,ne,se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:p,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isBuilderMode:x,isAdmin:C,isRenderView:T}=Ht(),[S,E]=F.useState(!1),[_,P]=F.useState(""),[O,k]=F.useState(0),[M,Y]=F.useState(!1),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=()=>{var me,Ne,we;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const ve=[...v.repeatableFields],ue=It.findIndex(ve,function(Te){return Te.uuid===(d==null?void 0:d.uuid)});ue>=0&&ve[ue].fieldData?P(ve[ue].fieldData):P("")}}else{const ve=a;if(ve!=null&&ve.length){for(const ue of ve)if(ue.fieldId===t.field.uuid&&((me=ue==null?void 0:ue.postData[0])==null?void 0:me.postValue)!==""&&((Ne=ue==null?void 0:ue.postData[0])!=null&&Ne.postValue)){P((we=ue==null?void 0:ue.postData[0])==null?void 0:we.postValue);break}}}Y(!0)};F.useEffect(()=>{M||G();const me=Gt.addListener("clearRepeatableFields",ue=>{ue===(v==null?void 0:v.uuid)&&(P(""),k(0),d.isValid=0,u(p,h,m,A,f,d))}),Ne=Gt.addListener("onSubmitUserForm",()=>{var ue;(ue=d==null?void 0:d.attributes)!=null&&ue.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),we=Gt.addListener("OnInvalidFieldCatch",ue=>{d.uuid===(ue==null?void 0:ue.fieldId)?k(1):k(0)}),ve=Gt.addListener("OnGetFieldValue",ue=>{var _e;const Te=(_e=ue==null?void 0:ue.repeatableColumn)==null?void 0:_e.filter(K=>(K==null?void 0:K.fieldUuid)===(d==null?void 0:d.uuid));Te!=null&&Te.length});return()=>{Ne.remove(),we.remove(),ve.remove(),me.remove()}});const R=me=>{E(me)},ce=()=>{E(!1)},q=me=>{var ve,ue;P(me.target.value);const Ne=a,we=It.cloneDeep(e);if(Ne!==null){if((ve=me==null?void 0:me.target)!=null&&ve.value){if(we[d==null?void 0:d.uuid]=(ue=me==null?void 0:me.target)==null?void 0:ue.value,(Ne==null?void 0:Ne.length)>0)for(const Te of Ne)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:me.target.value})}else if(delete we[d==null?void 0:d.uuid],(Ne==null?void 0:Ne.length)>0)for(const Te of Ne)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:""})}if(!(v!=null&&v.rowIsRepeatable)){n(we);const Te=Object.keys(we).length;r(Te)}},W=(me,Ne)=>{var we;if(a){const ve=[...a],ue=It.findIndex(ve,function(_e){return _e.rowId===(v==null?void 0:v.uuid)});let Te=(we=a[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},i(ve)}P(Ne),Ne!==""?me.isValid=1:me.isValid=0},ee=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[x&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${x&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Q=d==null?void 0:d.headerText)==null?void 0:Q[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((H=d==null?void 0:d.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(X=d==null?void 0:d.label)==null?void 0:X[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Vi,{message:(pe=d==null?void 0:d.toolTip)==null?void 0:pe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ae=(ge=d==null?void 0:d.icon)==null?void 0:ge.properties)==null?void 0:Ae.name)}),o.jsx(wn,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:_,onFocus:()=>k(1),onChange:me=>{v!=null&&v.rowIsRepeatable?W(d,me.target.value):q(me)},className:O===1&&((oe=d==null?void 0:d.attributes)!=null&&oe.required)?_?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:w})]}),o.jsx("div",{children:((re=d==null?void 0:d.attributes)==null?void 0:re.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(B=d==null?void 0:d.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ne=d==null?void 0:d.helperText)==null?void 0:ne[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(se=d==null?void 0:d.fontStyle)==null?void 0:se.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:_})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:ce,...t}),o.jsx(xi,{...t,fieldWrap:ee})]})},Hye=t=>{var ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e,K,Ee,be,he;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:a,task_status:s}=Ar(),{globalAlignment:l}=Ht(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{isAdmin:d,isBuilderMode:f}=Ht(),h=fe=>{const xe=fe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Me=`${fe.className} justify-content-start`,Be=`${fe.titleClassName} pl-1`;return o.jsxs("div",{className:Me,children:[o.jsxs("button",{className:fe.togglerClassName,onClick:fe.onTogglerClick,children:[o.jsx("span",{className:xe}),o.jsx(Qt,{})]}),o.jsx("span",{className:Be,children:le})]})},{field:p,fieldIndex:v,sectionIndex:m,pageIndex:A,row:w,rowIndex:x,columnIndex:C,isDisabled:T}=t,[S,E]=F.useState(!1),[_,P]=F.useState(null),[O,k]=F.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[M,Y]=F.useState(!1),N=()=>{Y(!0)},z=()=>{Y(!1)},$=(fe,xe)=>{let Me={...O};Me={...Me,[fe]:xe},k(Me),(Me==null?void 0:Me.addressOne)!==""&&(Me!=null&&Me.addressTwo)&&(Me!=null&&Me.zipcode)&&ge(Me==null?void 0:Me.zipcode)?(p.isValid=1,H(Me,!0)):(p.isValid=0,H(null,!1))},[le]=F.useState((ye=p==null?void 0:p.label)==null?void 0:ye[c==null?void 0:c.type]),[G,R]=F.useState(0),[ce,q]=F.useState(!1),W=()=>{var fe,xe;if(!(w!=null&&w.rowIsRepeatable)){const Me=i;if(Me!=null&&Me.length){for(const Be of Me)if(Be.fieldId===t.field.uuid&&((fe=Be==null?void 0:Be.postData[0])!=null&&fe.postValue)){k((xe=Be==null?void 0:Be.postData[0])==null?void 0:xe.postValue);break}}}q(!0)};F.useEffect(()=>{ce||W();const fe=Gt.addListener("clearRepeatableFields",st=>{st===(w==null?void 0:w.uuid)&&(R(0),p.isValid=0,u(A,m,x,C,v,p))}),xe=Gt.addListener("onSubmitUserForm",()=>{var st;(st=p==null?void 0:p.attributes)!=null&&st.required?(O==null?void 0:O.addressOne)!==""&&(O==null?void 0:O.zipcode)!==""&&ge(O==null?void 0:O.zipcode)?p.isValid=1:p.isValid=0:p.isValid=1}),Me=Gt.addListener("OnInvalidFieldCatch",st=>{p.uuid===(st==null?void 0:st.fieldId)?R(1):R(0)}),Be=Gt.addListener("OnGetFieldValue",st=>{var St;const ut=(St=st==null?void 0:st.repeatableColumn)==null?void 0:St.filter(zt=>(zt==null?void 0:zt.fieldUuid)===(p==null?void 0:p.uuid));ut!=null&&ut.length}),Je=Gt.addListener("formFieldAdded",st=>{_===null&&P(st.uuid)});return()=>{xe.remove(),Me.remove(),Be.remove(),fe.remove(),Je.remove()}});const ee=fe=>{E(fe)},Q=()=>{E(!1)},H=(fe,xe)=>{const Me=i,Be=It.cloneDeep(e);if(xe){if(Be[p==null?void 0:p.uuid]=fe,(Me==null?void 0:Me.length)>0)for(const Je of Me)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe})}else if(delete Be[p==null?void 0:p.uuid],(Me==null?void 0:Me.length)>0)for(const Je of Me)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe});if(!(w!=null&&w.rowIsRepeatable)){n(Be);const Je=Object.keys(Be).length;r(Je)}},X=()=>{let fe="";return f&&(fe=fe+" field-form-builder"),s===a&&d===!0&&(fe=fe+" card"),fe},pe=()=>{let fe=!1;return O.addressOne!==""&&O.zipcode!==""&&ge(O.zipcode)&&(fe=!0),fe};function ge(fe){const xe=/\d/.test(fe),Me=/[a-zA-Z]/.test(fe);return xe&&Me?!0:!!xe}F.useEffect(()=>(_!==null&&setTimeout(()=>{P(null)},1e3),()=>{}),[_]);const Ae=o.jsxs("div",{onMouseOver:N,onMouseOut:z,children:[f&&M&&o.jsx(Wr,{handleFieldSettingsSidebar:ee,...t}),o.jsxs("div",{className:`field ${f&&" py-3 px-4 builder-element-wrapper "}${(p==null?void 0:p.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${f&&"p-fluid"}`,children:[(p==null?void 0:p.showHeaderText)&&o.jsx("h6",{children:(oe=p==null?void 0:p.headerText)==null?void 0:oe[c==null?void 0:c.type]}),(p==null?void 0:p.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((re=p==null?void 0:p.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(B=p==null?void 0:p.label)==null?void 0:B[c==null?void 0:c.type]}):o.jsx(oa,{...t}),o.jsx("span",{className:"ml-3",children:(p==null?void 0:p.showToolTip)&&o.jsx(Vi,{message:(ne=p==null?void 0:p.toolTip)==null?void 0:ne[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(se=p==null?void 0:p.addresslineFirstLabel)==null?void 0:se[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.addressOne||"",onChange:fe=>$("addressOne",fe.target.value),className:"my-2 ",readOnly:T}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(me=p==null?void 0:p.addresslineSecondLabel)==null?void 0:me[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.addressTwo||"",onChange:fe=>$("addressTwo",fe.target.value),className:"my-2",readOnly:T}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ne=p==null?void 0:p.postalcodeLabel)==null?void 0:Ne[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.zipcode||"",onChange:fe=>$("zipcode",fe.target.value),className:"my-2",readOnly:T}),o.jsx("p",{children:!ge(O.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((we=p==null?void 0:p.attributes)==null?void 0:we.required)&&!pe()&&o.jsx("small",{className:"error",children:G===1?(ve=p==null?void 0:p.validationMesssage)==null?void 0:ve.language:""}),(p==null?void 0:p.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"binary",checked:O.isBillingAddressSame,onChange:fe=>{$("isBillingAddressSame",fe.checked),fe.checked?k(xe=>({...xe,billingCountry:O.country,billingCity:O.city,billingState:O.state,billingAddressOne:O.addressOne,billingAddressTwo:O.addressTwo,billingZipcode:O.zipcode})):k(xe=>({...xe,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:T}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),O.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(p==null?void 0:p.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[((ue=p==null?void 0:p.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(Te=p==null?void 0:p.billingLabel)==null?void 0:Te[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(p==null?void 0:p.showToolTip)&&o.jsx(Vi,{message:(_e=p==null?void 0:p.toolTip)==null?void 0:_e[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(K=p==null?void 0:p.addresslineFirstLabel)==null?void 0:K[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingAddressOne||"",onChange:fe=>$("billingAddressOne",fe.target.value),className:"my-2",readOnly:T}),o.jsx("label",{htmlFor:"",children:(Ee=p==null?void 0:p.addresslineSecondLabel)==null?void 0:Ee[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingAddressTwo||"",onChange:fe=>$("billingAddressTwo",fe.target.value),className:"my-2",readOnly:T}),o.jsx("label",{htmlFor:"",children:(be=p==null?void 0:p.postalcodeLabel)==null?void 0:be[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingZipcode||"",onChange:fe=>$("billingZipcode",fe.target.value),className:"my-2",readOnly:T}),!ge(O.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(p==null?void 0:p.showHelperText)&&o.jsx("small",{children:(he=p==null?void 0:p.helperText)==null?void 0:he[c==null?void 0:c.type]})})]})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:Q,...t}),o.jsx("div",{dir:l?"ltr":"rtl",className:X(),children:s===a&&d===!0?o.jsx(ci,{headerTemplate:h,toggleable:!0,children:Ae}):Ae})]})},Yye=t=>{var C;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:p,columnIndex:v}=t,{handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w}=Ht(),x=(T,S)=>{s(T,S)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((C=a.children)==null?void 0:C.length)>0&&a.children.map((T,S)=>{const E=T[`${n.rowIndex}-${n.columnIndex}`];return E?o.jsx("div",{children:o.jsx(Vc,{type:"grid",showFieldIcons:!1,onChange:x,data:E,field:E,path:`${i}-${n.rowIndex}-${n.columnIndex}-${S}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:p,columnIndex:v,fieldIndex:S,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${S}`):null}),n&&w===!0&&o.jsx("div",{className:"py-5",children:o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:m})})]})},RU=t=>{var M,Y,N,z,$,le,G;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,userSelectedLanguage:c,fieldIndex:u,customColumnHeaderTemplate:d,onSetValuetoPostData:f,setAllFields:h,allFields:p,actionHeaderTemplate:v,actionBodyTemplate:m,isFocus:A,inputValue:w,handleFieldSettingsSidebar:x,isAdmin:C,emitSocketData:T,isRenderView:S}=t,[E,_]=F.useState(!1),{isBuilderMode:P}=Ht(),O=()=>{_(!0)},k=()=>{_(!1)};return o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[P&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:x,...t}),o.jsxs("div",{className:`field ${P&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(M=e==null?void 0:e.headerText)==null?void 0:M[c==null?void 0:c.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",P?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(N=e==null?void 0:e.label)==null?void 0:N[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(z=e==null?void 0:e.toolTip)==null?void 0:z[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ao,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((R,ce)=>o.jsx(xr,{style:{minWidth:350},header:d(R,ce),body:(q,W)=>o.jsx(Yye,{customColumn:R,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:q,indexes:W,customColumnIndex:ce,onSetValuetoPostData:f,setAllFields:h,allFields:p,emitSocketData:T,field:e,...t})},R==null?void 0:R.uuid)),P&&o.jsx(xr,{frozen:!0,header:R=>v(R),body:(R,ce)=>m(R,ce),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:(($=e==null?void 0:e.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:A===1&&!w?(le=e==null?void 0:e.validationMesssage)==null?void 0:le.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(G=e==null?void 0:e.helperText)==null?void 0:G[c==null?void 0:c.type]})})]})]})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Kye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const[i,a]=F.useState((n==null?void 0:n.customKey)||"");return o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{r(n,i),e(!1)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i,onChange:s=>{a(s.target.value)}})})})},GU=t=>{var oe;const{globalAlignment:e}=Ht(),n=re=>{const B=re.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ne=`${re.className} justify-content-start`,se=`${re.titleClassName} pl-1`;return o.jsxs("div",{className:ne,children:[o.jsxs("button",{className:re.togglerClassName,onClick:re.onTogglerClick,children:[o.jsx("span",{className:B}),o.jsx(Qt,{})]}),o.jsx("span",{className:se,children:S})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:p,rowIndex:v,columnIndex:m,isAdmin:A}=t,[w,x]=F.useState(!1),[C,T]=F.useState(""),[S]=F.useState((oe=u==null?void 0:u.label)==null?void 0:oe[s==null?void 0:s.type]),[E,_]=F.useState(0),[P,O]=F.useState(!1),[k,M]=F.useState(null),[Y,N]=F.useState([]),z=()=>{var re,B,ne;if(p!=null&&p.rowIsRepeatable){if(p!=null&&p.repeatableFields){const se=[...p.repeatableFields],me=It.findIndex(se,function(Ne){return Ne.uuid===(u==null?void 0:u.uuid)});me>=0&&se[me].fieldData?T(se[me].fieldData):T("")}}else{const se=r;if(se!=null&&se.length){for(const me of se)if(me.fieldId===t.field.uuid&&((re=me==null?void 0:me.postData[0])==null?void 0:re.postValue)!==""&&((B=me==null?void 0:me.postData[0])!=null&&B.postValue)){T((ne=me==null?void 0:me.postData[0])==null?void 0:ne.postValue);break}}}O(!0)},$=()=>{const re=u;re.customColumnsForOptions=[...re.customColumnsForOptions,{customKey:"Column",uuid:tt()}],ye(re)},[le,G]=F.useState(!1),R=(re,B)=>{var ne;return o.jsxs(o.Fragment,{children:[((ne=u==null?void 0:u.options)==null?void 0:ne.length)>1&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>W(re==null?void 0:re.uuid,B==null?void 0:B.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ge(),"aria-label":"Add Row",size:"small"})]})},ce=(re,B)=>{var ne;return o.jsxs(o.Fragment,{children:[re==null?void 0:re.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ne=u==null?void 0:u.customColumnsForOptions)==null?void 0:ne.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>ee(re==null?void 0:re.uuid,B)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{M(re),G(!0)}})]})]})},q=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>$(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),W=(re,B)=>{var we,ve;const ne=(we=u==null?void 0:u.customColumnsForOptions)==null?void 0:we.length,se=[...(u==null?void 0:u.children)||[]];(ve=u==null?void 0:u.children)==null||ve.map(ue=>{for(let Te=0;Te<ne;Te++)if(ue[`${B}-${Te}`]!==void 0){const _e=It.findIndex(se,function(K){return K[`${B}-${Te}`]!==void 0});se.splice(_e,1)}});for(let ue=0;ue<(se==null?void 0:se.length);ue++){const Te=se[ue],K=Object.keys(Te)[0].split("-");parseInt(K[0])>B&&(se[ue]={[`${parseInt(K[0])-1}-${K[1]}`]:se[ue][`${parseInt(K[0])}-${K[1]}`]})}const me=u==null?void 0:u.options.filter(function(ue){return(ue==null?void 0:ue.uuid)!==re}),Ne={...u,children:[...se]};Ne.options=me,ye(Ne)},ee=(re,B)=>{var ve,ue;const ne=It.findIndex(u==null?void 0:u.customColumnsForOptions,Te=>Te.uuid===re),se=u==null?void 0:u.customColumnsForOptions.filter(function(Te,_e){return _e!==ne}),me=(ve=u==null?void 0:u.options)==null?void 0:ve.length,Ne=[...(u==null?void 0:u.children)||[]];(ue=u==null?void 0:u.children)==null||ue.map(Te=>{for(let _e=0;_e<me;_e++)if(Te[`${_e}-${B}`]!==void 0){const K=It.findIndex(Ne,function(Ee){return Ee[`${_e}-${B}`]!==void 0});Ne.splice(K,1)}});for(let Te=0;Te<(Ne==null?void 0:Ne.length);Te++){const _e=Ne[Te],Ee=Object.keys(_e)[0].split("-");parseInt(Ee[1])>B&&(Ne[Te]={[`${parseInt(Ee[0])}-${parseInt(Ee[1])-1}`]:Ne[Te][`${parseInt(Ee[0])}-${Ee[1]}`]})}const we={...u,children:[...Ne]};we.customColumnsForOptions=se,ye(we)};F.useEffect(()=>{P||z();const re=Gt.addListener("clearRepeatableFields",me=>{me===(p==null?void 0:p.uuid)&&(T(""),_(0),u.isValid=0,l(h,f,v,m,d,u))}),B=Gt.addListener("onSubmitUserForm",()=>{var me;(me=u==null?void 0:u.attributes)!=null&&me.required&&(u.isValid=1)}),ne=Gt.addListener("OnInvalidFieldCatch",me=>{u.uuid===(me==null?void 0:me.fieldId)?_(1):_(0)}),se=Gt.addListener("OnGetFieldValue",me=>{var we;const Ne=(we=me==null?void 0:me.repeatableColumn)==null?void 0:we.filter(ve=>(ve==null?void 0:ve.fieldUuid)===(u==null?void 0:u.uuid));Ne!=null&&Ne.length});return()=>{B.remove(),ne.remove(),se.remove(),re.remove()}});const Q=re=>{x(re)},H=()=>{x(!1)},X=(re,B)=>{var se;const ne=r;if((ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:{...(se=me.postData[0])==null?void 0:se.postValue,[re]:B}})},pe=()=>{let re="";return c&&(re=re+" field-form-builder"),a===i&&A===!0&&(re=re+" card"),re},ge=()=>{const re=u;re.options=[...re.options,{uuid:tt(),custom_values:{}}],ye(re)},Ae=(re,B)=>{M(Ne=>Ne===null?{customKey:B,uuid:""}:{...Ne,customKey:B});const ne=u.customColumnsForOptions,se=ne.findIndex(Ne=>Ne.uuid===re.uuid);ne[se]={...ne[se],customKey:B};const me=u;me.customColumnsForOptions=ne,ye(me)},ye=re=>{l(h,f,v,m,d,re)};return o.jsxs(o.Fragment,{children:[le&&o.jsx(Kye,{showAddNewColumn:le,setShowAddNewColumn:G,customColumnEditModalData:k,onHandleChangeCustomColumnSetting:Ae}),w&&o.jsx(Zi,{visibilty:w,closeSettingFieldSidebar:H,...t}),o.jsx("div",{dir:e,className:pe(),children:a===i&&A===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(RU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ce,onSetValuetoPostData:X,setAllFields:re=>N(re),allFields:Y,actionHeaderTemplate:q,actionBodyTemplate:R,addOption:ge,isFocus:E,inputValue:C,handleFieldSettingsSidebar:Q,isAdmin:A})}):o.jsx(RU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ce,onSetValuetoPostData:X,setAllFields:re=>N(re),allFields:Y,actionHeaderTemplate:q,actionBodyTemplate:R,addOption:ge,isFocus:E,inputValue:C,handleFieldSettingsSidebar:Q,isAdmin:A})})]})},Xye=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(La,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},WU=t=>{var C,T,S,E,_,P,O;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,customColumnRowBodyTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,handleFieldSettingsSidebar:h,isAdmin:p}=t,{isBuilderMode:v}=Ht(),[m,A]=F.useState(!1),w=()=>{A(!0)},x=()=>{A(!1)};return o.jsxs("div",{onMouseOver:w,onMouseOut:x,children:[v&&m&&o.jsx(Wr,{handleFieldSettingsSidebar:h,...t}),o.jsxs("div",{className:`field ${v&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${v&&"p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(C=e==null?void 0:e.headerText)==null?void 0:C[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((T=e==null?void 0:e.attributes)==null?void 0:T.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",v?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.label)==null?void 0:S[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ao,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(xr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:k=>a(k)}),e==null?void 0:e.customColumns.map((k,M)=>o.jsx(xr,{header:i(k),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(Y,N)=>o.jsx(Xye,{customColumn:k,e:Y,indexes:N,customColumnIndex:M,setAllFields:s,allFields:l,...t})},k==null?void 0:k.uuid)),v===!0&&o.jsx(xr,{frozen:!0,header:k=>c(k),body:k=>u(k),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(P=e==null?void 0:e.validationMesssage)==null?void 0:P.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(O=e==null?void 0:e.helperText)==null?void 0:O[n==null?void 0:n.type]})})]})]})}),p&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Rye=(t,e)=>{var Te,_e;const n=K=>{const Ee=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",be=`${K.className} justify-content-start`,he=`${K.titleClassName} pl-1`;return o.jsxs("div",{className:be,children:[o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ee}),o.jsx(Qt,{})]}),o.jsx("span",{className:he,children:E})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{field:f,fieldIndex:h,sectionIndex:p,pageIndex:v,row:m,rowIndex:A,columnIndex:w}=t,[x,C]=F.useState(!1),[T,S]=F.useState(""),[E]=F.useState((Te=f==null?void 0:f.label)==null?void 0:Te[u==null?void 0:u.type]),[_,P]=F.useState(0),[O,k]=F.useState(!1),[M,Y]=F.useState(null),[N,z]=F.useState(null),[$,le]=F.useState({}),G=()=>{var K,Ee,be;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const he=[...m.repeatableFields],fe=It.findIndex(he,function(xe){return xe.uuid===(f==null?void 0:f.uuid)});fe>=0&&he[fe].fieldData?S(he[fe].fieldData):S("")}}else{const he=r;if(he!=null&&he.length){for(const fe of he)if(fe.fieldId===t.field.uuid&&((K=fe==null?void 0:fe.postData[0])==null?void 0:K.postValue)!==""&&((Ee=fe==null?void 0:fe.postData[0])!=null&&Ee.postValue)){S((be=fe==null?void 0:fe.postData[0])==null?void 0:be.postValue);break}}}k(!0)},R=()=>{const K=f;K.customColumns=[...K.customColumns,{customKey:"Column",uuid:tt(),options:[]}],me(K)},[ce,q]=F.useState(!1),[W,ee]=F.useState(!1),Q=K=>{var Ee;return o.jsxs(o.Fragment,{children:[((Ee=f==null?void 0:f.rows)==null?void 0:Ee.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>ge(K==null?void 0:K.uuid),"aria-label":"Add Row"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>B(),"aria-label":"Add Row"})]})},H=K=>{var Ee;return o.jsxs(o.Fragment,{children:[K==null?void 0:K.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((Ee=f==null?void 0:f.customColumns)==null?void 0:Ee.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Ae(K==null?void 0:K.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{Y(K),q(!0)}})]})]})},X=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>R(),"aria-label":"Add Column"})}),pe=K=>o.jsxs(o.Fragment,{children:[K==null?void 0:K.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{z(K),ee(!0)}})})]}),ge=K=>{const Ee=f==null?void 0:f.rows.filter(function(he){return(he==null?void 0:he.uuid)!==K}),be=f;be.rows=Ee,me(be)},Ae=K=>{const Ee=It.findIndex(f==null?void 0:f.customColumns,fe=>fe.uuid===K),be=f==null?void 0:f.customColumns.filter(function(fe,xe){return xe!==Ee}),he=f;he.customColumns=be,me(he)};F.useEffect(()=>{O||G();const K=Gt.addListener("clearRepeatableFields",he=>{he===(m==null?void 0:m.uuid)&&(S(""),P(0),f.isValid=0,d(v,p,A,w,h,f))}),Ee=Gt.addListener("OnInvalidFieldCatch",he=>{f.uuid===(he==null?void 0:he.fieldId)?P(1):P(0)}),be=Gt.addListener("OnGetFieldValue",he=>{var xe;const fe=(xe=he==null?void 0:he.repeatableColumn)==null?void 0:xe.filter(Me=>(Me==null?void 0:Me.fieldUuid)===(f==null?void 0:f.uuid));fe!=null&&fe.length});return()=>{Ee.remove(),be.remove(),K.remove()}});const ye=K=>{C(K)},oe=()=>{C(!1)},re=()=>{let K="";return c&&(K=K+" field-form-builder"),a===i&&l===!0&&(K=K+" card"),K},B=()=>{const K=f;K.rows=[...K.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],me(K)},ne=(K,Ee)=>{Y(xe=>xe===null?{customKey:Ee,uuid:""}:{...xe,customKey:Ee});const be=f.customColumns,he=be.findIndex(xe=>xe.uuid===K.uuid);be[he]={...be[he],customKey:Ee};const fe=f;fe.customColumns=be,me(fe)},se=(K,Ee)=>{z(xe=>xe===null?{uuid:"",rowHeading:Ee}:{...xe,rowHeading:Ee});const be=f.rows,he=be.findIndex(xe=>xe.uuid===K.uuid);be[he]={...be[he],rowHeading:Ee};const fe=f;fe.rows=be,me(fe)},me=K=>{d(v,p,A,w,h,K)};function Ne(K){return K.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const we=(K,Ee,be)=>{const he=f.customColumns,fe=he.findIndex(Me=>M&&Me.uuid===M.uuid);he[fe].options[be][Ee]=K,he[fe].options[be].value=Ne(K);const xe=f;xe.customColumns=he,me(xe)},ve=()=>{const K=f.customColumns,Ee=K.findIndex(he=>M&&he.uuid===M.uuid);K[Ee].options.push({label:"",value:"",uuid:tt()});const be=f;be.customColumns=K,me(be)},ue=K=>{const Ee=f.customColumns,be=Ee.findIndex(fe=>M&&fe.uuid===M.uuid);if(be===-1){console.error("Custom column not found");return}Ee[be].options=Ee[be].options.filter(fe=>fe.uuid!==K);const he=f;he.customColumns=Ee,me(he)};return o.jsxs(o.Fragment,{children:[o.jsxs(Ks,{maximizable:!0,header:"Update column title",visible:ce,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Ft,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ve()}),o.jsx(Ft,{text:!0,label:"Save",onClick:()=>q(!1)})]}),onHide:()=>q(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(M==null?void 0:M.customKey)||"",onChange:K=>ne(M,K.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(M==null?void 0:M.options)&&((_e=M==null?void 0:M.options)==null?void 0:_e.length)>0&&(M==null?void 0:M.options.map((K,Ee)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:Ee+1}),o.jsx(wn,{value:(K==null?void 0:K.label)||"",className:"ml-2",onChange:be=>we(be.target.value,"label",Ee)}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>ue(K.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${Ee}`)))]}),o.jsx(Ks,{maximizable:!0,header:"Update Row Title",visible:W,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>ee(!1)}),onHide:()=>ee(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(N==null?void 0:N.rowHeading)||"",onChange:K=>se(N,K.target.value)})})}),o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:oe,...t}),o.jsx("div",{dir:s,className:re(),children:a===i&&l===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(WU,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:pe,setAllFields:le,allFields:$,actionHeaderTemplate:X,actionBodyTemplate:Q,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})}):o.jsx(WU,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:pe,setAllFields:le,allFields:$,actionHeaderTemplate:X,actionBodyTemplate:Q,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})})]})},Gye=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,a=s=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=s,r(l)};return o.jsx("div",{children:o.jsx(wn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:s=>a(s.target.value)})})},QU=t=>{var p,v,m,A,w,x,C;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,setAllFields:a,allFields:s,actionHeaderTemplate:l,actionBodyTemplate:c,isFocus:u,inputValue:d,isAdmin:f}=t,{isBuilderMode:h}=Ht();return o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(p=e==null?void 0:e.headerText)==null?void 0:p[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",h?o.jsx(oa,{path:"",...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(ao,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,S)=>o.jsx(xr,{header:i(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(E,_)=>o.jsx(Gye,{customColumn:T,e:E,indexes:_,customColumnIndex:S,setAllFields:a,allFields:s,...t})},T==null?void 0:T.uuid)),h===!0&&o.jsx(xr,{frozen:!0,header:T=>l(T),body:T=>c(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:u===1&&!d?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(C=e==null?void 0:e.helperText)==null?void 0:C[n==null?void 0:n.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})},Wye=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,a]=F.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(Ks,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i||"",onChange:s=>a(s.target.value)})})})},Qye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=O3({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:a=>{const s={};return a.columnValue||(s.columnValue="Column value is required"),s},onSubmit:a=>{e(!1),r(n,a.columnValue)}});return o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(wn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},Jye=t=>{var me;const e=Ne=>{const we=Ne.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ve=`${Ne.className} justify-content-start`,ue=`${Ne.titleClassName} pl-1`;return o.jsxs("div",{className:ve,children:[o.jsxs("button",{className:Ne.togglerClassName,onClick:Ne.onTogglerClick,children:[o.jsx("span",{className:we}),o.jsx(Qt,{})]}),o.jsx("span",{className:ue,children:C})]})},{TASK_PUBLISHED:n,task_status:r}=Ar(),{userSelectedLanguage:i,fieldSettingUpdate:a}=sn(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,rowIndex:p,columnIndex:v}=t,[m,A]=F.useState(!1),[w,x]=F.useState(""),[C]=F.useState((me=u==null?void 0:u.label)==null?void 0:me[i==null?void 0:i.type]),[T,S]=F.useState(0),[E,_]=F.useState(null),[P,O]=F.useState(null),[k,M]=F.useState((u==null?void 0:u.allFields)||{}),[Y,N]=F.useState(!1),z=()=>{const Ne=u;Ne.customColumns=[...Ne.customColumns,{customKey:"Column",uuid:tt(),options:[]}],B(Ne)},[$,le]=F.useState(!1),[G,R]=F.useState(!1),ce=F.useCallback(It.debounce(Ne=>{const we=u;we.allFields={...Ne},B(we)},1e3),[]);F.useEffect(()=>{ce(k)},[k,ce]);const q=Ne=>{var we;return o.jsxs(o.Fragment,{children:[((we=u==null?void 0:u.options)==null?void 0:we.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>H(Ne==null?void 0:Ne.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ye(),"aria-label":"Add Row",size:"small"})]})},W=Ne=>{var we;return o.jsxs(o.Fragment,{children:[Ne==null?void 0:Ne.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((we=u==null?void 0:u.customColumns)==null?void 0:we.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>X(Ne==null?void 0:Ne.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{_(Ne),le(!0)}})]})]})},ee=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>z(),"aria-label":"Add Column"})}),Q=Ne=>o.jsxs(o.Fragment,{children:[Ne==null?void 0:Ne.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{O(Ne),R(!0)}})})]}),H=Ne=>{const we=u==null?void 0:u.rows.filter(function(ue){return(ue==null?void 0:ue.uuid)!==Ne}),ve=u;ve.rows=we,B(ve)},X=Ne=>{const we=It.findIndex(u==null?void 0:u.customColumns,Te=>Te.uuid===Ne),ve=u==null?void 0:u.customColumns.filter(function(Te,_e){return _e!==we}),ue=u;ue.customColumns=ve,B(ue)},pe=Ne=>{A(Ne)},ge=()=>{A(!1)},Ae=()=>{let Ne="";return c===!0&&(Ne=Ne+" field-form-builder"),r===n&&l===!0&&(Ne=Ne+" card"),Ne},ye=()=>{const Ne=u;Ne.rows=[...Ne.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],B(Ne)},oe=(Ne,we)=>{_(_e=>_e===null?{customKey:we,uuid:""}:{..._e,customKey:we});const ve=u.customColumns,ue=ve.findIndex(_e=>_e.uuid===Ne.uuid);ve[ue]={...ve[ue],customKey:we};const Te=u;Te.customColumns=ve,B(Te)},re=(Ne,we)=>{O(_e=>_e===null?{uuid:"",rowHeading:we}:{..._e,rowHeading:we});const ve=u.rows,ue=ve.findIndex(_e=>_e.uuid===Ne.uuid);ve[ue]={...ve[ue],rowHeading:we};const Te=u;Te.rows=ve,B(Te)},B=Ne=>{a(h,f,p,v,d,Ne)},ne=()=>{N(!0)},se=()=>{N(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:$,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,label:"Save",onClick:()=>le(!1)})}),onHide:()=>le(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(E==null?void 0:E.customKey)||"",onChange:Ne=>oe(E,Ne.target.value)})})}),G&&o.jsx(Wye,{showAddNewRow:G,setShowAddNewRow:R,customRowEditModalData:P,onHandleChangeCustomRowSetting:re}),$&&o.jsx(Qye,{showAddNewColumn:$,setShowAddNewColumn:le,customColumnEditModalData:E,onHandleChangeCustomColumnSetting:oe}),o.jsx(Zi,{visibilty:m,closeSettingFieldSidebar:ge,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ne,onMouseOut:se,children:[c&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:pe,...t}),o.jsx("div",{dir:s,className:Ae(),children:r===n&&l===!0?o.jsx(ci,{headerTemplate:e,toggleable:!0,children:o.jsx(QU,{...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:W,customColumnRowBodyTemplate:Q,setAllFields:M,allFields:k,actionHeaderTemplate:ee,actionBodyTemplate:q,isFocus:T,inputValue:w,handleFieldSettingsSidebar:pe,isAdmin:l})}):o.jsx(QU,{isAdmin:!1,...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:W,customColumnRowBodyTemplate:Q,setAllFields:M,allFields:k,actionHeaderTemplate:ee,actionBodyTemplate:q,isFocus:T,inputValue:w,handleFieldSettingsSidebar:pe})})]})})]})},Zye=t=>{var oe,re,B,ne,se,me,Ne,we,ve,ue,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar(),[s,l]=F.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:p,page:v,rowIndex:m,columnIndex:A,path:w,update:x,value:C,isDisabled:T}=t,{isAdmin:S,isBuilderMode:E}=Ht(),{userSelectedLanguage:_}=sn(),[P,O]=F.useState(!1),[k,M]=F.useState(""),[Y,N]=F.useState(0),[z,$]=F.useState(!1),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=_e=>{O(_e)},W=()=>{O(!1)};F.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const ee=()=>{var K,Ee,be,he;let _e=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const fe=[...d.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(c==null?void 0:c.uuid)});xe>=0&&fe[xe].fieldData?(_e=fe[xe].fieldData,M(fe[xe].fieldData)):(c.isValid=0,M(""))}}else{const fe=i,xe=It.cloneDeep(e);if(fe!=null&&fe.length){for(const Me of fe)if(Me.fieldId===t.field.uuid&&((K=Me==null?void 0:Me.postData)!=null&&K.length)){_e=(Ee=Me==null?void 0:Me.postData[0])==null?void 0:Ee.postValue,M((be=Me==null?void 0:Me.postData[0])==null?void 0:be.postValue),xe[c==null?void 0:c.uuid]=(he=Me==null?void 0:Me.postData[0])==null?void 0:he.postValue;const Be=Object.keys(xe).length;r(Be);break}}}M(_e),setTimeout(()=>{$(!0)},2e3)};F.useEffect(()=>{!z&&(i==null?void 0:i.length)>0&&ee();const _e=Gt.addListener("clearRepeatableFields",be=>{be===(d==null?void 0:d.uuid)&&(M(""),N(0),c.isValid=1)}),K=Gt.addListener("onSubmitUserForm",()=>{var be;(be=c==null?void 0:c.attributes)!=null&&be.required?k?c.isValid=1:c.isValid=0:c.isValid=1}),Ee=Gt.addListener("OnInvalidFieldCatch",be=>{c.uuid===(be==null?void 0:be.fieldId)?N(1):N(0)});return()=>{K.remove(),Ee.remove(),_e.remove()}});const Q=(_e,K)=>{var Ee;if(i){const be=[...i],he=It.findIndex(be,function(xe){return xe.rowId===(d==null?void 0:d.uuid)});let fe=(Ee=i[he])==null?void 0:Ee.repeatableFields;fe={...fe,[_e==null?void 0:_e.uuid]:K},be[he]={...be[he],repeatableFields:fe},a(be)}M(K),K?_e.isValid=1:_e.isValid=0},H=_e=>{var K;M(_e.target.value),d!=null&&d.rowIsRepeatable?Q(c,(K=_e==null?void 0:_e.target)==null?void 0:K.value):Ae(_e.target.value)},X=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",pe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",ge=()=>{var _e,K,Ee;if(((_e=c==null?void 0:c.fieldType)==null?void 0:_e.type)==="radio"){const be=[];return s.map((he,fe)=>{var Me,Be,Je,st;const xe=k;be.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{H({value:he,target:{value:he}})},style:(xe==null?void 0:xe.uuid)===(he==null?void 0:he.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(sa,{onFocus:()=>N(1),inputId:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder-radio":"preview"}`,onChange:ut=>{H(ut)},value:he,name:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder":"preview"}`,checked:(xe==null?void 0:xe.uuid)===(he==null?void 0:he.uuid),disabled:T}),((Me=he==null?void 0:he.hyperlinkText)==null?void 0:Me[_==null?void 0:_.type])===""?o.jsx("label",{htmlFor:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder":"preview"}`,children:(Be=he==null?void 0:he.optionText)==null?void 0:Be[_==null?void 0:_.type]}):o.jsx("label",{children:o.jsx("a",{href:(Je=he==null?void 0:he.hyperlinkText)==null?void 0:Je[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(st=he==null?void 0:he.optionText)==null?void 0:st[_==null?void 0:_.type]})})]},fe))}),be}if(((K=c==null?void 0:c.fieldType)==null?void 0:K.type)==="dropdown")return o.jsx(La,{onFocus:()=>N(1),onChange:be=>{d!=null&&d.rowIsRepeatable?Q(c,be.target.value):Ae(be.target.value)},options:s,optionLabel:pe(),optionValue:X(),value:k,placeholder:(Ee=c==null?void 0:c.placeholder)==null?void 0:Ee[_==null?void 0:_.type],disabled:T})},Ae=_e=>{var be,he;M(_e.target.value);const K=i,Ee=It.cloneDeep(e);if(K!==null){if((be=_e==null?void 0:_e.target)!=null&&be.value){if(Ee[c==null?void 0:c.uuid]=(he=_e==null?void 0:_e.target)==null?void 0:he.value,(K==null?void 0:K.length)>0)for(const fe of K)fe.fieldId===t.field.uuid&&(fe.postData[0]={postValue:_e.target.value})}else if(delete Ee[c==null?void 0:c.uuid],(K==null?void 0:K.length)>0)for(const fe of K)fe.fieldId===t.field.uuid&&(fe.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(Ee);const fe=Object.keys(Ee).length;r(fe)}},ye=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[E&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${!E&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(oe=c==null?void 0:c.headerText)==null?void 0:oe[_==null?void 0:_.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(da,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:C}),((re=c==null?void 0:c.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",E?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(B=c==null?void 0:c.label)==null?void 0:B[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(ne=c==null?void 0:c.toolTip)==null?void 0:ne[_==null?void 0:_.type],position:"right"})}):""})]}),ge(),o.jsx("div",{children:((se=c==null?void 0:c.attributes)==null?void 0:se.required)&&o.jsx("small",{className:"error",children:Y===1&&!k?(me=c==null?void 0:c.validationMesssage)==null?void 0:me.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ne=c==null?void 0:c.helperText)==null?void 0:Ne[_==null?void 0:_.type]})}),((we=c==null?void 0:c.inlineConditionalRules)==null?void 0:we.rules.length)>0&&E===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((ue=(ve=c==null?void 0:c.inlineConditionalRules)==null?void 0:ve.rules)==null?void 0:ue.length)>0&&((Te=c==null?void 0:c.inlineConditionalRules)==null?void 0:Te.rules.map((_e,K)=>{const Ee=k;return E===!1?o.jsx("div",{children:_e==null?void 0:_e.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((Ee==null?void 0:Ee.value)==be.value||E),inputValue:k,condition:be,ruleIndex:K,conditionIndex:he,field:c,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${K}-`+he))},`rule-${K}`):o.jsx(ci,{className:"mt-4",header:`Rule ${K+1}`,children:o.jsx("div",{children:_e==null?void 0:_e.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((Ee==null?void 0:Ee.value)===be.value||E),inputValue:k,condition:be,ruleIndex:K,conditionIndex:he,field:c,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${K}-`+he))},`rule-${K}`)},K)}))]}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},c==null?void 0:c.uuid),o.jsx(xi,{...t,fieldWrap:ye})]})},eAe=t=>{var z,$,le,G;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=Ar(),{field:a,row:s,isDisabled:l}=t,{isBuilderMode:c,isAdmin:u}=Ht(),{userSelectedLanguage:d}=sn(),[f,h]=F.useState(!1),[p,v]=F.useState(""),[m,A]=F.useState(0),[w,x]=F.useState(!1),[C,T]=F.useState(!1),S=()=>{T(!0)},E=()=>{T(!1)},_=R=>{h(R)},P=()=>{h(!1)},O=()=>{var ce,q,W,ee;let R=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const Q=[...s.repeatableFields],H=It.findIndex(Q,function(X){return X.uuid===(a==null?void 0:a.uuid)});H>=0&&Q[H].fieldData?(R=Q[H].fieldData,v(Q[H].fieldData)):(a.isValid=0,v(""))}}else{const Q=i,H=It.cloneDeep(e);if(Q!=null&&Q.length){for(const X of Q)if(X.fieldId===t.field.uuid&&((ce=X==null?void 0:X.postData)!=null&&ce.length)){R=(q=X==null?void 0:X.postData[0])==null?void 0:q.postValue,v((W=X==null?void 0:X.postData[0])==null?void 0:W.postValue),H[a==null?void 0:a.uuid]=(ee=X==null?void 0:X.postData[0])==null?void 0:ee.postValue;const pe=Object.keys(H).length;r(pe);break}}}v(R),setTimeout(()=>{x(!0)},2e3)};F.useEffect(()=>{w||O();const R=Gt.addListener("clearRepeatableFields",W=>{W===(s==null?void 0:s.uuid)&&(v(""),A(0),a.isValid=1)}),ce=Gt.addListener("onSubmitUserForm",()=>{var W;if((W=a==null?void 0:a.attributes)!=null&&W.required){const ee=p;ee!=null&&ee[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),q=Gt.addListener("OnInvalidFieldCatch",W=>{a.uuid===(W==null?void 0:W.fieldId)?A(1):A(0)});return()=>{ce.remove(),q.remove(),R.remove()}});const k=(R,ce,q,W,ee)=>W==null?void 0:W.map(Q=>{var H,X;return{...Q,children:Q!=null&&Q.children&&((H=Q==null?void 0:Q.children)==null?void 0:H.length)>0?[...((X=Q==null?void 0:Q.children)==null?void 0:X.map(pe=>ce===(Q==null?void 0:Q.uuid)||ee===!0?(q!=null&&q[pe==null?void 0:pe.uuid]&&delete q[pe==null?void 0:pe.uuid],{...pe,options:k(R,ce,q,(pe==null?void 0:pe.options)||[],!0)}):{...pe,options:k(R,ce,q,(pe==null?void 0:pe.options)||[],!1)}))||[]]:[]}}),M=(R,ce)=>{const q={...p};k(R,ce,q,a==null?void 0:a.options,!1),q[R]=ce,v(q),s!=null&&s.rowIsRepeatable||Y(q)},Y=R=>{const ce=i,q=It.cloneDeep(e);if(ce!==null){if(R){if(q[a==null?void 0:a.uuid]=R,(ce==null?void 0:ce.length)>0)for(const W of ce)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:R})}else if(delete q[a==null?void 0:a.uuid],(ce==null?void 0:ce.length)>0)for(const W of ce)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(q);const W=Object.keys(q).length;r(W)}},N=o.jsxs("div",{onMouseOver:S,onMouseOut:E,children:[c&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:_,...t}),o.jsx("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(a==null?void 0:a.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(z=a==null?void 0:a.headerText)==null?void 0:z[d==null?void 0:d.type]}),o.jsx(_7,{...t,isDisabled:l,isFirst:!0,schema:a,field:a,value:p,update:(R,ce)=>{M(R,ce)}}),o.jsx("div",{children:(($=a==null?void 0:a.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:m===1&&!p?(le=a==null?void 0:a.validationMesssage)==null?void 0:le.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(G=a==null?void 0:a.helperText)==null?void 0:G[d==null?void 0:d.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:f,closeSettingFieldSidebar:P,...t},a==null?void 0:a.uuid),o.jsx(xi,{...t,fieldWrap:N})]})},tAe=t=>{var X,pe,ge,Ae,ye,oe,re,B,ne,se;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isBuilderMode:f}=Ht(),{taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),[C,T]=F.useState(!1),{userSelectedLanguage:S,fieldSettingUpdate:E}=sn(),[_,P]=F.useState(!1),[O,k]=F.useState(0),[M,Y]=F.useState(),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],R=me=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:me.icon})}),ce=()=>{var me,Ne,we;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ve=[...a.repeatableFields],ue=It.findIndex(ve,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});ue>=0&&ve[ue].fieldData?Y(ve[ue].fieldData):Y("")}}else{const ve=A;if(ve!=null&&ve.length){for(const ue of ve)if(ue.fieldId===t.field.uuid&&((me=ue==null?void 0:ue.postData[0])==null?void 0:me.postValue)!==""&&((Ne=ue==null?void 0:ue.postData[0])!=null&&Ne.postValue)){Y((we=ue==null?void 0:ue.postData[0])==null?void 0:we.postValue);break}}}P(!0)};F.useEffect(()=>{_||ce();const me=Gt.addListener("clearRepeatableFields",ue=>{ue===(a==null?void 0:a.uuid)&&(Y(""),k(0),e.isValid=0,E(i,r,s,l,n,e))}),Ne=Gt.addListener("onSubmitUserForm",()=>{var ue;(ue=e==null?void 0:e.attributes)!=null&&ue.required?M?e.isValid=1:e.isValid=0:e.isValid=1}),we=Gt.addListener("OnInvalidFieldCatch",ue=>{e.uuid===(ue==null?void 0:ue.fieldId)?k(1):k(0)}),ve=Gt.addListener("OnGetFieldValue",ue=>{var _e;const Te=(_e=ue==null?void 0:ue.repeatableColumn)==null?void 0:_e.filter((K,Ee)=>(K==null?void 0:K.fieldUuid)===(e==null?void 0:e.uuid));Te!=null&&Te.length});return()=>{Ne.remove(),we.remove(),ve.remove(),me.remove()}});const q=me=>{Y(me.value);const Ne=A,we=It.cloneDeep(h);if(Ne!==null){if(me!=null&&me.value){if(we[e==null?void 0:e.uuid]=me==null?void 0:me.value,(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:me.value})}else if(delete we[e==null?void 0:e.uuid],(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){p(we);const ve=Object.keys(we).length;v(ve)}},W=(me,Ne)=>{var we;if(A){const ve=[...A],ue=It.findIndex(ve,function(_e){return _e.rowId===(a==null?void 0:a.uuid)});let Te=(we=A[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},m(ve)}Y(Ne),Ne!==""?me.isValid=1:me.isValid=0},ee=me=>{T(me)},Q=()=>{T(!1)},H=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[f&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:ee,...t}),o.jsx("div",{className:`field ${f&&" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(X=e==null?void 0:e.headerText)==null?void 0:X[S==null?void 0:S.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((pe=e==null?void 0:e.attributes)==null?void 0:pe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[S==null?void 0:S.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[S==null?void 0:S.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((oe=(ye=e==null?void 0:e.icon)==null?void 0:ye.properties)==null?void 0:oe.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(rf,{value:M,onChange:me=>{Y(me.value),a!=null&&a.rowIsRepeatable?W(e,me.value):q(me)},itemTemplate:R,optionLabel:"value",onFocus:()=>k(1),options:G,readOnly:c,className:O===1&&((re=e==null?void 0:e.attributes)!=null&&re.required)?M?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((B=e==null?void 0:e.attributes)==null?void 0:B.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:O===1&&!M?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(se=e==null?void 0:e.helperText)==null?void 0:se[S==null?void 0:S.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:C,closeSettingFieldSidebar:Q,...t}),o.jsx(xi,{...t,fieldWrap:H})]})},nAe=t=>{var W,ee,Q,H,X,pe,ge;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v}=t,{isAdmin:m,isBuilderMode:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(""),[S,E]=F.useState(0),[_,P]=F.useState(!1),[O,k]=F.useState(!1),M=()=>{k(!0)},Y=()=>{k(!1)},N=()=>{var Ae,ye,oe;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const re=[...h.repeatableFields],B=It.findIndex(re,function(ne){return ne.uuid===(c==null?void 0:c.uuid)});B>=0&&re[B].fieldData?T(re[B].fieldData):T("")}}else{const re=a;if(re!=null&&re.length){for(const B of re)if(B.fieldId===t.field.uuid&&((Ae=B==null?void 0:B.postData[0])==null?void 0:Ae.postValue)!==""&&((ye=B==null?void 0:B.postData[0])!=null&&ye.postValue)){T((oe=B==null?void 0:B.postData[0])==null?void 0:oe.postValue);break}}}P(!0)};F.useEffect(()=>{_||N();const Ae=Gt.addListener("clearRepeatableFields",B=>{B===(h==null?void 0:h.uuid)&&(T(""),E(0),c.isValid=0,l(f,d,p,v,u,c))}),ye=Gt.addListener("onSubmitUserForm",()=>{var B;(B=c==null?void 0:c.attributes)!=null&&B.required?C?c.isValid=1:c.isValid=0:c.isValid=1}),oe=Gt.addListener("OnInvalidFieldCatch",B=>{c.uuid===(B==null?void 0:B.fieldId)?E(1):E(0)}),re=Gt.addListener("OnGetFieldValue",B=>{var se;const ne=(se=B==null?void 0:B.repeatableColumn)==null?void 0:se.filter(me=>(me==null?void 0:me.fieldUuid)===(c==null?void 0:c.uuid));ne!=null&&ne.length});return()=>{ye.remove(),oe.remove(),re.remove(),Ae.remove()}});const z=Ae=>{x(Ae)},$=()=>{x(!1)},le=Ae=>{var re,B;T(Ae.target.value);const ye=a,oe=It.cloneDeep(e);if(ye!==null){if((re=Ae==null?void 0:Ae.target)!=null&&re.value){if(oe[c==null?void 0:c.uuid]=(B=Ae==null?void 0:Ae.target)==null?void 0:B.value,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Ae.target.value})}else if(delete oe[c==null?void 0:c.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(oe);const ne=Object.keys(oe).length;r(ne)}},G=(Ae,ye,oe,re)=>{var B;if(a){const ne=[...a],se=It.findIndex(ne,function(Ne){return Ne.rowId===(h==null?void 0:h.uuid)});let me=(B=a[se])==null?void 0:B.repeatableFields;me={...me,[oe==null?void 0:oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},i(ne)}T(re),re!==""?oe.isValid=1:oe.isValid=0},R=5,ce=()=>{const Ae=[],ye=[rE,nE,iE,eE,tE],oe=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let re=0;re<R;re++)Ae.push(o.jsxs("label",{children:[o.jsx("input",{onChange:B=>{h!=null&&h.rowIsRepeatable?G(f,d,c,B.target.value):le(B)},checked:parseInt(C)===re,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:re}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:ye[re]})}),o.jsx("div",{children:oe[re]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${re} ${parseInt(C)===re?"scale-selected":""}`));return Ae},q=o.jsxs("div",{onMouseOver:M,onMouseOut:Y,children:[A&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(W=c==null?void 0:c.headerText)==null?void 0:W[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ee=c==null?void 0:c.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(Q=c==null?void 0:c.label)==null?void 0:Q[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Vi,{message:(H=c==null?void 0:c.toolTip)==null?void 0:H[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:ce()})}),o.jsx("div",{children:((X=c==null?void 0:c.attributes)==null?void 0:X.required)&&o.jsx("small",{className:"error",children:S===1&&!C?(pe=c==null?void 0:c.validationMesssage)==null?void 0:pe.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(ge=c==null?void 0:c.helperText)==null?void 0:ge[s==null?void 0:s.type]})})]})]})}),m&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:w,closeSettingFieldSidebar:$,...t}),o.jsx(xi,{...t,fieldWrap:q})]})},rAe=t=>{var N,z,$,le,G,R,ce,q,W,ee,Q;const{userTaskSubmitFormData:e}=Ar(),{userSelectedLanguage:n,fieldSettingUpdate:r}=sn(),{isAdmin:i,isBuilderMode:a}=Ht(),{field:s,fieldIndex:l,sectionIndex:c,pageIndex:u,row:d,rowIndex:f,columnIndex:h}=t,[p,v]=F.useState(!1),[m,A]=F.useState(""),[w,x]=F.useState(0),[C,T]=F.useState(!1),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)},O=()=>{var H,X,pe;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const ge=[...d.repeatableFields],Ae=It.findIndex(ge,function(ye){return ye.uuid===(s==null?void 0:s.uuid)});Ae>=0&&ge[Ae].fieldData?A(ge[Ae].fieldData):A("")}}else{const ge=e;if(ge!=null&&ge.length){for(const Ae of ge)if(Ae.fieldId===t.field.uuid&&((H=Ae==null?void 0:Ae.postData[0])==null?void 0:H.postValue)!==""&&((X=Ae==null?void 0:Ae.postData[0])!=null&&X.postValue)){A((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue);break}}}T(!0)};F.useEffect(()=>{C||O();const H=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(d==null?void 0:d.uuid)&&(A(""),x(0),s.isValid=0,r(u,c,f,h,l,s))}),X=Gt.addListener("onSubmitUserForm",()=>{var Ae,ye;(Ae=s==null?void 0:s.attributes)!=null&&Ae.required?m&&(m==null?void 0:m.length)<((ye=s==null?void 0:s.attributes)==null?void 0:ye.minLength)?s.isValid=1:s.isValid=0:s.isValid=1}),pe=Gt.addListener("OnInvalidFieldCatch",Ae=>{s.uuid===(Ae==null?void 0:Ae.fieldId)?x(1):x(0)}),ge=Gt.addListener("OnGetFieldValue",Ae=>{var oe;const ye=(oe=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:oe.filter(re=>(re==null?void 0:re.fieldUuid)===(s==null?void 0:s.uuid));ye!=null&&ye.length});return()=>{X.remove(),pe.remove(),ge.remove(),H.remove()}});const k=H=>{v(H)},M=()=>{v(!1)},Y=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[a&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:k,...t}),o.jsxs("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(s==null?void 0:s.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:i?"col-6 ":"col-12 p-fluid",children:[(s==null?void 0:s.showHeaderText)&&o.jsx("h6",{children:(N=s==null?void 0:s.headerText)==null?void 0:N[n==null?void 0:n.type]}),(s==null?void 0:s.showLabel)&&o.jsxs("label",{htmlFor:l,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((z=s==null?void 0:s.attributes)==null?void 0:z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:($=s==null?void 0:s.label)==null?void 0:$[n==null?void 0:n.type]}),(s==null?void 0:s.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(le=s==null?void 0:s.toolTip)==null?void 0:le[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(s==null?void 0:s.iconAlignment),children:(s==null?void 0:s.showIcon)&&o.jsx("i",{className:"pi pi-"+((R=(G=s==null?void 0:s.icon)==null?void 0:G.properties)==null?void 0:R.name)})}),o.jsx("div",{children:((ce=s==null?void 0:s.attributes)==null?void 0:ce.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:w===1&&!m?(q=s==null?void 0:s.validationMesssage)==null?void 0:q.english:""}),o.jsx("small",{className:"error",children:w===1&&(m==null?void 0:m.length)<((W=s==null?void 0:s.attributes)==null?void 0:W.minLength)?`Mini length ${(ee=s==null?void 0:s.attributes)==null?void 0:ee.minLength}`:""})]})}),o.jsx("div",{children:(s==null?void 0:s.showHelperText)&&o.jsx("small",{children:(Q=s==null?void 0:s.helperText)==null?void 0:Q[n==null?void 0:n.type]})})]})]})}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:p,closeSettingFieldSidebar:M,...t}),o.jsx(xi,{...t,fieldWrap:Y})]})},iAe=t=>{var Y,N,z,$,le,G,R;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{userTaskSubmitFormData:f}=Ar(),[h,p]=F.useState(!1),[v,m]=F.useState(""),[A,w]=F.useState(0),[x,C]=F.useState(!1),[T,S]=F.useState(!1),E=()=>{S(!0)},_=()=>{S(!1)},P=()=>{var q;const ce=f;if(ce.length){for(const W of ce)if(W.fieldId===t.field.uuid){m((q=W==null?void 0:W.postData[0])==null?void 0:q.postValue),C(!0);break}}};F.useEffect(()=>{x||P();const ce=Gt.addListener("onSubmitUserForm",()=>{var W;(W=e==null?void 0:e.attributes)!=null&&W.required&&(v?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),q=Gt.addListener("OnInvalidFieldCatch",W=>{e.uuid===(W==null?void 0:W.fieldId)?w(1):w(0)});return()=>{ce.remove(),q.remove()}});const O=ce=>{p(ce)},k=()=>{p(!1)},M=o.jsxs("div",{onMouseOver:E,onMouseOut:_,children:[c&&T&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:c?"field-form-builder":"",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-11":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((N=e==null?void 0:e.attributes)==null?void 0:N.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(z=e==null?void 0:e.label)==null?void 0:z[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:($=e==null?void 0:e.toolTip)==null?void 0:$[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((le=e==null?void 0:e.attributes)==null?void 0:le.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(G=e==null?void 0:e.validationMesssage)==null?void 0:G.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(R=e==null?void 0:e.helperText)==null?void 0:R[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h&&o.jsx(Zi,{visibilty:h,closeSettingFieldSidebar:k,...t}),o.jsx(xi,{...t,fieldWrap:M})]})},Vc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,TASK_PUBLISHED:c}=Ar(),u=F.useRef(null),[d,f]=F.useState(!1),[{isDragging:h},p]=aa({item:{...e,type:Y1,uuid:e==null?void 0:e.uuid,path:n},type:Y1,collect:T=>({isDragging:T.isDragging()})}),v=h&&s?.25:1;p(u);const m=l===c||a,A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(ooe,{typeName:"Text",field:r,...T});case"number":return o.jsx(foe,{typeName:"Number",field:r,...T});case"email":return o.jsx(gde,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(mde,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(Mde,{typeName:"Editor",field:r,...T});case"question":return o.jsx(f0e,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Cde,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(Jde,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(Zde,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(t0e,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(eAe,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(doe,{typeName:"Hyperlink",field:r,...T});case"heading":return o.jsx(a0e,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(I4e,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(mF,{typeName:"Image",field:r,...T});case"video":return o.jsx(_me,{typeName:"Video",field:r,...T});case"hr":return o.jsx(Dme,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(Nme,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(Ome,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(l8e,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(rAe,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(iAe,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(x4e,{typeName:"Image gallery",field:r,...T});case"quiz":return o.jsx(S8e,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(c8e,{typeName:"Document",field:r,...T});case"list":return o.jsx(T8e,{typeName:"List",field:r,...T});case"country":return o.jsx(soe,{typeName:"Country",field:r,...T});case"phone":return o.jsx(Pye,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(Mye,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(qye,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(Uye,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx($ye,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(jye,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(zye,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(Hye,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(GU,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(GU,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(Rye,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(tAe,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(nAe,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(Jye,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(Zye,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},w=()=>{f(!0)},x=()=>{f(!1)},C=()=>{let T="";return s===!0?(T=T+" component draggable field-form-builder-not-preview",i===K1?T=T+" pdf-component":T=T+" px-2 pdf-component"):(T=T+" component ",i===K1?T=T+" ":T=T+" px-2 "),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:v},className:C(),onMouseOver:w,onMouseOut:x,children:[s&&d&&o.jsx("i",{ref:s===!0?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:m})]})})},aAe={position:"relative"},sAe=t=>{var P,O,k,M,Y;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:p,formBuilderFormLayout:v,handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w,emitSocketData:x}=Ht(),[{isDragging:C},T]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:N=>({isDragging:N.isDragging()})}),S=C&&w?.25:1;T(d);const E=(N,z,$,le,G,R,ce)=>o.jsx(Vc,{page:u,type:"field",row:c,column:e,section:l,field:N,data:N,path:z,pageIndex:$,sectionIndex:le,rowIndex:G,columnIndex:R,fieldIndex:ce},`component-${n}-${N==null?void 0:N.uuid}`),_=(N,z,$,le,G)=>{var W,ee,Q,H;const R=N.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ce=`${N.className} justify-content-space-between`,q=`${N.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:ce,children:[o.jsxs("span",{ref:w===!0?d:null,children:[o.jsx("button",{className:N.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:N.togglerClassName,onClick:N.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsx("span",{className:q,children:"Column"})]}),w===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{h(z,$,le),x()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((H=(Q=(ee=(W=v[z])==null?void 0:W.children[$])==null?void 0:ee.children[le])==null?void 0:Q.children)==null?void 0:H.length)>1&&o.jsxs("button",{className:N.togglerClassName,onClick:()=>{f(z,$,le,G),x()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{p(e,z,$,le,G),x()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:A&&w?{...aAe,opacity:S}:{},className:w?"draggable form-builder-column container-column":"form-builder-column container-column",children:w===!0?o.jsx(o.Fragment,{children:A===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:N=>_(N,r,i,a,s),children:[((P=e==null?void 0:e.children)==null?void 0:P.length)>0?(O=e==null?void 0:e.children)==null?void 0:O.map((N,z)=>{const $=`${n}-${z}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:$,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,$,r,i,a,s,z)]},$)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((k=e==null?void 0:e.children)==null?void 0:k.length)>0?(M=e==null?void 0:e.children)==null?void 0:M.map((N,z)=>{const $=`${n}-${z}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:$,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,$,r,i,a,s,z)]},$)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:A,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.children)==null?void 0:Y.map((N,z)=>{const $=`${n}-${z}`;return o.jsx(F.Fragment,{children:E(N,$,r,i,a,s,z)},$)})})})},oAe=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(wn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(lo,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(wn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},lAe=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Ht();return o.jsxs("div",{className:"p-fluid",children:[r===P0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(no,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},wg=t=>{var x;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=sn(),[f,h]=F.useState(r),{updateGlobalToast:p,emitSocketData:v}=Ht(),m=(C,T,S)=>{h(E=>{const _=E[C];return Object.assign({},E,{[C]:Object.assign({},_,{[T==null?void 0:T.type]:S})})})},A=(C,T)=>{h(S=>({...S,[C]:T}))},w=()=>{const C={...f,children:r==null?void 0:r.children};c(i,a,s,C),v(),p({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(x=r==null?void 0:r.heading)==null?void 0:x[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:l!=null&&l.length?l.map((C,T)=>o.jsx(so,{tabIndex:T,header:C==null?void 0:C.language,children:o.jsx(oAe,{language:C,stateRow:f,onHandleChange:m,...t})},T)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(lAe,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:C=>A("showRowTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:C=>A("showRowSubTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},cAe={},uAe=t=>{var pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:p,handleDrop:v}=sn(),{userTaskSubmitFormData:m,taskRegisterData:A,updateTaskRegisterData:w,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:T,task_status:S,TASK_PUBLISHED:E}=Ar(),{isRenderView:_,isAdvanceView:P,isBuilderMode:O,renderType:k,isAdmin:M,emitSocketData:Y}=Ht(),[N,z]=F.useState(!1),[{isDragging:$},le]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:we=>({isDragging:we.isDragging()})}),G=$?.25:1;le(c);const R=(we,ve,ue,Te,_e,K)=>o.jsx(sAe,{page:l,row:e,section:s,data:we,path:ve,pageIndex:ue,sectionIndex:Te,rowIndex:_e,columnIndex:K,isAdmin:M,emitSocketData:Y},`column-${n}-${we.uuid}`),ce=(we,ve,ue,Te)=>{var be,he,fe,xe;const _e=we.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",K=`${we.className} justify-content-space-between`,Ee=`${we.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:K,children:[o.jsxs("span",{ref:O===!0?c:null,children:[o.jsx("button",{className:we.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:we.togglerClassName,onClick:we.onTogglerClick,children:[o.jsx("span",{className:_e}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Ee,children:["Row:"," ",((be=e==null?void 0:e.heading)==null?void 0:be[p==null?void 0:p.type])!==""?(he=e==null?void 0:e.heading)==null?void 0:he[p==null?void 0:p.type]:"Untitled"]})]}),O===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:we.togglerClassName,onClick:()=>{d(ve,ue),Y()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((xe=(fe=h[ve])==null?void 0:fe.children[ue])==null?void 0:xe.children.length)>1&&o.jsxs("button",{className:we.togglerClassName,onClick:()=>{u(ve,ue,Te),Y()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:we.togglerClassName,onClick:()=>{f(e,ve,ue,Te),Y()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:we.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},q=It.findIndex(m,function(we){return(we==null?void 0:we.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var ue,Te,_e;const we=It.cloneDeep(A);((Te=(ue=m[q])==null?void 0:ue.repeatableFieldsData)==null?void 0:Te.length)>=(e==null?void 0:e.minimumEntries)?we[e==null?void 0:e.uuid]=(_e=m[q])==null?void 0:_e.repeatableFields:delete we[e==null?void 0:e.uuid];const ve=Object.keys(we).length;w(we),x(ve)},ee=(pe=e==null?void 0:e.repeatableFields)==null?void 0:pe.map(we=>{var ve;return{fieldUuid:we==null?void 0:we.uuid,field:we==null?void 0:we.uuid,header:(ve=we==null?void 0:we.label)==null?void 0:ve.english}}),Q=ee==null?void 0:ee.map(we=>o.jsx(xr,{field:we.field,header:we.header,body:ve=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ve[we==null?void 0:we.field]}})})},we.field)),H=()=>{var Te;const we=[...m],ve=[];let ue=!0;e:for(const[,_e]of e.children.entries()){for(const[,K]of _e.children.entries())if(K!=null&&K.isPostField&&K.isValid!==1){const Ee={fieldId:K.uuid,rowIndex:a};ve.push(Ee),Gt.emit("OnInvalidFieldCatch",Ee),ue=!1;break e}ue=!0}ue&&(ve==null?void 0:ve.length)===0&&(C(e==null?void 0:e.uuid,(Te=we[q])==null?void 0:Te.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},X=we=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,we==null?void 0:we.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...cAe,opacity:G,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.right}px`},className:_?"row container-row":"draggable row container-row",children:[N&&o.jsx(wg,{renderType:k,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:Y},"row_settings_"+r+i+a),O===!0?o.jsx(o.Fragment,{children:P===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:we=>ce(we,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:P,data:{path:ue,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag"}),R(we,ue,r,i,a,ve)]},ue)}),o.jsx(Fr,{isAdvanceView:P,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:P?"form-builder-columns":"",style:P?{overflowX:"auto"}:{},children:(B=e==null?void 0:e.children)==null?void 0:B.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsx(F.Fragment,{children:R(we,ue,r,i,a,ve)},ue)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&S===E)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[p==null?void 0:p.type]}),o.jsx("span",{children:(se=e==null?void 0:e.subHeadingText)==null?void 0:se[p==null?void 0:p.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsx(F.Fragment,{children:R(we,ue,r,i,a,ve)},ue)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&S!==E&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(me=e.addToListButtonLabel)==null?void 0:me[p==null?void 0:p.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(m==null?void 0:m.length)>0?(Ne=m[q])==null?void 0:Ne.repeatableFieldsData:[],children:[Q,S!==E&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(we,ve)=>X(ve)})]}),M&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},dAe=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(wn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(lo,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter section description",onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},Dh=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=F.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=sn(),{emitSocketData:h}=Ht(),{updateGlobalToast:p}=Ht(),v=(w,x,C)=>{l(T=>Object.assign({},T,{[w]:Object.assign({},T[w],{[x==null?void 0:x.type]:C})}))},m=(w,x)=>{l(C=>({...C,[w]:x}))},A=()=>{const w={...s,children:r==null?void 0:r.children};u(i,a,w),h(),p({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:c!=null&&c.length?c.map((w,x)=>o.jsx(so,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(dAe,{language:w,stateSection:s,onHandleChange:v,...t})},x)):""})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:w=>m("showSectionHeader",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:w=>m("showSectionTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:w=>m("showSectionSubTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},Nh=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Ht(),a=O3({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{a.resetForm(),r(!1)})}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Ft,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Ks,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(wn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${h3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(lo,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${h3({invalid:s("builder_element_title")})} w-full`})]})]})},fAe=t=>{var le,G,R,ce,q,W,ee,Q;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isAdvanceView:p,renderType:v,isBuilderMode:m,emitSocketData:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState(null),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:H=>({isDragging:H.isDragging()})}),N=M&&m?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(uAe,{page:s,section:a,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae},`row-${n}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:m===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=e==null?void 0:e.heading)==null?void 0:oe[f==null?void 0:f.type]]})]}),m===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{c(X),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=d[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{l(X,pe),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{u(e,X,pe),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:m&&p?"draggable row":"",children:[m===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&m&&o.jsx(Dh,{renderType:v,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!0?o.jsx(o.Fragment,{children:p===!0?o.jsxs(ci,{header:(le=e==null?void 0:e.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,r,i),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=e==null?void 0:e.subHeadingText)==null?void 0:G[f==null?void 0:f.type])&&o.jsx("p",{children:(R=e==null?void 0:e.subHeadingText)==null?void 0:R[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,data:{path:pe,childrenCount:e.children.length},onDrop:h}),z(H,pe,r,i,X)]},pe)}),o.jsx(Fr,{isAdvanceView:p,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ce=d[r])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=e==null?void 0:e.subHeadingText)==null?void 0:q[f==null?void 0:f.type])&&o.jsx("p",{children:(W=e==null?void 0:e.subHeadingText)==null?void 0:W[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,r,i,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=e==null?void 0:e.heading)==null?void 0:ee[f==null?void 0:f.type]}),o.jsx("p",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,r,i,X)},pe)},pe)})]})})]})},hAe={position:"relative"},pAe=t=>{var C,T,S;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=F.useRef(null),{handleDrop:h}=sn(),{isAdvanceView:p,isBuilderMode:v}=Ht(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(f);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:d,section:c,row:u,column:n,field:E,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y,type:"field",data:E,path:_},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:p?{...hAe,opacity:w}:{},className:v&&"draggable column container-column",children:v===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=e==null?void 0:e.children)==null?void 0:C.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const P=`${r}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,fieldDropArea:!0,data:{path:P,childrenCount:e.children.length,droppedField:e},onDrop:h}),x(E,P,i,a,s,l,_)]},P)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),v&&o.jsx(Fr,{isAdvanceView:p,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.children)==null?void 0:S.map((E,_)=>{const P=`${r}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,i,a,s,l,_)},P)})})})},gAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,p,v,m)=>o.jsx(pAe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${p}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var p;return o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(p=f==null?void 0:f.children)==null?void 0:p.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})},`basic_view_section_${i}-${u}-${h}`)})})})},mAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=F.useRef(null),[u,d]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(c);const f=(h,p,v,m)=>o.jsx(fAe,{data:h,page:e,section:h,path:p,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,p)=>{const v=`${n}-${p}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:i,data:{path:v,childrenCount:e.children.length},onDrop:l}),f(h,v,r,p)]},`section-${p}-${h.uuid}`)}),o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(gAe,{page:e,path:n,data:e,pageIndex:r},`basic_view-${r}-${e.uuid}`)}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,p)=>{const v=`${n}-${p}`;return o.jsx(F.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx("div",{children:f(h,v,r,p)}):((h==null?void 0:h.isHidden)===!1||a)&&f(h,v,r,p)},`section-${p}-${h.uuid}`)})})})})},vAe=()=>{const{isAdvanceView:t,isBuilderMode:e,isPreview:n}=Ht(),[r,i]=F.useState(!1),[a,s]=F.useState(!1),[l,c]=F.useState(0),{formBuilderFormLayout:u}=sn(),{emitSocketData:d}=Ht(),f=["Mobile","Desktop"],[h,p]=F.useState(f[1]),v=(m,A,w)=>o.jsx(mAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsxs("div",{children:[n===!0&&o.jsx("div",{className:"flex justify-content-center align-items-center",children:o.jsx(rf,{value:h,onChange:m=>p(m.value),options:f})}),(u==null?void 0:u.length)===I9&&e===!1?o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-3 flex card justify-content-center",children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsx("div",{className:"flex flex-column justify-content-start",style:{width:h==="Mobile"?375:800},children:o.jsx("div",{className:"w-full",children:v(m,w,A)})},`preview-${m.uuid}-${A}`)})})}):o.jsx(o.Fragment,{children:t===!0&&e===!0?o.jsx(rs,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||e),header:"Page",headerTemplate:x=>o.jsx(L8,{options:x,pageIndex:A,setTabSidebarSetting:i,setPageActiveIndex:c,page:m,pages:u}),children:[e===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(H0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`advanced_${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(u==null?void 0:u.length)>0&&(u==null?void 0:u.map((m,A)=>{const w=`${A}`;return o.jsxs(F.Fragment,{children:[e===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(H0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`basic_${m.uuid}-${A}`)}))})})]})},bAe={position:"relative"},yAe=t=>{var O,k,M,Y,N;const{isAdvanceView:e,isBuilderMode:n,emitSocketData:r,isRenderView:i}=Ht(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),{removeColumn:m,addColumn:A,cloneColumn:w,formBuilderFormLayout:x,handleDrop:C}=sn(),[{isDragging:T},S]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:z=>({isDragging:z.isDragging()})}),E=T&&!i?.25:1;S(v);const _=(z,$,le,G,R,ce,q)=>o.jsx(Vc,{page:p,column:a,type:"field",row:h,section:f,field:z,data:z,path:$,pageIndex:le,sectionIndex:G,rowIndex:R,columnIndex:ce,fieldIndex:q},`component-${s}-${z==null?void 0:z.uuid}`),P=(z,$,le,G,R)=>{var ee,Q,H,X;const ce=z.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",q=`${z.className} justify-content-space-between`,W=`${z.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:q,children:[o.jsxs("span",{ref:n===!0?v:null,children:[o.jsx("button",{className:z.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:z.togglerClassName,onClick:z.onTogglerClick,children:[o.jsx("span",{className:ce}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:"Column"})]}),n===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{A($,le,G),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((X=(H=(Q=(ee=x[$])==null?void 0:ee.children[le])==null?void 0:Q.children[G])==null?void 0:H.children)==null?void 0:X.length)>1&&o.jsxs("button",{className:z.togglerClassName,onClick:()=>{m($,le,G,R),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{w(a,$,le,G,R),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...bAe,opacity:E}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:z=>P(z,l,c,u,d),children:[((O=a==null?void 0:a.children)==null?void 0:O.length)>0?(k=a==null?void 0:a.children)==null?void 0:k.map((z,$)=>{const le=`${s}-${$}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:le,childrenCount:a.children.length,droppedField:a},onDrop:C}),_(z,le,l,c,u,d,$)]},le)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((M=a==null?void 0:a.children)==null?void 0:M.length)>0?(Y=a==null?void 0:a.children)==null?void 0:Y.map((z,$)=>{const le=`${s}-${$}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:le,childrenCount:a.children.length,droppedField:a},onDrop:C}),_(z,le,l,c,u,d,$)]},le)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(N=a==null?void 0:a.children)==null?void 0:N.map((z,$)=>{const le=`${s}-${$}`;return o.jsx(F.Fragment,{children:_(z,le,l,c,u,d,$)},le)})})})},AAe={},wAe=t=>{var pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isBuilderMode:f,emitSocketData:h,renderType:p}=Ht(),v=F.useRef(null),{removeRow:m,addRow:A,cloneRow:w,formBuilderFormLayout:x,userSelectedLanguage:C,handleDrop:T}=sn(),{userTaskSubmitFormData:S,taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:P,addUserDataFormSectionRepeatableData:O,removeUserDataFormSectionRepeatableData:k,task_status:M,TASK_PUBLISHED:Y}=Ar(),[N,z]=F.useState(!1),[{isDragging:$},le]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:K=>({isDragging:K.isDragging()})}),G=$?.25:1;le(v);const R=(K,Ee,be,he,fe,xe)=>o.jsx(yAe,{page:l,row:e,section:s,data:K,path:Ee,pageIndex:be,sectionIndex:he,rowIndex:fe,columnIndex:xe,isAdmin:d,emitSocketData:h},`column-${n}-${K.uuid}`),ce=(K,Ee,be,he)=>{var Be,Je,st,ut;const fe=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",xe=`${K.className} justify-content-space-between`,Me=`${K.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:xe,children:[o.jsxs("span",{ref:f===!0?v:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:fe}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Me,children:["Row:"," ",((Be=e==null?void 0:e.heading)==null?void 0:Be[C==null?void 0:C.type])!==""?(Je=e==null?void 0:e.heading)==null?void 0:Je[C==null?void 0:C.type]:"Untitled"]})]}),f===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{A(Ee,be),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ut=(st=x[Ee])==null?void 0:st.children[be])==null?void 0:ut.children.length)>1&&o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(Ee,be,he),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{w(e,Ee,be,he),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:K.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},q=It.findIndex(S,function(K){return(K==null?void 0:K.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var be,he,fe;const K=It.cloneDeep(E);((he=(be=S[q])==null?void 0:be.repeatableFieldsData)==null?void 0:he.length)>=(e==null?void 0:e.minimumEntries)?K[e==null?void 0:e.uuid]=(fe=S[q])==null?void 0:fe.repeatableFields:delete K[e==null?void 0:e.uuid];const Ee=Object.keys(K).length;_(K),P(Ee)},ee=(pe=e==null?void 0:e.repeatableFields)==null?void 0:pe.map(K=>{var Ee;return{fieldUuid:K==null?void 0:K.uuid,field:K==null?void 0:K.uuid,header:(Ee=K==null?void 0:K.label)==null?void 0:Ee.english}}),Q=ee==null?void 0:ee.map(K=>o.jsx(xr,{field:K.field,header:K.header,body:Ee=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ee[K==null?void 0:K.field]}})})},K.field)),H=()=>{var he;const K=[...S],Ee=[];let be=!0;e:for(const[,fe]of e.children.entries()){for(const[,xe]of fe.children.entries())if(xe!=null&&xe.isPostField&&xe.isValid!==1){const Me={fieldId:xe.uuid,rowIndex:a};Ee.push(Me),Gt.emit("OnInvalidFieldCatch",Me),be=!1;break e}be=!0}be&&(Ee==null?void 0:Ee.length)===0&&(O(e==null?void 0:e.uuid,(he=K[q])==null?void 0:he.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},X=K=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{k(e==null?void 0:e.uuid,K==null?void 0:K.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...AAe,opacity:G,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.right}px`},className:c?"row container-row":"draggable row container-row",children:[N&&o.jsx(wg,{renderType:p,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),p===om&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsxs(F.Fragment,{children:[p===Yd&&o.jsx(Fr,{isAdvanceView:u,data:{path:be,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R(K,be,r,i,a,Ee)]},be)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(p===M0||p===P0||p===sm||p===E9||p===Qh)&&(f===!0?o.jsx(o.Fragment,{children:u===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:K=>ce(K,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:u,data:{path:be,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R(K,be,r,i,a,Ee)]},be)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(B=e==null?void 0:e.children)==null?void 0:B.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===Y)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[C==null?void 0:C.type]}),o.jsx("span",{children:(se=e==null?void 0:e.subHeadingText)==null?void 0:se[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]})})),p===K1&&(f===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((Ne=(me=x[r])==null?void 0:me.children[i])==null?void 0:Ne.children.length)>1&&o.jsxs("button",{onClick:()=>{m(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{w(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>z(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(we=e==null?void 0:e.children)==null?void 0:we.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===Y)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[C==null?void 0:C.type]}),o.jsx("span",{children:(ue=e==null?void 0:e.subHeadingText)==null?void 0:ue[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]})})),p===Yd&&o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})}),(e==null?void 0:e.rowIsRepeatable)&&M!==Y&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(Te=e.addToListButtonLabel)==null?void 0:Te[C==null?void 0:C.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(S==null?void 0:S.length)>0?(_e=S[q])==null?void 0:_e.repeatableFieldsData:[],children:[Q,M!==Y&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:K=>X(K)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},SAe=t=>{var le,G,R,ce,q,W,ee,Q;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:p,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),N=M?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(wAe,{page:f,section:d,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae},`row-${l}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=s==null?void 0:s.heading)==null?void 0:oe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{p(X),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=m[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(X,pe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,X,pe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(le=s==null?void 0:s.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,c,u),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:pe,childrenCount:s.children.length},onDrop:a}),z(H,pe,c,u,X)]},pe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{p(c),i()},children:o.jsx(Qt,{})})}),((ce=m[c])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,c,u,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=s==null?void 0:s.heading)==null?void 0:ee[A==null?void 0:A.type]}),o.jsx("p",{children:(Q=s==null?void 0:s.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,c,u,X)},pe)},pe)})]})})]})},CAe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=F.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(jA,{ref:a,modules:[KB,w4e],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((p,v)=>{var m;return(m=p==null?void 0:p.children)==null?void 0:m.map((A,w)=>{const x=`${n}-${c}-${f}-${v}-${w}`;return o.jsx(zA,{children:o.jsx("div",{className:"",children:o.jsx(Vc,{page:i,column:p,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:v,fieldIndex:w},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Ft,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Ft,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},xAe=t=>{const{isAdvanceView:e,isBuilderMode:n}=Ht(),{handleDrop:r}=sn(),{data:i,path:a,pageIndex:s}=t,{formBuilderFormSchema:l}=sn(),c=F.useRef(null),[{},u]=aa({type:ia,item:{type:ia,uuid:i.uuid,children:i.children,path:a},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,p,v)=>o.jsx(SAe,{data:f,section:f,path:h,page:i,pageIndex:p,sectionIndex:v},`section_${p}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":i==null?void 0:i.bgImage,"data-bg-color":`#${i==null?void 0:i.bgColor}`,children:n===!0?o.jsxs(o.Fragment,{children:[i.children.map((f,h)=>{const p=`${a}-${h}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:p,childrenCount:i.children.length},onDrop:r}),d(f,p,s,h)]},`section-${h}-${f.uuid}`)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:r,isLast:!0})]}):o.jsx(o.Fragment,{children:(l==null?void 0:l.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(CAe,{page:i,data:i,currentPath:a,pageIndex:s})}):o.jsx("div",{className:"p-1",children:i.children.map((f,h)=>{const p=`${a}-${h}`;return o.jsx(F.Fragment,{children:((f==null?void 0:f.isHidden)===!1||!n)&&d(f,p,s,h)},`section-${h}-${f.uuid}`)})})})})},TAe=()=>{const[t,e]=F.useState(!1),{isAdvanceView:n,isBuilderMode:r,emitSocketData:i}=Ht(),[a,s]=F.useState(!1),[l,c]=F.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:p}=sn(),v=(m,A,w)=>o.jsx(xAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===I9&&r===!1?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsx("div",{children:v(m,w,A)},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!1?o.jsx(rs,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||r),header:"Page",headerTemplate:x=>o.jsx(L8,{options:x,pageIndex:A,page:m,setTabSidebarSetting:s,clonePage:p,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((m,A)=>{const w=`${A}`;return o.jsxs(F.Fragment,{children:[r===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)}))})})})})},EAe={position:"relative"},IAe=t=>{var C,T,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:p,isBuilderMode:v}=Ht(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(d);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:u,type:"field",row:c,section:l,field:E,data:E,path:_,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y},`component-${n}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:p?{...EAe,opacity:w}:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!0?o.jsxs("div",{className:"builder-row-column",children:[((C=e==null?void 0:e.children)==null?void 0:C.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const P=`${n}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,data:{path:P,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(E,P,r,i,a,s,_)]},P)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.children)==null?void 0:S.map((E,_)=>{const P=`${n}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,r,i,a,s,_)},P)})})})},_Ae={},DAe=t=>{var P,O,k,M,Y,N,z,$,le;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:p}=sn(),{isRenderView:v,isBuilderMode:m}=Ht(),{task_status:A,TASK_PUBLISHED:w}=Ar(),[x,C]=F.useState(!1),[{isDragging:T},S]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:G=>({isDragging:G.isDragging()})}),E=T?.25:1;S(c);const _=(G,R,ce,q,W,ee)=>o.jsx(IAe,{page:l,row:e,section:s,data:G,path:R,pageIndex:ce,sectionIndex:q,rowIndex:W,columnIndex:ee},`column-${n}-${G.uuid}`);return o.jsxs("div",{style:{..._Ae,opacity:E,marginTop:`${(P=e==null?void 0:e.margin)==null?void 0:P.top}px`,marginBottom:`${(O=e==null?void 0:e.margin)==null?void 0:O.bottom}px`,marginLeft:`${(k=e==null?void 0:e.margin)==null?void 0:k.left}px`,marginRight:`${(M=e==null?void 0:e.margin)==null?void 0:M.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(wg,{visibilty:x,setVisibility:C,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),m===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((N=(Y=h[r])==null?void 0:Y.children[i])==null?void 0:N.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>C(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(z=e==null?void 0:e.children)==null?void 0:z.map((G,R)=>{const ce=`${n}-${R}`;return o.jsx(F.Fragment,{children:_(G,ce,r,i,a,R)},ce)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===w)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:($=e==null?void 0:e.heading)==null?void 0:$[p==null?void 0:p.type]}),o.jsx("span",{children:(le=e==null?void 0:e.subHeadingText)==null?void 0:le[p==null?void 0:p.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((G,R)=>{const ce=`${n}-${R}`;return o.jsx(F.Fragment,{children:_(G,ce,r,i,a,R)},ce)})})]})})]})},NAe=t=>{var S,E,_;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=sn(),{isAdvanceView:c,isBuilderMode:u}=Ht(),[d,f]=F.useState(!1),[h,p]=F.useState(!1),[v,m]=F.useState(null),A=F.useRef(null),[{isDragging:w},x]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:P=>({isDragging:P.isDragging()})}),C=w?.25:1;x(A);const T=(P,O,k,M,Y)=>o.jsx(DAe,{page:s,section:a,data:P,path:O,pageIndex:k,sectionIndex:M,rowIndex:Y},`row-${n}-${P.uuid}`);return o.jsxs("div",{style:{opacity:C,marginBottom:20},className:c?"draggable row":"",children:[u===!0&&o.jsx(Nh,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:m,saveElementModal:h,setSaveElementModal:p}),d===!0&&o.jsx(Dh,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),u===!0?o.jsx("div",{children:o.jsx("div",{children:e.children.map((P,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:T(P,k,r,i,O)},k)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(S=e==null?void 0:e.heading)==null?void 0:S[l==null?void 0:l.type]}),((E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type])&&o.jsx("p",{children:(_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((P,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:T(P,k,r,i,O)},k)},k)})]})})]})},S5={},C5={height:"1280px",width:"100%"},OAe=t=>{var d,f,h,p;const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=F.useRef(null),[{isDragging:s},l]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),c=s?0:1;l(a);const u=(v,m,A,w)=>o.jsx(NAe,{data:v,section:v,path:m,page:e,pageIndex:A,sectionIndex:w},`section_${A}_${w}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!0?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...S5,...C5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...S5,...C5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(F.Fragment,{children:u(v,A,r,m)},`section-${m}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...S5,...C5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...S5,...C5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(d=e==null?void 0:e.margin)==null?void 0:d.top}px`,marginBottom:`${(f=e==null?void 0:e.margin)==null?void 0:f.bottom}px`,marginLeft:`${(h=e==null?void 0:e.margin)==null?void 0:h.left}px`,marginRight:`${(p=e==null?void 0:e.margin)==null?void 0:p.right}px`},children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(F.Fragment,{children:((v==null?void 0:v.isHidden)===!1||i)&&u(v,A,r,m)},`section-${m}-${v.uuid}`)})})})})})})},FAe=()=>{const{isBuilderMode:t}=Ht(),[e,n]=F.useState(!1),[r,i]=F.useState(0),[a,s]=F.useState(!1),{formBuilderFormLayout:l}=sn(),c=(u,d,f)=>o.jsx(OAe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===I9&&t===!1?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!0?o.jsx(rs,{scrollable:!0,activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs(wr,{header:"Page",headerTemplate:h=>o.jsx(L8,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},kAe=t=>{var w,x,C,T;const e=F.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=sn(),{emitSocketData:s,isBuilderMode:l}=Ht(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:p}=t,v=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:m,children:[o.jsxs("span",{ref:l===!0?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),l===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),s()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(C=(x=(w=a[u])==null?void 0:w.children[d])==null?void 0:x.children[f])==null?void 0:C.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(p,u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},PAe={position:"relative"},MAe=t=>{var C,T,S,E,_;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:P=>({isDragging:P.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(P,O,k,M,Y,N,z)=>o.jsx(Vc,{page:p,column:a,type:"field",row:h,section:f,field:P,data:P,path:O,pageIndex:k,sectionIndex:M,rowIndex:Y,columnIndex:N,fieldIndex:z},`component-${s}-${P==null?void 0:P.uuid}`);return o.jsx("div",{style:e?{...PAe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:P=>o.jsx(kAe,{options:P,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((P,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(P,k,l,c,u,d,O)]},k)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(E=a==null?void 0:a.children)==null?void 0:E.map((P,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(P,k,l,c,u,d,O)]},k)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(_=a==null?void 0:a.children)==null?void 0:_.map((P,O)=>{const k=`${s}-${O}`;return o.jsx(F.Fragment,{children:x(P,k,l,c,u,d,O)},k)})})})},LAe=t=>{var x,C,T,S;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=F.useState(!1),l=F.useRef(null),{isBuilderMode:c,emitSocketData:u}=Ht(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:p,userSelectedLanguage:v}=sn(),m=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,w=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!0?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(Qt,{})]}),o.jsxs("span",{className:w,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[v==null?void 0:v.type])!==""?(C=a==null?void 0:a.heading)==null?void 0:C[v==null?void 0:v.type]:"Untitled"]})]}),c===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((S=(T=p[n])==null?void 0:T.children[r])==null?void 0:S.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},BAe={},VAe=t=>{var W,ee,Q,H,X,pe,ge,Ae,ye,oe,re;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r,isAdmin:i,renderType:a,emitSocketData:s}=Ht(),{handleDrop:l}=sn(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:p,page:v}=t,m=F.useRef(null),{userSelectedLanguage:A}=sn(),{userTaskSubmitFormData:w,taskRegisterData:x,updateTaskRegisterData:C,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:S,removeUserDataFormSectionRepeatableData:E,task_status:_,TASK_PUBLISHED:P}=Ar(),[O,k]=F.useState(!1),[{isDragging:M},Y]=aa({type:So,item:{type:So,uuid:c.uuid,children:c.children,path:u,data:c},collect:B=>({isDragging:B.isDragging()})}),N=M?.25:1;Y(m);const z=(B,ne,se,me,Ne,we)=>o.jsx(MAe,{page:v,row:c,section:p,data:B,path:ne,pageIndex:se,sectionIndex:me,rowIndex:Ne,columnIndex:we,emitSocketData:s},`column-${u}-${B.uuid}`),$=It.findIndex(w,function(B){return(B==null?void 0:B.rowId)===(c==null?void 0:c.uuid)}),le=()=>{var se,me,Ne;const B=It.cloneDeep(x);((me=(se=w[$])==null?void 0:se.repeatableFieldsData)==null?void 0:me.length)>=(c==null?void 0:c.minimumEntries)?B[c==null?void 0:c.uuid]=(Ne=w[$])==null?void 0:Ne.repeatableFields:delete B[c==null?void 0:c.uuid];const ne=Object.keys(B).length;C(B),T(ne)},G=(W=c==null?void 0:c.repeatableFields)==null?void 0:W.map(B=>{var ne;return{fieldUuid:B==null?void 0:B.uuid,field:B==null?void 0:B.uuid,header:(ne=B==null?void 0:B.label)==null?void 0:ne.english}}),R=G==null?void 0:G.map(B=>o.jsx(xr,{field:B.field,header:B.header,body:ne=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ne[B==null?void 0:B.field]}})})},B.field)),ce=()=>{var me;const B=[...w],ne=[];let se=!0;e:for(const[,Ne]of c.children.entries()){for(const[,we]of Ne.children.entries())if(we!=null&&we.isPostField&&we.isValid!==1){const ve={fieldId:we.uuid,rowIndex:h};console.log("inValidData",ve),ne.push(ve),Gt.emit("OnInvalidFieldCatch",ve),se=!1;break e}se=!0}se&&(ne==null?void 0:ne.length)===0&&(S(c==null?void 0:c.uuid,(me=B[$])==null?void 0:me.repeatableFields),Gt.emit("clearRepeatableFields",c==null?void 0:c.uuid),le())},q=B=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{E(c==null?void 0:c.uuid,B==null?void 0:B.rowIndex),setTimeout(()=>{le()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...BAe,opacity:N,marginTop:`${(ee=c==null?void 0:c.margin)==null?void 0:ee.top}px`,marginBottom:`${(Q=c==null?void 0:c.margin)==null?void 0:Q.bottom}px`,marginLeft:`${(H=c==null?void 0:c.margin)==null?void 0:H.left}px`,marginRight:`${(X=c==null?void 0:c.margin)==null?void 0:X.right}px`},className:n?"row container-row":"draggable row container-row",children:[O&&o.jsx(wg,{renderType:a,visibilty:O,setVisibility:k,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:B=>o.jsx(LAe,{options:B,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(pe=c==null?void 0:c.children)==null?void 0:pe.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:se,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),z(B,se,d,f,h,ne)]},se)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(ge=c==null?void 0:c.children)==null?void 0:ge.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsx(F.Fragment,{children:z(B,se,d,f,h,ne)},se)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&_===P)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Ae=c==null?void 0:c.heading)==null?void 0:Ae[A==null?void 0:A.type]}),o.jsx("span",{children:(ye=c==null?void 0:c.subHeadingText)==null?void 0:ye[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsx(F.Fragment,{children:z(B,se,d,f,h,ne)},se)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&_!==P&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>ce(),label:(oe=c.addToListButtonLabel)==null?void 0:oe[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(w==null?void 0:w.length)>0?(re=w[$])==null?void 0:re.repeatableFieldsData:[],children:[R,_!==P&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:B=>q(B)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:c})]})]})]})},qAe=t=>{var le,G,R,ce,q,W,ee,Q;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:p,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),N=M?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(VAe,{page:f,section:d,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae,emitSocketData:i},`row-${l}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=s==null?void 0:s.heading)==null?void 0:oe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{p(X),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=m[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(X,pe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,X,pe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(le=s==null?void 0:s.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,c,u),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:pe,childrenCount:s.children.length},onDrop:a}),z(H,pe,c,u,X)]},pe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{p(c),i()},children:o.jsx(Qt,{})})}),((ce=m[c])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,c,u,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=s==null?void 0:s.heading)==null?void 0:ee[A==null?void 0:A.type]}),o.jsx("p",{children:(Q=s==null?void 0:s.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,c,u,X)},pe)},pe)})]})})]})},UAe={position:"relative"},$Ae=t=>{var C,T,S;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:E=>({isDragging:E.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:p,type:"field",row:h,column:a,section:f,field:E,data:E,path:_,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y},`component-${s}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:e?{...UAe,opacity:w}:{},className:n?"":"draggable column container-column",children:r===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((E,_)=>{const P=`${s}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:P,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(E,P,l,c,u,d,_)]},P)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(S=a==null?void 0:a.children)==null?void 0:S.map((E,_)=>{const P=`${s}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,l,c,u,d,_)},P)})})})},jAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,p,v,m)=>o.jsx($Ae,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${p}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var p;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(p=f==null?void 0:f.children)==null?void 0:p.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},zAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=F.useRef(null),[{},u]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,p,v)=>o.jsx(qAe,{data:f,section:f,path:h,page:e,pageIndex:p,sectionIndex:v},`section_${p}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((f,h)=>{const p=`${n}-${h}`;return o.jsxs(F.Fragment,{children:[i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:p,childrenCount:e.children.length},onDrop:l}),d(f,p,r,h)]},`section-${h}-${f.uuid}`)}),i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(jAe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((f,h)=>{const p=`${n}-${h}`;return o.jsx(F.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:d(f,p,r,h)})}):((f==null?void 0:f.isHidden)===!1||!a)&&d(f,p,r,h)},`section-${h}-${f.uuid}`)})})})})},HAe=()=>{const[t,e]=F.useState(!1),{formBuilderFormLayout:n}=sn(),{isBuilderMode:r}=Ht(),i=()=>{},a=(s,l,c)=>o.jsx(zAe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||r)return o.jsxs("div",{children:[o.jsx(H0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},YAe={position:"relative"},KAe=t=>{var C;const{isRenderView:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,p=F.useRef(null),{handleDrop:v}=sn(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),w=m&&!e?.25:1;A(p);const x=(T,S,E,_,P,O,k)=>o.jsx(Vc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:S,pageIndex:E,sectionIndex:_,rowIndex:P,columnIndex:O,fieldIndex:k},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:n?{...YAe,opacity:w}:{},className:e?"form-builder-column container-column":"draggable form-builder-column container-column",children:r&&o.jsxs("div",{children:[(C=i==null?void 0:i.children)==null?void 0:C.map((T,S)=>{const E=`${a}-${S}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:E,childrenCount:i.children.length,droppedField:i},onDrop:v}),x(T,E,s,l,c,u,S)]},E)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:v,isLast:!0})]})})},XAe={},RAe=t=>{var q,W,ee,Q,H,X,pe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{userSelectedLanguage:u,handleDrop:d}=sn(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,addUserDataFormSectionRepeatableData:m,removeUserDataFormSectionRepeatableData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),{isRenderView:C,isAdmin:T,isAdvanceView:S,emitSocketData:E,renderType:_}=Ht(),[P,O]=F.useState(!1),[{isDragging:k},M]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:ge=>({isDragging:ge.isDragging()})}),Y=k?.25:1;M(c);const N=(ge,Ae,ye,oe,re,B)=>o.jsx(KAe,{page:l,row:e,section:s,data:ge,path:Ae,pageIndex:ye,sectionIndex:oe,rowIndex:re,columnIndex:B},`column-${n}-${ge.uuid}`),z=It.findIndex(f,function(ge){return(ge==null?void 0:ge.rowId)===(e==null?void 0:e.uuid)}),$=()=>{var ye,oe,re;const ge=It.cloneDeep(h);((oe=(ye=f[z])==null?void 0:ye.repeatableFieldsData)==null?void 0:oe.length)>=(e==null?void 0:e.minimumEntries)?ge[e==null?void 0:e.uuid]=(re=f[z])==null?void 0:re.repeatableFields:delete ge[e==null?void 0:e.uuid];const Ae=Object.keys(ge).length;p(ge),v(Ae)},le=(q=e==null?void 0:e.repeatableFields)==null?void 0:q.map(ge=>{var Ae;return{fieldUuid:ge==null?void 0:ge.uuid,field:ge==null?void 0:ge.uuid,header:(Ae=ge==null?void 0:ge.label)==null?void 0:Ae.english}}),G=le==null?void 0:le.map(ge=>o.jsx(xr,{field:ge.field,header:ge.header,body:Ae=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ae[ge==null?void 0:ge.field]}})})},ge.field)),R=()=>{var oe;const ge=[...f],Ae=[];let ye=!0;e:for(const[,re]of e.children.entries()){for(const[,B]of re.children.entries())if(B!=null&&B.isPostField&&B.isValid!==1){const ne={fieldId:B.uuid,rowIndex:a};Ae.push(ne),Gt.emit("OnInvalidFieldCatch",ne),ye=!1;break e}ye=!0}ye&&(Ae==null?void 0:Ae.length)===0&&(m(e==null?void 0:e.uuid,(oe=ge[z])==null?void 0:oe.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),$())},ce=ge=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,ge==null?void 0:ge.rowIndex),setTimeout(()=>{$()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...XAe,opacity:Y,marginTop:`${(W=e==null?void 0:e.margin)==null?void 0:W.top}px`,marginBottom:`${(ee=e==null?void 0:e.margin)==null?void 0:ee.bottom}px`,marginLeft:`${(Q=e==null?void 0:e.margin)==null?void 0:Q.left}px`,marginRight:`${(H=e==null?void 0:e.margin)==null?void 0:H.right}px`},className:C?"row container-row":"draggable row container-row",children:[P&&o.jsx(wg,{renderType:_,visibilty:P,setVisibility:O,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:E},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((ge,Ae)=>{const ye=`${n}-${Ae}`;return o.jsxs(F.Fragment,{children:[_===Yd&&o.jsx(Fr,{isAdvanceView:S,data:{path:ye,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),N(ge,ye,r,i,a,Ae)]},ye)}),o.jsx(Fr,{isAdvanceView:S,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&w!==x&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>R(),label:(X=e.addToListButtonLabel)==null?void 0:X[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(f==null?void 0:f.length)>0?(pe=f[z])==null?void 0:pe.repeatableFieldsData:[],children:[G,w!==x&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:ge=>ce(ge)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},GAe=t=>{var N,z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isBuilderMode:p,isAdvanceView:v,renderType:m,emitSocketData:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),_=F.useRef(null),[{isDragging:P},O]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:$=>({isDragging:$.isDragging()})}),k=P?.25:1;O(_);const M=($,le,G,R,ce)=>o.jsx(RAe,{page:s,section:a,data:$,path:le,pageIndex:G,sectionIndex:R,rowIndex:ce},`row-${n}-${$.uuid}`),Y=($,le,G)=>{var W,ee;const R=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ce=`${$.className} justify-content-space-between panel-tab-section`,q=`${$.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:ce,children:[o.jsxs("span",{ref:p===!0?_:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsxs("span",{className:q,children:[G+1," ",(W=e==null?void 0:e.heading)==null?void 0:W[f==null?void 0:f.type]]})]}),p===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{c(le),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ee=d[le])==null?void 0:ee.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{l(le,G),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{u(e,le,G),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:k,marginBottom:20},className:v?"draggable row":"",children:[p===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:m,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),p===!0&&o.jsxs(ci,{className:"mb-5",header:(N=e==null?void 0:e.heading)==null?void 0:N.english,toggleable:!0,headerTemplate:$=>Y($,r,i),children:[o.jsx("p",{children:(z=e==null?void 0:e.subHeadingText)==null?void 0:z[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map(($,le)=>{const G=`${n}-${le}`;return o.jsx(F.Fragment,{children:M($,G,r,i,le)},G)}),o.jsx(Fr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]})]})},WAe=t=>{const{isRenderView:e,isBuilderMode:n}=Ht(),{data:r,path:i,pageIndex:a}=t,s=F.useRef(null),[,l]=aa({type:ia,item:{type:ia,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(GAe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(F.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})}):o.jsx(o.Fragment,{})})},x5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=F.useState(!1),{userTrainingSaveData:u}=Ar(),d=h=>{var p,v;if(u!==null&&h){const m=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(p=u[m])!=null&&p.isSeen?(v=u[m])==null?void 0:v.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const v=u.findIndex(m=>(m==null?void 0:m.fieldId)===(i==null?void 0:i.uuid));h=u[v].logs}else h=[];return h==null?void 0:h.map((v,m)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[v==null?void 0:v.action," on ",((v==null?void 0:v.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Mn(v==null?void 0:v.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(v==null?void 0:v.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100),"%"]})]})]},`logs_${m}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Ft,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Ft,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Ft,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Ft,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},QAe=t=>{var C,T,S,E,_,P;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=Ar(),p=(C=d==null?void 0:d.training)!=null&&C.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},v=O=>{if(f!==null){const k=[...f],M=k.findIndex(Y=>(Y==null?void 0:Y.fieldId)===(O==null?void 0:O.uuid));M>=0&&(k[M]={...k[M],isSeen:!0}),h([...k])}},m=O=>{var k;i(O),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(k=O==null?void 0:O.media_url)==null?void 0:k.english}]})},A=O=>{var k;v(O),i(O),c((k=O==null?void 0:O.media_url)==null?void 0:k.english),a(l)},w=O=>{v(O),i(O),u(O==null?void 0:O.documents),a(l)},x=O=>{var k,M;(k=O==null?void 0:O.quizSchema)!=null&&k.assessment_id&&(p((M=O==null?void 0:O.quizSchema)==null?void 0:M.assessment_id),a(l),i(O))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(x5,{title:(S=e==null?void 0:e.title)==null?void 0:S.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:m,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(x5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(x5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:w,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(x5,{title:(P=e==null?void 0:e.quizSchema)==null?void 0:P.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},JAe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(QAe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},ZAe=t=>{var v,m,A,w,x,C,T,S,E,_;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Ht(),p=(v=h==null?void 0:h.image)!=null&&v.MediaImage?(m=h==null?void 0:h.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:P=>{e(O=>{var k;return(k=n==null?void 0:n.answersText)==null?void 0:k[r==null?void 0:r.type]}),i(P,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((w=n.answersText)==null?void 0:w[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(sa,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:P=>{u({isCorrect:null,text:null}),e(O=>{var k;return(k=P.target.value)==null?void 0:k[r==null?void 0:r.type]}),i(P,s,l,n,c),a(!0)}}),((C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(p,{mediaId:(S=n.answersTextImage)==null?void 0:S[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(E=n.answersText)==null?void 0:E[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((_=n.answersText)==null?void 0:_[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong answer"]}):""})]},s)},ewe=t=>{var p,v,m,A,w,x,C;const{media:e}=Ht(),n=(p=e==null?void 0:e.image)!=null&&p.MediaImage?(v=e==null?void 0:e.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return F.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(S=>{var E;return S===((E=i.answersText)==null?void 0:E[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((m=i.answersText)==null?void 0:m[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Yr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var S;return T===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}),onChange:T=>{var S;h(T.checked,(S=T.target.value)==null?void 0:S[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((w=i.answersTextImage)==null?void 0:w[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(C=i.answersText)==null?void 0:C[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function JU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function twe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ZU(t,e,n){return e&&twe(t.prototype,e),t}function e$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gw(t,e)}function T5(t){return T5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},T5(t)}function Gw(t,e){return Gw=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Gw(t,e)}function nwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function rwe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iwe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:rwe(t)}function t$(t){var e=nwe();return function(){var r=T5(t),i;if(e){var a=T5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return iwe(this,i)}}function awe(t){return swe(t)||owe(t)||lwe(t)||cwe()}function swe(t){if(Array.isArray(t))return Ww(t)}function owe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function lwe(t,e){if(t){if(typeof t=="string")return Ww(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ww(t,e)}}function Ww(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4285
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wye(t,e){if(t){if(typeof t=="string")return YU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YU(t,e)}}function YU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Sye(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Cye(t){if(Array.isArray(t))return t}function xye(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&s)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&a&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof s=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=Eye({international:s,country:i,defaultCountry:a,withCountryCallingCode:l}),f=F.useRef(),h=function(W,ee,Q){console.error("[react-phone-number-input] Expected phone number ".concat(W," to correspond to country ").concat(ee," but ").concat(Q?"in reality it corresponds to country "+Q:"it doesn't",".")),f.current=!0},p=function(W){return n&&bye(n),Tye(n,i,a,d,c,u,function(){W&&W.onCountryMismatch&&W.onCountryMismatch();for(var ee=arguments.length,Q=new Array(ee),H=0;H<ee;H++)Q[H]=arguments[H];h.apply(e,Q)})},v=F.useState(i),m=Ag(v,2),A=m[0],w=m[1],x=F.useState(a),C=Ag(x,2),T=C[0],S=C[1],E=F.useState(p()),_=Ag(E,2),P=_[0],O=_[1],k=F.useState(n),M=Ag(k,2),Y=M[0],N=M[1],z=F.useState(),$=Ag(z,2);$[0];var le=$[1],G=F.useCallback(function(){return le({})},[le]);function R(q){if(q){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(q="+".concat(F1(i,u)).concat(q));var W=new y5(i||a,u);return W.input(q),W.getNumberValue()}}F.useEffect(function(){n!==Y&&(N(n),O(p()))},[n]),F.useEffect(function(){if(i!==A){w(i);var q,W=p({onCountryMismatch:function(){q=!0}});O(W),q&&N(R(W))}},[i]),F.useEffect(function(){a!==T&&(S(a),O(p()))},[a]),F.useEffect(function(){Y!==n&&r(Y)},[Y]);var ce=F.useCallback(function(q){var W;if(i)if(d==="INTERNATIONAL"){var ee=Kw(i,u);if(q.indexOf(ee)!==0){if(q&&q[0]!=="+")q=ee+q;else if(!f.current)return O(ee),N(void 0),G()}}else q&&q[0]==="+"&&(q=q.slice(1));else a||q&&q[0]!=="+"&&(q="+"+q);q&&(W=R(q)),O(q),N(W)},[i,d,a,u,O,N,G,f]);return{phoneDigits:P,setPhoneDigits:ce,inputFormat:d}}function Tye(t,e,n,r,i,a,s){if(e&&r==="INTERNATIONAL"){var l=Kw(e,a);return t?(t.indexOf(l)!==0&&s(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new y5(void 0,a);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?s(t,e,u.country):u.countryCallingCode!==F1(e,a)&&s(t,e),r){case"NATIONAL":return k1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return k1(A5(u.formatInternational(),Kw(e,a)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===F1(n,a)&&i?k1(u.formatNational()):t;else return""}function Eye(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var Iye=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function Xw(){return Xw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xw.apply(this,arguments)}function _ye(t,e){if(t==null)return{};var n=Dye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Dye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function w5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=_ye(t,Iye),p=xye({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),v=p.phoneDigits,m=p.setPhoneDigits,A=p.inputFormat;return F.createElement(n,Xw({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:m}))}w5=F.forwardRef(w5),w5.propTypes={value:Tn.string,onChange:Tn.func.isRequired,country:Tn.string,defaultCountry:Tn.string,international:Tn.bool,withCountryCallingCode:Tn.bool,Component:Tn.elementType.isRequired,useNationalFormatForDefaultCountryValue:Tn.bool,metadata:yye};var Nye=["type","autoComplete","smartCaret","metadata"];function Rw(){return Rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rw.apply(this,arguments)}function Oye(t,e){if(t==null)return{};var n=Fye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Fye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function KU(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=Oye(n,Nye);return F.createElement(w5,Rw({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?dye:mye}))}return e=F.forwardRef(e),e.propTypes={type:Tn.string,autoComplete:Tn.string,smartCaret:Tn.bool,metadata:Tn.object},e}KU();const kye=KU(E8e),Pye=t=>{var Q,H,X,pe,ge,Ae,ye,oe,re,B,ne;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:p,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:C}=Ht(),[T,S]=F.useState(!1),[E,_]=F.useState(""),[P,O]=F.useState(0),[k,M]=F.useState(!1),[Y,N]=F.useState(!1),z=()=>{N(!0)},$=()=>{N(!1)},le=()=>{var se,me,Ne;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const we=[...v.repeatableFields],ve=It.findIndex(we,function(ue){return ue.uuid===(d==null?void 0:d.uuid)});ve>=0&&we[ve].fieldData?_(we[ve].fieldData):_("")}}else{const we=a;if(we!=null&&we.length){for(const ve of we)if(ve.fieldId===t.field.uuid&&((se=ve==null?void 0:ve.postData[0])==null?void 0:se.postValue)!==""&&((me=ve==null?void 0:ve.postData[0])!=null&&me.postValue)){_((Ne=ve==null?void 0:ve.postData[0])==null?void 0:Ne.postValue);break}}}M(!0)};F.useEffect(()=>{k||le();const se=Gt.addListener("clearRepeatableFields",ve=>{ve===(v==null?void 0:v.uuid)&&(_(""),O(0),d.isValid=0,u(p,h,m,A,f,d))}),me=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=d==null?void 0:d.attributes)!=null&&ve.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",ve=>{d.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),we=Gt.addListener("OnGetFieldValue",ve=>{var Te;const ue=(Te=ve==null?void 0:ve.repeatableColumn)==null?void 0:Te.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(d==null?void 0:d.uuid));ue!=null&&ue.length});return()=>{me.remove(),Ne.remove(),we.remove(),se.remove()}});const G=se=>{S(se)},R=()=>{S(!1)},ce=(se,me)=>{const Ne=a,we=It.cloneDeep(e);if(we[d==null?void 0:d.uuid]=se,(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:se});if(!(v!=null&&v.rowIsRepeatable)){n(we);const ve=Object.keys(we).length;r(ve)}},q=(se,me)=>{var Ne;if(a){const we=[...a],ve=It.findIndex(we,function(Te){return Te.rowId===(v==null?void 0:v.uuid)});let ue=(Ne=a[ve])==null?void 0:Ne.repeatableFields;ue={...ue,[se==null?void 0:se.uuid]:me},we[ve]={...we[ve],repeatableFields:ue},i(we)}_(me),me!==""?se.isValid=1:se.isValid=0},W=se=>{v!=null&&v.rowIsRepeatable?q(d,se):ce(se)},ee=o.jsxs("div",{onMouseOver:z,onMouseOut:$,children:[C&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${C&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:C?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Q=d==null?void 0:d.headerText)==null?void 0:Q[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((H=d==null?void 0:d.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",C?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(X=d==null?void 0:d.label)==null?void 0:X[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Vi,{message:(pe=d==null?void 0:d.toolTip)==null?void 0:pe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ae=(ge=d==null?void 0:d.icon)==null?void 0:ge.properties)==null?void 0:Ae.name)}),o.jsx(kye,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:E,onFocus:()=>O(1),onChange:W,international:!0,country:"GB",className:`${P===1&&((oe=d==null?void 0:d.attributes)!=null&&oe.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:w,disabled:x||w})]}),o.jsx("div",{children:((re=d==null?void 0:d.attributes)==null?void 0:re.required)&&o.jsx("small",{className:"error",children:P===1&&!E?(B=d==null?void 0:d.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ne=d==null?void 0:d.helperText)==null?void 0:ne[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Zi,{visibilty:T,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:ee})]})},Mye=t=>{var ce,q,W,ee,Q,H,X,pe,ge,Ae,ye;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isAdmin:l,isBuilderMode:c}=Ht(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:p,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=Ar(),{userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(""),[S,E]=F.useState(0),[_,P]=F.useState(!1),O=()=>{P(!0)},k=()=>{P(!1)};F.useEffect(()=>{w||$();const oe=Gt.addListener("clearRepeatableFields",B=>{B===(a==null?void 0:a.uuid)&&(T(""),E(0),e.isValid=0)}),re=Gt.addListener("onSubmitUserForm",()=>{var B;(B=e==null?void 0:e.attributes)!=null&&B.required?C!==""&&hu.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{re.remove(),oe.remove()}});const[M,Y]=F.useState(!1),N=oe=>{Y(oe)},z=()=>{Y(!1)},$=()=>{var oe,re,B;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ne=[...a.repeatableFields],se=It.findIndex(ne,function(me){return me.uuid===(e==null?void 0:e.uuid)});se>=0&&ne[se].fieldData?T(ne[se].fieldData):T("")}}else{const ne=v;if(ne!=null&&ne.length){for(const se of ne)if(se.fieldId===t.field.uuid&&((oe=se==null?void 0:se.postData[0])==null?void 0:oe.postValue)!==""&&((re=se==null?void 0:se.postData[0])!=null&&re.postValue)){T((B=se==null?void 0:se.postData[0])==null?void 0:B.postValue),x(!0);break}}}x(!0)},le=oe=>{T(oe);const re=v,B=It.cloneDeep(d);if(oe!==""&&hu.test(oe)===!0){if(B[e==null?void 0:e.uuid]=oe,(re==null?void 0:re.length)>0)for(const ne of re)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:oe})}else if(delete B[e==null?void 0:e.uuid],(re==null?void 0:re.length)>0)for(const ne of re)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){f(B);const ne=Object.keys(B).length;h(ne)}},G=(oe,re)=>{var we;const B=[...v],ne=It.findIndex(B,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let se=(we=v[ne])==null?void 0:we.repeatableFields;const me=oe,Ne=me==null?void 0:me.uuid;se={...se,[Ne]:re},B[ne]={...B[ne],repeatableFields:se},p(B),T(re),re!==""&&hu.test(re)===!0?e.isValid=1:e.isValid=0},R=o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[c&&_&&o.jsx(Wr,{handleFieldSettingsSidebar:N,...t}),o.jsxs("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ce=e==null?void 0:e.headerText)==null?void 0:ce[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(W=e==null?void 0:e.label)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(ee=e==null?void 0:e.toolTip)==null?void 0:ee[A==null?void 0:A.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((H=(Q=e==null?void 0:e.icon)==null?void 0:Q.properties)==null?void 0:H.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(X=e==null?void 0:e.placeholder)==null?void 0:X[A==null?void 0:A.type],value:C,onFocus:()=>E(1),onChange:oe=>{a!=null&&a.rowIsRepeatable?G(r,i):le(oe.target.value)},className:S===1&&((pe=e==null?void 0:e.attributes)!=null&&pe.required)?C?"valid":"invalid":"valid'",readOnly:s,disabled:l})]}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:S===1&&!C?(Ae=e==null?void 0:e.validationMesssage)==null?void 0:Ae[A==null?void 0:A.type]:""})}),C!==""&&S===1&&hu.test(C)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ye=e==null?void 0:e.helperText)==null?void 0:ye[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(Zi,{visibilty:M,closeSettingFieldSidebar:z,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},Lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUN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I6p9YzgPR4n0EbwXuzJ0H2MIvfRBQv1kA+izWMg58L2OELcCVLGZZNCv2UhFJMxJN/p7ESVPbAk9njPJdDxz3nwUgj69nuu4NNDghWlwRR7MtUwZJBRJtxqa2BY5j8m6B/kvZxsRa8zkAGaSb2Ys9uIfEvn265N0kPhdtbuzT9SSVVBrirKmnCR7Zp0s+zhZeF2t4qk/X0xRXADKINTxF4j/24VJbCa5iGyc6+UuajmhzI9s4keAqYGvvL8h/cPLPwxWATNJNDLKY7wPtHl3iW8Al0eIXPfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",qye=t=>{var R,ce,q,W,ee,Q,H,X,pe;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:p,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=F.useState(!1),[x,C]=F.useState(""),[T,S]=F.useState(0),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)};F.useEffect(()=>{A||z();const ge=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(C(""),S(0),e.isValid=0)}),Ae=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&hu.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Ae.remove(),ge.remove()}});const[k,M]=F.useState(!1),Y=ge=>{M(ge)},N=()=>{M(!1)},z=()=>{var ge,Ae,ye;if(i!=null&&i.rowIsRepeatable){const oe=[...(i==null?void 0:i.repeatableFields)||[]],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?C(oe[re].fieldData):C("")}else{const oe=p;if(oe!=null&&oe.length){for(const re of oe)if(re.fieldId===t.field.uuid&&((ge=re==null?void 0:re.postData[0])==null?void 0:ge.postValue)!==""&&((Ae=re==null?void 0:re.postData[0])!=null&&Ae.postValue)){C((ye=re==null?void 0:re.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},$=(ge,Ae)=>{C(Ae);const ye=p,oe=It.cloneDeep(u);if(ye!==null){if(Ae){if(oe[e==null?void 0:e.uuid]=Ae,(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:Ae})}else if(delete oe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(oe);const re=Object.keys(oe).length;f(re)}},le=(ge,Ae,ye,oe)=>{var se;const re=[...p],B=It.findIndex(re,function(me){return me.rowId===(i==null?void 0:i.uuid)});let ne=(se=p[B])==null?void 0:se.repeatableFields;ne={...ne,[ye==null?void 0:ye.uuid]:oe},re[B]={...re[B],repeatableFields:ne},h(re),C(oe),oe!==""&&hu.test(oe)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(q=e==null?void 0:e.label)==null?void 0:q[m==null?void 0:m.type]}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(W=e==null?void 0:e.toolTip)==null?void 0:W[m==null?void 0:m.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(S6,{cancelIcon:o.jsx("img",{src:Lye,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:Bye,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:Vye,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(ee=e==null?void 0:e.placeholder)==null?void 0:ee[m==null?void 0:m.type],value:x,onFocus:()=>S(1),onChange:ge=>{i!=null&&i.rowIsRepeatable?le(n,r,e,ge.value):$(ge,ge.value)},className:T===1&&((Q=e==null?void 0:e.attributes)!=null&&Q.required)?x?"valid":"invalid":"valid'",readOnly:a})}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(X=e==null?void 0:e.validationMesssage)==null?void 0:X[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(pe=e==null?void 0:e.helperText)==null?void 0:pe[m==null?void 0:m.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Zi,{visibilty:k,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:G})]})},Uye=t=>{var R,ce,q,W,ee,Q,H,X,pe;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:p,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=F.useState(!1),[x,C]=F.useState(""),[T,S]=F.useState(0),[E,_]=F.useState(!1),P=()=>{_(!0)},O=()=>{_(!1)};F.useEffect(()=>{A||z();const ge=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(C(""),S(0),e.isValid=0)}),Ae=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&hu.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Ae.remove(),ge.remove()}});const[k,M]=F.useState(!1),Y=ge=>{M(ge)},N=()=>{M(!1)},z=()=>{var ge,Ae,ye;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const oe=[...i.repeatableFields],re=It.findIndex(oe,function(B){return B.uuid===(e==null?void 0:e.uuid)});re>=0&&oe[re].fieldData?C(oe[re].fieldData):C("")}}else{const oe=p;if(oe!=null&&oe.length){for(const re of oe)if(re.fieldId===t.field.uuid&&((ge=re==null?void 0:re.postData[0])==null?void 0:ge.postValue)!==""&&((Ae=re==null?void 0:re.postData[0])!=null&&Ae.postValue)){C((ye=re==null?void 0:re.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},$=(ge,Ae)=>{C(Ae);const ye=p,oe=It.cloneDeep(u);if(ye!==null){if(Ae){if(oe[e==null?void 0:e.uuid]=Ae,(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:Ae})}else if(delete oe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const re of ye)re.fieldId===t.field.uuid&&(re.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(oe);const re=Object.keys(oe).length;f(re)}},le=(ge,Ae,ye,oe)=>{var se;const re=[...p],B=It.findIndex(re,function(me){return me.rowId===(i==null?void 0:i.uuid)});let ne=(se=p[B])==null?void 0:se.repeatableFields;ne={...ne,[ye==null?void 0:ye.uuid]:oe},re[B]={...re[B],repeatableFields:ne},h(re),C(oe),oe!==""&&hu.test(oe)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:P,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:l?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(q=e==null?void 0:e.label)==null?void 0:q[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(W=e==null?void 0:e.toolTip)==null?void 0:W[m==null?void 0:m.type],position:"right"})})]}),o.jsx(T6,{id:e==null?void 0:e.uuid,placeholder:(ee=e==null?void 0:e.placeholder)==null?void 0:ee[m==null?void 0:m.type],value:x,onFocus:()=>S(1),onChange:ge=>{i!=null&&i.rowIsRepeatable?le(n,r,e,ge.value):$(ge,ge.value)},className:T===1&&((Q=e==null?void 0:e.attributes)!=null&&Q.required)?x?"valid":"invalid":"valid'",readOnly:a}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(X=e==null?void 0:e.validationMesssage)==null?void 0:X[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(pe=e==null?void 0:e.helperText)==null?void 0:pe[m==null?void 0:m.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Zi,{visibilty:k,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:G})]})},$ye=t=>{var G,R,ce,q,W,ee;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,updateUserFormDataSubmit:f,userTaskSubmitFormData:h,TASK_PUBLISHED:p}=Ar(),{userSelectedLanguage:v}=sn(),[m,A]=F.useState(!1),[w,x]=F.useState(""),[C,T]=F.useState(0),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)};F.useEffect(()=>{m||N();const Q=Gt.addListener("clearRepeatableFields",X=>{X===(i==null?void 0:i.uuid)&&(x(""),T(0),e.isValid=0)}),H=Gt.addListener("onSubmitUserForm",()=>{var X;(X=e==null?void 0:e.attributes)!=null&&X.required&&(w!==""&&hu.test(w)===!0?e.isValid=1:e.isValid=0)});return()=>{H.remove(),Q.remove()}});const[O,k]=F.useState(!1),M=Q=>{k(Q)},Y=()=>{k(!1)},N=()=>{var Q,H,X;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const pe=[...i.repeatableFields],ge=It.findIndex(pe,function(Ae){return Ae.uuid===(e==null?void 0:e.uuid)});ge>=0&&pe[ge].fieldData?x(pe[ge].fieldData):x("")}}else{const pe=h;if(pe!=null&&pe.length){for(const ge of pe)if(ge.fieldId===t.field.uuid&&((Q=ge==null?void 0:ge.postData[0])==null?void 0:Q.postValue)!==""&&((H=ge==null?void 0:ge.postData[0])!=null&&H.postValue)){x((X=ge==null?void 0:ge.postData[0])==null?void 0:X.postValue),A(!0);break}}}A(!0)},z=(Q,H)=>{x(H);const X=h,pe=It.cloneDeep(c);if(H){if(pe[e==null?void 0:e.uuid]=H,(X==null?void 0:X.length)>0)for(const ge of X)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:H})}else if(delete pe[e==null?void 0:e.uuid],(X==null?void 0:X.length)>0)for(const ge of X)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){u(pe);const ge=Object.keys(pe).length;d(ge)}},$=(Q,H,X,pe)=>{var oe;const ge=[...h],Ae=It.findIndex(ge,function(re){return re.rowId===(i==null?void 0:i.uuid)});let ye=(oe=h[Ae])==null?void 0:oe.repeatableFields;ye={...ye,[X==null?void 0:X.uuid]:pe},ge[Ae]={...ge[Ae],repeatableFields:ye},f(ge),x(pe),pe!==""&&hu.test(pe)===!0?e.isValid=1:e.isValid=0},le=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[s&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:M,...t}),o.jsxs("div",{className:`field ${s&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:s?"card p-fluid field-form-builder":"p-fluid",children:[s&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(wn,{type:s===!1?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(G=e==null?void 0:e.placeholder)==null?void 0:G[v==null?void 0:v.type],value:(R=e==null?void 0:e.defaultValue)==null?void 0:R[v==null?void 0:v.type],onFocus:()=>T(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?$(n,r,e,e==null?void 0:e.defaultValue):z("",e==null?void 0:e.defaultValue)},className:C===1&&((ce=e==null?void 0:e.attributes)!=null&&ce.required)?w?"valid":"invalid":"valid'",readOnly:l===p}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ee=e==null?void 0:e.helperText)==null?void 0:ee[v==null?void 0:v.type]})})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[O===!0&&o.jsx(Zi,{visibilty:O,closeSettingFieldSidebar:Y,...t}),o.jsx(xi,{...t,fieldWrap:le})]})},XU=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=F.useState(e),{isBuilderMode:f}=Ht();F.useEffect(()=>{var S;return x((S=e[c])==null?void 0:S[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:p,fieldSettingUpdateInlineConditional:v,gridComponentFieldSettingUpdate:m}=sn(),A=(S,E,_)=>{d(P=>({...P,[S]:{...P[S],[E==null?void 0:E.type]:_}}))},[w,x]=F.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);F.useEffect(()=>(C(),()=>{}),[u]);const C=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(S[pa],S[ga],S[Ta],S[Ea],S[Ia],S[Pa],S[Go],S[Co],u):(S==null?void 0:S.length)>Pa&&(S==null?void 0:S.length)===ql+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(S[pa],S[ga],S[Ta],S[Ea],S[Ia],S[5],S[6],S[7],u):p(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(P3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:w,disabled:!f,onChange:S=>{var E;x(V3.sanitize((E=S==null?void 0:S.target)==null?void 0:E.value))},onBlur:S=>{var _;const E=V3.sanitize((_=S==null?void 0:S.target)==null?void 0:_.innerText);x(E),A(c,h,E)},tagName:"article"})})},jye=t=>{var ee,Q,H,X,pe,ge,Ae;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v,isDisabled:m}=t,{isBuilderMode:A,isAdmin:w}=Ht(),[x,C]=F.useState(!1),[T,S]=F.useState(""),[E,_]=F.useState(0),[P,O]=F.useState(!1),[k,M]=F.useState(!1),Y=()=>{M(!0)},N=()=>{M(!1)},z=()=>{var ye,oe,re;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const B=[...h.repeatableFields],ne=It.findIndex(B,function(se){return se.uuid===(c==null?void 0:c.uuid)});ne>=0&&B[ne].fieldData?S(B[ne].fieldData):S("")}}else{const B=a;if(B!=null&&B.length){for(const ne of B)if(ne.fieldId===t.field.uuid&&((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue)!==""&&((oe=ne==null?void 0:ne.postData[0])!=null&&oe.postValue)){S((re=ne==null?void 0:ne.postData[0])==null?void 0:re.postValue);break}}}O(!0)};F.useEffect(()=>{P||z();const ye=Gt.addListener("clearRepeatableFields",ne=>{ne===(h==null?void 0:h.uuid)&&(S(""),_(0),c.isValid=0,l(f,d,p,v,u,c))}),oe=Gt.addListener("onSubmitUserForm",()=>{var ne;(ne=c==null?void 0:c.attributes)!=null&&ne.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),re=Gt.addListener("OnInvalidFieldCatch",ne=>{c.uuid===(ne==null?void 0:ne.fieldId)?_(1):_(0)}),B=Gt.addListener("OnGetFieldValue",ne=>{var me;const se=(me=ne==null?void 0:ne.repeatableColumn)==null?void 0:me.filter(Ne=>(Ne==null?void 0:Ne.fieldUuid)===(c==null?void 0:c.uuid));se!=null&&se.length});return()=>{oe.remove(),re.remove(),B.remove(),ye.remove()}});const $=ye=>{C(ye)},le=()=>{C(!1)},G=ye=>{var B,ne;S(ye.target.value);const oe=a,re=It.cloneDeep(e);if(oe!==null){if((B=ye==null?void 0:ye.target)!=null&&B.value){if(re[c==null?void 0:c.uuid]=(ne=ye==null?void 0:ye.target)==null?void 0:ne.value,(oe==null?void 0:oe.length)>0)for(const se of oe)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:ye.target.value})}else if(delete re[c==null?void 0:c.uuid],(oe==null?void 0:oe.length)>0)for(const se of oe)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(re);const se=Object.keys(re).length;r(se)}},R=(ye,oe,re,B)=>{var ne;if(a){const se=[...a],me=It.findIndex(se,function(we){return we.rowId===(h==null?void 0:h.uuid)});let Ne=(ne=a[me])==null?void 0:ne.repeatableFields;Ne={...Ne,[re==null?void 0:re.uuid]:B},se[me]={...se[me],repeatableFields:Ne},i(se)}S(B),B!==""?re.isValid=1:re.isValid=0},ce=10,q=()=>{const ye=[];for(let oe=0;oe<=ce;oe++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:re=>{h!=null&&h.rowIsRepeatable?R(f,d,c,re.target.value):G(re)},checked:parseInt(T)===oe,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:oe,disabled:m}),o.jsx("span",{children:oe})]},`field-${c==null?void 0:c.uuid}-likertScale-${oe} ${parseInt(T)===oe?"scale-selected":""}`));return ye},W=o.jsxs("div",{onMouseOver:Y,onMouseOut:N,children:[A&&k&&o.jsx(Wr,{handleFieldSettingsSidebar:$,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ee=c==null?void 0:c.headerText)==null?void 0:ee[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(H=c==null?void 0:c.label)==null?void 0:H[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Vi,{message:(X=c==null?void 0:c.toolTip)==null?void 0:X[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(XU,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(XU,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:q()})]})}),o.jsx("div",{children:((pe=c==null?void 0:c.attributes)==null?void 0:pe.required)&&o.jsx("small",{className:"error",children:E===1&&!T?(ge=c==null?void 0:c.validationMesssage)==null?void 0:ge.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ae=c==null?void 0:c.helperText)==null?void 0:Ae[s==null?void 0:s.type]})})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:le,...t}),o.jsx(xi,{...t,fieldWrap:W})]})},zye=t=>{var Q,H,X,pe,ge,Ae,ye,oe,re,B,ne,se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:p,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isBuilderMode:x,isAdmin:C,isRenderView:T}=Ht(),[S,E]=F.useState(!1),[_,P]=F.useState(""),[O,k]=F.useState(0),[M,Y]=F.useState(!1),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=()=>{var me,Ne,we;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const ve=[...v.repeatableFields],ue=It.findIndex(ve,function(Te){return Te.uuid===(d==null?void 0:d.uuid)});ue>=0&&ve[ue].fieldData?P(ve[ue].fieldData):P("")}}else{const ve=a;if(ve!=null&&ve.length){for(const ue of ve)if(ue.fieldId===t.field.uuid&&((me=ue==null?void 0:ue.postData[0])==null?void 0:me.postValue)!==""&&((Ne=ue==null?void 0:ue.postData[0])!=null&&Ne.postValue)){P((we=ue==null?void 0:ue.postData[0])==null?void 0:we.postValue);break}}}Y(!0)};F.useEffect(()=>{M||G();const me=Gt.addListener("clearRepeatableFields",ue=>{ue===(v==null?void 0:v.uuid)&&(P(""),k(0),d.isValid=0,u(p,h,m,A,f,d))}),Ne=Gt.addListener("onSubmitUserForm",()=>{var ue;(ue=d==null?void 0:d.attributes)!=null&&ue.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),we=Gt.addListener("OnInvalidFieldCatch",ue=>{d.uuid===(ue==null?void 0:ue.fieldId)?k(1):k(0)}),ve=Gt.addListener("OnGetFieldValue",ue=>{var _e;const Te=(_e=ue==null?void 0:ue.repeatableColumn)==null?void 0:_e.filter(K=>(K==null?void 0:K.fieldUuid)===(d==null?void 0:d.uuid));Te!=null&&Te.length});return()=>{Ne.remove(),we.remove(),ve.remove(),me.remove()}});const R=me=>{E(me)},ce=()=>{E(!1)},q=me=>{var ve,ue;P(me.target.value);const Ne=a,we=It.cloneDeep(e);if(Ne!==null){if((ve=me==null?void 0:me.target)!=null&&ve.value){if(we[d==null?void 0:d.uuid]=(ue=me==null?void 0:me.target)==null?void 0:ue.value,(Ne==null?void 0:Ne.length)>0)for(const Te of Ne)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:me.target.value})}else if(delete we[d==null?void 0:d.uuid],(Ne==null?void 0:Ne.length)>0)for(const Te of Ne)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:""})}if(!(v!=null&&v.rowIsRepeatable)){n(we);const Te=Object.keys(we).length;r(Te)}},W=(me,Ne)=>{var we;if(a){const ve=[...a],ue=It.findIndex(ve,function(_e){return _e.rowId===(v==null?void 0:v.uuid)});let Te=(we=a[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},i(ve)}P(Ne),Ne!==""?me.isValid=1:me.isValid=0},ee=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[x&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${x&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Q=d==null?void 0:d.headerText)==null?void 0:Q[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((H=d==null?void 0:d.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(X=d==null?void 0:d.label)==null?void 0:X[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Vi,{message:(pe=d==null?void 0:d.toolTip)==null?void 0:pe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ae=(ge=d==null?void 0:d.icon)==null?void 0:ge.properties)==null?void 0:Ae.name)}),o.jsx(wn,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:_,onFocus:()=>k(1),onChange:me=>{v!=null&&v.rowIsRepeatable?W(d,me.target.value):q(me)},className:O===1&&((oe=d==null?void 0:d.attributes)!=null&&oe.required)?_?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:w})]}),o.jsx("div",{children:((re=d==null?void 0:d.attributes)==null?void 0:re.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(B=d==null?void 0:d.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ne=d==null?void 0:d.helperText)==null?void 0:ne[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(se=d==null?void 0:d.fontStyle)==null?void 0:se.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:_})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:ce,...t}),o.jsx(xi,{...t,fieldWrap:ee})]})},Hye=t=>{var ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e,K,Ee,be,he;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:a,task_status:s}=Ar(),{globalAlignment:l}=Ht(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{isAdmin:d,isBuilderMode:f}=Ht(),h=fe=>{const xe=fe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Me=`${fe.className} justify-content-start`,Be=`${fe.titleClassName} pl-1`;return o.jsxs("div",{className:Me,children:[o.jsxs("button",{className:fe.togglerClassName,onClick:fe.onTogglerClick,children:[o.jsx("span",{className:xe}),o.jsx(Qt,{})]}),o.jsx("span",{className:Be,children:le})]})},{field:p,fieldIndex:v,sectionIndex:m,pageIndex:A,row:w,rowIndex:x,columnIndex:C,isDisabled:T}=t,[S,E]=F.useState(!1),[_,P]=F.useState(null),[O,k]=F.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[M,Y]=F.useState(!1),N=()=>{Y(!0)},z=()=>{Y(!1)},$=(fe,xe)=>{let Me={...O};Me={...Me,[fe]:xe},k(Me),(Me==null?void 0:Me.addressOne)!==""&&(Me!=null&&Me.addressTwo)&&(Me!=null&&Me.zipcode)&&ge(Me==null?void 0:Me.zipcode)?(p.isValid=1,H(Me,!0)):(p.isValid=0,H(null,!1))},[le]=F.useState((ye=p==null?void 0:p.label)==null?void 0:ye[c==null?void 0:c.type]),[G,R]=F.useState(0),[ce,q]=F.useState(!1),W=()=>{var fe,xe;if(!(w!=null&&w.rowIsRepeatable)){const Me=i;if(Me!=null&&Me.length){for(const Be of Me)if(Be.fieldId===t.field.uuid&&((fe=Be==null?void 0:Be.postData[0])!=null&&fe.postValue)){k((xe=Be==null?void 0:Be.postData[0])==null?void 0:xe.postValue);break}}}q(!0)};F.useEffect(()=>{ce||W();const fe=Gt.addListener("clearRepeatableFields",st=>{st===(w==null?void 0:w.uuid)&&(R(0),p.isValid=0,u(A,m,x,C,v,p))}),xe=Gt.addListener("onSubmitUserForm",()=>{var st;(st=p==null?void 0:p.attributes)!=null&&st.required?(O==null?void 0:O.addressOne)!==""&&(O==null?void 0:O.zipcode)!==""&&ge(O==null?void 0:O.zipcode)?p.isValid=1:p.isValid=0:p.isValid=1}),Me=Gt.addListener("OnInvalidFieldCatch",st=>{p.uuid===(st==null?void 0:st.fieldId)?R(1):R(0)}),Be=Gt.addListener("OnGetFieldValue",st=>{var St;const ut=(St=st==null?void 0:st.repeatableColumn)==null?void 0:St.filter(zt=>(zt==null?void 0:zt.fieldUuid)===(p==null?void 0:p.uuid));ut!=null&&ut.length}),Je=Gt.addListener("formFieldAdded",st=>{_===null&&P(st.uuid)});return()=>{xe.remove(),Me.remove(),Be.remove(),fe.remove(),Je.remove()}});const ee=fe=>{E(fe)},Q=()=>{E(!1)},H=(fe,xe)=>{const Me=i,Be=It.cloneDeep(e);if(xe){if(Be[p==null?void 0:p.uuid]=fe,(Me==null?void 0:Me.length)>0)for(const Je of Me)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe})}else if(delete Be[p==null?void 0:p.uuid],(Me==null?void 0:Me.length)>0)for(const Je of Me)Je.fieldId===t.field.uuid&&(Je.postData[0]={postValue:fe});if(!(w!=null&&w.rowIsRepeatable)){n(Be);const Je=Object.keys(Be).length;r(Je)}},X=()=>{let fe="";return f&&(fe=fe+" field-form-builder"),s===a&&d===!0&&(fe=fe+" card"),fe},pe=()=>{let fe=!1;return O.addressOne!==""&&O.zipcode!==""&&ge(O.zipcode)&&(fe=!0),fe};function ge(fe){const xe=/\d/.test(fe),Me=/[a-zA-Z]/.test(fe);return xe&&Me?!0:!!xe}F.useEffect(()=>(_!==null&&setTimeout(()=>{P(null)},1e3),()=>{}),[_]);const Ae=o.jsxs("div",{onMouseOver:N,onMouseOut:z,children:[f&&M&&o.jsx(Wr,{handleFieldSettingsSidebar:ee,...t}),o.jsxs("div",{className:`field ${f&&" py-3 px-4 builder-element-wrapper "}${(p==null?void 0:p.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${f&&"p-fluid"}`,children:[(p==null?void 0:p.showHeaderText)&&o.jsx("h6",{children:(oe=p==null?void 0:p.headerText)==null?void 0:oe[c==null?void 0:c.type]}),(p==null?void 0:p.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((re=p==null?void 0:p.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(B=p==null?void 0:p.label)==null?void 0:B[c==null?void 0:c.type]}):o.jsx(oa,{...t}),o.jsx("span",{className:"ml-3",children:(p==null?void 0:p.showToolTip)&&o.jsx(Vi,{message:(ne=p==null?void 0:p.toolTip)==null?void 0:ne[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(se=p==null?void 0:p.addresslineFirstLabel)==null?void 0:se[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.addressOne||"",onChange:fe=>$("addressOne",fe.target.value),className:"my-2 ",readOnly:T}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(me=p==null?void 0:p.addresslineSecondLabel)==null?void 0:me[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.addressTwo||"",onChange:fe=>$("addressTwo",fe.target.value),className:"my-2",readOnly:T}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ne=p==null?void 0:p.postalcodeLabel)==null?void 0:Ne[c==null?void 0:c.type]})}),o.jsx(wn,{value:O.zipcode||"",onChange:fe=>$("zipcode",fe.target.value),className:"my-2",readOnly:T}),o.jsx("p",{children:!ge(O.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((we=p==null?void 0:p.attributes)==null?void 0:we.required)&&!pe()&&o.jsx("small",{className:"error",children:G===1?(ve=p==null?void 0:p.validationMesssage)==null?void 0:ve.language:""}),(p==null?void 0:p.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"binary",checked:O.isBillingAddressSame,onChange:fe=>{$("isBillingAddressSame",fe.checked),fe.checked?k(xe=>({...xe,billingCountry:O.country,billingCity:O.city,billingState:O.state,billingAddressOne:O.addressOne,billingAddressTwo:O.addressTwo,billingZipcode:O.zipcode})):k(xe=>({...xe,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:T}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),O.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(p==null?void 0:p.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[((ue=p==null?void 0:p.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(Te=p==null?void 0:p.billingLabel)==null?void 0:Te[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(p==null?void 0:p.showToolTip)&&o.jsx(Vi,{message:(_e=p==null?void 0:p.toolTip)==null?void 0:_e[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(K=p==null?void 0:p.addresslineFirstLabel)==null?void 0:K[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingAddressOne||"",onChange:fe=>$("billingAddressOne",fe.target.value),className:"my-2",readOnly:T}),o.jsx("label",{htmlFor:"",children:(Ee=p==null?void 0:p.addresslineSecondLabel)==null?void 0:Ee[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingAddressTwo||"",onChange:fe=>$("billingAddressTwo",fe.target.value),className:"my-2",readOnly:T}),o.jsx("label",{htmlFor:"",children:(be=p==null?void 0:p.postalcodeLabel)==null?void 0:be[c==null?void 0:c.type]}),o.jsx(wn,{value:O.billingZipcode||"",onChange:fe=>$("billingZipcode",fe.target.value),className:"my-2",readOnly:T}),!ge(O.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(p==null?void 0:p.showHelperText)&&o.jsx("small",{children:(he=p==null?void 0:p.helperText)==null?void 0:he[c==null?void 0:c.type]})})]})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Zi,{visibilty:S,closeSettingFieldSidebar:Q,...t}),o.jsx("div",{dir:l?"ltr":"rtl",className:X(),children:s===a&&d===!0?o.jsx(ci,{headerTemplate:h,toggleable:!0,children:Ae}):Ae})]})},Yye=t=>{var C;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:p,columnIndex:v}=t,{handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w}=Ht(),x=(T,S)=>{s(T,S)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((C=a.children)==null?void 0:C.length)>0&&a.children.map((T,S)=>{const E=T[`${n.rowIndex}-${n.columnIndex}`];return E?o.jsx("div",{children:o.jsx(Vc,{type:"grid",showFieldIcons:!1,onChange:x,data:E,field:E,path:`${i}-${n.rowIndex}-${n.columnIndex}-${S}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:p,columnIndex:v,fieldIndex:S,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${S}`):null}),n&&w===!0&&o.jsx("div",{className:"py-5",children:o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:m})})]})},RU=t=>{var M,Y,N,z,$,le,G;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,userSelectedLanguage:c,fieldIndex:u,customColumnHeaderTemplate:d,onSetValuetoPostData:f,setAllFields:h,allFields:p,actionHeaderTemplate:v,actionBodyTemplate:m,isFocus:A,inputValue:w,handleFieldSettingsSidebar:x,isAdmin:C,emitSocketData:T,isRenderView:S}=t,[E,_]=F.useState(!1),{isBuilderMode:P}=Ht(),O=()=>{_(!0)},k=()=>{_(!1)};return o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[P&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:x,...t}),o.jsxs("div",{className:`field ${P&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(M=e==null?void 0:e.headerText)==null?void 0:M[c==null?void 0:c.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",P?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(N=e==null?void 0:e.label)==null?void 0:N[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(z=e==null?void 0:e.toolTip)==null?void 0:z[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ao,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((R,ce)=>o.jsx(xr,{style:{minWidth:350},header:d(R,ce),body:(q,W)=>o.jsx(Yye,{customColumn:R,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:q,indexes:W,customColumnIndex:ce,onSetValuetoPostData:f,setAllFields:h,allFields:p,emitSocketData:T,field:e,...t})},R==null?void 0:R.uuid)),P&&o.jsx(xr,{frozen:!0,header:R=>v(R),body:(R,ce)=>m(R,ce),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:(($=e==null?void 0:e.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:A===1&&!w?(le=e==null?void 0:e.validationMesssage)==null?void 0:le.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(G=e==null?void 0:e.helperText)==null?void 0:G[c==null?void 0:c.type]})})]})]})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Kye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const[i,a]=F.useState((n==null?void 0:n.customKey)||"");return o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{r(n,i),e(!1)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i,onChange:s=>{a(s.target.value)}})})})},GU=t=>{var oe;const{globalAlignment:e}=Ht(),n=re=>{const B=re.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ne=`${re.className} justify-content-start`,se=`${re.titleClassName} pl-1`;return o.jsxs("div",{className:ne,children:[o.jsxs("button",{className:re.togglerClassName,onClick:re.onTogglerClick,children:[o.jsx("span",{className:B}),o.jsx(Qt,{})]}),o.jsx("span",{className:se,children:S})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:p,rowIndex:v,columnIndex:m,isAdmin:A}=t,[w,x]=F.useState(!1),[C,T]=F.useState(""),[S]=F.useState((oe=u==null?void 0:u.label)==null?void 0:oe[s==null?void 0:s.type]),[E,_]=F.useState(0),[P,O]=F.useState(!1),[k,M]=F.useState(null),[Y,N]=F.useState([]),z=()=>{var re,B,ne;if(p!=null&&p.rowIsRepeatable){if(p!=null&&p.repeatableFields){const se=[...p.repeatableFields],me=It.findIndex(se,function(Ne){return Ne.uuid===(u==null?void 0:u.uuid)});me>=0&&se[me].fieldData?T(se[me].fieldData):T("")}}else{const se=r;if(se!=null&&se.length){for(const me of se)if(me.fieldId===t.field.uuid&&((re=me==null?void 0:me.postData[0])==null?void 0:re.postValue)!==""&&((B=me==null?void 0:me.postData[0])!=null&&B.postValue)){T((ne=me==null?void 0:me.postData[0])==null?void 0:ne.postValue);break}}}O(!0)},$=()=>{const re=u;re.customColumnsForOptions=[...re.customColumnsForOptions,{customKey:"Column",uuid:tt()}],ye(re)},[le,G]=F.useState(!1),R=(re,B)=>{var ne;return o.jsxs(o.Fragment,{children:[((ne=u==null?void 0:u.options)==null?void 0:ne.length)>1&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>W(re==null?void 0:re.uuid,B==null?void 0:B.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ge(),"aria-label":"Add Row",size:"small"})]})},ce=(re,B)=>{var ne;return o.jsxs(o.Fragment,{children:[re==null?void 0:re.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ne=u==null?void 0:u.customColumnsForOptions)==null?void 0:ne.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>ee(re==null?void 0:re.uuid,B)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{M(re),G(!0)}})]})]})},q=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>$(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),W=(re,B)=>{var we,ve;const ne=(we=u==null?void 0:u.customColumnsForOptions)==null?void 0:we.length,se=[...(u==null?void 0:u.children)||[]];(ve=u==null?void 0:u.children)==null||ve.map(ue=>{for(let Te=0;Te<ne;Te++)if(ue[`${B}-${Te}`]!==void 0){const _e=It.findIndex(se,function(K){return K[`${B}-${Te}`]!==void 0});se.splice(_e,1)}});for(let ue=0;ue<(se==null?void 0:se.length);ue++){const Te=se[ue],K=Object.keys(Te)[0].split("-");parseInt(K[0])>B&&(se[ue]={[`${parseInt(K[0])-1}-${K[1]}`]:se[ue][`${parseInt(K[0])}-${K[1]}`]})}const me=u==null?void 0:u.options.filter(function(ue){return(ue==null?void 0:ue.uuid)!==re}),Ne={...u,children:[...se]};Ne.options=me,ye(Ne)},ee=(re,B)=>{var ve,ue;const ne=It.findIndex(u==null?void 0:u.customColumnsForOptions,Te=>Te.uuid===re),se=u==null?void 0:u.customColumnsForOptions.filter(function(Te,_e){return _e!==ne}),me=(ve=u==null?void 0:u.options)==null?void 0:ve.length,Ne=[...(u==null?void 0:u.children)||[]];(ue=u==null?void 0:u.children)==null||ue.map(Te=>{for(let _e=0;_e<me;_e++)if(Te[`${_e}-${B}`]!==void 0){const K=It.findIndex(Ne,function(Ee){return Ee[`${_e}-${B}`]!==void 0});Ne.splice(K,1)}});for(let Te=0;Te<(Ne==null?void 0:Ne.length);Te++){const _e=Ne[Te],Ee=Object.keys(_e)[0].split("-");parseInt(Ee[1])>B&&(Ne[Te]={[`${parseInt(Ee[0])}-${parseInt(Ee[1])-1}`]:Ne[Te][`${parseInt(Ee[0])}-${Ee[1]}`]})}const we={...u,children:[...Ne]};we.customColumnsForOptions=se,ye(we)};F.useEffect(()=>{P||z();const re=Gt.addListener("clearRepeatableFields",me=>{me===(p==null?void 0:p.uuid)&&(T(""),_(0),u.isValid=0,l(h,f,v,m,d,u))}),B=Gt.addListener("onSubmitUserForm",()=>{var me;(me=u==null?void 0:u.attributes)!=null&&me.required&&(u.isValid=1)}),ne=Gt.addListener("OnInvalidFieldCatch",me=>{u.uuid===(me==null?void 0:me.fieldId)?_(1):_(0)}),se=Gt.addListener("OnGetFieldValue",me=>{var we;const Ne=(we=me==null?void 0:me.repeatableColumn)==null?void 0:we.filter(ve=>(ve==null?void 0:ve.fieldUuid)===(u==null?void 0:u.uuid));Ne!=null&&Ne.length});return()=>{B.remove(),ne.remove(),se.remove(),re.remove()}});const Q=re=>{x(re)},H=()=>{x(!1)},X=(re,B)=>{var se;const ne=r;if((ne==null?void 0:ne.length)>0)for(const me of ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:{...(se=me.postData[0])==null?void 0:se.postValue,[re]:B}})},pe=()=>{let re="";return c&&(re=re+" field-form-builder"),a===i&&A===!0&&(re=re+" card"),re},ge=()=>{const re=u;re.options=[...re.options,{uuid:tt(),custom_values:{}}],ye(re)},Ae=(re,B)=>{M(Ne=>Ne===null?{customKey:B,uuid:""}:{...Ne,customKey:B});const ne=u.customColumnsForOptions,se=ne.findIndex(Ne=>Ne.uuid===re.uuid);ne[se]={...ne[se],customKey:B};const me=u;me.customColumnsForOptions=ne,ye(me)},ye=re=>{l(h,f,v,m,d,re)};return o.jsxs(o.Fragment,{children:[le&&o.jsx(Kye,{showAddNewColumn:le,setShowAddNewColumn:G,customColumnEditModalData:k,onHandleChangeCustomColumnSetting:Ae}),w&&o.jsx(Zi,{visibilty:w,closeSettingFieldSidebar:H,...t}),o.jsx("div",{dir:e,className:pe(),children:a===i&&A===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(RU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ce,onSetValuetoPostData:X,setAllFields:re=>N(re),allFields:Y,actionHeaderTemplate:q,actionBodyTemplate:R,addOption:ge,isFocus:E,inputValue:C,handleFieldSettingsSidebar:Q,isAdmin:A})}):o.jsx(RU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ce,onSetValuetoPostData:X,setAllFields:re=>N(re),allFields:Y,actionHeaderTemplate:q,actionBodyTemplate:R,addOption:ge,isFocus:E,inputValue:C,handleFieldSettingsSidebar:Q,isAdmin:A})})]})},Xye=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(La,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},WU=t=>{var C,T,S,E,_,P,O;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,customColumnRowBodyTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,handleFieldSettingsSidebar:h,isAdmin:p}=t,{isBuilderMode:v}=Ht(),[m,A]=F.useState(!1),w=()=>{A(!0)},x=()=>{A(!1)};return o.jsxs("div",{onMouseOver:w,onMouseOut:x,children:[v&&m&&o.jsx(Wr,{handleFieldSettingsSidebar:h,...t}),o.jsxs("div",{className:`field ${v&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${v&&"p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(C=e==null?void 0:e.headerText)==null?void 0:C[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((T=e==null?void 0:e.attributes)==null?void 0:T.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",v?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.label)==null?void 0:S[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ao,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(xr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:k=>a(k)}),e==null?void 0:e.customColumns.map((k,M)=>o.jsx(xr,{header:i(k),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(Y,N)=>o.jsx(Xye,{customColumn:k,e:Y,indexes:N,customColumnIndex:M,setAllFields:s,allFields:l,...t})},k==null?void 0:k.uuid)),v===!0&&o.jsx(xr,{frozen:!0,header:k=>c(k),body:k=>u(k),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(P=e==null?void 0:e.validationMesssage)==null?void 0:P.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(O=e==null?void 0:e.helperText)==null?void 0:O[n==null?void 0:n.type]})})]})]})}),p&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Rye=(t,e)=>{var Te,_e;const n=K=>{const Ee=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",be=`${K.className} justify-content-start`,he=`${K.titleClassName} pl-1`;return o.jsxs("div",{className:be,children:[o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ee}),o.jsx(Qt,{})]}),o.jsx("span",{className:he,children:E})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{field:f,fieldIndex:h,sectionIndex:p,pageIndex:v,row:m,rowIndex:A,columnIndex:w}=t,[x,C]=F.useState(!1),[T,S]=F.useState(""),[E]=F.useState((Te=f==null?void 0:f.label)==null?void 0:Te[u==null?void 0:u.type]),[_,P]=F.useState(0),[O,k]=F.useState(!1),[M,Y]=F.useState(null),[N,z]=F.useState(null),[$,le]=F.useState({}),G=()=>{var K,Ee,be;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const he=[...m.repeatableFields],fe=It.findIndex(he,function(xe){return xe.uuid===(f==null?void 0:f.uuid)});fe>=0&&he[fe].fieldData?S(he[fe].fieldData):S("")}}else{const he=r;if(he!=null&&he.length){for(const fe of he)if(fe.fieldId===t.field.uuid&&((K=fe==null?void 0:fe.postData[0])==null?void 0:K.postValue)!==""&&((Ee=fe==null?void 0:fe.postData[0])!=null&&Ee.postValue)){S((be=fe==null?void 0:fe.postData[0])==null?void 0:be.postValue);break}}}k(!0)},R=()=>{const K=f;K.customColumns=[...K.customColumns,{customKey:"Column",uuid:tt(),options:[]}],me(K)},[ce,q]=F.useState(!1),[W,ee]=F.useState(!1),Q=K=>{var Ee;return o.jsxs(o.Fragment,{children:[((Ee=f==null?void 0:f.rows)==null?void 0:Ee.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>ge(K==null?void 0:K.uuid),"aria-label":"Add Row"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>B(),"aria-label":"Add Row"})]})},H=K=>{var Ee;return o.jsxs(o.Fragment,{children:[K==null?void 0:K.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((Ee=f==null?void 0:f.customColumns)==null?void 0:Ee.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Ae(K==null?void 0:K.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{Y(K),q(!0)}})]})]})},X=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>R(),"aria-label":"Add Column"})}),pe=K=>o.jsxs(o.Fragment,{children:[K==null?void 0:K.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{z(K),ee(!0)}})})]}),ge=K=>{const Ee=f==null?void 0:f.rows.filter(function(he){return(he==null?void 0:he.uuid)!==K}),be=f;be.rows=Ee,me(be)},Ae=K=>{const Ee=It.findIndex(f==null?void 0:f.customColumns,fe=>fe.uuid===K),be=f==null?void 0:f.customColumns.filter(function(fe,xe){return xe!==Ee}),he=f;he.customColumns=be,me(he)};F.useEffect(()=>{O||G();const K=Gt.addListener("clearRepeatableFields",he=>{he===(m==null?void 0:m.uuid)&&(S(""),P(0),f.isValid=0,d(v,p,A,w,h,f))}),Ee=Gt.addListener("OnInvalidFieldCatch",he=>{f.uuid===(he==null?void 0:he.fieldId)?P(1):P(0)}),be=Gt.addListener("OnGetFieldValue",he=>{var xe;const fe=(xe=he==null?void 0:he.repeatableColumn)==null?void 0:xe.filter(Me=>(Me==null?void 0:Me.fieldUuid)===(f==null?void 0:f.uuid));fe!=null&&fe.length});return()=>{Ee.remove(),be.remove(),K.remove()}});const ye=K=>{C(K)},oe=()=>{C(!1)},re=()=>{let K="";return c&&(K=K+" field-form-builder"),a===i&&l===!0&&(K=K+" card"),K},B=()=>{const K=f;K.rows=[...K.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],me(K)},ne=(K,Ee)=>{Y(xe=>xe===null?{customKey:Ee,uuid:""}:{...xe,customKey:Ee});const be=f.customColumns,he=be.findIndex(xe=>xe.uuid===K.uuid);be[he]={...be[he],customKey:Ee};const fe=f;fe.customColumns=be,me(fe)},se=(K,Ee)=>{z(xe=>xe===null?{uuid:"",rowHeading:Ee}:{...xe,rowHeading:Ee});const be=f.rows,he=be.findIndex(xe=>xe.uuid===K.uuid);be[he]={...be[he],rowHeading:Ee};const fe=f;fe.rows=be,me(fe)},me=K=>{d(v,p,A,w,h,K)};function Ne(K){return K.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const we=(K,Ee,be)=>{const he=f.customColumns,fe=he.findIndex(Me=>M&&Me.uuid===M.uuid);he[fe].options[be][Ee]=K,he[fe].options[be].value=Ne(K);const xe=f;xe.customColumns=he,me(xe)},ve=()=>{const K=f.customColumns,Ee=K.findIndex(he=>M&&he.uuid===M.uuid);K[Ee].options.push({label:"",value:"",uuid:tt()});const be=f;be.customColumns=K,me(be)},ue=K=>{const Ee=f.customColumns,be=Ee.findIndex(fe=>M&&fe.uuid===M.uuid);if(be===-1){console.error("Custom column not found");return}Ee[be].options=Ee[be].options.filter(fe=>fe.uuid!==K);const he=f;he.customColumns=Ee,me(he)};return o.jsxs(o.Fragment,{children:[o.jsxs(Ks,{maximizable:!0,header:"Update column title",visible:ce,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Ft,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ve()}),o.jsx(Ft,{text:!0,label:"Save",onClick:()=>q(!1)})]}),onHide:()=>q(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(M==null?void 0:M.customKey)||"",onChange:K=>ne(M,K.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(M==null?void 0:M.options)&&((_e=M==null?void 0:M.options)==null?void 0:_e.length)>0&&(M==null?void 0:M.options.map((K,Ee)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:Ee+1}),o.jsx(wn,{value:(K==null?void 0:K.label)||"",className:"ml-2",onChange:be=>we(be.target.value,"label",Ee)}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>ue(K.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${Ee}`)))]}),o.jsx(Ks,{maximizable:!0,header:"Update Row Title",visible:W,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>ee(!1)}),onHide:()=>ee(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(N==null?void 0:N.rowHeading)||"",onChange:K=>se(N,K.target.value)})})}),o.jsx(Zi,{visibilty:x,closeSettingFieldSidebar:oe,...t}),o.jsx("div",{dir:s,className:re(),children:a===i&&l===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(WU,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:pe,setAllFields:le,allFields:$,actionHeaderTemplate:X,actionBodyTemplate:Q,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})}):o.jsx(WU,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:pe,setAllFields:le,allFields:$,actionHeaderTemplate:X,actionBodyTemplate:Q,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})})]})},Gye=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,a=s=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=s,r(l)};return o.jsx("div",{children:o.jsx(wn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:s=>a(s.target.value)})})},QU=t=>{var p,v,m,A,w,x,C;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,setAllFields:a,allFields:s,actionHeaderTemplate:l,actionBodyTemplate:c,isFocus:u,inputValue:d,isAdmin:f}=t,{isBuilderMode:h}=Ht();return o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(p=e==null?void 0:e.headerText)==null?void 0:p[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",h?o.jsx(oa,{path:"",...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(ao,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,S)=>o.jsx(xr,{header:i(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(E,_)=>o.jsx(Gye,{customColumn:T,e:E,indexes:_,customColumnIndex:S,setAllFields:a,allFields:s,...t})},T==null?void 0:T.uuid)),h===!0&&o.jsx(xr,{frozen:!0,header:T=>l(T),body:T=>c(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:u===1&&!d?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(C=e==null?void 0:e.helperText)==null?void 0:C[n==null?void 0:n.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})},Wye=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,a]=F.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(Ks,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i||"",onChange:s=>a(s.target.value)})})})},Qye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=O3({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:a=>{const s={};return a.columnValue||(s.columnValue="Column value is required"),s},onSubmit:a=>{e(!1),r(n,a.columnValue)}});return o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(wn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},Jye=t=>{var me;const e=Ne=>{const we=Ne.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ve=`${Ne.className} justify-content-start`,ue=`${Ne.titleClassName} pl-1`;return o.jsxs("div",{className:ve,children:[o.jsxs("button",{className:Ne.togglerClassName,onClick:Ne.onTogglerClick,children:[o.jsx("span",{className:we}),o.jsx(Qt,{})]}),o.jsx("span",{className:ue,children:C})]})},{TASK_PUBLISHED:n,task_status:r}=Ar(),{userSelectedLanguage:i,fieldSettingUpdate:a}=sn(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,rowIndex:p,columnIndex:v}=t,[m,A]=F.useState(!1),[w,x]=F.useState(""),[C]=F.useState((me=u==null?void 0:u.label)==null?void 0:me[i==null?void 0:i.type]),[T,S]=F.useState(0),[E,_]=F.useState(null),[P,O]=F.useState(null),[k,M]=F.useState((u==null?void 0:u.allFields)||{}),[Y,N]=F.useState(!1),z=()=>{const Ne=u;Ne.customColumns=[...Ne.customColumns,{customKey:"Column",uuid:tt(),options:[]}],B(Ne)},[$,le]=F.useState(!1),[G,R]=F.useState(!1),ce=F.useCallback(It.debounce(Ne=>{const we=u;we.allFields={...Ne},B(we)},1e3),[]);F.useEffect(()=>{ce(k)},[k,ce]);const q=Ne=>{var we;return o.jsxs(o.Fragment,{children:[((we=u==null?void 0:u.options)==null?void 0:we.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>H(Ne==null?void 0:Ne.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ye(),"aria-label":"Add Row",size:"small"})]})},W=Ne=>{var we;return o.jsxs(o.Fragment,{children:[Ne==null?void 0:Ne.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((we=u==null?void 0:u.customColumns)==null?void 0:we.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>X(Ne==null?void 0:Ne.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{_(Ne),le(!0)}})]})]})},ee=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>z(),"aria-label":"Add Column"})}),Q=Ne=>o.jsxs(o.Fragment,{children:[Ne==null?void 0:Ne.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{O(Ne),R(!0)}})})]}),H=Ne=>{const we=u==null?void 0:u.rows.filter(function(ue){return(ue==null?void 0:ue.uuid)!==Ne}),ve=u;ve.rows=we,B(ve)},X=Ne=>{const we=It.findIndex(u==null?void 0:u.customColumns,Te=>Te.uuid===Ne),ve=u==null?void 0:u.customColumns.filter(function(Te,_e){return _e!==we}),ue=u;ue.customColumns=ve,B(ue)},pe=Ne=>{A(Ne)},ge=()=>{A(!1)},Ae=()=>{let Ne="";return c===!0&&(Ne=Ne+" field-form-builder"),r===n&&l===!0&&(Ne=Ne+" card"),Ne},ye=()=>{const Ne=u;Ne.rows=[...Ne.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],B(Ne)},oe=(Ne,we)=>{_(_e=>_e===null?{customKey:we,uuid:""}:{..._e,customKey:we});const ve=u.customColumns,ue=ve.findIndex(_e=>_e.uuid===Ne.uuid);ve[ue]={...ve[ue],customKey:we};const Te=u;Te.customColumns=ve,B(Te)},re=(Ne,we)=>{O(_e=>_e===null?{uuid:"",rowHeading:we}:{..._e,rowHeading:we});const ve=u.rows,ue=ve.findIndex(_e=>_e.uuid===Ne.uuid);ve[ue]={...ve[ue],rowHeading:we};const Te=u;Te.rows=ve,B(Te)},B=Ne=>{a(h,f,p,v,d,Ne)},ne=()=>{N(!0)},se=()=>{N(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Ks,{maximizable:!0,header:"Update column title",visible:$,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,label:"Save",onClick:()=>le(!1)})}),onHide:()=>le(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(E==null?void 0:E.customKey)||"",onChange:Ne=>oe(E,Ne.target.value)})})}),G&&o.jsx(Wye,{showAddNewRow:G,setShowAddNewRow:R,customRowEditModalData:P,onHandleChangeCustomRowSetting:re}),$&&o.jsx(Qye,{showAddNewColumn:$,setShowAddNewColumn:le,customColumnEditModalData:E,onHandleChangeCustomColumnSetting:oe}),o.jsx(Zi,{visibilty:m,closeSettingFieldSidebar:ge,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ne,onMouseOut:se,children:[c&&Y&&o.jsx(Wr,{handleFieldSettingsSidebar:pe,...t}),o.jsx("div",{dir:s,className:Ae(),children:r===n&&l===!0?o.jsx(ci,{headerTemplate:e,toggleable:!0,children:o.jsx(QU,{...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:W,customColumnRowBodyTemplate:Q,setAllFields:M,allFields:k,actionHeaderTemplate:ee,actionBodyTemplate:q,isFocus:T,inputValue:w,handleFieldSettingsSidebar:pe,isAdmin:l})}):o.jsx(QU,{isAdmin:!1,...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:W,customColumnRowBodyTemplate:Q,setAllFields:M,allFields:k,actionHeaderTemplate:ee,actionBodyTemplate:q,isFocus:T,inputValue:w,handleFieldSettingsSidebar:pe})})]})})]})},Zye=t=>{var oe,re,B,ne,se,me,Ne,we,ve,ue,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar(),[s,l]=F.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:p,page:v,rowIndex:m,columnIndex:A,path:w,update:x,value:C,isDisabled:T}=t,{isAdmin:S,isBuilderMode:E}=Ht(),{userSelectedLanguage:_}=sn(),[P,O]=F.useState(!1),[k,M]=F.useState(""),[Y,N]=F.useState(0),[z,$]=F.useState(!1),[le,G]=F.useState(!1),R=()=>{G(!0)},ce=()=>{G(!1)},q=_e=>{O(_e)},W=()=>{O(!1)};F.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const ee=()=>{var K,Ee,be,he;let _e=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const fe=[...d.repeatableFields],xe=It.findIndex(fe,function(Me){return Me.uuid===(c==null?void 0:c.uuid)});xe>=0&&fe[xe].fieldData?(_e=fe[xe].fieldData,M(fe[xe].fieldData)):(c.isValid=0,M(""))}}else{const fe=i,xe=It.cloneDeep(e);if(fe!=null&&fe.length){for(const Me of fe)if(Me.fieldId===t.field.uuid&&((K=Me==null?void 0:Me.postData)!=null&&K.length)){_e=(Ee=Me==null?void 0:Me.postData[0])==null?void 0:Ee.postValue,M((be=Me==null?void 0:Me.postData[0])==null?void 0:be.postValue),xe[c==null?void 0:c.uuid]=(he=Me==null?void 0:Me.postData[0])==null?void 0:he.postValue;const Be=Object.keys(xe).length;r(Be);break}}}M(_e),setTimeout(()=>{$(!0)},2e3)};F.useEffect(()=>{!z&&(i==null?void 0:i.length)>0&&ee();const _e=Gt.addListener("clearRepeatableFields",be=>{be===(d==null?void 0:d.uuid)&&(M(""),N(0),c.isValid=1)}),K=Gt.addListener("onSubmitUserForm",()=>{var be;(be=c==null?void 0:c.attributes)!=null&&be.required?k?c.isValid=1:c.isValid=0:c.isValid=1}),Ee=Gt.addListener("OnInvalidFieldCatch",be=>{c.uuid===(be==null?void 0:be.fieldId)?N(1):N(0)});return()=>{K.remove(),Ee.remove(),_e.remove()}});const Q=(_e,K)=>{var Ee;if(i){const be=[...i],he=It.findIndex(be,function(xe){return xe.rowId===(d==null?void 0:d.uuid)});let fe=(Ee=i[he])==null?void 0:Ee.repeatableFields;fe={...fe,[_e==null?void 0:_e.uuid]:K},be[he]={...be[he],repeatableFields:fe},a(be)}M(K),K?_e.isValid=1:_e.isValid=0},H=_e=>{var K;M(_e.target.value),d!=null&&d.rowIsRepeatable?Q(c,(K=_e==null?void 0:_e.target)==null?void 0:K.value):Ae(_e.target.value)},X=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",pe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",ge=()=>{var _e,K,Ee;if(((_e=c==null?void 0:c.fieldType)==null?void 0:_e.type)==="radio"){const be=[];return s.map((he,fe)=>{var Me,Be,Je,st;const xe=k;be.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{H({value:he,target:{value:he}})},style:(xe==null?void 0:xe.uuid)===(he==null?void 0:he.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(sa,{onFocus:()=>N(1),inputId:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder-radio":"preview"}`,onChange:ut=>{H(ut)},value:he,name:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder":"preview"}`,checked:(xe==null?void 0:xe.uuid)===(he==null?void 0:he.uuid),disabled:T}),((Me=he==null?void 0:he.hyperlinkText)==null?void 0:Me[_==null?void 0:_.type])===""?o.jsx("label",{htmlFor:`radio-option-${fe}-${he==null?void 0:he.uuid}-${E?"builder":"preview"}`,children:(Be=he==null?void 0:he.optionText)==null?void 0:Be[_==null?void 0:_.type]}):o.jsx("label",{children:o.jsx("a",{href:(Je=he==null?void 0:he.hyperlinkText)==null?void 0:Je[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(st=he==null?void 0:he.optionText)==null?void 0:st[_==null?void 0:_.type]})})]},fe))}),be}if(((K=c==null?void 0:c.fieldType)==null?void 0:K.type)==="dropdown")return o.jsx(La,{onFocus:()=>N(1),onChange:be=>{d!=null&&d.rowIsRepeatable?Q(c,be.target.value):Ae(be.target.value)},options:s,optionLabel:pe(),optionValue:X(),value:k,placeholder:(Ee=c==null?void 0:c.placeholder)==null?void 0:Ee[_==null?void 0:_.type],disabled:T})},Ae=_e=>{var be,he;M(_e.target.value);const K=i,Ee=It.cloneDeep(e);if(K!==null){if((be=_e==null?void 0:_e.target)!=null&&be.value){if(Ee[c==null?void 0:c.uuid]=(he=_e==null?void 0:_e.target)==null?void 0:he.value,(K==null?void 0:K.length)>0)for(const fe of K)fe.fieldId===t.field.uuid&&(fe.postData[0]={postValue:_e.target.value})}else if(delete Ee[c==null?void 0:c.uuid],(K==null?void 0:K.length)>0)for(const fe of K)fe.fieldId===t.field.uuid&&(fe.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(Ee);const fe=Object.keys(Ee).length;r(fe)}},ye=o.jsxs("div",{onMouseOver:R,onMouseOut:ce,children:[E&&le&&o.jsx(Wr,{handleFieldSettingsSidebar:q,...t}),o.jsx("div",{className:`field ${!E&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(oe=c==null?void 0:c.headerText)==null?void 0:oe[_==null?void 0:_.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(da,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:C}),((re=c==null?void 0:c.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",E?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(B=c==null?void 0:c.label)==null?void 0:B[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(ne=c==null?void 0:c.toolTip)==null?void 0:ne[_==null?void 0:_.type],position:"right"})}):""})]}),ge(),o.jsx("div",{children:((se=c==null?void 0:c.attributes)==null?void 0:se.required)&&o.jsx("small",{className:"error",children:Y===1&&!k?(me=c==null?void 0:c.validationMesssage)==null?void 0:me.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ne=c==null?void 0:c.helperText)==null?void 0:Ne[_==null?void 0:_.type]})}),((we=c==null?void 0:c.inlineConditionalRules)==null?void 0:we.rules.length)>0&&E===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((ue=(ve=c==null?void 0:c.inlineConditionalRules)==null?void 0:ve.rules)==null?void 0:ue.length)>0&&((Te=c==null?void 0:c.inlineConditionalRules)==null?void 0:Te.rules.map((_e,K)=>{const Ee=k;return E===!1?o.jsx("div",{children:_e==null?void 0:_e.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((Ee==null?void 0:Ee.value)==be.value||E),inputValue:k,condition:be,ruleIndex:K,conditionIndex:he,field:c,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${K}-`+he))},`rule-${K}`):o.jsx(ci,{className:"mt-4",header:`Rule ${K+1}`,children:o.jsx("div",{children:_e==null?void 0:_e.conditions.map((be,he)=>o.jsx(F.Fragment,{children:o.jsx(n0,{isConditionTrue:!!((Ee==null?void 0:Ee.value)===be.value||E),inputValue:k,condition:be,ruleIndex:K,conditionIndex:he,field:c,section:p,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${K}-`+he))},`rule-${K}`)},K)}))]}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Zi,{visibilty:P,closeSettingFieldSidebar:W,...t},c==null?void 0:c.uuid),o.jsx(xi,{...t,fieldWrap:ye})]})},eAe=t=>{var z,$,le,G;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=Ar(),{field:a,row:s,isDisabled:l}=t,{isBuilderMode:c,isAdmin:u}=Ht(),{userSelectedLanguage:d}=sn(),[f,h]=F.useState(!1),[p,v]=F.useState(""),[m,A]=F.useState(0),[w,x]=F.useState(!1),[C,T]=F.useState(!1),S=()=>{T(!0)},E=()=>{T(!1)},_=R=>{h(R)},P=()=>{h(!1)},O=()=>{var ce,q,W,ee;let R=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const Q=[...s.repeatableFields],H=It.findIndex(Q,function(X){return X.uuid===(a==null?void 0:a.uuid)});H>=0&&Q[H].fieldData?(R=Q[H].fieldData,v(Q[H].fieldData)):(a.isValid=0,v(""))}}else{const Q=i,H=It.cloneDeep(e);if(Q!=null&&Q.length){for(const X of Q)if(X.fieldId===t.field.uuid&&((ce=X==null?void 0:X.postData)!=null&&ce.length)){R=(q=X==null?void 0:X.postData[0])==null?void 0:q.postValue,v((W=X==null?void 0:X.postData[0])==null?void 0:W.postValue),H[a==null?void 0:a.uuid]=(ee=X==null?void 0:X.postData[0])==null?void 0:ee.postValue;const pe=Object.keys(H).length;r(pe);break}}}v(R),setTimeout(()=>{x(!0)},2e3)};F.useEffect(()=>{w||O();const R=Gt.addListener("clearRepeatableFields",W=>{W===(s==null?void 0:s.uuid)&&(v(""),A(0),a.isValid=1)}),ce=Gt.addListener("onSubmitUserForm",()=>{var W;if((W=a==null?void 0:a.attributes)!=null&&W.required){const ee=p;ee!=null&&ee[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),q=Gt.addListener("OnInvalidFieldCatch",W=>{a.uuid===(W==null?void 0:W.fieldId)?A(1):A(0)});return()=>{ce.remove(),q.remove(),R.remove()}});const k=(R,ce,q,W,ee)=>W==null?void 0:W.map(Q=>{var H,X;return{...Q,children:Q!=null&&Q.children&&((H=Q==null?void 0:Q.children)==null?void 0:H.length)>0?[...((X=Q==null?void 0:Q.children)==null?void 0:X.map(pe=>ce===(Q==null?void 0:Q.uuid)||ee===!0?(q!=null&&q[pe==null?void 0:pe.uuid]&&delete q[pe==null?void 0:pe.uuid],{...pe,options:k(R,ce,q,(pe==null?void 0:pe.options)||[],!0)}):{...pe,options:k(R,ce,q,(pe==null?void 0:pe.options)||[],!1)}))||[]]:[]}}),M=(R,ce)=>{const q={...p};k(R,ce,q,a==null?void 0:a.options,!1),q[R]=ce,v(q),s!=null&&s.rowIsRepeatable||Y(q)},Y=R=>{const ce=i,q=It.cloneDeep(e);if(ce!==null){if(R){if(q[a==null?void 0:a.uuid]=R,(ce==null?void 0:ce.length)>0)for(const W of ce)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:R})}else if(delete q[a==null?void 0:a.uuid],(ce==null?void 0:ce.length)>0)for(const W of ce)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(q);const W=Object.keys(q).length;r(W)}},N=o.jsxs("div",{onMouseOver:S,onMouseOut:E,children:[c&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:_,...t}),o.jsx("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(a==null?void 0:a.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(z=a==null?void 0:a.headerText)==null?void 0:z[d==null?void 0:d.type]}),o.jsx(_7,{...t,isDisabled:l,isFirst:!0,schema:a,field:a,value:p,update:(R,ce)=>{M(R,ce)}}),o.jsx("div",{children:(($=a==null?void 0:a.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:m===1&&!p?(le=a==null?void 0:a.validationMesssage)==null?void 0:le.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(G=a==null?void 0:a.helperText)==null?void 0:G[d==null?void 0:d.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:f,closeSettingFieldSidebar:P,...t},a==null?void 0:a.uuid),o.jsx(xi,{...t,fieldWrap:N})]})},tAe=t=>{var X,pe,ge,Ae,ye,oe,re,B,ne,se;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isBuilderMode:f}=Ht(),{taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),[C,T]=F.useState(!1),{userSelectedLanguage:S,fieldSettingUpdate:E}=sn(),[_,P]=F.useState(!1),[O,k]=F.useState(0),[M,Y]=F.useState(),[N,z]=F.useState(!1),$=()=>{z(!0)},le=()=>{z(!1)},G=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],R=me=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:me.icon})}),ce=()=>{var me,Ne,we;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ve=[...a.repeatableFields],ue=It.findIndex(ve,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});ue>=0&&ve[ue].fieldData?Y(ve[ue].fieldData):Y("")}}else{const ve=A;if(ve!=null&&ve.length){for(const ue of ve)if(ue.fieldId===t.field.uuid&&((me=ue==null?void 0:ue.postData[0])==null?void 0:me.postValue)!==""&&((Ne=ue==null?void 0:ue.postData[0])!=null&&Ne.postValue)){Y((we=ue==null?void 0:ue.postData[0])==null?void 0:we.postValue);break}}}P(!0)};F.useEffect(()=>{_||ce();const me=Gt.addListener("clearRepeatableFields",ue=>{ue===(a==null?void 0:a.uuid)&&(Y(""),k(0),e.isValid=0,E(i,r,s,l,n,e))}),Ne=Gt.addListener("onSubmitUserForm",()=>{var ue;(ue=e==null?void 0:e.attributes)!=null&&ue.required?M?e.isValid=1:e.isValid=0:e.isValid=1}),we=Gt.addListener("OnInvalidFieldCatch",ue=>{e.uuid===(ue==null?void 0:ue.fieldId)?k(1):k(0)}),ve=Gt.addListener("OnGetFieldValue",ue=>{var _e;const Te=(_e=ue==null?void 0:ue.repeatableColumn)==null?void 0:_e.filter((K,Ee)=>(K==null?void 0:K.fieldUuid)===(e==null?void 0:e.uuid));Te!=null&&Te.length});return()=>{Ne.remove(),we.remove(),ve.remove(),me.remove()}});const q=me=>{Y(me.value);const Ne=A,we=It.cloneDeep(h);if(Ne!==null){if(me!=null&&me.value){if(we[e==null?void 0:e.uuid]=me==null?void 0:me.value,(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:me.value})}else if(delete we[e==null?void 0:e.uuid],(Ne==null?void 0:Ne.length)>0)for(const ve of Ne)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){p(we);const ve=Object.keys(we).length;v(ve)}},W=(me,Ne)=>{var we;if(A){const ve=[...A],ue=It.findIndex(ve,function(_e){return _e.rowId===(a==null?void 0:a.uuid)});let Te=(we=A[ue])==null?void 0:we.repeatableFields;Te={...Te,[me==null?void 0:me.uuid]:Ne},ve[ue]={...ve[ue],repeatableFields:Te},m(ve)}Y(Ne),Ne!==""?me.isValid=1:me.isValid=0},ee=me=>{T(me)},Q=()=>{T(!1)},H=o.jsxs("div",{onMouseOver:$,onMouseOut:le,children:[f&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:ee,...t}),o.jsx("div",{className:`field ${f&&" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(X=e==null?void 0:e.headerText)==null?void 0:X[S==null?void 0:S.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((pe=e==null?void 0:e.attributes)==null?void 0:pe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[S==null?void 0:S.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[S==null?void 0:S.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((oe=(ye=e==null?void 0:e.icon)==null?void 0:ye.properties)==null?void 0:oe.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(rf,{value:M,onChange:me=>{Y(me.value),a!=null&&a.rowIsRepeatable?W(e,me.value):q(me)},itemTemplate:R,optionLabel:"value",onFocus:()=>k(1),options:G,readOnly:c,className:O===1&&((re=e==null?void 0:e.attributes)!=null&&re.required)?M?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((B=e==null?void 0:e.attributes)==null?void 0:B.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:O===1&&!M?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(se=e==null?void 0:e.helperText)==null?void 0:se[S==null?void 0:S.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:C,closeSettingFieldSidebar:Q,...t}),o.jsx(xi,{...t,fieldWrap:H})]})},nAe=t=>{var W,ee,Q,H,X,pe,ge;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:p,columnIndex:v}=t,{isAdmin:m,isBuilderMode:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(""),[S,E]=F.useState(0),[_,P]=F.useState(!1),[O,k]=F.useState(!1),M=()=>{k(!0)},Y=()=>{k(!1)},N=()=>{var Ae,ye,oe;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const re=[...h.repeatableFields],B=It.findIndex(re,function(ne){return ne.uuid===(c==null?void 0:c.uuid)});B>=0&&re[B].fieldData?T(re[B].fieldData):T("")}}else{const re=a;if(re!=null&&re.length){for(const B of re)if(B.fieldId===t.field.uuid&&((Ae=B==null?void 0:B.postData[0])==null?void 0:Ae.postValue)!==""&&((ye=B==null?void 0:B.postData[0])!=null&&ye.postValue)){T((oe=B==null?void 0:B.postData[0])==null?void 0:oe.postValue);break}}}P(!0)};F.useEffect(()=>{_||N();const Ae=Gt.addListener("clearRepeatableFields",B=>{B===(h==null?void 0:h.uuid)&&(T(""),E(0),c.isValid=0,l(f,d,p,v,u,c))}),ye=Gt.addListener("onSubmitUserForm",()=>{var B;(B=c==null?void 0:c.attributes)!=null&&B.required?C?c.isValid=1:c.isValid=0:c.isValid=1}),oe=Gt.addListener("OnInvalidFieldCatch",B=>{c.uuid===(B==null?void 0:B.fieldId)?E(1):E(0)}),re=Gt.addListener("OnGetFieldValue",B=>{var se;const ne=(se=B==null?void 0:B.repeatableColumn)==null?void 0:se.filter(me=>(me==null?void 0:me.fieldUuid)===(c==null?void 0:c.uuid));ne!=null&&ne.length});return()=>{ye.remove(),oe.remove(),re.remove(),Ae.remove()}});const z=Ae=>{x(Ae)},$=()=>{x(!1)},le=Ae=>{var re,B;T(Ae.target.value);const ye=a,oe=It.cloneDeep(e);if(ye!==null){if((re=Ae==null?void 0:Ae.target)!=null&&re.value){if(oe[c==null?void 0:c.uuid]=(B=Ae==null?void 0:Ae.target)==null?void 0:B.value,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Ae.target.value})}else if(delete oe[c==null?void 0:c.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(oe);const ne=Object.keys(oe).length;r(ne)}},G=(Ae,ye,oe,re)=>{var B;if(a){const ne=[...a],se=It.findIndex(ne,function(Ne){return Ne.rowId===(h==null?void 0:h.uuid)});let me=(B=a[se])==null?void 0:B.repeatableFields;me={...me,[oe==null?void 0:oe.uuid]:re},ne[se]={...ne[se],repeatableFields:me},i(ne)}T(re),re!==""?oe.isValid=1:oe.isValid=0},R=5,ce=()=>{const Ae=[],ye=[rE,nE,iE,eE,tE],oe=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let re=0;re<R;re++)Ae.push(o.jsxs("label",{children:[o.jsx("input",{onChange:B=>{h!=null&&h.rowIsRepeatable?G(f,d,c,B.target.value):le(B)},checked:parseInt(C)===re,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:re}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:ye[re]})}),o.jsx("div",{children:oe[re]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${re} ${parseInt(C)===re?"scale-selected":""}`));return Ae},q=o.jsxs("div",{onMouseOver:M,onMouseOut:Y,children:[A&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(W=c==null?void 0:c.headerText)==null?void 0:W[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((ee=c==null?void 0:c.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:(Q=c==null?void 0:c.label)==null?void 0:Q[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Vi,{message:(H=c==null?void 0:c.toolTip)==null?void 0:H[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:ce()})}),o.jsx("div",{children:((X=c==null?void 0:c.attributes)==null?void 0:X.required)&&o.jsx("small",{className:"error",children:S===1&&!C?(pe=c==null?void 0:c.validationMesssage)==null?void 0:pe.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(ge=c==null?void 0:c.helperText)==null?void 0:ge[s==null?void 0:s.type]})})]})]})}),m&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:w,closeSettingFieldSidebar:$,...t}),o.jsx(xi,{...t,fieldWrap:q})]})},rAe=t=>{var N,z,$,le,G,R,ce,q,W,ee,Q;const{userTaskSubmitFormData:e}=Ar(),{userSelectedLanguage:n,fieldSettingUpdate:r}=sn(),{isAdmin:i,isBuilderMode:a}=Ht(),{field:s,fieldIndex:l,sectionIndex:c,pageIndex:u,row:d,rowIndex:f,columnIndex:h}=t,[p,v]=F.useState(!1),[m,A]=F.useState(""),[w,x]=F.useState(0),[C,T]=F.useState(!1),[S,E]=F.useState(!1),_=()=>{E(!0)},P=()=>{E(!1)},O=()=>{var H,X,pe;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const ge=[...d.repeatableFields],Ae=It.findIndex(ge,function(ye){return ye.uuid===(s==null?void 0:s.uuid)});Ae>=0&&ge[Ae].fieldData?A(ge[Ae].fieldData):A("")}}else{const ge=e;if(ge!=null&&ge.length){for(const Ae of ge)if(Ae.fieldId===t.field.uuid&&((H=Ae==null?void 0:Ae.postData[0])==null?void 0:H.postValue)!==""&&((X=Ae==null?void 0:Ae.postData[0])!=null&&X.postValue)){A((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue);break}}}T(!0)};F.useEffect(()=>{C||O();const H=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(d==null?void 0:d.uuid)&&(A(""),x(0),s.isValid=0,r(u,c,f,h,l,s))}),X=Gt.addListener("onSubmitUserForm",()=>{var Ae,ye;(Ae=s==null?void 0:s.attributes)!=null&&Ae.required?m&&(m==null?void 0:m.length)<((ye=s==null?void 0:s.attributes)==null?void 0:ye.minLength)?s.isValid=1:s.isValid=0:s.isValid=1}),pe=Gt.addListener("OnInvalidFieldCatch",Ae=>{s.uuid===(Ae==null?void 0:Ae.fieldId)?x(1):x(0)}),ge=Gt.addListener("OnGetFieldValue",Ae=>{var oe;const ye=(oe=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:oe.filter(re=>(re==null?void 0:re.fieldUuid)===(s==null?void 0:s.uuid));ye!=null&&ye.length});return()=>{X.remove(),pe.remove(),ge.remove(),H.remove()}});const k=H=>{v(H)},M=()=>{v(!1)},Y=o.jsxs("div",{onMouseOver:_,onMouseOut:P,children:[a&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:k,...t}),o.jsxs("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(s==null?void 0:s.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:i?"col-6 ":"col-12 p-fluid",children:[(s==null?void 0:s.showHeaderText)&&o.jsx("h6",{children:(N=s==null?void 0:s.headerText)==null?void 0:N[n==null?void 0:n.type]}),(s==null?void 0:s.showLabel)&&o.jsxs("label",{htmlFor:l,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(da,{...t}),((z=s==null?void 0:s.attributes)==null?void 0:z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(oa,{...t}):o.jsx(o.Fragment,{children:($=s==null?void 0:s.label)==null?void 0:$[n==null?void 0:n.type]}),(s==null?void 0:s.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(le=s==null?void 0:s.toolTip)==null?void 0:le[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(s==null?void 0:s.iconAlignment),children:(s==null?void 0:s.showIcon)&&o.jsx("i",{className:"pi pi-"+((R=(G=s==null?void 0:s.icon)==null?void 0:G.properties)==null?void 0:R.name)})}),o.jsx("div",{children:((ce=s==null?void 0:s.attributes)==null?void 0:ce.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:w===1&&!m?(q=s==null?void 0:s.validationMesssage)==null?void 0:q.english:""}),o.jsx("small",{className:"error",children:w===1&&(m==null?void 0:m.length)<((W=s==null?void 0:s.attributes)==null?void 0:W.minLength)?`Mini length ${(ee=s==null?void 0:s.attributes)==null?void 0:ee.minLength}`:""})]})}),o.jsx("div",{children:(s==null?void 0:s.showHelperText)&&o.jsx("small",{children:(Q=s==null?void 0:s.helperText)==null?void 0:Q[n==null?void 0:n.type]})})]})]})}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Zi,{visibilty:p,closeSettingFieldSidebar:M,...t}),o.jsx(xi,{...t,fieldWrap:Y})]})},iAe=t=>{var Y,N,z,$,le,G,R;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{userTaskSubmitFormData:f}=Ar(),[h,p]=F.useState(!1),[v,m]=F.useState(""),[A,w]=F.useState(0),[x,C]=F.useState(!1),[T,S]=F.useState(!1),E=()=>{S(!0)},_=()=>{S(!1)},P=()=>{var q;const ce=f;if(ce.length){for(const W of ce)if(W.fieldId===t.field.uuid){m((q=W==null?void 0:W.postData[0])==null?void 0:q.postValue),C(!0);break}}};F.useEffect(()=>{x||P();const ce=Gt.addListener("onSubmitUserForm",()=>{var W;(W=e==null?void 0:e.attributes)!=null&&W.required&&(v?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),q=Gt.addListener("OnInvalidFieldCatch",W=>{e.uuid===(W==null?void 0:W.fieldId)?w(1):w(0)});return()=>{ce.remove(),q.remove()}});const O=ce=>{p(ce)},k=()=>{p(!1)},M=o.jsxs("div",{onMouseOver:E,onMouseOut:_,children:[c&&T&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:c?"field-form-builder":"",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-11":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((N=e==null?void 0:e.attributes)==null?void 0:N.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(z=e==null?void 0:e.label)==null?void 0:z[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:($=e==null?void 0:e.toolTip)==null?void 0:$[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((le=e==null?void 0:e.attributes)==null?void 0:le.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(G=e==null?void 0:e.validationMesssage)==null?void 0:G.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(R=e==null?void 0:e.helperText)==null?void 0:R[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h&&o.jsx(Zi,{visibilty:h,closeSettingFieldSidebar:k,...t}),o.jsx(xi,{...t,fieldWrap:M})]})},Vc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,TASK_PUBLISHED:c}=Ar(),u=F.useRef(null),[d,f]=F.useState(!1),[{isDragging:h},p]=aa({item:{...e,type:Y1,uuid:e==null?void 0:e.uuid,path:n},type:Y1,collect:T=>({isDragging:T.isDragging()})}),v=h&&s?.25:1;p(u);const m=l===c||a,A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(ooe,{typeName:"Text",field:r,...T});case"number":return o.jsx(foe,{typeName:"Number",field:r,...T});case"email":return o.jsx(gde,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(mde,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(Mde,{typeName:"Editor",field:r,...T});case"question":return o.jsx(f0e,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Cde,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(Jde,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(Zde,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(t0e,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(eAe,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(doe,{typeName:"Hyperlink",field:r,...T});case"heading":return o.jsx(a0e,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(I4e,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(mF,{typeName:"Image",field:r,...T});case"video":return o.jsx(_me,{typeName:"Video",field:r,...T});case"hr":return o.jsx(Dme,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(Nme,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(Ome,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(l8e,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(rAe,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(iAe,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(x4e,{typeName:"Image gallery",field:r,...T});case"quiz":return o.jsx(S8e,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(c8e,{typeName:"Document",field:r,...T});case"list":return o.jsx(T8e,{typeName:"List",field:r,...T});case"country":return o.jsx(soe,{typeName:"Country",field:r,...T});case"phone":return o.jsx(Pye,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(Mye,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(qye,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(Uye,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx($ye,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(jye,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(zye,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(Hye,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(GU,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(GU,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(Rye,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(tAe,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(nAe,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(Jye,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(Zye,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},w=()=>{f(!0)},x=()=>{f(!1)},C=()=>{let T="";return s===!0?(T=T+" component draggable field-form-builder-not-preview",i===K1?T=T+" pdf-component":T=T+" px-2 pdf-component"):(T=T+" component ",i===K1?T=T+" ":T=T+" px-2 "),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:v},className:C(),onMouseOver:w,onMouseOut:x,children:[s&&d&&o.jsx("i",{ref:s===!0?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:m})]})})},aAe={position:"relative"},sAe=t=>{var P,O,k,M,Y;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:p,formBuilderFormLayout:v,handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w,emitSocketData:x}=Ht(),[{isDragging:C},T]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:N=>({isDragging:N.isDragging()})}),S=C&&w?.25:1;T(d);const E=(N,z,$,le,G,R,ce)=>o.jsx(Vc,{page:u,type:"field",row:c,column:e,section:l,field:N,data:N,path:z,pageIndex:$,sectionIndex:le,rowIndex:G,columnIndex:R,fieldIndex:ce},`component-${n}-${N==null?void 0:N.uuid}`),_=(N,z,$,le,G)=>{var W,ee,Q,H;const R=N.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ce=`${N.className} justify-content-space-between`,q=`${N.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:ce,children:[o.jsxs("span",{ref:w===!0?d:null,children:[o.jsx("button",{className:N.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:N.togglerClassName,onClick:N.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsx("span",{className:q,children:"Column"})]}),w===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{h(z,$,le),x()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((H=(Q=(ee=(W=v[z])==null?void 0:W.children[$])==null?void 0:ee.children[le])==null?void 0:Q.children)==null?void 0:H.length)>1&&o.jsxs("button",{className:N.togglerClassName,onClick:()=>{f(z,$,le,G),x()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{p(e,z,$,le,G),x()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:A&&w?{...aAe,opacity:S}:{},className:w?"draggable form-builder-column container-column":"form-builder-column container-column",children:w===!0?o.jsx(o.Fragment,{children:A===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:N=>_(N,r,i,a,s),children:[((P=e==null?void 0:e.children)==null?void 0:P.length)>0?(O=e==null?void 0:e.children)==null?void 0:O.map((N,z)=>{const $=`${n}-${z}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:$,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,$,r,i,a,s,z)]},$)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((k=e==null?void 0:e.children)==null?void 0:k.length)>0?(M=e==null?void 0:e.children)==null?void 0:M.map((N,z)=>{const $=`${n}-${z}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:$,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,$,r,i,a,s,z)]},$)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:A,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.children)==null?void 0:Y.map((N,z)=>{const $=`${n}-${z}`;return o.jsx(F.Fragment,{children:E(N,$,r,i,a,s,z)},$)})})})},oAe=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(wn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(lo,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(wn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},lAe=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Ht();return o.jsxs("div",{className:"p-fluid",children:[r===P0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(no,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},wg=t=>{var x;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=sn(),[f,h]=F.useState(r),{updateGlobalToast:p,emitSocketData:v}=Ht(),m=(C,T,S)=>{h(E=>{const _=E[C];return Object.assign({},E,{[C]:Object.assign({},_,{[T==null?void 0:T.type]:S})})})},A=(C,T)=>{h(S=>({...S,[C]:T}))},w=()=>{const C={...f,children:r==null?void 0:r.children};c(i,a,s,C),v(),p({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(x=r==null?void 0:r.heading)==null?void 0:x[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:l!=null&&l.length?l.map((C,T)=>o.jsx(so,{tabIndex:T,header:C==null?void 0:C.language,children:o.jsx(oAe,{language:C,stateRow:f,onHandleChange:m,...t})},T)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(lAe,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:C=>A("showRowTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:C=>A("showRowSubTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},cAe={},uAe=t=>{var pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:p,handleDrop:v}=sn(),{userTaskSubmitFormData:m,taskRegisterData:A,updateTaskRegisterData:w,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:T,task_status:S,TASK_PUBLISHED:E}=Ar(),{isRenderView:_,isAdvanceView:P,isBuilderMode:O,renderType:k,isAdmin:M,emitSocketData:Y}=Ht(),[N,z]=F.useState(!1),[{isDragging:$},le]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:we=>({isDragging:we.isDragging()})}),G=$?.25:1;le(c);const R=(we,ve,ue,Te,_e,K)=>o.jsx(sAe,{page:l,row:e,section:s,data:we,path:ve,pageIndex:ue,sectionIndex:Te,rowIndex:_e,columnIndex:K,isAdmin:M,emitSocketData:Y},`column-${n}-${we.uuid}`),ce=(we,ve,ue,Te)=>{var be,he,fe,xe;const _e=we.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",K=`${we.className} justify-content-space-between`,Ee=`${we.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:K,children:[o.jsxs("span",{ref:O===!0?c:null,children:[o.jsx("button",{className:we.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:we.togglerClassName,onClick:we.onTogglerClick,children:[o.jsx("span",{className:_e}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Ee,children:["Row:"," ",((be=e==null?void 0:e.heading)==null?void 0:be[p==null?void 0:p.type])!==""?(he=e==null?void 0:e.heading)==null?void 0:he[p==null?void 0:p.type]:"Untitled"]})]}),O===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:we.togglerClassName,onClick:()=>{d(ve,ue),Y()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((xe=(fe=h[ve])==null?void 0:fe.children[ue])==null?void 0:xe.children.length)>1&&o.jsxs("button",{className:we.togglerClassName,onClick:()=>{u(ve,ue,Te),Y()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:we.togglerClassName,onClick:()=>{f(e,ve,ue,Te),Y()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:we.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},q=It.findIndex(m,function(we){return(we==null?void 0:we.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var ue,Te,_e;const we=It.cloneDeep(A);((Te=(ue=m[q])==null?void 0:ue.repeatableFieldsData)==null?void 0:Te.length)>=(e==null?void 0:e.minimumEntries)?we[e==null?void 0:e.uuid]=(_e=m[q])==null?void 0:_e.repeatableFields:delete we[e==null?void 0:e.uuid];const ve=Object.keys(we).length;w(we),x(ve)},ee=(pe=e==null?void 0:e.repeatableFields)==null?void 0:pe.map(we=>{var ve;return{fieldUuid:we==null?void 0:we.uuid,field:we==null?void 0:we.uuid,header:(ve=we==null?void 0:we.label)==null?void 0:ve.english}}),Q=ee==null?void 0:ee.map(we=>o.jsx(xr,{field:we.field,header:we.header,body:ve=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ve[we==null?void 0:we.field]}})})},we.field)),H=()=>{var Te;const we=[...m],ve=[];let ue=!0;e:for(const[,_e]of e.children.entries()){for(const[,K]of _e.children.entries())if(K!=null&&K.isPostField&&K.isValid!==1){const Ee={fieldId:K.uuid,rowIndex:a};ve.push(Ee),Gt.emit("OnInvalidFieldCatch",Ee),ue=!1;break e}ue=!0}ue&&(ve==null?void 0:ve.length)===0&&(C(e==null?void 0:e.uuid,(Te=we[q])==null?void 0:Te.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},X=we=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,we==null?void 0:we.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...cAe,opacity:G,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.right}px`},className:_?"row container-row":"draggable row container-row",children:[N&&o.jsx(wg,{renderType:k,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:Y},"row_settings_"+r+i+a),O===!0?o.jsx(o.Fragment,{children:P===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:we=>ce(we,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:P,data:{path:ue,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag"}),R(we,ue,r,i,a,ve)]},ue)}),o.jsx(Fr,{isAdvanceView:P,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:P?"form-builder-columns":"",style:P?{overflowX:"auto"}:{},children:(B=e==null?void 0:e.children)==null?void 0:B.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsx(F.Fragment,{children:R(we,ue,r,i,a,ve)},ue)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&S===E)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[p==null?void 0:p.type]}),o.jsx("span",{children:(se=e==null?void 0:e.subHeadingText)==null?void 0:se[p==null?void 0:p.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((we,ve)=>{const ue=`${n}-${ve}`;return o.jsx(F.Fragment,{children:R(we,ue,r,i,a,ve)},ue)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&S!==E&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(me=e.addToListButtonLabel)==null?void 0:me[p==null?void 0:p.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(m==null?void 0:m.length)>0?(Ne=m[q])==null?void 0:Ne.repeatableFieldsData:[],children:[Q,S!==E&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(we,ve)=>X(ve)})]}),M&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},dAe=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(wn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(lo,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter section description",onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},Dh=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=F.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=sn(),{emitSocketData:h}=Ht(),{updateGlobalToast:p}=Ht(),v=(w,x,C)=>{l(T=>Object.assign({},T,{[w]:Object.assign({},T[w],{[x==null?void 0:x.type]:C})}))},m=(w,x)=>{l(C=>({...C,[w]:x}))},A=()=>{const w={...s,children:r==null?void 0:r.children};u(i,a,w),h(),p({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(rs,{children:[o.jsx(wr,{header:"Text",children:o.jsx(oo,{activeIndex:0,children:c!=null&&c.length?c.map((w,x)=>o.jsx(so,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(dAe,{language:w,stateSection:s,onHandleChange:v,...t})},x)):""})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:w=>m("showSectionHeader",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:w=>m("showSectionTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:w=>m("showSectionSubTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},Nh=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Ht(),a=O3({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{a.resetForm(),r(!1)})}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Ft,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Ks,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(wn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${h3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(lo,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${h3({invalid:s("builder_element_title")})} w-full`})]})]})},fAe=t=>{var le,G,R,ce,q,W,ee,Q;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isAdvanceView:p,renderType:v,isBuilderMode:m,emitSocketData:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState(null),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:H=>({isDragging:H.isDragging()})}),N=M&&m?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(uAe,{page:s,section:a,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae},`row-${n}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:m===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=e==null?void 0:e.heading)==null?void 0:oe[f==null?void 0:f.type]]})]}),m===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{c(X),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=d[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{l(X,pe),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{u(e,X,pe),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:m&&p?"draggable row":"",children:[m===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&m&&o.jsx(Dh,{renderType:v,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!0?o.jsx(o.Fragment,{children:p===!0?o.jsxs(ci,{header:(le=e==null?void 0:e.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,r,i),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=e==null?void 0:e.subHeadingText)==null?void 0:G[f==null?void 0:f.type])&&o.jsx("p",{children:(R=e==null?void 0:e.subHeadingText)==null?void 0:R[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,data:{path:pe,childrenCount:e.children.length},onDrop:h}),z(H,pe,r,i,X)]},pe)}),o.jsx(Fr,{isAdvanceView:p,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ce=d[r])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=e==null?void 0:e.subHeadingText)==null?void 0:q[f==null?void 0:f.type])&&o.jsx("p",{children:(W=e==null?void 0:e.subHeadingText)==null?void 0:W[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,r,i,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=e==null?void 0:e.heading)==null?void 0:ee[f==null?void 0:f.type]}),o.jsx("p",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((H,X)=>{const pe=`${n}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,r,i,X)},pe)},pe)})]})})]})},hAe={position:"relative"},pAe=t=>{var C,T,S;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=F.useRef(null),{handleDrop:h}=sn(),{isAdvanceView:p,isBuilderMode:v}=Ht(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(f);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:d,section:c,row:u,column:n,field:E,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y,type:"field",data:E,path:_},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:p?{...hAe,opacity:w}:{},className:v&&"draggable column container-column",children:v===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=e==null?void 0:e.children)==null?void 0:C.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const P=`${r}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,fieldDropArea:!0,data:{path:P,childrenCount:e.children.length,droppedField:e},onDrop:h}),x(E,P,i,a,s,l,_)]},P)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),v&&o.jsx(Fr,{isAdvanceView:p,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.children)==null?void 0:S.map((E,_)=>{const P=`${r}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,i,a,s,l,_)},P)})})})},gAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,p,v,m)=>o.jsx(pAe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${p}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var p;return o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(p=f==null?void 0:f.children)==null?void 0:p.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})},`basic_view_section_${i}-${u}-${h}`)})})})},mAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=F.useRef(null),[u,d]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(c);const f=(h,p,v,m)=>o.jsx(fAe,{data:h,page:e,section:h,path:p,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,p)=>{const v=`${n}-${p}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:i,data:{path:v,childrenCount:e.children.length},onDrop:l}),f(h,v,r,p)]},`section-${p}-${h.uuid}`)}),o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(gAe,{page:e,path:n,data:e,pageIndex:r},`basic_view-${r}-${e.uuid}`)}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,p)=>{const v=`${n}-${p}`;return o.jsx(F.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx("div",{children:f(h,v,r,p)}):((h==null?void 0:h.isHidden)===!1||a)&&f(h,v,r,p)},`section-${p}-${h.uuid}`)})})})})},vAe=()=>{const{isAdvanceView:t,isBuilderMode:e,isPreview:n}=Ht(),[r,i]=F.useState(!1),[a,s]=F.useState(!1),[l,c]=F.useState(0),{formBuilderFormLayout:u}=sn(),{emitSocketData:d}=Ht(),f=["Mobile","Desktop"],[h,p]=F.useState(f[1]),v=(m,A,w)=>o.jsx(mAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsxs("div",{children:[n===!0&&o.jsx("div",{className:"flex justify-content-center align-items-center",children:o.jsx(rf,{value:h,onChange:m=>p(m.value),options:f})}),(u==null?void 0:u.length)===I9&&e===!1?o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-3 flex card justify-content-center",children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsx("div",{className:"flex flex-column justify-content-start",style:{width:h==="Mobile"?375:800},children:o.jsx("div",{className:"w-full",children:v(m,w,A)})},`preview-${m.uuid}-${A}`)})})}):o.jsx(o.Fragment,{children:t===!0&&e===!0?o.jsx(rs,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||e),header:"Page",headerTemplate:x=>o.jsx(L8,{options:x,pageIndex:A,setTabSidebarSetting:i,setPageActiveIndex:c,page:m,pages:u}),children:[e===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(H0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`advanced_${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(u==null?void 0:u.length)>0&&(u==null?void 0:u.map((m,A)=>{const w=`${A}`;return o.jsxs(F.Fragment,{children:[e===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(H0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`basic_${m.uuid}-${A}`)}))})})]})},bAe={position:"relative"},yAe=t=>{var O,k,M,Y,N;const{isAdvanceView:e,isBuilderMode:n,emitSocketData:r,isRenderView:i}=Ht(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),{removeColumn:m,addColumn:A,cloneColumn:w,formBuilderFormLayout:x,handleDrop:C}=sn(),[{isDragging:T},S]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:z=>({isDragging:z.isDragging()})}),E=T&&!i?.25:1;S(v);const _=(z,$,le,G,R,ce,q)=>o.jsx(Vc,{page:p,column:a,type:"field",row:h,section:f,field:z,data:z,path:$,pageIndex:le,sectionIndex:G,rowIndex:R,columnIndex:ce,fieldIndex:q},`component-${s}-${z==null?void 0:z.uuid}`),P=(z,$,le,G,R)=>{var ee,Q,H,X;const ce=z.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",q=`${z.className} justify-content-space-between`,W=`${z.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:q,children:[o.jsxs("span",{ref:n===!0?v:null,children:[o.jsx("button",{className:z.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:z.togglerClassName,onClick:z.onTogglerClick,children:[o.jsx("span",{className:ce}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:"Column"})]}),n===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{A($,le,G),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((X=(H=(Q=(ee=x[$])==null?void 0:ee.children[le])==null?void 0:Q.children[G])==null?void 0:H.children)==null?void 0:X.length)>1&&o.jsxs("button",{className:z.togglerClassName,onClick:()=>{m($,le,G,R),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{w(a,$,le,G,R),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...bAe,opacity:E}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:z=>P(z,l,c,u,d),children:[((O=a==null?void 0:a.children)==null?void 0:O.length)>0?(k=a==null?void 0:a.children)==null?void 0:k.map((z,$)=>{const le=`${s}-${$}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:le,childrenCount:a.children.length,droppedField:a},onDrop:C}),_(z,le,l,c,u,d,$)]},le)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((M=a==null?void 0:a.children)==null?void 0:M.length)>0?(Y=a==null?void 0:a.children)==null?void 0:Y.map((z,$)=>{const le=`${s}-${$}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:le,childrenCount:a.children.length,droppedField:a},onDrop:C}),_(z,le,l,c,u,d,$)]},le)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(N=a==null?void 0:a.children)==null?void 0:N.map((z,$)=>{const le=`${s}-${$}`;return o.jsx(F.Fragment,{children:_(z,le,l,c,u,d,$)},le)})})})},AAe={},wAe=t=>{var pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne,we,ve,ue,Te,_e;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isBuilderMode:f,emitSocketData:h,renderType:p}=Ht(),v=F.useRef(null),{removeRow:m,addRow:A,cloneRow:w,formBuilderFormLayout:x,userSelectedLanguage:C,handleDrop:T}=sn(),{userTaskSubmitFormData:S,taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:P,addUserDataFormSectionRepeatableData:O,removeUserDataFormSectionRepeatableData:k,task_status:M,TASK_PUBLISHED:Y}=Ar(),[N,z]=F.useState(!1),[{isDragging:$},le]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:K=>({isDragging:K.isDragging()})}),G=$?.25:1;le(v);const R=(K,Ee,be,he,fe,xe)=>o.jsx(yAe,{page:l,row:e,section:s,data:K,path:Ee,pageIndex:be,sectionIndex:he,rowIndex:fe,columnIndex:xe,isAdmin:d,emitSocketData:h},`column-${n}-${K.uuid}`),ce=(K,Ee,be,he)=>{var Be,Je,st,ut;const fe=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",xe=`${K.className} justify-content-space-between`,Me=`${K.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:xe,children:[o.jsxs("span",{ref:f===!0?v:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:fe}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Me,children:["Row:"," ",((Be=e==null?void 0:e.heading)==null?void 0:Be[C==null?void 0:C.type])!==""?(Je=e==null?void 0:e.heading)==null?void 0:Je[C==null?void 0:C.type]:"Untitled"]})]}),f===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{A(Ee,be),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ut=(st=x[Ee])==null?void 0:st.children[be])==null?void 0:ut.children.length)>1&&o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(Ee,be,he),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{w(e,Ee,be,he),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:K.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},q=It.findIndex(S,function(K){return(K==null?void 0:K.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var be,he,fe;const K=It.cloneDeep(E);((he=(be=S[q])==null?void 0:be.repeatableFieldsData)==null?void 0:he.length)>=(e==null?void 0:e.minimumEntries)?K[e==null?void 0:e.uuid]=(fe=S[q])==null?void 0:fe.repeatableFields:delete K[e==null?void 0:e.uuid];const Ee=Object.keys(K).length;_(K),P(Ee)},ee=(pe=e==null?void 0:e.repeatableFields)==null?void 0:pe.map(K=>{var Ee;return{fieldUuid:K==null?void 0:K.uuid,field:K==null?void 0:K.uuid,header:(Ee=K==null?void 0:K.label)==null?void 0:Ee.english}}),Q=ee==null?void 0:ee.map(K=>o.jsx(xr,{field:K.field,header:K.header,body:Ee=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ee[K==null?void 0:K.field]}})})},K.field)),H=()=>{var he;const K=[...S],Ee=[];let be=!0;e:for(const[,fe]of e.children.entries()){for(const[,xe]of fe.children.entries())if(xe!=null&&xe.isPostField&&xe.isValid!==1){const Me={fieldId:xe.uuid,rowIndex:a};Ee.push(Me),Gt.emit("OnInvalidFieldCatch",Me),be=!1;break e}be=!0}be&&(Ee==null?void 0:Ee.length)===0&&(O(e==null?void 0:e.uuid,(he=K[q])==null?void 0:he.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},X=K=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{k(e==null?void 0:e.uuid,K==null?void 0:K.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...AAe,opacity:G,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.right}px`},className:c?"row container-row":"draggable row container-row",children:[N&&o.jsx(wg,{renderType:p,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),p===om&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsxs(F.Fragment,{children:[p===Yd&&o.jsx(Fr,{isAdvanceView:u,data:{path:be,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R(K,be,r,i,a,Ee)]},be)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(p===M0||p===P0||p===sm||p===E9||p===Qh)&&(f===!0?o.jsx(o.Fragment,{children:u===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:K=>ce(K,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:u,data:{path:be,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R(K,be,r,i,a,Ee)]},be)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(B=e==null?void 0:e.children)==null?void 0:B.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===Y)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[C==null?void 0:C.type]}),o.jsx("span",{children:(se=e==null?void 0:e.subHeadingText)==null?void 0:se[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]})})),p===K1&&(f===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((Ne=(me=x[r])==null?void 0:me.children[i])==null?void 0:Ne.children.length)>1&&o.jsxs("button",{onClick:()=>{m(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{w(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>z(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(we=e==null?void 0:e.children)==null?void 0:we.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===Y)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[C==null?void 0:C.type]}),o.jsx("span",{children:(ue=e==null?void 0:e.subHeadingText)==null?void 0:ue[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})})]})})),p===Yd&&o.jsx("div",{className:"form-builder-columns",children:e.children.map((K,Ee)=>{const be=`${n}-${Ee}`;return o.jsx(F.Fragment,{children:R(K,be,r,i,a,Ee)},be)})}),(e==null?void 0:e.rowIsRepeatable)&&M!==Y&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(Te=e.addToListButtonLabel)==null?void 0:Te[C==null?void 0:C.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(S==null?void 0:S.length)>0?(_e=S[q])==null?void 0:_e.repeatableFieldsData:[],children:[Q,M!==Y&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:K=>X(K)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},SAe=t=>{var le,G,R,ce,q,W,ee,Q;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:p,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),N=M?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(wAe,{page:f,section:d,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae},`row-${l}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=s==null?void 0:s.heading)==null?void 0:oe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{p(X),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=m[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(X,pe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,X,pe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(le=s==null?void 0:s.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,c,u),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:pe,childrenCount:s.children.length},onDrop:a}),z(H,pe,c,u,X)]},pe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{p(c),i()},children:o.jsx(Qt,{})})}),((ce=m[c])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,c,u,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=s==null?void 0:s.heading)==null?void 0:ee[A==null?void 0:A.type]}),o.jsx("p",{children:(Q=s==null?void 0:s.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,c,u,X)},pe)},pe)})]})})]})},CAe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=F.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(jA,{ref:a,modules:[KB,w4e],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((p,v)=>{var m;return(m=p==null?void 0:p.children)==null?void 0:m.map((A,w)=>{const x=`${n}-${c}-${f}-${v}-${w}`;return o.jsx(zA,{children:o.jsx("div",{className:"",children:o.jsx(Vc,{page:i,column:p,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:v,fieldIndex:w},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Ft,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Ft,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},xAe=t=>{const{isAdvanceView:e,isBuilderMode:n}=Ht(),{handleDrop:r}=sn(),{data:i,path:a,pageIndex:s}=t,{formBuilderFormSchema:l}=sn(),c=F.useRef(null),[{},u]=aa({type:ia,item:{type:ia,uuid:i.uuid,children:i.children,path:a},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,p,v)=>o.jsx(SAe,{data:f,section:f,path:h,page:i,pageIndex:p,sectionIndex:v},`section_${p}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":i==null?void 0:i.bgImage,"data-bg-color":`#${i==null?void 0:i.bgColor}`,children:n===!0?o.jsxs(o.Fragment,{children:[i.children.map((f,h)=>{const p=`${a}-${h}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:p,childrenCount:i.children.length},onDrop:r}),d(f,p,s,h)]},`section-${h}-${f.uuid}`)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:r,isLast:!0})]}):o.jsx(o.Fragment,{children:(l==null?void 0:l.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(CAe,{page:i,data:i,currentPath:a,pageIndex:s})}):o.jsx("div",{className:"p-1",children:i.children.map((f,h)=>{const p=`${a}-${h}`;return o.jsx(F.Fragment,{children:((f==null?void 0:f.isHidden)===!1||!n)&&d(f,p,s,h)},`section-${h}-${f.uuid}`)})})})})},TAe=()=>{const[t,e]=F.useState(!1),{isAdvanceView:n,isBuilderMode:r,emitSocketData:i}=Ht(),[a,s]=F.useState(!1),[l,c]=F.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:p}=sn(),v=(m,A,w)=>o.jsx(xAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===I9&&r===!1?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsx("div",{children:v(m,w,A)},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!1?o.jsx(rs,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||r),header:"Page",headerTemplate:x=>o.jsx(L8,{options:x,pageIndex:A,page:m,setTabSidebarSetting:s,clonePage:p,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((m,A)=>{const w=`${A}`;return o.jsxs(F.Fragment,{children:[r===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)}))})})})})},EAe={position:"relative"},IAe=t=>{var C,T,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:p,isBuilderMode:v}=Ht(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(d);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:u,type:"field",row:c,section:l,field:E,data:E,path:_,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y},`component-${n}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:p?{...EAe,opacity:w}:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!0?o.jsxs("div",{className:"builder-row-column",children:[((C=e==null?void 0:e.children)==null?void 0:C.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const P=`${n}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,data:{path:P,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(E,P,r,i,a,s,_)]},P)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(S=e==null?void 0:e.children)==null?void 0:S.map((E,_)=>{const P=`${n}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,r,i,a,s,_)},P)})})})},_Ae={},DAe=t=>{var P,O,k,M,Y,N,z,$,le;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:p}=sn(),{isRenderView:v,isBuilderMode:m}=Ht(),{task_status:A,TASK_PUBLISHED:w}=Ar(),[x,C]=F.useState(!1),[{isDragging:T},S]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:G=>({isDragging:G.isDragging()})}),E=T?.25:1;S(c);const _=(G,R,ce,q,W,ee)=>o.jsx(IAe,{page:l,row:e,section:s,data:G,path:R,pageIndex:ce,sectionIndex:q,rowIndex:W,columnIndex:ee},`column-${n}-${G.uuid}`);return o.jsxs("div",{style:{..._Ae,opacity:E,marginTop:`${(P=e==null?void 0:e.margin)==null?void 0:P.top}px`,marginBottom:`${(O=e==null?void 0:e.margin)==null?void 0:O.bottom}px`,marginLeft:`${(k=e==null?void 0:e.margin)==null?void 0:k.left}px`,marginRight:`${(M=e==null?void 0:e.margin)==null?void 0:M.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(wg,{visibilty:x,setVisibility:C,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),m===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((N=(Y=h[r])==null?void 0:Y.children[i])==null?void 0:N.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>C(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(z=e==null?void 0:e.children)==null?void 0:z.map((G,R)=>{const ce=`${n}-${R}`;return o.jsx(F.Fragment,{children:_(G,ce,r,i,a,R)},ce)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===w)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:($=e==null?void 0:e.heading)==null?void 0:$[p==null?void 0:p.type]}),o.jsx("span",{children:(le=e==null?void 0:e.subHeadingText)==null?void 0:le[p==null?void 0:p.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((G,R)=>{const ce=`${n}-${R}`;return o.jsx(F.Fragment,{children:_(G,ce,r,i,a,R)},ce)})})]})})]})},NAe=t=>{var S,E,_;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=sn(),{isAdvanceView:c,isBuilderMode:u}=Ht(),[d,f]=F.useState(!1),[h,p]=F.useState(!1),[v,m]=F.useState(null),A=F.useRef(null),[{isDragging:w},x]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:P=>({isDragging:P.isDragging()})}),C=w?.25:1;x(A);const T=(P,O,k,M,Y)=>o.jsx(DAe,{page:s,section:a,data:P,path:O,pageIndex:k,sectionIndex:M,rowIndex:Y},`row-${n}-${P.uuid}`);return o.jsxs("div",{style:{opacity:C,marginBottom:20},className:c?"draggable row":"",children:[u===!0&&o.jsx(Nh,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:m,saveElementModal:h,setSaveElementModal:p}),d===!0&&o.jsx(Dh,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),u===!0?o.jsx("div",{children:o.jsx("div",{children:e.children.map((P,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:T(P,k,r,i,O)},k)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(S=e==null?void 0:e.heading)==null?void 0:S[l==null?void 0:l.type]}),((E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type])&&o.jsx("p",{children:(_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((P,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:T(P,k,r,i,O)},k)},k)})]})})]})},S5={},C5={height:"1280px",width:"100%"},OAe=t=>{var d,f,h,p;const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=F.useRef(null),[{isDragging:s},l]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),c=s?0:1;l(a);const u=(v,m,A,w)=>o.jsx(NAe,{data:v,section:v,path:m,page:e,pageIndex:A,sectionIndex:w},`section_${A}_${w}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!0?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...S5,...C5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...S5,...C5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(F.Fragment,{children:u(v,A,r,m)},`section-${m}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...S5,...C5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...S5,...C5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(d=e==null?void 0:e.margin)==null?void 0:d.top}px`,marginBottom:`${(f=e==null?void 0:e.margin)==null?void 0:f.bottom}px`,marginLeft:`${(h=e==null?void 0:e.margin)==null?void 0:h.left}px`,marginRight:`${(p=e==null?void 0:e.margin)==null?void 0:p.right}px`},children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(F.Fragment,{children:((v==null?void 0:v.isHidden)===!1||i)&&u(v,A,r,m)},`section-${m}-${v.uuid}`)})})})})})})},FAe=()=>{const{isBuilderMode:t}=Ht(),[e,n]=F.useState(!1),[r,i]=F.useState(0),[a,s]=F.useState(!1),{formBuilderFormLayout:l}=sn(),c=(u,d,f)=>o.jsx(OAe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===I9&&t===!1?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!0?o.jsx(rs,{scrollable:!0,activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs(wr,{header:"Page",headerTemplate:h=>o.jsx(L8,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!0&&o.jsx(bf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},kAe=t=>{var w,x,C,T;const e=F.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=sn(),{emitSocketData:s,isBuilderMode:l}=Ht(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:p}=t,v=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:m,children:[o.jsxs("span",{ref:l===!0?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),l===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),s()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(C=(x=(w=a[u])==null?void 0:w.children[d])==null?void 0:x.children[f])==null?void 0:C.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(p,u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},PAe={position:"relative"},MAe=t=>{var C,T,S,E,_;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:P=>({isDragging:P.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(P,O,k,M,Y,N,z)=>o.jsx(Vc,{page:p,column:a,type:"field",row:h,section:f,field:P,data:P,path:O,pageIndex:k,sectionIndex:M,rowIndex:Y,columnIndex:N,fieldIndex:z},`component-${s}-${P==null?void 0:P.uuid}`);return o.jsx("div",{style:e?{...PAe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:P=>o.jsx(kAe,{options:P,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((P,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(P,k,l,c,u,d,O)]},k)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(E=a==null?void 0:a.children)==null?void 0:E.map((P,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(P,k,l,c,u,d,O)]},k)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(_=a==null?void 0:a.children)==null?void 0:_.map((P,O)=>{const k=`${s}-${O}`;return o.jsx(F.Fragment,{children:x(P,k,l,c,u,d,O)},k)})})})},LAe=t=>{var x,C,T,S;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=F.useState(!1),l=F.useRef(null),{isBuilderMode:c,emitSocketData:u}=Ht(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:p,userSelectedLanguage:v}=sn(),m=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,w=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!0?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(Qt,{})]}),o.jsxs("span",{className:w,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[v==null?void 0:v.type])!==""?(C=a==null?void 0:a.heading)==null?void 0:C[v==null?void 0:v.type]:"Untitled"]})]}),c===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((S=(T=p[n])==null?void 0:T.children[r])==null?void 0:S.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},BAe={},VAe=t=>{var W,ee,Q,H,X,pe,ge,Ae,ye,oe,re;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r,isAdmin:i,renderType:a,emitSocketData:s}=Ht(),{handleDrop:l}=sn(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:p,page:v}=t,m=F.useRef(null),{userSelectedLanguage:A}=sn(),{userTaskSubmitFormData:w,taskRegisterData:x,updateTaskRegisterData:C,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:S,removeUserDataFormSectionRepeatableData:E,task_status:_,TASK_PUBLISHED:P}=Ar(),[O,k]=F.useState(!1),[{isDragging:M},Y]=aa({type:So,item:{type:So,uuid:c.uuid,children:c.children,path:u,data:c},collect:B=>({isDragging:B.isDragging()})}),N=M?.25:1;Y(m);const z=(B,ne,se,me,Ne,we)=>o.jsx(MAe,{page:v,row:c,section:p,data:B,path:ne,pageIndex:se,sectionIndex:me,rowIndex:Ne,columnIndex:we,emitSocketData:s},`column-${u}-${B.uuid}`),$=It.findIndex(w,function(B){return(B==null?void 0:B.rowId)===(c==null?void 0:c.uuid)}),le=()=>{var se,me,Ne;const B=It.cloneDeep(x);((me=(se=w[$])==null?void 0:se.repeatableFieldsData)==null?void 0:me.length)>=(c==null?void 0:c.minimumEntries)?B[c==null?void 0:c.uuid]=(Ne=w[$])==null?void 0:Ne.repeatableFields:delete B[c==null?void 0:c.uuid];const ne=Object.keys(B).length;C(B),T(ne)},G=(W=c==null?void 0:c.repeatableFields)==null?void 0:W.map(B=>{var ne;return{fieldUuid:B==null?void 0:B.uuid,field:B==null?void 0:B.uuid,header:(ne=B==null?void 0:B.label)==null?void 0:ne.english}}),R=G==null?void 0:G.map(B=>o.jsx(xr,{field:B.field,header:B.header,body:ne=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ne[B==null?void 0:B.field]}})})},B.field)),ce=()=>{var me;const B=[...w],ne=[];let se=!0;e:for(const[,Ne]of c.children.entries()){for(const[,we]of Ne.children.entries())if(we!=null&&we.isPostField&&we.isValid!==1){const ve={fieldId:we.uuid,rowIndex:h};console.log("inValidData",ve),ne.push(ve),Gt.emit("OnInvalidFieldCatch",ve),se=!1;break e}se=!0}se&&(ne==null?void 0:ne.length)===0&&(S(c==null?void 0:c.uuid,(me=B[$])==null?void 0:me.repeatableFields),Gt.emit("clearRepeatableFields",c==null?void 0:c.uuid),le())},q=B=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{E(c==null?void 0:c.uuid,B==null?void 0:B.rowIndex),setTimeout(()=>{le()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...BAe,opacity:N,marginTop:`${(ee=c==null?void 0:c.margin)==null?void 0:ee.top}px`,marginBottom:`${(Q=c==null?void 0:c.margin)==null?void 0:Q.bottom}px`,marginLeft:`${(H=c==null?void 0:c.margin)==null?void 0:H.left}px`,marginRight:`${(X=c==null?void 0:c.margin)==null?void 0:X.right}px`},className:n?"row container-row":"draggable row container-row",children:[O&&o.jsx(wg,{renderType:a,visibilty:O,setVisibility:k,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:B=>o.jsx(LAe,{options:B,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(pe=c==null?void 0:c.children)==null?void 0:pe.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:se,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),z(B,se,d,f,h,ne)]},se)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(ge=c==null?void 0:c.children)==null?void 0:ge.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsx(F.Fragment,{children:z(B,se,d,f,h,ne)},se)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&_===P)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Ae=c==null?void 0:c.heading)==null?void 0:Ae[A==null?void 0:A.type]}),o.jsx("span",{children:(ye=c==null?void 0:c.subHeadingText)==null?void 0:ye[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((B,ne)=>{const se=`${u}-${ne}`;return o.jsx(F.Fragment,{children:z(B,se,d,f,h,ne)},se)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&_!==P&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>ce(),label:(oe=c.addToListButtonLabel)==null?void 0:oe[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(w==null?void 0:w.length)>0?(re=w[$])==null?void 0:re.repeatableFieldsData:[],children:[R,_!==P&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:B=>q(B)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:c})]})]})]})},qAe=t=>{var le,G,R,ce,q,W,ee,Q;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:p,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),[_,P]=F.useState(!1),O=F.useRef(null),k=(H,X)=>{E(pe=>({...pe,[H]:X}))},[{isDragging:M},Y]=aa({type:ia,item:{type:ia,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),N=M?.25:1;Y(O);const z=(H,X,pe,ge,Ae)=>o.jsx(VAe,{page:f,section:d,data:H,path:X,pageIndex:pe,sectionIndex:ge,rowIndex:Ae,emitSocketData:i},`row-${l}-${H.uuid}`),$=(H,X,pe)=>{var oe,re;const ge=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ae=`${H.className} justify-content-space-between panel-tab-section`,ye=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ae,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[pe+1," ",(oe=s==null?void 0:s.heading)==null?void 0:oe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{p(X),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=m[X])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(X,pe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,X,pe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(le=s==null?void 0:s.heading)==null?void 0:le.english,toggleable:!0,headerTemplate:H=>$(H,c,u),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[((G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:pe,childrenCount:s.children.length},onDrop:a}),z(H,pe,c,u,X)]},pe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{p(c),i()},children:o.jsx(Qt,{})})}),((ce=m[c])==null?void 0:ce.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:z(H,pe,c,u,X)},pe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ee=s==null?void 0:s.heading)==null?void 0:ee[A==null?void 0:A.type]}),o.jsx("p",{children:(Q=s==null?void 0:s.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,X)=>{const pe=`${l}-${X}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:z(H,pe,c,u,X)},pe)},pe)})]})})]})},UAe={position:"relative"},$Ae=t=>{var C,T,S;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:p}=t,v=F.useRef(null),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:E=>({isDragging:E.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(E,_,P,O,k,M,Y)=>o.jsx(Vc,{page:p,type:"field",row:h,column:a,section:f,field:E,data:E,path:_,pageIndex:P,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:Y},`component-${s}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:e?{...UAe,opacity:w}:{},className:n?"":"draggable column container-column",children:r===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((E,_)=>{const P=`${s}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:P,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(E,P,l,c,u,d,_)]},P)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(S=a==null?void 0:a.children)==null?void 0:S.map((E,_)=>{const P=`${s}-${_}`;return o.jsx(F.Fragment,{children:x(E,P,l,c,u,d,_)},P)})})})},jAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,p,v,m)=>o.jsx($Ae,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${p}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:p},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var p;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(p=f==null?void 0:f.children)==null?void 0:p.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},zAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=F.useRef(null),[{},u]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,p,v)=>o.jsx(qAe,{data:f,section:f,path:h,page:e,pageIndex:p,sectionIndex:v},`section_${p}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((f,h)=>{const p=`${n}-${h}`;return o.jsxs(F.Fragment,{children:[i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:p,childrenCount:e.children.length},onDrop:l}),d(f,p,r,h)]},`section-${h}-${f.uuid}`)}),i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(jAe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((f,h)=>{const p=`${n}-${h}`;return o.jsx(F.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:d(f,p,r,h)})}):((f==null?void 0:f.isHidden)===!1||!a)&&d(f,p,r,h)},`section-${h}-${f.uuid}`)})})})})},HAe=()=>{const[t,e]=F.useState(!1),{formBuilderFormLayout:n}=sn(),{isBuilderMode:r}=Ht(),i=()=>{},a=(s,l,c)=>o.jsx(zAe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||r)return o.jsxs("div",{children:[o.jsx(H0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},YAe={position:"relative"},KAe=t=>{var C;const{isRenderView:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,p=F.useRef(null),{handleDrop:v}=sn(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),w=m&&!e?.25:1;A(p);const x=(T,S,E,_,P,O,k)=>o.jsx(Vc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:S,pageIndex:E,sectionIndex:_,rowIndex:P,columnIndex:O,fieldIndex:k},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:n?{...YAe,opacity:w}:{},className:e?"form-builder-column container-column":"draggable form-builder-column container-column",children:r&&o.jsxs("div",{children:[(C=i==null?void 0:i.children)==null?void 0:C.map((T,S)=>{const E=`${a}-${S}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:E,childrenCount:i.children.length,droppedField:i},onDrop:v}),x(T,E,s,l,c,u,S)]},E)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:v,isLast:!0})]})})},XAe={},RAe=t=>{var q,W,ee,Q,H,X,pe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{userSelectedLanguage:u,handleDrop:d}=sn(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:p,updateTaskProgressValue:v,addUserDataFormSectionRepeatableData:m,removeUserDataFormSectionRepeatableData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),{isRenderView:C,isAdmin:T,isAdvanceView:S,emitSocketData:E,renderType:_}=Ht(),[P,O]=F.useState(!1),[{isDragging:k},M]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:ge=>({isDragging:ge.isDragging()})}),Y=k?.25:1;M(c);const N=(ge,Ae,ye,oe,re,B)=>o.jsx(KAe,{page:l,row:e,section:s,data:ge,path:Ae,pageIndex:ye,sectionIndex:oe,rowIndex:re,columnIndex:B},`column-${n}-${ge.uuid}`),z=It.findIndex(f,function(ge){return(ge==null?void 0:ge.rowId)===(e==null?void 0:e.uuid)}),$=()=>{var ye,oe,re;const ge=It.cloneDeep(h);((oe=(ye=f[z])==null?void 0:ye.repeatableFieldsData)==null?void 0:oe.length)>=(e==null?void 0:e.minimumEntries)?ge[e==null?void 0:e.uuid]=(re=f[z])==null?void 0:re.repeatableFields:delete ge[e==null?void 0:e.uuid];const Ae=Object.keys(ge).length;p(ge),v(Ae)},le=(q=e==null?void 0:e.repeatableFields)==null?void 0:q.map(ge=>{var Ae;return{fieldUuid:ge==null?void 0:ge.uuid,field:ge==null?void 0:ge.uuid,header:(Ae=ge==null?void 0:ge.label)==null?void 0:Ae.english}}),G=le==null?void 0:le.map(ge=>o.jsx(xr,{field:ge.field,header:ge.header,body:Ae=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ae[ge==null?void 0:ge.field]}})})},ge.field)),R=()=>{var oe;const ge=[...f],Ae=[];let ye=!0;e:for(const[,re]of e.children.entries()){for(const[,B]of re.children.entries())if(B!=null&&B.isPostField&&B.isValid!==1){const ne={fieldId:B.uuid,rowIndex:a};Ae.push(ne),Gt.emit("OnInvalidFieldCatch",ne),ye=!1;break e}ye=!0}ye&&(Ae==null?void 0:Ae.length)===0&&(m(e==null?void 0:e.uuid,(oe=ge[z])==null?void 0:oe.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),$())},ce=ge=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,ge==null?void 0:ge.rowIndex),setTimeout(()=>{$()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...XAe,opacity:Y,marginTop:`${(W=e==null?void 0:e.margin)==null?void 0:W.top}px`,marginBottom:`${(ee=e==null?void 0:e.margin)==null?void 0:ee.bottom}px`,marginLeft:`${(Q=e==null?void 0:e.margin)==null?void 0:Q.left}px`,marginRight:`${(H=e==null?void 0:e.margin)==null?void 0:H.right}px`},className:C?"row container-row":"draggable row container-row",children:[P&&o.jsx(wg,{renderType:_,visibilty:P,setVisibility:O,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:E},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((ge,Ae)=>{const ye=`${n}-${Ae}`;return o.jsxs(F.Fragment,{children:[_===Yd&&o.jsx(Fr,{isAdvanceView:S,data:{path:ye,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),N(ge,ye,r,i,a,Ae)]},ye)}),o.jsx(Fr,{isAdvanceView:S,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&w!==x&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>R(),label:(X=e.addToListButtonLabel)==null?void 0:X[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ao,{value:(f==null?void 0:f.length)>0?(pe=f[z])==null?void 0:pe.repeatableFieldsData:[],children:[G,w!==x&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:ge=>ce(ge)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},GAe=t=>{var N,z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isBuilderMode:p,isAdvanceView:v,renderType:m,emitSocketData:A}=Ht(),[w,x]=F.useState(!1),[C,T]=F.useState(!1),[S,E]=F.useState({reusable_template_schema:""}),_=F.useRef(null),[{isDragging:P},O]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:$=>({isDragging:$.isDragging()})}),k=P?.25:1;O(_);const M=($,le,G,R,ce)=>o.jsx(RAe,{page:s,section:a,data:$,path:le,pageIndex:G,sectionIndex:R,rowIndex:ce},`row-${n}-${$.uuid}`),Y=($,le,G)=>{var W,ee;const R=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ce=`${$.className} justify-content-space-between panel-tab-section`,q=`${$.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:ce,children:[o.jsxs("span",{ref:p===!0?_:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsxs("span",{className:q,children:[G+1," ",(W=e==null?void 0:e.heading)==null?void 0:W[f==null?void 0:f.type]]})]}),p===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{c(le),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ee=d[le])==null?void 0:ee.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{l(le,G),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{u(e,le,G),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:k,marginBottom:20},className:v?"draggable row":"",children:[p===!0&&o.jsx(Nh,{saveBuilderElementModalData:S,setSaveBuilderElementModalData:E,saveElementModal:C,setSaveElementModal:T}),w===!0&&o.jsx(Dh,{renderType:m,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),p===!0&&o.jsxs(ci,{className:"mb-5",header:(N=e==null?void 0:e.heading)==null?void 0:N.english,toggleable:!0,headerTemplate:$=>Y($,r,i),children:[o.jsx("p",{children:(z=e==null?void 0:e.subHeadingText)==null?void 0:z[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map(($,le)=>{const G=`${n}-${le}`;return o.jsx(F.Fragment,{children:M($,G,r,i,le)},G)}),o.jsx(Fr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]})]})},WAe=t=>{const{isRenderView:e,isBuilderMode:n}=Ht(),{data:r,path:i,pageIndex:a}=t,s=F.useRef(null),[,l]=aa({type:ia,item:{type:ia,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(GAe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(F.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})}):o.jsx(o.Fragment,{})})},x5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=F.useState(!1),{userTrainingSaveData:u}=Ar(),d=h=>{var p,v;if(u!==null&&h){const m=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(p=u[m])!=null&&p.isSeen?(v=u[m])==null?void 0:v.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const v=u.findIndex(m=>(m==null?void 0:m.fieldId)===(i==null?void 0:i.uuid));h=u[v].logs}else h=[];return h==null?void 0:h.map((v,m)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[v==null?void 0:v.action," on ",((v==null?void 0:v.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Mn(v==null?void 0:v.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(v==null?void 0:v.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100),"%"]})]})]},`logs_${m}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Ft,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Ft,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Ft,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Ft,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},QAe=t=>{var C,T,S,E,_,P;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=Ar(),p=(C=d==null?void 0:d.training)!=null&&C.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},v=O=>{if(f!==null){const k=[...f],M=k.findIndex(Y=>(Y==null?void 0:Y.fieldId)===(O==null?void 0:O.uuid));M>=0&&(k[M]={...k[M],isSeen:!0}),h([...k])}},m=O=>{var k;i(O),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(k=O==null?void 0:O.media_url)==null?void 0:k.english}]})},A=O=>{var k;v(O),i(O),c((k=O==null?void 0:O.media_url)==null?void 0:k.english),a(l)},w=O=>{v(O),i(O),u(O==null?void 0:O.documents),a(l)},x=O=>{var k,M;(k=O==null?void 0:O.quizSchema)!=null&&k.assessment_id&&(p((M=O==null?void 0:O.quizSchema)==null?void 0:M.assessment_id),a(l),i(O))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(x5,{title:(S=e==null?void 0:e.title)==null?void 0:S.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:m,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(x5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(x5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:w,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(x5,{title:(P=e==null?void 0:e.quizSchema)==null?void 0:P.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},JAe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(QAe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},ZAe=t=>{var v,m,A,w,x,C,T,S,E,_;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Ht(),p=(v=h==null?void 0:h.image)!=null&&v.MediaImage?(m=h==null?void 0:h.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:P=>{e(O=>{var k;return(k=n==null?void 0:n.answersText)==null?void 0:k[r==null?void 0:r.type]}),i(P,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((w=n.answersText)==null?void 0:w[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(sa,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:P=>{u({isCorrect:null,text:null}),e(O=>{var k;return(k=P.target.value)==null?void 0:k[r==null?void 0:r.type]}),i(P,s,l,n,c),a(!0)}}),((C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(p,{mediaId:(S=n.answersTextImage)==null?void 0:S[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(E=n.answersText)==null?void 0:E[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((_=n.answersText)==null?void 0:_[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong answer"]}):""})]},s)},ewe=t=>{var p,v,m,A,w,x,C;const{media:e}=Ht(),n=(p=e==null?void 0:e.image)!=null&&p.MediaImage?(v=e==null?void 0:e.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return F.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(S=>{var E;return S===((E=i.answersText)==null?void 0:E[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((m=i.answersText)==null?void 0:m[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Yr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var S;return T===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}),onChange:T=>{var S;h(T.checked,(S=T.target.value)==null?void 0:S[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((w=i.answersTextImage)==null?void 0:w[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(C=i.answersText)==null?void 0:C[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var S;return(T==null?void 0:T.text)===((S=i.answersText)==null?void 0:S[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function JU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function twe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ZU(t,e,n){return e&&twe(t.prototype,e),t}function e$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gw(t,e)}function T5(t){return T5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},T5(t)}function Gw(t,e){return Gw=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Gw(t,e)}function nwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function rwe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iwe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:rwe(t)}function t$(t){var e=nwe();return function(){var r=T5(t),i;if(e){var a=T5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return iwe(this,i)}}function awe(t){return swe(t)||owe(t)||lwe(t)||cwe()}function swe(t){if(Array.isArray(t))return Ww(t)}function owe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function lwe(t,e){if(t){if(typeof t=="string")return Ww(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ww(t,e)}}function Ww(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4286
4286
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,l=s.length>=e?s:(awe(Array(e)).map(function(){return"0"}).join("")+s).slice(e*-1);return"".concat(i).concat(l).concat(a)}var n$={daysInHours:!1,zeroPadTime:2};function uwe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,a=i===void 0?0:i,s=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,s||(d+=c);var f=s?d:d-r(),h=Math.min(20,Math.max(0,a)),p=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),v=Math.abs(p)/1e3;return{total:p,days:Math.floor(v/(3600*24)),hours:Math.floor(v/3600%24),minutes:Math.floor(v/60%60),seconds:Math.floor(v%60),milliseconds:Number((v%1*1e3).toFixed()),completed:p<=0}}function dwe(t,e){var n=t.days,r=t.hours,i=t.minutes,a=t.seconds,s=Object.assign(Object.assign({},n$),e),l=s.daysInHours,c=s.zeroPadTime,u=s.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?Sg(r+n*24,c):Sg(r,f);return{days:l?"":Sg(n,d),hours:h,minutes:Sg(i,f),seconds:Sg(a,f)}}var r$=function(t){e$(n,t);var e=t$(n);function n(){var r;return JU(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(a){return{count:a.count+i}},r.startCountdown)},r}return ZU(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?F.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(F.Component);r$.propTypes={count:ua.number,children:ua.element,onComplete:ua.func};var Cg=function(t){e$(n,t);var e=t$(n);function n(r){var i;if(JU(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var s=i.calcTimeDelta(),l=s.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(s,void 0,l)},i.setLegacyCountdownRef=function(s){i.legacyCountdownRef=s},i.start=function(){if(!i.isStarted()){var s=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=s?i.calcOffsetStartTimestamp()-s:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return ZU(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,a=i.date,s=i.now,l=i.precision,c=i.controlled,u=i.overtime;return uwe(a,{now:s,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,a,s){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&a==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){s&&s(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=a||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,a=i.daysInHours,s=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:dwe(c,{daysInHours:a,zeroPadTime:s,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,a=i.count,s=i.children,l=i.onComplete;return F.createElement(r$,{ref:this.setLegacyCountdownRef,count:a,onComplete:l},s)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,p=this.getRenderProps();if(h)return h(p);if(f&&this.state.timeDelta.completed&&!d)return F.cloneElement(f,{countdown:p});var v=p.formatted,m=v.days,A=v.hours,w=v.minutes,x=v.seconds;return F.createElement("span",{className:u},p.total<0?"-":"",m,m?":":"",A,":",w,":",x)}}]),n}(F.Component);Cg.defaultProps=Object.assign(Object.assign({},n$),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),Cg.propTypes={date:ua.oneOfType([ua.instanceOf(Date),ua.string,ua.number]),daysInHours:ua.bool,zeroPadTime:ua.number,zeroPadDays:ua.number,controlled:ua.bool,intervalDelay:ua.number,precision:ua.number,autoStart:ua.bool,overtime:ua.bool,className:ua.string,children:ua.element,renderer:ua.func,now:ua.func,onMount:ua.func,onStart:ua.func,onPause:ua.func,onStop:ua.func,onTick:ua.func,onComplete:ua.func};const fwe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,a,s;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(Cg,{renderer:n,date:Date.now()+parseInt((s=(a=t==null?void 0:t.time_limit)==null?void 0:a.time_limit_info)==null?void 0:s.num_of_mins)*60*1e3})})},hwe=F.memo(fwe),pwe=t=>{var d,f,h,p;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,a]=F.useState(Date.now()),[s,l]=F.useState(!1),c=F.useCallback(()=>{a(Date.now()),l(!1)},[r]);F.useEffect(()=>{c()},[r,c]);const u=v=>(v.seconds<10&&(v.seconds="0"+v.seconds),v.minutes===0&&(v.minutes="0"+v.minutes),v.completed&&!s?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[v.minutes,":",v.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(Cg,{renderer:u,date:i+parseInt((p=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:p.time_per_question)*1e3,intervalDelay:0},i)})},gwe=()=>{const t=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(a)},e=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(a)},n=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(a)},r=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(a)},i=a=>{a.play().then(()=>{}).catch(s=>{console.info("Not Played,"+s.error+s.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},mwe="1",i$=t=>{var ue,Te,_e,K,Ee,be,he,fe,xe,Me;const e=Be=>{const[Je,st]=F.useState(Be),ut=F.useRef(Je);return F.useEffect(()=>{ut.current=Je},[Je]),[Je,ut,st]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:a}=Ar(),[s,l]=F.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:p,setAssessmentModal:v=()=>{},saveNewQuizData:m}=t,{quizStartAlert:A}=gwe(),{userSelectedLanguage:w}=sn(),[x,,C]=e(0),{media:T}=Ht(),S=(ue=T==null?void 0:T.image)!=null&&ue.MediaImage?(Te=T==null?void 0:T.image)==null?void 0:Te.MediaImage:o.jsx(o.Fragment,{}),[E,_,P]=e(null),[O,k]=F.useState(!1),[M,Y,N]=e([]),[z,$]=F.useState(!1),[le,G]=F.useState(!1),[R,ce]=F.useState(0),[q,W]=F.useState(0),[ee,Q]=F.useState(0),[H,X]=F.useState(!1),[pe,ge]=F.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},F.useEffect(()=>{z||$(!0)},[M,O,z]),F.useEffect(()=>{u!==null&&(A(),Ae())},[]);const Ae=()=>{W(u.quizConfiguration.quizPassMark)},ye=F.useCallback((Be,Je,st,ut,St)=>{const zt=[...M];if((St==null?void 0:St.answerInputType)!=="checkbox"){const pn={uuid:St==null?void 0:St.uuid,question:St==null?void 0:St.questionText,isCorrect:ut.isCorrect,selectedAnswer:ut.answersText,viewed:!0},Lt=M.findIndex(mn=>(mn==null?void 0:mn.uuid)===St.uuid);Lt>=0?(zt[Lt]={...zt[Lt],...pn},N(zt)):N([...M,pn])}},[E]),oe=()=>{if(x===0)return;const Be=x-1,Je=u.quizElements[Be],st=Y.current.find(ut=>ut.uuid===Je.uuid);if(st){const ut=st.selectedAnswer;P(Array.isArray(ut)?ut:ut[w.type]??ut),k(!0)}else P(null),k(!1);C(Be)},re=Be=>{for(const Je of M)if(Je.questionIndex===x+Be){P(Je.selectedAnswerEnglish);break}},B=(Be,Je,st,ut)=>{var pn;const St=[...E];if(Be)St.push(Je);else{const Lt=St.findIndex(mn=>mn===Je);Lt>=0&&St.splice(Lt,1)}P(St);const zt=[...M];if((ut==null?void 0:ut.answerInputType)==="checkbox"){let Lt=!1;for(const[,xt]of(ut==null?void 0:ut.answerOptions.entries())||[])if(xt.isCorrect===!0)if(It.includes(St,(pn=xt==null?void 0:xt.answersText)==null?void 0:pn[w==null?void 0:w.type]))Lt=!0;else{Lt=!1;break}const mn={uuid:ut==null?void 0:ut.uuid,question:ut==null?void 0:ut.questionText,isCorrect:Lt,selectedAnswer:st.answersText,viewed:!0},Rn=M.findIndex(xt=>(xt==null?void 0:xt.uuid)===ut.uuid);Rn>=0?(zt[Rn]={...zt[Rn],...mn},N(zt)):N([...M,mn])}},ne=F.useCallback(()=>{var pn,Lt,mn,Rn,xt,ze,He,at,rn,nn,Jt,In;const Be=_.current,Je=It.findIndex((pn=u==null?void 0:u.quizElements[x])==null?void 0:pn.answerOptions,function(yt){return yt.isCorrect===!0}),st=u==null?void 0:u.quizElements[x],ut=(mn=(Lt=st==null?void 0:st.answerOptions[Je])==null?void 0:Lt.answersText)!=null&&mn[w==null?void 0:w.type]?(xt=(Rn=st==null?void 0:st.answerOptions[Je])==null?void 0:Rn.answersText)==null?void 0:xt[w==null?void 0:w.type]:"",St=M.findIndex(yt=>(yt==null?void 0:yt.uuid)===st.uuid),zt=(ze=M[St])!=null&&ze.isCorrect?1:0;if(u!=null&&u.quizElements&&x+1!==(u==null?void 0:u.quizElements.length)){const yt={assessment_user_attempt_id:(at=i==null?void 0:i.assesment_user_attempts[((He=i==null?void 0:i.assesment_user_attempts)==null?void 0:He.length)-1])==null?void 0:at.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(rn=st.questionText)==null?void 0:rn[w==null?void 0:w.type],question_uid:st==null?void 0:st.uuid,start_time:s,finish_time:new Date,correct_answer:ut,selected_answer:Array.isArray(Be)?Be.toString():Be,is_correct_answer:zt};r(yt),P(null),C(x+1),l(new Date),re(2)}else if((u==null?void 0:u.quizElements.length)===x+1){const yt={assessment_user_attempt_id:(Jt=i==null?void 0:i.assesment_user_attempts[((nn=i==null?void 0:i.assesment_user_attempts)==null?void 0:nn.length)-1])==null?void 0:Jt.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:st==null?void 0:st.uuid,question:(In=st.questionText)==null?void 0:In[w==null?void 0:w.type],start_time:s,finish_time:new Date,correct_answer:ut,selected_answer:Array.isArray(Be)?Be.toString():Be,is_correct_answer:zt};r(yt),se(),Ne()}if(k(!1),x+1<u.quizElements.length){const yt=x+1,Ue=u.quizElements[yt],it=M.find(Dt=>Dt.uuid===Ue.uuid);if(it){const Dt=it.selectedAnswer,qt=Array.isArray(Dt)?Dt:Dt[w.type]??Dt;P(qt),k(!0)}else P(null),k(!1)}},[x,M]),se=()=>{G(!0)},me=()=>{ve?(p(t3),m(),$(!0),A(),Ae(),C(0),P(null),k(!1),N([]),G(!1),ce(0),Q(0),X(!1),ge({isCorrect:null,text:null})):(p(Tp),v(!1))},Ne=()=>{var St,zt;let Be=0,Je=0,st=!1;for(const pn of M)pn!=null&&pn.isCorrect&&Be++;ce(Be),Je=Be/((St=u==null?void 0:u.quizElements)==null?void 0:St.length)*100,Je=Math.round(Je),Q(Je),st=Je>=q,X(st);const ut={...u,...i,result:Je,status:st,selectedAnswers:M};d(ut),n({session_id:c,is_pass:st?1:0,score:Be,out_of:(zt=u==null?void 0:u.quizElements)==null?void 0:zt.length,finish_time:new Date,status:1})},we=()=>{var Be,Je,st,ut,St,zt,pn;if(((Be=u==null?void 0:u.quizElements[x])==null?void 0:Be.answerInputType)==="radio"){const Lt=It.findIndex((Je=u==null?void 0:u.quizElements[x])==null?void 0:Je.answerOptions,function(mn){return mn.isCorrect===!0});E===((St=(ut=(st=u==null?void 0:u.quizElements[x])==null?void 0:st.answerOptions[Lt])==null?void 0:ut.answersText)==null?void 0:St[w==null?void 0:w.type])?ge({isCorrect:!0,text:E}):ge({isCorrect:!1,text:E})}if(((zt=u==null?void 0:u.quizElements[x])==null?void 0:zt.answerInputType)==="checkbox"){const Lt=(pn=u==null?void 0:u.quizElements[x])==null?void 0:pn.answerOptions.filter(mn=>mn.isCorrect===!0);if(E!=null&&E.length){const mn=E==null?void 0:E.map(Rn=>({isCorrect:Lt==null?void 0:Lt.some(xt=>{var ze;return((ze=xt==null?void 0:xt.answersText)==null?void 0:ze[w==null?void 0:w.type])===Rn}),text:Rn}));ge(mn)}}},ve=(i==null?void 0:i.noOfAttempts)-((_e=i==null?void 0:i.assesment_user_attempts)==null?void 0:_e.length)>0&&!H;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[le&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(K=a==null?void 0:a.assessment)==null?void 0:K.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",R," out of"," ",(Ee=u==null?void 0:u.quizElements)==null?void 0:Ee.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",ee,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",q,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",H?o.jsx(pu,{severity:"success",value:"Passed"}):o.jsx(pu,{severity:"danger",value:"Failed"})]}),H&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:le&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Ft,{label:ve?"Restart":"End",onClick:()=>me()})})})]})]})})}),le&&((be=i==null?void 0:i.assessment_type)==null?void 0:be.key)===mwe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:M==null?void 0:M.map((Be,Je)=>{var st,ut;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(st=Be==null?void 0:Be.question)==null?void 0:st[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(ut=Be==null?void 0:Be.selectedAnswer)==null?void 0:ut[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),Be!=null&&Be.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(h4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(h4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},Je)})})})]}),f!==q_?o.jsx(o.Fragment,{children:le&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Ft,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{p(Tp)}})})}):o.jsx(o.Fragment,{}),z&&!le&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(hwe,{assessmentData:i,setDisplaySummary:G}),o.jsx(pwe,{currentQuestionIndex:x,assessmentData:i,onNextQuestion:ne})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(he=u==null?void 0:u.quizElements)==null?void 0:he.map((Be,Je)=>{var st,ut,St,zt,pn;return o.jsxs("div",{className:"quiz-card-box",children:[x===Je&&((st=Be==null?void 0:Be.questionTextImage)==null?void 0:st[w==null?void 0:w.type])&&((ut=Be==null?void 0:Be.questionTextImage)==null?void 0:ut[w==null?void 0:w.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(S,{mediaId:(St=Be==null?void 0:Be.questionTextImage)==null?void 0:St[w==null?void 0:w.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:x===Je&&((zt=Be==null?void 0:Be.questionText)==null?void 0:zt[w==null?void 0:w.type])}),x===Je&&((pn=Be==null?void 0:Be.answerOptions)==null?void 0:pn.map((Lt,mn)=>(Be==null?void 0:Be.answerInputType)==="checkbox"?o.jsx(F.Fragment,{children:o.jsx(ewe,{onChangeCheckbox:B,setSelectedOption:P,quiz:Lt,userSelectedLanguage:w,onSetAnswer:ye,setIsOptionSelected:k,index:mn,eleIndex:Je,ele:Be,setCorrectAnswerCheck:ge,correctAnswerCheck:pe,selectedOption:E})},`checkbox-question-${mn}`):o.jsx(F.Fragment,{children:o.jsx(ZAe,{setSelectedOption:P,quiz:Lt,userSelectedLanguage:w,onSetAnswer:ye,setIsOptionSelected:k,index:mn,eleIndex:Je,ele:Be,setCorrectAnswerCheck:ge,correctAnswerCheck:pe,selectedOption:E})},`radio-question-${mn}`)))]},Je)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",x+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),x>0&&((xe=(fe=i==null?void 0:i.time_limit)==null?void 0:fe.type)==null?void 0:xe.key)!=="PerQuestion"&&o.jsx(Ft,{size:"large",className:"mx-2",label:"Previous",onClick:Be=>oe()}),((i==null?void 0:i.skippable)===!0||O===!0)&&o.jsx(Ft,{size:"large",label:(u==null?void 0:u.quizElements.length)===x+1?"Finish":O===!0?"Next":"Skip",onClick:ne}),O===!0&&((Me=i==null?void 0:i.assessment_type)==null?void 0:Me.key)==="1"&&o.jsx(Ft,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>we()})]})]})]})})},vwe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:a,currentItem:s}=t,{userTrainingSaveData:l}=Ar();F.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var p,v,m,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(m=(v=(p=d==null?void 0:d.layout[0])==null?void 0:p.children[0])==null?void 0:v.children[0])==null?void 0:m.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=im.shuffle(h).map((w,x)=>({...w}))),f!=null&&f.randomiseAnswers&&(h=h.map((w,x)=>({...w,answerOptions:im.shuffle(w==null?void 0:w.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(p=>(p==null?void 0:p.fieldId)===(s==null?void 0:s.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}a()}};return o.jsx("div",{children:n&&o.jsx(i$,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},bwe=t=>{var m,A;const{currentItem:e,videoJsOptions:n}=t,r=F.useRef(null),{userTrainingSaveData:i,updateUserTraining:a,taskRegisterData:s}=Ar(),{media:l}=Ht(),c=(m=l==null?void 0:l.video)!=null&&m.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=w=>{r.current=w,w.on("waiting",()=>{_t.log("player is waiting")}),w.on("dispose",()=>{_t.log("player will dispose")})},d=w=>{if(i!==null){const x=[...i],C=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid));C>=0&&(x[C].seenTime=w==null?void 0:w.target.currentTime)}},f=w=>{const x=[...i],C=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(w==null?void 0:w.uuid));C>=0&&(i[C]={...i[C],isSeen:!0},a(x),h("Ended"))},h=w=>{const x=r.current,C=i!==null?i==null?void 0:i.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid)):-1;C>=0&&i[C].logs.push({action:w,videoTime:i[C].seenTime,totalTime:x.duration,timeState:new Date})},p=w=>{const{mediaId:x}=w,[C,T]=F.useState(!1);return F.useEffect(()=>{if(!C&&i!==null){const S=i.findIndex(E=>(E==null?void 0:E.fieldId)===(e==null?void 0:e.uuid));if(S>=0){T(!0);const E=r.current;E.currentTime=i[S].seenTime}T(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:x,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},v=F.useCallback(w=>o.jsx(p,{mediaId:w}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:v(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(mB,{onUpdate:()=>{},options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},a$=t=>{var _,P,O,k,M,Y;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=Ar(),[a]=F.useState(!1),[,s]=F.useState(p4),[l,c]=F.useState([]),[u,d]=F.useState(null),{userSelectedLanguage:f}=sn(),{isAdmin:h}=Ht(),[p,v]=F.useState(null),[m,A]=F.useState(null),w=(_=i==null?void 0:i.training)!=null&&_.getAssessmentByIdFromStore?(P=i==null?void 0:i.training)==null?void 0:P.getAssessmentByIdFromStore:()=>{},x=(O=i==null?void 0:i.training)!=null&&O.TrainingOverView?(k=i==null?void 0:i.training)==null?void 0:k.TrainingOverView:()=>o.jsx(o.Fragment,{}),[C,T]=F.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});F.useEffect(()=>{a||S()},[a]);const S=()=>{var N,z,$,le,G,R,ce,q,W,ee,Q,H,X,pe,ge,Ae,ye,oe,re,B,ne;switch(v(($=(z=(N=e[0])==null?void 0:N.children[0])==null?void 0:z.children[0])==null?void 0:$.children[0]),A(e[0]),(ce=(R=(G=(le=e[0])==null?void 0:le.children[0])==null?void 0:G.children[0])==null?void 0:R.children[0])==null?void 0:ce.componentType){case"video":T({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(H=(Q=(ee=(W=(q=e[0])==null?void 0:q.children[0])==null?void 0:W.children[0])==null?void 0:ee.children[0])==null?void 0:Q.media_url)==null?void 0:H.english}]});break;case"image":s((ye=(Ae=(ge=(pe=(X=e[0])==null?void 0:X.children[0])==null?void 0:pe.children[0])==null?void 0:ge.children[0])==null?void 0:Ae.media_url)==null?void 0:ye.english);break;case"document":c((ne=(B=(re=(oe=e[0])==null?void 0:oe.children[0])==null?void 0:re.children[0])==null?void 0:B.children[0])==null?void 0:ne.documents);break}},E=N=>{switch(N==null?void 0:N.componentType){case"video":return o.jsx("div",{children:o.jsx(bwe,{videoJsOptions:C,currentItem:N},N==null?void 0:N.uuid)});case"image":return o.jsx(mF,{field:N});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((z,$)=>o.jsx("li",{children:o.jsx("a",{href:z==null?void 0:z.url,children:z==null?void 0:z.url})},`document-item-${$}`))})]});case"quiz":return w!=null&&w.form_template_schema?o.jsx(vwe,{renderIn:q_,getAssessmentByIdFromStore:w,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:N}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("div",{className:"flex justify-content-center text-2xl font-bold mb-3",children:[(M=m==null?void 0:m.heading)==null?void 0:M[f==null?void 0:f.type]," -"," ",(Y=p==null?void 0:p.title)==null?void 0:Y[f==null?void 0:f.type]," "]}),E(p),!h&&n&&o.jsx(x,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((N,z)=>{var $,le;return o.jsxs(ci,{className:"mb-2",header:($=N==null?void 0:N.heading)==null?void 0:$.english,toggleable:!0,children:[o.jsxs("div",{children:[(le=N==null?void 0:N.subHeadingText)==null?void 0:le[f==null?void 0:f.type],"333"]}),N.children.map((G,R)=>{const ce=`${R}`;return o.jsx("div",{children:G.children.map((q,W)=>{const ee=`${R}-${ce}`;return o.jsx(JAe,{setCurrentSection:A,section:N,setCurrentItem:v,currentItem:p,path:ee,fields:q.children,setvideoJsOptions:T,setImage:s,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${W}`)})},`training-sidebar-container-${R}`)})]},`train-sidebar-panel-${z}`)})})]})},ywe=()=>{var r;const{formBuilderFormLayout:t}=sn(),{isBuilderMode:e}=Ht(),n=(i,a,s)=>o.jsx(WAe,{data:i,path:a,pageIndex:s},`page-${i.uuid}`);return e?o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,a)=>{const s=`${a}`;return o.jsx("div",{children:n(i,s,a)},`exam-page-${a}`)})})}):o.jsx(a$,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}})},Awe=t=>{var E,_,P,O,k;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=sn(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=F.useState(),[u,d]=F.useState([]),{media:f}=Ht(),h=(E=f==null?void 0:f.image)!=null&&E.MediaImage?(_=f==null?void 0:f.image)==null?void 0:_.MediaImage:o.jsx(o.Fragment,{}),p={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[v,m]=F.useState(0),[A,w]=F.useState(!1);function x(M,Y){return(M==null?void 0:M.length)<=Y?M:(M==null?void 0:M.slice(0,Y))+"..."}F.useEffect(()=>{w(!0)},[]);const C=()=>{v!==0&&m(v-1)},T=()=>{if(p!=null&&p.quizElements&&v+1!==(p==null?void 0:p.quizElements.length))m(v+1);else if((p==null?void 0:p.quizElements.length)===v+1)return},S=(M,Y)=>{let N=[...u];M.checked?N.push(Y):N=N.filter(z=>(z==null?void 0:z[e==null?void 0:e.type])!==(Y==null?void 0:Y[e==null?void 0:e.type])),d(N)};return o.jsxs("div",{className:"mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[p==null?void 0:p.name," "]}),(P=p==null?void 0:p.quizElements)==null?void 0:P.map((M,Y)=>{var N,z,$,le,G,R,ce,q,W;return(M==null?void 0:M.answerInputType)==="radio"?o.jsxs("div",{className:v===Y?"card":" flex align-items-center p-field-radiobutton",children:[((N=M==null?void 0:M.questionTextImage)==null?void 0:N[e==null?void 0:e.type])&&((z=M==null?void 0:M.questionTextImage)==null?void 0:z[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:($=M==null?void 0:M.questionTextImage)==null?void 0:$[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:v===Y&&((le=M==null?void 0:M.questionText)==null?void 0:le[e==null?void 0:e.type])}),v===Y&&((G=M==null?void 0:M.answerOptions)==null?void 0:G.map((ee,Q)=>{var H,X,pe,ge;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:`${Q}-preview`,value:ee==null?void 0:ee.answersText,checked:l===Q,onChange:()=>{c(Q)}}),((H=ee.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((X=ee.answersTextImage)==null?void 0:X[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(pe=ee.answersTextImage)==null?void 0:pe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${Q}-preview`,children:(ge=ee.answersText)==null?void 0:ge[e==null?void 0:e.type]})]},Q)}))]},Y):(M==null?void 0:M.answerInputType)==="checkbox"?o.jsxs("div",{className:v===Y?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:v===Y&&((R=M==null?void 0:M.questionText)==null?void 0:R[e==null?void 0:e.type])}),v===Y&&((ce=M==null?void 0:M.answerOptions)==null?void 0:ce.map((ee,Q)=>{var H,X,pe,ge;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Yr,{inputId:Q,value:ee==null?void 0:ee.answersText,onChange:Ae=>{S(Ae,ee==null?void 0:ee.answersText)},checked:u.some(Ae=>{var ye;return(Ae==null?void 0:Ae[e==null?void 0:e.type])===((ye=ee==null?void 0:ee.answersText)==null?void 0:ye[e==null?void 0:e.type])})}),((H=ee.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((X=ee.answersTextImage)==null?void 0:X[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(pe=ee.answersTextImage)==null?void 0:pe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Q,children:(ge=ee.answersText)==null?void 0:ge[e==null?void 0:e.type]})]},Q)}))]},Y):o.jsxs("div",{className:v===Y?"card":"",children:[o.jsx("h3",{className:"mb-5",children:v===Y&&((q=M==null?void 0:M.questionText)==null?void 0:q[e==null?void 0:e.type])}),v===Y&&((W=M==null?void 0:M.answerOptions)==null?void 0:W.map((ee,Q)=>{var H,X,pe,ge;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(sa,{inputId:Q,value:ee==null?void 0:ee.answersText,onChange:()=>{}}),((H=ee.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((X=ee.answersTextImage)==null?void 0:X[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(pe=ee.answersTextImage)==null?void 0:pe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Q,children:(ge=ee.answersText)==null?void 0:ge[e==null?void 0:e.type]})]},Q)}))]},Y)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",v+1+"/"+(p==null?void 0:p.quizElements.length)]}),o.jsx("br",{}),v>0&&o.jsx(Ft,{text:!0,className:"mx-2",label:"Previous",onClick:()=>C()}),o.jsx(Ft,{outlined:!0,label:(p==null?void 0:p.quizElements.length)===v+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(O=p==null?void 0:p.quizElements)==null?void 0:O.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(pu,{className:"mr-2",severity:"success",value:"True"}):o.jsx(pu,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question time limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam time limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show questions randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(k=p==null?void 0:p.quizElements)==null?void 0:k.map((M,Y)=>{var N;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:x(((N=M==null?void 0:M.questionText)==null?void 0:N[e==null?void 0:e.type])||"",30)})})},`preview-question-${Y}`)})})})]})]})]})]})},wwe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:p,isBuilderMode:v}=Ht(),[{isDragging:m},A]=aa({type:Ss,item:{type:Ss,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:S=>({isDragging:S.isDragging()})}),x={position:"relative",opacity:m&&!h?.25:1};A(d);const C=(S,E,_,P,O,k,M)=>o.jsx(Vc,{page:u,type:"field",row:c,section:l,field:S,data:S,path:E,pageIndex:_,sectionIndex:P,rowIndex:O,columnIndex:k,fieldIndex:M},`component-${n}-${S==null?void 0:S.uuid}`);return o.jsx("div",{style:p?x:{},className:v?"draggable form-builder-column container-column":"form-builder-column container-column",children:v===!0?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((S,E)=>{const _=`${n}-${E}`;return o.jsxs(F.Fragment,{children:[o.jsx(Fr,{isAdvanceView:p,fieldDropArea:!0,data:{path:_,childrenCount:e.children.length,droppedField:e},onDrop:f}),C(S,_,r,i,a,s,E)]},_)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Fr,{isAdvanceView:p,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(Awe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},Swe={},Cwe=t=>{var v,m,A,w;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{isRenderView:u}=Ht(),[{isDragging:d},f]=aa({type:So,item:{type:So,uuid:e.uuid,children:e.children,path:n,data:e},collect:x=>({isDragging:x.isDragging()})}),h=d?.25:1;f(c);const p=(x,C,T,S,E,_)=>o.jsx(wwe,{page:l,row:e,section:s,data:x,path:C,pageIndex:T,sectionIndex:S,rowIndex:E,columnIndex:_},`column-${n}-${x.uuid}`);return o.jsx("div",{style:{...Swe,opacity:h,marginTop:`${(v=e==null?void 0:e.margin)==null?void 0:v.top}px`,marginBottom:`${(m=e==null?void 0:e.margin)==null?void 0:m.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(w=e==null?void 0:e.margin)==null?void 0:w.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((x,C)=>{const T=`${n}-${C}`;return o.jsx(F.Fragment,{children:p(x,T,r,i,a,C)},T)})})})},xwe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isBuilderMode:d}=Ht(),[f,h]=F.useState(!1),[p,v]=F.useState(!1),[m,A]=F.useState(null),w=F.useRef(null),[{isDragging:x},C]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),T=x?.25:1;C(w);const S=(E,_,P,O,k)=>o.jsx(Cwe,{page:s,section:a,data:E,path:_,pageIndex:P,sectionIndex:O,rowIndex:k},`row-${n}-${E.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!0&&o.jsx(Nh,{saveBuilderElementModalData:m,setSaveBuilderElementModalData:A,saveElementModal:p,setSaveElementModal:v}),f===!0&&o.jsx(Dh,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((E,_)=>{const P=`${n}-${_}`;return o.jsx(F.Fragment,{children:S(E,P,r,i,_)},P)})})]})},Twe=t=>{const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=F.useRef(null),[{},s]=aa({type:ia,item:{type:ia,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(xwe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(F.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},Ewe=()=>{const{formBuilderFormLayout:t}=sn(),e=(n,r,i)=>o.jsx(Twe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},E5=()=>{const{renderType:t}=Ht();switch(t){case P0:return o.jsx(vAe,{});case M0:return o.jsx(TAe,{});case K1:return o.jsx(FAe,{});case sm:return o.jsx(HAe,{});case om:return o.jsx(ywe,{});case Yd:return o.jsx(Ewe,{})}},Iwe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:a,updateTaskProgressValue:s}=Ar();return F.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;s(u),a(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(a$,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},_we=({taskId:t,onStart:e})=>{var w,x,C,T,S,E,_,P,O,k,M,Y,N,z,$,le;const[n,r]=F.useState(Tp),[i,a]=F.useState(null),{examComplete:s,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=Ar();F.useEffect(()=>{var G,R,ce,q,W;if(((G=c==null?void 0:c.formType)==null?void 0:G.key)==="exam"){let ee=[...((q=(ce=(R=c==null?void 0:c.layout[0])==null?void 0:R.children[0])==null?void 0:ce.children[0])==null?void 0:q.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(ee=im.shuffle(ee).map(Q=>({...Q}))),l!=null&&l.randomiseAnswers&&(ee=ee.map(Q=>({...Q,answerOptions:im.shuffle(Q==null?void 0:Q.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(ee=ee.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),a({assessment_id:1,name:(W=u==null?void 0:u.assessment)==null?void 0:W.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:ee})}},[c]);const f=o.jsxs("div",{children:[o.jsx(Ft,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(Tp)}),o.jsx(Ft,{label:"Start Immediately",onClick:()=>{p(),r(t3)}})]}),h=G=>G.completed?(p(),r(t3),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your quiz is about to start in ",G.seconds," seconds"]}),p=()=>{const G={task_id:t,session_id:tt(),start_time:new Date,finish_time:new Date};a(R=>({...R,...G})),d(G,a)},v=()=>{r(N8),p()},m=((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)>0?(x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.some(G=>(G==null?void 0:G.is_pass)===1):!1;function A(){var q;const G=l==null?void 0:l.assesment_user_attempts[((q=l==null?void 0:l.assesment_user_attempts)==null?void 0:q.length)-1],R=G==null?void 0:G.start_time,ce=G==null?void 0:G.finish_time;return pde(R,ce)}return o.jsxs(o.Fragment,{children:[n===N8&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Cg,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===Tp&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(C=u==null?void 0:u.assessment)==null?void 0:C.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Mn(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((S=l==null?void 0:l.assesment_user_attempts)==null?void 0:S.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(E=i==null?void 0:i.quizElements)==null?void 0:E.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((P=(_=l==null?void 0:l.time_limit)==null?void 0:_.type)==null?void 0:P.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((k=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:k.num_of_mins)," ","mins"]}),l&&((Y=(M=l==null?void 0:l.time_limit)==null?void 0:M.type)==null?void 0:Y.key)==="PerQuestion"&&o.jsx(o.Fragment,{children:(()=>{var q,W,ee;const G=((W=(q=l==null?void 0:l.time_limit)==null?void 0:q.time_limit_info)==null?void 0:W.time_per_question)*((ee=i==null?void 0:i.quizElements)==null?void 0:ee.length),R=Math.floor(G/60),ce=G%60;return o.jsxs(o.Fragment,{children:[R," min",ce>0&&` ${ce} sec`]})})()}),l&&((z=(N=l==null?void 0:l.time_limit)==null?void 0:N.type)==null?void 0:z.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No time limit"})]})]}),(($=l==null?void 0:l.assesment_user_attempts)==null?void 0:$.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((le=l==null?void 0:l.assesment_user_attempts)==null?void 0:le.length)>0?o.jsx(o.Fragment,{children:o.jsx(Ft,{size:"large",label:m===!0?"Passed":"Start now",disabled:m,className:"p-button-info",onClick:()=>{r(N8),e&&e()}})}):o.jsx(F8,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===t3&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(i$,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:v,saveNewQuizData:p,quizData:i,taskSchema:c,saveProgress:s,setAssessmentModal:()=>{}})})]})]})},Dwe=t=>{var O,k,M,Y,N,z,$,le,G,R;const{taskId:e,endPoints:n,isRenderView:r,showFieldsAfterSubmit:i=!1,className:a="",onStart:s,showFromTitle:l=!0}=t,{setLayout:c}=sn(),{taskProgressValue:u,taskRegisterData:d,task_status:f,taskSchema:h,taskData:p,updateTaskFormData:v,TasksLoading:m,userTaskSubmitFormData:A,TasksHTTPRequest:w,TasksSubmitLoading:x,clearTaskSchema:C,TASK_PUBLISHED:T,saveProgressDataHook:S,taskOptions:E}=Ar(),_=E!=null&&E.successMessage?E==null?void 0:E.successMessage:"Submitted Successfully";F.useEffect(()=>{if(h!==null&&c((h==null?void 0:h.layout)||[]),e){const q={viewed_at:new Date().toISOString()};v(A,e,n==null?void 0:n.updateFormData,e3,()=>{},q)}return()=>{C()}},[e]),F.useEffect(()=>{const ce=setTimeout(()=>{var q,W;A!==null&&((h==null?void 0:h.enableAutoSave)===!0||((q=h==null?void 0:h.formType)==null?void 0:q.key)===r3||((W=h==null?void 0:h.formType)==null?void 0:W.key)===Ip)&&S(A,e,n==null?void 0:n.updateFormData)},2e3);return()=>clearTimeout(ce)},[d,u]);const P=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-5"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"})]})});return o.jsx("div",{className:"relative",children:m||x||w?o.jsx("div",{className:"w-full",children:o.jsx(P,{})}):o.jsxs(o.Fragment,{children:[(((O=h==null?void 0:h.formType)==null?void 0:O.key)===Ip||((k=h==null?void 0:h.formType)==null?void 0:k.key)===r3)&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${r===!1&&"builder_container"}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[l===!0&&o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:p==null?void 0:p.task_title}),o.jsx("div",{className:"ml-4 ",children:f===yZ&&o.jsx(F8,{classes:"",value:"Completed",level:"success"})})]}),i===!1&&f===T?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:_})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[m&&o.jsx(P,{}),!m&&o.jsxs(o.Fragment,{children:[o.jsx(XZ,{}),o.jsx("div",{className:`${a} mt-2 mb-2`,children:h!==null&&((M=h==null?void 0:h.layout)==null?void 0:M.length)&&o.jsx(E5,{})})]})]})})]})}),((Y=h==null?void 0:h.formType)==null?void 0:Y.key)===V_&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsxs("div",{className:"card",children:[l===!0&&o.jsx("div",{className:"flex align-items-center",children:o.jsxs("div",{children:[p==null?void 0:p.task_title," "]})}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(Cp,{backend:xp,children:h!==null&&((N=h==null?void 0:h.layout)==null?void 0:N.length)&&o.jsx(E5,{})})})]})})}),(((z=h==null?void 0:h.formType)==null?void 0:z.key)==="page"||(($=h==null?void 0:h.formType)==null?void 0:$.key)==="pdf")&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(Cp,{backend:xp,children:h!==null&&((le=h==null?void 0:h.layout)==null?void 0:le.length)&&o.jsx(E5,{})})})})}),((G=h==null?void 0:h.formType)==null?void 0:G.key)==="training"&&o.jsx(Iwe,{renderIn:qZ,taskSchema:h,taskId:e,endPoints:n}),((R=h==null?void 0:h.formType)==null?void 0:R.key)==="exam"&&o.jsx(_we,{taskId:e,endPoints:n,onStart:s})]})})},Nwe=t=>{var Y;const[e,n]=F.useState(!1),r=F.useRef(!1),{taskId:i,endPoints:a,messageWhileSubmittingForm:s,showProgressSavedToast:l=!0,showTaskSubmitToast:c=!0,showProgressSave:u=!0,showTaskSubmit:d=!0,submitLabel:f="Submit",afterSubmit:h=()=>{}}=t,p=(N,z,$,le)=>{var ce,q;let G=le;const R={fieldId:N.uuid};if($!=null&&$[N==null?void 0:N.uuid]){if((z==null?void 0:z.length)>0){e:for(const[,W]of z.entries())if(((ce=W==null?void 0:W.children)==null?void 0:ce.length)>0&&(W==null?void 0:W.enableConditionalField)===!0){for(const[,ee]of(W==null?void 0:W.children.entries())||[])if((q=ee==null?void 0:ee.attributes)!=null&&q.required&&(G=p(ee,ee==null?void 0:ee.options,$,G),G===!1))break e}}}else Gt.emit("OnInvalidFieldCatch",R),G=!1,_();return G},{task_status:v,taskProgressLoading:m,taskSchema:A,updateTaskFormData:w,submitTaskFormData:x,userTaskSubmitFormData:C,TasksSubmitLoading:T,taskOptions:S}=Ar(),E=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(Ft,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(Ft,{label:"Yes",icon:"pi pi-check",onClick:()=>k(),autoFocus:!0})]}),_=(N="One or more field is required")=>{r.current.show({severity:"error",summary:"Alert",detail:N,life:3e3})},P=F.useCallback(()=>{var z,$,le,G,R,ce,q,W,ee,Q,H,X,pe,ge,Ae,ye,oe,re,B,ne,se,me,Ne,we;let N=!1;e:for(const[ve,ue]of A.layout.entries())if((ue==null?void 0:ue.isHidden)===!1)for(const[Te,_e]of ue.children.entries())for(const[,K]of _e.children.entries())if(K!=null&&K.rowIsRepeatable){const Ee=C.findIndex(be=>(be==null?void 0:be.rowId)===K.uuid);if(Ee>=0){if(((z=C[Ee].repeatableFieldsData)==null?void 0:z.length)<(K==null?void 0:K.minimumEntries)){_(`Need minimun ${K==null?void 0:K.minimumEntries} entries`),N=!1;break e}N=!0}}else for(const[,Ee]of K.children.entries())for(const[,be]of Ee.children.entries()){if(be.isValid===0&&be.isPostField===!0&&(be==null?void 0:be.componentType)!=="hidden-field"){console.log("field",be);const he={pageIndex:ve,fieldId:be.uuid,sectionIndex:Te},fe=C.findIndex(xe=>(xe==null?void 0:xe.fieldId)===be.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",($=C[fe])==null?void 0:$.postData),!(fe===-1||(le=C[fe])!=null&&le.postData[0]&&(((R=(G=C[fe])==null?void 0:G.postData[0].postValue)==null?void 0:R.length)>0||((ce=C[fe])==null?void 0:ce.postData[0].postValue)>0||(W=(q=C[fe])==null?void 0:q.postData[0].postValue)!=null&&W.name))){console.log("inValidData",he),Gt.emit("OnInvalidFieldCatch",he),N=!1,_();break e}}if((be==null?void 0:be.componentType)==="radio-hierarchal"){const he=C.findIndex(fe=>(fe==null?void 0:fe.fieldId)===be.uuid);if(he>=0&&(N=p(be,be==null?void 0:be.options,(ee=C[he])==null?void 0:ee.postData[0].postValue,!0),!N))break e}if(((Q=be==null?void 0:be.children)==null?void 0:Q.length)>0)for(const[,he]of be.children.entries()){const fe=Object.keys(he);if(fe[0]){const xe=he[fe[0]],Me={fieldId:xe.uuid,sectionIndex:Te},Be=C.findIndex(Je=>(Je==null?void 0:Je.fieldId)===xe.uuid);if(!((H=C[Be])!=null&&H.postData[0]&&(((pe=(X=C[Be])==null?void 0:X.postData[0].postValue)==null?void 0:pe.length)>0||((ge=C[Be])==null?void 0:ge.postData[0].postValue)>0||((oe=(ye=(Ae=C[Be])==null?void 0:Ae.postData[0])==null?void 0:ye.postValue)==null?void 0:oe.addressOne)!==""))){Gt.emit("OnInvalidFieldCatch",Me),N=!1,_();break e}}}if(be!=null&&be.inlineConditionalRules&&((B=(re=be==null?void 0:be.inlineConditionalRules)==null?void 0:re.rules)==null?void 0:B.length)>0){for(const[,he]of((ne=be==null?void 0:be.inlineConditionalRules)==null?void 0:ne.rules.entries())||[])for(const[,fe]of(he==null?void 0:he.conditions.entries())||[])for(const[,xe]of(fe==null?void 0:fe.children.entries())||[])if(xe.isValid===0){const Me={fieldId:xe.uuid,sectionIndex:Te},Be=C.findIndex(Je=>(Je==null?void 0:Je.fieldId)===xe.uuid);if(Be>=0&&!((se=C[Be])!=null&&se.postData[0]&&(((Ne=(me=C[Be])==null?void 0:me.postData[0].postValue)==null?void 0:Ne.length)>0||((we=C[Be])==null?void 0:we.postData[0].postValue)>0))){Gt.emit("OnInvalidFieldCatch",Me),N=!1,_();break e}}}N=!0}N&&n(!0)},[C]),O=()=>{Gt.emit("onSubmitUserForm","complete"),P()},k=()=>{x(C,i,a==null?void 0:a.submitFormData),n(!1),h()},M=N=>{w(N,i,a==null?void 0:a.updateFormData,e3,()=>{var z;l&&((z=r==null?void 0:r.current)==null||z.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3}))})};return o.jsxs("div",{children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:s}),E()]}),o.jsx(f5,{ref:r}),((Y=A==null?void 0:A.formType)==null?void 0:Y.key)!==""&&(v===e3||v===null)&&o.jsx("span",{children:o.jsxs("div",{className:" flex justify-content-center",children:[u===!0&&o.jsx(Ft,{text:!0,className:"mr-2 p-button-info",label:"Save progress",onClick:()=>M(C),loading:m,disabled:T}),d===!0&&o.jsx(Ft,{label:`${f}`,type:"button",onClick:()=>O(),disabled:m,loading:T})]})})]})};/**
|
|
4287
4287
|
* React Router v6.28.0
|
|
4288
4288
|
*
|