cft-builder 0.1.59 → 0.1.60
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-BCD8p0jw.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BuilderItems,
|
|
4
4
|
o as BuilderItemsRender,
|
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -1594,7 +1594,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
1596
1596
|
`}}),g8=y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=Qm.getProps(t,r),a=y.useState(i.id),s=m_(a,2),l=s[0],c=s[1],u=y.useState(i.collapsed),d=m_(u,2),f=d[0],h=d[1],m=i.toggleable?i.onToggle?i.collapsed:f:!1,g=y.useRef(null),v=y.useRef(null),A=l+"_header",S=l+"_content",x=Qm.setMetaData({props:i,state:{id:l,collapsed:m}}),w=x.ptm,T=x.cx,C=x.isUnstyled;fi(Qm.css.styles,C,{name:"fieldset"});var _=function(G){i.toggleable&&(m?E(G):O(G),i.onToggle&&i.onToggle({originalEvent:G,value:!m})),G.preventDefault()},E=function(G){i.onToggle||h(!1),i.onExpand&&i.onExpand(G)},O=function(G){i.onToggle||h(!0),i.onCollapse&&i.onCollapse(G)};ki(function(){i.id||c(jo())});var F=function(G){(G.code==="Enter"||G.code==="NumpadEnter"||G.code==="Space")&&(_(G),G.preventDefault())},B=function(){var G=n({className:T("content")},w("content")),ae=n({ref:v,id:S,role:"region","aria-labelledby":A,className:T("toggleableContent")},w("toggleableContent")),Y=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!m,unmountOnExit:!0,options:i.transitionOptions},w("transition"));return y.createElement(Ho,Wm({nodeRef:v},Y),y.createElement("div",ae,y.createElement("div",G,i.children)))},M=function(){if(i.toggleable){var G=n({className:T("togglericon")},w("togglericon")),ae=m?i.expandIcon||y.createElement(zm,G):i.collapseIcon||y.createElement(p8,G),Y=Wn.getJSXIcon(ae,G,{props:i});return Y}return null},z=function(){var G=n({className:T("legendTitle")},w("legendTitle")),ae=n({id:A,role:"button","aria-expanded":!m,"aria-controls":S,onKeyDown:F,onClick:_,"aria-label":i.legend,tabIndex:0},w("toggler"));if(i.toggleable){var Y=M();return y.createElement("a",ae,Y,y.createElement("span",G,i.legend),y.createElement(Wt,null))}return y.createElement("span",Wm({},G,{id:A}),i.legend)},k=function(){var G=n({className:T("legend")},w("legend"));if(i.legend!=null||i.toggleable){var ae=z();return y.createElement("legend",G,ae)}};y.useImperativeHandle(e,function(){return{props:i,getElement:function(){return g.current},getContent:function(){return v.current}}});var H=n({id:l,ref:g,style:i.style,className:ht(i.className,T("root")),onClick:i.onClick},Qm.getOtherProps(i),w("root")),de=k(),he=B();return y.createElement("fieldset",H,de,he)});g8.displayName="Fieldset";const ZW=t=>o.jsx(rn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"card m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Dynamic Listing Component"}),o.jsx(na,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("label",{children:t==null?void 0:t.label}),o.jsxs("div",{children:[o.jsxs(g8,{children:[o.jsx("div",{className:"pi pi-circle",children:" Option 1"}),o.jsx("br",{})]}),o.jsx("br",{}),o.jsx(g8,{children:o.jsx("div",{className:"pi pi-circle",children:" Option 2"})})]})]})]})}),eQ=t=>o.jsx(rn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"card m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Documents"}),o.jsx(na,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("label",{children:t==null?void 0:t.label}),o.jsxs("div",{children:["1.Hr Cv.docx",o.jsx("br",{}),"2.Readme.txt",o.jsx("br",{}),"3.Cover.jpg"]})]})]})}),tQ=[{label:"Free form inputs",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"Text",icon:"pi pi-fw pi-plus",element:"input",schema:zY,uuid:et(),type:Zn,toolTip:t=>yX(t)},{label:"Number",icon:"pi pi-fw pi-trash",element:"number",schema:HY,uuid:et(),type:Zn,toolTip:t=>AX(t)},{label:"Email",icon:"pi pi-fw pi-external-link",element:"email",schema:jY,uuid:et(),type:Zn,toolTip:t=>wX(t)},{label:"Text Area",icon:"pi pi-fw pi-external-link",element:"textArea",schema:WY,uuid:et(),type:Zn,toolTip:t=>SX(t)},{label:"Text Editor",icon:"pi pi-fw pi-external-link",element:"textHtmlEditor",schema:$Y,uuid:et(),type:Zn,toolTip:t=>xX(t)},{label:"Date Picker",icon:"pi pi-fw pi-user-plus",element:"date-picker",schema:kY,uuid:et(),type:Zn,toolTip:t=>CR(t)},{label:"Draw Signature",icon:"pi pi-fw pi-trash",element:"signature",schema:dT,uuid:et(),type:Zn,toolTip:t=>DR(t)},{label:"Type Signature",icon:"pi pi-fw pi-trash",element:"type-signature",schema:QY,uuid:et(),type:Zn,toolTip:t=>OR(t)},{label:"File Upload",icon:"pi pi-fw pi-trash",element:"file-upload",schema:VY,uuid:et(),type:Zn,toolTip:t=>NR(t)},{label:"Phone Number",icon:"pi pi-fw pi-trash",element:"phone",schema:KY,uuid:et(),type:Zn,PhoneNumberToolTip:bE,toolTip:t=>bE(t)},{label:"Website Url",icon:"pi pi-fw pi-trash",element:"web-url",schema:ZY,uuid:et(),type:Zn,toolTip:t=>PR(t)},{label:"Hidden Field",icon:"pi pi-fw pi-trash",element:"hidden-field",schema:qY,uuid:et(),type:Zn,toolTip:t=>dG(t)},{label:"Address",icon:"pi pi-fw pi-trash",element:"address",schema:FY,uuid:et(),type:Zn,toolTip:t=>fG(t)},{label:"Grid Component",icon:"pi pi-fw pi-trash",element:"grid-component",schema:UY,uuid:et(),type:Zn,toolTip:t=>XW(t)},{label:"Matrix Dropdown",icon:"pi pi-fw pi-trash",element:"matrix-dropdown",schema:YY,uuid:et(),type:Zn,toolTip:t=>RW(t)}]},{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:JC,uuid:et(),type:Zn,toolTip:t=>d_(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:uT,uuid:et(),type:Zn,toolTip:t=>f_(t)},{label:"Multi Select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:sT,uuid:et(),type:Zn,toolTip:t=>h_(t)},{label:"CheckBox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:QC,uuid:et(),type:Zn,toolTip:t=>p_(t)},{label:"Radio Button",icon:"pi pi-fw pi-align-left",element:"radio",schema:lT,uuid:et(),type:Zn,toolTip:t=>f8(t)},{label:"Hierarchal Radio",icon:"pi pi-fw pi-align-left",element:"radio-hierarchal",schema:RY,uuid:et(),type:Zn,toolTip:t=>f8(t)},{label:"Dynamic Radio",icon:"pi pi-fw pi-align-left",element:"dynamic-listing",schema:MY,uuid:et(),type:Zn,toolTip:t=>ZW(t)}]},{label:"Rating Inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert Scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:aT,uuid:et(),type:Zn,toolTip:t=>L6(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:fT,uuid:et(),type:Zn,toolTip:t=>_E(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:cT,uuid:et(),type:Zn,toolTip:t=>TE(t)},{label:"Thumbs Up and Down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:hT,uuid:et(),type:Zn,toolTip:t=>cG(t)},{label:"Likert Emoji Scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:iT,uuid:et(),type:Zn,toolTip:t=>uG(t)}]},{label:"Social Logins",icon:"pi pi-fw pi-pencil",items:[{label:"Facebook Login",icon:"pi pi-fw pi-trash",element:"facebook-login",schema:BY,uuid:et(),type:Zn,toolTip:t=>L6(t)}]},{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:ZC,uuid:et(),type:Zn,toolTip:t=>eQ(t)}]}],nQ=[{label:"HTML",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"<a>",icon:"pi pi-fw pi-plus",element:"a",schema:nT,uuid:et(),type:Zn},{label:"<p>",icon:"pi pi-fw pi-trash",element:"paragraph",schema:oT,uuid:et(),type:Zn},{label:"<heading>",icon:"pi pi-fw pi-external-link",element:"h",schema:eT,uuid:et(),type:Zn},{label:"<li>",icon:"pi pi-fw pi-external-link",element:"list",schema:JY,uuid:et(),type:Zn},{label:"divider",icon:"pi pi-fw pi-external-link",element:"hr",schema:tT,uuid:et(),type:Zn},{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:k9,uuid:et(),type:Zn},{label:"Image Gallery",icon:"pi pi-fw pi-user-plus",element:"image-gallery",schema:rT,uuid:et(),type:Zn},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:M9,uuid:et(),type:Zn}]}],rQ=[{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:JC,uuid:et(),type:Zn,toolTip:t=>d_(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:uT,uuid:et(),type:Zn,toolTip:t=>f_(t)},{label:"Multi Select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:sT,uuid:et(),type:Zn,toolTip:t=>h_(t)},{label:"CheckBox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:QC,uuid:et(),type:Zn,toolTip:t=>p_(t)},{label:"Radio Button",icon:"pi pi-fw pi-align-left",element:"radio",schema:lT,uuid:et(),type:Zn,toolTip:t=>f8(t)}]},{label:"Rating Inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert Scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:aT,uuid:et(),type:Zn,toolTip:t=>L6(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:fT,uuid:et(),type:Zn,toolTip:t=>_E(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:cT,uuid:et(),type:Zn,toolTip:t=>TE(t)},{label:"Thumbs Up and Down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:hT,uuid:et(),type:Zn},{label:"Likert Emoji Scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:iT,uuid:et(),type:Zn}]}],iQ=[{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:k9,uuid:et(),type:Zn},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:M9,uuid:et(),type:Zn},{label:"Quiz",icon:"pi pi-fw pi-trash",element:"quiz",schema:XY,uuid:et(),type:Zn},{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:ZC,uuid:et(),type:Zn}]}],aQ=[{label:"Left",icon:"pi pi-align-left",value:"left"},{label:"Right",icon:"pi pi-align-right",value:"right"}],sQ=[{key:1,language:"English",type:"english"},{key:2,language:"Urdu",type:"urdu"},{key:3,language:"Hindi",type:"hindi"},{key:4,language:"Arabic",type:"arabic"},{key:5,language:"French",type:"french"},{key:6,language:"Italian",type:"italian"},{key:7,language:"Spanish",type:"spanish"}],oQ=[{name:"Bad Script",font:"bad-script"},{name:"Bilbo Swash Caps",font:"bilbo-swash-caps"},{name:"caveat",font:"caveat"},{name:"Covered By Your Grace",font:"covered-by-your-grace"},{name:"Dancing Script",font:"dancing-script"},{name:"Gochi Hand",font:"gochi-hand"},{name:"Great Vibes",font:"great-vibes"},{name:"Handlee",font:"handlee"},{name:"Just Another Hand",font:"just-another-hand"},{name:"Kalam",font:"kalam"},{name:"La Belle Aurore",font:"la-belle-aurore"},{name:"Marck Script",font:"marck-script"},{name:"Nothing You Could Do",font:"nothing-you-could-do"},{name:"Qwigley",font:"qwigley"},{name:"Sacramento",font:"sacramento"},{name:"Shadows Into Light",font:"shadows-into-light"},{name:"Stalemate",font:"stalemate"},{name:"Yellowtail",font:"yellowtail"}],Jm={type:KC,isCoverPage:!1,margin:{left:0,right:0,top:0,bottom:0},isVisible:!0,isHidden:!1,isValid:!1,displayRules:[],title:{english:"Page 1"}},af={type:ta,showSectionHeader:!1,isVisible:!0,isHidden:!1,isValid:!1,showSectionTitle:!1,showSectionSubTitle:!1,heading:{english:"Section header"},subHeadingText:{english:""},isCollapsed:!1},tu={type:bo,isHidden:!1,isValid:!1,isRequired:!1,isCollapsed:!1,showRowTitle:!0,showRowSubTitle:!0,heading:{english:""},subHeadingText:{english:""},rowIsRepeatable:!1,repeatableFields:[],repeatableFieldsData:[],isMinimumEntries:!1,minimumEntries:5,addToListButtonLabel:{english:"Add To List"},reviewerChecklist:[]},Ac={type:ms,isCollapsed:!1},lQ=t=>{let e=t;e={...e,uuid:et()};const n=e.children.map(r=>({...r,uuid:et(),children:r.children.map(i=>({...i,uuid:et(),children:i.children.map(a=>{var s;return{...a,uuid:et(),...((s=a==null?void 0:a.children)==null?void 0:s.length)>0?{children:a.children.map(l=>{var c;return{...l,uuid:et(),...((c=l.options)==null?void 0:c.length)>0?{options:l.options.map(u=>({...u,uuid:et()}))}:{}}})}:{}}})}))}));return e={...e,children:n},e};function cQ(t){return e=>{const n={...Jm,uuid:et(),title:{english:`Page ${t+1}`},children:[{...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[]}]}]}]};e({type:CC,payLoad:n})}}function uQ(t){return e=>{const n=[];for(const[,i]of t.entries())for(const[,a]of i.children.entries())for(const[,s]of a.children.entries())for(const[,l]of s.children.entries())for(const[,c]of l.children.entries())s!=null&&s.rowIsRepeatable||n.push(c);e({type:HC,payLoad:{tableFields:n}})}}function dQ(t,e){return(n,r)=>{const i=t;let a=Tt.cloneDeep(i);const{layout:s}=r;a={...a,title:{english:`Page ${(s==null?void 0:s.length)+1}`}},a=lQ(a),n({type:_C,payLoad:{page:a,pageIndex:e}})}}function fQ(t,e){return n=>{n({type:jC,payLoad:{pageIndex:t,page:e}})}}function hQ(t){return e=>{e({type:vC,payLoad:{pageIndex:t}})}}const v_=t=>{let e=t;e={...e,uuid:et()};const n=e.children.map(r=>({...r,uuid:et(),children:r.children.map(i=>{var a;return{...i,uuid:et(),...((a=i==null?void 0:i.children)==null?void 0:a.length)>0?{children:i.children.map(s=>{var l;return{...s,uuid:et(),...((l=s.options)==null?void 0:l.length)>0?{options:s.options.map(c=>({...c,uuid:et()}))}:{}}})}:{}}})}));return e={...e,children:n},e};function pQ(t,e){return n=>{n({type:bC,payLoad:{pageIndex:t,sectionIndex:e}})}}function gQ(t){return e=>{const n={...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[]}]}]};e({type:TC,payLoad:{pageIndex:t,section:n}})}}function mQ(t,e,n){return r=>{r({type:xC,payLoad:{pageIndex:t,sectionIndex:e,section:n}})}}function vQ(t,e,n){return r=>{const i=t;let a=Tt.cloneDeep(i);a=v_(a),r({type:DC,payLoad:{section:a,pageIndex:e,sectionIndex:n}})}}function bQ(t,e){return n=>{const r=t;let i=Tt.cloneDeep(r);i=v_(i),n({type:OC,payLoad:{section:i,pageIndex:e}})}}const yQ=t=>{let e=t;e={...e,uuid:et()};const n=e.children.map(r=>{var i;return{...r,uuid:et(),...((i=r==null?void 0:r.children)==null?void 0:i.length)>0?{children:r.children.map(a=>{var s;return{...a,uuid:et(),...((s=a.options)==null?void 0:s.length)>0?{options:a.options.map(l=>({...l,uuid:et()}))}:{}}})}:{}}});return e={...e,children:n},e};function AQ(t,e,n,r){return i=>{const a=t;let s=Tt.cloneDeep(a);s=yQ(s),i({type:NC,payLoad:{row:s,pageIndex:e,sectionIndex:n,rowIndex:r}})}}function wQ(t,e,n,r){return i=>{i({type:O9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function SQ(t,e,n){return r=>{r({type:yC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n}})}}function xQ(t,e){return n=>{const r={...tu,uuid:et(),isCollapsed:!1,children:[{...Ac,uuid:et(),children:[]}]};n({type:EC,payLoad:{pageIndex:t,sectionIndex:e,row:r}})}}function CQ(t,e,n,r){return i=>{i({type:MC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,fieldItem:r}})}}const TQ=t=>{var r;let e=t;e={...e,uuid:et()};const n=((r=e==null?void 0:e.children)==null?void 0:r.length)>0?e.children.map((i,a)=>{var s;return{...i,uuid:et(),...((s=i.options)==null?void 0:s.length)>0?{options:i.options.map((l,c)=>({...l,uuid:et()}))}:{}}}):[];return e={...e,children:n},e};function EQ(t,e,n){return r=>{const i={...Ac,uuid:et(),children:[]};r({type:IC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,column:i}})}}function IQ(t,e,n,r,i){return a=>{const s=t;let l=Tt.cloneDeep(s);l=TQ(l),a({type:FC,payLoad:{column:l,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i}})}}function _Q(t,e,n,r){return i=>{i({type:AC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r}})}}function b_(t,e,n,r){return i=>{i({type:O9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function DQ(t,e,n,r,i){return(a,s)=>{var m,g,v,A;const{layout:l,tableFields:c}=s;let u=(m=l[t])==null?void 0:m.children[e].children[n];const d=(A=(v=(g=l[t])==null?void 0:g.children[e])==null?void 0:v.children[n])==null?void 0:A.children[r].children[i];if((u==null?void 0:u.rowIsRepeatable)===!0){const S=[...u.repeatableFields],x=Tt.findIndex(S,function(w){return w.uuid===(d==null?void 0:d.uuid)});S.splice(x,1),u={...u,repeatableFields:S},a(b_(t,e,n,u))}const f=Tt.findIndex(c,function(S){return S.uuid===(d==null?void 0:d.uuid)});c.splice(f,1),a({type:wC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i}})}}function OQ(t,e,n,r,i,a){return(s,l)=>{var m,g,v,A;const{layout:c,tableFields:u}=l;let d=(m=c[t])==null?void 0:m.children[e].children[n];if((d==null?void 0:d.rowIsRepeatable)===!0){const S=(A=(v=(g=c[t])==null?void 0:g.children[e])==null?void 0:v.children[n])==null?void 0:A.children[r].children[i],x=[...d.repeatableFields],w=Tt.findIndex(x,function(T){return T.uuid===(S==null?void 0:S.uuid)});w===-1?x.splice(i,0,a):x[w]=a,x[w]=a,d={...d,repeatableFields:x},s(b_(t,e,n,d))}const f={type:SC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}},h=u.findIndex(S=>S.uuid===a.uuid);h>=0&&(u[h]=a),s(f)}}function NQ(t,e,n,r,i,a){return s=>{var d;const l=t;let c=Tt.cloneDeep(l);if(c={...c,uuid:et()},c!=null&&c.options&&((d=c==null?void 0:c.options)==null?void 0:d.length)>0){const f=c==null?void 0:c.options.map(h=>({...h,uuid:et()}));c={...c,options:f}}s({type:PC,payLoad:{field:c,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i,fieldIndex:a}})}}function FQ(t,e,n,r,i,a,s,l){return c=>{c({type:LC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,field:l}})}}function PQ(t,e,n,r,i,a,s,l){return c=>{c({type:BC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridColumnIndex:s,gridRowIndex:a,field:l}})}}function kQ(t,e,n,r,i,a,s,l,c){return u=>{u({type:qC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l,field:c}})}}function MQ(t,e,n,r,i,a,s,l){return c=>{c({type:$C,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l}})}}function LQ(t,e,n,r,i,a,s,l,c){return u=>{u({type:VC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l,field:c}})}}function BQ(t,e,n,r,i,a,s,l){return c=>{c({type:UC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l}})}}function VQ(t){return e=>{e({type:$1,payLoad:{formSchema:t}})}}function UQ(t){return e=>{e({type:$1,payLoad:{layout:t}})}}function qQ(t){return(e,n)=>{const{languages:r}=n,i={type:$1,payLoad:{languages:[...r,t]}};e(i)}}function $Q(t){return(e,n)=>{const{languages:r}=n,i=Tt.findIndex(r,l=>l.key===t.key),a=[...r];a.splice(i,1),e({type:$1,payLoad:{languages:a}})}}function jQ(t){return e=>{const n={type:$1,payLoad:{userSelectedLanguage:t.value}};e(n)}}function HQ(t){return e=>{e({type:cm,payLoad:{formType:t}})}}function zQ(t){return e=>{e({type:cm,payLoad:t})}}function YQ(t){return e=>{e({type:cm,payLoad:{editing_by:t}})}}function KQ(){return t=>{t({type:kC,payLoad:null})}}const m8={loading:!1,intro:"",editing_by:0,isChangesSaved:!1,enableReviewTask:!1,enableAutoSave:!1,enableAutoSaveBuilderSetting:!1,surveyQuestionSlide:!1,enableFormFluid:!0,showConditionalFields:!0,isAdvanceView:!1,models:[],fieldMappings:[],version_name:null,showIntroTab:!1,published_status:!1,formType:null,randomiseQuestions:!1,randomiseAnswers:!1,enableNoOfAssessmentQuestions:!1,noOfAssessmentQuestions:null,tableFields:[],tableConfiguration:{stripedRows:!1,gridLines:!1,flexScroll:!1,isResponsive:!1,rowReorder:!1},builderTemplateName:"",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},header:[],languages:[{key:1,language:"English",type:"english"}],userSelectedLanguage:{key:1,language:"English",type:"english"},layout:[{uuid:et(),...Jm,children:[{uuid:et(),...af,children:[{uuid:et(),...tu,children:[{uuid:et(),...Ac,children:[]}]}]}]}],conditionalTabsRules:[],conditionalSectionsRules:[]},XQ=(t=m8,e)=>{var n,r;switch(e.type){case DY:return{...t,...e.payLoad};case _Y:return{...t,...e.payLoad};case kC:return{...t,...m8};case $1:return{...t,...e.payLoad};case cm:return{...t,...e.payLoad};case vC:{const{pageIndex:i}=e.payLoad;return{...t,layout:t.layout.filter((a,s)=>s!==i)}}case CC:return{...t,layout:[...t.layout,e.payLoad]};case TC:{const{pageIndex:i,section:a}=e.payLoad,s=[...t.layout];return s[i].children=[...s[i].children,a],{...t,layout:s}}case MC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,fieldItem:l}=e.payLoad,c=[...t.layout],u=Array.isArray((n=c[i].children[a].children[s])==null?void 0:n.repeatableFields)?[...((r=c[i].children[a].children[s])==null?void 0:r.repeatableFields)||[],l]:l?[l]:[];return c[i].children[a].children[s]={...c[i].children[a].children[s],repeatableFields:u},{...t,layout:c}}case OY:{const{fieldItem:i}=e.payLoad;let a=[...t.tableFields];return a=[...a,i],{...t,tableFields:a}}case HC:return{...t,...e.payLoad};case EC:{const{pageIndex:i,sectionIndex:a,row:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children=[...l[i].children[a].children,s],{...t,layout:l}}case IC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,column:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children=[...c[i].children[a].children[s].children,l],{...t,layout:c}}case LC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children=[...h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children,f],{...t,layout:h}}case BC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].children.push({[`${u}-${d}`]:f}),{...t,layout:h}}case VC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f,field:h}=e.payLoad,m=[...t.layout];return m[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children[f]=h,{...t,layout:m}}case qC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,fieldChildrenIndex:f,field:h}=e.payLoad,m=[...t.layout];return m[i].children[a].children[s].children[l].children[c].children[f]={[`${u}-${d}`]:h},{...t,layout:m}}case UC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children.splice(f,1),{...t,layout:h}}case $C:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,fieldChildrenIndex:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c].children.splice(u,1),{...t,layout:d}}case bC:{const{pageIndex:i,sectionIndex:a}=e.payLoad,s=[...t.layout];return s[i].children.splice(a,1),{...t,layout:s}}case yC:{const{pageIndex:i,sectionIndex:a,rowIndex:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children.splice(s,1),{...t,layout:l}}case AC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children.splice(l,1),{...t,layout:c}}case wC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c}=e.payLoad,u=[...t.layout];return u[i].children[a].children[s].children[l].children.splice(c,1),{...t,layout:u}}case SC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,field:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c]=u,{...t,layout:d}}case xC:{const{pageIndex:i,sectionIndex:a,section:s}=e.payLoad,l=[...t.layout];return l[i].children[a]=s,{...t,layout:l}}case O9:{const{pageIndex:i,sectionIndex:a,rowIndex:s,row:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s]=l,{...t,layout:c}}case jC:{const{pageIndex:i,page:a}=e.payLoad,s=[...t.layout];return s[i]=a,{...t,layout:s}}case _C:{const{page:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s.splice(a+1,0,i),{...t,layout:s}}case DC:{const{section:i,pageIndex:a,sectionIndex:s}=e.payLoad,l=[...t.layout];return l[a].children.splice(s+1,0,i),{...t,layout:l}}case OC:{const{section:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s[a].children.push(i),{...t,layout:s}}case NC:{const{row:i,pageIndex:a,sectionIndex:s,rowIndex:l}=e.payLoad,c=[...t.layout];return c[a].children[s].children.splice(l+1,0,i),{...t,layout:c}}case FC:{const{column:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c}=e.payLoad,u=[...t.layout];return u[a].children[s].children[l].children.splice(c+1,0,i),{...t,layout:u}}case PC:{const{field:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c,fieldIndex:u}=e.payLoad,d=[...t.layout];return d[a].children[s].children[l].children[c].children.splice(u+1,0,i),{...t,layout:d}}}return t},y_=N.createContext({dragDropManager:void 0});function nu(t){"@babel/helpers - typeof";return nu=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},nu(t)}function RQ(t,e){if(nu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function GQ(t){var e=RQ(t,"string");return nu(e)=="symbol"?e:e+""}function WQ(t,e,n){return(e=GQ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function w_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?A_(Object(n),!0).forEach(function(r){WQ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A_(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ul(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var S_=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),v8=function(){return Math.random().toString(36).substring(7).split("").join(".")},x_={INIT:"@@redux/INIT"+v8(),REPLACE:"@@redux/REPLACE"+v8(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v8()}};function QQ(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function JQ(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(tJ(t))return"date";if(eJ(t))return"error";var n=ZQ(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function ZQ(t){return typeof t.constructor=="function"?t.constructor.name:null}function eJ(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function tJ(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function sf(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=JQ(t)),e}function C_(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ul(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(1):"Expected the enhancer to be a function. Instead, received: '"+sf(n)+"'");return n(C_)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(2):"Expected the root reducer to be a function. Instead, received: '"+sf(t)+"'");var i=t,a=e,s=[],l=s,c=!1;function u(){l===s&&(l=s.slice())}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function f(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(4):"Expected the listener to be a function. Instead, received: '"+sf(v)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var A=!0;return u(),l.push(v),function(){if(A){if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");A=!1,u();var x=l.indexOf(v);l.splice(x,1),s=null}}}function h(v){if(!QQ(v))throw new Error(process.env.NODE_ENV==="production"?Ul(7):"Actions must be plain objects. Instead, the actual type was: '"+sf(v)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ul(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(9):"Reducers may not dispatch actions.");try{c=!0,a=i(a,v)}finally{c=!1}for(var A=s=l,S=0;S<A.length;S++){var x=A[S];x()}return v}function m(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(10):"Expected the nextReducer to be a function. Instead, received: '"+sf(v));i=v,h({type:x_.REPLACE})}function g(){var v,A=f;return v={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(process.env.NODE_ENV==="production"?Ul(11):"Expected the observer to be an object. Instead, received: '"+sf(x)+"'");function w(){x.next&&x.next(d())}w();var T=A(w);return{unsubscribe:T}}},v[S_]=function(){return this},v}return h({type:x_.INIT}),r={dispatch:h,subscribe:f,getState:d,replaceReducer:m},r[S_]=g,r}function qr(t,e,...n){if(nJ()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(e.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function nJ(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function rJ(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function iJ(t,e){return t.filter(n=>n!==e)}function T_(t){return typeof t=="object"}function aJ(t,e){const n=new Map,r=a=>{n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);const i=[];return n.forEach((a,s)=>{a===1&&i.push(s)}),i}function sJ(t,e){return t.filter(n=>e.indexOf(n)>-1)}const b8="dnd-core/INIT_COORDS",Zm="dnd-core/BEGIN_DRAG",y8="dnd-core/PUBLISH_DRAG_SOURCE",e3="dnd-core/HOVER",t3="dnd-core/DROP",n3="dnd-core/END_DRAG";function E_(t,e){return{type:b8,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const oJ={type:b8,payload:{clientOffset:null,sourceClientOffset:null}};function lJ(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:a,getSourceClientOffset:s}=r,l=t.getMonitor(),c=t.getRegistry();t.dispatch(E_(a)),cJ(n,l,c);const u=fJ(n,l);if(u==null){t.dispatch(oJ);return}let d=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");uJ(s),d=s(u)}t.dispatch(E_(a,d));const h=c.getSource(u).beginDrag(l,u);if(h==null)return;dJ(h),c.pinSource(u);const m=c.getSourceType(u);return{type:Zm,payload:{itemType:m,item:h,sourceId:u,clientOffset:a||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function cJ(t,e,n){qr(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){qr(n.getSource(r),"Expected sourceIds to be registered.")})}function uJ(t){qr(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function dJ(t){qr(T_(t),"Item must be an object.")}function fJ(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function hJ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pJ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){hJ(t,i,n[i])})}return t}function gJ(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();mJ(r),yJ(r).forEach((s,l)=>{const c=vJ(s,l,i,r),u={type:t3,payload:{dropResult:pJ({},n,c)}};t.dispatch(u)})}}function mJ(t){qr(t.isDragging(),"Cannot call drop while not dragging."),qr(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function vJ(t,e,n,r){const i=n.getTarget(t);let a=i?i.drop(r,t):void 0;return bJ(a),typeof a>"u"&&(a=e===0?{}:r.getDropResult()),a}function bJ(t){qr(typeof t>"u"||T_(t),"Drop result must either be an object or undefined.")}function yJ(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function AJ(t){return function(){const n=t.getMonitor(),r=t.getRegistry();wJ(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:n3}}}function wJ(t){qr(t.isDragging(),"Cannot call endDrag while not dragging.")}function A8(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function SJ(t){return function(n,{clientOffset:r}={}){xJ(n);const i=n.slice(0),a=t.getMonitor(),s=t.getRegistry(),l=a.getItemType();return TJ(i,s,l),CJ(i,a,s),EJ(i,a,s),{type:e3,payload:{targetIds:i,clientOffset:r||null}}}}function xJ(t){qr(Array.isArray(t),"Expected targetIds to be an array.")}function CJ(t,e,n){qr(e.isDragging(),"Cannot call hover while not dragging."),qr(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const i=t[r];qr(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const a=n.getTarget(i);qr(a,"Expected targetIds to be registered.")}}function TJ(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],a=e.getTargetType(i);A8(a,n)||t.splice(r,1)}}function EJ(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function IJ(t){return function(){if(t.getMonitor().isDragging())return{type:y8}}}function _J(t){return{beginDrag:lJ(t),publishDragSource:IJ(t),hover:SJ(t),drop:gJ(t),endDrag:AJ(t)}}class DJ{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(a){return(...s)=>{const l=a.apply(e,s);typeof l<"u"&&n(l)}}const i=_J(this);return Object.keys(i).reduce((a,s)=>{const l=i[s];return a[s]=r(l),a},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function OJ(t,e){return{x:t.x+e.x,y:t.y+e.y}}function I_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function NJ(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:I_(OJ(e,r),n)}function FJ(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:I_(e,n)}const Ep=[],w8=[];Ep.__IS_NONE__=!0,w8.__IS_ALL__=!0;function PJ(t,e){return t===Ep?!1:t===w8||typeof e>"u"?!0:sJ(e,t).length>0}class kJ{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;qr(typeof e=="function","listener must be a function."),qr(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const a=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!PJ(s.dirtyHandlerIds,r)||e()}finally{i=l}};return this.store.subscribe(a)}subscribeToOffsetChange(e){qr(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return qr(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(qr(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();return A8(r,i)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(qr(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),i=this.getItemType();return r!==i?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),a=this.getItemType();if(a&&!A8(i,a))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(e);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return NJ(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return FJ(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const __=typeof global<"u"?global:self,D_=__.MutationObserver||__.WebKitMutationObserver;function O_(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function MJ(t){let e=1;const n=new D_(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const LJ=typeof D_=="function"?MJ:O_;class BJ{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=LJ(this.flush),this.requestErrorThrow=O_(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class VJ{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class UJ{create(e){const n=this.freeTasks,r=n.length?n.pop():new VJ(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const N_=new BJ,qJ=new UJ(N_.registerPendingError);function $J(t){N_.enqueueTask(qJ.create(t))}const S8="dnd-core/ADD_SOURCE",x8="dnd-core/ADD_TARGET",C8="dnd-core/REMOVE_SOURCE",r3="dnd-core/REMOVE_TARGET";function jJ(t){return{type:S8,payload:{sourceId:t}}}function HJ(t){return{type:x8,payload:{targetId:t}}}function zJ(t){return{type:C8,payload:{sourceId:t}}}function YJ(t){return{type:r3,payload:{targetId:t}}}function KJ(t){qr(typeof t.canDrag=="function","Expected canDrag to be a function."),qr(typeof t.beginDrag=="function","Expected beginDrag to be a function."),qr(typeof t.endDrag=="function","Expected endDrag to be a function.")}function XJ(t){qr(typeof t.canDrop=="function","Expected canDrop to be a function."),qr(typeof t.hover=="function","Expected hover to be a function."),qr(typeof t.drop=="function","Expected beginDrag to be a function.")}function T8(t,e){if(e&&Array.isArray(t)){t.forEach(n=>T8(n,!1));return}qr(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ql;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ql||(ql={}));let RJ=0;function GJ(){return RJ++}function WJ(t){const e=GJ().toString();switch(t){case ql.SOURCE:return`S${e}`;case ql.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function F_(t){switch(t[0]){case"S":return ql.SOURCE;case"T":return ql.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P_(t,e){const n=t.entries();let r=!1;do{const{done:i,value:[,a]}=n.next();if(a===e)return!0;r=!!i}while(!r);return!1}class QJ{addSource(e,n){T8(e),KJ(n);const r=this.addHandler(ql.SOURCE,e,n);return this.store.dispatch(jJ(r)),r}addTarget(e,n){T8(e,!0),XJ(n);const r=this.addHandler(ql.TARGET,e,n);return this.store.dispatch(HJ(r)),r}containsHandler(e){return P_(this.dragSources,e)||P_(this.dropTargets,e)}getSource(e,n=!1){return qr(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return qr(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return qr(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return qr(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return F_(e)===ql.SOURCE}isTargetId(e){return F_(e)===ql.TARGET}removeSource(e){qr(this.getSource(e),"Expected an existing source."),this.store.dispatch(zJ(e)),$J(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){qr(this.getTarget(e),"Expected an existing target."),this.store.dispatch(YJ(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);qr(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){qr(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const i=WJ(e);return this.types.set(i,n),e===ql.SOURCE?this.dragSources.set(i,r):e===ql.TARGET&&this.dropTargets.set(i,r),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const JJ=(t,e)=>t===e;function ZJ(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function eZ(t,e,n=JJ){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function tZ(t=Ep,e){switch(e.type){case e3:break;case S8:case x8:case r3:case C8:return Ep;case Zm:case y8:case n3:case t3:default:return w8}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=aJ(n,r);if(!(i.length>0||!eZ(n,r)))return Ep;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function nZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rZ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){nZ(t,i,n[i])})}return t}const k_={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function iZ(t=k_,e){const{payload:n}=e;switch(e.type){case b8:case Zm:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case e3:return ZJ(t.clientOffset,n.clientOffset)?t:rZ({},t,{clientOffset:n.clientOffset});case n3:case t3:return k_;default:return t}}function aZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function of(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){aZ(t,i,n[i])})}return t}const sZ={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function oZ(t=sZ,e){const{payload:n}=e;switch(e.type){case Zm:return of({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case y8:return of({},t,{isSourcePublic:!0});case e3:return of({},t,{targetIds:n.targetIds});case r3:return t.targetIds.indexOf(n.targetId)===-1?t:of({},t,{targetIds:iJ(t.targetIds,n.targetId)});case t3:return of({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case n3:return of({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function lZ(t=0,e){switch(e.type){case S8:case x8:return t+1;case C8:case r3:return t-1;default:return t}}function cZ(t=0){return t+1}function uZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dZ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){uZ(t,i,n[i])})}return t}function fZ(t={},e){return{dirtyHandlerIds:tZ(t.dirtyHandlerIds,{type:e.type,payload:dZ({},e.payload,{prevTargetIds:rJ(t,"dragOperation.targetIds",[])})}),dragOffset:iZ(t.dragOffset,e),refCount:lZ(t.refCount,e),dragOperation:oZ(t.dragOperation,e),stateId:cZ(t.stateId)}}function hZ(t,e=void 0,n={},r=!1){const i=pZ(r),a=new kJ(i,new QJ(i)),s=new DJ(i,a),l=t(s,e,n);return s.receiveBackend(l),s}function pZ(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return C_(fZ,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function gZ(t,e){if(t==null)return{};var n=mZ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mZ(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let M_=0;const i3=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var lf=N.memo(function(e){var{children:n}=e,r=gZ(e,["children"]);const[i,a]=vZ(r);return N.useEffect(()=>{if(a){const s=L_();return++M_,()=>{--M_===0&&(s[i3]=null)}}},[]),o.jsx(y_.Provider,{value:i,children:n})});function vZ(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=bZ(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function bZ(t,e=L_(),n,r){const i=e;return i[i3]||(i[i3]={dragDropManager:hZ(t,e,n,r)}),i[i3]}function L_(){return typeof global<"u"?global:window}var B_=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var s=a[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const yZ=gs(B_),$0=typeof window<"u"?N.useLayoutEffect:N.useEffect;function AZ(t,e,n){const[r,i]=N.useState(()=>e(t)),a=N.useCallback(()=>{const s=e(t);yZ(r,s)||(i(s),n&&n())},[r,t,n]);return $0(a),[r,a]}function wZ(t,e,n){const[r,i]=AZ(t,e,n);return $0(function(){const s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(i,{handlerIds:[s]})},[t,i]),r}function V_(t,e,n){return wZ(e,t||(()=>({})),()=>n.reconnect())}function U_(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),N.useMemo(()=>typeof t=="function"?t():t,n)}function SZ(t){return N.useMemo(()=>t.hooks.dragSource(),[t])}function xZ(t){return N.useMemo(()=>t.hooks.dragPreview(),[t])}let E8=!1,I8=!1;class CZ{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){qr(!E8,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return E8=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{E8=!1}}isDragging(){if(!this.sourceId)return!1;qr(!I8,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return I8=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{I8=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let _8=!1;class TZ{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;qr(!_8,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return _8=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{_8=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function EZ(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function IZ(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function D8(t,e,n,r){let i=n?n.call(r,t,e):void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const a=Object.keys(t),s=Object.keys(e);if(a.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(e);for(let c=0;c<a.length;c++){const u=a[c];if(!l(u))return!1;const d=t[u],f=e[u];if(i=n?n.call(r,d,f,u):void 0,i===!1||i===void 0&&d!==f)return!1}return!0}function O8(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function _Z(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function DZ(t){return(e=null,n=null)=>{if(!N.isValidElement(e)){const a=e;return t(a,n),a}const r=e;return _Z(r),OZ(r,n?a=>t(a,n):t)}}function q_(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const i=DZ(r);e[n]=()=>i}}),e}function $_(t,e){typeof t=="function"?t(e):t.current=e}function OZ(t,e){const n=t.ref;return qr(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?N.cloneElement(t,{ref:r=>{$_(n,r),$_(e,r)}}):N.cloneElement(t,{ref:e})}class NZ{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!D8(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!D8(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=q_({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,O8(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,O8(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class FZ{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!D8(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=q_({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,O8(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function cf(){const{dragDropManager:t}=N.useContext(y_);return qr(t!=null,"Expected drag drop context"),t}function PZ(t,e){const n=cf(),r=N.useMemo(()=>new NZ(n.getBackend()),[n]);return $0(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),$0(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function kZ(){const t=cf();return N.useMemo(()=>new CZ(t),[t])}class MZ{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,i=this.monitor,{isDragging:a}=r;return a?a(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:i}=e;i&&i(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function LZ(t,e,n){const r=N.useMemo(()=>new MZ(t,e,n),[e,n]);return N.useEffect(()=>{r.spec=t},[t]),r}function BZ(t){return N.useMemo(()=>{const e=t.type;return qr(e!=null,"spec.type must be defined"),e},[t])}function VZ(t,e,n){const r=cf(),i=LZ(t,e,n),a=BZ(t);$0(function(){if(a!=null){const[l,c]=IZ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,e,n,i,a])}function Qi(t,e){const n=U_(t,e);qr(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=kZ(),i=PZ(n.options,n.previewOptions);return VZ(n,r,i),[V_(n.collect,r,i),SZ(i),xZ(i)]}function UZ(t){return N.useMemo(()=>t.hooks.dropTarget(),[t])}function qZ(t){const e=cf(),n=N.useMemo(()=>new FZ(e.getBackend()),[e]);return $0(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function $Z(){const t=cf();return N.useMemo(()=>new TZ(t),[t])}function jZ(t){const{accept:e}=t;return N.useMemo(()=>(qr(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class HZ{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function zZ(t,e){const n=N.useMemo(()=>new HZ(t,e),[e]);return N.useEffect(()=>{n.spec=t},[t]),n}function YZ(t,e,n){const r=cf(),i=zZ(t,e),a=jZ(t);$0(function(){const[l,c]=EZ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,e,i,n,a.map(s=>s.toString()).join("|")])}function KZ(t,e){const n=U_(t,e),r=$Z(),i=qZ(n.options);return YZ(n,r,i),[V_(n.collect,r,i),UZ(i)]}function j_(t){let e=null;return()=>(e==null&&(e=t()),e)}function XZ(t,e){return t.filter(n=>n!==e)}function RZ(t,e){const n=new Set,r=a=>n.add(a);t.forEach(r),e.forEach(r);const i=[];return n.forEach(a=>i.push(a)),i}class GZ{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=RZ(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=XZ(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class WZ{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const H_="__NATIVE_FILE__",z_="__NATIVE_URL__",Y_="__NATIVE_TEXT__",K_="__NATIVE_HTML__",X_=Object.freeze(Object.defineProperty({__proto__:null,FILE:H_,HTML:K_,TEXT:Y_,URL:z_},Symbol.toStringTag,{value:"Module"}));function N8(t,e,n){const r=e.reduce((i,a)=>i||t.getData(a),"");return r??n}const F8={[H_]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[K_]:{exposeProperties:{html:(t,e)=>N8(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[z_]:{exposeProperties:{urls:(t,e)=>N8(t,e,"").split(`
|
|
1597
|
-
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Y_]:{exposeProperties:{text:(t,e)=>N8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function QZ(t,e){const n=F8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new WZ(n);return r.loadDataTransfer(e),r}function P8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(F8).filter(n=>{const r=F8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const JZ=j_(()=>/firefox/i.test(navigator.userAgent)),R_=j_(()=>!!window.safari);class G_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const m=n[d];if(m<e)c=d+1;else if(m>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let m=0;m<r;m++)i.push(m);i.sort((m,g)=>e[m]<e[g]?-1:1);const a=[],s=[];let l,c;for(let m=0;m<r-1;m++)l=e[m+1]-e[m],c=n[m+1]-n[m],a.push(l),s.push(c/l);const u=[s[0]];for(let m=0;m<a.length-1;m++){const g=s[m],v=s[m+1];if(g*v<=0)u.push(0);else{l=a[m];const A=a[m+1],S=l+A;u.push(3*S/((S+A)/g+(S+l)/v))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let m=0;m<u.length-1;m++){h=s[m];const g=u[m],v=1/a[m],A=g+u[m+1]-h-h;d.push((h-g-A)*v),f.push(A*v*v)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const ZZ=1;function W_(t){const e=t.nodeType===ZZ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function a3(t){return{x:t.clientX,y:t.clientY}}function eee(t){var e;return t.nodeName==="IMG"&&(JZ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function tee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return R_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function nee(t,e,n,r,i){const a=eee(e),l=W_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:m,dragPreviewHeight:g}=tee(a,e,u,d),v=()=>{let _=new G_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return R_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new G_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:S,offsetY:x}=i,w=S===0||S,T=x===0||x;return{x:w?S:A(),y:T?x:v()}}class ree{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function iee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){iee(t,i,n[i])})}return t}class aee{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Q_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Q_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(X_).some(n=>X_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=QZ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&W_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=a3(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=P8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:m,anchorY:g,offsetX:v,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),w=nee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=P8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:a3(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=a3(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else P8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:a3(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new ree(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new GZ(this.isNodeInDocument)}}const uf=function(e,n,r){return new aee(e,n,r)},J_=N.createContext(void 0),Z_=({children:t,option:e,templateSchema:n,onChange:r})=>{const i={...m8,...n},[a,s]=N.useReducer(XQ,i),{isPreview:l,isAdmin:c,isRenderView:u,renderType:d,isAdvanceView:f,globalAlignment:h="ltr",emitSocketData:m,media:g,reusableComponent:v,saveFormProgress:A}=e;return o.jsx(J_.Provider,{value:{media:g,isPreview:l,isAdmin:c,isRenderView:u,renderType:d,isAdvanceView:f,globalAlignment:h,emitSocketData:m,reusableComponent:v,state:a,dispatch:s,onChange:r,saveFormProgress:A},children:o.jsx(lf,{backend:uf,children:t})})},eD=()=>N.useContext(J_),see=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},oee=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],lee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],tD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return see(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:tD(l.children,a,s)},r},nD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return oee(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:nD(a.children,i)},n},k8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return lee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:k8(s.children,a,n)},r},cee=(t,e,n)=>{let r=[...t],i=r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children[n[yo]];return r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[oa]].children[e[la]].children[e[fa]].children[e[ha]].children[e[pa]].inlineConditionalRules.rules[e[wa]].conditions[e[$o]].children.splice(e[yo],0,i),r},uee=(t,e,n)=>tD(t,e,n),dee=t=>{const e=[...t],n={type:ms,uuid:et(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},rD=(t,e,n,r)=>{var h,m,g,v,A,S;let i;const a={...Ac,uuid:et(),children:[r]},s={...tu,uuid:et()},l={...tu,uuid:et(),children:[a]},c={...af,uuid:et(),children:[l]},u={...Jm,uuid:et(),children:[c]};switch(e.length){case 1:{r.type===KC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===ta?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[r]}]};break}case 4:{r.type===j1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(S=(A=(v=(g=(m=(h=d[n[oa]])==null?void 0:h.children[n[la]])==null?void 0:m.children[n[fa]])==null?void 0:g.children[n[ha]])==null?void 0:v.children[n[pa]])==null?void 0:A.inlineConditionalRules)==null||S.rules[n[wa]].conditions[n[$o]].children.splice(n[yo],1):d=nD(d,n),d=dee(d),d=k8(d,e,i),d},fee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...Jm,uuid:et(),children:[{...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]}]}]};break}case 2:{r={...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]}]};break}case 3:{r={...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]};break}case 4:{r={...Ac,uuid:et(),children:[n]};break}default:r=n}return k8(t,e,r)},on=()=>{const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=eD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const i=t.builderTemplateName,a=t.isChangesSaved,s=t.editing_by,l=t.version_name,c=t.loading,u=t.published_status,d=t,f=t,h=t.formType,m=t==null?void 0:t.userSelectedLanguage,g=t==null?void 0:t.languages,v=t.layout,A=N.useCallback(pe=>VQ(pe)(e),[e]),S=N.useCallback(pe=>uQ(pe)(e),[e]),x=N.useCallback(pe=>UQ(pe)(e),[e]),w=N.useCallback((pe,ve)=>{var _t,Qt,Sn,yn,xn,bn,Hn,Cn;const Me=[...v],Oe=pe.path.split("-"),me=Oe.slice(0,-1).join("-"),V={uuid:ve.uuid,type:ve.type,reviewerChecklist:[]},K=0,J=1,le=2,fe=3,Te=4,De=5,$e=6,it=8,Ot=7,ct=5,St=6,ot=8;if(ve.type===ta&&(ve==null?void 0:ve.schema)!==void 0){B(JSON.parse(ve==null?void 0:ve.schema),parseInt(Oe[K]));return}if(((_t=ve==null?void 0:ve.schema)==null?void 0:_t.componentType)==="question"&&((bn=(xn=(yn=(Sn=(Qt=Me[0])==null?void 0:Qt.children[0])==null?void 0:Sn.children[0])==null?void 0:yn.children[0])==null?void 0:xn.children)!=null&&bn.some(qt=>{var rt,Je,ut;return((rt=qt==null?void 0:qt.questionText)==null?void 0:rt[m.type])===((ut=(Je=ve==null?void 0:ve.schema)==null?void 0:Je.questionText)==null?void 0:ut[m.type])})))return;if(ve.type===Zn){let qt={type:j1,reviewerChecklist:[],...Tt.cloneDeep(ve.schema)};if(qt!=null&&qt.options&&(qt={...qt,options:[{uuid:et(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:et(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),qt.componentType==="grid-component"&&(qt={...qt,children:[],options:[{uuid:et(),custom_values:{}}]}),qt.componentType==="radio-hierarchal"&&(qt={...qt,type:"radio",children:[],options:[{uuid:et(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:et(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),qt={...qt,uuid:et()},Oe.length===it){U(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[De]),parseInt(Oe[$e]),qt);return}if(Oe.length===Ot){ee(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[ct]),parseInt(Oe[St]),qt);return}if((Cn=(Hn=Me[Oe[K]].children[Oe[J]])==null?void 0:Hn.children[Oe[le]])!=null&&Cn.rowIsRepeatable&&(qt==null?void 0:qt.componentType)==="editor")return;x(fee(Me,Oe,qt)),Oe.length>1&&xe(Oe[K],Oe[J],Oe[le],qt);return}const bt=ve.path.split("-"),Nt=bt.slice(0,-1).join("-");if(bt.length===Oe.length){if(Nt===me){if((bt==null?void 0:bt.length)===ot){x(cee(Me,Oe,bt));return}x(uee(Me,Oe,bt));return}const qt={...V,...ve};(ve==null?void 0:ve.id)===void 0&&(qt.id=et()),x(rD(Me,Oe,bt,qt));return}if((bt==null?void 0:bt.length)===8){const qt={type:j1,reviewerChecklist:[],...ve};ee(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[ct]),parseInt(Oe[St]),qt),Ae(bt[oa],bt[la],bt[fa],bt[ha],bt[pa],bt[ct],bt[St],bt[Bl]);return}const We={...V,...ve};(ve==null?void 0:ve.id)===void 0&&(We.id=et()),x(rD(Me,Oe,bt,We))},[v,x,m.type]),T=N.useCallback(()=>KQ()(e),[e]),C=N.useCallback(pe=>qQ(pe)(e,t),[e]),_=N.useCallback(pe=>$Q(pe)(e,t),[e]),E=N.useCallback(pe=>jQ(pe)(e),[e]),O=N.useCallback(pe=>cQ(pe)(e),[e]),F=N.useCallback(pe=>gQ(pe)(e),[e]),B=N.useCallback((pe,ve)=>bQ(pe,ve)(e),[e]),M=N.useCallback((pe,ve)=>xQ(pe,ve)(e),[e]),z=N.useCallback((pe,ve,Me)=>EQ(pe,ve,Me)(e),[e]),k=N.useCallback(pe=>hQ(pe)(e),[e]),H=N.useCallback((pe,ve)=>pQ(pe,ve)(e),[e]),de=N.useCallback((pe,ve,Me)=>SQ(pe,ve,Me)(e),[e]),he=N.useCallback((pe,ve,Me,Oe)=>_Q(pe,ve,Me,Oe)(e),[e]),ne=N.useCallback((pe,ve,Me,Oe,me)=>DQ(pe,ve,Me,Oe,me)(e,t),[e]),G=N.useCallback((pe,ve,Me,Oe,me,V)=>OQ(pe,ve,Me,Oe,me,V)(e,t),[e]),ae=N.useCallback((pe,ve,Me)=>mQ(pe,ve,Me)(e),[e]),Y=N.useCallback((pe,ve,Me,Oe)=>wQ(pe,ve,Me,Oe)(e),[e]),ge=N.useCallback((pe,ve)=>fQ(pe,ve)(e),[e]),ie=N.useCallback((pe,ve,Me,Oe,me,V)=>NQ(pe,ve,Me,Oe,me,V)(e),[e]),Z=N.useCallback((pe,ve,Me,Oe,me)=>IQ(pe,ve,Me,Oe,me)(e),[e]),W=N.useCallback((pe,ve,Me,Oe)=>AQ(pe,ve,Me,Oe)(e),[e]),oe=N.useCallback((pe,ve,Me)=>vQ(pe,ve,Me)(e),[e]),be=N.useCallback((pe,ve)=>dQ(pe,ve)(e,t),[e]),xe=N.useCallback((pe,ve,Me,Oe)=>CQ(pe,ve,Me,Oe)(e),[e]),Ce=N.useCallback((pe,ve,Me,Oe,me,V,K,J,le)=>LQ(pe,ve,Me,Oe,me,V,K,J,le)(e),[e]),ye=N.useCallback((pe,ve,Me,Oe,me,V,K,J,le)=>kQ(pe,ve,Me,Oe,me,V,K,J,le)(e),[e]),Ae=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>MQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),re=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>BQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),U=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>FQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),ee=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>PQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),X=N.useCallback(pe=>HQ(pe)(e),[e]),se=N.useCallback(pe=>zQ(pe)(e),[e]),Ee=N.useCallback(pe=>YQ(pe)(e),[e]);return{builderIsChangesSaved:a,builderTemplateName:i,formBuilderFormSchema:d,formBuilderFormLayout:v,formBuilderSchemaLanguages:g,saveFormTemplateNewVersion:f,userSelectedLanguage:m,formBuilderConfigurationType:h,formBuilderLoading:c,formBuilderPublishedStatus:u,builderEditingBy:s,builderVersionName:l,handleDrop:w,formatTableFieldsHook:S,saveFormBuilderSchema:A,removePage:k,removeSection:H,removeRow:de,removeColumn:he,removeField:ne,updateEditingBy:Ee,addTabs:O,addSection:F,addRow:M,addColumn:z,cloneField:ie,cloneColumn:Z,cloneRow:W,cloneSection:oe,clonePage:be,sectionImport:B,setLayout:x,fieldSettingUpdate:G,selectFormBuilderLanguage:C,unselectFormBuilderLanguage:_,updateUserFormSelectedLanguage:E,updateFormType:X,schemaBuilderUpdate:se,pageSettingUpdate:ge,saveFormProgress:r,sectionSettingUpdate:ae,rowSettingUpdate:Y,clearBuilderSchema:T,addFieldToRowRepeaptable:xe,addFieldToInlineRuleCondtionFields:U,fieldSettingUpdateInlineConditional:Ce,fieldSettingDeleteInlineConditional:re,addFieldToGridComponentHook:ee,gridComponentFieldSettingUpdate:ye,gridComponentFieldDelete:Ae}},Zt=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l}=eD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const c=r==null?void 0:r.key,{saveComponent:u,componentList:d}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:c,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:u,componentList:d,emitSocketData:()=>{},updateGlobalToast:m=>{console.log(m)}}},hee="TASKS_LOADING",pee="TASKS_ADD",gee="TASKS_GET_PAGINATED_LIST",mee="TASKS_DELETE",vee="TASKS_PAGNIATION_UPDATE",bee="TASKS_UPDATE",yee="TASKS_SUCCESS_GET",Aee="TASK_GET_TEMPLATE",wee="TASK_SET_DATA",See="TASKS_FORM_SUBMIT",xee="TASKS_FORM_HTTP_REQUEST",M8="TASK_SET_PROGRESS_VALUE",iD="TASK_SET_MAX_PROGRESS_VALUE",aD="TASK_SET_REGISTER_DATA",sD="TASK_SET_SCHEMA",L8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",oD="CLEAR_TASK",lD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",cD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",uD="TASK_USER_TRAINING_DATA",dD="TASK_FIELD_UPDATE",fD=6,B8=1,Ip="DISPLAY_TYPE_START_DETAILS",V8="DISPLAY_TYPE_QUIZ",hD="DISPLAY_TYPE_START_TIMER";function Cee(t,e,n,r,i,a){return s=>{s({type:dD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function pD(t){return(e,n)=>{const r={type:L8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Tee(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:L8,payLoad:{taskData:{...i,...t}}};e(a)}}function Eee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=Tt.findIndex(a,function(c){return c.rowId===t});n({type:cD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Iee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=Tt.findIndex(a,function(c){return c.rowId===t});n({type:lD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function _ee(){return t=>{t({type:oD,payLoad:null})}}const gD=t=>e=>{e({type:M8,payLoad:{progressValue:t}})},Dee=t=>e=>{e({type:M8,payLoad:t})},Oee=t=>e=>{e({type:uD,payLoad:{userTrainingSaveData:t}})},mD=t=>e=>{e({type:aD,payLoad:{registerData:t}})},Nee=(t,e,n)=>(r,i)=>{var d;const{TasksReducer:a}=i(),{userTaskSubmitFormData:s}=a,l=[...s],c=Tt.findIndex(l,function(f){var h;return f.rowId===((h=t==null?void 0:t.row)==null?void 0:h.uuid)});let u=(d=s[c])==null?void 0:d.repeatableFields;u={...u,[e==null?void 0:e.uuid]:`<div>${n}</div>`},l[c]={...l[c],repeatableFields:u},r(pD(l))},Fee=(t,e,n)=>(r,i)=>{const{TasksReducer:a}=i(),{userTaskSubmitFormData:s,registerData:l}=a,c=s,u=Tt.cloneDeep(l);if(n&&(c==null?void 0:c.length)>0){u[e==null?void 0:e.uuid]=n;for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:n})}else if((c==null?void 0:c.length)>0){for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:""});delete u[e==null?void 0:e.uuid]}r(mD(u));const d=Object.keys(u).length;r(gD(d))},Pee=t=>e=>{e({type:iD,payLoad:{progressMaxValue:t}})},U8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},kee=(t=U8,e)=>{switch(e.type){case oD:return{...t,...U8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case yee:return{...t,...e.payLoad};case L8:return{...t,...e.payLoad};case sD:return{...t,...e.payLoad};case M8:return{...t,...e.payLoad};case aD:return{...t,registerData:e.payLoad.registerData};case iD:return{...t,...e.payLoad};case hee:return{...t,...e.payLoad};case See:return{...t,...e.payLoad};case xee:return{...t,...e.payLoad};case pee:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case gee:return{...t,...e.payLoad};case wee:return{...t,taskData:e.payLoad};case vee:return{...t,...e.payLoad};case mee:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case uD:return{...t,...e.payLoad};case dD:{const{pageIndex:n,sectionIndex:r,rowIndex:i,columnIndex:a,fieldIndex:s,field:l}=e.payLoad,c=[...t.taskSchema.layout];c[n].children[r].children[i].children[a].children[s]=l;const u={...t.taskSchema,layout:c};return{...t,taskSchema:u}}case lD:{const{userSubmitFormIndex:n,repeatableData:r}=e.payLoad,i=t.userTaskSubmitFormData[n].repeatableFieldsData?t.userTaskSubmitFormData[n].repeatableFieldsData:[];return i.push(r),t.userTaskSubmitFormData[n].repeatableFieldsData=i,t}case cD:{const{userSubmitFormIndex:n,repeatableDataRowIndex:r}=e.payLoad,i=[...t.userTaskSubmitFormData],a=[...i[n].repeatableFieldsData];return a.splice(r,1),i[n]={...i[n],repeatableFieldsData:a},{...t,userTaskSubmitFormData:i}}case bee:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case Aee:return{...t,...e.payLoad}}return t},vD=N.createContext(void 0),Mee=({option:t,taskOptions:e,templateSchema:n,taskValue:r,children:i})=>{const[a,s]=N.useReducer(kee,{...U8,...r});return N.useEffect(()=>{s({type:sD,payLoad:r})},[a]),o.jsx(vD.Provider,{value:{taskOptions:e,state:a,dispatch:s},children:o.jsx(Z_,{option:t,templateSchema:n,onChange:()=>{},children:i})})},Lee=()=>N.useContext(vD),vr=()=>{var ye,Ae,re,U,ee,X;const{taskOptions:n,state:r,dispatch:i}=Lee();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,m=r.httpRequest,g=r.taskData,v=r.progressMaxValue,A=r.maxTabs,S=r.tabNoOfFieldsData,x=r.registerData,w=r.progressValue,T=r.noOfTotalElements,C=r.menuList,_=r.loading,E=r.submitting,O=r.success,F=r.success_message,B=(ye=n==null?void 0:n.exam)!=null&&ye.startQuiz?(Ae=n==null?void 0:n.exam)==null?void 0:Ae.startQuiz:()=>{},M=(re=n==null?void 0:n.exam)!=null&&re.AddUserAssessmentAnswer?(U=n==null?void 0:n.exam)==null?void 0:U.AddUserAssessmentAnswer:()=>{},z=(ee=n==null?void 0:n.exam)!=null&&ee.endQuiz?(X=n==null?void 0:n.exam)==null?void 0:X.endQuiz:()=>{},k=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(se,Ee,pe,ve,Me,Oe)=>{},H=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(se,Ee,pe)=>{},de=N.useCallback(se=>i(Tee(se)),[i]),he=N.useCallback((se,Ee,pe)=>{console.log("form",se)},[i]),ne=N.useCallback(()=>i(_ee()),[i]),G=N.useCallback((se,Ee)=>i(Iee(se,Ee)),[i]),ae=N.useCallback((se,Ee)=>i(Eee(se,Ee)),[i]),Y=N.useCallback(se=>i(gD(se)),[i]),ge=N.useCallback(se=>i(Dee(se)),[i]),ie=N.useCallback(se=>i(mD(se)),[i]),Z=N.useCallback(se=>i(pD(se)),[i]),W=N.useCallback(se=>i(Pee(se)),[i]),oe=N.useCallback(se=>i(Oee(se)),[i]),be=N.useCallback((se,Ee,pe)=>i(Nee(se,Ee,pe)),[i]),xe=N.useCallback((se,Ee,pe)=>i(Fee(se,Ee,pe)),[i]),Ce=N.useCallback((se,Ee,pe,ve,Me,Oe)=>i(Cee(se,Ee,pe,ve,Me,Oe)),[i]);return{taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:g,TasksList:C,TasksLoading:_,TasksSuccess:O,TasksSuccessMessage:F,taskProgressMaxValue:v,taskRegisterData:x,taskProgressValue:w,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:S,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:E,updateTaskDataSchema:de,submitTaskFormData:H,updateTaskFormData:k,TasksSubmit:h,TasksHTTPRequest:m,updateTaskRegisterData:ie,updateTaskProgressValue:Y,updateTaskProgressMaxValue:W,updateUserFormDataSubmit:Z,removeUserDataFormSectionRepeatableData:ae,addUserDataFormSectionRepeatableData:G,onSetValuetoRepeatableData:be,onSetValuetoPostDataHook:xe,clearTaskSchema:ne,taskProgressLoading:f,task_status:a,startQuiz:B,endQuiz:z,AddUserAssessmentAnswer:M,updateUserTraining:oe,taskFieldUpdateHook:Ce,updateProgressDataValuesHook:ge,saveProgressDataHook:he}};function q8(){return q8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},q8.apply(this,arguments)}var bD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",q8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));bD.displayName="ExclamationTriangleIcon";function $8(){return $8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$8.apply(this,arguments)}var yD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",$8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));yD.displayName="InfoCircleIcon";function j8(){return j8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},j8.apply(this,arguments)}var H8=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",j8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));H8.displayName="TimesCircleIcon";function z8(){return z8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},z8.apply(this,arguments)}function Y8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bee(t){if(Array.isArray(t))return Y8(t)}function Vee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function AD(t,e){if(t){if(typeof t=="string")return Y8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y8(t,e)}}function Uee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1597
|
+
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Y_]:{exposeProperties:{text:(t,e)=>N8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function QZ(t,e){const n=F8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new WZ(n);return r.loadDataTransfer(e),r}function P8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(F8).filter(n=>{const r=F8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const JZ=j_(()=>/firefox/i.test(navigator.userAgent)),R_=j_(()=>!!window.safari);class G_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const m=n[d];if(m<e)c=d+1;else if(m>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let m=0;m<r;m++)i.push(m);i.sort((m,g)=>e[m]<e[g]?-1:1);const a=[],s=[];let l,c;for(let m=0;m<r-1;m++)l=e[m+1]-e[m],c=n[m+1]-n[m],a.push(l),s.push(c/l);const u=[s[0]];for(let m=0;m<a.length-1;m++){const g=s[m],v=s[m+1];if(g*v<=0)u.push(0);else{l=a[m];const A=a[m+1],S=l+A;u.push(3*S/((S+A)/g+(S+l)/v))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let m=0;m<u.length-1;m++){h=s[m];const g=u[m],v=1/a[m],A=g+u[m+1]-h-h;d.push((h-g-A)*v),f.push(A*v*v)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const ZZ=1;function W_(t){const e=t.nodeType===ZZ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function a3(t){return{x:t.clientX,y:t.clientY}}function eee(t){var e;return t.nodeName==="IMG"&&(JZ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function tee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return R_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function nee(t,e,n,r,i){const a=eee(e),l=W_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:m,dragPreviewHeight:g}=tee(a,e,u,d),v=()=>{let _=new G_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return R_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new G_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:S,offsetY:x}=i,w=S===0||S,T=x===0||x;return{x:w?S:A(),y:T?x:v()}}class ree{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function iee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){iee(t,i,n[i])})}return t}class aee{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Q_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Q_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(X_).some(n=>X_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=QZ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&W_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=a3(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=P8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:m,anchorY:g,offsetX:v,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),w=nee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=P8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:a3(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=a3(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else P8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:a3(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new ree(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new GZ(this.isNodeInDocument)}}const uf=function(e,n,r){return new aee(e,n,r)},J_=N.createContext(void 0),Z_=({children:t,option:e,templateSchema:n,onChange:r})=>{const i={...m8,...n},[a,s]=N.useReducer(XQ,i),{isPreview:l,isAdmin:c,isRenderView:u,renderType:d,isAdvanceView:f,globalAlignment:h="ltr",emitSocketData:m,media:g,reusableComponent:v,saveFormProgress:A}=e;return o.jsx(J_.Provider,{value:{media:g,isPreview:l,isAdmin:c,isRenderView:u,renderType:d,isAdvanceView:f,globalAlignment:h,emitSocketData:m,reusableComponent:v,state:a,dispatch:s,onChange:r,saveFormProgress:A},children:o.jsx(lf,{backend:uf,children:t})})},eD=()=>N.useContext(J_),see=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},oee=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],lee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],tD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return see(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:tD(l.children,a,s)},r},nD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return oee(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:nD(a.children,i)},n},k8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return lee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:k8(s.children,a,n)},r},cee=(t,e,n)=>{let r=[...t],i=r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children[n[yo]];return r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[oa]].children[e[la]].children[e[fa]].children[e[ha]].children[e[pa]].inlineConditionalRules.rules[e[wa]].conditions[e[$o]].children.splice(e[yo],0,i),r},uee=(t,e,n)=>tD(t,e,n),dee=t=>{const e=[...t],n={type:ms,uuid:et(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},rD=(t,e,n,r)=>{var h,m,g,v,A,S;let i;const a={...Ac,uuid:et(),children:[r]},s={...tu,uuid:et()},l={...tu,uuid:et(),children:[a]},c={...af,uuid:et(),children:[l]},u={...Jm,uuid:et(),children:[c]};switch(e.length){case 1:{r.type===KC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===ta?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[r]}]};break}case 4:{r.type===j1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(S=(A=(v=(g=(m=(h=d[n[oa]])==null?void 0:h.children[n[la]])==null?void 0:m.children[n[fa]])==null?void 0:g.children[n[ha]])==null?void 0:v.children[n[pa]])==null?void 0:A.inlineConditionalRules)==null||S.rules[n[wa]].conditions[n[$o]].children.splice(n[yo],1):d=nD(d,n),d=dee(d),d=k8(d,e,i),d},fee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...Jm,uuid:et(),children:[{...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]}]}]};break}case 2:{r={...af,uuid:et(),children:[{...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]}]};break}case 3:{r={...tu,uuid:et(),children:[{...Ac,uuid:et(),children:[n]}]};break}case 4:{r={...Ac,uuid:et(),children:[n]};break}default:r=n}return k8(t,e,r)},on=()=>{const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=eD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const i=t.builderTemplateName,a=t.isChangesSaved,s=t.editing_by,l=t.version_name,c=t.loading,u=t.published_status,d=t,f=t,h=t.formType,m=t==null?void 0:t.userSelectedLanguage,g=t==null?void 0:t.languages,v=t.layout,A=N.useCallback(pe=>VQ(pe)(e),[e]),S=N.useCallback(pe=>uQ(pe)(e),[e]),x=N.useCallback(pe=>UQ(pe)(e),[e]),w=N.useCallback((pe,ve)=>{var _t,Qt,Sn,yn,xn,bn,Hn,Cn;const Me=[...v],Oe=pe.path.split("-"),me=Oe.slice(0,-1).join("-"),V={uuid:ve.uuid,type:ve.type,reviewerChecklist:[]},K=0,J=1,le=2,fe=3,Te=4,De=5,$e=6,it=8,Ot=7,ct=5,St=6,ot=8;if(ve.type===ta&&(ve==null?void 0:ve.schema)!==void 0){B(JSON.parse(ve==null?void 0:ve.schema),parseInt(Oe[K]));return}if(((_t=ve==null?void 0:ve.schema)==null?void 0:_t.componentType)==="question"&&((bn=(xn=(yn=(Sn=(Qt=Me[0])==null?void 0:Qt.children[0])==null?void 0:Sn.children[0])==null?void 0:yn.children[0])==null?void 0:xn.children)!=null&&bn.some(qt=>{var rt,Je,ut;return((rt=qt==null?void 0:qt.questionText)==null?void 0:rt[m.type])===((ut=(Je=ve==null?void 0:ve.schema)==null?void 0:Je.questionText)==null?void 0:ut[m.type])})))return;if(ve.type===Zn){let qt={type:j1,reviewerChecklist:[],...Tt.cloneDeep(ve.schema)};if(qt!=null&&qt.options&&(qt={...qt,options:[{uuid:et(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:et(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),qt.componentType==="grid-component"&&(qt={...qt,children:[],options:[{uuid:et(),custom_values:{}}]}),qt.componentType==="radio-hierarchal"&&(qt={...qt,type:"radio",children:[],options:[{uuid:et(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:et(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),qt={...qt,uuid:et()},Oe.length===it){U(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[De]),parseInt(Oe[$e]),qt);return}if(Oe.length===Ot){ee(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[ct]),parseInt(Oe[St]),qt);return}if((Cn=(Hn=Me[Oe[K]].children[Oe[J]])==null?void 0:Hn.children[Oe[le]])!=null&&Cn.rowIsRepeatable&&(qt==null?void 0:qt.componentType)==="editor")return;x(fee(Me,Oe,qt)),Oe.length>1&&xe(Oe[K],Oe[J],Oe[le],qt);return}const bt=ve.path.split("-"),Nt=bt.slice(0,-1).join("-");if(bt.length===Oe.length){if(Nt===me){if((bt==null?void 0:bt.length)===ot){x(cee(Me,Oe,bt));return}x(uee(Me,Oe,bt));return}const qt={...V,...ve};(ve==null?void 0:ve.id)===void 0&&(qt.id=et()),x(rD(Me,Oe,bt,qt));return}if((bt==null?void 0:bt.length)===8){const qt={type:j1,reviewerChecklist:[],...ve};ee(parseInt(Oe[K]),parseInt(Oe[J]),parseInt(Oe[le]),parseInt(Oe[fe]),parseInt(Oe[Te]),parseInt(Oe[ct]),parseInt(Oe[St]),qt),Ae(bt[oa],bt[la],bt[fa],bt[ha],bt[pa],bt[ct],bt[St],bt[Bl]);return}const We={...V,...ve};(ve==null?void 0:ve.id)===void 0&&(We.id=et()),x(rD(Me,Oe,bt,We))},[v,x,m.type]),T=N.useCallback(()=>KQ()(e),[e]),C=N.useCallback(pe=>qQ(pe)(e,t),[e]),_=N.useCallback(pe=>$Q(pe)(e,t),[e]),E=N.useCallback(pe=>jQ(pe)(e),[e]),O=N.useCallback(pe=>cQ(pe)(e),[e]),F=N.useCallback(pe=>gQ(pe)(e),[e]),B=N.useCallback((pe,ve)=>bQ(pe,ve)(e),[e]),M=N.useCallback((pe,ve)=>xQ(pe,ve)(e),[e]),z=N.useCallback((pe,ve,Me)=>EQ(pe,ve,Me)(e),[e]),k=N.useCallback(pe=>hQ(pe)(e),[e]),H=N.useCallback((pe,ve)=>pQ(pe,ve)(e),[e]),de=N.useCallback((pe,ve,Me)=>SQ(pe,ve,Me)(e),[e]),he=N.useCallback((pe,ve,Me,Oe)=>_Q(pe,ve,Me,Oe)(e),[e]),ne=N.useCallback((pe,ve,Me,Oe,me)=>DQ(pe,ve,Me,Oe,me)(e,t),[e]),G=N.useCallback((pe,ve,Me,Oe,me,V)=>OQ(pe,ve,Me,Oe,me,V)(e,t),[e]),ae=N.useCallback((pe,ve,Me)=>mQ(pe,ve,Me)(e),[e]),Y=N.useCallback((pe,ve,Me,Oe)=>wQ(pe,ve,Me,Oe)(e),[e]),ge=N.useCallback((pe,ve)=>fQ(pe,ve)(e),[e]),ie=N.useCallback((pe,ve,Me,Oe,me,V)=>NQ(pe,ve,Me,Oe,me,V)(e),[e]),Z=N.useCallback((pe,ve,Me,Oe,me)=>IQ(pe,ve,Me,Oe,me)(e),[e]),W=N.useCallback((pe,ve,Me,Oe)=>AQ(pe,ve,Me,Oe)(e),[e]),oe=N.useCallback((pe,ve,Me)=>vQ(pe,ve,Me)(e),[e]),be=N.useCallback((pe,ve)=>dQ(pe,ve)(e,t),[e]),xe=N.useCallback((pe,ve,Me,Oe)=>CQ(pe,ve,Me,Oe)(e),[e]),Ce=N.useCallback((pe,ve,Me,Oe,me,V,K,J,le)=>LQ(pe,ve,Me,Oe,me,V,K,J,le)(e),[e]),ye=N.useCallback((pe,ve,Me,Oe,me,V,K,J,le)=>kQ(pe,ve,Me,Oe,me,V,K,J,le)(e),[e]),Ae=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>MQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),re=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>BQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),U=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>FQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),ee=N.useCallback((pe,ve,Me,Oe,me,V,K,J)=>PQ(pe,ve,Me,Oe,me,V,K,J)(e),[e]),X=N.useCallback(pe=>HQ(pe)(e),[e]),se=N.useCallback(pe=>zQ(pe)(e),[e]),Ee=N.useCallback(pe=>YQ(pe)(e),[e]);return{builderIsChangesSaved:a,builderTemplateName:i,formBuilderFormSchema:d,formBuilderFormLayout:v,formBuilderSchemaLanguages:g,saveFormTemplateNewVersion:f,userSelectedLanguage:m,formBuilderConfigurationType:h,formBuilderLoading:c,formBuilderPublishedStatus:u,builderEditingBy:s,builderVersionName:l,handleDrop:w,formatTableFieldsHook:S,saveFormBuilderSchema:A,removePage:k,removeSection:H,removeRow:de,removeColumn:he,removeField:ne,updateEditingBy:Ee,addTabs:O,addSection:F,addRow:M,addColumn:z,cloneField:ie,cloneColumn:Z,cloneRow:W,cloneSection:oe,clonePage:be,sectionImport:B,setLayout:x,fieldSettingUpdate:G,selectFormBuilderLanguage:C,unselectFormBuilderLanguage:_,updateUserFormSelectedLanguage:E,updateFormType:X,schemaBuilderUpdate:se,pageSettingUpdate:ge,saveFormProgress:r,sectionSettingUpdate:ae,rowSettingUpdate:Y,clearBuilderSchema:T,addFieldToRowRepeaptable:xe,addFieldToInlineRuleCondtionFields:U,fieldSettingUpdateInlineConditional:Ce,fieldSettingDeleteInlineConditional:re,addFieldToGridComponentHook:ee,gridComponentFieldSettingUpdate:ye,gridComponentFieldDelete:Ae}},Zt=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l}=eD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const c=r==null?void 0:r.key,{saveComponent:u,componentList:d}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:c,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:u,componentList:d,emitSocketData:()=>{},updateGlobalToast:m=>{console.log(m)}}},hee="TASKS_LOADING",pee="TASKS_ADD",gee="TASKS_GET_PAGINATED_LIST",mee="TASKS_DELETE",vee="TASKS_PAGNIATION_UPDATE",bee="TASKS_UPDATE",yee="TASKS_SUCCESS_GET",Aee="TASK_GET_TEMPLATE",wee="TASK_SET_DATA",See="TASKS_FORM_SUBMIT",xee="TASKS_FORM_HTTP_REQUEST",M8="TASK_SET_PROGRESS_VALUE",iD="TASK_SET_MAX_PROGRESS_VALUE",aD="TASK_SET_REGISTER_DATA",sD="TASK_SET_SCHEMA",L8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",oD="CLEAR_TASK",lD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",cD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",uD="TASK_USER_TRAINING_DATA",dD="TASK_FIELD_UPDATE",fD=6,B8=1,Ip="DISPLAY_TYPE_START_DETAILS",V8="DISPLAY_TYPE_QUIZ",hD="DISPLAY_TYPE_START_TIMER";function Cee(t,e,n,r,i,a){return s=>{s({type:dD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function pD(t){return(e,n)=>{const r={type:L8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Tee(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:L8,payLoad:{taskData:{...i,...t}}};e(a)}}function Eee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=Tt.findIndex(a,function(c){return c.rowId===t});n({type:cD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Iee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=Tt.findIndex(a,function(c){return c.rowId===t});n({type:lD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function _ee(){return t=>{t({type:oD,payLoad:null})}}const gD=t=>e=>{e({type:M8,payLoad:{progressValue:t}})},Dee=t=>e=>{e({type:M8,payLoad:t})},Oee=t=>e=>{e({type:uD,payLoad:{userTrainingSaveData:t}})},mD=t=>e=>{e({type:aD,payLoad:{registerData:t}})},Nee=(t,e,n)=>(r,i)=>{var d;const{TasksReducer:a}=i(),{userTaskSubmitFormData:s}=a,l=[...s],c=Tt.findIndex(l,function(f){var h;return f.rowId===((h=t==null?void 0:t.row)==null?void 0:h.uuid)});let u=(d=s[c])==null?void 0:d.repeatableFields;u={...u,[e==null?void 0:e.uuid]:`<div>${n}</div>`},l[c]={...l[c],repeatableFields:u},r(pD(l))},Fee=(t,e,n)=>(r,i)=>{const{TasksReducer:a}=i(),{userTaskSubmitFormData:s,registerData:l}=a,c=s,u=Tt.cloneDeep(l);if(n&&(c==null?void 0:c.length)>0){u[e==null?void 0:e.uuid]=n;for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:n})}else if((c==null?void 0:c.length)>0){for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:""});delete u[e==null?void 0:e.uuid]}r(mD(u));const d=Object.keys(u).length;r(gD(d))},Pee=t=>e=>{e({type:iD,payLoad:{progressMaxValue:t}})},U8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},kee=(t=U8,e)=>{switch(e.type){case oD:return{...t,...U8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case yee:return{...t,...e.payLoad};case L8:return{...t,...e.payLoad};case sD:return{...t,...e.payLoad};case M8:return{...t,...e.payLoad};case aD:return{...t,registerData:e.payLoad.registerData};case iD:return{...t,...e.payLoad};case hee:return{...t,...e.payLoad};case See:return{...t,...e.payLoad};case xee:return{...t,...e.payLoad};case pee:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case gee:return{...t,...e.payLoad};case wee:return{...t,taskData:e.payLoad};case vee:return{...t,...e.payLoad};case mee:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case uD:return{...t,...e.payLoad};case dD:{const{pageIndex:n,sectionIndex:r,rowIndex:i,columnIndex:a,fieldIndex:s,field:l}=e.payLoad,c=[...t.taskSchema.layout];c[n].children[r].children[i].children[a].children[s]=l;const u={...t.taskSchema,layout:c};return{...t,taskSchema:u}}case lD:{const{userSubmitFormIndex:n,repeatableData:r}=e.payLoad,i=t.userTaskSubmitFormData[n].repeatableFieldsData?t.userTaskSubmitFormData[n].repeatableFieldsData:[];return i.push(r),t.userTaskSubmitFormData[n].repeatableFieldsData=i,t}case cD:{const{userSubmitFormIndex:n,repeatableDataRowIndex:r}=e.payLoad,i=[...t.userTaskSubmitFormData],a=[...i[n].repeatableFieldsData];return a.splice(r,1),i[n]={...i[n],repeatableFieldsData:a},{...t,userTaskSubmitFormData:i}}case bee:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case Aee:return{...t,...e.payLoad}}return t},vD=N.createContext(void 0),Mee=({option:t,taskOptions:e,templateSchema:n,taskValue:r,children:i})=>{const[a,s]=N.useReducer(kee,{...U8,...r});return N.useEffect(()=>{s({type:sD,payLoad:r})},[r]),o.jsx(vD.Provider,{value:{taskOptions:e,state:a,dispatch:s},children:o.jsx(Z_,{option:t,templateSchema:n,onChange:()=>{},children:i})})},Lee=()=>N.useContext(vD),vr=()=>{var ye,Ae,re,U,ee,X;const{taskOptions:n,state:r,dispatch:i}=Lee();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,m=r.httpRequest,g=r.taskData,v=r.progressMaxValue,A=r.maxTabs,S=r.tabNoOfFieldsData,x=r.registerData,w=r.progressValue,T=r.noOfTotalElements,C=r.menuList,_=r.loading,E=r.submitting,O=r.success,F=r.success_message,B=(ye=n==null?void 0:n.exam)!=null&&ye.startQuiz?(Ae=n==null?void 0:n.exam)==null?void 0:Ae.startQuiz:()=>{},M=(re=n==null?void 0:n.exam)!=null&&re.AddUserAssessmentAnswer?(U=n==null?void 0:n.exam)==null?void 0:U.AddUserAssessmentAnswer:()=>{},z=(ee=n==null?void 0:n.exam)!=null&&ee.endQuiz?(X=n==null?void 0:n.exam)==null?void 0:X.endQuiz:()=>{},k=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(se,Ee,pe,ve,Me,Oe)=>{},H=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(se,Ee,pe)=>{},de=N.useCallback(se=>i(Tee(se)),[i]),he=N.useCallback((se,Ee,pe)=>{console.log("form",se)},[i]),ne=N.useCallback(()=>i(_ee()),[i]),G=N.useCallback((se,Ee)=>i(Iee(se,Ee)),[i]),ae=N.useCallback((se,Ee)=>i(Eee(se,Ee)),[i]),Y=N.useCallback(se=>i(gD(se)),[i]),ge=N.useCallback(se=>i(Dee(se)),[i]),ie=N.useCallback(se=>i(mD(se)),[i]),Z=N.useCallback(se=>i(pD(se)),[i]),W=N.useCallback(se=>i(Pee(se)),[i]),oe=N.useCallback(se=>i(Oee(se)),[i]),be=N.useCallback((se,Ee,pe)=>i(Nee(se,Ee,pe)),[i]),xe=N.useCallback((se,Ee,pe)=>i(Fee(se,Ee,pe)),[i]),Ce=N.useCallback((se,Ee,pe,ve,Me,Oe)=>i(Cee(se,Ee,pe,ve,Me,Oe)),[i]);return{taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:g,TasksList:C,TasksLoading:_,TasksSuccess:O,TasksSuccessMessage:F,taskProgressMaxValue:v,taskRegisterData:x,taskProgressValue:w,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:S,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:E,updateTaskDataSchema:de,submitTaskFormData:H,updateTaskFormData:k,TasksSubmit:h,TasksHTTPRequest:m,updateTaskRegisterData:ie,updateTaskProgressValue:Y,updateTaskProgressMaxValue:W,updateUserFormDataSubmit:Z,removeUserDataFormSectionRepeatableData:ae,addUserDataFormSectionRepeatableData:G,onSetValuetoRepeatableData:be,onSetValuetoPostDataHook:xe,clearTaskSchema:ne,taskProgressLoading:f,task_status:a,startQuiz:B,endQuiz:z,AddUserAssessmentAnswer:M,updateUserTraining:oe,taskFieldUpdateHook:Ce,updateProgressDataValuesHook:ge,saveProgressDataHook:he}};function q8(){return q8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},q8.apply(this,arguments)}var bD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",q8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));bD.displayName="ExclamationTriangleIcon";function $8(){return $8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$8.apply(this,arguments)}var yD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",$8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));yD.displayName="InfoCircleIcon";function j8(){return j8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},j8.apply(this,arguments)}var H8=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",j8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));H8.displayName="TimesCircleIcon";function z8(){return z8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},z8.apply(this,arguments)}function Y8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bee(t){if(Array.isArray(t))return Y8(t)}function Vee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function AD(t,e){if(t){if(typeof t=="string")return Y8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y8(t,e)}}function Uee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1598
1598
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K8(t){return Bee(t)||Vee(t)||AD(t)||Uee()}function qee(t){if(Array.isArray(t))return t}function $ee(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function jee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1599
1599
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X8(t,e){return qee(t)||$ee(t,e)||AD(t,e)||jee()}function _p(t){"@babel/helpers - typeof";return _p=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},_p(t)}function Hee(t,e){if(_p(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(_p(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wD(t){var e=Hee(t,"string");return _p(e)==="symbol"?e:String(e)}function Co(t,e,n){return e=wD(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zee=`
|
|
1600
1600
|
@layer primereact {
|
|
@@ -33858,7 +33858,7 @@ const FP = (t) => (e) => {
|
|
|
33858
33858
|
type: CP,
|
|
33859
33859
|
payLoad: r
|
|
33860
33860
|
});
|
|
33861
|
-
}, [
|
|
33861
|
+
}, [r]), /* @__PURE__ */ c(kP.Provider, { value: { taskOptions: e, state: a, dispatch: s }, children: /* @__PURE__ */ c(ene, { option: t, templateSchema: n, onChange: () => {
|
|
33862
33862
|
}, children: i }) });
|
|
33863
33863
|
}, One = () => $d(kP), fr = () => {
|
|
33864
33864
|
var be, ye, ne, B, ee, Y;
|
|
@@ -58552,7 +58552,7 @@ var Kue = function() {
|
|
|
58552
58552
|
theme: i.theme,
|
|
58553
58553
|
formats: i.formats
|
|
58554
58554
|
};
|
|
58555
|
-
Kue ? C(new Quill(d.current, M)) : import("./quill-
|
|
58555
|
+
Kue ? C(new Quill(d.current, M)) : import("./quill-CuPDg8d1.js").then(function(z) {
|
|
58556
58556
|
if (z && Ie.isExist(d.current)) {
|
|
58557
58557
|
var k;
|
|
58558
58558
|
z.default ? k = new z.default(d.current, M) : k = new z(d.current, M), C(k);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ml = Object.defineProperty;
|
|
2
2
|
var Dl = (n, t, e) => t in n ? Ml(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var T = (n, t, e) => (Dl(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
-
import { d as ti, i as Rr, a as Hi, b as Ul, e as Br, M as Pl, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as jl, n as Hl, o as Fi, p as $l, q as Fl, r as zl, s as Kl, t as ii, u as Gl, v as Vl, w as Ft, x as zi, y as xe } from "./main-
|
|
4
|
+
import { d as ti, i as Rr, a as Hi, b as Ul, e as Br, M as Pl, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as jl, n as Hl, o as Fi, p as $l, q as Fl, r as zl, s as Kl, t as ii, u as Gl, v as Vl, w as Ft, x as zi, y as xe } from "./main-BCD8p0jw.js";
|
|
5
5
|
function Ki(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|