cft-builder 0.2.34 → 0.2.35
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-
|
|
1
|
+
import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-CTBSh-M1.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BuilderItems,
|
|
4
4
|
o as BuilderItemsRender,
|
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -2374,7 +2374,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2374
2374
|
}
|
|
2375
2375
|
}
|
|
2376
2376
|
`}}),li=y.forwardRef(function(t,e){var n=jn(),r=y.useContext(rr),i=M3.getProps(t,r),a=y.useState(i.id),s=uN(a,2),l=s[0],c=s[1],u=y.useState(i.collapsed),d=uN(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",S=l+"_content",C=M3.setMetaData({props:i,state:{id:l,collapsed:v}}),w=C.ptm,T=C.cx,x=C.isUnstyled;fi(M3.css.styles,x,{name:"panel"});var _=function(W){i.toggleable&&(v?E(W):D(W),W&&(i.onToggle&&i.onToggle({originalEvent:W,value:!v}),W.preventDefault()))},E=function(W){i.onToggle||h(!1),i.onExpand&&W&&i.onExpand(W)},D=function(W){i.onToggle||h(!0),i.onCollapse&&W&&i.onCollapse(W)};y.useImperativeHandle(e,function(){return{props:i,toggle:_,expand:E,collapse:D,getElement:function(){return m.current},getContent:function(){return g.current}}}),ki(function(){l||c(jo())});var V=function(){if(i.toggleable){var W=l+"_label",re=n({className:T("toggler"),onClick:_,id:W,"aria-controls":S,"aria-expanded":!v,type:"button",role:"button","aria-label":i.header},w("toggler")),Y=n(w("togglericon")),me=v?i.expandIcon||y.createElement(Hm,Y):i.collapseIcon||y.createElement(v8,Y),ee=Qn.getJSXIcon(me,Y,{props:i,collapsed:v});return y.createElement("button",re,ee,y.createElement(Wt,null))}return null},L=function(){var W=Pe.getJSXElement(i.header,i),re=Pe.getJSXElement(i.icons,i),Y=V(),me=n({id:A,className:T("title")},w("title")),ee=y.createElement("span",me,W),ae=n({className:T("icons")},w("icons")),K=y.createElement("div",ae,re,Y),se=n({className:T("header")},w("header")),fe=y.createElement("div",se,ee,K);if(i.headerTemplate){var be={className:"p-panel-header",titleClassName:"p-panel-title",iconsClassName:"p-panel-icons",togglerClassName:"p-panel-header-icon p-panel-toggler p-link",onTogglerClick:_,titleElement:ee,iconsElement:K,togglerElement:Y,element:fe,id:l+"_header",props:i,collapsed:v};return Pe.getJSXElement(i.headerTemplate,be)}else if(i.header||i.toggleable)return fe;return null},F=function(){var W=Pe.getJSXElement(i.footer,i),re=n({className:T("footer")},w("footer")),Y=y.createElement("div",re,W);if(i.footerTemplate){var me={className:T("footer"),element:Y,props:i};return Pe.getJSXElement(i.footerTemplate,me)}else if(i.footer)return Y;return null},$=function(){var W=n({ref:g,className:T("toggleableContent"),"aria-hidden":v,role:"region",id:S,"aria-labelledby":A},w("toggleablecontent")),re=n({className:T("content")},w("content")),Y=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!v,unmountOnExit:!0,options:i.transitionOptions},w("transition"));return y.createElement(zo,V7({nodeRef:g},Y),y.createElement("div",W,y.createElement("div",re,i.children)))},M=n({id:l,ref:m,style:i.style,className:pt(i.className,T("root"))},M3.getOtherProps(i),w("root")),H=L(),pe=$(),he=F();return y.createElement("div",M,H,pe,he)});li.displayName="Panel";const Moe=t=>{var g;const{fieldState:e,setFieldState:n,pageIndex:r,formBuilderFormLayout:i,pageSettingUpdate:a}=t,s=(v,A)=>{const S=`${v.className} justify-content-start`,C=`${v.titleClassName} pl-1`;return o.jsxs("div",{className:S,children:[o.jsx(Pt,{text:!0,icon:"pi pi-trash",className:v.togglerClassName,onClick:()=>c(A),"aria-label":"Submit"}),o.jsx("span",{className:C,children:`Rule ${A+1}`})]})},l=(v,A)=>{var C;const S=[...((C=e==null?void 0:e.conditionalTabRules)==null?void 0:C.rules)||[]];S[v].conditions=S[v].conditions.filter((w,T)=>A!==T),n(w=>({...w,conditionalTabRules:{...w.conditionalTabRules,rules:S}}))},c=v=>{var w;const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]],S=A.filter((T,x)=>v!==x);n(T=>({...T,conditionalTabRules:{...T.conditionalTabRules,rules:S}}));const C=A[v];(w=C==null?void 0:C.conditions)==null||w.map(T=>{const x=i?Ct.findIndex(i,E=>{var D;return(E==null?void 0:E.uuid)===((D=T==null?void 0:T.tab)==null?void 0:D.uuid)}):-1,_=i[x];_&&(_.isHidden=!1,a(x,_))})};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,S)=>{const C=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];C[A].conditions[S].option=v==null?void 0:v.value,n(w=>({...w,conditionalTabRules:{...w.conditionalTabRules,rules:C}}))},f=(v,A,S)=>{const C=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];C[A].conditions[S].tab=v==null?void 0:v.value,n(x=>({...x,conditionalTabRules:{...x.conditionalTabRules,rules:C}}));const w=Ct.findIndex(i,x=>{var _;return(x==null?void 0:x.uuid)===((_=v==null?void 0:v.value)==null?void 0:_.uuid)}),T=i[w];T&&(T.isHidden=!0,a(w,T))},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(S=>({...S,conditionalTabRules:{...S.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(li,{className:"mb-3",header:`Rule ${A+1}`,headerTemplate:S=>s(S,A),children:o.jsxs("div",{children:[v==null?void 0:v.conditions.map((S,C)=>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",S.value]})}),o.jsx("div",{className:"col-3 p-fluid",children:o.jsx(Sa,{value:S.tab,options:u,onChange:w=>f(w,A,C),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(Sa,{value:S==null?void 0:S.option,options:e==null?void 0:e.options,onChange:w=>d(w,A,C),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(Pt,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>l(A,C),tooltipOptions:{position:"top"}})})]})},C)),o.jsx(Pt,{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(Pt,{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"})]})},Loe=t=>{var w;const{fieldState:e,setFieldState:n,section:r,formBuilderFormLayout:i,sectionSettingUpdate:a,page:s}=t,[l]=N.useState([]),{schemaBuilderUpdate:c,formBuilderFormSchema:u}=sn(),d=(T,x)=>{const _=`${T.className} justify-content-start`,E=`${T.titleClassName} pl-1`;return o.jsxs("div",{className:_,children:[o.jsx(Pt,{text:!0,icon:"pi pi-trash",className:T.togglerClassName,onClick:()=>f(x),"aria-label":"Submit"}),o.jsx("span",{className:E,children:`Rule ${x+1}`})]})},f=T=>{var D;const x=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],_=x[T];(D=_==null?void 0:_.conditions)==null||D.map(V=>{var $;const L=Ct.findIndex(i,M=>{var H;return(M==null?void 0:M.uuid)===((H=V==null?void 0:V.tab)==null?void 0:H.uuid)}),F=i?Ct.findIndex(i[L].children,M=>{var H;return(M==null?void 0:M.uuid)===((H=V==null?void 0:V.section)==null?void 0:H.uuid)}):-1;if(F>=0){const M=($=i[L])==null?void 0:$.children[F];M&&(M.isHidden=!1,a(L,F,M))}});const E=x.filter((V,L)=>T!==L);n(V=>({...V,conditionalSectionRules:{...V.conditionalSectionRules,rules:E}}))},h=T=>{var E;let x=!1;const _=i?i.filter(function(D){return(D==null?void 0:D.uuid)===(T==null?void 0:T.uuid)}):[];return(_==null?void 0:_.length)>0&&((E=_[0].children)==null?void 0:E.length)>1&&(x=!0),x},m=(T,x,_)=>{const E=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];E[x].conditions[_].option=T==null?void 0:T.value,n(D=>({...D,conditionalSectionRules:{...D.conditionalSectionRules,rules:E}}))},g=(T,x)=>{var D;const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],E=_[T];(D=E==null?void 0:E.conditions)==null||D.map(V=>{var M;const L=Ct.findIndex(i,H=>{var pe;return(H==null?void 0:H.uuid)===((pe=V==null?void 0:V.tab)==null?void 0:pe.uuid)}),F=i?Ct.findIndex(i[L].children,H=>{var pe;return(H==null?void 0:H.uuid)===((pe=V==null?void 0:V.section)==null?void 0:pe.uuid)}):-1,$=(M=i[L])==null?void 0:M.children[F];console.log("sectionData",$),$&&($.isHidden=!1,console.log("sectionData",$),a(L,F,$))}),_[T].conditions=_[T].conditions.filter((V,L)=>x!==L),n(V=>({...V,conditionalSectionRules:{...V.conditionalSectionRules,rules:_}}))},v=(T,x,_)=>{var $,M;const E=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];E[x].conditions[_].section=T==null?void 0:T.value;const D=(M=($=E[x].conditions[_])==null?void 0:$.tab)==null?void 0:M.uuid,V=Ct.findIndex(i,H=>(H==null?void 0:H.uuid)===D);n(H=>({...H,conditionalSectionRules:{...H.conditionalSectionRules,rules:E}}));const L=i?Ct.findIndex(i[V].children,H=>{var pe;return(H==null?void 0:H.uuid)===((pe=T==null?void 0:T.value)==null?void 0:pe.uuid)}):-1,F=i[V].children[L];F&&(F.isHidden=!0,a(V,L,F))},A=T=>{const x=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];x[T].conditions=[...x[T].conditions,{option:null,tab:{title:s==null?void 0:s.title,uuid:s==null?void 0:s.uuid},section:null}],n(_=>({..._,conditionalSectionRules:{..._.conditionalSectionRules,rules:x}}))},S=()=>{n(x=>({...x,conditionalSectionRules:{...x.conditionalSectionRules,rules:[...x.conditionalSectionRules.rules,{uuid:rt(),conditions:[]}]}}));const T=[...(u==null?void 0:u.conditionalSectionsRules)||[]];c({conditionalSectionsRules:[...T,{fieldId:e==null?void 0:e.uuid,uuid:rt(),conditions:[]}]})},C=T=>{var _;const x=i==null?void 0:i.filter(function(E){return(E==null?void 0:E.uuid)===(T==null?void 0:T.uuid)});if(x&&(x==null?void 0:x.length)>0){const E=(_=x[0])==null?void 0:_.children.filter(function(D){return(D==null?void 0:D.uuid)!==(r==null?void 0:r.uuid)});if((E==null?void 0:E.length)>0)return E}return l};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Sections"}),(w=e==null?void 0:e.conditionalSectionRules)==null?void 0:w.rules.map((T,x)=>o.jsx(li,{className:"mb-3",header:`Rule ${x+1}`,headerTemplate:_=>d(_,x),children:o.jsxs("div",{children:[T==null?void 0:T.conditions.map((_,E)=>{var D,V;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:(V=(D=_==null?void 0:_.tab)==null?void 0:D.title)==null?void 0:V.english})]}),o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsxs("label",{children:["Select section",_.value]}),o.jsx(Sa,{disabled:!h(_==null?void 0:_.tab),value:_.section,options:C(_.tab),onChange:L=>v(L,x,E),optionLabel:"heading.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-4 p-fluid",children:["when option is selected",o.jsx(Sa,{disabled:!h(_==null?void 0:_.tab),value:_==null?void 0:_.option,options:e==null?void 0:e.options,onChange:L=>m(L,x,E),optionLabel:"optionText.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-1",children:[o.jsx("br",{}),o.jsx(Pt,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>g(x,E),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"]})})]})},E)}),o.jsx("div",{children:o.jsx("div",{className:"flex",children:o.jsx(Pt,{text:!0,className:"btn-sm mt-3 ",label:"+ Add Condition",onClick:()=>A(x),size:"small"})})})]})},x)),o.jsx(Pt,{text:!0,icon:"pi pi-plus",onClick:()=>S(),className:"p-mt-4",label:"Add Rule",size:"small"})]})},Boe=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(Pt,{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(li,{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(Sa,{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(Pt,{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(Pt,{text:!0,onClick:()=>l(f),className:"p-mt-4",icon:"pi pi-plus",label:"Add Condition",size:"small"})]})},f)),o.jsx(Pt,{text:!0,onClick:()=>c(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"})]})},Voe=t=>{const{fieldState:e,pageIndex:n,section:r,setFieldState:i,page:a}=t,{pageSettingUpdate:s,formBuilderFormLayout:l,sectionSettingUpdate:c}=sn();return o.jsx(o.Fragment,{children:o.jsxs("div",{className:" scroll-height-250",children:[o.jsx(Boe,{fieldState:e,setFieldState:i}),o.jsx("hr",{}),o.jsx(Moe,{fieldState:e,setFieldState:i,pageIndex:n,formBuilderFormLayout:l,pageSettingUpdate:s}),o.jsx("hr",{}),o.jsx(Loe,{fieldState:e,setFieldState:i,section:r,formBuilderFormLayout:l,sectionSettingUpdate:c,page:a}),o.jsx("hr",{})]})})},Uoe=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}=Qt(),g=()=>{h(!0)},v=()=>{var H;const $=((H=e==null?void 0:e.reviewerChecklist)==null?void 0:H.length)>=0?[...e.reviewerChecklist]:[];$.push({uuid:rt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const M={...e,reviewerChecklist:$};n(pe=>({...pe,...M})),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},S=$=>{const M=[...e.reviewerChecklist];M.splice($,1);const H={...e,reviewerChecklist:M};n(pe=>({...pe,...H}))},C=($,M)=>{c(!0);const{checklist:H,action:pe}=$;h(!0),d(M),setTimeout(()=>{i(H),s(pe)},1e3)},w=($,M)=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>C($,M==null?void 0:M.rowIndex)}),o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>S(M==null?void 0:M.rowIndex)})]}),T=$=>{var M;return o.jsx(o.Fragment,{children:(M=$==null?void 0:$.action)==null?void 0:M.length})},x=$=>{const M=[...a];M.splice($,1),s(M)},_=()=>{const $=[...e.reviewerChecklist];$[u]={checklist:r,action:a};const M={...e,reviewerChecklist:$};n(H=>({...H,...M})),h(!1),c(!1)},E=()=>o.jsx("div",{children:l?o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{_()}}):o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{v()}})}),D=$=>{n(M=>({...M,reviewerChecklist:$==null?void 0:$.value}))},V=$=>{navigator.clipboard.writeText(JSON.stringify($))};function L($){try{JSON.parse($)}catch{return!1}return!0}const F=async()=>{var H;const $=await navigator.clipboard.readText();let M="";if(L($)){const pe=JSON.parse($);if((H=pe[0])!=null&&H.checklist){const he={...Ct.cloneDeep(e),reviewerChecklist:pe};n(Z=>({...Z,...he}));return}else M="Empty or Invalid Schema"}else M="Invalid Schema";m({showToast:!0,toastMessage:M,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsx(Is,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:E(),children:o.jsxs("div",{className:"scroll-height-500",children:[o.jsx("h5",{children:"Checklist"}),o.jsx(_s,{rows:2,cols:50,value:r,onChange:$=>{var M;i((M=$==null?void 0:$.target)==null?void 0:M.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map(($,M)=>o.jsxs("div",{children:[M+1,"."," ",o.jsx(_s,{value:$,onChange:H=>{var he;const pe=[...a];pe[M]=(he=H==null?void 0:H.target)==null?void 0:he.value,s(pe)},rows:2,cols:50})," ",o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>x(M)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${M}`)),o.jsx(Pt,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(Pt,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{g()}}),o.jsx(Pt,{text:!0,label:"Copy Schema ",onClick:()=>{V([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(Pt,{text:!0,label:"Paste Checklist ",onClick:()=>{F()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(zs,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:D,scrollable:!0,children:[o.jsx(dr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(dr,{field:"checklist",header:"Checklist"}),o.jsx(dr,{field:"actions",header:"Actions",body:$=>T($)}),o.jsx(dr,{header:"",body:($,M)=>w($,M)})]})})]})},qoe=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(nn,{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(nn,{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(nn,{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(nn,{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(nn,{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(nn,{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(nn,{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}})]})]})},$oe=t=>{var c,u,d;const{fieldState:e,setFieldState:n}=t,{formBuilderSchemaLanguages:r}=sn(),i=()=>{n(f=>Object.assign({},f,{options:[...f.options,{uuid:rt(),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(Sa,{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(Sa,{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(io,{activeIndex:0,children:r!=null&&r.length?r.map((f,h)=>o.jsx(ro,{tabIndex:h,header:f==null?void 0:f.language,children:o.jsx(lN,{enableCopyPaste:!0,isCustomValue:!0,fieldState:e,setFieldState:n,language:f})},h)):""})}),o.jsx(Pt,{text:!0,className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>i(),"aria-label":"Add"})]})})]})},joe=t=>{var u,d;const{option:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t,{userSelectedLanguage:s}=sn(),l=[{type:"radio",label:"Radio"},{type:"text",label:"Input Text"},{type:"text-area",label:"Text Area"},{type:"date",label:"Date Field"}],c=(f,h)=>{var 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(Pt,{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(Pt,{text:!0,label:"Add Field",onClick:()=>{i(e==null?void 0:e.uuid)}}),o.jsx(Ya,{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(fr,{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(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(li,{header:"Text Settings",toggleable:!0,collapsed:!0,children:o.jsx("div",{className:"",children:o.jsx(iO,{language:s,fieldState:f,onHandleChange:(v,A,S)=>{r(f==null?void 0:f.uuid,{[v]:{[A==null?void 0:A.type]:S}})}})})})}),(f==null?void 0:f.type)==="radio"&&o.jsx(fr,{header:"Radio",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(U7,{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}`)}))})]})]})},U7=t=>{var s,l;const{fieldState:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t;return o.jsx(o.Fragment,{children:o.jsx(Ya,{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(fr,{header:`Option - ${c==null?void 0:c.label}`,children:o.jsx(joe,{option:c,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})},`hirarchey-option-${u}`)))})})};var dN={},zoe=Oi&&Oi.__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)}}(),L3=Oi&&Oi.__assign||function(){return L3=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},L3.apply(this,arguments)},Hoe=Oi&&Oi.__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]}),Yoe=Oi&&Oi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fN=Oi&&Oi.__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)&&Hoe(e,t,n);return Yoe(e,t),e},Koe=Oi&&Oi.__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},Xoe=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dN,"__esModule",{value:!0});var q7=fN(N),Goe=Xoe(V_),Zu=fN(ra);function hN(t){return t&&t.replace(/ |\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function Roe(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 Woe=function(t){zoe(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}:q7.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=Koe(r,["tagName","html","innerRef"]);return q7.createElement(i||"div",L3(L3({},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||hN(n.html)!==hN(i.innerHTML)?!0:r.disabled!==n.disabled||r.tagName!==n.tagName||r.className!==n.className||r.innerRef!==n.innerRef||r.placeholder!==n.placeholder||!(0,Goe.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,Roe(n))},e.propTypes={html:Zu.string.isRequired,onChange:Zu.func,disabled:Zu.bool,tagName:Zu.string,className:Zu.string,style:Zu.object,innerRef:Zu.oneOfType([Zu.object,Zu.func])},e}(q7.Component),B3=dN.default=Woe;const Qoe=t=>{var S;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}=sn(),v=(C,w,T)=>{d(x=>({...x,[C]:{...x[C],[w==null?void 0:w.type]:T}}))};N.useEffect(()=>(A(),()=>{}),[u]);const A=()=>{const C=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?m(C[oa],C[la],C[fa],C[ha],C[pa],C[wa],C[$o],C[yo],u):(C==null?void 0:C.length)>wa&&(C==null?void 0:C.length)===Bl+1&&(n!=null&&n.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?g(C[oa],C[la],C[fa],C[ha],C[pa],C[5],C[6],C[7],u):h(i,a,s,l,r,{...n,label:u==null?void 0:u.label})};return o.jsx(o.Fragment,{children:o.jsx(B3,{style:{display:"inline-block"},className:"builder-input-label-edit",innerRef:e,html:(S=n==null?void 0:n.label)==null?void 0:S[f==null?void 0:f.type],disabled:!1,onChange:C=>{var w;v("label",f,(w=C==null?void 0:C.target)==null?void 0:w.value)},tagName:"article"})})},ia=t=>{const{sectionIndex:e,fieldIndex:n}=t,{formBuilderFormSchema:r}=sn();return(r==null?void 0:r.enableFieldEnumeration)===!0?o.jsx("span",{className:"mr-2",children:o.jsx(i7,{classes:"font-medium p-1 bg-primary",level:"purple",value:`${e+1}.${n+1}`})}):o.jsx(o.Fragment,{})},$7=t=>{var d,f,h,m,g,v,A,S,C,w,T,x,_,E;const{field:e,update:n,value:r,isFirst:i,isDisabled:a}=t,{isPreview:s}=Qt(),{userSelectedLanguage:l}=sn(),[c,u]=N.useState(0);return N.useEffect(()=>{const D=Kt.addListener("onSubmitUserForm",()=>{var L;(L=e==null?void 0:e.attributes)!=null&&L.required?r!=null&&r[e.uuid]?e.isValid=1:e.isValid=0:e.isValid=1}),V=Kt.addListener("OnInvalidFieldCatch",L=>{(e==null?void 0:e.uuid)===(L==null?void 0:L.fieldId)?u(1):u(0)});return()=>{D.remove(),V.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(ia,{...t}),((d=e==null?void 0:e.attributes)==null?void 0:d.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(o.Fragment,{children:(f=e==null?void 0:e.label)==null?void 0:f[l==null?void 0:l.type]}):o.jsx(Qoe,{...t})]}),((h=e==null?void 0:e.options)==null?void 0:h.length)&&((m=e==null?void 0:e.options)==null?void 0:m.map(D=>{var V,L;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex align-items-center mb-2",children:[o.jsx(Zi,{inputId:D.uuid,name:e==null?void 0:e.uuid,value:D.uuid,onChange:F=>n(e==null?void 0:e.uuid,F==null?void 0:F.value),checked:(r==null?void 0:r[e.uuid])===D.uuid,disabled:a}),o.jsx("label",{htmlFor:D.uuid,className:"ml-2",children:D.label})]}),(D==null?void 0:D.enableConditionalField)===!0&&(r==null?void 0:r[e==null?void 0:e.uuid])===(D==null?void 0:D.uuid)&&(D==null?void 0:D.children)&&((V=D==null?void 0:D.children)==null?void 0:V.length)>0&&((L=D==null?void 0:D.children)==null?void 0:L.map(()=>o.jsx($7,{...t},`radio_child_${r==null?void 0:r[e==null?void 0:e.uuid]}`)))]},`${D.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:[" ",((g=e==null?void 0:e.attributes)==null?void 0:g.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(gn,{className:"mt-2",onChange:D=>{var V;return n(e==null?void 0:e.uuid,(V=D==null?void 0:D.target)==null?void 0:V.value)},value:r==null?void 0:r.uuid,placeholder:(v=e==null?void 0:e.placeholder)==null?void 0:v[l==null?void 0:l.type]})]})}),(e==null?void 0:e.type)==="date"&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((A=e==null?void 0:e.attributes)==null?void 0:A.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(Z1,{className:"mt-2",onChange:D=>{var V;return n(e==null?void 0:e.uuid,(V=D==null?void 0:D.target)==null?void 0:V.value)},value:r==null?void 0:r.uuid,placeholder:(S=e==null?void 0:e.placeholder)==null?void 0:S[l==null?void 0:l.type]})]})}),(e==null?void 0:e.type)==="text-area"&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[l==null?void 0:l.type]]}),o.jsx(_s,{className:"mt-2",onChange:D=>{var V;return n(e==null?void 0:e.uuid,(V=D==null?void 0:D.target)==null?void 0:V.value)},value:r==null?void 0:r.uuid,placeholder:(w=e==null?void 0:e.placeholder)==null?void 0:w[l==null?void 0:l.type]})]})}),o.jsx("div",{children:((T=e==null?void 0:e.helperText)==null?void 0:T[l==null?void 0:l.type])!==""&&o.jsx("small",{children:(x=e==null?void 0:e.helperText)==null?void 0:x[l==null?void 0:l.type]})}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:c===1&&!(r!=null&&r[e.uuid])?(E=e==null?void 0:e.validationMesssage)==null?void 0:E.language:""})})]},`${e==null?void 0:e.uuid}-radio`)},Joe=t=>{const{hirarechicalRadioSchemaState:e}=t,[n,r]=N.useState({});return o.jsx("div",{children:o.jsx($7,{schema:e,field:e,update:(i,a)=>{const s={...n};s[i]=a,r(s)},value:n,sectionIndex:0,fieldIndex:0,pageIndex:0,rowIndex:0,columnIndex:0,path:""})})},j7={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},Zoe={uuid:rt(),...j7,type:"radio",value:null,options:[{uuid:rt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:rt(),label:"No",value:null,enableConditionalField:!0,children:[]}]};({uuid:rt(),...j7,options:(rt(),{uuid:rt(),...j7,options:(rt(),rt())},rt())});const ele=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,{...Zoe,isValid:0,uuid:rt(),options:[{uuid:rt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:rt(),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(U7,{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(Joe,{hirarechicalRadioSchemaState:e})]})]})})})},Xi=t=>{var ee,ae;const{formBuilderFormSchema:e,fieldSettingUpdate:n,fieldSettingUpdateInlineConditional:r,formBuilderSchemaLanguages:i,pageSettingUpdate:a,formBuilderFormLayout:s,formBuilderPublishedStatus:l,gridComponentFieldSettingUpdate:c}=sn(),{renderType:u}=Qt(),{visibilty:d,field:f,closeSettingFieldSidebar:h,pageIndex:m,sectionIndex:g,rowIndex:v,columnIndex:A,fieldIndex:S,path:C,row:w}=t,{updateGlobalToast:T}=Qt(),[x,_]=N.useState(f),E=C.split("-"),D=()=>{const K=C.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?r(K[oa],K[la],K[fa],K[ha],K[pa],K[wa],K[$o],K[yo],x):(K==null?void 0:K.length)>wa&&(K==null?void 0:K.length)===Bl+1&&(x!=null&&x.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?c(K[oa],K[la],K[fa],K[ha],K[pa],K[5],K[6],K[7],x):(n(m,g,v,A,S,x),setTimeout(()=>{Kt.emit("OnSignatureSettingChange",{})},1e3),setTimeout(()=>{Kt.emit("onUpdateField",{})},1e3)),T({showToast:!0,toastMessage:"Updated",toastDetail:"Field Updated",toastType:"success"})},V=(K,se,fe)=>{_(be=>({...be,[K]:{...be[K],[se==null?void 0:se.type]:fe}}))},L=(K,se)=>{_(fe=>({...fe,attributes:{...fe.attributes,[K]:se}}))},F=(K,se)=>{_(fe=>({...fe,[K]:se}))},$=(K,se)=>{_(fe=>({...fe,inlineConditional:{...fe.inlineConditional,[K]:se}}))},M=()=>{},H=()=>{_(K=>({...K,data:[...K.data,{uuid:rt(),dataKey:"",value:""}]}))},pe=()=>{_(K=>Object.assign({},K,{options:[...K.options,{uuid:rt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},he=()=>{},Z=()=>{},W=()=>{},re=()=>{},Y=K=>{var Ae;const se=[...(x==null?void 0:x.conditionalTabRules.rules)||[]],fe=se.filter((we,Ie)=>K!==Ie);_(we=>({...we,conditionalTabRules:{...we.conditionalTabRules,rules:fe}}));const be=se[K];(Ae=be==null?void 0:be.conditions)==null||Ae.map(we=>{const Ie=Ct.findIndex(s,q=>{var te;return(q==null?void 0:q.uuid)===((te=we==null?void 0:we.tab)==null?void 0:te.uuid)}),ne=s[Ie];ne&&(ne.isHidden=!1,a(Ie,ne))})},me=(K,se)=>{const fe=[...(x==null?void 0:x.conditionalTabRules.rules)||[]];fe[K].conditions=fe[K].conditions.filter((be,Ae)=>se!==Ae),_(be=>({...be,conditionalTabRules:{...be.conditionalTabRules,rules:fe}}))};return o.jsx(o.Fragment,{children:o.jsxs(Eo,{style:{width:"80vw",zIndex:7e3},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:[(ee=f==null?void 0:f.label)==null?void 0:ee.english," "]})]}),!l&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Pt,{className:"mt-3",label:"Update",onClick:()=>D(),"aria-label":"Update"})})]}),o.jsx("div",{className:" mt-4",children:o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(io,{activeIndex:0,children:i!=null&&i.length?i.map((K,se)=>o.jsx(ro,{tabIndex:se,header:K==null?void 0:K.language,children:o.jsx(iO,{language:K,fieldState:x,onHandleChange:V,...t})},se)):""})})}),(x==null?void 0:x.isValidationTabEnabled)===!0&&o.jsx(fr,{header:"Validation",children:o.jsx(hre,{fieldState:x,onHandleChangeLayoutSettings:F,onHandleChangeAttributesSetttings:L,...t})}),o.jsx(fr,{header:"Attributes",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(pre,{fieldState:x,onHandleChangeLayoutSettings:F,onHandleChangeAttributesSetttings:L})})}),(x==null?void 0:x.isLayoutTabEnabled)===!0&&o.jsx(fr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(mre,{fieldState:x,onHandleChangeLayoutSettings:F})})}),(x==null?void 0:x.isDynamicListingTabEnabled)===!0&&o.jsx(fr,{header:"Dynamic Options",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx($oe,{fieldState:x,setFieldState:_})})}),(x==null?void 0:x.options)!==void 0&&(x==null?void 0:x.data)&&o.jsx(fr,{header:"Data",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(vre,{onHandleChangeLayoutSettings:F,fieldState:x,setFieldState:_}),o.jsx(Pt,{className:"mr-3",label:"Data Option",icon:"pi pi-plus",onClick:()=>H(),"aria-label":"Add"})]})}),o.jsx(fr,{header:"Table view options",children:o.jsx(qoe,{fieldState:x,onHandleChangeLayoutSettings:F})}),(x==null?void 0:x.componentType)!=="radio-hierarchal"&&(x==null?void 0:x.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsxs(fr,{header:"Options",children:[(x==null?void 0:x.componentType)!=="radio-hierarchal"&&o.jsx("div",{className:"flex justify-content-end",children:o.jsx(Pt,{className:"mr-3 mb-2",label:"Option",icon:"pi pi-plus",onClick:()=>pe(),"aria-label":"Option"})}),o.jsxs("div",{className:"scroll-height-200 px-4",children:[o.jsx(io,{activeIndex:0,children:i!=null&&i.length?i.map((K,se)=>o.jsx(ro,{tabIndex:se,header:K==null?void 0:K.language,children:o.jsx(lN,{enableAbbreviationColumn:(x==null?void 0:x.componentType)!=="radio-hierarchal",enableHyperTextColumn:(x==null?void 0:x.componentType)!=="radio-hierarchal",enableAddNewColumn:(x==null?void 0:x.componentType)!=="radio-hierarchal",enableCopyPaste:(x==null?void 0:x.componentType)!=="radio-hierarchal",isCustomValue:!1,fieldState:x,setFieldState:_,language:K})},se)):""}),(x==null?void 0:x.isHierarchalCondionalTabEnabled)===!0&&o.jsx(U7,{fieldState:x,onHandleChangeLayoutSettings:F,removeChildrenField:re,addChildrenField:W,updateChildrenField:Z,updateCondtionOption:he})]})]}),(x==null?void 0:x.componentType)==="radio-hierarchal"&&(x==null?void 0:x.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsx(fr,{header:"Hierarchal Options",children:o.jsx(ele,{fieldState:x,setFieldState:_})}),u===n7&&(x==null?void 0:x.inlineConditionalRules)!==void 0&&!(w!=null&&w.rowIsRepeatable)&&(E==null?void 0:E.length)<yo+1&&o.jsx(fr,{header:"Conditional",children:o.jsx(Voe,{handleRemoveConditionalTabRule:Y,handleRemoveConditionalTabRuleCondition:me,onHandleSelectInlineConditionalOption:M,onHandleChangeLayoutSettings:F,onHandleChangeInlineConditionaltSetttings:$,fieldState:x,setFieldState:_,pageIndex:m,sectionIndex:g,...t})}),!((ae=t==null?void 0:t.row)!=null&&ae.rowIsRepeatable)&&(e==null?void 0:e.enableReviewTask)===!0&&o.jsx(fr,{header:"Admin",children:o.jsx(Uoe,{fieldState:x,setFieldState:_})})]})})]})})},Ni=t=>{const[e,n]=N.useState(null),{field:r}=t,{userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=mr();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(Ya,{children:o.jsx(fr,{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,S,C;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:w=>{l(w,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:w=>{l(w,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((w,T)=>{var x;return o.jsxs("div",{children:[o.jsx(Or,{value:w,checked:((x=h==null?void 0:h.selectAction)==null?void 0:x.length)>0?h==null?void 0:h.selectAction.some(_=>_===w):!1,onChange:_=>{c(m,_)}})," ",w," ",o.jsx("br",{}),o.jsx("br",{})]},`action-${m}-${T}`)})),o.jsx(Or,{checked:(A=h==null?void 0:h.other)==null?void 0:A.isOther,onChange:w=>{u(w,m)}})," Other ",o.jsx("br",{}),o.jsx("br",{}),((S=h==null?void 0:h.other)==null?void 0:S.isOther)===!0&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"If other please specify the action point"}),o.jsx("br",{}),o.jsx(_s,{className:"mt-3",value:(C=h==null?void 0:h.other)==null?void 0:C.description,onChange:w=>d(w,m)})]})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Feedback "}),o.jsx("br",{}),o.jsx(_s,{className:"mt-3",value:h==null?void 0:h.reviewerFeedback,onChange:w=>f(w,"reviewerFeedback",m)})]}),o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Comments / Notes (internal use only)"}),o.jsx("br",{}),o.jsx(_s,{className:"mt-3",value:h==null?void 0:h.reviewerComments,onChange:w=>f(w,"reviewerComments",m)})]})]})},`checklistIndex-${m}`)}))})})})})})},wi=t=>{const{isPreview:e,field:n,isAdmin:r,fieldWrap:i}=t,{userSelectedLanguage:a}=sn(),{globalAlignment:s}=Qt(),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(Wt,{})]}),o.jsx("span",{className:A,children:d})]})},{TASK_PUBLISHED:c,task_status:u}=mr(),[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(li,{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:pN,setPrototypeOf:gN,isFrozen:tle,getPrototypeOf:nle,getOwnPropertyDescriptor:rle}=Object;let{freeze:Io,seal:jl,create:mN}=Object,{apply:z7,construct:H7}=typeof Reflect<"u"&&Reflect;Io||(Io=function(e){return e}),jl||(jl=function(e){return e}),z7||(z7=function(e,n,r){return e.apply(n,r)}),H7||(H7=function(e,n){return new e(...n)});const V3=hl(Array.prototype.forEach),vN=hl(Array.prototype.pop),i2=hl(Array.prototype.push),U3=hl(String.prototype.toLowerCase),Y7=hl(String.prototype.toString),bN=hl(String.prototype.match),a2=hl(String.prototype.replace),ile=hl(String.prototype.indexOf),ale=hl(String.prototype.trim),Sc=hl(Object.prototype.hasOwnProperty),_o=hl(RegExp.prototype.test),s2=sle(TypeError);function hl(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 z7(t,e,r)}}function sle(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return H7(t,n)}}function hi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U3;gN&&gN(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const a=n(i);a!==i&&(tle(e)||(e[r]=a),i=a)}t[i]=!0}return t}function ole(t){for(let e=0;e<t.length;e++)Sc(t,e)||(t[e]=null);return t}function e1(t){const e=mN(null);for(const[n,r]of pN(t))Sc(t,n)&&(Array.isArray(r)?e[n]=ole(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=e1(r):e[n]=r);return e}function q3(t,e){for(;t!==null;){const r=rle(t,e);if(r){if(r.get)return hl(r.get);if(typeof r.value=="function")return hl(r.value)}t=nle(t)}function n(){return null}return n}const yN=Io(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),K7=Io(["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"]),X7=Io(["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"]),lle=Io(["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"]),G7=Io(["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"]),cle=Io(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),AN=Io(["#text"]),wN=Io(["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"]),R7=Io(["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"]),SN=Io(["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"]),$3=Io(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ule=jl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dle=jl(/<%[\w\W]*|[\w\W]*%>/gm),fle=jl(/\${[\w\W]*}/gm),hle=jl(/^data-[\-\w.\u00B7-\uFFFF]/),ple=jl(/^aria-[\-\w]+$/),xN=jl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gle=jl(/^(?:\w+script|data):/i),mle=jl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CN=jl(/^html$/i),vle=jl(/^[a-z][.\w]*(-[.\w]+)+$/i);var TN=Object.freeze({__proto__:null,MUSTACHE_EXPR:ule,ERB_EXPR:dle,TMPLIT_EXPR:fle,DATA_ATTR:hle,ARIA_ATTR:ple,IS_ALLOWED_URI:xN,IS_SCRIPT_OR_DATA:gle,ATTR_WHITESPACE:mle,DOCTYPE_NAME:CN,CUSTOM_ELEMENT:vle});const o2={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ble=function(){return typeof window>"u"?null:window},yle=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 EN(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ble();const e=Ge=>EN(Ge);if(e.version="3.1.5",e.removed=[],!t||!t.document||t.document.nodeType!==o2.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=q3(g,"cloneNode"),A=q3(g,"nextSibling"),S=q3(g,"childNodes"),C=q3(g,"parentNode");if(typeof s=="function"){const Ge=n.createElement("template");Ge.content&&Ge.content.ownerDocument&&(n=Ge.content.ownerDocument)}let w,T="";const{implementation:x,createNodeIterator:_,createDocumentFragment:E,getElementsByTagName:D}=n,{importNode:V}=r;let L={};e.isSupported=typeof pN=="function"&&typeof C=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:$,TMPLIT_EXPR:M,DATA_ATTR:H,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:W}=TN;let{IS_ALLOWED_URI:re}=TN,Y=null;const me=hi({},[...yN,...K7,...X7,...G7,...AN]);let ee=null;const ae=hi({},[...wN,...R7,...SN,...$3]);let K=Object.seal(mN(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}})),se=null,fe=null,be=!0,Ae=!0,we=!1,Ie=!0,ne=!1,q=!0,te=!1,Q=!1,ue=!1,ye=!1,_e=!1,Oe=!1,Se=!0,Te=!1;const ve="user-content-";let k=!0,R=!1,ie={},ge=null;const de=hi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let oe=null;const Fe=hi({},["audio","video","img","source","image","track"]);let Ne=null;const Ye=hi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vt="http://www.w3.org/1998/Math/MathML",wt="http://www.w3.org/2000/svg",tt="http://www.w3.org/1999/xhtml";let Xe=tt,Nt=!1,ot=null;const Re=hi({},[vt,wt,tt],Y7);let It=null;const Xt=["application/xhtml+xml","text/html"],An="text/html";let xn=null,bn=null;const Vn=n.createElement("form"),Sn=function(Le){return Le instanceof RegExp||Le instanceof Function},Ln=function(){let Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(bn&&bn===Le)){if((!Le||typeof Le!="object")&&(Le={}),Le=e1(Le),It=Xt.indexOf(Le.PARSER_MEDIA_TYPE)===-1?An:Le.PARSER_MEDIA_TYPE,xn=It==="application/xhtml+xml"?Y7:U3,Y=Sc(Le,"ALLOWED_TAGS")?hi({},Le.ALLOWED_TAGS,xn):me,ee=Sc(Le,"ALLOWED_ATTR")?hi({},Le.ALLOWED_ATTR,xn):ae,ot=Sc(Le,"ALLOWED_NAMESPACES")?hi({},Le.ALLOWED_NAMESPACES,Y7):Re,Ne=Sc(Le,"ADD_URI_SAFE_ATTR")?hi(e1(Ye),Le.ADD_URI_SAFE_ATTR,xn):Ye,oe=Sc(Le,"ADD_DATA_URI_TAGS")?hi(e1(Fe),Le.ADD_DATA_URI_TAGS,xn):Fe,ge=Sc(Le,"FORBID_CONTENTS")?hi({},Le.FORBID_CONTENTS,xn):de,se=Sc(Le,"FORBID_TAGS")?hi({},Le.FORBID_TAGS,xn):{},fe=Sc(Le,"FORBID_ATTR")?hi({},Le.FORBID_ATTR,xn):{},ie=Sc(Le,"USE_PROFILES")?Le.USE_PROFILES:!1,be=Le.ALLOW_ARIA_ATTR!==!1,Ae=Le.ALLOW_DATA_ATTR!==!1,we=Le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=Le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=Le.SAFE_FOR_TEMPLATES||!1,q=Le.SAFE_FOR_XML!==!1,te=Le.WHOLE_DOCUMENT||!1,ye=Le.RETURN_DOM||!1,_e=Le.RETURN_DOM_FRAGMENT||!1,Oe=Le.RETURN_TRUSTED_TYPE||!1,ue=Le.FORCE_BODY||!1,Se=Le.SANITIZE_DOM!==!1,Te=Le.SANITIZE_NAMED_PROPS||!1,k=Le.KEEP_CONTENT!==!1,R=Le.IN_PLACE||!1,re=Le.ALLOWED_URI_REGEXP||xN,Xe=Le.NAMESPACE||tt,K=Le.CUSTOM_ELEMENT_HANDLING||{},Le.CUSTOM_ELEMENT_HANDLING&&Sn(Le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=Le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Le.CUSTOM_ELEMENT_HANDLING&&Sn(Le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=Le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Le.CUSTOM_ELEMENT_HANDLING&&typeof Le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ne&&(Ae=!1),_e&&(ye=!0),ie&&(Y=hi({},AN),ee=[],ie.html===!0&&(hi(Y,yN),hi(ee,wN)),ie.svg===!0&&(hi(Y,K7),hi(ee,R7),hi(ee,$3)),ie.svgFilters===!0&&(hi(Y,X7),hi(ee,R7),hi(ee,$3)),ie.mathMl===!0&&(hi(Y,G7),hi(ee,SN),hi(ee,$3))),Le.ADD_TAGS&&(Y===me&&(Y=e1(Y)),hi(Y,Le.ADD_TAGS,xn)),Le.ADD_ATTR&&(ee===ae&&(ee=e1(ee)),hi(ee,Le.ADD_ATTR,xn)),Le.ADD_URI_SAFE_ATTR&&hi(Ne,Le.ADD_URI_SAFE_ATTR,xn),Le.FORBID_CONTENTS&&(ge===de&&(ge=e1(ge)),hi(ge,Le.FORBID_CONTENTS,xn)),k&&(Y["#text"]=!0),te&&hi(Y,["html","head","body"]),Y.table&&(hi(Y,["tbody"]),delete se.tbody),Le.TRUSTED_TYPES_POLICY){if(typeof Le.TRUSTED_TYPES_POLICY.createHTML!="function")throw s2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw s2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=Le.TRUSTED_TYPES_POLICY,T=w.createHTML("")}else w===void 0&&(w=yle(m,i)),w!==null&&typeof T=="string"&&(T=w.createHTML(""));Io&&Io(Le),bn=Le}},un=hi({},["mi","mo","mn","ms","mtext"]),Ke=hi({},["foreignobject","annotation-xml"]),it=hi({},["title","style","font","a","script"]),dt=hi({},[...K7,...X7,...lle]),Lt=hi({},[...G7,...cle]),On=function(Le){let st=C(Le);(!st||!st.tagName)&&(st={namespaceURI:Xe,tagName:"template"});const ft=U3(Le.tagName),$t=U3(st.tagName);return ot[Le.namespaceURI]?Le.namespaceURI===wt?st.namespaceURI===tt?ft==="svg":st.namespaceURI===vt?ft==="svg"&&($t==="annotation-xml"||un[$t]):!!dt[ft]:Le.namespaceURI===vt?st.namespaceURI===tt?ft==="math":st.namespaceURI===wt?ft==="math"&&Ke[$t]:!!Lt[ft]:Le.namespaceURI===tt?st.namespaceURI===wt&&!Ke[$t]||st.namespaceURI===vt&&!un[$t]?!1:!Lt[ft]&&(it[ft]||!dt[ft]):!!(It==="application/xhtml+xml"&&ot[Le.namespaceURI]):!1},Un=function(Le){i2(e.removed,{element:Le});try{Le.parentNode.removeChild(Le)}catch{Le.remove()}},er=function(Le,st){try{i2(e.removed,{attribute:st.getAttributeNode(Le),from:st})}catch{i2(e.removed,{attribute:null,from:st})}if(st.removeAttribute(Le),Le==="is"&&!ee[Le])if(ye||_e)try{Un(st)}catch{}else try{st.setAttribute(Le,"")}catch{}},pr=function(Le){let st=null,ft=null;if(ue)Le="<remove></remove>"+Le;else{const bt=bN(Le,/^[\r\n\t ]+/);ft=bt&&bt[0]}It==="application/xhtml+xml"&&Xe===tt&&(Le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Le+"</body></html>");const $t=w?w.createHTML(Le):Le;if(Xe===tt)try{st=new h().parseFromString($t,It)}catch{}if(!st||!st.documentElement){st=x.createDocument(Xe,"template",null);try{st.documentElement.innerHTML=Nt?T:$t}catch{}}const Rt=st.body||st.documentElement;return Le&&ft&&Rt.insertBefore(n.createTextNode(ft),Rt.childNodes[0]||null),Xe===tt?D.call(st,te?"html":"body")[0]:te?st.documentElement:Rt},tr=function(Le){return _.call(Le.ownerDocument||Le,Le,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Cr=function(Le){return Le instanceof f&&(typeof Le.nodeName!="string"||typeof Le.textContent!="string"||typeof Le.removeChild!="function"||!(Le.attributes instanceof d)||typeof Le.removeAttribute!="function"||typeof Le.setAttribute!="function"||typeof Le.namespaceURI!="string"||typeof Le.insertBefore!="function"||typeof Le.hasChildNodes!="function")},Mr=function(Le){return typeof l=="function"&&Le instanceof l},dn=function(Le,st,ft){L[Le]&&V3(L[Le],$t=>{$t.call(e,st,ft,bn)})},ct=function(Le){let st=null;if(dn("beforeSanitizeElements",Le,null),Cr(Le))return Un(Le),!0;const ft=xn(Le.nodeName);if(dn("uponSanitizeElement",Le,{tagName:ft,allowedTags:Y}),Le.hasChildNodes()&&!Mr(Le.firstElementChild)&&_o(/<[/\w]/g,Le.innerHTML)&&_o(/<[/\w]/g,Le.textContent)||Le.nodeType===o2.progressingInstruction||q&&Le.nodeType===o2.comment&&_o(/<[/\w]/g,Le.data))return Un(Le),!0;if(!Y[ft]||se[ft]){if(!se[ft]&&St(ft)&&(K.tagNameCheck instanceof RegExp&&_o(K.tagNameCheck,ft)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ft)))return!1;if(k&&!ge[ft]){const $t=C(Le)||Le.parentNode,Rt=S(Le)||Le.childNodes;if(Rt&&$t){const bt=Rt.length;for(let Be=bt-1;Be>=0;--Be){const et=v(Rt[Be],!0);et.__removalCount=(Le.__removalCount||0)+1,$t.insertBefore(et,A(Le))}}}return Un(Le),!0}return Le instanceof c&&!On(Le)||(ft==="noscript"||ft==="noembed"||ft==="noframes")&&_o(/<\/no(script|embed|frames)/i,Le.innerHTML)?(Un(Le),!0):(ne&&Le.nodeType===o2.text&&(st=Le.textContent,V3([F,$,M],$t=>{st=a2(st,$t," ")}),Le.textContent!==st&&(i2(e.removed,{element:Le.cloneNode()}),Le.textContent=st)),dn("afterSanitizeElements",Le,null),!1)},lt=function(Le,st,ft){if(Se&&(st==="id"||st==="name")&&(ft in n||ft in Vn))return!1;if(!(Ae&&!fe[st]&&_o(H,st))){if(!(be&&_o(pe,st))){if(!ee[st]||fe[st]){if(!(St(Le)&&(K.tagNameCheck instanceof RegExp&&_o(K.tagNameCheck,Le)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Le))&&(K.attributeNameCheck instanceof RegExp&&_o(K.attributeNameCheck,st)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(st))||st==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&_o(K.tagNameCheck,ft)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ft))))return!1}else if(!Ne[st]){if(!_o(re,a2(ft,Z,""))){if(!((st==="src"||st==="xlink:href"||st==="href")&&Le!=="script"&&ile(ft,"data:")===0&&oe[Le])){if(!(we&&!_o(he,a2(ft,Z,"")))){if(ft)return!1}}}}}}return!0},St=function(Le){return Le!=="annotation-xml"&&bN(Le,W)},Vt=function(Le){dn("beforeSanitizeAttributes",Le,null);const{attributes:st}=Le;if(!st)return;const ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee};let $t=st.length;for(;$t--;){const Rt=st[$t],{name:bt,namespaceURI:Be,value:et}=Rt,Ft=xn(bt);let zt=bt==="value"?et:ale(et);if(ft.attrName=Ft,ft.attrValue=zt,ft.keepAttr=!0,ft.forceKeepAttr=void 0,dn("uponSanitizeAttribute",Le,ft),zt=ft.attrValue,ft.forceKeepAttr||(er(bt,Le),!ft.keepAttr))continue;if(!Ie&&_o(/\/>/i,zt)){er(bt,Le);continue}if(q&&_o(/((--!?|])>)|<\/(style|title)/i,zt)){er(bt,Le);continue}ne&&V3([F,$,M],Me=>{zt=a2(zt,Me," ")});const At=xn(Le.nodeName);if(lt(At,Ft,zt)){if(Te&&(Ft==="id"||Ft==="name")&&(er(bt,Le),zt=ve+zt),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Be)switch(m.getAttributeType(At,Ft)){case"TrustedHTML":{zt=w.createHTML(zt);break}case"TrustedScriptURL":{zt=w.createScriptURL(zt);break}}try{Be?Le.setAttributeNS(Be,bt,zt):Le.setAttribute(bt,zt),Cr(Le)?Un(Le):vN(e.removed)}catch{}}}dn("afterSanitizeAttributes",Le,null)},Ut=function Ge(Le){let st=null;const ft=tr(Le);for(dn("beforeSanitizeShadowDOM",Le,null);st=ft.nextNode();)dn("uponSanitizeShadowNode",st,null),!ct(st)&&(st.content instanceof a&&Ge(st.content),Vt(st));dn("afterSanitizeShadowDOM",Le,null)};return e.sanitize=function(Ge){let Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=null,ft=null,$t=null,Rt=null;if(Nt=!Ge,Nt&&(Ge="<!-->"),typeof Ge!="string"&&!Mr(Ge))if(typeof Ge.toString=="function"){if(Ge=Ge.toString(),typeof Ge!="string")throw s2("dirty is not a string, aborting")}else throw s2("toString is not a function");if(!e.isSupported)return Ge;if(Q||Ln(Le),e.removed=[],typeof Ge=="string"&&(R=!1),R){if(Ge.nodeName){const et=xn(Ge.nodeName);if(!Y[et]||se[et])throw s2("root node is forbidden and cannot be sanitized in-place")}}else if(Ge instanceof l)st=pr("<!---->"),ft=st.ownerDocument.importNode(Ge,!0),ft.nodeType===o2.element&&ft.nodeName==="BODY"||ft.nodeName==="HTML"?st=ft:st.appendChild(ft);else{if(!ye&&!ne&&!te&&Ge.indexOf("<")===-1)return w&&Oe?w.createHTML(Ge):Ge;if(st=pr(Ge),!st)return ye?null:Oe?T:""}st&&ue&&Un(st.firstChild);const bt=tr(R?Ge:st);for(;$t=bt.nextNode();)ct($t)||($t.content instanceof a&&Ut($t.content),Vt($t));if(R)return Ge;if(ye){if(_e)for(Rt=E.call(st.ownerDocument);st.firstChild;)Rt.appendChild(st.firstChild);else Rt=st;return(ee.shadowroot||ee.shadowrootmode)&&(Rt=V.call(r,Rt,!0)),Rt}let Be=te?st.outerHTML:st.innerHTML;return te&&Y["!doctype"]&&st.ownerDocument&&st.ownerDocument.doctype&&st.ownerDocument.doctype.name&&_o(CN,st.ownerDocument.doctype.name)&&(Be="<!DOCTYPE "+st.ownerDocument.doctype.name+`>
|
|
2377
|
-
`+Be),ne&&V3([F,$,M],et=>{Be=a2(Be,et," ")}),w&&Oe?w.createHTML(Be):Be},e.setConfig=function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ln(Ge),Q=!0},e.clearConfig=function(){bn=null,Q=!1},e.isValidAttribute=function(Ge,Le,st){bn||Ln({});const ft=xn(Ge),$t=xn(Le);return lt(ft,$t,st)},e.addHook=function(Ge,Le){typeof Le=="function"&&(L[Ge]=L[Ge]||[],i2(L[Ge],Le))},e.removeHook=function(Ge){if(L[Ge])return vN(L[Ge])},e.removeHooks=function(Ge){L[Ge]&&(L[Ge]=[])},e.removeAllHooks=function(){L={}},e}var j3=EN();const ea=t=>{var C;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=N.useState(e);N.useEffect(()=>{var w;return A((w=e==null?void 0:e.label)==null?void 0:w[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:m}=sn(),g=(w,T,x)=>{u(_=>({..._,[w]:{..._[w],[T==null?void 0:T.type]:x}}))},[v,A]=N.useState((C=e==null?void 0:e.label)==null?void 0:C[d==null?void 0:d.type]);N.useEffect(()=>(S(),()=>{}),[c]);const S=()=>{const w=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(w[oa],w[la],w[fa],w[ha],w[pa],w[wa],w[$o],w[yo],c):(w==null?void 0:w.length)>wa&&(w==null?void 0:w.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(w[oa],w[la],w[fa],w[ha],w[pa],w[5],w[6],w[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(B3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:v,disabled:!1,onChange:w=>{var T;A(j3.sanitize((T=w==null?void 0:w.target)==null?void 0:T.value))},onBlur:w=>{var x;const T=j3.sanitize((x=w==null?void 0:w.target)==null?void 0:x.innerText);console.log("DOMPurify.sanitize(e?.target?.innerText)",T),A(T),g("label",d,T)},tagName:"article"})})},t1=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(Kp,{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"}})})},jr=t=>{var pe,he,Z,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}=Qt(),m=(re,Y)=>{L(me=>({...me,[re]:Y}))},{fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,cloneField:A,gridComponentFieldSettingUpdate:S,fieldSettingDeleteInlineConditional:C,gridComponentFieldDelete:w,removeField:T}=sn(),{updateGlobalToast:x}=Qt(),_=re=>{const Y=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(Y[oa],Y[la],Y[fa],Y[ha],Y[pa],Y[wa],Y[$o],Y[yo],re):(Y==null?void 0:Y.length)>wa&&(Y==null?void 0:Y.length)===Bl+1&&(re!=null&&re.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?S(Y[oa],Y[la],Y[fa],Y[ha],Y[pa],Y[5],Y[6],Y[7],re):g(s,i,a,r,n,re),x({showToast:!0,toastMessage:"Updated",toastDetail:"Field Updated",toastType:"success"})},[E,D]=N.useState(!1),[V,L]=N.useState({custom_component_title:"",custom_component_description:""}),F=()=>{L(re=>({...re,custom_component_schema:e})),D(!0)},$=()=>{const re=c.split("-").map(Number);l==="inline-conditional"?C(re[oa],re[la],re[fa],re[ha],re[pa],re[wa],re[$o],re[yo]):(re==null?void 0:re.length)>wa&&(re==null?void 0:re.length)===Bl+1&&(e!=null&&e.componentType)&&l==="grid"?w(re[oa],re[la],re[fa],re[ha],re[pa],re[5],re[6],re[7]):T(s,i,a,r,n)},M=(re,Y)=>{const me={...e,attributes:{...e.attributes,[re]:Y}};_(me)},H=(re,Y)=>{const me={...e,[re]:Y};_(me)};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(t1,{field:e,onHandleChangeSetttings:M,settingsKey:"required",settingsKeyValue:(pe=e==null?void 0:e.attributes)==null?void 0:pe.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(he=e==null?void 0:e.attributes)==null?void 0:he.required}),o.jsx(t1,{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(t1,{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(t1,{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(t1,{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(t1,{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(t1,{field:e,onHandleChangeSetttings:M,settingsKey:"style",settingsKeyValue:(Z=e==null?void 0:e.attributes)==null?void 0:Z.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(Pt,{text:!0,size:"small",label:"Advance Settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Pt,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{A(e,s,i,a,r,n),h()}}),o.jsx(Pt,{text:!0,size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{$()}}),o.jsx(Pt,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",onClick:()=>{F()}})]}),o.jsxs(Is,{maximizable:!0,header:"Custom component save",visible:E,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Pt,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>D(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Pt,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{D(!1)},autoFocus:!0})]})}),onHide:()=>D(!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:(V==null?void 0:V.custom_component_title)||"",onChange:re=>{var Y;return m("custom_component_title",(Y=re==null?void 0:re.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(_s,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(V==null?void 0:V.custom_component_description)||"",onChange:re=>{var Y;return m("custom_component_description",(Y=re==null?void 0:re.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},Ale=t=>{var se,fe,be,Ae,we,Ie,ne,q;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isRenderView:d,isPreview:f}=Qt(),{userSelectedLanguage:h,fieldSettingUpdate:m}=sn(),{task_status:g,taskRegisterData:v,updateTaskRegisterData:A,updateTaskProgressValue:S,updateUserFormDataSubmit:C,userTaskSubmitFormData:w,TASK_PUBLISHED:T}=mr(),[x,_]=N.useState(!1),[E,D]=N.useState(!1),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),pe=()=>{H(!0)},he=()=>{H(!1)},Z=te=>{_(te)},W=()=>{_(!1)},re=()=>{var te,Q,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],_e=Ct.findIndex(ye,function(Oe){return Oe.uuid===(r==null?void 0:r.uuid)});_e>=0&&ye[_e].fieldData?L(ye[_e].fieldData):(r.isValid=0,L(null))}}else{const ye=w,_e=Ct.cloneDeep(v);if(ye!=null&&ye.length){for(const Oe of ye)if(Oe.fieldId===t.field.uuid&&((te=Oe==null?void 0:Oe.postData)!=null&&te.length)){L((Q=Oe==null?void 0:Oe.postData[0])==null?void 0:Q.postValue),_e[r==null?void 0:r.uuid]=(ue=Oe==null?void 0:Oe.postData[0])==null?void 0:ue.postValue;const Se=Object.keys(_e).length;S(Se);break}}}D(!0)},Y=te=>{var _e;L(te.target.value);const Q=w,ue=Ct.cloneDeep(v);if((_e=te==null?void 0:te.target)!=null&&_e.value&&(Q==null?void 0:Q.length)>0)for(const Oe of Q)Oe.fieldId===t.field.uuid&&(ue[r==null?void 0:r.uuid]=te==null?void 0:te.value,Oe.postData[0]={postValue:te.value});else delete ue[r==null?void 0:r.uuid];A(ue);const ye=Object.keys(ue).length;S(ye)};N.useEffect(()=>{E||re();const te=Kt.addListener("clearRepeatableFields",ye=>{ye===(a==null?void 0:a.uuid)&&(L(""),$(0),r.isValid=0,m(e,n,s,l,i,r))}),Q=Kt.addListener("onSubmitUserForm",()=>{var ye;(ye=r==null?void 0:r.attributes)!=null&&ye.required?V?r.isValid=1:r.isValid=0:r.isValid=1}),ue=Kt.addListener("OnInvalidFieldCatch",ye=>{r.uuid===(ye==null?void 0:ye.fieldId)?$(1):$(0)});return()=>{Q.remove(),ue.remove(),te.remove()}});const me=(te,Q)=>{var ue;if(w){const ye=[...w],_e=Ct.findIndex(ye,function(Se){return Se.rowId===(a==null?void 0:a.uuid)});let Oe=(ue=w[_e])==null?void 0:ue.repeatableFields;Oe={...Oe,[te==null?void 0:te.uuid]:Q},ye[_e]={...ye[_e],repeatableFields:Oe},C(ye)}L(Q),Q!==null?te.isValid=1:te.isValid=0},ee=(te,Q)=>te?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:te.name,src:te==null?void 0:te.image,onError:ue=>ue.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:te.name})]}):o.jsx("span",{children:Q.placeholder}),ae=te=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:te.name,src:te==null?void 0:te.image,onError:Q=>Q.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:te.name})]}),K=o.jsxs("div",{onMouseOver:pe,onMouseOut:he,children:[!d&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:Z,...t}),o.jsxs("div",{className:`field ${f?" ":" 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:f?"col-12 ":"field-form-builder col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(se=r==null?void 0:r.headerText)==null?void 0:se[h==null?void 0:h.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(ia,{...t}),((fe=r==null?void 0:r.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=r==null?void 0:r.label)==null?void 0:be[h==null?void 0:h.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Mi,{message:(Ae=r==null?void 0:r.toolTip)==null?void 0:Ae[h==null?void 0:h.type],position:"right"})})]}),o.jsx(Sa,{className:"country-select-builder-component",onFocus:()=>$(1),onChange:te=>{a!=null&&a.rowIsRepeatable?me(r,te.target.value):Y(te)},options:r==null?void 0:r.countries,optionLabel:"name",value:V,placeholder:(we=r==null?void 0:r.placeholder)==null?void 0:we[h==null?void 0:h.type],disabled:c,valueTemplate:ee,itemTemplate:ae,filter:!0,filterBy:"name",showClear:!0}),((Ie=r==null?void 0:r.attributes)==null?void 0:Ie.required)&&o.jsx("small",{className:"error",children:F===1&&!V?(ne=r==null?void 0:r.validationMesssage)==null?void 0:ne.language:""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(q=r==null?void 0:r.helperText)==null?void 0:q[h==null?void 0:h.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:W,...t},r==null?void 0:r.uuid),o.jsx(wi,{...t,fieldWrap:K})]})},wle=t=>{var se,fe,be,Ae,we,Ie,ne,q,te,Q,ue,ye,_e,Oe,Se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isAdmin:C,isRenderView:w,isPreview:T}=Qt(),[x,_]=N.useState(!1),[E,D]=N.useState(""),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{he(!0)},W=()=>{he(!1)},re=()=>{var Te,ve,k;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const R=[...g.repeatableFields],ie=Ct.findIndex(R,function(ge){return ge.uuid===(d==null?void 0:d.uuid)});ie>=0&&R[ie].fieldData?D(R[ie].fieldData):D("")}}else{const R=a;if(R!=null&&R.length){for(const ie of R)if(ie.fieldId===t.field.uuid&&((Te=ie==null?void 0:ie.postData[0])==null?void 0:Te.postValue)!==""&&((ve=ie==null?void 0:ie.postData[0])!=null&&ve.postValue)){D((k=ie==null?void 0:ie.postData[0])==null?void 0:k.postValue);break}}}H(!0)};N.useEffect(()=>{M||re();const Te=Kt.addListener("clearRepeatableFields",ge=>{ge===(g==null?void 0:g.uuid)&&(D(""),$(0),d.isValid=0,u(m,h,v,A,f,d))}),ve=Kt.addListener("onSubmitUserForm",()=>{var ge,de;(ge=d==null?void 0:d.attributes)!=null&&ge.required?E&&E.length&&(E==null?void 0:E.length)<((de=d==null?void 0:d.attributes)==null?void 0:de.minLength)?d.isValid=1:d.isValid=0:d.isValid=1}),k=Kt.addListener("OnInvalidFieldCatch",ge=>{d.uuid===(ge==null?void 0:ge.fieldId)?$(1):$(0)}),R=Kt.addListener("OnGetFieldValue",ge=>{var oe;const de=(oe=ge==null?void 0:ge.repeatableColumn)==null?void 0:oe.filter(Fe=>(Fe==null?void 0:Fe.fieldUuid)===(d==null?void 0:d.uuid));de!=null&&de.length}),ie=Kt.addListener("formFieldAdded",ge=>{V===null&&L(ge==null?void 0:ge.uuid)});return()=>{ve.remove(),k.remove(),R.remove(),Te.remove(),ie.remove()}}),N.useEffect(()=>(V!==null&&setTimeout(()=>{L(null)},1e3),()=>{}),[V]);const Y=Te=>{_(Te)},me=()=>{_(!1)},ee=Te=>{var R,ie;D(Te.target.value);const ve=a,k=Ct.cloneDeep(e);if(ve!==null){if((R=Te==null?void 0:Te.target)!=null&&R.value){if(k[d==null?void 0:d.uuid]=(ie=Te==null?void 0:Te.target)==null?void 0:ie.value,(ve==null?void 0:ve.length)>0)for(const ge of ve)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:Te.target.value})}else if(delete k[d==null?void 0:d.uuid],(ve==null?void 0:ve.length)>0)for(const ge of ve)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(k);const ge=Object.keys(k).length;r(ge)}},ae=(Te,ve)=>{var k;if(a){const R=[...a],ie=Ct.findIndex(R,function(de){return de.rowId===(g==null?void 0:g.uuid)});let ge=(k=a[ie])==null?void 0:k.repeatableFields;ge={...ge,[Te==null?void 0:Te.uuid]:ve},R[ie]={...R[ie],repeatableFields:ge},i(R)}D(ve),ve!==""?Te.isValid=1:Te.isValid=0},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!w&&!T&&pe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "} ${(d==null?void 0:d.isFluid)===!0?" p-fluid ":""} ${w?" ":" py-6 px-4 "} ${V===(d==null?void 0:d.uuid)?" new-field ":" card "} `,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:C?"col-6 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(se=d==null?void 0:d.headerText)==null?void 0:se[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(ia,{...t}),((fe=d==null?void 0:d.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(be=d==null?void 0:d.label)==null?void 0:be[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(Mi,{message:(Ae=d==null?void 0:d.toolTip)==null?void 0:Ae[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-"+((Ie=(we=d==null?void 0:d.icon)==null?void 0:we.properties)==null?void 0:Ie.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(ne=d==null?void 0:d.placeholder)==null?void 0:ne[c==null?void 0:c.type],minLength:(q=d==null?void 0:d.attributes)==null?void 0:q.minLength,maxLength:(te=d==null?void 0:d.attributes)==null?void 0:te.maxLength,value:E,onFocus:()=>$(1),onChange:Te=>{g!=null&&g.rowIsRepeatable?ae(d,Te.target.value):ee(Te)},className:F===1&&((Q=d==null?void 0:d.attributes)!=null&&Q.required)?E?"valid":"invalid":"valid'",readOnly:S})]}),o.jsx("div",{children:((ue=d==null?void 0:d.attributes)==null?void 0:ue.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:F===1&&!E?(ye=d==null?void 0:d.validationMesssage)==null?void 0:ye.english:""}),o.jsx("small",{className:"error",children:F===1&&E.length&&(E==null?void 0:E.length)<((_e=d==null?void 0:d.attributes)==null?void 0:_e.minLength)?`Mini length ${(Oe=d==null?void 0:d.attributes)==null?void 0:Oe.minLength}`:""})]})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(Se=d==null?void 0:d.helperText)==null?void 0:Se[c==null?void 0:c.type]})})]})]})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:me,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},Sle=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)})]})]})},xle=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(Rd,{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"})]})]})},Cle=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}=sn(),{updateGlobalToast:g}=Qt(),v=(C,w,T)=>{d(x=>({...x,[C]:{...x[C],[w==null?void 0:w.type]:T}}))},A=(C,w)=>{d(T=>({...T,[C]:w}))},S=()=>{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(Eo,{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(Pt,{className:"mt-3",label:"Update",onClick:()=>S(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:h!=null&&h.length?h.map((C,w)=>o.jsx(ro,{tabIndex:w,header:C==null?void 0:C.language,children:o.jsx(Sle,{language:C,fieldState:u,onHandleChange:v,...t})},w)):""})}),o.jsx(fr,{header:"Styling",children:o.jsx(xle,{fieldState:u,onHandleChangeStyling:A,...t})})]})]})})},Tle=t=>{var m,g,v,A,S,C,w,T,x;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isPreview:r}=Qt(),[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(jr,{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(Mi,{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:(S=e==null?void 0:e.hrefLink)==null?void 0:S[n==null?void 0:n.type],children:(C=e==null?void 0:e.text)==null?void 0:C[n==null?void 0:n.type]}),((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(x=e==null?void 0:e.helperText)==null?void 0:x[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Cle,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(wi,{...t,fieldWrap:h})]})},Ele=t=>{var se,fe,be,Ae,we,Ie,ne,q,te,Q,ue,ye,_e,Oe,Se,Te,ve,k,R,ie,ge;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isPreview:u,isRenderView:d,isAdmin:f}=Qt(),{taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,TASK_PUBLISHED:S,task_status:C}=mr(),{userSelectedLanguage:w,fieldSettingUpdate:T}=sn(),[x,_]=N.useState(null),[E,D]=N.useState(!1),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{he(!0)},W=()=>{he(!1)},re=()=>{var de,oe;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Fe=[...a.repeatableFields],Ne=Ct.findIndex(Fe,function(Ye){return Ye.uuid===(e==null?void 0:e.uuid)});Ne>=0&&Fe[Ne].fieldData?L(Number(Fe[Ne].fieldData)||null):L(null)}}else{const Fe=A;if(Fe!=null&&Fe.length){for(const Ne of Fe)if(Ne.fieldId===t.field.uuid&&((de=Ne==null?void 0:Ne.postData)!=null&&de.length)){L(Number((oe=Ne==null?void 0:Ne.postData[0])==null?void 0:oe.postValue)||null);break}}}H(!0)};N.useEffect(()=>{M||re();const de=Kt.addListener("clearRepeatableFields",vt=>{vt===(a==null?void 0:a.uuid)&&(L(null),$(0),e.isValid=0,T(i,r,s,l,n,e))}),oe=Kt.addListener("onSubmitUserForm",()=>{var vt;(vt=e==null?void 0:e.attributes)!=null&&vt.required?V?e.isValid=1:e.isValid=0:e.isValid=1}),Fe=Kt.addListener("OnInvalidFieldCatch",vt=>{e.uuid===(vt==null?void 0:vt.fieldId)?$(1):$(0)}),Ne=Kt.addListener("OnGetFieldValue",vt=>{var tt;const wt=(tt=vt==null?void 0:vt.repeatableColumn)==null?void 0:tt.filter(Xe=>(Xe==null?void 0:Xe.fieldUuid)===(e==null?void 0:e.uuid));wt!=null&&wt.length}),Ye=Kt.addListener("formFieldAdded",vt=>{x===null&&_(vt.uuid)});return()=>{oe.remove(),Fe.remove(),Ne.remove(),de.remove(),Ye.remove()}}),N.useEffect(()=>(x!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[x]);const Y=de=>{D(de)},me=()=>{D(!1)},ee=de=>{const oe=A,Fe=Ct.cloneDeep(h);if(oe!==null){if(de){if(Fe[e==null?void 0:e.uuid]=de,(oe==null?void 0:oe.length)>0)for(const Ne of oe)Ne.fieldId===t.field.uuid&&(Ne.postData[0]={postValue:de})}else if(delete Fe[e==null?void 0:e.uuid],(oe==null?void 0:oe.length)>0)for(const Ne of oe)Ne.fieldId===t.field.uuid&&(Ne.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(Fe);const Ne=Object.keys(Fe).length;g(Ne)}},ae=(de,oe)=>{var Fe;if(A!=null&&A.length){const Ne=[...A],Ye=Ct.findIndex(Ne,function(wt){return wt.rowId===(a==null?void 0:a.uuid)});let vt=(Fe=A[Ye])==null?void 0:Fe.repeatableFields;vt={...vt,[de==null?void 0:de.uuid]:oe},Ne[Ye]={...Ne[Ye],repeatableFields:vt},v(Ne)}L(oe),oe!==""?de.isValid=1:de.isValid=0},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!d&&!u&&pe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${u?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid py-6 px-4":" py-6 px-4"} ${x===(e==null?void 0:e.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:f?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(se=e==null?void 0:e.headerText)==null?void 0:se[w==null?void 0:w.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(ia,{...t}),((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[w==null?void 0:w.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[w==null?void 0:w.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-"+((Ie=(we=e==null?void 0:e.icon)==null?void 0:we.properties)==null?void 0:Ie.name)}),o.jsx(Oa,{readOnly:c,id:e==null?void 0:e.uuid,placeholder:(ne=e==null?void 0:e.placeholder)==null?void 0:ne[w==null?void 0:w.type],value:V,min:(q=e==null?void 0:e.attributes)==null?void 0:q.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(te=e==null?void 0:e.attributes)==null?void 0:te.prefix,showButtons:(Q=e==null?void 0:e.attributes)==null?void 0:Q.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(ue=e==null?void 0:e.attributes)==null?void 0:ue.minFractionDigits,maxFractionDigits:(ye=e==null?void 0:e.attributes)==null?void 0:ye.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(Oe=e==null?void 0:e.attributes)==null?void 0:Oe.mode,currency:(Se=e==null?void 0:e.attributes)==null?void 0:Se.currency,currencyDisplay:(Te=e==null?void 0:e.attributes)==null?void 0:Te.currencyDisplay,useGrouping:(ve=e==null?void 0:e.attributes)==null?void 0:ve.useGrouping,onFocus:()=>$(1),onChange:de=>{a!=null&&a.rowIsRepeatable?ae(e,de.value):ee(de.value)},className:F===1&&((k=e==null?void 0:e.attributes)!=null&&k.required)?V?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((R=e==null?void 0:e.attributes)==null?void 0:R.required)&&o.jsx("small",{className:"error",children:F===1&&!V?(ie=e==null?void 0:e.validationMesssage)==null?void 0:ie.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ge=e==null?void 0:e.helperText)==null?void 0:ge[w==null?void 0:w.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Xi,{visibilty:E,closeSettingFieldSidebar:me,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},W7=["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"],z3=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/,lu=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+\$,\\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%\/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function IN(t){try{JSON.parse(t)}catch{return!1}return!0}function _N(t){if(t<26)return W7[t];{const e=Math.floor(t/26)-1,n=t%26;return W7[e]+W7[n]}}const Ile=t=>{var ee,ae,K,se,fe,be,Ae,we,Ie,ne,q;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l,isDisabled:c}=t,{isPreview:u,isAdmin:d,isRenderView:f}=Qt(),{task_status:h,taskRegisterData:m,updateTaskRegisterData:g,updateTaskProgressValue:v,updateUserFormDataSubmit:A,userTaskSubmitFormData:S,TASK_PUBLISHED:C}=mr(),{userSelectedLanguage:w}=sn(),[T,x]=N.useState(!1),[_,E]=N.useState(""),[D,V]=N.useState(0),[L,F]=N.useState(!1),$=()=>{F(!0)},M=()=>{F(!1)};N.useEffect(()=>{T||W();const te=Kt.addListener("clearRepeatableFields",ue=>{ue===(a==null?void 0:a.uuid)&&(E(""),V(0),e.isValid=0)}),Q=Kt.addListener("onSubmitUserForm",()=>{var ue;(ue=e==null?void 0:e.attributes)!=null&&ue.required?_!==""&&z3.test(_)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Q.remove(),te.remove()}});const[H,pe]=N.useState(!1),he=te=>{pe(te)},Z=()=>{pe(!1)},W=()=>{var te,Q,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],_e=Ct.findIndex(ye,function(Oe){return Oe.uuid===(e==null?void 0:e.uuid)});_e>=0&&ye[_e].fieldData?E(ye[_e].fieldData):E("")}}else{const ye=S;if(ye!=null&&ye.length){for(const _e of ye)if(_e.fieldId===t.field.uuid&&((te=_e==null?void 0:_e.postData[0])==null?void 0:te.postValue)!==""&&((Q=_e==null?void 0:_e.postData[0])!=null&&Q.postValue)){E((ue=_e==null?void 0:_e.postData[0])==null?void 0:ue.postValue),x(!0);break}}}x(!0)},re=te=>{E(te);const Q=S,ue=Ct.cloneDeep(m);if(Q!==null){if(te!==""&&z3.test(te)===!0){if(ue[e==null?void 0:e.uuid]=te,(Q==null?void 0:Q.length)>0)for(const ye of Q)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:te})}else if(delete ue[e==null?void 0:e.uuid],(Q==null?void 0:Q.length)>0)for(const ye of Q)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){g(ue);const ye=Object.keys(ue).length;v(ye)}},Y=(te,Q,ue,ye)=>{var _e;if(E(ye),S!==null){const Oe=[...S],Se=Ct.findIndex(Oe,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let Te=(_e=S[Se])==null?void 0:_e.repeatableFields;Te={...Te,[ue==null?void 0:ue.uuid]:ye},Oe[Se]={...Oe[Se],repeatableFields:Te},A(Oe),ye!==""&&z3.test(ye)===!0?e.isValid=1:e.isValid=0}},me=o.jsxs("div",{onMouseOver:$,onMouseOut:M,children:[!f&&!u&&L&&o.jsx(jr,{handleFieldSettingsSidebar:he,...t}),o.jsxs("div",{className:`field ${u?" ":" 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:(ee=e==null?void 0:e.headerText)==null?void 0:ee[w==null?void 0:w.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(ia,{...t,update:s,value:l}),((ae=e==null?void 0:e.attributes)==null?void 0:ae.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(o.Fragment,{children:(K=e==null?void 0:e.label)==null?void 0:K[w==null?void 0:w.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(Mi,{message:(se=e==null?void 0:e.toolTip)==null?void 0:se[w==null?void 0:w.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-"+((be=(fe=e==null?void 0:e.icon)==null?void 0:fe.properties)==null?void 0:be.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(Ae=e==null?void 0:e.placeholder)==null?void 0:Ae[w==null?void 0:w.type],value:_,onFocus:()=>V(1),onChange:te=>{a!=null&&a.rowIsRepeatable?Y(r,i,{uuid:e.uuid},te.target.value):re(te.target.value)},className:D===1&&((we=e==null?void 0:e.attributes)!=null&&we.required)?_?"valid":"invalid":"valid'",readOnly:c})]}),((Ie=e==null?void 0:e.attributes)==null?void 0:Ie.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:D===1&&!_?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne[w==null?void 0:w.language]:""})}),_!==""&&D===1&&z3.test(_)===!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:(q=e==null?void 0:e.helperText)==null?void 0:q[w==null?void 0:w.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]});return o.jsxs(o.Fragment,{children:[H===!0&&o.jsx(Xi,{visibilty:H,closeSettingFieldSidebar:Z,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:me})]})},_le=t=>{var se,fe,be,Ae,we,Ie,ne,q,te;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Qt(),{userSelectedLanguage:h,fieldSettingUpdate:m}=sn(),{task_status:g,taskRegisterData:v,updateTaskRegisterData:A,updateTaskProgressValue:S,updateUserFormDataSubmit:C,userTaskSubmitFormData:w,TASK_PUBLISHED:T}=mr(),[x,_]=N.useState(!1),[E,D]=N.useState(""),[V,L]=N.useState(0),[F,$]=N.useState(!1),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{H(!0)},W=()=>{H(!1)},re=Q=>{_(Q)},Y=()=>{_(!1)},me=()=>{var ue,ye,_e;const Q=w;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const Oe=[...l.repeatableFields],Se=Ct.findIndex(Oe,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});Se>=0&&Oe[Se].fieldData?D(Oe[Se].fieldData):(e.isValid=0,D(""))}}else if(Q!=null&&Q.length){for(const Oe of Q)if(Oe.fieldId===t.field.uuid&&((ue=Oe==null?void 0:Oe.postData[0])!=null&&ue.postValue)&&((ye=Oe==null?void 0:Oe.postData[0])==null?void 0:ye.postValue)!==""){D((_e=Oe==null?void 0:Oe.postData[0])==null?void 0:_e.postValue),$(!0);break}}$(!0)},ee=(Q,ue,ye,_e)=>{var Oe;if(w!=null&&w.length){const Se=[...w],Te=Ct.findIndex(Se,function(k){return k.rowId===(l==null?void 0:l.uuid)});let ve=(Oe=w[Te])==null?void 0:Oe.repeatableFields;ve={...ve,[ye==null?void 0:ye.uuid]:_e},Se[Te]={...Se[Te],repeatableFields:ve},C(Se)}D(_e),_e!==""?e.isValid=1:e.isValid=0,m(Q,ue,a,s,n,e)};N.useEffect(()=>{F||me();const Q=Kt.addListener("clearRepeatableFields",Se=>{Se===(l==null?void 0:l.uuid)&&(D(""),L(0),e.isValid=0)}),ue=Kt.addListener("onSubmitUserForm",()=>{var Se;(Se=e==null?void 0:e.attributes)!=null&&Se.required?E?e.isValid=1:e.isValid=0:e.isValid=1}),ye=Kt.addListener("OnInvalidFieldCatch",Se=>{e.uuid===(Se==null?void 0:Se.fieldId)?L(1):L(0)}),_e=Kt.addListener("OnGetFieldValue",Se=>{var ve;const Te=(ve=Se==null?void 0:Se.repeatableColumn)==null?void 0:ve.filter(k=>(k==null?void 0:k.fieldUuid)===(e==null?void 0:e.uuid));Te!=null&&Te.length}),Oe=Kt.addListener("onUpdateField",()=>{he(!pe)});return()=>{Oe.remove(),ue.remove(),ye.remove(),_e.remove(),Q.remove()}});const ae=Q=>{var _e,Oe;D(Q.target.value);const ue=w,ye=Ct.cloneDeep(v);if(ue!==null){if((_e=Q==null?void 0:Q.target)!=null&&_e.value){if(ye[e==null?void 0:e.uuid]=(Oe=Q==null?void 0:Q.target)==null?void 0:Oe.value,(ue==null?void 0:ue.length)>0)for(const Se of ue)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:Q.target.value})}else if(delete ye[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const Se of ue)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){A(ye);const Se=Object.keys(ye).length;S(Se)}},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!u&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:re,...t}),o.jsxs("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?"card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:f?"col-12 ":"col-12 field-form-builder ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(se=e==null?void 0:e.headerText)==null?void 0:se[h==null?void 0:h.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(ia,{...t}),((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[h==null?void 0:h.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[h==null?void 0:h.type],position:"right"})})]}),o.jsx(_s,{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:(we=e==null?void 0:e.placeholder)==null?void 0:we[h==null?void 0:h.type],value:E,onFocus:()=>L(1),onChange:Q=>{l!=null&&l.rowIsRepeatable?ee(r,i,e,Q.target.value):ae(Q)},className:V===1&&((Ie=e==null?void 0:e.attributes)!=null&&Ie.required)?E?"valid":"invalid":"valid",readOnly:c}),o.jsx("div",{children:((ne=e==null?void 0:e.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:V===1&&!E?(q=e==null?void 0:e.validationMesssage)==null?void 0:q[h==null?void 0:h.type]:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(te=e==null?void 0:e.helperText)==null?void 0:te[h==null?void 0:h.type]})})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:Y,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:K})]})},Dle={},Q7=t=>{var E,D,V,L;const{isAdmin:e,isAdvanceView:n,isPreview:r}=Qt(),{handleDrop:i}=sn(),{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:S}=t,C=N.useRef(null),[{isDragging:w},T]=Ji({type:GC,item:{type:GC,uuid:a.uuid,children:a.children,path:s},collect:F=>({isDragging:F.isDragging()})}),x=w?0:1;T(C);const _=(F,$,M,H,pe,he,Z)=>{const W=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(qc,{type:"inline-conditional",field:F,data:F,path:$,page:g,section:v,row:A,column:S,pageIndex:M,sectionIndex:H,rowIndex:pe,columnIndex:he,fieldIndex:Z,isAdmin:e,fieldContainer:W},F.uuid)};return o.jsxs("div",{ref:r===!1?C:null,style:{...Dle,opacity:x},className:"draggable column",children:[m&&((E=m.children)==null?void 0:E.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),m&&m.children&&((D=m.children)==null?void 0:D.length)>0&&m.children.map((F,$)=>{var M;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(Tr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${$}`,childrenCount:(M=m==null?void 0:m.children)==null?void 0:M.length,droppedField:m},onDrop:i}),_(F,`${s}-${h}-${f}-${$}`,l,c,u,d,$)]},F.uuid)}),r===!1&&o.jsx(Tr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(V=m==null?void 0:m.children)==null?void 0:V.length}`,childrenCount:(L=m==null?void 0:m.children)==null?void 0:L.length,droppedField:m},onDrop:i,isLast:!0})]})},Qd=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:S}=mr(),C=N.useCallback((w,T,x)=>{var E,D,V;const _=A;if(_!=null&&_.length){const L=g,F=(E=a==null?void 0:a.inlineConditionalRules)==null?void 0:E.rules[T].conditions[x].children;for(const[M,H]of F.entries()){(D=H==null?void 0:H.attributes)!=null&&D.required;const pe=Ct.findIndex(_,function(he){return he.fieldId===H.uuid});w?pe===-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:M,fieldId:H.uuid,fieldInputType:a.componentType,fieldTitle:(V=a.label)==null?void 0:V.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}),L[H==null?void 0:H.uuid]&&delete L[H==null?void 0:H.uuid]):(L[H==null?void 0:H.uuid]&&delete L[H==null?void 0:H.uuid],pe>=0&&_.splice(pe,1))}const $=Object.keys(L).length;S({progressMaxValue:_==null?void 0:_.length,progressValue:$}),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,S,v,A]);return N.useEffect(()=>(C(m,r,i),()=>{}),[i,e,m,r,C]),o.jsx("div",{children:m&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(Q7,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};function l2(t){"@babel/helpers - typeof";return l2=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},l2(t)}function Ole(t,e){if(l2(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(l2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nle(t){var e=Ole(t,"string");return l2(e)==="symbol"?e:String(e)}function J7(t,e,n){return e=Nle(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fle={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return pt("p-tag p-component",J7(J7({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},Ple=`
|
|
2377
|
+
`+Be),ne&&V3([F,$,M],et=>{Be=a2(Be,et," ")}),w&&Oe?w.createHTML(Be):Be},e.setConfig=function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ln(Ge),Q=!0},e.clearConfig=function(){bn=null,Q=!1},e.isValidAttribute=function(Ge,Le,st){bn||Ln({});const ft=xn(Ge),$t=xn(Le);return lt(ft,$t,st)},e.addHook=function(Ge,Le){typeof Le=="function"&&(L[Ge]=L[Ge]||[],i2(L[Ge],Le))},e.removeHook=function(Ge){if(L[Ge])return vN(L[Ge])},e.removeHooks=function(Ge){L[Ge]&&(L[Ge]=[])},e.removeAllHooks=function(){L={}},e}var j3=EN();const ea=t=>{var C;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=N.useState(e);N.useEffect(()=>{var w;return A((w=e==null?void 0:e.label)==null?void 0:w[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:m}=sn(),g=(w,T,x)=>{u(_=>({..._,[w]:{..._[w],[T==null?void 0:T.type]:x}}))},[v,A]=N.useState((C=e==null?void 0:e.label)==null?void 0:C[d==null?void 0:d.type]);N.useEffect(()=>(S(),()=>{}),[c]);const S=()=>{const w=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(w[oa],w[la],w[fa],w[ha],w[pa],w[wa],w[$o],w[yo],c):(w==null?void 0:w.length)>wa&&(w==null?void 0:w.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(w[oa],w[la],w[fa],w[ha],w[pa],w[5],w[6],w[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(B3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:v,disabled:!1,onChange:w=>{var T;A(j3.sanitize((T=w==null?void 0:w.target)==null?void 0:T.value))},onBlur:w=>{var x;const T=j3.sanitize((x=w==null?void 0:w.target)==null?void 0:x.innerText);console.log("DOMPurify.sanitize(e?.target?.innerText)",T),A(T),g("label",d,T)},tagName:"article"})})},t1=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(Kp,{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"}})})},jr=t=>{var pe,he,Z,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}=Qt(),m=(re,Y)=>{L(me=>({...me,[re]:Y}))},{fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,cloneField:A,gridComponentFieldSettingUpdate:S,fieldSettingDeleteInlineConditional:C,gridComponentFieldDelete:w,removeField:T}=sn(),{updateGlobalToast:x}=Qt(),_=re=>{const Y=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(Y[oa],Y[la],Y[fa],Y[ha],Y[pa],Y[wa],Y[$o],Y[yo],re):(Y==null?void 0:Y.length)>wa&&(Y==null?void 0:Y.length)===Bl+1&&(re!=null&&re.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?S(Y[oa],Y[la],Y[fa],Y[ha],Y[pa],Y[5],Y[6],Y[7],re):g(s,i,a,r,n,re),x({showToast:!0,toastMessage:"Updated",toastDetail:"Field Updated",toastType:"success"})},[E,D]=N.useState(!1),[V,L]=N.useState({custom_component_title:"",custom_component_description:""}),F=()=>{L(re=>({...re,custom_component_schema:e})),D(!0)},$=()=>{const re=c.split("-").map(Number);l==="inline-conditional"?C(re[oa],re[la],re[fa],re[ha],re[pa],re[wa],re[$o],re[yo]):(re==null?void 0:re.length)>wa&&(re==null?void 0:re.length)===Bl+1&&(e!=null&&e.componentType)&&l==="grid"?w(re[oa],re[la],re[fa],re[ha],re[pa],re[5],re[6],re[7]):T(s,i,a,r,n)},M=(re,Y)=>{const me={...e,attributes:{...e.attributes,[re]:Y}};_(me)},H=(re,Y)=>{const me={...e,[re]:Y};_(me)};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(t1,{field:e,onHandleChangeSetttings:M,settingsKey:"required",settingsKeyValue:(pe=e==null?void 0:e.attributes)==null?void 0:pe.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(he=e==null?void 0:e.attributes)==null?void 0:he.required}),o.jsx(t1,{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(t1,{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(t1,{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(t1,{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(t1,{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(t1,{field:e,onHandleChangeSetttings:M,settingsKey:"style",settingsKeyValue:(Z=e==null?void 0:e.attributes)==null?void 0:Z.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(Pt,{text:!0,size:"small",label:"Advance Settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Pt,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{A(e,s,i,a,r,n),h()}}),o.jsx(Pt,{text:!0,size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{$()}}),o.jsx(Pt,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",onClick:()=>{F()}})]}),o.jsxs(Is,{maximizable:!0,header:"Custom component save",visible:E,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Pt,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>D(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Pt,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{D(!1)},autoFocus:!0})]})}),onHide:()=>D(!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:(V==null?void 0:V.custom_component_title)||"",onChange:re=>{var Y;return m("custom_component_title",(Y=re==null?void 0:re.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(_s,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(V==null?void 0:V.custom_component_description)||"",onChange:re=>{var Y;return m("custom_component_description",(Y=re==null?void 0:re.target)==null?void 0:Y.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},Ale=t=>{var se,fe,be,Ae,we,Ie,ne,q;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isRenderView:d,isPreview:f}=Qt(),{userSelectedLanguage:h,fieldSettingUpdate:m}=sn(),{task_status:g,taskRegisterData:v,updateTaskRegisterData:A,updateTaskProgressValue:S,updateUserFormDataSubmit:C,userTaskSubmitFormData:w,TASK_PUBLISHED:T}=mr(),[x,_]=N.useState(!1),[E,D]=N.useState(!1),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),pe=()=>{H(!0)},he=()=>{H(!1)},Z=te=>{_(te)},W=()=>{_(!1)},re=()=>{var te,Q,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],_e=Ct.findIndex(ye,function(Oe){return Oe.uuid===(r==null?void 0:r.uuid)});_e>=0&&ye[_e].fieldData?L(ye[_e].fieldData):(r.isValid=0,L(null))}}else{const ye=w,_e=Ct.cloneDeep(v);if(ye!=null&&ye.length){for(const Oe of ye)if(Oe.fieldId===t.field.uuid&&((te=Oe==null?void 0:Oe.postData)!=null&&te.length)){L((Q=Oe==null?void 0:Oe.postData[0])==null?void 0:Q.postValue),_e[r==null?void 0:r.uuid]=(ue=Oe==null?void 0:Oe.postData[0])==null?void 0:ue.postValue;const Se=Object.keys(_e).length;S(Se);break}}}D(!0)},Y=te=>{var _e;L(te.target.value);const Q=w,ue=Ct.cloneDeep(v);if((_e=te==null?void 0:te.target)!=null&&_e.value&&(Q==null?void 0:Q.length)>0)for(const Oe of Q)Oe.fieldId===t.field.uuid&&(ue[r==null?void 0:r.uuid]=te==null?void 0:te.value,Oe.postData[0]={postValue:te.value});else delete ue[r==null?void 0:r.uuid];A(ue);const ye=Object.keys(ue).length;S(ye)};N.useEffect(()=>{E||re();const te=Kt.addListener("clearRepeatableFields",ye=>{ye===(a==null?void 0:a.uuid)&&(L(""),$(0),r.isValid=0,m(e,n,s,l,i,r))}),Q=Kt.addListener("onSubmitUserForm",()=>{var ye;(ye=r==null?void 0:r.attributes)!=null&&ye.required?V?r.isValid=1:r.isValid=0:r.isValid=1}),ue=Kt.addListener("OnInvalidFieldCatch",ye=>{console.log("OnInvalidFieldCatch listener"),r.uuid===(ye==null?void 0:ye.fieldId)?$(1):$(0)});return()=>{Q.remove(),ue.remove(),te.remove()}});const me=(te,Q)=>{var ue;if(w){const ye=[...w],_e=Ct.findIndex(ye,function(Se){return Se.rowId===(a==null?void 0:a.uuid)});let Oe=(ue=w[_e])==null?void 0:ue.repeatableFields;Oe={...Oe,[te==null?void 0:te.uuid]:Q},ye[_e]={...ye[_e],repeatableFields:Oe},C(ye)}L(Q),Q!==null?te.isValid=1:te.isValid=0},ee=(te,Q)=>te?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:te.name,src:te==null?void 0:te.image,onError:ue=>ue.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:te.name})]}):o.jsx("span",{children:Q.placeholder}),ae=te=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:te.name,src:te==null?void 0:te.image,onError:Q=>Q.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:te.name})]}),K=o.jsxs("div",{onMouseOver:pe,onMouseOut:he,children:[!d&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:Z,...t}),o.jsxs("div",{className:`field ${f?" ":" 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:f?"col-12 ":"field-form-builder col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(se=r==null?void 0:r.headerText)==null?void 0:se[h==null?void 0:h.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(ia,{...t}),((fe=r==null?void 0:r.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=r==null?void 0:r.label)==null?void 0:be[h==null?void 0:h.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(Mi,{message:(Ae=r==null?void 0:r.toolTip)==null?void 0:Ae[h==null?void 0:h.type],position:"right"})})]}),o.jsx(Sa,{className:"country-select-builder-component",onFocus:()=>$(1),onChange:te=>{a!=null&&a.rowIsRepeatable?me(r,te.target.value):Y(te)},options:r==null?void 0:r.countries,optionLabel:"name",value:V,placeholder:(we=r==null?void 0:r.placeholder)==null?void 0:we[h==null?void 0:h.type],disabled:c,valueTemplate:ee,itemTemplate:ae,filter:!0,filterBy:"name",showClear:!0}),((Ie=r==null?void 0:r.attributes)==null?void 0:Ie.required)&&o.jsx("small",{className:"error",children:F===1&&V?(ne=r==null?void 0:r.validationMesssage)==null?void 0:ne.language:""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(q=r==null?void 0:r.helperText)==null?void 0:q[h==null?void 0:h.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:W,...t},r==null?void 0:r.uuid),o.jsx(wi,{...t,fieldWrap:K})]})},wle=t=>{var se,fe,be,Ae,we,Ie,ne,q,te,Q,ue,ye,_e,Oe,Se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isAdmin:C,isRenderView:w,isPreview:T}=Qt(),[x,_]=N.useState(!1),[E,D]=N.useState(""),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{he(!0)},W=()=>{he(!1)},re=()=>{var Te,ve,k;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const R=[...g.repeatableFields],ie=Ct.findIndex(R,function(ge){return ge.uuid===(d==null?void 0:d.uuid)});ie>=0&&R[ie].fieldData?D(R[ie].fieldData):D("")}}else{const R=a;if(R!=null&&R.length){for(const ie of R)if(ie.fieldId===t.field.uuid&&((Te=ie==null?void 0:ie.postData[0])==null?void 0:Te.postValue)!==""&&((ve=ie==null?void 0:ie.postData[0])!=null&&ve.postValue)){D((k=ie==null?void 0:ie.postData[0])==null?void 0:k.postValue);break}}}H(!0)};N.useEffect(()=>{M||re();const Te=Kt.addListener("clearRepeatableFields",ge=>{ge===(g==null?void 0:g.uuid)&&(D(""),$(0),d.isValid=0,u(m,h,v,A,f,d))}),ve=Kt.addListener("onSubmitUserForm",()=>{var ge,de;(ge=d==null?void 0:d.attributes)!=null&&ge.required?E&&E.length&&(E==null?void 0:E.length)<((de=d==null?void 0:d.attributes)==null?void 0:de.minLength)?d.isValid=1:d.isValid=0:d.isValid=1}),k=Kt.addListener("OnInvalidFieldCatch",ge=>{d.uuid===(ge==null?void 0:ge.fieldId)?$(1):$(0)}),R=Kt.addListener("OnGetFieldValue",ge=>{var oe;const de=(oe=ge==null?void 0:ge.repeatableColumn)==null?void 0:oe.filter(Fe=>(Fe==null?void 0:Fe.fieldUuid)===(d==null?void 0:d.uuid));de!=null&&de.length}),ie=Kt.addListener("formFieldAdded",ge=>{V===null&&L(ge==null?void 0:ge.uuid)});return()=>{ve.remove(),k.remove(),R.remove(),Te.remove(),ie.remove()}}),N.useEffect(()=>(V!==null&&setTimeout(()=>{L(null)},1e3),()=>{}),[V]);const Y=Te=>{_(Te)},me=()=>{_(!1)},ee=Te=>{var R,ie;D(Te.target.value);const ve=a,k=Ct.cloneDeep(e);if(ve!==null){if((R=Te==null?void 0:Te.target)!=null&&R.value){if(k[d==null?void 0:d.uuid]=(ie=Te==null?void 0:Te.target)==null?void 0:ie.value,(ve==null?void 0:ve.length)>0)for(const ge of ve)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:Te.target.value})}else if(delete k[d==null?void 0:d.uuid],(ve==null?void 0:ve.length)>0)for(const ge of ve)ge.fieldId===t.field.uuid&&(ge.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(k);const ge=Object.keys(k).length;r(ge)}},ae=(Te,ve)=>{var k;if(a){const R=[...a],ie=Ct.findIndex(R,function(de){return de.rowId===(g==null?void 0:g.uuid)});let ge=(k=a[ie])==null?void 0:k.repeatableFields;ge={...ge,[Te==null?void 0:Te.uuid]:ve},R[ie]={...R[ie],repeatableFields:ge},i(R)}D(ve),ve!==""?Te.isValid=1:Te.isValid=0},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!w&&!T&&pe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "} ${(d==null?void 0:d.isFluid)===!0?" p-fluid ":""} ${w?" ":" py-6 px-4 "} ${V===(d==null?void 0:d.uuid)?" new-field ":" card "} `,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:C?"col-6 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(se=d==null?void 0:d.headerText)==null?void 0:se[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(ia,{...t}),((fe=d==null?void 0:d.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(be=d==null?void 0:d.label)==null?void 0:be[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(Mi,{message:(Ae=d==null?void 0:d.toolTip)==null?void 0:Ae[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-"+((Ie=(we=d==null?void 0:d.icon)==null?void 0:we.properties)==null?void 0:Ie.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(ne=d==null?void 0:d.placeholder)==null?void 0:ne[c==null?void 0:c.type],minLength:(q=d==null?void 0:d.attributes)==null?void 0:q.minLength,maxLength:(te=d==null?void 0:d.attributes)==null?void 0:te.maxLength,value:E,onFocus:()=>$(1),onChange:Te=>{g!=null&&g.rowIsRepeatable?ae(d,Te.target.value):ee(Te)},className:F===1&&((Q=d==null?void 0:d.attributes)!=null&&Q.required)?E?"valid":"invalid":"valid'",readOnly:S})]}),o.jsx("div",{children:((ue=d==null?void 0:d.attributes)==null?void 0:ue.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:F===1&&!E?(ye=d==null?void 0:d.validationMesssage)==null?void 0:ye.english:""}),o.jsx("small",{className:"error",children:F===1&&E.length&&(E==null?void 0:E.length)<((_e=d==null?void 0:d.attributes)==null?void 0:_e.minLength)?`Mini length ${(Oe=d==null?void 0:d.attributes)==null?void 0:Oe.minLength}`:""})]})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(Se=d==null?void 0:d.helperText)==null?void 0:Se[c==null?void 0:c.type]})})]})]})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:me,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},Sle=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)})]})]})},xle=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(Rd,{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"})]})]})},Cle=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}=sn(),{updateGlobalToast:g}=Qt(),v=(C,w,T)=>{d(x=>({...x,[C]:{...x[C],[w==null?void 0:w.type]:T}}))},A=(C,w)=>{d(T=>({...T,[C]:w}))},S=()=>{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(Eo,{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(Pt,{className:"mt-3",label:"Update",onClick:()=>S(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:h!=null&&h.length?h.map((C,w)=>o.jsx(ro,{tabIndex:w,header:C==null?void 0:C.language,children:o.jsx(Sle,{language:C,fieldState:u,onHandleChange:v,...t})},w)):""})}),o.jsx(fr,{header:"Styling",children:o.jsx(xle,{fieldState:u,onHandleChangeStyling:A,...t})})]})]})})},Tle=t=>{var m,g,v,A,S,C,w,T,x;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isPreview:r}=Qt(),[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(jr,{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(Mi,{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:(S=e==null?void 0:e.hrefLink)==null?void 0:S[n==null?void 0:n.type],children:(C=e==null?void 0:e.text)==null?void 0:C[n==null?void 0:n.type]}),((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(x=e==null?void 0:e.helperText)==null?void 0:x[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Cle,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(wi,{...t,fieldWrap:h})]})},Ele=t=>{var se,fe,be,Ae,we,Ie,ne,q,te,Q,ue,ye,_e,Oe,Se,Te,ve,k,R,ie,ge;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isPreview:u,isRenderView:d,isAdmin:f}=Qt(),{taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,TASK_PUBLISHED:S,task_status:C}=mr(),{userSelectedLanguage:w,fieldSettingUpdate:T}=sn(),[x,_]=N.useState(null),[E,D]=N.useState(!1),[V,L]=N.useState(null),[F,$]=N.useState(0),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{he(!0)},W=()=>{he(!1)},re=()=>{var de,oe;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Fe=[...a.repeatableFields],Ne=Ct.findIndex(Fe,function(Ye){return Ye.uuid===(e==null?void 0:e.uuid)});Ne>=0&&Fe[Ne].fieldData?L(Number(Fe[Ne].fieldData)||null):L(null)}}else{const Fe=A;if(Fe!=null&&Fe.length){for(const Ne of Fe)if(Ne.fieldId===t.field.uuid&&((de=Ne==null?void 0:Ne.postData)!=null&&de.length)){L(Number((oe=Ne==null?void 0:Ne.postData[0])==null?void 0:oe.postValue)||null);break}}}H(!0)};N.useEffect(()=>{M||re();const de=Kt.addListener("clearRepeatableFields",vt=>{vt===(a==null?void 0:a.uuid)&&(L(null),$(0),e.isValid=0,T(i,r,s,l,n,e))}),oe=Kt.addListener("onSubmitUserForm",()=>{var vt;(vt=e==null?void 0:e.attributes)!=null&&vt.required?V?e.isValid=1:e.isValid=0:e.isValid=1}),Fe=Kt.addListener("OnInvalidFieldCatch",vt=>{e.uuid===(vt==null?void 0:vt.fieldId)?$(1):$(0)}),Ne=Kt.addListener("OnGetFieldValue",vt=>{var tt;const wt=(tt=vt==null?void 0:vt.repeatableColumn)==null?void 0:tt.filter(Xe=>(Xe==null?void 0:Xe.fieldUuid)===(e==null?void 0:e.uuid));wt!=null&&wt.length}),Ye=Kt.addListener("formFieldAdded",vt=>{x===null&&_(vt.uuid)});return()=>{oe.remove(),Fe.remove(),Ne.remove(),de.remove(),Ye.remove()}}),N.useEffect(()=>(x!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[x]);const Y=de=>{D(de)},me=()=>{D(!1)},ee=de=>{const oe=A,Fe=Ct.cloneDeep(h);if(oe!==null){if(de){if(Fe[e==null?void 0:e.uuid]=de,(oe==null?void 0:oe.length)>0)for(const Ne of oe)Ne.fieldId===t.field.uuid&&(Ne.postData[0]={postValue:de})}else if(delete Fe[e==null?void 0:e.uuid],(oe==null?void 0:oe.length)>0)for(const Ne of oe)Ne.fieldId===t.field.uuid&&(Ne.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(Fe);const Ne=Object.keys(Fe).length;g(Ne)}},ae=(de,oe)=>{var Fe;if(A!=null&&A.length){const Ne=[...A],Ye=Ct.findIndex(Ne,function(wt){return wt.rowId===(a==null?void 0:a.uuid)});let vt=(Fe=A[Ye])==null?void 0:Fe.repeatableFields;vt={...vt,[de==null?void 0:de.uuid]:oe},Ne[Ye]={...Ne[Ye],repeatableFields:vt},v(Ne)}L(oe),oe!==""?de.isValid=1:de.isValid=0},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!d&&!u&&pe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsxs("div",{className:`field ${u?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid py-6 px-4":" py-6 px-4"} ${x===(e==null?void 0:e.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:f?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(se=e==null?void 0:e.headerText)==null?void 0:se[w==null?void 0:w.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(ia,{...t}),((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[w==null?void 0:w.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[w==null?void 0:w.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-"+((Ie=(we=e==null?void 0:e.icon)==null?void 0:we.properties)==null?void 0:Ie.name)}),o.jsx(Oa,{readOnly:c,id:e==null?void 0:e.uuid,placeholder:(ne=e==null?void 0:e.placeholder)==null?void 0:ne[w==null?void 0:w.type],value:V,min:(q=e==null?void 0:e.attributes)==null?void 0:q.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(te=e==null?void 0:e.attributes)==null?void 0:te.prefix,showButtons:(Q=e==null?void 0:e.attributes)==null?void 0:Q.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(ue=e==null?void 0:e.attributes)==null?void 0:ue.minFractionDigits,maxFractionDigits:(ye=e==null?void 0:e.attributes)==null?void 0:ye.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(Oe=e==null?void 0:e.attributes)==null?void 0:Oe.mode,currency:(Se=e==null?void 0:e.attributes)==null?void 0:Se.currency,currencyDisplay:(Te=e==null?void 0:e.attributes)==null?void 0:Te.currencyDisplay,useGrouping:(ve=e==null?void 0:e.attributes)==null?void 0:ve.useGrouping,onFocus:()=>$(1),onChange:de=>{a!=null&&a.rowIsRepeatable?ae(e,de.value):ee(de.value)},className:F===1&&((k=e==null?void 0:e.attributes)!=null&&k.required)?V?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:((R=e==null?void 0:e.attributes)==null?void 0:R.required)&&o.jsx("small",{className:"error",children:F===1&&!V?(ie=e==null?void 0:e.validationMesssage)==null?void 0:ie.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ge=e==null?void 0:e.helperText)==null?void 0:ge[w==null?void 0:w.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Xi,{visibilty:E,closeSettingFieldSidebar:me,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},W7=["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"],z3=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/,lu=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+\$,\\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%\/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function IN(t){try{JSON.parse(t)}catch{return!1}return!0}function _N(t){if(t<26)return W7[t];{const e=Math.floor(t/26)-1,n=t%26;return W7[e]+W7[n]}}const Ile=t=>{var ee,ae,K,se,fe,be,Ae,we,Ie,ne,q;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,update:s,value:l,isDisabled:c}=t,{isPreview:u,isAdmin:d,isRenderView:f}=Qt(),{task_status:h,taskRegisterData:m,updateTaskRegisterData:g,updateTaskProgressValue:v,updateUserFormDataSubmit:A,userTaskSubmitFormData:S,TASK_PUBLISHED:C}=mr(),{userSelectedLanguage:w}=sn(),[T,x]=N.useState(!1),[_,E]=N.useState(""),[D,V]=N.useState(0),[L,F]=N.useState(!1),$=()=>{F(!0)},M=()=>{F(!1)};N.useEffect(()=>{T||W();const te=Kt.addListener("clearRepeatableFields",ue=>{ue===(a==null?void 0:a.uuid)&&(E(""),V(0),e.isValid=0)}),Q=Kt.addListener("onSubmitUserForm",()=>{var ue;(ue=e==null?void 0:e.attributes)!=null&&ue.required?_!==""&&z3.test(_)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Q.remove(),te.remove()}});const[H,pe]=N.useState(!1),he=te=>{pe(te)},Z=()=>{pe(!1)},W=()=>{var te,Q,ue;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],_e=Ct.findIndex(ye,function(Oe){return Oe.uuid===(e==null?void 0:e.uuid)});_e>=0&&ye[_e].fieldData?E(ye[_e].fieldData):E("")}}else{const ye=S;if(ye!=null&&ye.length){for(const _e of ye)if(_e.fieldId===t.field.uuid&&((te=_e==null?void 0:_e.postData[0])==null?void 0:te.postValue)!==""&&((Q=_e==null?void 0:_e.postData[0])!=null&&Q.postValue)){E((ue=_e==null?void 0:_e.postData[0])==null?void 0:ue.postValue),x(!0);break}}}x(!0)},re=te=>{E(te);const Q=S,ue=Ct.cloneDeep(m);if(Q!==null){if(te!==""&&z3.test(te)===!0){if(ue[e==null?void 0:e.uuid]=te,(Q==null?void 0:Q.length)>0)for(const ye of Q)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:te})}else if(delete ue[e==null?void 0:e.uuid],(Q==null?void 0:Q.length)>0)for(const ye of Q)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){g(ue);const ye=Object.keys(ue).length;v(ye)}},Y=(te,Q,ue,ye)=>{var _e;if(E(ye),S!==null){const Oe=[...S],Se=Ct.findIndex(Oe,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let Te=(_e=S[Se])==null?void 0:_e.repeatableFields;Te={...Te,[ue==null?void 0:ue.uuid]:ye},Oe[Se]={...Oe[Se],repeatableFields:Te},A(Oe),ye!==""&&z3.test(ye)===!0?e.isValid=1:e.isValid=0}},me=o.jsxs("div",{onMouseOver:$,onMouseOut:M,children:[!f&&!u&&L&&o.jsx(jr,{handleFieldSettingsSidebar:he,...t}),o.jsxs("div",{className:`field ${u?" ":" 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:(ee=e==null?void 0:e.headerText)==null?void 0:ee[w==null?void 0:w.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(ia,{...t,update:s,value:l}),((ae=e==null?void 0:e.attributes)==null?void 0:ae.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",u?o.jsx(o.Fragment,{children:(K=e==null?void 0:e.label)==null?void 0:K[w==null?void 0:w.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(Mi,{message:(se=e==null?void 0:e.toolTip)==null?void 0:se[w==null?void 0:w.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-"+((be=(fe=e==null?void 0:e.icon)==null?void 0:fe.properties)==null?void 0:be.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(Ae=e==null?void 0:e.placeholder)==null?void 0:Ae[w==null?void 0:w.type],value:_,onFocus:()=>V(1),onChange:te=>{a!=null&&a.rowIsRepeatable?Y(r,i,{uuid:e.uuid},te.target.value):re(te.target.value)},className:D===1&&((we=e==null?void 0:e.attributes)!=null&&we.required)?_?"valid":"invalid":"valid'",readOnly:c})]}),((Ie=e==null?void 0:e.attributes)==null?void 0:Ie.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:D===1&&!_?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne[w==null?void 0:w.language]:""})}),_!==""&&D===1&&z3.test(_)===!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:(q=e==null?void 0:e.helperText)==null?void 0:q[w==null?void 0:w.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]});return o.jsxs(o.Fragment,{children:[H===!0&&o.jsx(Xi,{visibilty:H,closeSettingFieldSidebar:Z,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:me})]})},_le=t=>{var se,fe,be,Ae,we,Ie,ne,q,te;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,row:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Qt(),{userSelectedLanguage:h,fieldSettingUpdate:m}=sn(),{task_status:g,taskRegisterData:v,updateTaskRegisterData:A,updateTaskProgressValue:S,updateUserFormDataSubmit:C,userTaskSubmitFormData:w,TASK_PUBLISHED:T}=mr(),[x,_]=N.useState(!1),[E,D]=N.useState(""),[V,L]=N.useState(0),[F,$]=N.useState(!1),[M,H]=N.useState(!1),[pe,he]=N.useState(!1),Z=()=>{H(!0)},W=()=>{H(!1)},re=Q=>{_(Q)},Y=()=>{_(!1)},me=()=>{var ue,ye,_e;const Q=w;if(l!=null&&l.rowIsRepeatable){if(l!=null&&l.repeatableFields){const Oe=[...l.repeatableFields],Se=Ct.findIndex(Oe,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});Se>=0&&Oe[Se].fieldData?D(Oe[Se].fieldData):(e.isValid=0,D(""))}}else if(Q!=null&&Q.length){for(const Oe of Q)if(Oe.fieldId===t.field.uuid&&((ue=Oe==null?void 0:Oe.postData[0])!=null&&ue.postValue)&&((ye=Oe==null?void 0:Oe.postData[0])==null?void 0:ye.postValue)!==""){D((_e=Oe==null?void 0:Oe.postData[0])==null?void 0:_e.postValue),$(!0);break}}$(!0)},ee=(Q,ue,ye,_e)=>{var Oe;if(w!=null&&w.length){const Se=[...w],Te=Ct.findIndex(Se,function(k){return k.rowId===(l==null?void 0:l.uuid)});let ve=(Oe=w[Te])==null?void 0:Oe.repeatableFields;ve={...ve,[ye==null?void 0:ye.uuid]:_e},Se[Te]={...Se[Te],repeatableFields:ve},C(Se)}D(_e),_e!==""?e.isValid=1:e.isValid=0,m(Q,ue,a,s,n,e)};N.useEffect(()=>{F||me();const Q=Kt.addListener("clearRepeatableFields",Se=>{Se===(l==null?void 0:l.uuid)&&(D(""),L(0),e.isValid=0)}),ue=Kt.addListener("onSubmitUserForm",()=>{var Se;(Se=e==null?void 0:e.attributes)!=null&&Se.required?E?e.isValid=1:e.isValid=0:e.isValid=1}),ye=Kt.addListener("OnInvalidFieldCatch",Se=>{e.uuid===(Se==null?void 0:Se.fieldId)?L(1):L(0)}),_e=Kt.addListener("OnGetFieldValue",Se=>{var ve;const Te=(ve=Se==null?void 0:Se.repeatableColumn)==null?void 0:ve.filter(k=>(k==null?void 0:k.fieldUuid)===(e==null?void 0:e.uuid));Te!=null&&Te.length}),Oe=Kt.addListener("onUpdateField",()=>{he(!pe)});return()=>{Oe.remove(),ue.remove(),ye.remove(),_e.remove(),Q.remove()}});const ae=Q=>{var _e,Oe;D(Q.target.value);const ue=w,ye=Ct.cloneDeep(v);if(ue!==null){if((_e=Q==null?void 0:Q.target)!=null&&_e.value){if(ye[e==null?void 0:e.uuid]=(Oe=Q==null?void 0:Q.target)==null?void 0:Oe.value,(ue==null?void 0:ue.length)>0)for(const Se of ue)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:Q.target.value})}else if(delete ye[e==null?void 0:e.uuid],(ue==null?void 0:ue.length)>0)for(const Se of ue)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:""})}if(!(l!=null&&l.rowIsRepeatable)){A(ye);const Se=Object.keys(ye).length;S(Se)}},K=o.jsxs("div",{onMouseOver:Z,onMouseOut:W,children:[!u&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:re,...t}),o.jsxs("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?"card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:f?"col-12 ":"col-12 field-form-builder ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(se=e==null?void 0:e.headerText)==null?void 0:se[h==null?void 0:h.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(ia,{...t}),((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[h==null?void 0:h.type]}):o.jsx(ea,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Ae=e==null?void 0:e.toolTip)==null?void 0:Ae[h==null?void 0:h.type],position:"right"})})]}),o.jsx(_s,{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:(we=e==null?void 0:e.placeholder)==null?void 0:we[h==null?void 0:h.type],value:E,onFocus:()=>L(1),onChange:Q=>{l!=null&&l.rowIsRepeatable?ee(r,i,e,Q.target.value):ae(Q)},className:V===1&&((Ie=e==null?void 0:e.attributes)!=null&&Ie.required)?E?"valid":"invalid":"valid",readOnly:c}),o.jsx("div",{children:((ne=e==null?void 0:e.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:V===1&&!E?(q=e==null?void 0:e.validationMesssage)==null?void 0:q[h==null?void 0:h.type]:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(te=e==null?void 0:e.helperText)==null?void 0:te[h==null?void 0:h.type]})})]})}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:Y,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:K})]})},Dle={},Q7=t=>{var E,D,V,L;const{isAdmin:e,isAdvanceView:n,isPreview:r}=Qt(),{handleDrop:i}=sn(),{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:S}=t,C=N.useRef(null),[{isDragging:w},T]=Ji({type:GC,item:{type:GC,uuid:a.uuid,children:a.children,path:s},collect:F=>({isDragging:F.isDragging()})}),x=w?0:1;T(C);const _=(F,$,M,H,pe,he,Z)=>{const W=t!=null&&t.fieldContainer?t==null?void 0:t.fieldContainer:"inline-condition-container";return o.jsx(qc,{type:"inline-conditional",field:F,data:F,path:$,page:g,section:v,row:A,column:S,pageIndex:M,sectionIndex:H,rowIndex:pe,columnIndex:he,fieldIndex:Z,isAdmin:e,fieldContainer:W},F.uuid)};return o.jsxs("div",{ref:r===!1?C:null,style:{...Dle,opacity:x},className:"draggable column",children:[m&&((E=m.children)==null?void 0:E.length)===0&&o.jsx("p",{className:"text-primary text-center",children:"Drag item here"}),m&&m.children&&((D=m.children)==null?void 0:D.length)>0&&m.children.map((F,$)=>{var M;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(Tr,{isAdvanceView:n,data:{path:`${s}-${h}-${f}-${$}`,childrenCount:(M=m==null?void 0:m.children)==null?void 0:M.length,droppedField:m},onDrop:i}),_(F,`${s}-${h}-${f}-${$}`,l,c,u,d,$)]},F.uuid)}),r===!1&&o.jsx(Tr,{isAdvanceView:n,fieldDropArea:!0,data:{path:`${s}-${h}-${f}-${(V=m==null?void 0:m.children)==null?void 0:V.length}`,childrenCount:(L=m==null?void 0:m.children)==null?void 0:L.length,droppedField:m},onDrop:i,isLast:!0})]})},Qd=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:S}=mr(),C=N.useCallback((w,T,x)=>{var E,D,V;const _=A;if(_!=null&&_.length){const L=g,F=(E=a==null?void 0:a.inlineConditionalRules)==null?void 0:E.rules[T].conditions[x].children;for(const[M,H]of F.entries()){(D=H==null?void 0:H.attributes)!=null&&D.required;const pe=Ct.findIndex(_,function(he){return he.fieldId===H.uuid});w?pe===-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:M,fieldId:H.uuid,fieldInputType:a.componentType,fieldTitle:(V=a.label)==null?void 0:V.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}),L[H==null?void 0:H.uuid]&&delete L[H==null?void 0:H.uuid]):(L[H==null?void 0:H.uuid]&&delete L[H==null?void 0:H.uuid],pe>=0&&_.splice(pe,1))}const $=Object.keys(L).length;S({progressMaxValue:_==null?void 0:_.length,progressValue:$}),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,S,v,A]);return N.useEffect(()=>(C(m,r,i),()=>{}),[i,e,m,r,C]),o.jsx("div",{children:m&&o.jsx("div",{className:"p-field p-pt-2",children:o.jsx(o.Fragment,{children:o.jsx(Q7,{...t,ruleIndex:r,conditionIndex:i,condition:n,data:a})})},i)})};function l2(t){"@babel/helpers - typeof";return l2=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},l2(t)}function Ole(t,e){if(l2(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(l2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nle(t){var e=Ole(t,"string");return l2(e)==="symbol"?e:String(e)}function J7(t,e,n){return e=Nle(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fle={value:"p-tag-value",icon:"p-tag-icon",root:function(e){var n=e.props;return pt("p-tag p-component",J7(J7({},"p-tag-".concat(n.severity),n.severity!==null),"p-tag-rounded",n.rounded))}},Ple=`
|
|
2378
2378
|
@layer primereact {
|
|
2379
2379
|
.p-tag {
|
|
2380
2380
|
display: inline-flex;
|
|
@@ -55588,7 +55588,7 @@ const Li = (t) => {
|
|
|
55588
55588
|
}), le = Bt.addListener(
|
|
55589
55589
|
"OnInvalidFieldCatch",
|
|
55590
55590
|
(be) => {
|
|
55591
|
-
r.uuid === (be == null ? void 0 : be.fieldId) ? U(1) : U(0);
|
|
55591
|
+
console.log("OnInvalidFieldCatch listener"), r.uuid === (be == null ? void 0 : be.fieldId) ? U(1) : U(0);
|
|
55592
55592
|
}
|
|
55593
55593
|
);
|
|
55594
55594
|
return () => {
|
|
@@ -55686,7 +55686,7 @@ const Li = (t) => {
|
|
|
55686
55686
|
showClear: !0
|
|
55687
55687
|
}
|
|
55688
55688
|
),
|
|
55689
|
-
((_e = r == null ? void 0 : r.attributes) == null ? void 0 : _e.required) && /* @__PURE__ */ c("small", { className: "error", children: F === 1 &&
|
|
55689
|
+
((_e = r == null ? void 0 : r.attributes) == null ? void 0 : _e.required) && /* @__PURE__ */ c("small", { className: "error", children: F === 1 && V ? (te = r == null ? void 0 : r.validationMesssage) == null ? void 0 : te.language : "" }),
|
|
55690
55690
|
/* @__PURE__ */ c("div", { children: (r == null ? void 0 : r.showHelperText) && /* @__PURE__ */ c("small", { children: (B = r == null ? void 0 : r.helperText) == null ? void 0 : B[p == null ? void 0 : p.type] }) })
|
|
55691
55691
|
]
|
|
55692
55692
|
}
|
|
@@ -58583,7 +58583,7 @@ var Kue = function() {
|
|
|
58583
58583
|
theme: i.theme,
|
|
58584
58584
|
formats: i.formats
|
|
58585
58585
|
};
|
|
58586
|
-
Kue ? C(new Quill(d.current, F)) : import("./quill-
|
|
58586
|
+
Kue ? C(new Quill(d.current, F)) : import("./quill-B5Dq-k4e.js").then(function(U) {
|
|
58587
58587
|
if (U && Ee.isExist(d.current)) {
|
|
58588
58588
|
var M;
|
|
58589
58589
|
U.default ? M = new U.default(d.current, F) : M = new U(d.current, F), C(M);
|
|
@@ -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-CTBSh-M1.js";
|
|
5
5
|
function Ki(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|