cft-builder 0.1.11 → 0.1.12
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.js
CHANGED
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -2386,7 +2386,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
`}}),hi=y.forwardRef(function(t,e){var n=jn(),r=y.useContext(nr),i=Z3.getProps(t,r),a=y.useState(i.id),s=gF(a,2),l=s[0],c=s[1],u=y.useState(i.collapsed),d=gF(u,2),f=d[0],h=d[1],m=y.useRef(null),g=y.useRef(null),v=i.toggleable?i.onToggle?i.collapsed:f:!1,A=l+"_header",w=l+"_content",x=Z3.setMetaData({props:i,state:{id:l,collapsed:v}}),S=x.ptm,E=x.cx,C=x.isUnstyled;fi(Z3.css.styles,C,{name:"panel"});var _=function(W){i.toggleable&&(v?T(W):O(W),W&&(i.onToggle&&i.onToggle({originalEvent:W,value:!v}),W.preventDefault()))},T=function(W){i.onToggle||h(!1),i.onExpand&&W&&i.onExpand(W)},O=function(W){i.onToggle||h(!0),i.onCollapse&&W&&i.onCollapse(W)};y.useImperativeHandle(e,function(){return{props:i,toggle:_,expand:T,collapse:O,getElement:function(){return m.current},getContent:function(){return g.current}}}),Mi(function(){l||c(Ho())});var F=function(){if(i.toggleable){var W=l+"_label",ae=n({className:E("toggler"),onClick:_,id:W,"aria-controls":w,"aria-expanded":!v,type:"button",role:"button","aria-label":i.header},S("toggler")),Y=n(S("togglericon")),pe=v?i.expandIcon||y.createElement(jm,Y):i.collapseIcon||y.createElement(u8,Y),ie=Wn.getJSXIcon(pe,Y,{props:i,collapsed:v});return y.createElement("button",ae,ie,y.createElement(Qt,null))}return null},B=function(){var W=Fe.getJSXElement(i.header,i),ae=Fe.getJSXElement(i.icons,i),Y=F(),pe=n({id:A,className:E("title")},S("title")),ie=y.createElement("span",pe,W),J=n({className:E("icons")},S("icons")),Q=y.createElement("div",J,ae,Y),oe=n({className:E("header")},S("header")),ye=y.createElement("div",oe,ie,Q);if(i.headerTemplate){var Te={className:"p-panel-header",titleClassName:"p-panel-title",iconsClassName:"p-panel-icons",togglerClassName:"p-panel-header-icon p-panel-toggler p-link",onTogglerClick:_,titleElement:ie,iconsElement:Q,togglerElement:Y,element:ye,id:l+"_header",props:i,collapsed:v};return Fe.getJSXElement(i.headerTemplate,Te)}else if(i.header||i.toggleable)return ye;return null},M=function(){var W=Fe.getJSXElement(i.footer,i),ae=n({className:E("footer")},S("footer")),Y=y.createElement("div",ae,W);if(i.footerTemplate){var pe={className:E("footer"),element:Y,props:i};return Fe.getJSXElement(i.footerTemplate,pe)}else if(i.footer)return Y;return null},z=function(){var W=n({ref:g,className:E("toggleableContent"),"aria-hidden":v,role:"region",id:w,"aria-labelledby":A},S("toggleablecontent")),ae=n({className:E("content")},S("content")),Y=n({classNames:E("transition"),timeout:{enter:1e3,exit:450},in:!v,unmountOnExit:!0,options:i.transitionOptions},S("transition"));return y.createElement(zo,db({nodeRef:g},Y),y.createElement("div",W,y.createElement("div",ae,i.children)))},P=n({id:l,ref:m,style:i.style,className:pt(i.className,E("root"))},Z3.getOtherProps(i),S("root")),H=B(),de=z(),fe=M();return y.createElement("div",P,H,de,fe)});hi.displayName="Panel";const Qde=t=>{var g;const{fieldState:e,setFieldState:n,pageIndex:r,formBuilderFormLayout:i,pageSettingUpdate:a}=t,s=(v,A)=>{const w=`${v.className} justify-content-start`,x=`${v.titleClassName} pl-1`;return o.jsxs("div",{className:w,children:[o.jsx(kt,{text:!0,icon:"pi pi-trash",className:v.togglerClassName,onClick:()=>c(A),"aria-label":"Submit"}),o.jsx("span",{className:x,children:`Rule ${A+1}`})]})},l=(v,A)=>{var x;const w=[...((x=e==null?void 0:e.conditionalTabRules)==null?void 0:x.rules)||[]];w[v].conditions=w[v].conditions.filter((S,E)=>A!==E),n(S=>({...S,conditionalTabRules:{...S.conditionalTabRules,rules:w}}))},c=v=>{var S;const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]],w=A.filter((E,C)=>v!==C);n(E=>({...E,conditionalTabRules:{...E.conditionalTabRules,rules:w}}));const x=A[v];(S=x==null?void 0:x.conditions)==null||S.map(E=>{const C=i?Et.findIndex(i,T=>{var O;return(T==null?void 0:T.uuid)===((O=E==null?void 0:E.tab)==null?void 0:O.uuid)}):-1,_=i[C];_&&(_.isHidden=!1,a(C,_))})};let u=[...i].filter(function(v,A){return A!==r});u.map(v=>({uuid:v==null?void 0:v.uuid,title:v==null?void 0:v.title}));const d=(v,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].option=v==null?void 0:v.value,n(S=>({...S,conditionalTabRules:{...S.conditionalTabRules,rules:x}}))},f=(v,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].tab=v==null?void 0:v.value,n(C=>({...C,conditionalTabRules:{...C.conditionalTabRules,rules:x}}));const S=Et.findIndex(i,C=>{var _;return(C==null?void 0:C.uuid)===((_=v==null?void 0:v.value)==null?void 0:_.uuid)}),E=i[S];E&&(E.isHidden=!0,a(S,E))},h=()=>{n(v=>({...v,conditionalTabRules:{...v.conditionalTabRules,rules:[...v.conditionalTabRules.rules,{conditions:[]}]}}))},m=v=>{const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];A[v].conditions=[...A[v].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&&((g=e==null?void 0:e.conditionalTabRules)==null?void 0:g.rules.map((v,A)=>o.jsx(hi,{className:"mb-3",header:`Rule ${A+1}`,headerTemplate:w=>s(w,A),children:o.jsxs("div",{children:[v==null?void 0:v.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(xa,{value:w.tab,options:u,onChange:S=>f(S,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(xa,{value:w==null?void 0:w.option,options:e==null?void 0:e.options,onChange:S=>d(S,A,x),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(kt,{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(kt,{text:!0,size:"small",onClick:()=>m(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(kt,{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"})]})},Jde=t=>{var S;const{fieldState:e,setFieldState:n,section:r,formBuilderFormLayout:i,sectionSettingUpdate:a,page:s}=t,[l]=N.useState([]),{schemaBuilderUpdate:c,formBuilderFormSchema:u}=ln(),d=(E,C)=>{const _=`${E.className} justify-content-start`,T=`${E.titleClassName} pl-1`;return o.jsxs("div",{className:_,children:[o.jsx(kt,{text:!0,icon:"pi pi-trash",className:E.togglerClassName,onClick:()=>f(C),"aria-label":"Submit"}),o.jsx("span",{className:T,children:`Rule ${C+1}`})]})},f=E=>{var O;const C=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],_=C[E];(O=_==null?void 0:_.conditions)==null||O.map(F=>{var z;const B=Et.findIndex(i,P=>{var H;return(P==null?void 0:P.uuid)===((H=F==null?void 0:F.tab)==null?void 0:H.uuid)}),M=i?Et.findIndex(i[B].children,P=>{var H;return(P==null?void 0:P.uuid)===((H=F==null?void 0:F.section)==null?void 0:H.uuid)}):-1;if(M>=0){const P=(z=i[B])==null?void 0:z.children[M];P&&(P.isHidden=!1,a(B,M,P))}});const T=C.filter((F,B)=>E!==B);n(F=>({...F,conditionalSectionRules:{...F.conditionalSectionRules,rules:T}}))},h=E=>{var T;let C=!1;const _=i?i.filter(function(O){return(O==null?void 0:O.uuid)===(E==null?void 0:E.uuid)}):[];return(_==null?void 0:_.length)>0&&((T=_[0].children)==null?void 0:T.length)>1&&(C=!0),C},m=(E,C,_)=>{const T=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];T[C].conditions[_].option=E==null?void 0:E.value,n(O=>({...O,conditionalSectionRules:{...O.conditionalSectionRules,rules:T}}))},g=(E,C)=>{var O;const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],T=_[E];(O=T==null?void 0:T.conditions)==null||O.map(F=>{var P;const B=Et.findIndex(i,H=>{var de;return(H==null?void 0:H.uuid)===((de=F==null?void 0:F.tab)==null?void 0:de.uuid)}),M=i?Et.findIndex(i[B].children,H=>{var de;return(H==null?void 0:H.uuid)===((de=F==null?void 0:F.section)==null?void 0:de.uuid)}):-1,z=(P=i[B])==null?void 0:P.children[M];console.log("sectionData",z),z&&(z.isHidden=!1,console.log("sectionData",z),a(B,M,z))}),_[E].conditions=_[E].conditions.filter((F,B)=>C!==B),n(F=>({...F,conditionalSectionRules:{...F.conditionalSectionRules,rules:_}}))},v=(E,C,_)=>{var z,P;const T=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];T[C].conditions[_].section=E==null?void 0:E.value;const O=(P=(z=T[C].conditions[_])==null?void 0:z.tab)==null?void 0:P.uuid,F=Et.findIndex(i,H=>(H==null?void 0:H.uuid)===O);n(H=>({...H,conditionalSectionRules:{...H.conditionalSectionRules,rules:T}}));const B=i?Et.findIndex(i[F].children,H=>{var de;return(H==null?void 0:H.uuid)===((de=E==null?void 0:E.value)==null?void 0:de.uuid)}):-1,M=i[F].children[B];M&&(M.isHidden=!0,a(F,B,M))},A=E=>{const C=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];C[E].conditions=[...C[E].conditions,{option:null,tab:{title:s==null?void 0:s.title,uuid:s==null?void 0:s.uuid},section:null}],n(_=>({..._,conditionalSectionRules:{..._.conditionalSectionRules,rules:C}}))},w=()=>{n(C=>({...C,conditionalSectionRules:{...C.conditionalSectionRules,rules:[...C.conditionalSectionRules.rules,{uuid:tt(),conditions:[]}]}}));const E=[...(u==null?void 0:u.conditionalSectionsRules)||[]];c({conditionalSectionsRules:[...E,{fieldId:e==null?void 0:e.uuid,uuid:tt(),conditions:[]}]})},x=E=>{var _;const C=i==null?void 0:i.filter(function(T){return(T==null?void 0:T.uuid)===(E==null?void 0:E.uuid)});if(C&&(C==null?void 0:C.length)>0){const T=(_=C[0])==null?void 0:_.children.filter(function(O){return(O==null?void 0:O.uuid)!==(r==null?void 0:r.uuid)});if((T==null?void 0:T.length)>0)return T}return l};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Sections"}),(S=e==null?void 0:e.conditionalSectionRules)==null?void 0:S.rules.map((E,C)=>o.jsx(hi,{className:"mb-3",header:`Rule ${C+1}`,headerTemplate:_=>d(_,C),children:o.jsxs("div",{children:[E==null?void 0:E.conditions.map((_,T)=>{var O,F;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:(F=(O=_==null?void 0:_.tab)==null?void 0:O.title)==null?void 0:F.english})]}),o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsxs("label",{children:["Select section",_.value]}),o.jsx(xa,{disabled:!h(_==null?void 0:_.tab),value:_.section,options:x(_.tab),onChange:B=>v(B,C,T),optionLabel:"heading.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-4 p-fluid",children:["when option is selected",o.jsx(xa,{disabled:!h(_==null?void 0:_.tab),value:_==null?void 0:_.option,options:e==null?void 0:e.options,onChange:B=>m(B,C,T),optionLabel:"optionText.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-1",children:[o.jsx("br",{}),o.jsx(kt,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>g(C,T),tooltipOptions:{position:"top"}})]}),!h(_.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"]})})]})},T)}),o.jsx("div",{children:o.jsx("div",{className:"flex",children:o.jsx(kt,{text:!0,className:"btn-sm mt-3 ",label:"+ Add Condition",onClick:()=>A(C),size:"small"})})})]})},C)),o.jsx(kt,{text:!0,icon:"pi pi-plus",onClick:()=>w(),className:"p-mt-4",label:"Add Rule",size:"small"})]})},Zde=t=>{var u;const{fieldState:e,setFieldState:n}=t,r=d=>{var m;const h=[...((m=e==null?void 0:e.inlineConditionalRules)==null?void 0:m.rules)||[]].filter((g,v)=>d!==v);n(g=>({...g,inlineConditionalRules:{...g.inlineConditionalRules,rules:h}}))},i=(d,f)=>{const h=`${d.className} justify-content-start`,m=`${d.titleClassName} pl-1`;return o.jsxs("div",{className:h,children:[o.jsx(kt,{text:!0,icon:"pi pi-trash",className:d.togglerClassName,onClick:()=>r(f),"aria-label":"Submit"}),o.jsx("span",{className:m,children:`Rule ${f+1}`})]})},a=(d,f,h)=>{const m=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];m[f].conditions[h].value=d==null?void 0:d.value,n(g=>({...g,inlineConditionalRules:{...g.inlineConditionalRules,rules:m}}))},s=(d,f)=>{const h=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];h[d].conditions=h[d].conditions.filter((m,g)=>f!==g),n(m=>({...m,inlineConditionalRules:{...m.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(hi,{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,m)=>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(xa,{value:h.value,options:e==null?void 0:e.options,onChange:g=>a(g,f,m),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(kt,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>s(f,m),tooltipOptions:{position:"top"}})})]})},"inline-rules-"+m)),o.jsx(kt,{text:!0,onClick:()=>l(f),className:"p-mt-4",icon:"pi pi-plus",label:"Add Condition",size:"small"})]})},f)),o.jsx(kt,{text:!0,onClick:()=>c(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"})]})},e0e=t=>{const{fieldState:e,pageIndex:n,section:r,setFieldState:i,page:a}=t,{pageSettingUpdate:s,formBuilderFormLayout:l,sectionSettingUpdate:c}=ln();return o.jsx(o.Fragment,{children:o.jsxs("div",{className:" scroll-height-250",children:[o.jsx(Zde,{fieldState:e,setFieldState:i}),o.jsx("hr",{}),o.jsx(Qde,{fieldState:e,setFieldState:i,pageIndex:n,formBuilderFormLayout:l,pageSettingUpdate:s}),o.jsx("hr",{}),o.jsx(Jde,{fieldState:e,setFieldState:i,section:r,formBuilderFormLayout:l,sectionSettingUpdate:c,page:a}),o.jsx("hr",{})]})})},t0e=t=>{const{fieldState:e,setFieldState:n}=t,[r,i]=N.useState(""),[a,s]=N.useState([""]),[l,c]=N.useState(!1),[u,d]=N.useState(0),[f,h]=N.useState(!1),{updateGlobalToast:m}=tn(),g=()=>{h(!0)},v=()=>{var H;const z=((H=e==null?void 0:e.reviewerChecklist)==null?void 0:H.length)>=0?[...e.reviewerChecklist]:[];z.push({uuid:tt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const P={...e,reviewerChecklist:z};n(de=>({...de,...P})),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},w=z=>{const P=[...e.reviewerChecklist];P.splice(z,1);const H={...e,reviewerChecklist:P};n(de=>({...de,...H}))},x=(z,P)=>{c(!0);const{checklist:H,action:de}=z;h(!0),d(P),setTimeout(()=>{i(H),s(de)},1e3)},S=(z,P)=>o.jsxs(o.Fragment,{children:[o.jsx(kt,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>x(z,P==null?void 0:P.rowIndex)}),o.jsx(kt,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>w(P==null?void 0:P.rowIndex)})]}),E=z=>{var P;return o.jsx(o.Fragment,{children:(P=z==null?void 0:z.action)==null?void 0:P.length})},C=z=>{const P=[...a];P.splice(z,1),s(P)},_=()=>{const z=[...e.reviewerChecklist];z[u]={checklist:r,action:a};const P={...e,reviewerChecklist:z};n(H=>({...H,...P})),h(!1),c(!1)},T=()=>o.jsx("div",{children:l?o.jsx(kt,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{_()}}):o.jsx(kt,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{v()}})}),O=z=>{n(P=>({...P,reviewerChecklist:z==null?void 0:z.value}))},F=z=>{navigator.clipboard.writeText(JSON.stringify(z))};function B(z){try{JSON.parse(z)}catch{return!1}return!0}const M=async()=>{var H;const z=await navigator.clipboard.readText();let P="";if(B(z)){const de=JSON.parse(z);if((H=de[0])!=null&&H.checklist){const fe={...Et.cloneDeep(e),reviewerChecklist:de};n(ne=>({...ne,...fe}));return}else P="Empty or Invalid Schema"}else P="Invalid Schema";m({showToast:!0,toastMessage:P,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsx(As,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:T(),children:o.jsxs("div",{className:"scroll-height-500",children:[o.jsx("h5",{children:"Checklist"}),o.jsx(Ds,{rows:2,cols:50,value:r,onChange:z=>{var P;i((P=z==null?void 0:z.target)==null?void 0:P.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map((z,P)=>o.jsxs("div",{children:[P+1,"."," ",o.jsx(Ds,{value:z,onChange:H=>{var fe;const de=[...a];de[P]=(fe=H==null?void 0:H.target)==null?void 0:fe.value,s(de)},rows:2,cols:50})," ",o.jsx(kt,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>C(P)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${P}`)),o.jsx(kt,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(kt,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{g()}}),o.jsx(kt,{text:!0,label:"Copy Schema ",onClick:()=>{F([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(kt,{text:!0,label:"Paste Checklist ",onClick:()=>{M()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(Hs,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:O,scrollable:!0,children:[o.jsx(fr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(fr,{field:"checklist",header:"Checklist"}),o.jsx(fr,{field:"actions",header:"Actions",body:z=>E(z)}),o.jsx(fr,{header:"",body:(z,P)=>S(z,P)})]})})]})},n0e=t=>{const{onHandleChangeLayoutSettings:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{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(rn,{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(Or,{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(rn,{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(Or,{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(rn,{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(Or,{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(rn,{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(Or,{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(rn,{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(Or,{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(rn,{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(Or,{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(rn,{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}})]})]})},r0e=t=>{var c,u,d;const{fieldState:e,setFieldState:n}=t,{formBuilderSchemaLanguages:r}=ln(),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(m=>({...m,[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(Zi,{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(Zi,{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(Zi,{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(Zi,{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(xa,{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(xa,{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(ao,{activeIndex:0,children:r!=null&&r.length?r.map((f,h)=>o.jsx(io,{tabIndex:h,header:f==null?void 0:f.language,children:o.jsx(hF,{enableCopyPaste:!0,isCustomValue:!0,fieldState:e,setFieldState:n,language:f})},h)):""})}),o.jsx(kt,{text:!0,className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>i(),"aria-label":"Add"})]})})]})},i0e=t=>{var u,d;const{option:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t,{userSelectedLanguage:s}=ln(),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 m;return o.jsxs("div",{onClick:f.onClick,className:f.className,children:[o.jsx("span",{children:f.titleElement}),e.children&&((m=e.children)==null?void 0:m.length)>1&&o.jsx(kt,{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(Or,{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(kt,{text:!0,label:"Add Field",onClick:()=>{i(e==null?void 0:e.uuid)}}),o.jsx(Ka,{children:((u=e.children)==null?void 0:u.length)&&((d=e.children)==null?void 0:d.map((f,h)=>{var m,g;return o.jsx(hr,{header:(m=f.label)==null?void 0:m[s==null?void 0:s.type],headerTemplate:v=>c(v,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(v=>o.jsxs("div",{className:"mr-3",children:[o.jsx(Zi,{inputId:"ingredient1",name:"fieldType",value:v==null?void 0:v.type,onChange:()=>r(f==null?void 0:f.uuid,{type:v==null?void 0:v.type}),checked:(f==null?void 0:f.type)===(v==null?void 0:v.type)}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:v==null?void 0:v.label})]},`field_type_${f==null?void 0:f.uuid}`)))}),o.jsxs("div",{className:"field-checkbox mt-3",children:[o.jsx(Or,{inputId:"isRequired",onChange:v=>{r(f==null?void 0:f.uuid,{attributes:{required:v.checked}})},checked:(g=f==null?void 0:f.attributes)==null?void 0:g.required}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Is Required"," "]})]}),o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx(hi,{header:"Text Settings",toggleable:!0,collapsed:!0,children:o.jsx("div",{className:"",children:o.jsx(cN,{language:s,fieldState:f,onHandleChange:(v,A,w)=>{r(f==null?void 0:f.uuid,{[v]:{[A==null?void 0:A.type]:w}})}})})})}),(f==null?void 0:f.type)==="radio"&&o.jsx(hr,{header:"Radio",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(fb,{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}`)}))})]})]})},fb=t=>{var s,l;const{fieldState:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t;return o.jsx(o.Fragment,{children:o.jsx(Ka,{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(hr,{header:`Option - ${c==null?void 0:c.label}`,children:o.jsx(i0e,{option:c,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})},`hirarchey-option-${u}`)))})})};var mF={},a0e=Ni&&Ni.__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)}}(),e4=Ni&&Ni.__assign||function(){return e4=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},e4.apply(this,arguments)},s0e=Ni&&Ni.__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]}),o0e=Ni&&Ni.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vF=Ni&&Ni.__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)&&s0e(e,t,n);return o0e(e,t),e},l0e=Ni&&Ni.__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},c0e=Ni&&Ni.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mF,"__esModule",{value:!0});var hb=vF(N),u0e=c0e(F_),cd=vF(ia);function bF(t){return t&&t.replace(/ |\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function d0e(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 f0e=function(t){a0e(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}:hb.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=l0e(r,["tagName","html","innerRef"]);return hb.createElement(i||"div",e4(e4({},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||bF(n.html)!==bF(i.innerHTML)?!0:r.disabled!==n.disabled||r.tagName!==n.tagName||r.className!==n.className||r.innerRef!==n.innerRef||r.placeholder!==n.placeholder||!(0,u0e.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,d0e(n))},e.propTypes={html:cd.string.isRequired,onChange:cd.func,disabled:cd.bool,tagName:cd.string,className:cd.string,style:cd.object,innerRef:cd.oneOfType([cd.object,cd.func])},e}(hb.Component),t4=mF.default=f0e;const h0e=t=>{var w;const e=N.useRef(null),{field:n,fieldIndex:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,path:c}=t,[u,d]=N.useState(n),{userSelectedLanguage:f,fieldSettingUpdate:h,fieldSettingUpdateInlineConditional:m,gridComponentFieldSettingUpdate:g}=ln(),v=(x,S,E)=>{d(C=>({...C,[x]:{...C[x],[S==null?void 0:S.type]:E}}))};N.useEffect(()=>(A(),()=>{}),[u]);const A=()=>{const x=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?m(x[la],x[ca],x[ha],x[pa],x[ga],x[Sa],x[$o],x[yo],u):(x==null?void 0:x.length)>Sa&&(x==null?void 0:x.length)===Vl+1&&(n!=null&&n.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?g(x[la],x[ca],x[ha],x[pa],x[ga],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(t4,{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 S;v("label",f,(S=x==null?void 0:x.target)==null?void 0:S.value)},tagName:"article"})})},sa=t=>{const{sectionIndex:e,fieldIndex:n}=t,{formBuilderFormSchema:r}=ln();return(r==null?void 0:r.enableFieldEnumeration)===!0?o.jsx("span",{className:"mr-2",children:o.jsx($O,{classes:"font-medium p-1 bg-primary",level:"purple",value:`${e+1}.${n+1}`})}):o.jsx(o.Fragment,{})},pb=t=>{var u,d,f,h,m,g,v,A,w,x,S,E,C,_;const{field:e,update:n,value:r,isFirst:i}=t,{isPreview:a}=tn(),{userSelectedLanguage:s}=ln(),[l,c]=N.useState(0);return N.useEffect(()=>{const T=Rt.addListener("onSubmitUserForm",()=>{var F;(F=e==null?void 0:e.attributes)!=null&&F.required?r!=null&&r[e.uuid]?e.isValid=1:e.isValid=0:e.isValid=1}),O=Rt.addListener("OnInvalidFieldCatch",F=>{(e==null?void 0:e.uuid)===(F==null?void 0:F.fieldId)?c(1):c(0)});return()=>{T.remove(),O.remove()}}),o.jsxs("div",{className:"ml-3 p-2",children:[(e==null?void 0:e.type)==="radio"&&o.jsxs(o.Fragment,{children:[o.jsxs("h5",{children:[" ",i===!0&&o.jsx(sa,{...t}),((u=e==null?void 0:e.attributes)==null?void 0:u.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(o.Fragment,{children:(d=e==null?void 0:e.label)==null?void 0:d[s==null?void 0:s.type]}):o.jsx(h0e,{...t})]}),((f=e==null?void 0:e.options)==null?void 0:f.length)&&((h=e==null?void 0:e.options)==null?void 0:h.map(T=>{var O,F;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex align-items-center mb-2",children:[o.jsx(Zi,{inputId:T.uuid,name:e==null?void 0:e.uuid,value:T.uuid,onChange:B=>n(e==null?void 0:e.uuid,B==null?void 0:B.value),checked:(r==null?void 0:r[e.uuid])===T.uuid}),o.jsx("label",{htmlFor:T.uuid,className:"ml-2",children:T.label})]}),(T==null?void 0:T.enableConditionalField)===!0&&(r==null?void 0:r[e==null?void 0:e.uuid])===(T==null?void 0:T.uuid)&&(T==null?void 0:T.children)&&((O=T==null?void 0:T.children)==null?void 0:O.length)>0&&((F=T==null?void 0:T.children)==null?void 0:F.map(()=>o.jsx(pb,{...t},`radio_child_${r==null?void 0:r[e==null?void 0:e.uuid]}`)))]},`${T.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:[" ",((m=e==null?void 0:e.attributes)==null?void 0:m.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[s==null?void 0:s.type]]}),o.jsx(gn,{className:"mt-2",onChange:T=>{var O;return n(e==null?void 0:e.uuid,(O=T==null?void 0:T.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(g=e==null?void 0:e.placeholder)==null?void 0:g[s==null?void 0:s.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:[" ",((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[s==null?void 0:s.type]]}),o.jsx(W1,{className:"mt-2",onChange:T=>{var O;return n(e==null?void 0:e.uuid,(O=T==null?void 0:T.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(A=e==null?void 0:e.placeholder)==null?void 0:A[s==null?void 0:s.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:[" ",((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[s==null?void 0:s.type]]}),o.jsx(Ds,{className:"mt-2",onChange:T=>{var O;return n(e==null?void 0:e.uuid,(O=T==null?void 0:T.target)==null?void 0:O.value)},value:r==null?void 0:r.uuid,placeholder:(x=e==null?void 0:e.placeholder)==null?void 0:x[s==null?void 0:s.type]})]})}),o.jsx("div",{children:((S=e==null?void 0:e.helperText)==null?void 0:S[s==null?void 0:s.type])!==""&&o.jsx("small",{children:(E=e==null?void 0:e.helperText)==null?void 0:E[s==null?void 0:s.type]})}),o.jsx("div",{children:((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("small",{className:"error",children:l===1&&!(r!=null&&r[e.uuid])?(_=e==null?void 0:e.validationMesssage)==null?void 0:_.language:""})})]},`${e==null?void 0:e.uuid}-radio`)},p0e=t=>{const{hirarechicalRadioSchemaState:e}=t,[n,r]=N.useState({});return o.jsx("div",{children:o.jsx(pb,{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:""})})},gb={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},g0e={uuid:tt(),...gb,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(),...gb,options:(tt(),{uuid:tt(),...gb,options:(tt(),tt())},tt())});const m0e=t=>{const{fieldState:e,setFieldState:n}=t,r=(f,h,m)=>m==null?void 0:m.map(g=>{var v;return g.uuid===f?{...g,...h}:{...g,children:g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0?[...g.children.map(A=>A.type==="radio"?{...A,options:r(f,h,(A==null?void 0:A.options)||[])}:{...A})]:[]}}),i=(f,h,m)=>{const g=r(f,m,e.options);n(v=>({...v,options:g}))},a=(f,h,m)=>m==null?void 0:m.map(g=>{var v;return{...g,children:g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0?[...g.children.map(A=>A.uuid===f?{...A,...h}:{...A,options:a(f,h,A==null?void 0:A.options)})]:[]}}),s=(f,h)=>{const m=a(f,h,e.options);n(g=>({...g,options:m}))},l=(f,h)=>h==null?void 0:h.map(m=>{var g;return{...m,children:m!=null&&m.children&&((g=m==null?void 0:m.children)==null?void 0:g.length)>0?[...m.children.filter(v=>{if(v.uuid!==f)return{...v,options:l(f,v==null?void 0:v.options)}})]:[]}}),c=(f,h,m)=>m==null?void 0:m.map(g=>{var v;return g.children&&g.uuid===f?{...g,children:[...g.children,h]}:{...g,children:g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0?[...g.children.map(A=>({...A,options:c(f,h,A==null?void 0:A.options)}))]:[]}}),u=f=>{const h=c(f,{...g0e,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(m=>({...m,options:h}))},d=f=>{const h=l(f,e.options);n(m=>({...m,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(fb,{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(p0e,{hirarechicalRadioSchemaState:e})]})]})})})},Ri=t=>{var pe,ie;const{formBuilderFormSchema:e,fieldSettingUpdate:n,fieldSettingUpdateInlineConditional:r,formBuilderSchemaLanguages:i,pageSettingUpdate:a,formBuilderFormLayout:s,formBuilderPublishedStatus:l,gridComponentFieldSettingUpdate:c}=ln(),{renderType:u}=tn(),{visibilty:d,field:f,closeSettingFieldSidebar:h,pageIndex:m,sectionIndex:g,rowIndex:v,columnIndex:A,fieldIndex:w,path:x,row:S}=t,[E,C]=N.useState(f),_=x.split("-"),T=()=>{const J=x.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?r(J[la],J[ca],J[ha],J[pa],J[ga],J[Sa],J[$o],J[yo],E):(J==null?void 0:J.length)>Sa&&(J==null?void 0:J.length)===Vl+1&&(E!=null&&E.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?c(J[la],J[ca],J[ha],J[pa],J[ga],J[5],J[6],J[7],E):(n(m,g,v,A,w,E),setTimeout(()=>{Rt.emit("OnSignatureSettingChange",{})},1e3),setTimeout(()=>{Rt.emit("onUpdateField",{})},1e3))},O=(J,Q,oe)=>{C(ye=>({...ye,[J]:{...ye[J],[Q==null?void 0:Q.type]:oe}}))},F=(J,Q)=>{C(oe=>({...oe,attributes:{...oe.attributes,[J]:Q}}))},B=(J,Q)=>{C(oe=>({...oe,[J]:Q}))},M=(J,Q)=>{C(oe=>({...oe,inlineConditional:{...oe.inlineConditional,[J]:Q}}))},z=()=>{},P=()=>{C(J=>({...J,data:[...J.data,{uuid:tt(),dataKey:"",value:""}]}))},H=()=>{C(J=>Object.assign({},J,{options:[...J.options,{uuid:tt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},de=()=>{},fe=()=>{},ne=()=>{},W=()=>{},ae=J=>{var Te;const Q=[...(E==null?void 0:E.conditionalTabRules.rules)||[]],oe=Q.filter((Ae,be)=>J!==be);C(Ae=>({...Ae,conditionalTabRules:{...Ae.conditionalTabRules,rules:oe}}));const ye=Q[J];(Te=ye==null?void 0:ye.conditions)==null||Te.map(Ae=>{const be=Et.findIndex(s,re=>{var U;return(re==null?void 0:re.uuid)===((U=Ae==null?void 0:Ae.tab)==null?void 0:U.uuid)}),we=s[be];we&&(we.isHidden=!1,a(be,we))})},Y=(J,Q)=>{const oe=[...(E==null?void 0:E.conditionalTabRules.rules)||[]];oe[J].conditions=oe[J].conditions.filter((ye,Te)=>Q!==Te),C(ye=>({...ye,conditionalTabRules:{...ye.conditionalTabRules,rules:oe}}))};return o.jsx(o.Fragment,{children:o.jsxs(Io,{style:{width:"60vw"},visible:d,position:"left",className:"p-sidebar-lg",onHide:()=>h(),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",{className:"mb-0",children:[t==null?void 0:t.typeName," Settings - ",(pe=f==null?void 0:f.label)==null?void 0:pe.english," "]})]}),!l&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(kt,{className:"mt-3",label:"Update",onClick:()=>T(),"aria-label":"Update"})})]}),o.jsx("div",{className:" mt-4",children:o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(ao,{activeIndex:0,children:i!=null&&i.length?i.map((J,Q)=>o.jsx(io,{tabIndex:Q,header:J==null?void 0:J.language,children:o.jsx(cN,{language:J,fieldState:E,onHandleChange:O,...t})},Q)):""})})}),(E==null?void 0:E.isValidationTabEnabled)===!0&&o.jsx(hr,{header:"Validation",children:o.jsx(Doe,{fieldState:E,onHandleChangeLayoutSettings:B,onHandleChangeAttributesSetttings:F,...t})}),o.jsx(hr,{header:"Attributes",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Ooe,{fieldState:E,onHandleChangeLayoutSettings:B,onHandleChangeAttributesSetttings:F})})}),(E==null?void 0:E.isLayoutTabEnabled)===!0&&o.jsx(hr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Foe,{fieldState:E,onHandleChangeLayoutSettings:B})})}),(E==null?void 0:E.isDynamicListingTabEnabled)===!0&&o.jsx(hr,{header:"Dynamic Options",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(r0e,{fieldState:E,setFieldState:C})})}),(E==null?void 0:E.options)!==void 0&&(E==null?void 0:E.data)&&o.jsx(hr,{header:"Data",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(koe,{onHandleChangeLayoutSettings:B,fieldState:E,setFieldState:C}),o.jsx(kt,{className:"mr-3",label:"Data Option",icon:"pi pi-plus",onClick:()=>P(),"aria-label":"Add"})]})}),o.jsx(hr,{header:"Table view options",children:o.jsx(n0e,{fieldState:E,onHandleChangeLayoutSettings:B})}),(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(hr,{header:"Options",children:[(E==null?void 0:E.componentType)!=="radio-hierarchal"&&o.jsx("div",{className:"flex justify-content-end",children:o.jsx(kt,{className:"mr-3 mb-2",label:"Option",icon:"pi pi-plus",onClick:()=>H(),"aria-label":"Option"})}),o.jsxs("div",{className:"scroll-height-200 px-4",children:[o.jsx(ao,{activeIndex:0,children:i!=null&&i.length?i.map((J,Q)=>o.jsx(io,{tabIndex:Q,header:J==null?void 0:J.language,children:o.jsx(hF,{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:C,language:J})},Q)):""}),(E==null?void 0:E.isHierarchalCondionalTabEnabled)===!0&&o.jsx(fb,{fieldState:E,onHandleChangeLayoutSettings:B,removeChildrenField:W,addChildrenField:ne,updateChildrenField:fe,updateCondtionOption:de})]})]}),(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(hr,{header:"Hierarchal Options",children:o.jsx(m0e,{fieldState:E,setFieldState:C})}),u===O7&&(E==null?void 0:E.inlineConditionalRules)!==void 0&&!(S!=null&&S.rowIsRepeatable)&&(_==null?void 0:_.length)<yo+1&&o.jsx(hr,{header:"Conditional",children:o.jsx(e0e,{handleRemoveConditionalTabRule:ae,handleRemoveConditionalTabRuleCondition:Y,onHandleSelectInlineConditionalOption:z,onHandleChangeLayoutSettings:B,onHandleChangeInlineConditionaltSetttings:M,fieldState:E,setFieldState:C,pageIndex:m,sectionIndex:g,...t})}),!((ie=t==null?void 0:t.row)!=null&&ie.rowIsRepeatable)&&(e==null?void 0:e.enableReviewTask)===!0&&o.jsx(hr,{header:"Admin",children:o.jsx(t0e,{fieldState:E,setFieldState:C})})]})})]})})},Fi=t=>{const[e,n]=N.useState(null),{field:r}=t,{userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Pr();N.useEffect(()=>{var h,m;if(i!==null&&e===null){let g=0;r!=null&&r.rowIsRepeatable?g=i.findIndex(v=>(v==null?void 0:v.rowId)===(r==null?void 0:r.uuid)):g=i.findIndex(v=>(v==null?void 0:v.fieldId)===(r==null?void 0:r.uuid)),n((h=i[g])!=null&&h.reviewerChecklist?(m=i[g])==null?void 0:m.reviewerChecklist:[])}return()=>{}},[r==null?void 0:r.rowIsRepeatable,r==null?void 0:r.uuid,e,i]);const s=h=>{const m=i.findIndex(v=>(v==null?void 0:v.fieldId)===(r==null?void 0:r.uuid)),g=[...i];g[m]={...g[m],reviewerChecklist:h},a(g)},l=(h,m)=>{const g=e;g[m]={...g[m],agree:h==null?void 0:h.value},n([...g]),s(g)},c=(h,m)=>{const g=e;if(m!=null&&m.checked)g[h].selectAction.push(m==null?void 0:m.value);else{const v=g[h].selectAction.findIndex(A=>A===(m==null?void 0:m.value));g[h].selectAction.splice(v,1)}n([...g]),s(g)},u=(h,m)=>{const g=e;h!=null&&h.checked?g[m]={...g[m],other:{...g[m].other,isOther:!0}}:g[m]={...g[m],other:{...g[m].other,isOther:!1}},n([...g]),s(g)},d=(h,m)=>{var v;const g=e;g[m]={...g[m],other:{...g[m].other,description:(v=h==null?void 0:h.target)==null?void 0:v.value}},n([...g]),s(g)},f=(h,m,g)=>{var A;const v=e;v[g]={...v[g],[m]:(A=h==null?void 0:h.target)==null?void 0:A.value},n([...v]),s(v)};return o.jsx(o.Fragment,{children:o.jsx("div",{className:"col-12",children:o.jsx(Ka,{children:o.jsx(hr,{header:"Admin Review",children:o.jsx("div",{className:"grid",children:e!==null&&(e==null?void 0:e.length)>0&&(e==null?void 0:e.map((h,m)=>{var g,v,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(Zi,{inputId:`yes-${m}`,name:"action",value:!0,onChange:S=>{l(S,m)},checked:(h==null?void 0:h.agree)===!0}),o.jsx("label",{htmlFor:`yes-${m}`,children:"Yes"})]}),o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Zi,{inputId:`no-${m}`,name:"action",value:!1,onChange:S=>{l(S,m)},checked:(h==null?void 0:h.agree)===!1}),o.jsx("label",{htmlFor:`no-${m}`,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)&&((g=h==null?void 0:h.action)==null?void 0:g.length)>0&&((v=h==null?void 0:h.action)==null?void 0:v.map((S,E)=>{var C;return o.jsxs("div",{children:[o.jsx(Or,{value:S,checked:((C=h==null?void 0:h.selectAction)==null?void 0:C.length)>0?h==null?void 0:h.selectAction.some(_=>_===S):!1,onChange:_=>{c(m,_)}})," ",S," ",o.jsx("br",{}),o.jsx("br",{})]},`action-${m}-${E}`)})),o.jsx(Or,{checked:(A=h==null?void 0:h.other)==null?void 0:A.isOther,onChange:S=>{u(S,m)}})," 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(Ds,{className:"mt-3",value:(x=h==null?void 0:h.other)==null?void 0:x.description,onChange:S=>d(S,m)})]})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Feedback "}),o.jsx("br",{}),o.jsx(Ds,{className:"mt-3",value:h==null?void 0:h.reviewerFeedback,onChange:S=>f(S,"reviewerFeedback",m)})]}),o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Comments / Notes (internal use only)"}),o.jsx("br",{}),o.jsx(Ds,{className:"mt-3",value:h==null?void 0:h.reviewerComments,onChange:S=>f(S,"reviewerComments",m)})]})]})},`checklistIndex-${m}`)}))})})})})})},wi=t=>{const{isPreview:e,field:n,isAdmin:r,fieldWrap:i}=t,{userSelectedLanguage:a}=ln(),{globalAlignment:s}=tn(),l=m=>{const g=m.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",v=`${m.className} justify-content-start`,A=`${m.titleClassName} pl-1`;return o.jsxs("div",{className:v,children:[o.jsxs("button",{className:m.togglerClassName,onClick:m.onTogglerClick,children:[o.jsx("span",{className:g}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:d})]})},{TASK_PUBLISHED:c,task_status:u}=Pr(),[d,f]=N.useState("");N.useEffect(()=>{var m;f((m=n==null?void 0:n.label)==null?void 0:m[a==null?void 0:a.type])},[n,a==null?void 0:a.type]);const h=()=>{let m="";return e||(m=m+" field-form-builder"),u===c&&r===!0&&(m=m+" card"),m};return o.jsx(o.Fragment,{children:o.jsx("div",{dir:s,className:h(),children:u===c&&r===!0?o.jsx(hi,{headerTemplate:l,toggleable:!0,children:i}):i})})};/*! @license DOMPurify 3.1.5 | (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.5/LICENSE */const{entries:yF,setPrototypeOf:AF,isFrozen:v0e,getPrototypeOf:b0e,getOwnPropertyDescriptor:y0e}=Object;let{freeze:_o,seal:Kl,create:wF}=Object,{apply:mb,construct:vb}=typeof Reflect<"u"&&Reflect;_o||(_o=function(e){return e}),Kl||(Kl=function(e){return e}),mb||(mb=function(e,n,r){return e.apply(n,r)}),vb||(vb=function(e,n){return new e(...n)});const n4=gl(Array.prototype.forEach),SF=gl(Array.prototype.pop),v2=gl(Array.prototype.push),r4=gl(String.prototype.toLowerCase),bb=gl(String.prototype.toString),xF=gl(String.prototype.match),b2=gl(String.prototype.replace),A0e=gl(String.prototype.indexOf),w0e=gl(String.prototype.trim),Ic=gl(Object.prototype.hasOwnProperty),Do=gl(RegExp.prototype.test),y2=S0e(TypeError);function gl(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 mb(t,e,r)}}function S0e(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return vb(t,n)}}function pi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r4;AF&&AF(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const a=n(i);a!==i&&(v0e(e)||(e[r]=a),i=a)}t[i]=!0}return t}function x0e(t){for(let e=0;e<t.length;e++)Ic(t,e)||(t[e]=null);return t}function r1(t){const e=wF(null);for(const[n,r]of yF(t))Ic(t,n)&&(Array.isArray(r)?e[n]=x0e(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=r1(r):e[n]=r);return e}function i4(t,e){for(;t!==null;){const r=y0e(t,e);if(r){if(r.get)return gl(r.get);if(typeof r.value=="function")return gl(r.value)}t=b0e(t)}function n(){return null}return n}const CF=_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"]),yb=_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"]),Ab=_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"]),C0e=_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"]),wb=_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"]),T0e=_o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),TF=_o(["#text"]),EF=_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"]),Sb=_o(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),IF=_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"]),a4=_o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),E0e=Kl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),I0e=Kl(/<%[\w\W]*|[\w\W]*%>/gm),_0e=Kl(/\${[\w\W]*}/gm),D0e=Kl(/^data-[\-\w.\u00B7-\uFFFF]/),O0e=Kl(/^aria-[\-\w]+$/),_F=Kl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),N0e=Kl(/^(?:\w+script|data):/i),F0e=Kl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DF=Kl(/^html$/i),k0e=Kl(/^[a-z][.\w]*(-[.\w]+)+$/i);var OF=Object.freeze({__proto__:null,MUSTACHE_EXPR:E0e,ERB_EXPR:I0e,TMPLIT_EXPR:_0e,DATA_ATTR:D0e,ARIA_ATTR:O0e,IS_ALLOWED_URI:_F,IS_SCRIPT_OR_DATA:N0e,ATTR_WHITESPACE:F0e,DOCTYPE_NAME:DF,CUSTOM_ELEMENT:k0e});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},P0e=function(){return typeof window>"u"?null:window},M0e=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 NF(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:P0e();const e=Ke=>NF(Ke);if(e.version="3.1.5",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:m}=t,g=c.prototype,v=i4(g,"cloneNode"),A=i4(g,"nextSibling"),w=i4(g,"childNodes"),x=i4(g,"parentNode");if(typeof s=="function"){const Ke=n.createElement("template");Ke.content&&Ke.content.ownerDocument&&(n=Ke.content.ownerDocument)}let S,E="";const{implementation:C,createNodeIterator:_,createDocumentFragment:T,getElementsByTagName:O}=n,{importNode:F}=r;let B={};e.isSupported=typeof yF=="function"&&typeof x=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:z,TMPLIT_EXPR:P,DATA_ATTR:H,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:W}=OF;let{IS_ALLOWED_URI:ae}=OF,Y=null;const pe=pi({},[...CF,...yb,...Ab,...wb,...TF]);let ie=null;const J=pi({},[...EF,...Sb,...IF,...a4]);let Q=Object.seal(wF(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}})),oe=null,ye=null,Te=!0,Ae=!0,be=!1,we=!0,re=!1,U=!0,Z=!1,K=!1,he=!1,_e=!1,ge=!1,ve=!1,Le=!0,Ne=!1;const me="user-content-";let V=!0,te=!1,X={},se=null;const ue=pi({},["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 Se=null;const De=pi({},["audio","video","img","source","image","track"]);let je=null;const ct=pi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Dt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let rt=xt,mt=!1,Ot=null;const $e=pi({},[Dt,nt,xt],bb);let St=null;const Kt=["application/xhtml+xml","text/html"],An="text/html";let yn=null,vn=null;const On=n.createElement("form"),Jn=function(Oe){return Oe instanceof RegExp||Oe instanceof Function},Cn=function(){let Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(vn&&vn===Oe)){if((!Oe||typeof Oe!="object")&&(Oe={}),Oe=r1(Oe),St=Kt.indexOf(Oe.PARSER_MEDIA_TYPE)===-1?An:Oe.PARSER_MEDIA_TYPE,yn=St==="application/xhtml+xml"?bb:r4,Y=Ic(Oe,"ALLOWED_TAGS")?pi({},Oe.ALLOWED_TAGS,yn):pe,ie=Ic(Oe,"ALLOWED_ATTR")?pi({},Oe.ALLOWED_ATTR,yn):J,Ot=Ic(Oe,"ALLOWED_NAMESPACES")?pi({},Oe.ALLOWED_NAMESPACES,bb):$e,je=Ic(Oe,"ADD_URI_SAFE_ATTR")?pi(r1(ct),Oe.ADD_URI_SAFE_ATTR,yn):ct,Se=Ic(Oe,"ADD_DATA_URI_TAGS")?pi(r1(De),Oe.ADD_DATA_URI_TAGS,yn):De,se=Ic(Oe,"FORBID_CONTENTS")?pi({},Oe.FORBID_CONTENTS,yn):ue,oe=Ic(Oe,"FORBID_TAGS")?pi({},Oe.FORBID_TAGS,yn):{},ye=Ic(Oe,"FORBID_ATTR")?pi({},Oe.FORBID_ATTR,yn):{},X=Ic(Oe,"USE_PROFILES")?Oe.USE_PROFILES:!1,Te=Oe.ALLOW_ARIA_ATTR!==!1,Ae=Oe.ALLOW_DATA_ATTR!==!1,be=Oe.ALLOW_UNKNOWN_PROTOCOLS||!1,we=Oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,re=Oe.SAFE_FOR_TEMPLATES||!1,U=Oe.SAFE_FOR_XML!==!1,Z=Oe.WHOLE_DOCUMENT||!1,_e=Oe.RETURN_DOM||!1,ge=Oe.RETURN_DOM_FRAGMENT||!1,ve=Oe.RETURN_TRUSTED_TYPE||!1,he=Oe.FORCE_BODY||!1,Le=Oe.SANITIZE_DOM!==!1,Ne=Oe.SANITIZE_NAMED_PROPS||!1,V=Oe.KEEP_CONTENT!==!1,te=Oe.IN_PLACE||!1,ae=Oe.ALLOWED_URI_REGEXP||_F,rt=Oe.NAMESPACE||xt,Q=Oe.CUSTOM_ELEMENT_HANDLING||{},Oe.CUSTOM_ELEMENT_HANDLING&&Jn(Oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=Oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Oe.CUSTOM_ELEMENT_HANDLING&&Jn(Oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=Oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Oe.CUSTOM_ELEMENT_HANDLING&&typeof Oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=Oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),re&&(Ae=!1),ge&&(_e=!0),X&&(Y=pi({},TF),ie=[],X.html===!0&&(pi(Y,CF),pi(ie,EF)),X.svg===!0&&(pi(Y,yb),pi(ie,Sb),pi(ie,a4)),X.svgFilters===!0&&(pi(Y,Ab),pi(ie,Sb),pi(ie,a4)),X.mathMl===!0&&(pi(Y,wb),pi(ie,IF),pi(ie,a4))),Oe.ADD_TAGS&&(Y===pe&&(Y=r1(Y)),pi(Y,Oe.ADD_TAGS,yn)),Oe.ADD_ATTR&&(ie===J&&(ie=r1(ie)),pi(ie,Oe.ADD_ATTR,yn)),Oe.ADD_URI_SAFE_ATTR&&pi(je,Oe.ADD_URI_SAFE_ATTR,yn),Oe.FORBID_CONTENTS&&(se===ue&&(se=r1(se)),pi(se,Oe.FORBID_CONTENTS,yn)),V&&(Y["#text"]=!0),Z&&pi(Y,["html","head","body"]),Y.table&&(pi(Y,["tbody"]),delete oe.tbody),Oe.TRUSTED_TYPES_POLICY){if(typeof Oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw y2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw y2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=Oe.TRUSTED_TYPES_POLICY,E=S.createHTML("")}else S===void 0&&(S=M0e(m,i)),S!==null&&typeof E=="string"&&(E=S.createHTML(""));_o&&_o(Oe),vn=Oe}},jt=pi({},["mi","mo","mn","ms","mtext"]),st=pi({},["foreignobject","annotation-xml"]),et=pi({},["title","style","font","a","script"]),dt=pi({},[...yb,...Ab,...C0e]),Ht=pi({},[...wb,...T0e]),Tn=function(Oe){let Je=x(Oe);(!Je||!Je.tagName)&&(Je={namespaceURI:rt,tagName:"template"});const ot=r4(Oe.tagName),Lt=r4(Je.tagName);return Ot[Oe.namespaceURI]?Oe.namespaceURI===nt?Je.namespaceURI===xt?ot==="svg":Je.namespaceURI===Dt?ot==="svg"&&(Lt==="annotation-xml"||jt[Lt]):!!dt[ot]:Oe.namespaceURI===Dt?Je.namespaceURI===xt?ot==="math":Je.namespaceURI===nt?ot==="math"&&st[Lt]:!!Ht[ot]:Oe.namespaceURI===xt?Je.namespaceURI===nt&&!st[Lt]||Je.namespaceURI===Dt&&!jt[Lt]?!1:!Ht[ot]&&(et[ot]||!dt[ot]):!!(St==="application/xhtml+xml"&&Ot[Oe.namespaceURI]):!1},kn=function(Oe){v2(e.removed,{element:Oe});try{Oe.parentNode.removeChild(Oe)}catch{Oe.remove()}},Rn=function(Oe,Je){try{v2(e.removed,{attribute:Je.getAttributeNode(Oe),from:Je})}catch{v2(e.removed,{attribute:null,from:Je})}if(Je.removeAttribute(Oe),Oe==="is"&&!ie[Oe])if(_e||ge)try{kn(Je)}catch{}else try{Je.setAttribute(Oe,"")}catch{}},cr=function(Oe){let Je=null,ot=null;if(he)Oe="<remove></remove>"+Oe;else{const ft=xF(Oe,/^[\r\n\t ]+/);ot=ft&&ft[0]}St==="application/xhtml+xml"&&rt===xt&&(Oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Oe+"</body></html>");const Lt=S?S.createHTML(Oe):Oe;if(rt===xt)try{Je=new h().parseFromString(Lt,St)}catch{}if(!Je||!Je.documentElement){Je=C.createDocument(rt,"template",null);try{Je.documentElement.innerHTML=mt?E:Lt}catch{}}const Gt=Je.body||Je.documentElement;return Oe&&ot&&Gt.insertBefore(n.createTextNode(ot),Gt.childNodes[0]||null),rt===xt?O.call(Je,Z?"html":"body")[0]:Z?Je.documentElement:Gt},Zn=function(Oe){return _.call(Oe.ownerDocument||Oe,Oe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},vr=function(Oe){return Oe instanceof f&&(typeof Oe.nodeName!="string"||typeof Oe.textContent!="string"||typeof Oe.removeChild!="function"||!(Oe.attributes instanceof d)||typeof Oe.removeAttribute!="function"||typeof Oe.setAttribute!="function"||typeof Oe.namespaceURI!="string"||typeof Oe.insertBefore!="function"||typeof Oe.hasChildNodes!="function")},Ir=function(Oe){return typeof l=="function"&&Oe instanceof l},dn=function(Oe,Je,ot){B[Oe]&&n4(B[Oe],Lt=>{Lt.call(e,Je,ot,vn)})},lt=function(Oe){let Je=null;if(dn("beforeSanitizeElements",Oe,null),vr(Oe))return kn(Oe),!0;const ot=yn(Oe.nodeName);if(dn("uponSanitizeElement",Oe,{tagName:ot,allowedTags:Y}),Oe.hasChildNodes()&&!Ir(Oe.firstElementChild)&&Do(/<[/\w]/g,Oe.innerHTML)&&Do(/<[/\w]/g,Oe.textContent)||Oe.nodeType===A2.progressingInstruction||U&&Oe.nodeType===A2.comment&&Do(/<[/\w]/g,Oe.data))return kn(Oe),!0;if(!Y[ot]||oe[ot]){if(!oe[ot]&&yt(ot)&&(Q.tagNameCheck instanceof RegExp&&Do(Q.tagNameCheck,ot)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(ot)))return!1;if(V&&!se[ot]){const Lt=x(Oe)||Oe.parentNode,Gt=w(Oe)||Oe.childNodes;if(Gt&&Lt){const ft=Gt.length;for(let Me=ft-1;Me>=0;--Me){const Qe=v(Gt[Me],!0);Qe.__removalCount=(Oe.__removalCount||0)+1,Lt.insertBefore(Qe,A(Oe))}}}return kn(Oe),!0}return Oe instanceof c&&!Tn(Oe)||(ot==="noscript"||ot==="noembed"||ot==="noframes")&&Do(/<\/no(script|embed|frames)/i,Oe.innerHTML)?(kn(Oe),!0):(re&&Oe.nodeType===A2.text&&(Je=Oe.textContent,n4([M,z,P],Lt=>{Je=b2(Je,Lt," ")}),Oe.textContent!==Je&&(v2(e.removed,{element:Oe.cloneNode()}),Oe.textContent=Je)),dn("afterSanitizeElements",Oe,null),!1)},at=function(Oe,Je,ot){if(Le&&(Je==="id"||Je==="name")&&(ot in n||ot in On))return!1;if(!(Ae&&!ye[Je]&&Do(H,Je))){if(!(Te&&Do(de,Je))){if(!ie[Je]||ye[Je]){if(!(yt(Oe)&&(Q.tagNameCheck instanceof RegExp&&Do(Q.tagNameCheck,Oe)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(Oe))&&(Q.attributeNameCheck instanceof RegExp&&Do(Q.attributeNameCheck,Je)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Je))||Je==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Do(Q.tagNameCheck,ot)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(ot))))return!1}else if(!je[Je]){if(!Do(ae,b2(ot,ne,""))){if(!((Je==="src"||Je==="xlink:href"||Je==="href")&&Oe!=="script"&&A0e(ot,"data:")===0&&Se[Oe])){if(!(be&&!Do(fe,b2(ot,ne,"")))){if(ot)return!1}}}}}}return!0},yt=function(Oe){return Oe!=="annotation-xml"&&xF(Oe,W)},Vt=function(Oe){dn("beforeSanitizeAttributes",Oe,null);const{attributes:Je}=Oe;if(!Je)return;const ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie};let Lt=Je.length;for(;Lt--;){const Gt=Je[Lt],{name:ft,namespaceURI:Me,value:Qe}=Gt,Ft=yn(ft);let zt=ft==="value"?Qe:w0e(Qe);if(ot.attrName=Ft,ot.attrValue=zt,ot.keepAttr=!0,ot.forceKeepAttr=void 0,dn("uponSanitizeAttribute",Oe,ot),zt=ot.attrValue,ot.forceKeepAttr||(Rn(ft,Oe),!ot.keepAttr))continue;if(!we&&Do(/\/>/i,zt)){Rn(ft,Oe);continue}if(U&&Do(/((--!?|])>)|<\/(style|title)/i,zt)){Rn(ft,Oe);continue}re&&n4([M,z,P],Pe=>{zt=b2(zt,Pe," ")});const At=yn(Oe.nodeName);if(at(At,Ft,zt)){if(Ne&&(Ft==="id"||Ft==="name")&&(Rn(ft,Oe),zt=me+zt),S&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Me)switch(m.getAttributeType(At,Ft)){case"TrustedHTML":{zt=S.createHTML(zt);break}case"TrustedScriptURL":{zt=S.createScriptURL(zt);break}}try{Me?Oe.setAttributeNS(Me,ft,zt):Oe.setAttribute(ft,zt),vr(Oe)?kn(Oe):SF(e.removed)}catch{}}}dn("afterSanitizeAttributes",Oe,null)},Pt=function Ke(Oe){let Je=null;const ot=Zn(Oe);for(dn("beforeSanitizeShadowDOM",Oe,null);Je=ot.nextNode();)dn("uponSanitizeShadowNode",Je,null),!lt(Je)&&(Je.content instanceof a&&Ke(Je.content),Vt(Je));dn("afterSanitizeShadowDOM",Oe,null)};return e.sanitize=function(Ke){let Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Je=null,ot=null,Lt=null,Gt=null;if(mt=!Ke,mt&&(Ke="<!-->"),typeof Ke!="string"&&!Ir(Ke))if(typeof Ke.toString=="function"){if(Ke=Ke.toString(),typeof Ke!="string")throw y2("dirty is not a string, aborting")}else throw y2("toString is not a function");if(!e.isSupported)return Ke;if(K||Cn(Oe),e.removed=[],typeof Ke=="string"&&(te=!1),te){if(Ke.nodeName){const Qe=yn(Ke.nodeName);if(!Y[Qe]||oe[Qe])throw y2("root node is forbidden and cannot be sanitized in-place")}}else if(Ke instanceof l)Je=cr("<!---->"),ot=Je.ownerDocument.importNode(Ke,!0),ot.nodeType===A2.element&&ot.nodeName==="BODY"||ot.nodeName==="HTML"?Je=ot:Je.appendChild(ot);else{if(!_e&&!re&&!Z&&Ke.indexOf("<")===-1)return S&&ve?S.createHTML(Ke):Ke;if(Je=cr(Ke),!Je)return _e?null:ve?E:""}Je&&he&&kn(Je.firstChild);const ft=Zn(te?Ke:Je);for(;Lt=ft.nextNode();)lt(Lt)||(Lt.content instanceof a&&Pt(Lt.content),Vt(Lt));if(te)return Ke;if(_e){if(ge)for(Gt=T.call(Je.ownerDocument);Je.firstChild;)Gt.appendChild(Je.firstChild);else Gt=Je;return(ie.shadowroot||ie.shadowrootmode)&&(Gt=F.call(r,Gt,!0)),Gt}let Me=Z?Je.outerHTML:Je.innerHTML;return Z&&Y["!doctype"]&&Je.ownerDocument&&Je.ownerDocument.doctype&&Je.ownerDocument.doctype.name&&Do(DF,Je.ownerDocument.doctype.name)&&(Me="<!DOCTYPE "+Je.ownerDocument.doctype.name+`>
|
|
2389
|
-
`+Me),re&&n4([M,z,P],Qe=>{Me=b2(Me,Qe," ")}),S&&ve?S.createHTML(Me):Me},e.setConfig=function(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(Ke),K=!0},e.clearConfig=function(){vn=null,K=!1},e.isValidAttribute=function(Ke,Oe,Je){vn||Cn({});const ot=yn(Ke),Lt=yn(Oe);return at(ot,Lt,Je)},e.addHook=function(Ke,Oe){typeof Oe=="function"&&(B[Ke]=B[Ke]||[],v2(B[Ke],Oe))},e.removeHook=function(Ke){if(B[Ke])return SF(B[Ke])},e.removeHooks=function(Ke){B[Ke]&&(B[Ke]=[])},e.removeAllHooks=function(){B={}},e}var s4=NF();const ea=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=N.useState(e);N.useEffect(()=>{var S;return A((S=e==null?void 0:e.label)==null?void 0:S[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:m}=ln(),g=(S,E,C)=>{u(_=>({..._,[S]:{..._[S],[E==null?void 0:E.type]:C}}))},[v,A]=N.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);N.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(S[la],S[ca],S[ha],S[pa],S[ga],S[Sa],S[$o],S[yo],c):(S==null?void 0:S.length)>Sa&&(S==null?void 0:S.length)===Vl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(S[la],S[ca],S[ha],S[pa],S[ga],S[5],S[6],S[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(t4,{style:{display:"inline-block"},className:"builder-input-label-edit",html:v,disabled:!1,onChange:S=>{var E;A(s4.sanitize((E=S==null?void 0:S.target)==null?void 0:E.value))},onBlur:S=>{var C;const E=s4.sanitize((C=S==null?void 0:S.target)==null?void 0:C.innerText);console.log("DOMPurify.sanitize(e?.target?.innerText)",E),A(E),g("label",d,E)},tagName:"article"})})},i1=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(a2,{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"}})})},Hr=t=>{var de,fe,ne,W;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}=tn(),m=(ae,Y)=>{B(pe=>({...pe,[ae]:Y}))},{fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,cloneField:A,gridComponentFieldSettingUpdate:w,fieldSettingDeleteInlineConditional:x,gridComponentFieldDelete:S,removeField:E}=ln(),{updateGlobalToast:C}=tn(),_=ae=>{const Y=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(Y[la],Y[ca],Y[ha],Y[pa],Y[ga],Y[Sa],Y[$o],Y[yo],ae):(Y==null?void 0:Y.length)>Sa&&(Y==null?void 0:Y.length)===Vl+1&&(ae!=null&&ae.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?w(Y[la],Y[ca],Y[ha],Y[pa],Y[ga],Y[5],Y[6],Y[7],ae):g(s,i,a,r,n,ae),C({showToast:!0,toastMessage:"Updated",toastDetail:"Field Updated",toastType:"success"})},[T,O]=N.useState(!1),[F,B]=N.useState({custom_component_title:"",custom_component_description:""}),M=()=>{B(ae=>({...ae,custom_component_schema:e})),O(!0)},z=()=>{const ae=c.split("-").map(Number);l==="inline-conditional"?x(ae[la],ae[ca],ae[ha],ae[pa],ae[ga],ae[Sa],ae[$o],ae[yo]):(ae==null?void 0:ae.length)>Sa&&(ae==null?void 0:ae.length)===Vl+1&&(e!=null&&e.componentType)&&l==="grid"?S(ae[la],ae[ca],ae[ha],ae[pa],ae[ga],ae[5],ae[6],ae[7]):E(s,i,a,r,n)},P=(ae,Y)=>{const pe={...e,attributes:{...e.attributes,[ae]:Y}};_(pe)},H=(ae,Y)=>{const pe={...e,[ae]:Y};_(pe)};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)!=="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-9 justify-content-between":"builder-element-quick-options mb-2 w-4 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)!=="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===!0&&o.jsxs("div",{className:" ",children:[o.jsx(i1,{field:e,onHandleChangeSetttings:P,settingsKey:"required",settingsKeyValue:(de=e==null?void 0:e.attributes)==null?void 0:de.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(fe=e==null?void 0:e.attributes)==null?void 0:fe.required}),o.jsx(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:P,settingsKey:"style",settingsKeyValue:(ne=e==null?void 0:e.attributes)==null?void 0:ne.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(W=e==null?void 0:e.attributes)==null?void 0:W.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(kt,{text:!0,size:"small",label:"Advance Settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(kt,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{A(e,s,i,a,r,n),h()}}),o.jsx(kt,{text:!0,size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{z()}}),o.jsx(kt,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",onClick:()=>{M()}})]}),o.jsxs(As,{maximizable:!0,header:"Custom component save",visible:T,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(kt,{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(kt,{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(gn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(F==null?void 0:F.custom_component_title)||"",onChange:ae=>{var Y;return m("custom_component_title",(Y=ae==null?void 0:ae.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(Ds,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(F==null?void 0:F.custom_component_description)||"",onChange:ae=>{var Y;return m("custom_component_description",(Y=ae==null?void 0:ae.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},L0e=t=>{var Q,oe,ye,Te,Ae,be,we,re;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l}=t,{isAdmin:c,isRenderView:u,isPreview:d}=tn(),{userSelectedLanguage:f,fieldSettingUpdate:h}=ln(),{task_status:m,taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:S}=Pr(),[E,C]=N.useState(!1),[_,T]=N.useState(!1),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),H=()=>{P(!0)},de=()=>{P(!1)},fe=U=>{C(U)},ne=()=>{C(!1)},W=()=>{var U,Z,K;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const he=[...a.repeatableFields],_e=Et.findIndex(he,function(ge){return ge.uuid===(r==null?void 0:r.uuid)});_e>=0&&he[_e].fieldData?F(he[_e].fieldData):(r.isValid=0,F(null))}}else{const he=x,_e=Et.cloneDeep(g);if(he!=null&&he.length){for(const ge of he)if(ge.fieldId===t.field.uuid&&((U=ge==null?void 0:ge.postData)!=null&&U.length)){F((Z=ge==null?void 0:ge.postData[0])==null?void 0:Z.postValue),_e[r==null?void 0:r.uuid]=(K=ge==null?void 0:ge.postData[0])==null?void 0:K.postValue;const ve=Object.keys(_e).length;A(ve);break}}}T(!0)},ae=U=>{var _e;F(U.target.value);const Z=x,K=Et.cloneDeep(g);if((_e=U==null?void 0:U.target)!=null&&_e.value&&(Z==null?void 0:Z.length)>0)for(const ge of Z)ge.fieldId===t.field.uuid&&(K[r==null?void 0:r.uuid]=U==null?void 0:U.value,ge.postData[0]={postValue:U.value});else delete K[r==null?void 0:r.uuid];v(K);const he=Object.keys(K).length;A(he)};N.useEffect(()=>{_||W();const U=Rt.addListener("clearRepeatableFields",he=>{he===(a==null?void 0:a.uuid)&&(F(""),M(0),r.isValid=0,h(e,n,s,l,i,r))}),Z=Rt.addListener("onSubmitUserForm",()=>{var he;(he=r==null?void 0:r.attributes)!=null&&he.required?O?r.isValid=1:r.isValid=0:r.isValid=1}),K=Rt.addListener("OnInvalidFieldCatch",he=>{r.uuid===(he==null?void 0:he.fieldId)?M(1):M(0)});return()=>{Z.remove(),K.remove(),U.remove()}});const Y=(U,Z)=>{var K;if(x){const he=[...x],_e=Et.findIndex(he,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let ge=(K=x[_e])==null?void 0:K.repeatableFields;ge={...ge,[U==null?void 0:U.uuid]:Z},he[_e]={...he[_e],repeatableFields:ge},w(he)}F(Z),Z!==null?U.isValid=1:U.isValid=0},pe=(U,Z)=>U?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:U.name,src:U==null?void 0:U.image,onError:K=>K.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:U.name})]}):o.jsx("span",{children:Z.placeholder}),ie=U=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:U.name,src:U==null?void 0:U.image,onError:Z=>Z.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:U.name})]}),J=o.jsxs("div",{onMouseOver:H,onMouseOut:de,children:[!u&&!d&&z&&o.jsx(Hr,{handleFieldSettingsSidebar:fe,...t}),o.jsxs("div",{className:`field ${d?" ":" builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 ":"field-form-builder col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(Q=r==null?void 0:r.headerText)==null?void 0:Q[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=r==null?void 0:r.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(o.Fragment,{children:(ye=r==null?void 0:r.label)==null?void 0:ye[f==null?void 0:f.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(Te=r==null?void 0:r.toolTip)==null?void 0:Te[f==null?void 0:f.type],position:"right"})})]}),o.jsx(xa,{className:"country-select-builder-component",onFocus:()=>M(1),onChange:U=>{a!=null&&a.rowIsRepeatable?Y(r,U.target.value):ae(U)},options:r==null?void 0:r.countries,optionLabel:"name",value:O,placeholder:(Ae=r==null?void 0:r.placeholder)==null?void 0:Ae[f==null?void 0:f.type],disabled:m===S,valueTemplate:pe,itemTemplate:ie,filter:!0,filterBy:"name",showClear:!0}),((be=r==null?void 0:r.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:B===1&&!O?(we=r==null?void 0:r.validationMesssage)==null?void 0:we.language:""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(re=r==null?void 0:r.helperText)==null?void 0:re[f==null?void 0:f.type]})})]})}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:ne,...t},r==null?void 0:r.uuid),o.jsx(wi,{...t,fieldWrap:J})]})},B0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U,Z,K,he,_e,ge,ve;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Pr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=ln(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A}=t,{isAdmin:w,isRenderView:x,isPreview:S}=tn(),[E,C]=N.useState(!1),[_,T]=N.useState(""),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{de(!0)},ne=()=>{de(!1)},W=()=>{var Le,Ne,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const V=[...g.repeatableFields],te=Et.findIndex(V,function(X){return X.uuid===(d==null?void 0:d.uuid)});te>=0&&V[te].fieldData?T(V[te].fieldData):T("")}}else{const V=a;if(V!=null&&V.length){for(const te of V)if(te.fieldId===t.field.uuid&&((Le=te==null?void 0:te.postData[0])==null?void 0:Le.postValue)!==""&&((Ne=te==null?void 0:te.postData[0])!=null&&Ne.postValue)){T((me=te==null?void 0:te.postData[0])==null?void 0:me.postValue);break}}}P(!0)};N.useEffect(()=>{z||W();const Le=Rt.addListener("clearRepeatableFields",X=>{X===(g==null?void 0:g.uuid)&&(T(""),M(0),d.isValid=0,u(m,h,v,A,f,d))}),Ne=Rt.addListener("onSubmitUserForm",()=>{var X,se;(X=d==null?void 0:d.attributes)!=null&&X.required?_&&_.length&&(_==null?void 0:_.length)<((se=d==null?void 0:d.attributes)==null?void 0:se.minLength)?d.isValid=1:d.isValid=0:d.isValid=1}),me=Rt.addListener("OnInvalidFieldCatch",X=>{d.uuid===(X==null?void 0:X.fieldId)?M(1):M(0)}),V=Rt.addListener("OnGetFieldValue",X=>{var ue;const se=(ue=X==null?void 0:X.repeatableColumn)==null?void 0:ue.filter(Se=>(Se==null?void 0:Se.fieldUuid)===(d==null?void 0:d.uuid));se!=null&&se.length}),te=Rt.addListener("formFieldAdded",X=>{O===null&&F(X==null?void 0:X.uuid)});return()=>{Ne.remove(),me.remove(),V.remove(),Le.remove(),te.remove()}}),N.useEffect(()=>(O!==null&&setTimeout(()=>{F(null)},1e3),()=>{}),[O]);const ae=Le=>{C(Le)},Y=()=>{C(!1)},pe=Le=>{var V,te;T(Le.target.value);const Ne=a,me=Et.cloneDeep(e);if(Ne!==null){if((V=Le==null?void 0:Le.target)!=null&&V.value){if(me[d==null?void 0:d.uuid]=(te=Le==null?void 0:Le.target)==null?void 0:te.value,(Ne==null?void 0:Ne.length)>0)for(const X of Ne)X.fieldId===t.field.uuid&&(X.postData[0]={postValue:Le.target.value})}else if(delete me[d==null?void 0:d.uuid],(Ne==null?void 0:Ne.length)>0)for(const X of Ne)X.fieldId===t.field.uuid&&(X.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(me);const X=Object.keys(me).length;r(X)}},ie=(Le,Ne)=>{var me;if(a){const V=[...a],te=Et.findIndex(V,function(se){return se.rowId===(g==null?void 0:g.uuid)});let X=(me=a[te])==null?void 0:me.repeatableFields;X={...X,[Le==null?void 0:Le.uuid]:Ne},V[te]={...V[te],repeatableFields:X},i(V)}T(Ne),Ne!==""?Le.isValid=1:Le.isValid=0},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!x&&!S&&H&&o.jsx(Hr,{handleFieldSettingsSidebar:ae,...t}),o.jsxs("div",{className:`field ${S?" ":" builder-element-wrapper "} ${(d==null?void 0:d.isFluid)===!0?" p-fluid ":""} ${x?" ":" py-6 px-4 "} ${O===(d==null?void 0:d.uuid)?" new-field ":" card "} `,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:w?"col-6 ":"col-12 p-fluid",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:d==null?void 0:d.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=d==null?void 0:d.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(o.Fragment,{children:(ye=d==null?void 0:d.label)==null?void 0:ye[c==null?void 0:c.type]}):o.jsx(ea,{...t}),(d==null?void 0:d.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(Te=d==null?void 0:d.toolTip)==null?void 0:Te[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-"+((be=(Ae=d==null?void 0:d.icon)==null?void 0:Ae.properties)==null?void 0:be.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(we=d==null?void 0:d.placeholder)==null?void 0:we[c==null?void 0:c.type],minLength:(re=d==null?void 0:d.attributes)==null?void 0:re.minLength,maxLength:(U=d==null?void 0:d.attributes)==null?void 0:U.maxLength,value:_,onFocus:()=>M(1),onChange:Le=>{g!=null&&g.rowIsRepeatable?ie(d,Le.target.value):pe(Le)},className:B===1&&((Z=d==null?void 0:d.attributes)!=null&&Z.required)?_?"valid":"invalid":"valid'",readOnly:s===l})]}),o.jsx("div",{children:((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:B===1&&!_?(he=d==null?void 0:d.validationMesssage)==null?void 0:he.english:""}),o.jsx("small",{className:"error",children:B===1&&_.length&&(_==null?void 0:_.length)<((_e=d==null?void 0:d.attributes)==null?void 0:_e.minLength)?`Mini length ${(ge=d==null?void 0:d.attributes)==null?void 0:ge.minLength}`:""})]})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ve=d==null?void 0:d.helperText)==null?void 0:ve[c==null?void 0:c.type]})})]})]})}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:Y,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},V0e=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:"Href Text"}),o.jsx(gn,{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:"Hyper Link"}),o.jsx(gn,{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)})]})]})},U0e=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:"Hyper Link Color"}),o.jsx(Zd,{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(gn,{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(Or,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},q0e=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c}=t,[u,d]=N.useState(n),{fieldSettingUpdate:f,formBuilderSchemaLanguages:h,formBuilderPublishedStatus:m}=ln(),{updateGlobalToast:g}=tn(),v=(x,S,E)=>{d(C=>({...C,[x]:{...C[x],[S==null?void 0:S.type]:E}}))},A=(x,S)=>{d(E=>({...E,[x]:S}))},w=()=>{f(i,a,s,l,c,u),g({showToast:!0,toastMessage:"Updated",toastDetail:"Html Updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),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",{className:"mb-0",children:[t==null?void 0:t.typeName," Settings "]})]}),!m&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(kt,{className:"mt-3",label:"Update",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:h!=null&&h.length?h.map((x,S)=>o.jsx(io,{tabIndex:S,header:x==null?void 0:x.language,children:o.jsx(V0e,{language:x,fieldState:u,onHandleChange:v,...t})},S)):""})}),o.jsx(hr,{header:"Styling",children:o.jsx(U0e,{fieldState:u,onHandleChangeStyling:A,...t})})]})]})})},j0e=t=>{var m,g,v,A,w,x,S,E,C;const{field:e}=t,{userSelectedLanguage:n}=ln(),{isPreview:r}=tn(),[i,a]=N.useState(!1),[s,l]=N.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=_=>{a(_)},f=()=>{a(!1)};N.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"":"builder-element-wrapper",onMouseOver:c,onMouseOut:u,children:[!r&&s&&o.jsx(Hr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?" px-4":"field-form-builder px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(m=e==null?void 0:e.headerText)==null?void 0:m[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[((g=e==null?void 0:e.attributes)==null?void 0:g.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(o.Fragment,{children:(v=e==null?void 0:e.label)==null?void 0:v[n==null?void 0:n.type]}):o.jsx(ea,{...t}),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]}),((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:(E=e==null?void 0:e.validationMesssage)==null?void 0:E[n==null?void 0:n.type]}),(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]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(q0e,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(wi,{...t,fieldWrap:h})]})},$0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U,Z,K,he,_e,ge,ve,Le,Ne,me,V,te,X;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=tn(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:m,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:A,task_status:w}=Pr(),{userSelectedLanguage:x,fieldSettingUpdate:S}=ln(),[E,C]=N.useState(null),[_,T]=N.useState(!1),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{de(!0)},ne=()=>{de(!1)},W=()=>{var se,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Se=[...a.repeatableFields],De=Et.findIndex(Se,function(je){return je.uuid===(e==null?void 0:e.uuid)});De>=0&&Se[De].fieldData?F(Number(Se[De].fieldData)||null):F(null)}}else{const Se=v;if(Se!=null&&Se.length){for(const De of Se)if(De.fieldId===t.field.uuid&&((se=De==null?void 0:De.postData)!=null&&se.length)){F(Number((ue=De==null?void 0:De.postData[0])==null?void 0:ue.postValue)||null);break}}}P(!0)};N.useEffect(()=>{z||W();const se=Rt.addListener("clearRepeatableFields",ct=>{ct===(a==null?void 0:a.uuid)&&(F(null),M(0),e.isValid=0,S(i,r,s,l,n,e))}),ue=Rt.addListener("onSubmitUserForm",()=>{var ct;(ct=e==null?void 0:e.attributes)!=null&&ct.required?O?e.isValid=1:e.isValid=0:e.isValid=1}),Se=Rt.addListener("OnInvalidFieldCatch",ct=>{e.uuid===(ct==null?void 0:ct.fieldId)?M(1):M(0)}),De=Rt.addListener("OnGetFieldValue",ct=>{var nt;const Dt=(nt=ct==null?void 0:ct.repeatableColumn)==null?void 0:nt.filter(xt=>(xt==null?void 0:xt.fieldUuid)===(e==null?void 0:e.uuid));Dt!=null&&Dt.length}),je=Rt.addListener("formFieldAdded",ct=>{E===null&&C(ct.uuid)});return()=>{ue.remove(),Se.remove(),De.remove(),se.remove(),je.remove()}}),N.useEffect(()=>(E!==null&&setTimeout(()=>{C(null)},1e3),()=>{}),[E]);const ae=se=>{T(se)},Y=()=>{T(!1)},pe=se=>{const ue=v,Se=Et.cloneDeep(f);if(ue!==null){if(se){if(Se[e==null?void 0:e.uuid]=se,(ue==null?void 0:ue.length)>0)for(const De of ue)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:se})}else if(delete Se[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const De of ue)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(Se);const De=Object.keys(Se).length;m(De)}},ie=(se,ue)=>{var Se;if(v!=null&&v.length){const De=[...v],je=Et.findIndex(De,function(Dt){return Dt.rowId===(a==null?void 0:a.uuid)});let ct=(Se=v[je])==null?void 0:Se.repeatableFields;ct={...ct,[se==null?void 0:se.uuid]:ue},De[je]={...De[je],repeatableFields:ct},g(De)}F(ue),ue!==""?se.isValid=1:se.isValid=0},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!u&&!c&&H&&o.jsx(Hr,{handleFieldSettingsSidebar:ae,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid py-6 px-4":" py-6 px-4"} ${E===(e==null?void 0:e.uuid)?" new-field ":" card "}`,children:[o.jsx("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:(Q=e==null?void 0:e.headerText)==null?void 0:Q[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(ye=e==null?void 0:e.label)==null?void 0:ye[x==null?void 0:x.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[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-"+((be=(Ae=e==null?void 0:e.icon)==null?void 0:Ae.properties)==null?void 0:be.name)}),o.jsx(Na,{readOnly:w===A,id:e==null?void 0:e.uuid,placeholder:(we=e==null?void 0:e.placeholder)==null?void 0:we[x==null?void 0:x.type],value:O,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:(U=e==null?void 0:e.attributes)==null?void 0:U.prefix,showButtons:(Z=e==null?void 0:e.attributes)==null?void 0:Z.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(K=e==null?void 0:e.attributes)==null?void 0:K.minFractionDigits,maxFractionDigits:(he=e==null?void 0:e.attributes)==null?void 0:he.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(ge=e==null?void 0:e.attributes)==null?void 0:ge.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(Le=e==null?void 0:e.attributes)==null?void 0:Le.currencyDisplay,useGrouping:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.useGrouping,onFocus:()=>M(1),onChange:se=>{a!=null&&a.rowIsRepeatable?ie(e,se.value):pe(se.value)},className:B===1&&((me=e==null?void 0:e.attributes)!=null&&me.required)?O?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((V=e==null?void 0:e.attributes)==null?void 0:V.required)&&o.jsx("small",{className:"error",children:B===1&&!O?(te=e==null?void 0:e.validationMesssage)==null?void 0:te.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(X=e==null?void 0:e.helperText)==null?void 0:X[x==null?void 0:x.type]})})]})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[_===!0&&o.jsx(Ri,{visibilty:_,closeSettingFieldSidebar:Y,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},xb=["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"],o4=/^\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 FF(t){try{JSON.parse(t)}catch{return!1}return!0}function kF(t){if(t<26)return xb[t];{const e=Math.floor(t/26)-1,n=t%26;return xb[e]+xb[n]}}const H0e=t=>{var pe,ie,J,Q,oe,ye,Te,Ae,be,we,re;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l}=t,{isPreview:c,isAdmin:u,isRenderView:d}=tn(),{task_status:f,taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,TASK_PUBLISHED:w}=Pr(),{userSelectedLanguage:x}=ln(),[S,E]=N.useState(!1),[C,_]=N.useState(""),[T,O]=N.useState(0),[F,B]=N.useState(!1),M=()=>{B(!0)},z=()=>{B(!1)};N.useEffect(()=>{S||ne();const U=Rt.addListener("clearRepeatableFields",K=>{K===(a==null?void 0:a.uuid)&&(_(""),O(0),e.isValid=0)}),Z=Rt.addListener("onSubmitUserForm",()=>{var K;(K=e==null?void 0:e.attributes)!=null&&K.required?C!==""&&o4.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Z.remove(),U.remove()}});const[P,H]=N.useState(!1),de=U=>{H(U)},fe=()=>{H(!1)},ne=()=>{var U,Z,K;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const he=[...a.repeatableFields],_e=Et.findIndex(he,function(ge){return ge.uuid===(e==null?void 0:e.uuid)});_e>=0&&he[_e].fieldData?_(he[_e].fieldData):_("")}}else{const he=A;if(he!=null&&he.length){for(const _e of he)if(_e.fieldId===t.field.uuid&&((U=_e==null?void 0:_e.postData[0])==null?void 0:U.postValue)!==""&&((Z=_e==null?void 0:_e.postData[0])!=null&&Z.postValue)){_((K=_e==null?void 0:_e.postData[0])==null?void 0:K.postValue),E(!0);break}}}E(!0)},W=U=>{_(U);const Z=A,K=Et.cloneDeep(h);if(Z!==null){if(U!==""&&o4.test(U)===!0){if(K[e==null?void 0:e.uuid]=U,(Z==null?void 0:Z.length)>0)for(const he of Z)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:U})}else if(delete K[e==null?void 0:e.uuid],(Z==null?void 0:Z.length)>0)for(const he of Z)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(K);const he=Object.keys(K).length;g(he)}},ae=(U,Z,K,he)=>{var _e;if(_(he),A!==null){const ge=[...A],ve=Et.findIndex(ge,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let Le=(_e=A[ve])==null?void 0:_e.repeatableFields;Le={...Le,[K==null?void 0:K.uuid]:he},ge[ve]={...ge[ve],repeatableFields:Le},v(ge),he!==""&&o4.test(he)===!0?e.isValid=1:e.isValid=0}},Y=o.jsxs("div",{onMouseOver:M,onMouseOut:z,children:[!d&&!c&&F&&o.jsx(Hr,{handleFieldSettingsSidebar:de,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(pe=e==null?void 0:e.headerText)==null?void 0:pe[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t,update:s,value:l}),((ie=e==null?void 0:e.attributes)==null?void 0:ie.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(J=e==null?void 0:e.label)==null?void 0:J[x==null?void 0:x.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-2",children:(e==null?void 0:e.showToolTip)&&o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(Q=e==null?void 0:e.toolTip)==null?void 0:Q[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-"+((ye=(oe=e==null?void 0:e.icon)==null?void 0:oe.properties)==null?void 0:ye.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(Te=e==null?void 0:e.placeholder)==null?void 0:Te[x==null?void 0:x.type],value:C,onFocus:()=>O(1),onChange:U=>{a!=null&&a.rowIsRepeatable?ae(r,i,{uuid:e.uuid},U.target.value):W(U.target.value)},className:T===1&&((Ae=e==null?void 0:e.attributes)!=null&&Ae.required)?C?"valid":"invalid":"valid'",readOnly:f===w})]}),((be=e==null?void 0:e.attributes)==null?void 0:be.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!C?(we=e==null?void 0:e.validationMesssage)==null?void 0:we[x==null?void 0:x.language]:""})}),C!==""&&T===1&&o4.test(C)===!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(Fi,{...t})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Ri,{visibilty:P,closeSettingFieldSidebar:fe,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:Y})]})},z0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l}=t,{isRenderView:c,isAdmin:u,isPreview:d}=tn(),{userSelectedLanguage:f,fieldSettingUpdate:h}=ln(),{task_status:m,taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:S}=Pr(),[E,C]=N.useState(!1),[_,T]=N.useState(""),[O,F]=N.useState(0),[B,M]=N.useState(!1),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{P(!0)},ne=()=>{P(!1)},W=Z=>{C(Z)},ae=()=>{C(!1)},Y=()=>{var K,he,_e;const Z=x;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const ge=[...l.repeatableFields],ve=Et.findIndex(ge,function(Le){return Le.uuid===(e==null?void 0:e.uuid)});ve>=0&&ge[ve].fieldData?T(ge[ve].fieldData):(e.isValid=0,T(""))}}else if(Z!=null&&Z.length){for(const ge of Z)if(ge.fieldId===t.field.uuid&&((K=ge==null?void 0:ge.postData[0])!=null&&K.postValue)&&((he=ge==null?void 0:ge.postData[0])==null?void 0:he.postValue)!==""){T((_e=ge==null?void 0:ge.postData[0])==null?void 0:_e.postValue),M(!0);break}}M(!0)},pe=(Z,K,he,_e)=>{var ge;if(x!=null&&x.length){const ve=[...x],Le=Et.findIndex(ve,function(me){return me.rowId===(l==null?void 0:l.uuid)});let Ne=(ge=x[Le])==null?void 0:ge.repeatableFields;Ne={...Ne,[he==null?void 0:he.uuid]:_e},ve[Le]={...ve[Le],repeatableFields:Ne},w(ve)}T(_e),_e!==""?e.isValid=1:e.isValid=0,h(Z,K,a,s,n,e)};N.useEffect(()=>{B||Y();const Z=Rt.addListener("clearRepeatableFields",ve=>{ve===(l==null?void 0:l.uuid)&&(T(""),F(0),e.isValid=0)}),K=Rt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required?_?e.isValid=1:e.isValid=0:e.isValid=1}),he=Rt.addListener("OnInvalidFieldCatch",ve=>{e.uuid===(ve==null?void 0:ve.fieldId)?F(1):F(0)}),_e=Rt.addListener("OnGetFieldValue",ve=>{var Ne;const Le=(Ne=ve==null?void 0:ve.repeatableColumn)==null?void 0:Ne.filter(me=>(me==null?void 0:me.fieldUuid)===(e==null?void 0:e.uuid));Le!=null&&Le.length}),ge=Rt.addListener("onUpdateField",()=>{de(!H)});return()=>{ge.remove(),K.remove(),he.remove(),_e.remove(),Z.remove()}});const ie=Z=>{var _e,ge;T(Z.target.value);const K=x,he=Et.cloneDeep(g);if(K!==null){if((_e=Z==null?void 0:Z.target)!=null&&_e.value){if(he[e==null?void 0:e.uuid]=(ge=Z==null?void 0:Z.target)==null?void 0:ge.value,(K==null?void 0:K.length)>0)for(const ve of K)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:Z.target.value})}else if(delete he[e==null?void 0:e.uuid],(K==null?void 0:K.length)>0)for(const ve of K)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){v(he);const ve=Object.keys(he).length;A(ve)}},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!c&&!d&&z&&o.jsx(Hr,{handleFieldSettingsSidebar:W,...t}),o.jsxs("div",{className:`field ${d?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?"card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 ":"col-12 field-form-builder ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Q=e==null?void 0:e.headerText)==null?void 0:Q[f==null?void 0:f.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(o.Fragment,{children:(ye=e==null?void 0:e.label)==null?void 0:ye[f==null?void 0:f.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[f==null?void 0:f.type],position:"right"})})]}),o.jsx(Ds,{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:_,onFocus:()=>F(1),onChange:Z=>{l!=null&&l.rowIsRepeatable?pe(r,i,e,Z.target.value):ie(Z)},className:O===1&&((be=e==null?void 0:e.attributes)!=null&&be.required)?_?"valid":"invalid":"valid",readOnly:m===S}),o.jsx("div",{children:((we=e==null?void 0:e.attributes)==null?void 0:we.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(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:(U=e==null?void 0:e.helperText)==null?void 0:U[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:ae,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:J})]})},Y0e={},Cb=t=>{var T,O,F,B;const{isAdmin:e,isAdvanceView:n,isPreview:r}=tn(),{handleDrop:i}=ln(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,conditionIndex:f,ruleIndex:h,condition:m,page:g,section:v,row:A,column:w}=t,x=N.useRef(null),[{isDragging:S},E]=Ji({type:qC,item:{type:qC,uuid:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),C=S?0:1;E(x);const _=(M,z,P,H,de,fe,ne)=>{const W=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(jc,{type:"inline-conditional",field:M,data:M,path:z,page:g,section:v,row:A,column:w,pageIndex:P,sectionIndex:H,rowIndex:de,columnIndex:fe,fieldIndex:ne,isAdmin:e,fieldContainer:W},M.uuid)};return o.jsxs("div",{ref:r===!1?x:null,style:{...Y0e,opacity:C},className:"draggable column",children:[m&&((T=m.children)==null?void 0:T.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),m&&m.children&&((O=m.children)==null?void 0:O.length)>0&&m.children.map((M,z)=>{var P;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(Cr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${z}`,childrenCount:(P=m==null?void 0:m.children)==null?void 0:P.length,droppedField:m},onDrop:i}),_(M,`${s}-${h}-${f}-${z}`,l,c,u,d,z)]},M.uuid)}),r===!1&&o.jsx(Cr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(F=m==null?void 0:m.children)==null?void 0:F.length}`,childrenCount:(B=m==null?void 0:m.children)==null?void 0:B.length,droppedField:m},onDrop:i,isLast:!0})]})},t0=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:m}=t,{taskRegisterData:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,updateProgressDataValuesHook:w}=Pr(),x=N.useCallback((S,E,C)=>{var T,O,F;const _=A;if(_!=null&&_.length){const B=g,M=(T=a==null?void 0:a.inlineConditionalRules)==null?void 0:T.rules[E].conditions[C].children;for(const[P,H]of M.entries()){(O=H==null?void 0:H.attributes)!=null&&O.required;const de=Et.findIndex(_,function(fe){return fe.fieldId===H.uuid});S?de===-1&&(_.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:P,fieldId:H.uuid,fieldInputType:a.componentType,fieldTitle:(F=a.label)==null?void 0:F.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}),B[H==null?void 0:H.uuid]&&delete B[H==null?void 0:H.uuid]):(B[H==null?void 0:H.uuid]&&delete B[H==null?void 0:H.uuid],de>=0&&_.splice(de,1))}const z=Object.keys(B).length;w({progressMaxValue:_==null?void 0:_.length,progressValue:z}),v(_)}},[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,g,w,v,A]);return N.useEffect(()=>(x(m,r,i),()=>{}),[i,e,m,r,x]),o.jsx("div",{children:m&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(Cb,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};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 K0e(t,e){if(w2(t)!=="object"||t===null)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 X0e(t){var e=K0e(t,"string");return w2(e)==="symbol"?e:String(e)}function Tb(t,e,n){return e=X0e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var R0e={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return pt("p-tag p-component",Tb(Tb({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},G0e=`
|
|
2389
|
+
`+Me),re&&n4([M,z,P],Qe=>{Me=b2(Me,Qe," ")}),S&&ve?S.createHTML(Me):Me},e.setConfig=function(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(Ke),K=!0},e.clearConfig=function(){vn=null,K=!1},e.isValidAttribute=function(Ke,Oe,Je){vn||Cn({});const ot=yn(Ke),Lt=yn(Oe);return at(ot,Lt,Je)},e.addHook=function(Ke,Oe){typeof Oe=="function"&&(B[Ke]=B[Ke]||[],v2(B[Ke],Oe))},e.removeHook=function(Ke){if(B[Ke])return SF(B[Ke])},e.removeHooks=function(Ke){B[Ke]&&(B[Ke]=[])},e.removeAllHooks=function(){B={}},e}var s4=NF();const ea=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=N.useState(e);N.useEffect(()=>{var S;return A((S=e==null?void 0:e.label)==null?void 0:S[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:m}=ln(),g=(S,E,C)=>{u(_=>({..._,[S]:{..._[S],[E==null?void 0:E.type]:C}}))},[v,A]=N.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);N.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(S[la],S[ca],S[ha],S[pa],S[ga],S[Sa],S[$o],S[yo],c):(S==null?void 0:S.length)>Sa&&(S==null?void 0:S.length)===Vl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(S[la],S[ca],S[ha],S[pa],S[ga],S[5],S[6],S[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(t4,{style:{display:"inline-block"},className:"builder-input-label-edit",html:v,disabled:!1,onChange:S=>{var E;A(s4.sanitize((E=S==null?void 0:S.target)==null?void 0:E.value))},onBlur:S=>{var C;const E=s4.sanitize((C=S==null?void 0:S.target)==null?void 0:C.innerText);console.log("DOMPurify.sanitize(e?.target?.innerText)",E),A(E),g("label",d,E)},tagName:"article"})})},i1=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(a2,{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"}})})},Hr=t=>{var de,fe,ne,W;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}=tn(),m=(ae,Y)=>{B(pe=>({...pe,[ae]:Y}))},{fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,cloneField:A,gridComponentFieldSettingUpdate:w,fieldSettingDeleteInlineConditional:x,gridComponentFieldDelete:S,removeField:E}=ln(),{updateGlobalToast:C}=tn(),_=ae=>{const Y=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(Y[la],Y[ca],Y[ha],Y[pa],Y[ga],Y[Sa],Y[$o],Y[yo],ae):(Y==null?void 0:Y.length)>Sa&&(Y==null?void 0:Y.length)===Vl+1&&(ae!=null&&ae.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?w(Y[la],Y[ca],Y[ha],Y[pa],Y[ga],Y[5],Y[6],Y[7],ae):g(s,i,a,r,n,ae),C({showToast:!0,toastMessage:"Updated",toastDetail:"Field Updated",toastType:"success"})},[T,O]=N.useState(!1),[F,B]=N.useState({custom_component_title:"",custom_component_description:""}),M=()=>{B(ae=>({...ae,custom_component_schema:e})),O(!0)},z=()=>{const ae=c.split("-").map(Number);l==="inline-conditional"?x(ae[la],ae[ca],ae[ha],ae[pa],ae[ga],ae[Sa],ae[$o],ae[yo]):(ae==null?void 0:ae.length)>Sa&&(ae==null?void 0:ae.length)===Vl+1&&(e!=null&&e.componentType)&&l==="grid"?S(ae[la],ae[ca],ae[ha],ae[pa],ae[ga],ae[5],ae[6],ae[7]):E(s,i,a,r,n)},P=(ae,Y)=>{const pe={...e,attributes:{...e.attributes,[ae]:Y}};_(pe)},H=(ae,Y)=>{const pe={...e,[ae]:Y};_(pe)};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)!=="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-9 justify-content-between":"builder-element-quick-options mb-2 w-4 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)!=="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===!0&&o.jsxs("div",{className:" ",children:[o.jsx(i1,{field:e,onHandleChangeSetttings:P,settingsKey:"required",settingsKeyValue:(de=e==null?void 0:e.attributes)==null?void 0:de.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(fe=e==null?void 0:e.attributes)==null?void 0:fe.required}),o.jsx(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:H,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(i1,{field:e,onHandleChangeSetttings:P,settingsKey:"style",settingsKeyValue:(ne=e==null?void 0:e.attributes)==null?void 0:ne.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(W=e==null?void 0:e.attributes)==null?void 0:W.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(kt,{text:!0,size:"small",label:"Advance Settings",icon:"pi pi-cog",onClick:()=>{console.log("opening sidebar"),console.log("handleFieldSettingsSidebar",u),u(!0)},className:"mr-3"}),o.jsx(kt,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{A(e,s,i,a,r,n),h()}}),o.jsx(kt,{text:!0,size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{z()}}),o.jsx(kt,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",onClick:()=>{M()}})]}),o.jsxs(As,{maximizable:!0,header:"Custom component save",visible:T,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(kt,{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(kt,{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(gn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(F==null?void 0:F.custom_component_title)||"",onChange:ae=>{var Y;return m("custom_component_title",(Y=ae==null?void 0:ae.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(Ds,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(F==null?void 0:F.custom_component_description)||"",onChange:ae=>{var Y;return m("custom_component_description",(Y=ae==null?void 0:ae.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},L0e=t=>{var Q,oe,ye,Te,Ae,be,we,re;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l}=t,{isAdmin:c,isRenderView:u,isPreview:d}=tn(),{userSelectedLanguage:f,fieldSettingUpdate:h}=ln(),{task_status:m,taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:S}=Pr(),[E,C]=N.useState(!1),[_,T]=N.useState(!1),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),H=()=>{P(!0)},de=()=>{P(!1)},fe=U=>{C(U)},ne=()=>{C(!1)},W=()=>{var U,Z,K;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const he=[...a.repeatableFields],_e=Et.findIndex(he,function(ge){return ge.uuid===(r==null?void 0:r.uuid)});_e>=0&&he[_e].fieldData?F(he[_e].fieldData):(r.isValid=0,F(null))}}else{const he=x,_e=Et.cloneDeep(g);if(he!=null&&he.length){for(const ge of he)if(ge.fieldId===t.field.uuid&&((U=ge==null?void 0:ge.postData)!=null&&U.length)){F((Z=ge==null?void 0:ge.postData[0])==null?void 0:Z.postValue),_e[r==null?void 0:r.uuid]=(K=ge==null?void 0:ge.postData[0])==null?void 0:K.postValue;const ve=Object.keys(_e).length;A(ve);break}}}T(!0)},ae=U=>{var _e;F(U.target.value);const Z=x,K=Et.cloneDeep(g);if((_e=U==null?void 0:U.target)!=null&&_e.value&&(Z==null?void 0:Z.length)>0)for(const ge of Z)ge.fieldId===t.field.uuid&&(K[r==null?void 0:r.uuid]=U==null?void 0:U.value,ge.postData[0]={postValue:U.value});else delete K[r==null?void 0:r.uuid];v(K);const he=Object.keys(K).length;A(he)};N.useEffect(()=>{_||W();const U=Rt.addListener("clearRepeatableFields",he=>{he===(a==null?void 0:a.uuid)&&(F(""),M(0),r.isValid=0,h(e,n,s,l,i,r))}),Z=Rt.addListener("onSubmitUserForm",()=>{var he;(he=r==null?void 0:r.attributes)!=null&&he.required?O?r.isValid=1:r.isValid=0:r.isValid=1}),K=Rt.addListener("OnInvalidFieldCatch",he=>{r.uuid===(he==null?void 0:he.fieldId)?M(1):M(0)});return()=>{Z.remove(),K.remove(),U.remove()}});const Y=(U,Z)=>{var K;if(x){const he=[...x],_e=Et.findIndex(he,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let ge=(K=x[_e])==null?void 0:K.repeatableFields;ge={...ge,[U==null?void 0:U.uuid]:Z},he[_e]={...he[_e],repeatableFields:ge},w(he)}F(Z),Z!==null?U.isValid=1:U.isValid=0},pe=(U,Z)=>U?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:U.name,src:U==null?void 0:U.image,onError:K=>K.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:U.name})]}):o.jsx("span",{children:Z.placeholder}),ie=U=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:U.name,src:U==null?void 0:U.image,onError:Z=>Z.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:U.name})]}),J=o.jsxs("div",{onMouseOver:H,onMouseOut:de,children:[!u&&!d&&z&&o.jsx(Hr,{handleFieldSettingsSidebar:fe,...t}),o.jsxs("div",{className:`field ${d?" ":" builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 ":"field-form-builder col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(Q=r==null?void 0:r.headerText)==null?void 0:Q[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=r==null?void 0:r.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(o.Fragment,{children:(ye=r==null?void 0:r.label)==null?void 0:ye[f==null?void 0:f.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Vi,{message:(Te=r==null?void 0:r.toolTip)==null?void 0:Te[f==null?void 0:f.type],position:"right"})})]}),o.jsx(xa,{className:"country-select-builder-component",onFocus:()=>M(1),onChange:U=>{a!=null&&a.rowIsRepeatable?Y(r,U.target.value):ae(U)},options:r==null?void 0:r.countries,optionLabel:"name",value:O,placeholder:(Ae=r==null?void 0:r.placeholder)==null?void 0:Ae[f==null?void 0:f.type],disabled:m===S,valueTemplate:pe,itemTemplate:ie,filter:!0,filterBy:"name",showClear:!0}),((be=r==null?void 0:r.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:B===1&&!O?(we=r==null?void 0:r.validationMesssage)==null?void 0:we.language:""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(re=r==null?void 0:r.helperText)==null?void 0:re[f==null?void 0:f.type]})})]})}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:ne,...t},r==null?void 0:r.uuid),o.jsx(wi,{...t,fieldWrap:J})]})},B0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U,Z,K,he,_e,ge,ve;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Pr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=ln(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A}=t,{isAdmin:w,isRenderView:x,isPreview:S}=tn(),[E,C]=N.useState(!1),[_,T]=N.useState(""),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{de(!0)},ne=()=>{de(!1)},W=()=>{var Le,Ne,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const V=[...g.repeatableFields],te=Et.findIndex(V,function(X){return X.uuid===(d==null?void 0:d.uuid)});te>=0&&V[te].fieldData?T(V[te].fieldData):T("")}}else{const V=a;if(V!=null&&V.length){for(const te of V)if(te.fieldId===t.field.uuid&&((Le=te==null?void 0:te.postData[0])==null?void 0:Le.postValue)!==""&&((Ne=te==null?void 0:te.postData[0])!=null&&Ne.postValue)){T((me=te==null?void 0:te.postData[0])==null?void 0:me.postValue);break}}}P(!0)};N.useEffect(()=>{z||W();const Le=Rt.addListener("clearRepeatableFields",X=>{X===(g==null?void 0:g.uuid)&&(T(""),M(0),d.isValid=0,u(m,h,v,A,f,d))}),Ne=Rt.addListener("onSubmitUserForm",()=>{var X,se;(X=d==null?void 0:d.attributes)!=null&&X.required?_&&_.length&&(_==null?void 0:_.length)<((se=d==null?void 0:d.attributes)==null?void 0:se.minLength)?d.isValid=1:d.isValid=0:d.isValid=1}),me=Rt.addListener("OnInvalidFieldCatch",X=>{d.uuid===(X==null?void 0:X.fieldId)?M(1):M(0)}),V=Rt.addListener("OnGetFieldValue",X=>{var ue;const se=(ue=X==null?void 0:X.repeatableColumn)==null?void 0:ue.filter(Se=>(Se==null?void 0:Se.fieldUuid)===(d==null?void 0:d.uuid));se!=null&&se.length}),te=Rt.addListener("formFieldAdded",X=>{O===null&&F(X==null?void 0:X.uuid)});return()=>{Ne.remove(),me.remove(),V.remove(),Le.remove(),te.remove()}}),N.useEffect(()=>(O!==null&&setTimeout(()=>{F(null)},1e3),()=>{}),[O]);const ae=Le=>{C(Le)},Y=()=>{C(!1)},pe=Le=>{var V,te;T(Le.target.value);const Ne=a,me=Et.cloneDeep(e);if(Ne!==null){if((V=Le==null?void 0:Le.target)!=null&&V.value){if(me[d==null?void 0:d.uuid]=(te=Le==null?void 0:Le.target)==null?void 0:te.value,(Ne==null?void 0:Ne.length)>0)for(const X of Ne)X.fieldId===t.field.uuid&&(X.postData[0]={postValue:Le.target.value})}else if(delete me[d==null?void 0:d.uuid],(Ne==null?void 0:Ne.length)>0)for(const X of Ne)X.fieldId===t.field.uuid&&(X.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(me);const X=Object.keys(me).length;r(X)}},ie=(Le,Ne)=>{var me;if(a){const V=[...a],te=Et.findIndex(V,function(se){return se.rowId===(g==null?void 0:g.uuid)});let X=(me=a[te])==null?void 0:me.repeatableFields;X={...X,[Le==null?void 0:Le.uuid]:Ne},V[te]={...V[te],repeatableFields:X},i(V)}T(Ne),Ne!==""?Le.isValid=1:Le.isValid=0},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!x&&!S&&H&&o.jsx(Hr,{handleFieldSettingsSidebar:ae,...t}),o.jsxs("div",{className:`field ${S?" ":" builder-element-wrapper "} ${(d==null?void 0:d.isFluid)===!0?" p-fluid ":""} ${x?" ":" py-6 px-4 "} ${O===(d==null?void 0:d.uuid)?" new-field ":" card "} `,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:w?"col-6 ":"col-12 p-fluid",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:d==null?void 0:d.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=d==null?void 0:d.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(o.Fragment,{children:(ye=d==null?void 0:d.label)==null?void 0:ye[c==null?void 0:c.type]}):o.jsx(ea,{...t}),(d==null?void 0:d.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Vi,{message:(Te=d==null?void 0:d.toolTip)==null?void 0:Te[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-"+((be=(Ae=d==null?void 0:d.icon)==null?void 0:Ae.properties)==null?void 0:be.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(we=d==null?void 0:d.placeholder)==null?void 0:we[c==null?void 0:c.type],minLength:(re=d==null?void 0:d.attributes)==null?void 0:re.minLength,maxLength:(U=d==null?void 0:d.attributes)==null?void 0:U.maxLength,value:_,onFocus:()=>M(1),onChange:Le=>{g!=null&&g.rowIsRepeatable?ie(d,Le.target.value):pe(Le)},className:B===1&&((Z=d==null?void 0:d.attributes)!=null&&Z.required)?_?"valid":"invalid":"valid'",readOnly:s===l})]}),o.jsx("div",{children:((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:B===1&&!_?(he=d==null?void 0:d.validationMesssage)==null?void 0:he.english:""}),o.jsx("small",{className:"error",children:B===1&&_.length&&(_==null?void 0:_.length)<((_e=d==null?void 0:d.attributes)==null?void 0:_e.minLength)?`Mini length ${(ge=d==null?void 0:d.attributes)==null?void 0:ge.minLength}`:""})]})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ve=d==null?void 0:d.helperText)==null?void 0:ve[c==null?void 0:c.type]})})]})]})}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:Y,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},V0e=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:"Href Text"}),o.jsx(gn,{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:"Hyper Link"}),o.jsx(gn,{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)})]})]})},U0e=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:"Hyper Link Color"}),o.jsx(Zd,{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(gn,{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(Or,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},q0e=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c}=t,[u,d]=N.useState(n),{fieldSettingUpdate:f,formBuilderSchemaLanguages:h,formBuilderPublishedStatus:m}=ln(),{updateGlobalToast:g}=tn(),v=(x,S,E)=>{d(C=>({...C,[x]:{...C[x],[S==null?void 0:S.type]:E}}))},A=(x,S)=>{d(E=>({...E,[x]:S}))},w=()=>{f(i,a,s,l,c,u),g({showToast:!0,toastMessage:"Updated",toastDetail:"Html Updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Io,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),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",{className:"mb-0",children:[t==null?void 0:t.typeName," Settings "]})]}),!m&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(kt,{className:"mt-3",label:"Update",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:h!=null&&h.length?h.map((x,S)=>o.jsx(io,{tabIndex:S,header:x==null?void 0:x.language,children:o.jsx(V0e,{language:x,fieldState:u,onHandleChange:v,...t})},S)):""})}),o.jsx(hr,{header:"Styling",children:o.jsx(U0e,{fieldState:u,onHandleChangeStyling:A,...t})})]})]})})},j0e=t=>{var m,g,v,A,w,x,S,E,C;const{field:e}=t,{userSelectedLanguage:n}=ln(),{isPreview:r}=tn(),[i,a]=N.useState(!1),[s,l]=N.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=_=>{a(_)},f=()=>{a(!1)};N.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"":"builder-element-wrapper",onMouseOver:c,onMouseOut:u,children:[!r&&s&&o.jsx(Hr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?" px-4":"field-form-builder px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(m=e==null?void 0:e.headerText)==null?void 0:m[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[((g=e==null?void 0:e.attributes)==null?void 0:g.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(o.Fragment,{children:(v=e==null?void 0:e.label)==null?void 0:v[n==null?void 0:n.type]}):o.jsx(ea,{...t}),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]}),((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:(E=e==null?void 0:e.validationMesssage)==null?void 0:E[n==null?void 0:n.type]}),(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]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(q0e,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(wi,{...t,fieldWrap:h})]})},$0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U,Z,K,he,_e,ge,ve,Le,Ne,me,V,te,X;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=tn(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:m,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:A,task_status:w}=Pr(),{userSelectedLanguage:x,fieldSettingUpdate:S}=ln(),[E,C]=N.useState(null),[_,T]=N.useState(!1),[O,F]=N.useState(null),[B,M]=N.useState(0),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{de(!0)},ne=()=>{de(!1)},W=()=>{var se,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Se=[...a.repeatableFields],De=Et.findIndex(Se,function(je){return je.uuid===(e==null?void 0:e.uuid)});De>=0&&Se[De].fieldData?F(Number(Se[De].fieldData)||null):F(null)}}else{const Se=v;if(Se!=null&&Se.length){for(const De of Se)if(De.fieldId===t.field.uuid&&((se=De==null?void 0:De.postData)!=null&&se.length)){F(Number((ue=De==null?void 0:De.postData[0])==null?void 0:ue.postValue)||null);break}}}P(!0)};N.useEffect(()=>{z||W();const se=Rt.addListener("clearRepeatableFields",ct=>{ct===(a==null?void 0:a.uuid)&&(F(null),M(0),e.isValid=0,S(i,r,s,l,n,e))}),ue=Rt.addListener("onSubmitUserForm",()=>{var ct;(ct=e==null?void 0:e.attributes)!=null&&ct.required?O?e.isValid=1:e.isValid=0:e.isValid=1}),Se=Rt.addListener("OnInvalidFieldCatch",ct=>{e.uuid===(ct==null?void 0:ct.fieldId)?M(1):M(0)}),De=Rt.addListener("OnGetFieldValue",ct=>{var nt;const Dt=(nt=ct==null?void 0:ct.repeatableColumn)==null?void 0:nt.filter(xt=>(xt==null?void 0:xt.fieldUuid)===(e==null?void 0:e.uuid));Dt!=null&&Dt.length}),je=Rt.addListener("formFieldAdded",ct=>{E===null&&C(ct.uuid)});return()=>{ue.remove(),Se.remove(),De.remove(),se.remove(),je.remove()}}),N.useEffect(()=>(E!==null&&setTimeout(()=>{C(null)},1e3),()=>{}),[E]);const ae=se=>{T(se)},Y=()=>{T(!1)},pe=se=>{const ue=v,Se=Et.cloneDeep(f);if(ue!==null){if(se){if(Se[e==null?void 0:e.uuid]=se,(ue==null?void 0:ue.length)>0)for(const De of ue)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:se})}else if(delete Se[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const De of ue)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(Se);const De=Object.keys(Se).length;m(De)}},ie=(se,ue)=>{var Se;if(v!=null&&v.length){const De=[...v],je=Et.findIndex(De,function(Dt){return Dt.rowId===(a==null?void 0:a.uuid)});let ct=(Se=v[je])==null?void 0:Se.repeatableFields;ct={...ct,[se==null?void 0:se.uuid]:ue},De[je]={...De[je],repeatableFields:ct},g(De)}F(ue),ue!==""?se.isValid=1:se.isValid=0},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!u&&!c&&H&&o.jsx(Hr,{handleFieldSettingsSidebar:ae,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid py-6 px-4":" py-6 px-4"} ${E===(e==null?void 0:e.uuid)?" new-field ":" card "}`,children:[o.jsx("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:(Q=e==null?void 0:e.headerText)==null?void 0:Q[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(ye=e==null?void 0:e.label)==null?void 0:ye[x==null?void 0:x.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[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-"+((be=(Ae=e==null?void 0:e.icon)==null?void 0:Ae.properties)==null?void 0:be.name)}),o.jsx(Na,{readOnly:w===A,id:e==null?void 0:e.uuid,placeholder:(we=e==null?void 0:e.placeholder)==null?void 0:we[x==null?void 0:x.type],value:O,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:(U=e==null?void 0:e.attributes)==null?void 0:U.prefix,showButtons:(Z=e==null?void 0:e.attributes)==null?void 0:Z.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(K=e==null?void 0:e.attributes)==null?void 0:K.minFractionDigits,maxFractionDigits:(he=e==null?void 0:e.attributes)==null?void 0:he.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(ge=e==null?void 0:e.attributes)==null?void 0:ge.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(Le=e==null?void 0:e.attributes)==null?void 0:Le.currencyDisplay,useGrouping:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.useGrouping,onFocus:()=>M(1),onChange:se=>{a!=null&&a.rowIsRepeatable?ie(e,se.value):pe(se.value)},className:B===1&&((me=e==null?void 0:e.attributes)!=null&&me.required)?O?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((V=e==null?void 0:e.attributes)==null?void 0:V.required)&&o.jsx("small",{className:"error",children:B===1&&!O?(te=e==null?void 0:e.validationMesssage)==null?void 0:te.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(X=e==null?void 0:e.helperText)==null?void 0:X[x==null?void 0:x.type]})})]})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[_===!0&&o.jsx(Ri,{visibilty:_,closeSettingFieldSidebar:Y,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},xb=["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"],o4=/^\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 FF(t){try{JSON.parse(t)}catch{return!1}return!0}function kF(t){if(t<26)return xb[t];{const e=Math.floor(t/26)-1,n=t%26;return xb[e]+xb[n]}}const H0e=t=>{var pe,ie,J,Q,oe,ye,Te,Ae,be,we,re;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l}=t,{isPreview:c,isAdmin:u,isRenderView:d}=tn(),{task_status:f,taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,TASK_PUBLISHED:w}=Pr(),{userSelectedLanguage:x}=ln(),[S,E]=N.useState(!1),[C,_]=N.useState(""),[T,O]=N.useState(0),[F,B]=N.useState(!1),M=()=>{B(!0)},z=()=>{B(!1)};N.useEffect(()=>{S||ne();const U=Rt.addListener("clearRepeatableFields",K=>{K===(a==null?void 0:a.uuid)&&(_(""),O(0),e.isValid=0)}),Z=Rt.addListener("onSubmitUserForm",()=>{var K;(K=e==null?void 0:e.attributes)!=null&&K.required?C!==""&&o4.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Z.remove(),U.remove()}});const[P,H]=N.useState(!1),de=U=>{H(U)},fe=()=>{H(!1)},ne=()=>{var U,Z,K;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const he=[...a.repeatableFields],_e=Et.findIndex(he,function(ge){return ge.uuid===(e==null?void 0:e.uuid)});_e>=0&&he[_e].fieldData?_(he[_e].fieldData):_("")}}else{const he=A;if(he!=null&&he.length){for(const _e of he)if(_e.fieldId===t.field.uuid&&((U=_e==null?void 0:_e.postData[0])==null?void 0:U.postValue)!==""&&((Z=_e==null?void 0:_e.postData[0])!=null&&Z.postValue)){_((K=_e==null?void 0:_e.postData[0])==null?void 0:K.postValue),E(!0);break}}}E(!0)},W=U=>{_(U);const Z=A,K=Et.cloneDeep(h);if(Z!==null){if(U!==""&&o4.test(U)===!0){if(K[e==null?void 0:e.uuid]=U,(Z==null?void 0:Z.length)>0)for(const he of Z)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:U})}else if(delete K[e==null?void 0:e.uuid],(Z==null?void 0:Z.length)>0)for(const he of Z)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(K);const he=Object.keys(K).length;g(he)}},ae=(U,Z,K,he)=>{var _e;if(_(he),A!==null){const ge=[...A],ve=Et.findIndex(ge,function(Ne){return Ne.rowId===(a==null?void 0:a.uuid)});let Le=(_e=A[ve])==null?void 0:_e.repeatableFields;Le={...Le,[K==null?void 0:K.uuid]:he},ge[ve]={...ge[ve],repeatableFields:Le},v(ge),he!==""&&o4.test(he)===!0?e.isValid=1:e.isValid=0}},Y=o.jsxs("div",{onMouseOver:M,onMouseOut:z,children:[!d&&!c&&F&&o.jsx(Hr,{handleFieldSettingsSidebar:de,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(pe=e==null?void 0:e.headerText)==null?void 0:pe[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t,update:s,value:l}),((ie=e==null?void 0:e.attributes)==null?void 0:ie.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(J=e==null?void 0:e.label)==null?void 0:J[x==null?void 0:x.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-2",children:(e==null?void 0:e.showToolTip)&&o.jsx(o.Fragment,{children:o.jsx(Vi,{message:(Q=e==null?void 0:e.toolTip)==null?void 0:Q[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-"+((ye=(oe=e==null?void 0:e.icon)==null?void 0:oe.properties)==null?void 0:ye.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(Te=e==null?void 0:e.placeholder)==null?void 0:Te[x==null?void 0:x.type],value:C,onFocus:()=>O(1),onChange:U=>{a!=null&&a.rowIsRepeatable?ae(r,i,{uuid:e.uuid},U.target.value):W(U.target.value)},className:T===1&&((Ae=e==null?void 0:e.attributes)!=null&&Ae.required)?C?"valid":"invalid":"valid'",readOnly:f===w})]}),((be=e==null?void 0:e.attributes)==null?void 0:be.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!C?(we=e==null?void 0:e.validationMesssage)==null?void 0:we[x==null?void 0:x.language]:""})}),C!==""&&T===1&&o4.test(C)===!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(Fi,{...t})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Ri,{visibilty:P,closeSettingFieldSidebar:fe,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:Y})]})},z0e=t=>{var Q,oe,ye,Te,Ae,be,we,re,U;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l}=t,{isRenderView:c,isAdmin:u,isPreview:d}=tn(),{userSelectedLanguage:f,fieldSettingUpdate:h}=ln(),{task_status:m,taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:A,updateUserFormDataSubmit:w,userTaskSubmitFormData:x,TASK_PUBLISHED:S}=Pr(),[E,C]=N.useState(!1),[_,T]=N.useState(""),[O,F]=N.useState(0),[B,M]=N.useState(!1),[z,P]=N.useState(!1),[H,de]=N.useState(!1),fe=()=>{P(!0)},ne=()=>{P(!1)},W=Z=>{C(Z)},ae=()=>{C(!1)},Y=()=>{var K,he,_e;const Z=x;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const ge=[...l.repeatableFields],ve=Et.findIndex(ge,function(Le){return Le.uuid===(e==null?void 0:e.uuid)});ve>=0&&ge[ve].fieldData?T(ge[ve].fieldData):(e.isValid=0,T(""))}}else if(Z!=null&&Z.length){for(const ge of Z)if(ge.fieldId===t.field.uuid&&((K=ge==null?void 0:ge.postData[0])!=null&&K.postValue)&&((he=ge==null?void 0:ge.postData[0])==null?void 0:he.postValue)!==""){T((_e=ge==null?void 0:ge.postData[0])==null?void 0:_e.postValue),M(!0);break}}M(!0)},pe=(Z,K,he,_e)=>{var ge;if(x!=null&&x.length){const ve=[...x],Le=Et.findIndex(ve,function(me){return me.rowId===(l==null?void 0:l.uuid)});let Ne=(ge=x[Le])==null?void 0:ge.repeatableFields;Ne={...Ne,[he==null?void 0:he.uuid]:_e},ve[Le]={...ve[Le],repeatableFields:Ne},w(ve)}T(_e),_e!==""?e.isValid=1:e.isValid=0,h(Z,K,a,s,n,e)};N.useEffect(()=>{B||Y();const Z=Rt.addListener("clearRepeatableFields",ve=>{ve===(l==null?void 0:l.uuid)&&(T(""),F(0),e.isValid=0)}),K=Rt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required?_?e.isValid=1:e.isValid=0:e.isValid=1}),he=Rt.addListener("OnInvalidFieldCatch",ve=>{e.uuid===(ve==null?void 0:ve.fieldId)?F(1):F(0)}),_e=Rt.addListener("OnGetFieldValue",ve=>{var Ne;const Le=(Ne=ve==null?void 0:ve.repeatableColumn)==null?void 0:Ne.filter(me=>(me==null?void 0:me.fieldUuid)===(e==null?void 0:e.uuid));Le!=null&&Le.length}),ge=Rt.addListener("onUpdateField",()=>{de(!H)});return()=>{ge.remove(),K.remove(),he.remove(),_e.remove(),Z.remove()}});const ie=Z=>{var _e,ge;T(Z.target.value);const K=x,he=Et.cloneDeep(g);if(K!==null){if((_e=Z==null?void 0:Z.target)!=null&&_e.value){if(he[e==null?void 0:e.uuid]=(ge=Z==null?void 0:Z.target)==null?void 0:ge.value,(K==null?void 0:K.length)>0)for(const ve of K)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:Z.target.value})}else if(delete he[e==null?void 0:e.uuid],(K==null?void 0:K.length)>0)for(const ve of K)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){v(he);const ve=Object.keys(he).length;A(ve)}},J=o.jsxs("div",{onMouseOver:fe,onMouseOut:ne,children:[!c&&!d&&z&&o.jsx(Hr,{handleFieldSettingsSidebar:W,...t}),o.jsxs("div",{className:`field ${d?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?"card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"col-12 ":"col-12 field-form-builder ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Q=e==null?void 0:e.headerText)==null?void 0:Q[f==null?void 0:f.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(sa,{...t}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(o.Fragment,{children:(ye=e==null?void 0:e.label)==null?void 0:ye[f==null?void 0:f.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Vi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[f==null?void 0:f.type],position:"right"})})]}),o.jsx(Ds,{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:_,onFocus:()=>F(1),onChange:Z=>{l!=null&&l.rowIsRepeatable?pe(r,i,e,Z.target.value):ie(Z)},className:O===1&&((be=e==null?void 0:e.attributes)!=null&&be.required)?_?"valid":"invalid":"valid",readOnly:m===S}),o.jsx("div",{children:((we=e==null?void 0:e.attributes)==null?void 0:we.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(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:(U=e==null?void 0:e.helperText)==null?void 0:U[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Fi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Ri,{visibilty:E,closeSettingFieldSidebar:ae,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:J})]})},Y0e={},Cb=t=>{var T,O,F,B;const{isAdmin:e,isAdvanceView:n,isPreview:r}=tn(),{handleDrop:i}=ln(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,conditionIndex:f,ruleIndex:h,condition:m,page:g,section:v,row:A,column:w}=t,x=N.useRef(null),[{isDragging:S},E]=Ji({type:qC,item:{type:qC,uuid:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),C=S?0:1;E(x);const _=(M,z,P,H,de,fe,ne)=>{const W=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(jc,{type:"inline-conditional",field:M,data:M,path:z,page:g,section:v,row:A,column:w,pageIndex:P,sectionIndex:H,rowIndex:de,columnIndex:fe,fieldIndex:ne,isAdmin:e,fieldContainer:W},M.uuid)};return o.jsxs("div",{ref:r===!1?x:null,style:{...Y0e,opacity:C},className:"draggable column",children:[m&&((T=m.children)==null?void 0:T.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),m&&m.children&&((O=m.children)==null?void 0:O.length)>0&&m.children.map((M,z)=>{var P;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(Cr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${z}`,childrenCount:(P=m==null?void 0:m.children)==null?void 0:P.length,droppedField:m},onDrop:i}),_(M,`${s}-${h}-${f}-${z}`,l,c,u,d,z)]},M.uuid)}),r===!1&&o.jsx(Cr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(F=m==null?void 0:m.children)==null?void 0:F.length}`,childrenCount:(B=m==null?void 0:m.children)==null?void 0:B.length,droppedField:m},onDrop:i,isLast:!0})]})},t0=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:m}=t,{taskRegisterData:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,updateProgressDataValuesHook:w}=Pr(),x=N.useCallback((S,E,C)=>{var T,O,F;const _=A;if(_!=null&&_.length){const B=g,M=(T=a==null?void 0:a.inlineConditionalRules)==null?void 0:T.rules[E].conditions[C].children;for(const[P,H]of M.entries()){(O=H==null?void 0:H.attributes)!=null&&O.required;const de=Et.findIndex(_,function(fe){return fe.fieldId===H.uuid});S?de===-1&&(_.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:P,fieldId:H.uuid,fieldInputType:a.componentType,fieldTitle:(F=a.label)==null?void 0:F.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}),B[H==null?void 0:H.uuid]&&delete B[H==null?void 0:H.uuid]):(B[H==null?void 0:H.uuid]&&delete B[H==null?void 0:H.uuid],de>=0&&_.splice(de,1))}const z=Object.keys(B).length;w({progressMaxValue:_==null?void 0:_.length,progressValue:z}),v(_)}},[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,g,w,v,A]);return N.useEffect(()=>(x(m,r,i),()=>{}),[i,e,m,r,x]),o.jsx("div",{children:m&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(Cb,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};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 K0e(t,e){if(w2(t)!=="object"||t===null)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 X0e(t){var e=K0e(t,"string");return w2(e)==="symbol"?e:String(e)}function Tb(t,e,n){return e=X0e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var R0e={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return pt("p-tag p-component",Tb(Tb({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},G0e=`
|
|
2390
2390
|
@layer primereact {
|
|
2391
2391
|
.p-tag {
|
|
2392
2392
|
display: inline-flex;
|
|
@@ -58728,7 +58728,7 @@ const Li = (t) => {
|
|
|
58728
58728
|
label: "Advance Settings",
|
|
58729
58729
|
icon: "pi pi-cog",
|
|
58730
58730
|
onClick: () => {
|
|
58731
|
-
u(!0);
|
|
58731
|
+
console.log("opening sidebar"), console.log("handleFieldSettingsSidebar", u), u(!0);
|
|
58732
58732
|
},
|
|
58733
58733
|
className: "mr-3"
|
|
58734
58734
|
}
|
|
@@ -61931,7 +61931,7 @@ var che = function() {
|
|
|
61931
61931
|
theme: i.theme,
|
|
61932
61932
|
formats: i.formats
|
|
61933
61933
|
};
|
|
61934
|
-
che ? C(new Quill(d.current, M)) : import("./quill-
|
|
61934
|
+
che ? C(new Quill(d.current, M)) : import("./quill-sTG285Hp.js").then(function(z) {
|
|
61935
61935
|
if (z && Te.isExist(d.current)) {
|
|
61936
61936
|
var k;
|
|
61937
61937
|
z.default ? k = new z.default(d.current, M) : k = new z(d.current, M), C(k);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ml = Object.defineProperty;
|
|
2
2
|
var Dl = (n, t, e) => t in n ? Ml(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var T = (n, t, e) => (Dl(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
-
import { d as ti, i as Rr, a as Hi, b as Ul, e as Br, M as Pl, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as jl, n as Hl, o as Fi, p as $l, q as Fl, r as zl, s as Kl, t as ii, u as Gl, v as Vl, w as Ft, x as zi, y as xe } from "./main-
|
|
4
|
+
import { d as ti, i as Rr, a as Hi, b as Ul, e as Br, M as Pl, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as jl, n as Hl, o as Fi, p as $l, q as Fl, r as zl, s as Kl, t as ii, u as Gl, v as Vl, w as Ft, x as zi, y as xe } from "./main-B8lQbhww.js";
|
|
5
5
|
function Ki(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|