cft-builder 0.2.102 → 0.2.103

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.
@@ -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-CF_unu9H.js";
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-Bjar2tlD.js";
2
2
  export {
3
3
  s as BuilderItems,
4
4
  o as BuilderItemsRender,
@@ -4285,7 +4285,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4285
4285
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hwe(t,e){if(t){if(typeof t=="string")return aj(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 aj(t,e)}}function aj(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 pwe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(c){s=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function gwe(t){if(Array.isArray(t))return t}function mwe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vwe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bwe(t,e,n){return e&&vwe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var ywe="["+_0+Qg+"]+",Awe=new RegExp("^"+ywe+"$","i"),wwe="(?:["+Lye+"]["+_0+Qg+"]*|["+_0+Qg+"]+)",Swe=new RegExp("[^"+_0+Qg+"]+.*$"),xwe=/[^\d\[\]]/,Cwe=function(){function t(e){var n=e.defaultCountry,r=e.defaultCallingCode,i=e.metadata,s=e.onNationalSignificantNumberChange;mwe(this,t),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=s}return bwe(t,[{key:"input",value:function(n,r){var i=Iwe(n),s=sj(i,2),a=s[0],l=s[1],c=J1(a),u;return l&&(r.digits||(r.startInternationalNumber(),c||(u=!0))),c&&this.inputDigits(c,r),{digits:c,justLeadingPlus:u}}},{key:"inputDigits",value:function(n,r){var i=r.digits,s=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),s&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(a){return r.update(a)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=IAe("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,s=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:s}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&xwe.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=FS(n,this.metadata),s=i.nationalPrefix,a=i.nationalNumber,l=i.carrierCode;if(a!==n)return this.onExtractedNationalNumber(s,l,a,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var s=FS(n,this.metadata),a=s.nationalPrefix,l=s.nationalNumber,c=s.carrierCode;if(l!==r)return this.onExtractedNationalNumber(a,c,l,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,s,a){var l,c,u=s.lastIndexOf(i);if(u>=0&&u===s.length-i.length){c=!0;var d=s.slice(0,u);d!==n&&(l=d)}a({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,s=n.digits;if(n.nationalSignificantNumber,!(r||i)){var a=K$(s,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(a!==void 0&&a!==s)return n.update({IDDPrefix:s.slice(0,s.length-a.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=R$(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(r.number,i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,s=r.callingCode;n.startInternationalNumber(i,s),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}]),t}();function Twe(t){var e=t.search(wwe);if(!(e<0)){t=t.slice(e);var n;return t[0]==="+"&&(n=!0,t=t.slice(1)),t=t.replace(Swe,""),n&&(t="+"+t),t}}function Ewe(t){var e=Twe(t)||"";return e[0]==="+"?[e.slice(1),!0]:[e]}function Iwe(t){var e=Ewe(t),n=sj(e,2),r=n[0],i=n[1];return Awe.test(r)||(r=""),[r,i]}function _we(t,e){return Fwe(t)||Owe(t,e)||Nwe(t,e)||Dwe()}function Dwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4286
4286
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nwe(t,e){if(t){if(typeof t=="string")return oj(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 oj(t,e)}}function oj(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 Owe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(c){s=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function Fwe(t){if(Array.isArray(t))return t}function kwe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pwe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mwe(t,e,n){return e&&Pwe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var l6=function(){function t(e,n){kwe(this,t),this.metadata=new Ao(n);var r=this.getCountryAndCallingCode(e),i=_we(r,2),s=i[0],a=i[1];this.defaultCountry=s,this.defaultCallingCode=a,this.reset()}return Mwe(t,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(n6(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,s=r.justLeadingPlus;if(s)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var a;if(this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(i,this.state)),a===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var l=this.state.getNationalDigits();l&&(a=this.formatter.format(l,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new PAe({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,s){n.metadata.selectNumberingPlan(s,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new dwe({state:this.state,metadata:this.metadata}),this.parser=new Cwe({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(l){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!l})+l},s=this.state.callingCode;return i(s?n?"".concat(s," ").concat(n):s:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.complexPrefixBeforeNationalSignificantNumber,s=n.nationalPrefix,a=r,l=i||s;return l&&(a=l+a),a}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Zc)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(NAe(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,s=n.country,a=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+a:"+"+r;if(s||i){var l=s?this.metadata.countryCallingCode():i;return"+"+l+a}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,s=n.callingCode,a=this._getCountry();if(r&&!(!a&&!s)){if(a&&a===this.defaultCountry){var l=new Ao(this.metadata.metadata);l.selectNumberingPlan(a);var c=l.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(c);if(u.length>1){var d=W$(r,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});d&&(a=d)}}var f=new wAe(a||s,r,this.metadata.metadata);return i&&(f.carrierCode=i),f}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function Lwe(t,e,n){return n||(n=e,e=void 0),new l6(e,n).input(t)}function lj(t){var e=t.inputFormat,n=t.country,r=t.metadata;return e==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(Q1(n,r)):""}function c6(t,e){return e&&(t=t.slice(e.length),t[0]===" "&&(t=t.slice(1))),t}function Bwe(t,e,n){if(!(n&&n.ignoreRest)){var r=function(s){if(n)switch(s){case"end":n.ignoreRest=!0;break}};return M$(t,e,r)}}function cj(t){var e=t.onKeyDown,n=t.inputFormat;return M.useCallback(function(r){if(r.keyCode===Uwe&&n==="INTERNATIONAL"&&r.target instanceof HTMLInputElement&&Vwe(r.target)===qwe.length){r.preventDefault();return}e&&e(r)},[e,n])}function Vwe(t){return t.selectionStart}var Uwe=8,qwe="+",$we=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function BS(){return BS=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},BS.apply(this,arguments)}function jwe(t,e){if(t==null)return{};var n=zwe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zwe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Hwe(t){function e(n,r){var i=n.onKeyDown,s=n.country,a=n.inputFormat,l=n.metadata,c=l===void 0?t:l;n.international,n.withCountryCallingCode;var u=jwe(n,$we),d=M.useCallback(function(h){var g=new l6(s,c),m=lj({inputFormat:a,country:s,metadata:c}),v=g.input(m+h),A=g.getTemplate();return m&&(v=c6(v,m),A&&(A=c6(A,m))),{text:v,template:A}},[s,c]),f=cj({onKeyDown:i,inputFormat:a});return M.createElement(Wg,BS({},u,{ref:r,parse:Bwe,format:d,onKeyDown:f}))}return e=M.forwardRef(e),e.propTypes={value:xn.string.isRequired,onChange:xn.func.isRequired,onKeyDown:xn.func,country:xn.string,inputFormat:xn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:xn.object},e}const Ywe=Hwe();var Kwe=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function VS(){return VS=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},VS.apply(this,arguments)}function Xwe(t,e){if(t==null)return{};var n=Rwe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Rwe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Gwe(t){function e(n,r){var i=n.value,s=n.onChange,a=n.onKeyDown,l=n.country,c=n.inputFormat,u=n.metadata,d=u===void 0?t:u,f=n.inputComponent,h=f===void 0?"input":f;n.international,n.withCountryCallingCode;var g=Xwe(n,Kwe),m=lj({inputFormat:c,country:l,metadata:d}),v=M.useCallback(function(w){var E=Jye(w.target.value);if(E===i){var S=uj(m,E,l,d);S.indexOf(w.target.value)===0&&(E=E.slice(0,-1))}s(E)},[m,i,s,l,d]),A=cj({onKeyDown:a,inputFormat:c});return M.createElement(h,VS({},g,{ref:r,value:uj(m,i,l,d),onChange:v,onKeyDown:A}))}return e=M.forwardRef(e),e.propTypes={value:xn.string.isRequired,onChange:xn.func.isRequired,onKeyDown:xn.func,country:xn.string,inputFormat:xn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:xn.object,inputComponent:xn.elementType},e}const Wwe=Gwe();function uj(t,e,n,r){return c6(Lwe(t+e,n,r),t)}function Qwe(t){if(t.length<2||t[0]!=="+")return!1;for(var e=1;e<t.length;){var n=t.charCodeAt(e);if(!(n>=48&&n<=57))return!1;e++}return!0}function Jwe(t){Qwe(t)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",t)}var Zwe=xn.shape({country_calling_codes:xn.object.isRequired,countries:xn.object.isRequired});xn.objectOf(xn.string);function US(t,e){var n="+"+Q1(t,e);return n}function Jg(t,e){return rSe(t)||nSe(t,e)||tSe(t,e)||eSe()}function eSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4287
4287
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tSe(t,e){if(t){if(typeof t=="string")return dj(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 dj(t,e)}}function dj(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 nSe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(c=(r=s.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&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function rSe(t){if(Array.isArray(t))return t}function iSe(t){var e=this,n=t.value,r=t.onChange,i=t.country,s=t.defaultCountry,a=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&a)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&s&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof a=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=aSe({international:a,country:i,defaultCountry:s,withCountryCallingCode:l}),f=M.useRef(),h=function(de,Z,ne){console.error("[react-phone-number-input] Expected phone number ".concat(de," to correspond to country ").concat(Z," but ").concat(ne?"in reality it corresponds to country "+ne:"it doesn't",".")),f.current=!0},g=function(de){return n&&Jwe(n),sSe(n,i,s,d,c,u,function(){de&&de.onCountryMismatch&&de.onCountryMismatch();for(var Z=arguments.length,ne=new Array(Z),K=0;K<Z;K++)ne[K]=arguments[K];h.apply(e,ne)})},m=M.useState(i),v=Jg(m,2),A=v[0],w=v[1],E=M.useState(s),S=Jg(E,2),T=S[0],x=S[1],_=M.useState(g()),I=Jg(_,2),F=I[0],P=I[1],L=M.useState(n),V=Jg(L,2),z=V[0],O=V[1],U=M.useState(),te=Jg(U,2);te[0];var ge=te[1],ee=M.useCallback(function(){return ge({})},[ge]);function Q(Y){if(Y){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(Y="+".concat(Q1(i,u)).concat(Y));var de=new l6(i||s,u);return de.input(Y),de.getNumberValue()}}M.useEffect(function(){n!==z&&(O(n),P(g()))},[n]),M.useEffect(function(){if(i!==A){w(i);var Y,de=g({onCountryMismatch:function(){Y=!0}});P(de),Y&&O(Q(de))}},[i]),M.useEffect(function(){s!==T&&(x(s),P(g()))},[s]),M.useEffect(function(){z!==n&&r(z)},[z]);var he=M.useCallback(function(Y){var de;if(i)if(d==="INTERNATIONAL"){var Z=US(i,u);if(Y.indexOf(Z)!==0){if(Y&&Y[0]!=="+")Y=Z+Y;else if(!f.current)return P(Z),O(void 0),ee()}}else Y&&Y[0]==="+"&&(Y=Y.slice(1));else s||Y&&Y[0]!=="+"&&(Y="+"+Y);Y&&(de=Q(Y)),P(Y),O(de)},[i,d,s,u,P,O,ee,f]);return{phoneDigits:F,setPhoneDigits:he,inputFormat:d}}function sSe(t,e,n,r,i,s,a){if(e&&r==="INTERNATIONAL"){var l=US(e,s);return t?(t.indexOf(l)!==0&&a(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new l6(void 0,s);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?a(t,e,u.country):u.countryCallingCode!==Q1(e,s)&&a(t,e),r){case"NATIONAL":return J1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return J1(c6(u.formatInternational(),US(e,s)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===Q1(n,s)&&i?J1(u.formatNational()):t;else return""}function aSe(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var oSe=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function qS(){return qS=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},qS.apply(this,arguments)}function lSe(t,e){if(t==null)return{};var n=cSe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function cSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function u6(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,s=t.useNationalFormatForDefaultCountryValue,a=s===void 0?!0:s,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=lSe(t,oSe),g=iSe({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:a,metadata:u}),m=g.phoneDigits,v=g.setPhoneDigits,A=g.inputFormat;return M.createElement(n,qS({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:m,onChange:v}))}u6=M.forwardRef(u6),u6.propTypes={value:xn.string,onChange:xn.func.isRequired,country:xn.string,defaultCountry:xn.string,international:xn.bool,withCountryCallingCode:xn.bool,Component:xn.elementType.isRequired,useNationalFormatForDefaultCountryValue:xn.bool,metadata:Zwe};var uSe=["type","autoComplete","smartCaret","metadata"];function $S(){return $S=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},$S.apply(this,arguments)}function dSe(t,e){if(t==null)return{};var n=fSe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function fj(t){function e(n,r){var i=n.type,s=i===void 0?"tel":i,a=n.autoComplete,l=a===void 0?"tel":a,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=dSe(n,uSe);return M.createElement(u6,$S({},h,{type:s,autoComplete:l,metadata:f,ref:r,Component:u?Ywe:Wwe}))}return e=M.forwardRef(e),e.propTypes={type:xn.string,autoComplete:xn.string,smartCaret:xn.bool,metadata:xn.object},e}fj();const hSe=fj(aye),pSe=t=>{var K,R,fe,be,Te,ye,Ae,re,q,ie,W;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:s,TASK_PUBLISHED:a,task_status:l}=vr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=an(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:m,rowIndex:v,columnIndex:A,isDisabled:w}=t,{isAdmin:E,isRenderView:S,isPreview:T}=Qt(),[x,_]=M.useState(!1),[I,F]=M.useState(""),[P,L]=M.useState(0),[V,z]=M.useState(!1),[O,U]=M.useState(!1),te=()=>{U(!0)},ge=()=>{U(!1)},ee=()=>{var ue,Ie,Ee;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const ve=[...m.repeatableFields],me=It.findIndex(ve,function(Se){return Se.uuid===(d==null?void 0:d.uuid)});me>=0&&ve[me].fieldData?F(ve[me].fieldData):F("")}}else{const ve=s;if(ve!=null&&ve.length){for(const me of ve)if(me.fieldId===t.field.uuid&&((ue=me==null?void 0:me.postData[0])==null?void 0:ue.postValue)!==""&&((Ie=me==null?void 0:me.postData[0])!=null&&Ie.postValue)){F((Ee=me==null?void 0:me.postData[0])==null?void 0:Ee.postValue);break}}}z(!0)};M.useEffect(()=>{V||ee();const ue=Jt.addListener("clearRepeatableFields",me=>{me===(m==null?void 0:m.uuid)&&(F(""),L(0),d.isValid=0,u(g,h,v,A,f,d))}),Ie=Jt.addListener("onSubmitUserForm",()=>{var me;(me=d==null?void 0:d.attributes)!=null&&me.required?I?d.isValid=1:d.isValid=0:d.isValid=1}),Ee=Jt.addListener("OnInvalidFieldCatch",me=>{d.uuid===(me==null?void 0:me.fieldId)?L(1):L(0)}),ve=Jt.addListener("OnGetFieldValue",me=>{var De;const Se=(De=me==null?void 0:me.repeatableColumn)==null?void 0:De.filter($=>($==null?void 0:$.fieldUuid)===(d==null?void 0:d.uuid));Se!=null&&Se.length});return()=>{Ie.remove(),Ee.remove(),ve.remove(),ue.remove()}});const Q=ue=>{_(ue)},he=()=>{_(!1)},Y=(ue,Ie)=>{const Ee=s,ve=It.cloneDeep(e);if(ve[d==null?void 0:d.uuid]=ue,(Ee==null?void 0:Ee.length)>0)for(const me of Ee)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:ue});if(!(m!=null&&m.rowIsRepeatable)){n(ve);const me=Object.keys(ve).length;r(me)}},de=(ue,Ie)=>{var Ee;if(s){const ve=[...s],me=It.findIndex(ve,function(De){return De.rowId===(m==null?void 0:m.uuid)});let Se=(Ee=s[me])==null?void 0:Ee.repeatableFields;Se={...Se,[ue==null?void 0:ue.uuid]:Ie},ve[me]={...ve[me],repeatableFields:Se},i(ve)}F(Ie),Ie!==""?ue.isValid=1:ue.isValid=0},Z=ue=>{m!=null&&m.rowIsRepeatable?de(d,ue):Y(ue)},ne=o.jsxs("div",{onMouseOver:te,onMouseOut:ge,children:[!S&&!T&&O&&o.jsx(Xr,{handleFieldSettingsSidebar:Q,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:T?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(K=d==null?void 0:d.headerText)==null?void 0:K[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((R=d==null?void 0:d.attributes)==null?void 0:R.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(fe=d==null?void 0:d.label)==null?void 0:fe[c==null?void 0:c.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(be=d==null?void 0:d.toolTip)==null?void 0:be[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(Te=d==null?void 0:d.icon)==null?void 0:Te.properties)==null?void 0:ye.name)}),o.jsx(hSe,{id:d==null?void 0:d.uuid,placeholder:(Ae=d==null?void 0:d.placeholder)==null?void 0:Ae[c==null?void 0:c.type],value:I,onFocus:()=>L(1),onChange:Z,international:!0,className:`${P===1&&((re=d==null?void 0:d.attributes)!=null&&re.required)?I?"valid":"invalid":"valid'"} p-inputtext`,readOnly:w})]}),o.jsx("div",{children:((q=d==null?void 0:d.attributes)==null?void 0:q.required)&&o.jsx("small",{className:"error",children:P===1&&!I?(ie=d==null?void 0:d.validationMesssage)==null?void 0:ie.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(W=d==null?void 0:d.helperText)==null?void 0:W[c==null?void 0:c.type]})})]})]})}),E&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Wi,{visibilty:x,closeSettingFieldSidebar:he,...t}),o.jsx(Si,{...t,fieldWrap:ne})]})},gSe=t=>{var Y,de,Z,ne,K,R,fe,be,Te,ye,Ae;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:s,isDisabled:a}=t,{isPreview:l,isAdmin:c,isRenderView:u}=Qt(),{task_status:d,taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:g,updateUserFormDataSubmit:m,userTaskSubmitFormData:v,TASK_PUBLISHED:A}=vr(),{userSelectedLanguage:w}=an(),[E,S]=M.useState(!1),[T,x]=M.useState(""),[_,I]=M.useState(0),[F,P]=M.useState(!1),L=()=>{P(!0)},V=()=>{P(!1)};M.useEffect(()=>{E||ge();const re=Jt.addListener("clearRepeatableFields",ie=>{ie===(s==null?void 0:s.uuid)&&(x(""),I(0),e.isValid=0)}),q=Jt.addListener("onSubmitUserForm",()=>{var ie;(ie=e==null?void 0:e.attributes)!=null&&ie.required?T!==""&&xu.test(T)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{q.remove(),re.remove()}});const[z,O]=M.useState(!1),U=re=>{O(re)},te=()=>{O(!1)},ge=()=>{var re,q,ie;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const W=[...s.repeatableFields],ue=It.findIndex(W,function(Ie){return Ie.uuid===(e==null?void 0:e.uuid)});ue>=0&&W[ue].fieldData?x(W[ue].fieldData):x("")}}else{const W=v;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((re=ue==null?void 0:ue.postData[0])==null?void 0:re.postValue)!==""&&((q=ue==null?void 0:ue.postData[0])!=null&&q.postValue)){x((ie=ue==null?void 0:ue.postData[0])==null?void 0:ie.postValue),S(!0);break}}}S(!0)},ee=re=>{x(re);const q=v,ie=It.cloneDeep(f);if(re!==""&&xu.test(re)===!0){if(ie[e==null?void 0:e.uuid]=re,(q==null?void 0:q.length)>0)for(const W of q)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:re})}else if(delete ie[e==null?void 0:e.uuid],(q==null?void 0:q.length)>0)for(const W of q)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:""});if(!(s!=null&&s.rowIsRepeatable)){h(ie);const W=Object.keys(ie).length;g(W)}},Q=(re,q)=>{var ve;const ie=[...v],W=It.findIndex(ie,function(me){return me.rowId===(s==null?void 0:s.uuid)});let ue=(ve=v[W])==null?void 0:ve.repeatableFields;const Ie=re,Ee=Ie==null?void 0:Ie.uuid;ue={...ue,[Ee]:q},ie[W]={...ie[W],repeatableFields:ue},m(ie),x(q),q!==""&&xu.test(q)===!0?e.isValid=1:e.isValid=0},he=o.jsxs("div",{onMouseOver:L,onMouseOut:V,children:[!u&&!l&&F&&o.jsx(Xr,{handleFieldSettingsSidebar:U,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[w==null?void 0:w.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((de=e==null?void 0:e.attributes)==null?void 0:de.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(Z=e==null?void 0:e.label)==null?void 0:Z[w==null?void 0:w.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(ne=e==null?void 0:e.toolTip)==null?void 0:ne[w==null?void 0:w.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((R=(K=e==null?void 0:e.icon)==null?void 0:K.properties)==null?void 0:R.name)}),o.jsx(Sn,{id:e==null?void 0:e.uuid,placeholder:(fe=e==null?void 0:e.placeholder)==null?void 0:fe[w==null?void 0:w.type],value:T,onFocus:()=>I(1),onChange:re=>{s!=null&&s.rowIsRepeatable?Q(r,i):ee(re.target.value)},className:_===1&&((be=e==null?void 0:e.attributes)!=null&&be.required)?T?"valid":"invalid":"valid'",readOnly:a})]}),((Te=e==null?void 0:e.attributes)==null?void 0:Te.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:_===1&&!T?(ye=e==null?void 0:e.validationMesssage)==null?void 0:ye[w==null?void 0:w.type]:""})}),T!==""&&_===1&&xu.test(T)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Ae=e==null?void 0:e.helperText)==null?void 0:Ae[w==null?void 0:w.type]})})]}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]});return o.jsxs(o.Fragment,{children:[z===!0&&o.jsx(Wi,{visibilty:z,closeSettingFieldSidebar:te,...t},e==null?void 0:e.uuid),o.jsx(Si,{...t,fieldWrap:he})]})},mSe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklN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AMdHiilhaueeMS9pOrGU82lzNACcA1+XO8zKP5Q5QNxaAfnuSX0IhDrrcSfDWaPG+WM4DucNI6p9YzgPR4n0EbwXuzJ0H2MIvfRBQv1kA+izWMg58L2OELcCVLGZZNCv2UhFJMxJN/p7ESVPbAk9njPJdDxz3nwUgj69nuu4NNDghWlwRR7MtUwZJBRJtxqa2BY5j8m6B/kvZxsRa8zkAGaSb2Ys9uIfEvn265N0kPhdtbuzT9SSVVBrirKmnCR7Zp0s+zhZeF2t4qk/X0xRXADKINTxF4j/24VJbCa5iGyc6+UuajmhzI9s4keAqYGvvL8h/cPLPwxWATNJNDLKY7wPtHl3iW8Al0eIXPfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",ySe=t=>{var he,Y,de,Z,ne,K,R,fe,be;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:s}=t,{isAdmin:a,isPreview:l,isRenderView:c}=Qt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:m,TASK_PUBLISHED:v}=vr(),{userSelectedLanguage:A}=an(),[w,E]=M.useState(!1),[S,T]=M.useState(""),[x,_]=M.useState(0),[I,F]=M.useState(!1),P=()=>{F(!0)},L=()=>{F(!1)};M.useEffect(()=>{w||te();const Te=Jt.addListener("clearRepeatableFields",Ae=>{Ae===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),ye=Jt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?S!==""&&xu.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ye.remove(),Te.remove()}});const[V,z]=M.useState(!1),O=Te=>{z(Te)},U=()=>{z(!1)},te=()=>{var Te,ye,Ae;if(i!=null&&i.rowIsRepeatable){const re=[...(i==null?void 0:i.repeatableFields)||[]],q=It.findIndex(re,function(ie){return ie.uuid===(e==null?void 0:e.uuid)});q>=0&&re[q].fieldData?T(re[q].fieldData):T("")}else{const re=m;if(re!=null&&re.length){for(const q of re)if(q.fieldId===t.field.uuid&&((Te=q==null?void 0:q.postData[0])==null?void 0:Te.postValue)!==""&&((ye=q==null?void 0:q.postData[0])!=null&&ye.postValue)){T((Ae=q==null?void 0:q.postData[0])==null?void 0:Ae.postValue),E(!0);break}}}E(!0)},ge=(Te,ye)=>{T(ye);const Ae=m,re=It.cloneDeep(d);if(Ae!==null){if(ye){if(re[e==null?void 0:e.uuid]=ye,(Ae==null?void 0:Ae.length)>0)for(const q of Ae)q.fieldId===t.field.uuid&&(q.postData[0]={postValue:ye})}else if(delete re[e==null?void 0:e.uuid],(Ae==null?void 0:Ae.length)>0)for(const q of Ae)q.fieldId===t.field.uuid&&(q.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(re);const q=Object.keys(re).length;h(q)}},ee=(Te,ye,Ae,re)=>{var ue;const q=[...m],ie=It.findIndex(q,function(Ie){return Ie.rowId===(i==null?void 0:i.uuid)});let W=(ue=m[ie])==null?void 0:ue.repeatableFields;W={...W,[Ae==null?void 0:Ae.uuid]:re},q[ie]={...q[ie],repeatableFields:W},g(q),T(re),re!==""&&xu.test(re)===!0?e.isValid=1:e.isValid=0},Q=o.jsxs("div",{onMouseOver:P,onMouseOut:L,children:[!c&&!l&&I&&o.jsx(Xr,{handleFieldSettingsSidebar:O,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:a?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(he=e==null?void 0:e.headerText)==null?void 0:he[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(de=e==null?void 0:e.label)==null?void 0:de[A==null?void 0:A.type]}):o.jsx(as,{...t}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(Z=e==null?void 0:e.toolTip)==null?void 0:Z[A==null?void 0:A.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(f8,{cancelIcon:o.jsx("img",{src:mSe,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:vSe,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:bSe,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(ne=e==null?void 0:e.placeholder)==null?void 0:ne[A==null?void 0:A.type],value:S,onFocus:()=>_(1),onChange:Te=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Te.value):ge(Te,Te.value)},className:x===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?S?"valid":"invalid":"valid'",readOnly:s})}),((R=e==null?void 0:e.attributes)==null?void 0:R.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:x===1&&!S?(fe=e==null?void 0:e.validationMesssage)==null?void 0:fe[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[A==null?void 0:A.type]})})]})}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[V===!0&&o.jsx(Wi,{visibilty:V,closeSettingFieldSidebar:U,...t},e==null?void 0:e.uuid),o.jsx(Si,{...t,fieldWrap:Q})]})},ASe=t=>{var he,Y,de,Z,ne,K,R,fe,be;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:s}=t,{isPreview:a,isAdmin:l,isRenderView:c}=Qt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:m,TASK_PUBLISHED:v}=vr(),{userSelectedLanguage:A}=an(),[w,E]=M.useState(!1),[S,T]=M.useState(""),[x,_]=M.useState(0),[I,F]=M.useState(!1),P=()=>{F(!0)},L=()=>{F(!1)};M.useEffect(()=>{w||te();const Te=Jt.addListener("clearRepeatableFields",Ae=>{Ae===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),ye=Jt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?S!==""&&xu.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ye.remove(),Te.remove()}});const[V,z]=M.useState(!1),O=Te=>{z(Te)},U=()=>{z(!1)},te=()=>{var Te,ye,Ae;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const re=[...i.repeatableFields],q=It.findIndex(re,function(ie){return ie.uuid===(e==null?void 0:e.uuid)});q>=0&&re[q].fieldData?T(re[q].fieldData):T("")}}else{const re=m;if(re!=null&&re.length){for(const q of re)if(q.fieldId===t.field.uuid&&((Te=q==null?void 0:q.postData[0])==null?void 0:Te.postValue)!==""&&((ye=q==null?void 0:q.postData[0])!=null&&ye.postValue)){T((Ae=q==null?void 0:q.postData[0])==null?void 0:Ae.postValue),E(!0);break}}}E(!0)},ge=(Te,ye)=>{T(ye);const Ae=m,re=It.cloneDeep(d);if(Ae!==null){if(ye){if(re[e==null?void 0:e.uuid]=ye,(Ae==null?void 0:Ae.length)>0)for(const q of Ae)q.fieldId===t.field.uuid&&(q.postData[0]={postValue:ye})}else if(delete re[e==null?void 0:e.uuid],(Ae==null?void 0:Ae.length)>0)for(const q of Ae)q.fieldId===t.field.uuid&&(q.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(re);const q=Object.keys(re).length;h(q)}},ee=(Te,ye,Ae,re)=>{var ue;const q=[...m],ie=It.findIndex(q,function(Ie){return Ie.rowId===(i==null?void 0:i.uuid)});let W=(ue=m[ie])==null?void 0:ue.repeatableFields;W={...W,[Ae==null?void 0:Ae.uuid]:re},q[ie]={...q[ie],repeatableFields:W},g(q),T(re),re!==""&&xu.test(re)===!0?e.isValid=1:e.isValid=0},Q=o.jsxs("div",{onMouseOver:P,onMouseOut:L,children:[!c&&!a&&I&&o.jsx(Xr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:`field ${a?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:a?"col-12 p-fluid":"col-12 p-fluid field-form-builder",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(he=e==null?void 0:e.headerText)==null?void 0:he[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(o.Fragment,{children:(de=e==null?void 0:e.label)==null?void 0:de[A==null?void 0:A.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Z=e==null?void 0:e.toolTip)==null?void 0:Z[A==null?void 0:A.type],position:"right"})})]}),o.jsx(g8,{id:e==null?void 0:e.uuid,placeholder:(ne=e==null?void 0:e.placeholder)==null?void 0:ne[A==null?void 0:A.type],value:S,onFocus:()=>_(1),onChange:Te=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Te.value):ge(Te,Te.value)},className:x===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?S?"valid":"invalid":"valid'",readOnly:s}),((R=e==null?void 0:e.attributes)==null?void 0:R.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:x===1&&!S?(fe=e==null?void 0:e.validationMesssage)==null?void 0:fe[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[V===!0&&o.jsx(Wi,{visibilty:V,closeSettingFieldSidebar:U,...t},e==null?void 0:e.uuid),o.jsx(Si,{...t,fieldWrap:Q})]})},wSe=t=>{var Q,he,Y,de,Z,ne;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isPreview:s,isAdmin:a,isRenderView:l}=Qt(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:m}=vr(),{userSelectedLanguage:v}=an(),[A,w]=M.useState(!1),[E,S]=M.useState(""),[T,x]=M.useState(0),[_,I]=M.useState(!1),F=()=>{I(!0)},P=()=>{I(!1)};M.useEffect(()=>{A||U();const K=Jt.addListener("clearRepeatableFields",fe=>{fe===(i==null?void 0:i.uuid)&&(S(""),x(0),e.isValid=0)}),R=Jt.addListener("onSubmitUserForm",()=>{var fe;(fe=e==null?void 0:e.attributes)!=null&&fe.required&&(E!==""&&xu.test(E)===!0?e.isValid=1:e.isValid=0)});return()=>{R.remove(),K.remove()}});const[L,V]=M.useState(!1),z=K=>{V(K)},O=()=>{V(!1)},U=()=>{var K,R,fe;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const be=[...i.repeatableFields],Te=It.findIndex(be,function(ye){return ye.uuid===(e==null?void 0:e.uuid)});Te>=0&&be[Te].fieldData?S(be[Te].fieldData):S("")}}else{const be=g;if(be!=null&&be.length){for(const Te of be)if(Te.fieldId===t.field.uuid&&((K=Te==null?void 0:Te.postData[0])==null?void 0:K.postValue)!==""&&((R=Te==null?void 0:Te.postData[0])!=null&&R.postValue)){S((fe=Te==null?void 0:Te.postData[0])==null?void 0:fe.postValue),w(!0);break}}}w(!0)},te=(K,R)=>{S(R);const fe=g,be=It.cloneDeep(u);if(R){if(be[e==null?void 0:e.uuid]=R,(fe==null?void 0:fe.length)>0)for(const Te of fe)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:R})}else if(delete be[e==null?void 0:e.uuid],(fe==null?void 0:fe.length)>0)for(const Te of fe)Te.fieldId===t.field.uuid&&(Te.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){d(be);const Te=Object.keys(be).length;f(Te)}},ge=(K,R,fe,be)=>{var re;const Te=[...g],ye=It.findIndex(Te,function(q){return q.rowId===(i==null?void 0:i.uuid)});let Ae=(re=g[ye])==null?void 0:re.repeatableFields;Ae={...Ae,[fe==null?void 0:fe.uuid]:be},Te[ye]={...Te[ye],repeatableFields:Ae},h(Te),S(be),be!==""&&xu.test(be)===!0?e.isValid=1:e.isValid=0},ee=o.jsxs("div",{onMouseOver:F,onMouseOut:P,children:[!l&&!s&&_&&o.jsx(Xr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${s?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid ":" "} ${l?" ":" py-6 px-4 card"}`,children:[o.jsxs("div",{className:s?"p-fluid":"card p-fluid field-form-builder",children:[!s&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(Sn,{type:s===!0?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(Q=e==null?void 0:e.placeholder)==null?void 0:Q[v==null?void 0:v.type],value:(he=e==null?void 0:e.defaultValue)==null?void 0:he[v==null?void 0:v.type],onFocus:()=>x(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?ge(n,r,e,e==null?void 0:e.defaultValue):te("",e==null?void 0:e.defaultValue)},className:T===1&&((Y=e==null?void 0:e.attributes)!=null&&Y.required)?E?"valid":"invalid":"valid'",readOnly:c===m}),((de=e==null?void 0:e.attributes)==null?void 0:de.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!E?(Z=e==null?void 0:e.validationMesssage)==null?void 0:Z[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ne=e==null?void 0:e.helperText)==null?void 0:ne[v==null?void 0:v.type]})})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[L===!0&&o.jsx(Wi,{visibilty:L,closeSettingFieldSidebar:O,...t}),o.jsx(Si,{...t,fieldWrap:ee})]})},hj=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:s,columnIndex:a,path:l,labelType:c}=t,[u,d]=M.useState(e),{isPreview:f}=Qt();M.useEffect(()=>{var x;return E((x=e[c])==null?void 0:x[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:m,gridComponentFieldSettingUpdate:v}=an(),A=(x,_,I)=>{d(F=>({...F,[x]:{...F[x],[_==null?void 0:_.type]:I}}))},[w,E]=M.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);M.useEffect(()=>(S(),()=>{}),[u]);const S=()=>{const x=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?m(x[ms],x[vs],x[xs],x[Cs],x[Ts],x[Ns],x[Zo],x[Fo],u):(x==null?void 0:x.length)>Ns&&(x==null?void 0:x.length)===tc+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(x[ms],x[vs],x[xs],x[Cs],x[Ts],x[5],x[6],x[7],u):g(r,i,s,a,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(g4,{style:{display:"inline-block"},className:"builder-input-label-edit",html:w,disabled:f,onChange:x=>{var _;E(y4.sanitize((_=x==null?void 0:x.target)==null?void 0:_.value))},onBlur:x=>{var I;const _=y4.sanitize((I=x==null?void 0:x.target)==null?void 0:I.innerText);E(_),A(c,h,_)},tagName:"article"})})},SSe=t=>{var ne,K,R,fe,be,Te,ye;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:s}=vr(),{userSelectedLanguage:a,fieldSettingUpdate:l}=an(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:m,isDisabled:v}=t,{isPreview:A,isAdmin:w,isRenderView:E}=Qt(),[S,T]=M.useState(!1),[x,_]=M.useState(""),[I,F]=M.useState(0),[P,L]=M.useState(!1),[V,z]=M.useState(!1),O=()=>{z(!0)},U=()=>{z(!1)},te=()=>{var Ae,re,q;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const ie=[...h.repeatableFields],W=It.findIndex(ie,function(ue){return ue.uuid===(c==null?void 0:c.uuid)});W>=0&&ie[W].fieldData?_(ie[W].fieldData):_("")}}else{const ie=s;if(ie!=null&&ie.length){for(const W of ie)if(W.fieldId===t.field.uuid&&((Ae=W==null?void 0:W.postData[0])==null?void 0:Ae.postValue)!==""&&((re=W==null?void 0:W.postData[0])!=null&&re.postValue)){_((q=W==null?void 0:W.postData[0])==null?void 0:q.postValue);break}}}L(!0)};M.useEffect(()=>{P||te();const Ae=Jt.addListener("clearRepeatableFields",W=>{W===(h==null?void 0:h.uuid)&&(_(""),F(0),c.isValid=0,l(f,d,g,m,u,c))}),re=Jt.addListener("onSubmitUserForm",()=>{var W;(W=c==null?void 0:c.attributes)!=null&&W.required?x?c.isValid=1:c.isValid=0:c.isValid=1}),q=Jt.addListener("OnInvalidFieldCatch",W=>{c.uuid===(W==null?void 0:W.fieldId)?F(1):F(0)}),ie=Jt.addListener("OnGetFieldValue",W=>{var Ie;const ue=(Ie=W==null?void 0:W.repeatableColumn)==null?void 0:Ie.filter(Ee=>(Ee==null?void 0:Ee.fieldUuid)===(c==null?void 0:c.uuid));ue!=null&&ue.length});return()=>{re.remove(),q.remove(),ie.remove(),Ae.remove()}});const ge=Ae=>{T(Ae)},ee=()=>{T(!1)},Q=Ae=>{var ie,W;_(Ae.target.value);const re=s,q=It.cloneDeep(e);if(re!==null){if((ie=Ae==null?void 0:Ae.target)!=null&&ie.value){if(q[c==null?void 0:c.uuid]=(W=Ae==null?void 0:Ae.target)==null?void 0:W.value,(re==null?void 0:re.length)>0)for(const ue of re)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:Ae.target.value})}else if(delete q[c==null?void 0:c.uuid],(re==null?void 0:re.length)>0)for(const ue of re)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(q);const ue=Object.keys(q).length;r(ue)}},he=(Ae,re,q,ie)=>{var W;if(s){const ue=[...s],Ie=It.findIndex(ue,function(ve){return ve.rowId===(h==null?void 0:h.uuid)});let Ee=(W=s[Ie])==null?void 0:W.repeatableFields;Ee={...Ee,[q==null?void 0:q.uuid]:ie},ue[Ie]={...ue[Ie],repeatableFields:Ee},i(ue)}_(ie),ie!==""?q.isValid=1:q.isValid=0},Y=10,de=()=>{const Ae=[];for(let re=0;re<=Y;re++)Ae.push(o.jsxs("label",{children:[o.jsx("input",{onChange:q=>{h!=null&&h.rowIsRepeatable?he(f,d,c,q.target.value):Q(q)},checked:parseInt(x)===re,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:re,disabled:v}),o.jsx("span",{children:re})]},`field-${c==null?void 0:c.uuid}-likertScale-${re} ${parseInt(x)===re?"scale-selected":""}`));return Ae},Z=o.jsxs("div",{onMouseOver:O,onMouseOut:U,children:[!E&&!A&&V&&o.jsx(Xr,{handleFieldSettingsSidebar:ge,...t}),o.jsxs("div",{className:`field ${A?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ne=c==null?void 0:c.headerText)==null?void 0:ne[a==null?void 0:a.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((K=c==null?void 0:c.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(o.Fragment,{children:(R=c==null?void 0:c.label)==null?void 0:R[a==null?void 0:a.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(fe=c==null?void 0:c.toolTip)==null?void 0:fe[a==null?void 0:a.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(hj,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(hj,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:de()})]})}),o.jsx("div",{children:((be=c==null?void 0:c.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:I===1&&!x?(Te=c==null?void 0:c.validationMesssage)==null?void 0:Te.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(ye=c==null?void 0:c.helperText)==null?void 0:ye[a==null?void 0:a.type]})})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[S===!0&&o.jsx(Wi,{visibilty:S,closeSettingFieldSidebar:ee,...t}),o.jsx(Si,{...t,fieldWrap:Z})]})},xSe=t=>{var ne,K,R,fe,be,Te,ye,Ae,re,q,ie,W;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:s,task_status:a,TASK_PUBLISHED:l}=vr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=an(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:m,rowIndex:v,columnIndex:A,isDisabled:w}=t,{isPreview:E,isAdmin:S,isRenderView:T}=Qt(),[x,_]=M.useState(!1),[I,F]=M.useState(""),[P,L]=M.useState(0),[V,z]=M.useState(!1),[O,U]=M.useState(!1),te=()=>{U(!0)},ge=()=>{U(!1)},ee=()=>{var ue,Ie,Ee;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const ve=[...m.repeatableFields],me=It.findIndex(ve,function(Se){return Se.uuid===(d==null?void 0:d.uuid)});me>=0&&ve[me].fieldData?F(ve[me].fieldData):F("")}}else{const ve=s;if(ve!=null&&ve.length){for(const me of ve)if(me.fieldId===t.field.uuid&&((ue=me==null?void 0:me.postData[0])==null?void 0:ue.postValue)!==""&&((Ie=me==null?void 0:me.postData[0])!=null&&Ie.postValue)){F((Ee=me==null?void 0:me.postData[0])==null?void 0:Ee.postValue);break}}}z(!0)};M.useEffect(()=>{V||ee();const ue=Jt.addListener("clearRepeatableFields",me=>{me===(m==null?void 0:m.uuid)&&(F(""),L(0),d.isValid=0,u(g,h,v,A,f,d))}),Ie=Jt.addListener("onSubmitUserForm",()=>{var me;(me=d==null?void 0:d.attributes)!=null&&me.required?I?d.isValid=1:d.isValid=0:d.isValid=1}),Ee=Jt.addListener("OnInvalidFieldCatch",me=>{d.uuid===(me==null?void 0:me.fieldId)?L(1):L(0)}),ve=Jt.addListener("OnGetFieldValue",me=>{var De;const Se=(De=me==null?void 0:me.repeatableColumn)==null?void 0:De.filter($=>($==null?void 0:$.fieldUuid)===(d==null?void 0:d.uuid));Se!=null&&Se.length});return()=>{Ie.remove(),Ee.remove(),ve.remove(),ue.remove()}});const Q=ue=>{_(ue)},he=()=>{_(!1)},Y=ue=>{var ve,me;F(ue.target.value);const Ie=s,Ee=It.cloneDeep(e);if(Ie!==null){if((ve=ue==null?void 0:ue.target)!=null&&ve.value){if(Ee[d==null?void 0:d.uuid]=(me=ue==null?void 0:ue.target)==null?void 0:me.value,(Ie==null?void 0:Ie.length)>0)for(const Se of Ie)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:ue.target.value})}else if(delete Ee[d==null?void 0:d.uuid],(Ie==null?void 0:Ie.length)>0)for(const Se of Ie)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:""})}if(!(m!=null&&m.rowIsRepeatable)){n(Ee);const Se=Object.keys(Ee).length;r(Se)}},de=(ue,Ie)=>{var Ee;if(s){const ve=[...s],me=It.findIndex(ve,function(De){return De.rowId===(m==null?void 0:m.uuid)});let Se=(Ee=s[me])==null?void 0:Ee.repeatableFields;Se={...Se,[ue==null?void 0:ue.uuid]:Ie},ve[me]={...ve[me],repeatableFields:Se},i(ve)}F(Ie),Ie!==""?ue.isValid=1:ue.isValid=0},Z=o.jsxs("div",{onMouseOver:te,onMouseOut:ge,children:[!T&&!E&&O&&o.jsx(Xr,{handleFieldSettingsSidebar:Q,...t}),o.jsxs("div",{className:`field ${E?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:E?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(ne=d==null?void 0:d.headerText)==null?void 0:ne[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",E?o.jsx(o.Fragment,{children:(R=d==null?void 0:d.label)==null?void 0:R[c==null?void 0:c.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(fe=d==null?void 0:d.toolTip)==null?void 0:fe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Te.name)}),o.jsx(Sn,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:I,onFocus:()=>L(1),onChange:ue=>{m!=null&&m.rowIsRepeatable?de(d,ue.target.value):Y(ue)},className:P===1&&((Ae=d==null?void 0:d.attributes)!=null&&Ae.required)?I?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:w})]}),o.jsx("div",{children:((re=d==null?void 0:d.attributes)==null?void 0:re.required)&&o.jsx("small",{className:"error",children:P===1&&!I?(q=d==null?void 0:d.validationMesssage)==null?void 0:q.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ie=d==null?void 0:d.helperText)==null?void 0:ie[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(W=d==null?void 0:d.fontStyle)==null?void 0:W.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:I})}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Wi,{visibilty:x,closeSettingFieldSidebar:he,...t}),o.jsx(Si,{...t,fieldWrap:Z})]})},CSe=t=>{var Ae,re,q,ie,W,ue,Ie,Ee,ve,me,Se,De,$,oe,pe,ce,le;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:s,task_status:a}=vr(),{globalAlignment:l}=Qt(),{userSelectedLanguage:c,fieldSettingUpdate:u}=an(),{isRenderView:d,isAdmin:f,isPreview:h}=Qt(),g=ae=>{const Oe=ae.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ne=`${ae.className} justify-content-start`,Ke=`${ae.titleClassName} pl-1`;return o.jsxs("div",{className:Ne,children:[o.jsxs("button",{className:ae.togglerClassName,onClick:ae.onTogglerClick,children:[o.jsx("span",{className:Oe}),o.jsx(tn,{})]}),o.jsx("span",{className:Ke,children:ee})]})},{field:m,fieldIndex:v,sectionIndex:A,pageIndex:w,row:E,rowIndex:S,columnIndex:T,isDisabled:x}=t,[_,I]=M.useState(!1),[F,P]=M.useState(null),[L,V]=M.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[z,O]=M.useState(!1),U=()=>{O(!0)},te=()=>{O(!1)},ge=(ae,Oe)=>{let Ne={...L};Ne={...Ne,[ae]:Oe},V(Ne),(Ne==null?void 0:Ne.addressOne)!==""&&(Ne!=null&&Ne.addressTwo)&&(Ne!=null&&Ne.zipcode)&&Te(Ne==null?void 0:Ne.zipcode)?(m.isValid=1,R(Ne,!0)):(m.isValid=0,R(null,!1))},[ee]=M.useState((Ae=m==null?void 0:m.label)==null?void 0:Ae[c==null?void 0:c.type]),[Q,he]=M.useState(0),[Y,de]=M.useState(!1),Z=()=>{var ae,Oe;if(!(E!=null&&E.rowIsRepeatable)){const Ne=i;if(Ne!=null&&Ne.length){for(const Ke of Ne)if(Ke.fieldId===t.field.uuid&&((ae=Ke==null?void 0:Ke.postData[0])!=null&&ae.postValue)){V((Oe=Ke==null?void 0:Ke.postData[0])==null?void 0:Oe.postValue);break}}}de(!0)};M.useEffect(()=>{Y||Z();const ae=Jt.addListener("clearRepeatableFields",pt=>{pt===(E==null?void 0:E.uuid)&&(he(0),m.isValid=0,u(w,A,S,T,v,m))}),Oe=Jt.addListener("onSubmitUserForm",()=>{var pt;(pt=m==null?void 0:m.attributes)!=null&&pt.required?(L==null?void 0:L.addressOne)!==""&&(L==null?void 0:L.zipcode)!==""&&Te(L==null?void 0:L.zipcode)?m.isValid=1:m.isValid=0:m.isValid=1}),Ne=Jt.addListener("OnInvalidFieldCatch",pt=>{m.uuid===(pt==null?void 0:pt.fieldId)?he(1):he(0)}),Ke=Jt.addListener("OnGetFieldValue",pt=>{var Ft;const ht=(Ft=pt==null?void 0:pt.repeatableColumn)==null?void 0:Ft.filter(An=>(An==null?void 0:An.fieldUuid)===(m==null?void 0:m.uuid));ht!=null&&ht.length}),dt=Jt.addListener("formFieldAdded",pt=>{F===null&&P(pt.uuid)});return()=>{Oe.remove(),Ne.remove(),Ke.remove(),ae.remove(),dt.remove()}});const ne=ae=>{I(ae)},K=()=>{I(!1)},R=(ae,Oe)=>{const Ne=i,Ke=It.cloneDeep(e);if(Oe){if(Ke[m==null?void 0:m.uuid]=ae,(Ne==null?void 0:Ne.length)>0)for(const dt of Ne)dt.fieldId===t.field.uuid&&(dt.postData[0]={postValue:ae})}else if(delete Ke[m==null?void 0:m.uuid],(Ne==null?void 0:Ne.length)>0)for(const dt of Ne)dt.fieldId===t.field.uuid&&(dt.postData[0]={postValue:ae});if(!(E!=null&&E.rowIsRepeatable)){n(Ke);const dt=Object.keys(Ke).length;r(dt)}},fe=()=>{let ae="";return h||(ae=ae+" field-form-builder"),a===s&&f===!0&&(ae=ae+" card"),ae},be=()=>{let ae=!1;return L.addressOne!==""&&L.zipcode!==""&&Te(L.zipcode)&&(ae=!0),ae};function Te(ae){const Oe=/\d/.test(ae),Ne=/[a-zA-Z]/.test(ae);return Oe&&Ne?!0:!!Oe}M.useEffect(()=>(F!==null&&setTimeout(()=>{P(null)},1e3),()=>{}),[F]);const ye=o.jsxs("div",{onMouseOver:U,onMouseOut:te,children:[!d&&!h&&z&&o.jsx(Xr,{handleFieldSettingsSidebar:ne,...t}),o.jsxs("div",{className:`field ${h?" ":" builder-element-wrapper "} ${(m==null?void 0:m.isFluid)===!0?" card py-3 px-4 p-fluid":"card p-4"} ${F===(m==null?void 0:m.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:h?"col-12 ":"col-11 p-fluid",children:[(m==null?void 0:m.showHeaderText)&&o.jsx("h6",{children:(re=m==null?void 0:m.headerText)==null?void 0:re[c==null?void 0:c.type]}),(m==null?void 0:m.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((q=m==null?void 0:m.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(ie=m==null?void 0:m.label)==null?void 0:ie[c==null?void 0:c.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(m==null?void 0:m.showToolTip)&&o.jsx(Mi,{message:(W=m==null?void 0:m.toolTip)==null?void 0:W[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(ue=m==null?void 0:m.addresslineFirstLabel)==null?void 0:ue[c==null?void 0:c.type]})}),o.jsx(Sn,{value:L.addressOne||"",onChange:ae=>ge("addressOne",ae.target.value),className:"my-2 ",readOnly:x}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ie=m==null?void 0:m.addresslineSecondLabel)==null?void 0:Ie[c==null?void 0:c.type]})}),o.jsx(Sn,{value:L.addressTwo||"",onChange:ae=>ge("addressTwo",ae.target.value),className:"my-2",readOnly:x}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ee=m==null?void 0:m.postalcodeLabel)==null?void 0:Ee[c==null?void 0:c.type]})}),o.jsx(Sn,{value:L.zipcode||"",onChange:ae=>ge("zipcode",ae.target.value),className:"my-2",readOnly:x}),o.jsx("p",{children:!Te(L.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((ve=m==null?void 0:m.attributes)==null?void 0:ve.required)&&!be()&&o.jsx("small",{className:"error",children:Q===1?(me=m==null?void 0:m.validationMesssage)==null?void 0:me.language:""}),(m==null?void 0:m.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"binary",checked:L.isBillingAddressSame,onChange:ae=>{ge("isBillingAddressSame",ae.checked),ae.checked?V(Oe=>({...Oe,billingCountry:L.country,billingCity:L.city,billingState:L.state,billingAddressOne:L.addressOne,billingAddressTwo:L.addressTwo,billingZipcode:L.zipcode})):V(Oe=>({...Oe,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:x}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),L.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(m==null?void 0:m.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[((Se=m==null?void 0:m.attributes)==null?void 0:Se.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(De=m==null?void 0:m.billingLabel)==null?void 0:De[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(m==null?void 0:m.showToolTip)&&o.jsx(Mi,{message:($=m==null?void 0:m.toolTip)==null?void 0:$[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(oe=m==null?void 0:m.addresslineFirstLabel)==null?void 0:oe[c==null?void 0:c.type]}),o.jsx(Sn,{value:L.billingAddressOne||"",onChange:ae=>ge("billingAddressOne",ae.target.value),className:"my-2",readOnly:x}),o.jsx("label",{htmlFor:"",children:(pe=m==null?void 0:m.addresslineSecondLabel)==null?void 0:pe[c==null?void 0:c.type]}),o.jsx(Sn,{value:L.billingAddressTwo||"",onChange:ae=>ge("billingAddressTwo",ae.target.value),className:"my-2",readOnly:x}),o.jsx("label",{htmlFor:"",children:(ce=m==null?void 0:m.postalcodeLabel)==null?void 0:ce[c==null?void 0:c.type]}),o.jsx(Sn,{value:L.billingZipcode||"",onChange:ae=>ge("billingZipcode",ae.target.value),className:"my-2",readOnly:x}),!Te(L.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(m==null?void 0:m.showHelperText)&&o.jsx("small",{children:(le=m==null?void 0:m.helperText)==null?void 0:le[c==null?void 0:c.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[_===!0&&o.jsx(Wi,{visibilty:_,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:l?"ltr":"rtl",className:fe(),children:a===s&&f===!0?o.jsx(ui,{headerTemplate:g,toggleable:!0,children:ye}):ye})]})},TSe=t=>{var S;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:s,onSetValuetoPostData:a,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:g,columnIndex:m}=t,{handleDrop:v}=an(),{isPreview:A,isAdvanceView:w}=Qt(),E=(T,x)=>{a(T,x)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((S=s.children)==null?void 0:S.length)>0&&s.children.map((T,x)=>{const _=T[`${n.rowIndex}-${n.columnIndex}`];return _?o.jsx("div",{children:o.jsx(eu,{type:"grid",showFieldIcons:!1,onChange:E,data:_,field:_,path:`${i}-${n.rowIndex}-${n.columnIndex}-${x}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:g,columnIndex:m,fieldIndex:x,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${x}`):null}),n&&A===!1&&o.jsx("div",{className:"py-5",children:o.jsx(Fr,{isAdvanceView:w,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:v})})]})},pj=t=>{var V,z,O,U,te,ge,ee;const{field:e,column:n,section:r,row:i,rowIndex:s,columnIndex:a,sectionIndex:l,isPreview:c,userSelectedLanguage:u,fieldIndex:d,customColumnHeaderTemplate:f,onSetValuetoPostData:h,setAllFields:g,allFields:m,actionHeaderTemplate:v,actionBodyTemplate:A,isFocus:w,inputValue:E,handleFieldSettingsSidebar:S,isAdmin:T,emitSocketData:x,isRenderView:_}=t,[I,F]=M.useState(!1),P=()=>{F(!0)},L=()=>{F(!1)};return o.jsxs("div",{onMouseOver:P,onMouseOut:L,children:[!_&&!c&&I&&o.jsx(Xr,{handleFieldSettingsSidebar:S,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 ":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(V=e==null?void 0:e.headerText)==null?void 0:V[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:d,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((z=e==null?void 0:e.attributes)==null?void 0:z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(O=e==null?void 0:e.label)==null?void 0:O[u==null?void 0:u.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(U=e==null?void 0:e.toolTip)==null?void 0:U[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(oo,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((Q,he)=>o.jsx(Ar,{style:{minWidth:350},header:f(Q,he),body:(Y,de)=>o.jsx(TSe,{customColumn:Q,section:r,column:n,columnIndex:a,row:i,rowIndex:s,sectionIndex:l,e:Y,indexes:de,customColumnIndex:he,onSetValuetoPostData:h,setAllFields:g,allFields:m,emitSocketData:x,field:e,...t})},Q==null?void 0:Q.uuid)),!c&&o.jsx(Ar,{frozen:!0,header:Q=>v(Q),body:(Q,he)=>A(Q,he),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((te=e==null?void 0:e.attributes)==null?void 0:te.required)&&o.jsx("small",{className:"error",children:w===1&&!E?(ge=e==null?void 0:e.validationMesssage)==null?void 0:ge.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ee=e==null?void 0:e.helperText)==null?void 0:ee[u==null?void 0:u.type]})})]})]})}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},gj=t=>{var Ae;const{globalAlignment:e}=Qt(),n=re=>{const q=re.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ie=`${re.className} justify-content-start`,W=`${re.titleClassName} pl-1`;return o.jsxs("div",{className:ie,children:[o.jsxs("button",{className:re.togglerClassName,onClick:re.onTogglerClick,children:[o.jsx("span",{className:q}),o.jsx(tn,{})]}),o.jsx("span",{className:W,children:x})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:s}=vr(),{userSelectedLanguage:a,fieldSettingUpdate:l}=an(),{isPreview:c,field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:g,rowIndex:m,columnIndex:v,isAdmin:A}=t,[w,E]=M.useState(!1),[S,T]=M.useState(""),[x]=M.useState((Ae=u==null?void 0:u.label)==null?void 0:Ae[a==null?void 0:a.type]),[_,I]=M.useState(0),[F,P]=M.useState(!1),[L,V]=M.useState(null),[z,O]=M.useState([]),U=()=>{var re,q,ie;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const W=[...g.repeatableFields],ue=It.findIndex(W,function(Ie){return Ie.uuid===(u==null?void 0:u.uuid)});ue>=0&&W[ue].fieldData?T(W[ue].fieldData):T("")}}else{const W=r;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((re=ue==null?void 0:ue.postData[0])==null?void 0:re.postValue)!==""&&((q=ue==null?void 0:ue.postData[0])!=null&&q.postValue)){T((ie=ue==null?void 0:ue.postData[0])==null?void 0:ie.postValue);break}}}P(!0)},te=()=>{const re=u;re.customColumnsForOptions=[...re.customColumnsForOptions,{customKey:"Column",uuid:tt()}],ye(re)},[ge,ee]=M.useState(!1),Q=(re,q)=>{var ie;return o.jsxs(o.Fragment,{children:[((ie=u==null?void 0:u.options)==null?void 0:ie.length)>1&&o.jsx(qt,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>de(re==null?void 0:re.uuid,q==null?void 0:q.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(qt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>be(),"aria-label":"Add Row",size:"small"})]})},he=(re,q)=>{var ie;return o.jsxs(o.Fragment,{children:[re==null?void 0:re.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((ie=u==null?void 0:u.customColumnsForOptions)==null?void 0:ie.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Z(re==null?void 0:re.uuid,q)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{V(re),ee(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,icon:"pi pi-plus",onClick:()=>te(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),de=(re,q)=>{var Ee,ve;const ie=(Ee=u==null?void 0:u.customColumnsForOptions)==null?void 0:Ee.length,W=[...(u==null?void 0:u.children)||[]];(ve=u==null?void 0:u.children)==null||ve.map(me=>{for(let Se=0;Se<ie;Se++)if(me[`${q}-${Se}`]!==void 0){const De=It.findIndex(W,function($){return $[`${q}-${Se}`]!==void 0});W.splice(De,1)}});for(let me=0;me<(W==null?void 0:W.length);me++){const Se=W[me],$=Object.keys(Se)[0].split("-");parseInt($[0])>q&&(W[me]={[`${parseInt($[0])-1}-${$[1]}`]:W[me][`${parseInt($[0])}-${$[1]}`]})}const ue=u==null?void 0:u.options.filter(function(me){return(me==null?void 0:me.uuid)!==re}),Ie={...u,children:[...W]};Ie.options=ue,ye(Ie)},Z=(re,q)=>{var ve,me;const ie=It.findIndex(u==null?void 0:u.customColumnsForOptions,Se=>Se.uuid===re),W=u==null?void 0:u.customColumnsForOptions.filter(function(Se,De){return De!==ie}),ue=(ve=u==null?void 0:u.options)==null?void 0:ve.length,Ie=[...(u==null?void 0:u.children)||[]];(me=u==null?void 0:u.children)==null||me.map(Se=>{for(let De=0;De<ue;De++)if(Se[`${De}-${q}`]!==void 0){const $=It.findIndex(Ie,function(oe){return oe[`${De}-${q}`]!==void 0});Ie.splice($,1)}});for(let Se=0;Se<(Ie==null?void 0:Ie.length);Se++){const De=Ie[Se],oe=Object.keys(De)[0].split("-");parseInt(oe[1])>q&&(Ie[Se]={[`${parseInt(oe[0])}-${parseInt(oe[1])-1}`]:Ie[Se][`${parseInt(oe[0])}-${oe[1]}`]})}const Ee={...u,children:[...Ie]};Ee.customColumnsForOptions=W,ye(Ee)};M.useEffect(()=>{F||U();const re=Jt.addListener("clearRepeatableFields",ue=>{ue===(g==null?void 0:g.uuid)&&(T(""),I(0),u.isValid=0,l(h,f,m,v,d,u))}),q=Jt.addListener("onSubmitUserForm",()=>{var ue;(ue=u==null?void 0:u.attributes)!=null&&ue.required&&(u.isValid=1)}),ie=Jt.addListener("OnInvalidFieldCatch",ue=>{u.uuid===(ue==null?void 0:ue.fieldId)?I(1):I(0)}),W=Jt.addListener("OnGetFieldValue",ue=>{var Ee;const Ie=(Ee=ue==null?void 0:ue.repeatableColumn)==null?void 0:Ee.filter(ve=>(ve==null?void 0:ve.fieldUuid)===(u==null?void 0:u.uuid));Ie!=null&&Ie.length});return()=>{q.remove(),ie.remove(),W.remove(),re.remove()}});const ne=re=>{E(re)},K=()=>{E(!1)},R=(re,q)=>{var W;const ie=r;if((ie==null?void 0:ie.length)>0)for(const ue of ie)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:{...(W=ue.postData[0])==null?void 0:W.postValue,[re]:q}})},fe=()=>{let re="";return c||(re=re+" field-form-builder"),s===i&&A===!0&&(re=re+" card"),re},be=()=>{const re=u;re.options=[...re.options,{uuid:tt(),custom_values:{}}],ye(re)},Te=(re,q)=>{V(Ie=>Ie===null?{customKey:q,uuid:""}:{...Ie,customKey:q});const ie=u.customColumnsForOptions,W=ie.findIndex(Ie=>Ie.uuid===re.uuid);ie[W]={...ie[W],customKey:q};const ue=u;ue.customColumnsForOptions=ie,ye(ue)},ye=re=>{l(h,f,m,v,d,re)};return o.jsxs(o.Fragment,{children:[o.jsx(za,{maximizable:!0,header:"Update column title",visible:ge,style:{width:"20vw"},footer:()=>o.jsx(qt,{text:!0,label:"Save",onClick:()=>ee(!1)}),onHide:()=>ee(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(Sn,{value:(L==null?void 0:L.customKey)||"",onChange:re=>Te(L,re.target.value)})})}),w&&o.jsx(Wi,{visibilty:w,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:e,className:fe(),children:s===i&&A===!0?o.jsx(ui,{headerTemplate:n,toggleable:!0,children:o.jsx(pj,{...t,field:u,isPreview:c,userSelectedLanguage:a,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:he,onSetValuetoPostData:R,setAllFields:re=>O(re),allFields:z,actionHeaderTemplate:Y,actionBodyTemplate:Q,addOption:be,isFocus:_,inputValue:S,handleFieldSettingsSidebar:ne,isAdmin:A})}):o.jsx(pj,{...t,field:u,isPreview:c,userSelectedLanguage:a,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:he,onSetValuetoPostData:R,setAllFields:re=>O(re),allFields:z,actionHeaderTemplate:Y,actionBodyTemplate:Q,addOption:be,isFocus:_,inputValue:S,handleFieldSettingsSidebar:ne,isAdmin:A})})]})},ESe=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:s}=t,a=l=>{const c={...s};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Os,{value:s[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>a(l.value),optionLabel:"label",placeholder:"Select"})})},mj=t=>{var T,x,_,I,F,P,L;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:s,customColumnRowBodyTemplate:a,setAllFields:l,allFields:c,actionHeaderTemplate:u,actionBodyTemplate:d,isFocus:f,inputValue:h,handleFieldSettingsSidebar:g,isAdmin:m,isRenderView:v}=t,[A,w]=M.useState(!1),E=()=>{w(!0)},S=()=>{w(!1)};return o.jsxs("div",{onMouseOver:E,onMouseOut:S,children:[!v&&!n&&A&&o.jsx(Xr,{handleFieldSettingsSidebar:g,...t}),o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:n?"col-12 ":"col-11 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(T=e==null?void 0:e.headerText)==null?void 0:T[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((x=e==null?void 0:e.attributes)==null?void 0:x.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(_=e==null?void 0:e.label)==null?void 0:_[r==null?void 0:r.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(I=e==null?void 0:e.toolTip)==null?void 0:I[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(oo,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(Ar,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:V=>a(V)}),e==null?void 0:e.customColumns.map((V,z)=>o.jsx(Ar,{header:s(V),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(O,U)=>o.jsx(ESe,{customColumn:V,e:O,indexes:U,customColumnIndex:z,setAllFields:l,allFields:c,...t})},V==null?void 0:V.uuid)),n===!1&&o.jsx(Ar,{frozen:!0,header:V=>u(V),body:V=>d(V),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((F=e==null?void 0:e.attributes)==null?void 0:F.required)&&o.jsx("small",{className:"error",children:f===1&&!h?(P=e==null?void 0:e.validationMesssage)==null?void 0:P.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(L=e==null?void 0:e.helperText)==null?void 0:L[r==null?void 0:r.type]})})]})]})}),m&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},ISe=(t,e)=>{var Se,De;const n=$=>{const oe=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",pe=`${$.className} justify-content-start`,ce=`${$.titleClassName} pl-1`;return o.jsxs("div",{className:pe,children:[o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:oe}),o.jsx(tn,{})]}),o.jsx("span",{className:ce,children:_})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:s}=vr(),{globalAlignment:a,isPreview:l,isAdmin:c}=Qt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=an(),{field:f,fieldIndex:h,sectionIndex:g,pageIndex:m,row:v,rowIndex:A,columnIndex:w}=t,[E,S]=M.useState(!1),[T,x]=M.useState(""),[_]=M.useState((Se=f==null?void 0:f.label)==null?void 0:Se[u==null?void 0:u.type]),[I,F]=M.useState(0),[P,L]=M.useState(!1),[V,z]=M.useState(null),[O,U]=M.useState(null),[te,ge]=M.useState({}),ee=()=>{var $,oe,pe;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const ce=[...v.repeatableFields],le=It.findIndex(ce,function(ae){return ae.uuid===(f==null?void 0:f.uuid)});le>=0&&ce[le].fieldData?x(ce[le].fieldData):x("")}}else{const ce=r;if(ce!=null&&ce.length){for(const le of ce)if(le.fieldId===t.field.uuid&&(($=le==null?void 0:le.postData[0])==null?void 0:$.postValue)!==""&&((oe=le==null?void 0:le.postData[0])!=null&&oe.postValue)){x((pe=le==null?void 0:le.postData[0])==null?void 0:pe.postValue);break}}}L(!0)},Q=()=>{const $=f;$.customColumns=[...$.customColumns,{customKey:"Column",uuid:tt(),options:[]}],ue($)},[he,Y]=M.useState(!1),[de,Z]=M.useState(!1),ne=$=>{var oe;return o.jsxs(o.Fragment,{children:[((oe=f==null?void 0:f.rows)==null?void 0:oe.length)>1&&o.jsx(qt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>be($==null?void 0:$.uuid),"aria-label":"Add Row"}),o.jsx(qt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>q(),"aria-label":"Add Row"})]})},K=$=>{var oe;return o.jsxs(o.Fragment,{children:[$==null?void 0:$.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((oe=f==null?void 0:f.customColumns)==null?void 0:oe.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Te($==null?void 0:$.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{z($),Y(!0)}})]})]})},R=()=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Q(),"aria-label":"Add Column"})}),fe=$=>o.jsxs(o.Fragment,{children:[$==null?void 0:$.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{U($),Z(!0)}})})]}),be=$=>{const oe=f==null?void 0:f.rows.filter(function(ce){return(ce==null?void 0:ce.uuid)!==$}),pe=f;pe.rows=oe,ue(pe)},Te=$=>{const oe=It.findIndex(f==null?void 0:f.customColumns,le=>le.uuid===$),pe=f==null?void 0:f.customColumns.filter(function(le,ae){return ae!==oe}),ce=f;ce.customColumns=pe,ue(ce)};M.useEffect(()=>{P||ee();const $=Jt.addListener("clearRepeatableFields",ce=>{ce===(v==null?void 0:v.uuid)&&(x(""),F(0),f.isValid=0,d(m,g,A,w,h,f))}),oe=Jt.addListener("OnInvalidFieldCatch",ce=>{f.uuid===(ce==null?void 0:ce.fieldId)?F(1):F(0)}),pe=Jt.addListener("OnGetFieldValue",ce=>{var ae;const le=(ae=ce==null?void 0:ce.repeatableColumn)==null?void 0:ae.filter(Oe=>(Oe==null?void 0:Oe.fieldUuid)===(f==null?void 0:f.uuid));le!=null&&le.length});return()=>{oe.remove(),pe.remove(),$.remove()}});const ye=$=>{S($)},Ae=()=>{S(!1)},re=()=>{let $="";return l||($=$+" field-form-builder"),s===i&&c===!0&&($=$+" card"),$},q=()=>{const $=f;$.rows=[...$.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],ue($)},ie=($,oe)=>{z(ae=>ae===null?{customKey:oe,uuid:""}:{...ae,customKey:oe});const pe=f.customColumns,ce=pe.findIndex(ae=>ae.uuid===$.uuid);pe[ce]={...pe[ce],customKey:oe};const le=f;le.customColumns=pe,ue(le)},W=($,oe)=>{U(ae=>ae===null?{uuid:"",rowHeading:oe}:{...ae,rowHeading:oe});const pe=f.rows,ce=pe.findIndex(ae=>ae.uuid===$.uuid);pe[ce]={...pe[ce],rowHeading:oe};const le=f;le.rows=pe,ue(le)},ue=$=>{d(m,g,A,w,h,$)};function Ie($){return $.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const Ee=($,oe,pe)=>{const ce=f.customColumns,le=ce.findIndex(Oe=>V&&Oe.uuid===V.uuid);ce[le].options[pe][oe]=$,ce[le].options[pe].value=Ie($);const ae=f;ae.customColumns=ce,ue(ae)},ve=()=>{const $=f.customColumns,oe=$.findIndex(ce=>V&&ce.uuid===V.uuid);$[oe].options.push({label:"",value:"",uuid:tt()});const pe=f;pe.customColumns=$,ue(pe)},me=$=>{const oe=f.customColumns,pe=oe.findIndex(le=>V&&le.uuid===V.uuid);if(pe===-1){console.error("Custom column not found");return}oe[pe].options=oe[pe].options.filter(le=>le.uuid!==$);const ce=f;ce.customColumns=oe,ue(ce)};return o.jsxs(o.Fragment,{children:[o.jsxs(za,{maximizable:!0,header:"Update column title",visible:he,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(qt,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ve()}),o.jsx(qt,{text:!0,label:"Save",onClick:()=>Y(!1)})]}),onHide:()=>Y(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(Sn,{value:(V==null?void 0:V.customKey)||"",onChange:$=>ie(V,$.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(V==null?void 0:V.options)&&((De=V==null?void 0:V.options)==null?void 0:De.length)>0&&(V==null?void 0:V.options.map(($,oe)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:oe+1}),o.jsx(Sn,{value:($==null?void 0:$.label)||"",className:"ml-2",onChange:pe=>Ee(pe.target.value,"label",oe)}),o.jsx(qt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>me($.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${oe}`)))]}),o.jsx(za,{maximizable:!0,header:"Update Row Title",visible:de,style:{width:"20vw"},footer:()=>o.jsx(qt,{text:!0,label:"Save",onClick:()=>Z(!1)}),onHide:()=>Z(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(Sn,{value:(O==null?void 0:O.rowHeading)||"",onChange:$=>W(O,$.target.value)})})}),o.jsx(Wi,{visibilty:E,closeSettingFieldSidebar:Ae,...t}),o.jsx("div",{dir:a,className:re(),children:s===i&&c===!0?o.jsx(ui,{headerTemplate:n,toggleable:!0,children:o.jsx(mj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:fe,setAllFields:ge,allFields:te,actionHeaderTemplate:R,actionBodyTemplate:ne,isFocus:I,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:c})}):o.jsx(mj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:fe,setAllFields:ge,allFields:te,actionHeaderTemplate:R,actionBodyTemplate:ne,isFocus:I,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:c})})]})},_Se=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,s=a=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=a,r(l)};return o.jsx("div",{children:o.jsx(Sn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:a=>s(a.target.value)})})},vj=t=>{var g,m,v,A,w,E,S;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:s,setAllFields:a,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,isAdmin:h}=t;return o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card p-fluid py-6 px-4":"card py-3 px-4"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((m=e==null?void 0:e.attributes)==null?void 0:m.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(v=e==null?void 0:e.label)==null?void 0:v[r==null?void 0:r.type]}):o.jsx(as,{path:"",...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(oo,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,x)=>o.jsx(Ar,{header:s(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(_,I)=>o.jsx(_Se,{customColumn:T,e:_,indexes:I,customColumnIndex:x,setAllFields:a,allFields:l,...t})},T==null?void 0:T.uuid)),n===!1&&o.jsx(Ar,{frozen:!0,header:T=>c(T),body:T=>u(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(E=e==null?void 0:e.validationMesssage)==null?void 0:E.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[r==null?void 0:r.type]})})]})]})}),h&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})},DSe=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,s]=M.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(za,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(qt,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(Sn,{value:i||"",onChange:a=>s(a.target.value)})})})},NSe=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=f4({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:s=>{const a={};return s.columnValue||(a.columnValue="Column value is required"),a},onSubmit:s=>{e(!1),r(n,s.columnValue)}});return o.jsx(za,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(qt,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(Sn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},OSe=t=>{var Ee;const e=ve=>{const me=ve.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${ve.className} justify-content-start`,De=`${ve.titleClassName} pl-1`;return o.jsxs("div",{className:Se,children:[o.jsxs("button",{className:ve.togglerClassName,onClick:ve.onTogglerClick,children:[o.jsx("span",{className:me}),o.jsx(tn,{})]}),o.jsx("span",{className:De,children:x})]})},{TASK_PUBLISHED:n,task_status:r}=vr(),{userSelectedLanguage:i,fieldSettingUpdate:s}=an(),{globalAlignment:a,isPreview:l,isAdmin:c,isRenderView:u}=Qt(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:m,rowIndex:v,columnIndex:A}=t,[w,E]=M.useState(!1),[S,T]=M.useState(""),[x]=M.useState((Ee=d==null?void 0:d.label)==null?void 0:Ee[i==null?void 0:i.type]),[_,I]=M.useState(0),[F,P]=M.useState(null),[L,V]=M.useState(null),[z,O]=M.useState((d==null?void 0:d.allFields)||{}),[U,te]=M.useState(!1),ge=()=>{const ve=d;ve.customColumns=[...ve.customColumns,{customKey:"Column",uuid:tt(),options:[]}],W(ve)},[ee,Q]=M.useState(!1),[he,Y]=M.useState(!1),de=M.useCallback(It.debounce(ve=>{const me=d;me.allFields={...ve},W(me)},1e3),[]);M.useEffect(()=>{de(z)},[z,de]);const Z=ve=>{var me;return o.jsxs(o.Fragment,{children:[((me=d==null?void 0:d.options)==null?void 0:me.length)>1&&o.jsx(qt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>fe(ve==null?void 0:ve.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(qt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>re(),"aria-label":"Add Row",size:"small"})]})},ne=ve=>{var me;return o.jsxs(o.Fragment,{children:[ve==null?void 0:ve.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((me=d==null?void 0:d.customColumns)==null?void 0:me.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>be(ve==null?void 0:ve.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{P(ve),Q(!0)}})]})]})},K=()=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ge(),"aria-label":"Add Column"})}),R=ve=>o.jsxs(o.Fragment,{children:[ve==null?void 0:ve.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{V(ve),Y(!0)}})})]}),fe=ve=>{const me=d==null?void 0:d.rows.filter(function(De){return(De==null?void 0:De.uuid)!==ve}),Se=d;Se.rows=me,W(Se)},be=ve=>{const me=It.findIndex(d==null?void 0:d.customColumns,$=>$.uuid===ve),Se=d==null?void 0:d.customColumns.filter(function($,oe){return oe!==me}),De=d;De.customColumns=Se,W(De)},Te=ve=>{E(ve)},ye=()=>{E(!1)},Ae=()=>{let ve="";return l||(ve=ve+" field-form-builder"),r===n&&c===!0&&(ve=ve+" card"),ve},re=()=>{const ve=d;ve.rows=[...ve.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],W(ve)},q=(ve,me)=>{P(oe=>oe===null?{customKey:me,uuid:""}:{...oe,customKey:me});const Se=d.customColumns,De=Se.findIndex(oe=>oe.uuid===ve.uuid);Se[De]={...Se[De],customKey:me};const $=d;$.customColumns=Se,W($)},ie=(ve,me)=>{V(oe=>oe===null?{uuid:"",rowHeading:me}:{...oe,rowHeading:me});const Se=d.rows,De=Se.findIndex(oe=>oe.uuid===ve.uuid);Se[De]={...Se[De],rowHeading:me};const $=d;$.rows=Se,W($)},W=ve=>{s(g,h,v,A,f,ve)},ue=()=>{te(!0)},Ie=()=>{te(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(za,{maximizable:!0,header:"Update column title",visible:ee,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,label:"Save",onClick:()=>Q(!1)})}),onHide:()=>Q(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(Sn,{value:(F==null?void 0:F.customKey)||"",onChange:ve=>q(F,ve.target.value)})})}),he&&o.jsx(DSe,{showAddNewRow:he,setShowAddNewRow:Y,customRowEditModalData:L,onHandleChangeCustomRowSetting:ie}),ee&&o.jsx(NSe,{showAddNewColumn:ee,setShowAddNewColumn:Q,customColumnEditModalData:F,onHandleChangeCustomColumnSetting:q}),o.jsx(Wi,{visibilty:w,closeSettingFieldSidebar:ye,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ue,onMouseOut:Ie,children:[!u&&!l&&U&&o.jsx(Xr,{handleFieldSettingsSidebar:Te,...t}),o.jsx("div",{dir:a,className:Ae(),children:r===n&&c===!0?o.jsx(ui,{headerTemplate:e,toggleable:!0,children:o.jsx(vj,{...t,field:d,isPreview:l,userSelectedLanguage:i,fieldIndex:f,customColumnHeaderTemplate:ne,customColumnRowBodyTemplate:R,setAllFields:O,allFields:z,actionHeaderTemplate:K,actionBodyTemplate:Z,isFocus:_,inputValue:S,handleFieldSettingsSidebar:Te,isAdmin:c})}):o.jsx(vj,{isAdmin:!1,...t,field:d,isPreview:l,userSelectedLanguage:i,fieldIndex:f,customColumnHeaderTemplate:ne,customColumnRowBodyTemplate:R,setAllFields:O,allFields:z,actionHeaderTemplate:K,actionBodyTemplate:Z,isFocus:_,inputValue:S,handleFieldSettingsSidebar:Te})})]})})]})},FSe=t=>{var re,q,ie,W,ue,Ie,Ee,ve,me,Se,De;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:s}=vr(),[a,l]=M.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:g,page:m,rowIndex:v,columnIndex:A,path:w,update:E,value:S,isDisabled:T}=t,{isRenderView:x,isAdmin:_,isPreview:I}=Qt(),{userSelectedLanguage:F}=an(),[P,L]=M.useState(!1),[V,z]=M.useState(""),[O,U]=M.useState(0),[te,ge]=M.useState(!1),[ee,Q]=M.useState(!1),he=()=>{Q(!0)},Y=()=>{Q(!1)},de=$=>{L($)},Z=()=>{L(!1)};M.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const ne=()=>{var oe,pe,ce,le;let $=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const ae=[...d.repeatableFields],Oe=It.findIndex(ae,function(Ne){return Ne.uuid===(c==null?void 0:c.uuid)});Oe>=0&&ae[Oe].fieldData?($=ae[Oe].fieldData,z(ae[Oe].fieldData)):(c.isValid=0,z(""))}}else{const ae=i,Oe=It.cloneDeep(e);if(ae!=null&&ae.length){for(const Ne of ae)if(Ne.fieldId===t.field.uuid&&((oe=Ne==null?void 0:Ne.postData)!=null&&oe.length)){$=(pe=Ne==null?void 0:Ne.postData[0])==null?void 0:pe.postValue,z((ce=Ne==null?void 0:Ne.postData[0])==null?void 0:ce.postValue),Oe[c==null?void 0:c.uuid]=(le=Ne==null?void 0:Ne.postData[0])==null?void 0:le.postValue;const Ke=Object.keys(Oe).length;r(Ke);break}}}z($),setTimeout(()=>{ge(!0)},2e3)};M.useEffect(()=>{!te&&(i==null?void 0:i.length)>0&&ne();const $=Jt.addListener("clearRepeatableFields",ce=>{ce===(d==null?void 0:d.uuid)&&(z(""),U(0),c.isValid=1)}),oe=Jt.addListener("onSubmitUserForm",()=>{var ce;(ce=c==null?void 0:c.attributes)!=null&&ce.required?V?c.isValid=1:c.isValid=0:c.isValid=1}),pe=Jt.addListener("OnInvalidFieldCatch",ce=>{c.uuid===(ce==null?void 0:ce.fieldId)?U(1):U(0)});return()=>{oe.remove(),pe.remove(),$.remove()}});const K=($,oe)=>{var pe;if(i){const ce=[...i],le=It.findIndex(ce,function(Oe){return Oe.rowId===(d==null?void 0:d.uuid)});let ae=(pe=i[le])==null?void 0:pe.repeatableFields;ae={...ae,[$==null?void 0:$.uuid]:oe},ce[le]={...ce[le],repeatableFields:ae},s(ce)}z(oe),oe?$.isValid=1:$.isValid=0},R=$=>{var oe;z($.target.value),d!=null&&d.rowIsRepeatable?K(c,(oe=$==null?void 0:$.target)==null?void 0:oe.value):ye($.target.value)},fe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${F.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",be=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${F.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",Te=()=>{var $,oe,pe;if((($=c==null?void 0:c.fieldType)==null?void 0:$.type)==="radio"){const ce=[];return a.map((le,ae)=>{var Ne,Ke,dt,pt;const Oe=V;ce.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{R({value:le,target:{value:le}})},style:(Oe==null?void 0:Oe.uuid)===(le==null?void 0:le.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(ss,{onFocus:()=>U(1),inputId:`radio-option-${ae}-${le==null?void 0:le.uuid}-${I?"preview":"builder-radio"}`,onChange:ht=>{R(ht)},value:le,name:`radio-option-${ae}-${le==null?void 0:le.uuid}-${I?"preview":"builder"}`,checked:(Oe==null?void 0:Oe.uuid)===(le==null?void 0:le.uuid),disabled:T}),((Ne=le==null?void 0:le.hyperlinkText)==null?void 0:Ne[F==null?void 0:F.type])===""?o.jsx("label",{htmlFor:`radio-option-${ae}-${le==null?void 0:le.uuid}-${I?"preview":"builder"}`,children:(Ke=le==null?void 0:le.optionText)==null?void 0:Ke[F==null?void 0:F.type]}):o.jsx("label",{children:o.jsx("a",{href:(dt=le==null?void 0:le.hyperlinkText)==null?void 0:dt[F==null?void 0:F.type],target:"_blank",rel:"noreferrer",children:(pt=le==null?void 0:le.optionText)==null?void 0:pt[F==null?void 0:F.type]})})]},ae))}),ce}if(((oe=c==null?void 0:c.fieldType)==null?void 0:oe.type)==="dropdown")return o.jsx(Os,{onFocus:()=>U(1),onChange:ce=>{d!=null&&d.rowIsRepeatable?K(c,ce.target.value):ye(ce.target.value)},options:a,optionLabel:be(),optionValue:fe(),value:V,placeholder:(pe=c==null?void 0:c.placeholder)==null?void 0:pe[F==null?void 0:F.type],disabled:T})},ye=$=>{var ce,le;z($.target.value);const oe=i,pe=It.cloneDeep(e);if(oe!==null){if((ce=$==null?void 0:$.target)!=null&&ce.value){if(pe[c==null?void 0:c.uuid]=(le=$==null?void 0:$.target)==null?void 0:le.value,(oe==null?void 0:oe.length)>0)for(const ae of oe)ae.fieldId===t.field.uuid&&(ae.postData[0]={postValue:$.target.value})}else if(delete pe[c==null?void 0:c.uuid],(oe==null?void 0:oe.length)>0)for(const ae of oe)ae.fieldId===t.field.uuid&&(ae.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(pe);const ae=Object.keys(pe).length;r(ae)}},Ae=o.jsxs("div",{onMouseOver:he,onMouseOut:Y,children:[!x&&!I&&ee&&o.jsx(Xr,{handleFieldSettingsSidebar:de,...t}),o.jsx("div",{className:`field-${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(re=c==null?void 0:c.headerText)==null?void 0:re[F==null?void 0:F.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(ds,{sectionIndex:h,fieldIndex:u,field:c,update:E,value:S}),((q=c==null?void 0:c.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",I?o.jsx(o.Fragment,{children:(ie=c==null?void 0:c.label)==null?void 0:ie[F==null?void 0:F.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Mi,{message:(W=c==null?void 0:c.toolTip)==null?void 0:W[F==null?void 0:F.type],position:"right"})}):""})]}),Te(),o.jsx("div",{children:((ue=c==null?void 0:c.attributes)==null?void 0:ue.required)&&o.jsx("small",{className:"error",children:O===1&&!V?(Ie=c==null?void 0:c.validationMesssage)==null?void 0:Ie.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ee=c==null?void 0:c.helperText)==null?void 0:Ee[F==null?void 0:F.type]})}),((ve=c==null?void 0:c.inlineConditionalRules)==null?void 0:ve.rules.length)>0&&I===!1&&o.jsx("p",{children:"Inline conditional rules"}),te===!0&&((Se=(me=c==null?void 0:c.inlineConditionalRules)==null?void 0:me.rules)==null?void 0:Se.length)>0&&((De=c==null?void 0:c.inlineConditionalRules)==null?void 0:De.rules.map(($,oe)=>{const pe=V;return I===!0?o.jsx("div",{children:$==null?void 0:$.conditions.map((ce,le)=>o.jsx(M.Fragment,{children:o.jsx(u0,{isConditionTrue:(pe==null?void 0:pe.value)==ce.value||!I,inputValue:V,condition:ce,ruleIndex:oe,conditionIndex:le,field:c,section:g,page:m,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:w,...t})},`select-rule-${oe}-`+le))},`rule-${oe}`):o.jsx(ui,{className:"mt-4",header:`Rule ${oe+1}`,children:o.jsx("div",{children:$==null?void 0:$.conditions.map((ce,le)=>o.jsx(M.Fragment,{children:o.jsx(u0,{isConditionTrue:(pe==null?void 0:pe.value)===ce.value||!I,inputValue:V,condition:ce,ruleIndex:oe,conditionIndex:le,isPreview:I,field:c,section:g,page:m,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:w,...t})},`select-rule-${oe}-`+le))},`rule-${oe}`)},oe)}))]}),_&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Wi,{visibilty:P,closeSettingFieldSidebar:Z,...t},c==null?void 0:c.uuid),o.jsx(Si,{...t,fieldWrap:Ae})]})},kSe=t=>{var te,ge,ee,Q;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=vr(),{field:s,row:a,isDisabled:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=Qt(),{userSelectedLanguage:f}=an(),[h,g]=M.useState(!1),[m,v]=M.useState(""),[A,w]=M.useState(0),[E,S]=M.useState(!1),[T,x]=M.useState(!1),_=()=>{x(!0)},I=()=>{x(!1)},F=he=>{g(he)},P=()=>{g(!1)},L=()=>{var Y,de,Z,ne;let he=null;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const K=[...a.repeatableFields],R=It.findIndex(K,function(fe){return fe.uuid===(s==null?void 0:s.uuid)});R>=0&&K[R].fieldData?(he=K[R].fieldData,v(K[R].fieldData)):(s.isValid=0,v(""))}}else{const K=i,R=It.cloneDeep(e);if(K!=null&&K.length){for(const fe of K)if(fe.fieldId===t.field.uuid&&((Y=fe==null?void 0:fe.postData)!=null&&Y.length)){he=(de=fe==null?void 0:fe.postData[0])==null?void 0:de.postValue,v((Z=fe==null?void 0:fe.postData[0])==null?void 0:Z.postValue),R[s==null?void 0:s.uuid]=(ne=fe==null?void 0:fe.postData[0])==null?void 0:ne.postValue;const be=Object.keys(R).length;r(be);break}}}v(he),setTimeout(()=>{S(!0)},2e3)};M.useEffect(()=>{E||L();const he=Jt.addListener("clearRepeatableFields",Z=>{Z===(a==null?void 0:a.uuid)&&(v(""),w(0),s.isValid=1)}),Y=Jt.addListener("onSubmitUserForm",()=>{var Z;if((Z=s==null?void 0:s.attributes)!=null&&Z.required){const ne=m;ne!=null&&ne[s.uuid]?s.isValid=1:s.isValid=0}else s.isValid=1}),de=Jt.addListener("OnInvalidFieldCatch",Z=>{s.uuid===(Z==null?void 0:Z.fieldId)?w(1):w(0)});return()=>{Y.remove(),de.remove(),he.remove()}});const V=(he,Y,de,Z,ne)=>Z==null?void 0:Z.map(K=>{var R,fe;return{...K,children:K!=null&&K.children&&((R=K==null?void 0:K.children)==null?void 0:R.length)>0?[...((fe=K==null?void 0:K.children)==null?void 0:fe.map(be=>Y===(K==null?void 0:K.uuid)||ne===!0?(de!=null&&de[be==null?void 0:be.uuid]&&delete de[be==null?void 0:be.uuid],{...be,options:V(he,Y,de,(be==null?void 0:be.options)||[],!0)}):{...be,options:V(he,Y,de,(be==null?void 0:be.options)||[],!1)}))||[]]:[]}}),z=(he,Y)=>{const de={...m};V(he,Y,de,s==null?void 0:s.options,!1),de[he]=Y,v(de),a!=null&&a.rowIsRepeatable||O(de)},O=he=>{const Y=i,de=It.cloneDeep(e);if(Y!==null){if(he){if(de[s==null?void 0:s.uuid]=he,(Y==null?void 0:Y.length)>0)for(const Z of Y)Z.fieldId===t.field.uuid&&(Z.postData[0]={postValue:he})}else if(delete de[s==null?void 0:s.uuid],(Y==null?void 0:Y.length)>0)for(const Z of Y)Z.fieldId===t.field.uuid&&(Z.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){n(de);const Z=Object.keys(de).length;r(Z)}},U=o.jsxs("div",{onMouseOver:_,onMouseOut:I,children:[!u&&!c&&T&&o.jsx(Xr,{handleFieldSettingsSidebar:F,...t}),o.jsx("div",{className:`field-${(s==null?void 0:s.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(s==null?void 0:s.showHeaderText)&&o.jsx("h6",{children:(te=s==null?void 0:s.headerText)==null?void 0:te[f==null?void 0:f.type]}),o.jsx(vb,{...t,isDisabled:l,isFirst:!0,isPreview:c,schema:s,field:s,value:m,update:(he,Y)=>{z(he,Y)}}),o.jsx("div",{children:((ge=s==null?void 0:s.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:A===1&&!m?(ee=s==null?void 0:s.validationMesssage)==null?void 0:ee.english:""})}),o.jsx("div",{children:(s==null?void 0:s.showHelperText)&&o.jsx("small",{children:(Q=s==null?void 0:s.helperText)==null?void 0:Q[f==null?void 0:f.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Wi,{visibilty:h,closeSettingFieldSidebar:P,...t},s==null?void 0:s.uuid),o.jsx(Si,{...t,fieldWrap:U})]})},PSe=t=>{var R,fe,be,Te,ye,Ae,re,q,ie,W;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:s,rowIndex:a,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Qt(),{taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:m,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:E}=vr(),[S,T]=M.useState(!1),{userSelectedLanguage:x,fieldSettingUpdate:_}=an(),[I,F]=M.useState(!1),[P,L]=M.useState(0),[V,z]=M.useState(),[O,U]=M.useState(!1),te=()=>{U(!0)},ge=()=>{U(!1)},ee=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],Q=ue=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:ue.icon})}),he=()=>{var ue,Ie,Ee;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const ve=[...s.repeatableFields],me=It.findIndex(ve,function(Se){return Se.uuid===(e==null?void 0:e.uuid)});me>=0&&ve[me].fieldData?z(ve[me].fieldData):z("")}}else{const ve=A;if(ve!=null&&ve.length){for(const me of ve)if(me.fieldId===t.field.uuid&&((ue=me==null?void 0:me.postData[0])==null?void 0:ue.postValue)!==""&&((Ie=me==null?void 0:me.postData[0])!=null&&Ie.postValue)){z((Ee=me==null?void 0:me.postData[0])==null?void 0:Ee.postValue);break}}}F(!0)};M.useEffect(()=>{I||he();const ue=Jt.addListener("clearRepeatableFields",me=>{me===(s==null?void 0:s.uuid)&&(z(""),L(0),e.isValid=0,_(i,r,a,l,n,e))}),Ie=Jt.addListener("onSubmitUserForm",()=>{var me;(me=e==null?void 0:e.attributes)!=null&&me.required?V?e.isValid=1:e.isValid=0:e.isValid=1}),Ee=Jt.addListener("OnInvalidFieldCatch",me=>{e.uuid===(me==null?void 0:me.fieldId)?L(1):L(0)}),ve=Jt.addListener("OnGetFieldValue",me=>{var De;const Se=(De=me==null?void 0:me.repeatableColumn)==null?void 0:De.filter(($,oe)=>($==null?void 0:$.fieldUuid)===(e==null?void 0:e.uuid));Se!=null&&Se.length});return()=>{Ie.remove(),Ee.remove(),ve.remove(),ue.remove()}});const Y=ue=>{z(ue.value);const Ie=A,Ee=It.cloneDeep(h);if(Ie!==null){if(ue!=null&&ue.value){if(Ee[e==null?void 0:e.uuid]=ue==null?void 0:ue.value,(Ie==null?void 0:Ie.length)>0)for(const ve of Ie)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:ue.value})}else if(delete Ee[e==null?void 0:e.uuid],(Ie==null?void 0:Ie.length)>0)for(const ve of Ie)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){g(Ee);const ve=Object.keys(Ee).length;m(ve)}},de=(ue,Ie)=>{var Ee;if(A){const ve=[...A],me=It.findIndex(ve,function(De){return De.rowId===(s==null?void 0:s.uuid)});let Se=(Ee=A[me])==null?void 0:Ee.repeatableFields;Se={...Se,[ue==null?void 0:ue.uuid]:Ie},ve[me]={...ve[me],repeatableFields:Se},v(ve)}z(Ie),Ie!==""?ue.isValid=1:ue.isValid=0},Z=ue=>{T(ue)},ne=()=>{T(!1)},K=o.jsxs("div",{onMouseOver:te,onMouseOut:ge,children:[!u&&!f&&O&&o.jsx(Xr,{handleFieldSettingsSidebar:Z,...t}),o.jsx("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[x==null?void 0:x.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[x==null?void 0:x.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ae=(ye=e==null?void 0:e.icon)==null?void 0:ye.properties)==null?void 0:Ae.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(Kp,{value:V,onChange:ue=>{z(ue.value),s!=null&&s.rowIsRepeatable?de(e,ue.value):Y(ue)},itemTemplate:Q,optionLabel:"value",onFocus:()=>L(1),options:ee,readOnly:c,className:P===1&&((re=e==null?void 0:e.attributes)!=null&&re.required)?V?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:P===1&&!V?(ie=e==null?void 0:e.validationMesssage)==null?void 0:ie.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(W=e==null?void 0:e.helperText)==null?void 0:W[x==null?void 0:x.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Wi,{visibilty:S,closeSettingFieldSidebar:ne,...t}),o.jsx(Si,{...t,fieldWrap:K})]})},MSe=t=>{var Z,ne,K,R,fe,be,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:s}=vr(),{userSelectedLanguage:a,fieldSettingUpdate:l}=an(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:m}=t,{isRenderView:v,isAdmin:A,isPreview:w}=Qt(),[E,S]=M.useState(!1),[T,x]=M.useState(""),[_,I]=M.useState(0),[F,P]=M.useState(!1),[L,V]=M.useState(!1),z=()=>{V(!0)},O=()=>{V(!1)},U=()=>{var ye,Ae,re;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const q=[...h.repeatableFields],ie=It.findIndex(q,function(W){return W.uuid===(c==null?void 0:c.uuid)});ie>=0&&q[ie].fieldData?x(q[ie].fieldData):x("")}}else{const q=s;if(q!=null&&q.length){for(const ie of q)if(ie.fieldId===t.field.uuid&&((ye=ie==null?void 0:ie.postData[0])==null?void 0:ye.postValue)!==""&&((Ae=ie==null?void 0:ie.postData[0])!=null&&Ae.postValue)){x((re=ie==null?void 0:ie.postData[0])==null?void 0:re.postValue);break}}}P(!0)};M.useEffect(()=>{F||U();const ye=Jt.addListener("clearRepeatableFields",ie=>{ie===(h==null?void 0:h.uuid)&&(x(""),I(0),c.isValid=0,l(f,d,g,m,u,c))}),Ae=Jt.addListener("onSubmitUserForm",()=>{var ie;(ie=c==null?void 0:c.attributes)!=null&&ie.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),re=Jt.addListener("OnInvalidFieldCatch",ie=>{c.uuid===(ie==null?void 0:ie.fieldId)?I(1):I(0)}),q=Jt.addListener("OnGetFieldValue",ie=>{var ue;const W=(ue=ie==null?void 0:ie.repeatableColumn)==null?void 0:ue.filter(Ie=>(Ie==null?void 0:Ie.fieldUuid)===(c==null?void 0:c.uuid));W!=null&&W.length});return()=>{Ae.remove(),re.remove(),q.remove(),ye.remove()}});const te=ye=>{S(ye)},ge=()=>{S(!1)},ee=ye=>{var q,ie;x(ye.target.value);const Ae=s,re=It.cloneDeep(e);if(Ae!==null){if((q=ye==null?void 0:ye.target)!=null&&q.value){if(re[c==null?void 0:c.uuid]=(ie=ye==null?void 0:ye.target)==null?void 0:ie.value,(Ae==null?void 0:Ae.length)>0)for(const W of Ae)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:ye.target.value})}else if(delete re[c==null?void 0:c.uuid],(Ae==null?void 0:Ae.length)>0)for(const W of Ae)W.fieldId===t.field.uuid&&(W.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(re);const W=Object.keys(re).length;r(W)}},Q=(ye,Ae,re,q)=>{var ie;if(s){const W=[...s],ue=It.findIndex(W,function(Ee){return Ee.rowId===(h==null?void 0:h.uuid)});let Ie=(ie=s[ue])==null?void 0:ie.repeatableFields;Ie={...Ie,[re==null?void 0:re.uuid]:q},W[ue]={...W[ue],repeatableFields:Ie},i(W)}x(q),q!==""?re.isValid=1:re.isValid=0},he=5,Y=()=>{const ye=[],Ae=[QE,WE,JE,RE,GE],re=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let q=0;q<he;q++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:ie=>{h!=null&&h.rowIsRepeatable?Q(f,d,c,ie.target.value):ee(ie)},checked:parseInt(T)===q,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:q}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:Ae[q]})}),o.jsx("div",{children:re[q]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${q} ${parseInt(T)===q?"scale-selected":""}`));return ye},de=o.jsxs("div",{onMouseOver:z,onMouseOut:O,children:[!v&&!w&&L&&o.jsx(Xr,{handleFieldSettingsSidebar:te,...t}),o.jsxs("div",{className:`field ${w?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(Z=c==null?void 0:c.headerText)==null?void 0:Z[a==null?void 0:a.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((ne=c==null?void 0:c.attributes)==null?void 0:ne.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",w?o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[a==null?void 0:a.type]}):o.jsx(as,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(R=c==null?void 0:c.toolTip)==null?void 0:R[a==null?void 0:a.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:Y()})}),o.jsx("div",{children:((fe=c==null?void 0:c.attributes)==null?void 0:fe.required)&&o.jsx("small",{className:"error",children:_===1&&!T?(be=c==null?void 0:c.validationMesssage)==null?void 0:be.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Te=c==null?void 0:c.helperText)==null?void 0:Te[a==null?void 0:a.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Wi,{visibilty:E,closeSettingFieldSidebar:ge,...t}),o.jsx(Si,{...t,fieldWrap:de})]})},LSe=t=>{var U,te,ge,ee,Q,he,Y,de,Z,ne,K;const{userTaskSubmitFormData:e}=vr(),{userSelectedLanguage:n,fieldSettingUpdate:r}=an(),{isPreview:i,isAdmin:s,isRenderView:a}=Qt(),{field:l,fieldIndex:c,sectionIndex:u,pageIndex:d,row:f,rowIndex:h,columnIndex:g}=t,[m,v]=M.useState(!1),[A,w]=M.useState(""),[E,S]=M.useState(0),[T,x]=M.useState(!1),[_,I]=M.useState(!1),F=()=>{I(!0)},P=()=>{I(!1)},L=()=>{var R,fe,be;if(f!=null&&f.rowIsRepeatable){if(f!=null&&f.repeatableFields){const Te=[...f.repeatableFields],ye=It.findIndex(Te,function(Ae){return Ae.uuid===(l==null?void 0:l.uuid)});ye>=0&&Te[ye].fieldData?w(Te[ye].fieldData):w("")}}else{const Te=e;if(Te!=null&&Te.length){for(const ye of Te)if(ye.fieldId===t.field.uuid&&((R=ye==null?void 0:ye.postData[0])==null?void 0:R.postValue)!==""&&((fe=ye==null?void 0:ye.postData[0])!=null&&fe.postValue)){w((be=ye==null?void 0:ye.postData[0])==null?void 0:be.postValue);break}}}x(!0)};M.useEffect(()=>{T||L();const R=Jt.addListener("clearRepeatableFields",ye=>{ye===(f==null?void 0:f.uuid)&&(w(""),S(0),l.isValid=0,r(d,u,h,g,c,l))}),fe=Jt.addListener("onSubmitUserForm",()=>{var ye,Ae;(ye=l==null?void 0:l.attributes)!=null&&ye.required?A&&(A==null?void 0:A.length)<((Ae=l==null?void 0:l.attributes)==null?void 0:Ae.minLength)?l.isValid=1:l.isValid=0:l.isValid=1}),be=Jt.addListener("OnInvalidFieldCatch",ye=>{l.uuid===(ye==null?void 0:ye.fieldId)?S(1):S(0)}),Te=Jt.addListener("OnGetFieldValue",ye=>{var re;const Ae=(re=ye==null?void 0:ye.repeatableColumn)==null?void 0:re.filter(q=>(q==null?void 0:q.fieldUuid)===(l==null?void 0:l.uuid));Ae!=null&&Ae.length});return()=>{fe.remove(),be.remove(),Te.remove(),R.remove()}});const V=R=>{v(R)},z=()=>{v(!1)},O=o.jsxs("div",{onMouseOver:F,onMouseOut:P,children:[!a&&!i&&_&&o.jsx(Xr,{handleFieldSettingsSidebar:V,...t}),o.jsxs("div",{className:`field ${i?" ":" builder-element-wrapper "}${(l==null?void 0:l.isFluid)===!0?" card p-fluid ":"card"} ${a?" ":" py-6 px-4 "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(l==null?void 0:l.showHeaderText)&&o.jsx("h6",{children:(U=l==null?void 0:l.headerText)==null?void 0:U[n==null?void 0:n.type]}),(l==null?void 0:l.showLabel)&&o.jsxs("label",{htmlFor:c,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ds,{...t}),((te=l==null?void 0:l.attributes)==null?void 0:te.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",i?o.jsx(o.Fragment,{children:(ge=l==null?void 0:l.label)==null?void 0:ge[n==null?void 0:n.type]}):o.jsx(as,{...t}),(l==null?void 0:l.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(ee=l==null?void 0:l.toolTip)==null?void 0:ee[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(l==null?void 0:l.iconAlignment),children:(l==null?void 0:l.showIcon)&&o.jsx("i",{className:"pi pi-"+((he=(Q=l==null?void 0:l.icon)==null?void 0:Q.properties)==null?void 0:he.name)})}),o.jsx("div",{children:((Y=l==null?void 0:l.attributes)==null?void 0:Y.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:E===1&&!A?(de=l==null?void 0:l.validationMesssage)==null?void 0:de.english:""}),o.jsx("small",{className:"error",children:E===1&&(A==null?void 0:A.length)<((Z=l==null?void 0:l.attributes)==null?void 0:Z.minLength)?`Mini length ${(ne=l==null?void 0:l.attributes)==null?void 0:ne.minLength}`:""})]})}),o.jsx("div",{children:(l==null?void 0:l.showHelperText)&&o.jsx("small",{children:(K=l==null?void 0:l.helperText)==null?void 0:K[n==null?void 0:n.type]})})]})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Wi,{visibilty:m,closeSettingFieldSidebar:z,...t}),o.jsx(Si,{...t,fieldWrap:O})]})},BSe=t=>{var z,O,U,te,ge,ee,Q;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:s,pageIndex:a,ref:l}=t,{isPreview:c}=Qt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=an(),{userTaskSubmitFormData:f}=vr(),[h,g]=M.useState(!1),[m,v]=M.useState(""),[A,w]=M.useState(0),[E,S]=M.useState(!1),[T,x]=M.useState(!1),_=()=>{x(!0)},I=()=>{x(!1)},F=()=>{var Y;const he=f;if(he.length){for(const de of he)if(de.fieldId===t.field.uuid){v((Y=de==null?void 0:de.postData[0])==null?void 0:Y.postValue),S(!0);break}}};M.useEffect(()=>{E||F();const he=Jt.addListener("onSubmitUserForm",()=>{var de;(de=e==null?void 0:e.attributes)!=null&&de.required&&(m?e.isValid=1:e.isValid=0,d(a,i,s,r,n,e))}),Y=Jt.addListener("OnInvalidFieldCatch",de=>{e.uuid===(de==null?void 0:de.fieldId)?w(1):w(0)});return()=>{he.remove(),Y.remove()}});const P=he=>{g(he)},L=()=>{g(!1)},V=o.jsxs("div",{onMouseOver:_,onMouseOut:I,children:[!c&&T&&o.jsx(Xr,{handleFieldSettingsSidebar:P,...t}),o.jsx("div",{className:c?"":"field-form-builder",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-12":"col-11",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(z=e==null?void 0:e.headerText)==null?void 0:z[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[((O=e==null?void 0:e.attributes)==null?void 0:O.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(U=e==null?void 0:e.label)==null?void 0:U[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(te=e==null?void 0:e.toolTip)==null?void 0:te[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("small",{className:"error",children:A===1&&!m?(ee=e==null?void 0:e.validationMesssage)==null?void 0:ee.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(Q=e==null?void 0:e.helperText)==null?void 0:Q[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h===!0&&o.jsx(Wi,{visibilty:h,closeSettingFieldSidebar:L,...t}),o.jsx(Si,{...t,fieldWrap:V})]})},eu=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isPreview:s,isAdmin:a}=Qt(),{task_status:l,TASK_PUBLISHED:c}=vr(),u=M.useRef(null),[d,f]=M.useState(!1),[{isDragging:h},g]=is({item:{...e,type:pf,uuid:e==null?void 0:e.uuid,path:n},type:pf,collect:T=>({isDragging:T.isDragging()})}),m=h?.25:1;g(u);const v=l===c||a,A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(Ple,{typeName:"Text",field:r,...T});case"number":return o.jsx(Ule,{typeName:"Number",field:r,...T});case"email":return o.jsx(qle,{typeName:"Email",field:r,...T});case"textarea":return o.jsx($le,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(ace,{typeName:"Editor",field:r,...T});case"question":return o.jsx(Bce,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Rle,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(xce,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(Cce,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(Ece,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(kSe,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(Vle,{typeName:"Hyperlink",field:r,...T});case"heading":return o.jsx(Nce,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(Wve,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(ik,{typeName:"Image",field:r,...T});case"video":return o.jsx(Q3e,{typeName:"Video",field:r,...T});case"hr":return o.jsx(J3e,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(Z3e,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(e4e,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(Zbe,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(LSe,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(BSe,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(Xve,{typeName:"Image gallery",field:r,...T});case"quiz":return o.jsx(nye,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(eye,{typeName:"Document",field:r,...T});case"list":return o.jsx(sye,{typeName:"List",field:r,...T});case"country":return o.jsx(kle,{typeName:"Country",field:r,...T});case"phone":return o.jsx(pSe,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(gSe,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(ySe,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(ASe,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx(wSe,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(SSe,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(xSe,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(CSe,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(gj,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(gj,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(ISe,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(PSe,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(MSe,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(OSe,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(FSe,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},w=()=>{f(!0)},E=()=>{f(!1)},S=()=>{let T="";return s?(T=T+" component ",i===gf?T=T+" ":T=T+" px-2 "):(T=T+" component draggable field-form-builder-not-preview",i===gf?T=T+" pdf-component":T=T+" px-2 pdf-component"),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:m},className:S(),onMouseOver:w,onMouseOut:E,children:[!s&&d&&o.jsx("i",{ref:s===!1?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:v})]})})},VSe={position:"relative"},USe=t=>{var P,L,V,z,O;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,columnIndex:a,section:l,row:c,page:u}=t,d=M.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:g,formBuilderFormLayout:m,handleDrop:v}=an(),{isPreview:A,isRenderView:w,isAdvanceView:E,emitSocketData:S}=Qt(),[{isDragging:T},x]=is({type:Aa,item:{type:Aa,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:U=>({isDragging:U.isDragging()})}),_=T&&!w?.25:1;x(d);const I=(U,te,ge,ee,Q,he,Y)=>o.jsx(eu,{page:u,type:"field",row:c,column:e,section:l,field:U,data:U,path:te,pageIndex:ge,sectionIndex:ee,rowIndex:Q,columnIndex:he,fieldIndex:Y},`component-${n}-${U==null?void 0:U.uuid}`),F=(U,te,ge,ee,Q)=>{var Z,ne,K,R;const he=U.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${U.className} justify-content-space-between`,de=`${U.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:A===!1?d:null,children:[o.jsx("button",{className:U.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:U.togglerClassName,onClick:U.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(tn,{})]}),o.jsx("span",{className:de,children:"Column"})]}),A===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{h(te,ge,ee),S()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((R=(K=(ne=(Z=m[te])==null?void 0:Z.children[ge])==null?void 0:ne.children[ee])==null?void 0:K.children)==null?void 0:R.length)>1&&o.jsxs("button",{className:U.togglerClassName,onClick:()=>{f(te,ge,ee,Q),S()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{g(e,te,ge,ee,Q),S()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})};return o.jsx("div",{style:E?{...VSe,opacity:_}:{},className:w?"form-builder-column container-column":"draggable form-builder-column container-column",children:A===!1?o.jsx(o.Fragment,{children:E===!0?o.jsxs(ui,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:U=>F(U,r,i,s,a),children:[((P=e==null?void 0:e.children)==null?void 0:P.length)>0?(L=e==null?void 0:e.children)==null?void 0:L.map((U,te)=>{const ge=`${n}-${te}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:E,fieldDropArea:!0,data:{path:ge,childrenCount:e.children.length,droppedField:e},onDrop:v}),I(U,ge,r,i,s,a,te)]},ge)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:E,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((V=e==null?void 0:e.children)==null?void 0:V.length)>0?(z=e==null?void 0:e.children)==null?void 0:z.map((U,te)=>{const ge=`${n}-${te}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:E,fieldDropArea:!0,data:{path:ge,childrenCount:e.children.length,droppedField:e},onDrop:v}),I(U,ge,r,i,s,a,te)]},ge)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:E,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(O=e==null?void 0:e.children)==null?void 0:O.map((U,te)=>{const ge=`${n}-${te}`;return o.jsx(M.Fragment,{children:I(U,ge,r,i,s,a,te)},ge)})})})},qSe=t=>{var i,s,a;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(Sn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(fo,{value:(s=r==null?void 0:r.subHeadingText)==null?void 0:s[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(Sn,{value:(a=r.addToListButtonLabel)==null?void 0:a[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},$Se=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Qt();return o.jsxs("div",{className:"p-fluid",children:[r===W0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(ro,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},Zg=t=>{var E;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:s,rowIndex:a}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=an(),[f,h]=M.useState(r),{updateGlobalToast:g,emitSocketData:m}=Qt(),v=(S,T,x)=>{h(_=>{const I=_[S];return Object.assign({},_,{[S]:Object.assign({},I,{[T==null?void 0:T.type]:x})})})},A=(S,T)=>{h(x=>({...x,[S]:T}))},w=()=>{const S={...f,children:r==null?void 0:r.children};c(i,s,a,S),m(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Vo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(E=r==null?void 0:r.heading)==null?void 0:E[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(qt,{className:"mt-3",label:"Update",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(Js,{children:[o.jsx(br,{header:"Text",children:o.jsx(uo,{activeIndex:0,children:l!=null&&l.length?l.map((S,T)=>o.jsx(co,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(qSe,{language:S,stateRow:f,onHandleChange:v,...t})},T)):""})}),o.jsx(br,{header:"Advance",children:o.jsx($Se,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(br,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:S=>A("showRowTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:S=>A("showRowSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},jSe={},zSe=t=>{var fe,be,Te,ye,Ae,re,q,ie,W,ue,Ie;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,c=M.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g,handleDrop:m}=an(),{userTaskSubmitFormData:v,taskRegisterData:A,updateTaskRegisterData:w,updateTaskProgressValue:E,addUserDataFormSectionRepeatableData:S,removeUserDataFormSectionRepeatableData:T,task_status:x,TASK_PUBLISHED:_}=vr(),{isPreview:I,isRenderView:F,isAdvanceView:P,renderType:L,isAdmin:V,emitSocketData:z}=Qt(),[O,U]=M.useState(!1),[{isDragging:te},ge]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:Ee=>({isDragging:Ee.isDragging()})}),ee=te?.25:1;ge(c);const Q=(Ee,ve,me,Se,De,$)=>o.jsx(USe,{page:l,row:e,section:a,data:Ee,path:ve,pageIndex:me,sectionIndex:Se,rowIndex:De,columnIndex:$,isAdmin:V,emitSocketData:z},`column-${n}-${Ee.uuid}`),he=(Ee,ve,me,Se)=>{var pe,ce,le,ae;const De=Ee.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",$=`${Ee.className} justify-content-space-between`,oe=`${Ee.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:$,children:[o.jsxs("span",{ref:I===!1?c:null,children:[o.jsx("button",{className:Ee.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:Ee.togglerClassName,onClick:Ee.onTogglerClick,children:[o.jsx("span",{className:De}),o.jsx(tn,{})]}),o.jsxs("span",{className:oe,children:["Row:"," ",((pe=e==null?void 0:e.heading)==null?void 0:pe[g==null?void 0:g.type])!==""?(ce=e==null?void 0:e.heading)==null?void 0:ce[g==null?void 0:g.type]:"Untitled"]})]}),I===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:Ee.togglerClassName,onClick:()=>{d(ve,me),z()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((ae=(le=h[ve])==null?void 0:le.children[me])==null?void 0:ae.children.length)>1&&o.jsxs("button",{className:Ee.togglerClassName,onClick:()=>{u(ve,me,Se),z()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:Ee.togglerClassName,onClick:()=>{f(e,ve,me,Se),z()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>U(!0),className:Ee.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},Y=It.findIndex(v,function(Ee){return(Ee==null?void 0:Ee.rowId)===(e==null?void 0:e.uuid)}),de=()=>{var me,Se,De;const Ee=It.cloneDeep(A);((Se=(me=v[Y])==null?void 0:me.repeatableFieldsData)==null?void 0:Se.length)>=(e==null?void 0:e.minimumEntries)?Ee[e==null?void 0:e.uuid]=(De=v[Y])==null?void 0:De.repeatableFields:delete Ee[e==null?void 0:e.uuid];const ve=Object.keys(Ee).length;w(Ee),E(ve)},Z=(fe=e==null?void 0:e.repeatableFields)==null?void 0:fe.map(Ee=>{var ve;return{fieldUuid:Ee==null?void 0:Ee.uuid,field:Ee==null?void 0:Ee.uuid,header:(ve=Ee==null?void 0:Ee.label)==null?void 0:ve.english}}),ne=Z==null?void 0:Z.map(Ee=>o.jsx(Ar,{field:Ee.field,header:Ee.header,body:ve=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ve[Ee==null?void 0:Ee.field]}})})},Ee.field)),K=()=>{var Se;const Ee=[...v],ve=[];let me=!0;e:for(const[,De]of e.children.entries()){for(const[,$]of De.children.entries())if($!=null&&$.isPostField&&$.isValid!==1){const oe={fieldId:$.uuid,rowIndex:s};console.log("inValidData",oe),ve.push(oe),Jt.emit("OnInvalidFieldCatch",oe),me=!1;break e}me=!0}me&&(ve==null?void 0:ve.length)===0&&(S(e==null?void 0:e.uuid,(Se=Ee[Y])==null?void 0:Se.repeatableFields),Jt.emit("clearRepeatableFields",e==null?void 0:e.uuid),de())},R=Ee=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,Ee==null?void 0:Ee.rowIndex),setTimeout(()=>{de()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...jSe,opacity:ee,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.right}px`},className:F?"row container-row":"draggable row container-row",children:[O&&o.jsx(Zg,{renderType:L,visibilty:O,setVisibility:U,row:e,pageIndex:r,sectionIndex:i,rowIndex:s,emitSocketData:z},"row_settings_"+r+i+s),I===!1?o.jsx(o.Fragment,{children:P===!0?o.jsx(ui,{header:"Row",toggleable:!0,headerTemplate:Ee=>he(Ee,r,i,s),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map((Ee,ve)=>{const me=`${n}-${ve}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:P,data:{path:me,childrenCount:e.children.length},onDrop:m,className:"horizontalDrag"}),Q(Ee,me,r,i,s,ve)]},me)}),o.jsx(Fr,{isAdvanceView:P,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:m,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:P?"form-builder-columns":"",style:P?{overflowX:"auto"}:{},children:(q=e==null?void 0:e.children)==null?void 0:q.map((Ee,ve)=>{const me=`${n}-${ve}`;return o.jsx(M.Fragment,{children:Q(Ee,me,r,i,s,ve)},me)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&x===_)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ie=e==null?void 0:e.heading)==null?void 0:ie[g==null?void 0:g.type]}),o.jsx("span",{children:(W=e==null?void 0:e.subHeadingText)==null?void 0:W[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((Ee,ve)=>{const me=`${n}-${ve}`;return o.jsx(M.Fragment,{children:Q(Ee,me,r,i,s,ve)},me)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&x!==_&&o.jsx(qt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(ue=e.addToListButtonLabel)==null?void 0:ue[g==null?void 0:g.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(oo,{value:(v==null?void 0:v.length)>0?(Ie=v[Y])==null?void 0:Ie.repeatableFieldsData:[],children:[ne,x!==_&&o.jsx(Ar,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(Ee,ve)=>R(ve)})]}),V&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},HSe=t=>{var i,s;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(Sn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:a=>n("heading",e,a.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(fo,{value:(s=r.subHeadingText)==null?void 0:s[e==null?void 0:e.type],placeholder:"Enter section description",onChange:a=>n("subHeadingText",e,a.target.value)})]})]})},np=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:s}=t,[a,l]=M.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=an(),{emitSocketData:h}=Qt(),{updateGlobalToast:g}=Qt(),m=(w,E,S)=>{l(T=>Object.assign({},T,{[w]:Object.assign({},T[w],{[E==null?void 0:E.type]:S})}))},v=(w,E)=>{l(S=>({...S,[w]:E}))},A=()=>{const w={...a,children:r==null?void 0:r.children};u(i,s,w),h(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Vo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(qt,{className:"mt-3",label:"Update",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(Js,{children:[o.jsx(br,{header:"Text",children:o.jsx(uo,{activeIndex:0,children:c!=null&&c.length?c.map((w,E)=>o.jsx(co,{tabIndex:E,header:w==null?void 0:w.language,children:o.jsx(HSe,{language:w,stateSection:a,onHandleChange:m,...t})},E)):""})}),o.jsx(br,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"showSectionTitle",checked:a==null?void 0:a.showSectionHeader,onChange:w=>v("showSectionHeader",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"showSectionTitle",checked:a==null?void 0:a.showSectionTitle,onChange:w=>v("showSectionTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(zr,{inputId:"showSectionSubTitle",checked:a==null?void 0:a.showSectionSubTitle,onChange:w=>v("showSectionSubTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},rp=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Qt(),s=f4({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{s.resetForm(),r(!1)})}}),a=c=>!!(s.touched[c]&&s.errors[c]),l=()=>o.jsx("div",{children:o.jsx(qt,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{s.handleSubmit()},autoFocus:!0})});return o.jsxs(za,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(Sn,{id:"builder_element_title",name:"builder_element_title",value:s.values.builder_element_title,onChange:s.handleChange,className:`${W3({invalid:a("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(fo,{id:"builder_element_description",name:"builder_element_description",value:s.values.builder_element_description,onChange:s.handleChange,className:`${W3({invalid:a("builder_element_title")})} w-full`})]})]})},YSe=t=>{var ge,ee,Q,he,Y,de,Z,ne;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:s,page:a}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=an(),{isPreview:g,isAdvanceView:m,renderType:v,emitSocketData:A}=Qt(),[w,E]=M.useState(!1),[S,T]=M.useState(!1),[x,_]=M.useState(null),[I,F]=M.useState(!1),P=M.useRef(null),L=(K,R)=>{_(fe=>({...fe,[K]:R}))},[{isDragging:V},z]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),O=V?.25:1;z(P);const U=(K,R,fe,be,Te)=>o.jsx(zSe,{page:a,section:s,data:K,path:R,pageIndex:fe,sectionIndex:be,rowIndex:Te},`row-${n}-${K.uuid}`),te=(K,R,fe)=>{var Ae,re;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:g===!1?P:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ye,children:[fe+1," ",(Ae=e==null?void 0:e.heading)==null?void 0:Ae[f==null?void 0:f.type]]})]}),g===!1&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(R),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((re=d[R])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(R,fe),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{L("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,R,fe),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>E(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:O,marginBottom:20},className:m?"draggable row":"",children:[g===!1&&o.jsx(rp,{saveBuilderElementModalData:x,setSaveBuilderElementModalData:_,saveElementModal:S,setSaveElementModal:T}),w===!0&&o.jsx(np,{renderType:v,visibilty:w,setVisibility:E,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!1?o.jsx(o.Fragment,{children:m===!0?o.jsxs(ui,{header:(ge=e==null?void 0:e.heading)==null?void 0:ge.english,toggleable:!0,headerTemplate:K=>te(K,r,i),onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[((ee=e==null?void 0:e.subHeadingText)==null?void 0:ee[f==null?void 0:f.type])&&o.jsx("p",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((K,R)=>{const fe=`${n}-${R}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:m,data:{path:fe,childrenCount:e.children.length},onDrop:h}),U(K,fe,r,i,R)]},fe)}),o.jsx(Fr,{isAdvanceView:m,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),I&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(tn,{})})}),((he=d[r])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=e==null?void 0:e.subHeadingText)==null?void 0:Y[f==null?void 0:f.type])&&o.jsx("p",{children:(de=e==null?void 0:e.subHeadingText)==null?void 0:de[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((K,R)=>{const fe=`${n}-${R}`;return o.jsx(M.Fragment,{children:U(K,fe,r,i,R)},fe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Z=e==null?void 0:e.heading)==null?void 0:Z[f==null?void 0:f.type]}),o.jsx("p",{children:(ne=e==null?void 0:e.subHeadingText)==null?void 0:ne[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((K,R)=>{const fe=`${n}-${R}`;return o.jsx(M.Fragment,{children:o.jsx("div",{className:"",children:U(K,fe,r,i,R)},fe)},fe)})]})})]})},KSe={position:"relative"},XSe=t=>{var T,x,_;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:s,rowIndex:a,columnIndex:l,section:c,row:u,page:d}=t,f=M.useRef(null),{handleDrop:h}=an(),{isRenderView:g,isAdvanceView:m,isPreview:v}=Qt(),[{isDragging:A},w]=is({type:Aa,item:{type:Aa,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:I=>({isDragging:I.isDragging()})}),E=A&&!g?.25:1;w(f);const S=(I,F,P,L,V,z,O)=>o.jsx(eu,{page:d,section:c,row:u,column:n,field:I,pageIndex:P,sectionIndex:L,rowIndex:V,columnIndex:z,fieldIndex:O,type:"field",data:I,path:F},`component-${r}-${I==null?void 0:I.uuid}`);return o.jsx("div",{style:m?{...KSe,opacity:E}:{},className:g?"":"draggable column container-column",children:v===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((T=e==null?void 0:e.children)==null?void 0:T.length)>0?(x=e==null?void 0:e.children)==null?void 0:x.map((I,F)=>{const P=`${r}-${F}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:m,fieldDropArea:!0,data:{path:P,childrenCount:e.children.length,droppedField:e},onDrop:h}),S(I,P,i,s,a,l,F)]},P)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:m,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(_=e==null?void 0:e.children)==null?void 0:_.map((I,F)=>{const P=`${r}-${F}`;return o.jsx(M.Fragment,{children:S(I,P,i,s,a,l,F)},P)})})})},RSe=t=>{var l;const{isAdvanceView:e}=Qt(),{data:n,page:r,path:i,pageIndex:s}=t,a=(c,u,d,f,h,g,m,v)=>o.jsx(XSe,{page:r,row:v,section:m,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((m,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(M.Fragment,{children:a(m,A,s,u,h,v,c,f)},A)})})})})})})},GSe=t=>{const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:s,isAdvanceView:a}=Qt(),{formBuilderFormSchema:l,handleDrop:c}=an(),u=M.useRef(null),[d,f]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:g=>({isDragging:g.isDragging()})});f(u);const h=(g,m,v,A)=>o.jsx(YSe,{data:g,page:e,section:g,path:m,pageIndex:v,sectionIndex:A},`section_${v}_${A}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${s?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:i===!1?o.jsx(o.Fragment,{children:a?o.jsxs(o.Fragment,{children:[e.children.map((g,m)=>{const v=`${n}-${m}`;return o.jsxs(M.Fragment,{children:[a===!0&&o.jsx(Fr,{isAdvanceView:a,data:{path:v,childrenCount:e.children.length},onDrop:c}),h(g,v,r,m)]},`section-${m}-${g.uuid}`)}),a===!0&&o.jsx(Fr,{isAdvanceView:a,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(RSe,{page:e,path:n,data:e,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((g,m)=>{const v=`${n}-${m}`;return o.jsx(M.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:h(g,v,r,m)})}):((g==null?void 0:g.isHidden)===!1||!i)&&h(g,v,r,m)},`section-${m}-${g.uuid}`)})})})})},WSe=()=>{const{isPreview:t,isAdvanceView:e}=Qt(),[n,r]=M.useState(!1),[i,s]=M.useState(!1),[a,l]=M.useState(0),{formBuilderFormLayout:c,formBuilderFormSchema:u}=an(),{emitSocketData:d}=Qt(),f=(h,g,m)=>o.jsx(GSe,{data:h,path:g,pageIndex:m},`page-${h.uuid}`);return o.jsx("div",{className:"page",children:(c==null?void 0:c.length)===v9&&t===!0?o.jsx(o.Fragment,{children:(c==null?void 0:c.length)&&c.map((h,g)=>{const m=`${g}`;return o.jsx("div",{children:f(h,m,g)},`${h.uuid}-${g}`)})}):o.jsx(o.Fragment,{children:e===!0||t===!0?o.jsx(Js,{activeIndex:a,onTabChange:h=>l(h.index),children:(c==null?void 0:c.length)&&c.map((h,g)=>{const m=`${g}`;return o.jsxs(br,{disabled:!((h==null?void 0:h.isHidden)===!1||!t),header:"Page",headerTemplate:v=>o.jsx(k7,{options:v,pageIndex:g,setTabSidebarSetting:r,setPageActiveIndex:l,page:h,pages:c}),children:[t===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:s,pageIndex:g}),o.jsx(o1,{setVisibility:r,visibilty:n,pageIndex:g,page:h,emitSocketData:d}),f(h,m,g)]},`${h.uuid}-${g}`)})}):o.jsx(o.Fragment,{children:(c==null?void 0:c.length)>0&&(c==null?void 0:c.map((h,g)=>{const m=`${g}`;return o.jsxs(M.Fragment,{children:[t===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:s,pageIndex:g}),o.jsx(o1,{setVisibility:r,visibilty:n,pageIndex:g,page:h,emitSocketData:d}),f(h,m,g)]},`${h.uuid}-${g}`)}))})})})},QSe={position:"relative"},JSe=t=>{var P,L,V,z,O;const{isAdvanceView:e,isPreview:n,emitSocketData:r,isRenderView:i}=Qt(),{data:s,path:a,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,m=M.useRef(null),{removeColumn:v,addColumn:A,cloneColumn:w,formBuilderFormLayout:E,handleDrop:S}=an(),[{isDragging:T},x]=is({type:Aa,item:{type:Aa,uuid:s==null?void 0:s.uuid,children:s.children,path:a},collect:U=>({isDragging:U.isDragging()})}),_=T&&!i?.25:1;x(m);const I=(U,te,ge,ee,Q,he,Y)=>o.jsx(eu,{page:g,column:s,type:"field",row:h,section:f,field:U,data:U,path:te,pageIndex:ge,sectionIndex:ee,rowIndex:Q,columnIndex:he,fieldIndex:Y},`component-${a}-${U==null?void 0:U.uuid}`),F=(U,te,ge,ee,Q)=>{var Z,ne,K,R;const he=U.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${U.className} justify-content-space-between`,de=`${U.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:n===!1?m:null,children:[o.jsx("button",{className:U.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:U.togglerClassName,onClick:U.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(tn,{})]}),o.jsx("span",{className:de,children:"Column"})]}),n===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{A(te,ge,ee),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((R=(K=(ne=(Z=E[te])==null?void 0:Z.children[ge])==null?void 0:ne.children[ee])==null?void 0:K.children)==null?void 0:R.length)>1&&o.jsxs("button",{className:U.togglerClassName,onClick:()=>{v(te,ge,ee,Q),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{w(s,te,ge,ee,Q),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})};return o.jsx("div",{style:e?{...QSe,opacity:_}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ui,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:U=>F(U,l,c,u,d),children:[((P=s==null?void 0:s.children)==null?void 0:P.length)>0?(L=s==null?void 0:s.children)==null?void 0:L.map((U,te)=>{const ge=`${a}-${te}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ge,childrenCount:s.children.length,droppedField:s},onDrop:S}),I(U,ge,l,c,u,d,te)]},ge)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:S,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((V=s==null?void 0:s.children)==null?void 0:V.length)>0?(z=s==null?void 0:s.children)==null?void 0:z.map((U,te)=>{const ge=`${a}-${te}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ge,childrenCount:s.children.length,droppedField:s},onDrop:S}),I(U,ge,l,c,u,d,te)]},ge)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:S,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(O=s==null?void 0:s.children)==null?void 0:O.map((U,te)=>{const ge=`${a}-${te}`;return o.jsx(M.Fragment,{children:I(U,ge,l,c,u,d,te)},ge)})})})},ZSe={},exe=t=>{var fe,be,Te,ye,Ae,re,q,ie,W,ue,Ie,Ee,ve,me,Se,De;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isPreview:f,emitSocketData:h,renderType:g}=Qt(),m=M.useRef(null),{removeRow:v,addRow:A,cloneRow:w,formBuilderFormLayout:E,userSelectedLanguage:S,handleDrop:T}=an(),{userTaskSubmitFormData:x,taskRegisterData:_,updateTaskRegisterData:I,updateTaskProgressValue:F,addUserDataFormSectionRepeatableData:P,removeUserDataFormSectionRepeatableData:L,task_status:V,TASK_PUBLISHED:z}=vr(),[O,U]=M.useState(!1),[{isDragging:te},ge]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:$=>({isDragging:$.isDragging()})}),ee=te?.25:1;ge(m);const Q=($,oe,pe,ce,le,ae)=>o.jsx(JSe,{page:l,row:e,section:a,data:$,path:oe,pageIndex:pe,sectionIndex:ce,rowIndex:le,columnIndex:ae,isAdmin:d,emitSocketData:h},`column-${n}-${$.uuid}`),he=($,oe,pe,ce)=>{var Ne,Ke,dt,pt;const le=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ae=`${$.className} justify-content-space-between`,Oe=`${$.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:ae,children:[o.jsxs("span",{ref:f===!1?m:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:le}),o.jsx(tn,{})]}),o.jsxs("span",{className:Oe,children:["Row:"," ",((Ne=e==null?void 0:e.heading)==null?void 0:Ne[S==null?void 0:S.type])!==""?(Ke=e==null?void 0:e.heading)==null?void 0:Ke[S==null?void 0:S.type]:"Untitled"]})]}),f===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{A(oe,pe),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((pt=(dt=E[oe])==null?void 0:dt.children[pe])==null?void 0:pt.children.length)>1&&o.jsxs("button",{className:$.togglerClassName,onClick:()=>{v(oe,pe,ce),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{w(e,oe,pe,ce),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>U(!0),className:$.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},Y=It.findIndex(x,function($){return($==null?void 0:$.rowId)===(e==null?void 0:e.uuid)}),de=()=>{var pe,ce,le;const $=It.cloneDeep(_);((ce=(pe=x[Y])==null?void 0:pe.repeatableFieldsData)==null?void 0:ce.length)>=(e==null?void 0:e.minimumEntries)?$[e==null?void 0:e.uuid]=(le=x[Y])==null?void 0:le.repeatableFields:delete $[e==null?void 0:e.uuid];const oe=Object.keys($).length;I($),F(oe)},Z=(fe=e==null?void 0:e.repeatableFields)==null?void 0:fe.map($=>{var oe;return{fieldUuid:$==null?void 0:$.uuid,field:$==null?void 0:$.uuid,header:(oe=$==null?void 0:$.label)==null?void 0:oe.english}}),ne=Z==null?void 0:Z.map($=>o.jsx(Ar,{field:$.field,header:$.header,body:oe=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:oe[$==null?void 0:$.field]}})})},$.field)),K=()=>{var ce;const $=[...x],oe=[];let pe=!0;e:for(const[,le]of e.children.entries()){for(const[,ae]of le.children.entries())if(ae!=null&&ae.isPostField&&ae.isValid!==1){const Oe={fieldId:ae.uuid,rowIndex:s};oe.push(Oe),Jt.emit("OnInvalidFieldCatch",Oe),pe=!1;break e}pe=!0}pe&&(oe==null?void 0:oe.length)===0&&(P(e==null?void 0:e.uuid,(ce=$[Y])==null?void 0:ce.repeatableFields),Jt.emit("clearRepeatableFields",e==null?void 0:e.uuid),de())},R=$=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{L(e==null?void 0:e.uuid,$==null?void 0:$.rowIndex),setTimeout(()=>{de()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...ZSe,opacity:ee,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(Ae=e==null?void 0:e.margin)==null?void 0:Ae.right}px`},className:c?"row container-row":"draggable row container-row",children:[O&&o.jsx(Zg,{renderType:g,visibilty:O,setVisibility:U,row:e,pageIndex:r,sectionIndex:i,rowIndex:s,emitSocketData:h},"row_settings_"+r+i+s),g===$m&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsxs(M.Fragment,{children:[g===t0&&o.jsx(Fr,{isAdvanceView:u,data:{path:pe,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),Q($,pe,r,i,s,oe)]},pe)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(g===Q0||g===W0||g===qm||g===m9||g===Dp)&&(f===!1?o.jsx(o.Fragment,{children:u===!0?o.jsx(ui,{header:"Row",toggleable:!0,headerTemplate:$=>he($,r,i,s),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(re=e==null?void 0:e.children)==null?void 0:re.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:u,data:{path:pe,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),Q($,pe,r,i,s,oe)]},pe)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(q=e==null?void 0:e.children)==null?void 0:q.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsx(M.Fragment,{children:Q($,pe,r,i,s,oe)},pe)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&V===z)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ie=e==null?void 0:e.heading)==null?void 0:ie[S==null?void 0:S.type]}),o.jsx("span",{children:(W=e==null?void 0:e.subHeadingText)==null?void 0:W[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsx(M.Fragment,{children:Q($,pe,r,i,s,oe)},pe)})})]})})),g===gf&&(f===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]}),((Ie=(ue=E[r])==null?void 0:ue.children[i])==null?void 0:Ie.children.length)>1&&o.jsxs("button",{onClick:()=>{v(r,i,s),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>{w(e,r,i,s),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>U(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(Ee=e==null?void 0:e.children)==null?void 0:Ee.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsx(M.Fragment,{children:Q($,pe,r,i,s,oe)},pe)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&V===z)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[S==null?void 0:S.type]}),o.jsx("span",{children:(me=e==null?void 0:e.subHeadingText)==null?void 0:me[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsx(M.Fragment,{children:Q($,pe,r,i,s,oe)},pe)})})]})})),g===t0&&o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,oe)=>{const pe=`${n}-${oe}`;return o.jsx(M.Fragment,{children:Q($,pe,r,i,s,oe)},pe)})}),(e==null?void 0:e.rowIsRepeatable)&&V!==z&&o.jsx(qt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(Se=e.addToListButtonLabel)==null?void 0:Se[S==null?void 0:S.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(oo,{value:(x==null?void 0:x.length)>0?(De=x[Y])==null?void 0:De.repeatableFieldsData:[],children:[ne,V!==z&&o.jsx(Ar,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:$=>R($)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},txe=t=>{var ge,ee,Q,he,Y,de,Z,ne;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Qt(),{handleDrop:s}=an(),{data:a,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:m,formBuilderFormLayout:v,userSelectedLanguage:A}=an(),[w,E]=M.useState(!1),[S,T]=M.useState(!1),[x,_]=M.useState({reusable_template_schema:""}),[I,F]=M.useState(!1),P=M.useRef(null),L=(K,R)=>{_(fe=>({...fe,[K]:R}))},[{isDragging:V},z]=is({type:ns,item:{type:ns,uuid:a.uuid,children:a.children,path:l},collect:K=>({isDragging:K.isDragging()})}),O=V?.25:1;z(P);const U=(K,R,fe,be,Te)=>o.jsx(exe,{page:f,section:d,data:K,path:R,pageIndex:fe,sectionIndex:be,rowIndex:Te},`row-${l}-${K.uuid}`),te=(K,R,fe)=>{var Ae,re;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!1?P:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ye,children:[fe+1," ",(Ae=a==null?void 0:a.heading)==null?void 0:Ae[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(R),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((re=v[R])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(R,fe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{L("reusable_template_schema",a),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(a,R,fe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>E(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:O,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(rp,{saveBuilderElementModalData:x,setSaveBuilderElementModalData:_,saveElementModal:S,setSaveElementModal:T}),w===!0&&o.jsx(np,{renderType:r,visibilty:w,setVisibility:E,section:a,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ui,{header:(ge=a==null?void 0:a.heading)==null?void 0:ge.english,toggleable:!0,headerTemplate:K=>te(K,c,u),onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[((ee=a==null?void 0:a.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(Q=a==null?void 0:a.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsxs("div",{children:[a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:fe,childrenCount:a.children.length},onDrop:s}),U(K,fe,c,u,R)]},fe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:s,isLast:!0})]}),I&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(tn,{})})}),((he=v[c])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=a==null?void 0:a.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(de=a==null?void 0:a.subHeadingText)==null?void 0:de[A==null?void 0:A.type]}),o.jsx("div",{children:a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsx(M.Fragment,{children:U(K,fe,c,u,R)},fe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(a==null?void 0:a.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Z=a==null?void 0:a.heading)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("p",{children:(ne=a==null?void 0:a.subHeadingText)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("hr",{})]}),a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsx(M.Fragment,{children:o.jsx("div",{className:"",children:U(K,fe,c,u,R)},fe)},fe)})]})})]})},nxe=t=>{var a;const{data:e,currentPath:n,pageIndex:r,page:i}=t,s=M.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(_w,{ref:s,modules:[kV,Hve],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(a=e==null?void 0:e.children)==null?void 0:a.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((g,m)=>{var v;return(v=g==null?void 0:g.children)==null?void 0:v.map((A,w)=>{const E=`${n}-${c}-${f}-${m}-${w}`;return o.jsx(Dw,{children:o.jsx("div",{className:"",children:o.jsx(eu,{page:i,column:g,type:"field",row:d,section:l,field:A,data:A,path:E,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:m,fieldIndex:w},`component-${E}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${E}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(qt,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(qt,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},rxe=t=>{const{isAdvanceView:e,isRenderView:n,isPreview:r}=Qt(),{handleDrop:i}=an(),{data:s,path:a,pageIndex:l}=t,{formBuilderFormSchema:c}=an(),u=M.useRef(null),[{},d]=is({type:ns,item:{type:ns,uuid:s.uuid,children:s.children,path:a},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,g,m,v)=>o.jsx(txe,{data:h,section:h,path:g,page:s,pageIndex:m,sectionIndex:v},`section_${m}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n?"":"draggable page-css p-3 pb-4"}`,"data-image-src":s==null?void 0:s.bgImage,"data-bg-color":`#${s==null?void 0:s.bgColor}`,children:r===!1?o.jsxs(o.Fragment,{children:[s.children.map((h,g)=>{const m=`${a}-${g}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:m,childrenCount:s.children.length},onDrop:i}),f(h,m,l,g)]},`section-${g}-${h.uuid}`)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:(c==null?void 0:c.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(nxe,{page:s,data:s,currentPath:a,pageIndex:l})}):o.jsx("div",{className:"p-1",children:s.children.map((h,g)=>{const m=`${a}-${g}`;return o.jsx(M.Fragment,{children:((h==null?void 0:h.isHidden)===!1||!r)&&f(h,m,l,g)},`section-${g}-${h.uuid}`)})})})})},ixe=()=>{const[t,e]=M.useState(!1),{isAdvanceView:n,isPreview:r,emitSocketData:i}=Qt(),[s,a]=M.useState(!1),[l,c]=M.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:g}=an(),m=(v,A,w)=>o.jsx(rxe,{data:v,path:A,pageIndex:w},`page-${v.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===v9&&r===!0?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((v,A)=>{const w=`${A}`;return o.jsx("div",{children:m(v,w,A)},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!0?o.jsx(Js,{activeIndex:l,onTabChange:v=>c(v.index),children:(h==null?void 0:h.length)&&h.map((v,A)=>{const w=`${A}`;return o.jsxs(br,{disabled:!((v==null?void 0:v.isHidden)===!1||!r),header:"Page",headerTemplate:E=>o.jsx(k7,{options:E,pageIndex:A,page:v,isPreview:r,setTabSidebarSetting:a,clonePage:g,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(o1,{setVisibility:a,visibilty:s,pageIndex:A,page:v,emitSocketData:i}),m(v,w,A)]},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((v,A)=>{const w=`${A}`;return o.jsxs(M.Fragment,{children:[r===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(o1,{setVisibility:a,visibilty:s,pageIndex:A,page:v,emitSocketData:i}),m(v,w,A)]},`${v.uuid}-${A}`)}))})})})})},sxe={position:"relative"},axe=t=>{var S,T,x;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,columnIndex:a,section:l,row:c,page:u}=t,d=M.useRef(null),{handleDrop:f}=an(),{isPreview:h,isRenderView:g,isAdvanceView:m}=Qt(),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),w=v&&!g?.25:1;A(d);const E=(_,I,F,P,L,V,z)=>o.jsx(eu,{page:u,type:"field",row:c,section:l,field:_,data:_,path:I,pageIndex:F,sectionIndex:P,rowIndex:L,columnIndex:V,fieldIndex:z},`component-${n}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:m?{...sxe,opacity:w}:{},className:g?"form-builder-column container-column":"draggable form-builder-column container-column",children:h===!1?o.jsxs("div",{className:"builder-row-column",children:[((S=e==null?void 0:e.children)==null?void 0:S.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((_,I)=>{const F=`${n}-${I}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:m,data:{path:F,childrenCount:e.children.length,droppedField:e},onDrop:f}),E(_,F,r,i,s,a,I)]},F)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(x=e==null?void 0:e.children)==null?void 0:x.map((_,I)=>{const F=`${n}-${I}`;return o.jsx(M.Fragment,{children:E(_,F,r,i,s,a,I)},F)})})})},oxe={},lxe=t=>{var F,P,L,V,z,O,U,te,ge;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,c=M.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g}=an(),{isPreview:m,isRenderView:v}=Qt(),{task_status:A,TASK_PUBLISHED:w}=vr(),[E,S]=M.useState(!1),[{isDragging:T},x]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:ee=>({isDragging:ee.isDragging()})}),_=T?.25:1;x(c);const I=(ee,Q,he,Y,de,Z)=>o.jsx(axe,{page:l,row:e,section:a,data:ee,path:Q,pageIndex:he,sectionIndex:Y,rowIndex:de,columnIndex:Z},`column-${n}-${ee.uuid}`);return o.jsxs("div",{style:{...oxe,opacity:_,marginTop:`${(F=e==null?void 0:e.margin)==null?void 0:F.top}px`,marginBottom:`${(P=e==null?void 0:e.margin)==null?void 0:P.bottom}px`,marginLeft:`${(L=e==null?void 0:e.margin)==null?void 0:L.left}px`,marginRight:`${(V=e==null?void 0:e.margin)==null?void 0:V.right}px`},className:v?"row container-row":"draggable row container-row",children:[E&&o.jsx(Zg,{visibilty:E,setVisibility:S,row:e,pageIndex:r,sectionIndex:i,rowIndex:s},"row_settings_"+r+i+s),m===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]}),((O=(z=h[r])==null?void 0:z.children[i])==null?void 0:O.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,s)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,s)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>S(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(U=e==null?void 0:e.children)==null?void 0:U.map((ee,Q)=>{const he=`${n}-${Q}`;return o.jsx(M.Fragment,{children:I(ee,he,r,i,s,Q)},he)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===w)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(te=e==null?void 0:e.heading)==null?void 0:te[g==null?void 0:g.type]}),o.jsx("span",{children:(ge=e==null?void 0:e.subHeadingText)==null?void 0:ge[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((ee,Q)=>{const he=`${n}-${Q}`;return o.jsx(M.Fragment,{children:I(ee,he,r,i,s,Q)},he)})})]})})]})},cxe=t=>{var x,_,I;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:s,page:a}=t,{userSelectedLanguage:l}=an(),{isPreview:c,isAdvanceView:u}=Qt(),[d,f]=M.useState(!1),[h,g]=M.useState(!1),[m,v]=M.useState(null),A=M.useRef(null),[{isDragging:w},E]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:F=>({isDragging:F.isDragging()})}),S=w?.25:1;E(A);const T=(F,P,L,V,z)=>o.jsx(lxe,{page:a,section:s,data:F,path:P,pageIndex:L,sectionIndex:V,rowIndex:z},`row-${n}-${F.uuid}`);return o.jsxs("div",{style:{opacity:S,marginBottom:20},className:u?"draggable row":"",children:[c===!1&&o.jsx(rp,{saveBuilderElementModalData:m,setSaveBuilderElementModalData:v,saveElementModal:h,setSaveElementModal:g}),d===!0&&o.jsx(np,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),c===!1?o.jsx("div",{children:o.jsx("div",{children:e.children.map((F,P)=>{const L=`${n}-${P}`;return o.jsx(M.Fragment,{children:T(F,L,r,i,P)},L)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(x=e==null?void 0:e.heading)==null?void 0:x[l==null?void 0:l.type]}),((_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type])&&o.jsx("p",{children:(I=e==null?void 0:e.subHeadingText)==null?void 0:I[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((F,P)=>{const L=`${n}-${P}`;return o.jsx(M.Fragment,{children:o.jsx("div",{className:"",children:T(F,L,r,i,P)},L)},L)})]})})]})},d6={},f6={height:"1280px",width:"100%"},uxe=t=>{var f,h,g,m;const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:s}=Qt(),a=M.useRef(null),[{isDragging:l},c]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),u=l?0:1;c(a);const d=(v,A,w,E)=>o.jsx(cxe,{data:v,section:v,path:A,page:e,pageIndex:w,sectionIndex:E},`section_${w}_${E}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${s?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!1?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...d6,...f6,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...d6,...f6,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,A)=>{const w=`${n}-${A}`;return o.jsx(M.Fragment,{children:d(v,w,r,A)},`section-${A}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...d6,...f6,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...d6,...f6,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(f=e==null?void 0:e.margin)==null?void 0:f.top}px`,marginBottom:`${(h=e==null?void 0:e.margin)==null?void 0:h.bottom}px`,marginLeft:`${(g=e==null?void 0:e.margin)==null?void 0:g.left}px`,marginRight:`${(m=e==null?void 0:e.margin)==null?void 0:m.right}px`},children:e.children.map((v,A)=>{const w=`${n}-${A}`;return o.jsx(M.Fragment,{children:((v==null?void 0:v.isHidden)===!1||!i)&&d(v,w,r,A)},`section-${A}-${v.uuid}`)})})})})})})},dxe=()=>{const{isPreview:t}=Qt(),[e,n]=M.useState(!1),[r,i]=M.useState(0),[s,a]=M.useState(!1),{formBuilderFormLayout:l}=an(),c=(u,d,f)=>o.jsx(uxe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===v9&&t===!0?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!1?o.jsx(Js,{activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs(br,{header:"Page",headerTemplate:h=>o.jsx(k7,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:s,setReusableBuilderElementModalVisibility:a,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(o1,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!1&&o.jsx($f,{reusableBuilderElementModalVisibility:s,setReusableBuilderElementModalVisibility:a,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(o1,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},fxe=t=>{var w,E,S,T;const e=M.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:s}=an(),{isPreview:a,emitSocketData:l}=Qt(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:g}=t,m=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",v=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:v,children:[o.jsxs("span",{ref:a===!1?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(tn,{})]}),o.jsx("span",{className:A,children:"Column"})]}),a===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),l()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((T=(S=(E=(w=s[u])==null?void 0:w.children[d])==null?void 0:E.children[f])==null?void 0:S.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(g,u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})},hxe={position:"relative"},pxe=t=>{var S,T,x,_,I;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Qt(),{handleDrop:i}=an(),{data:s,path:a,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,m=M.useRef(null),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:s==null?void 0:s.uuid,children:s.children,path:a},collect:F=>({isDragging:F.isDragging()})}),w=v&&!n?.25:1;A(m);const E=(F,P,L,V,z,O,U)=>o.jsx(eu,{page:g,column:s,type:"field",row:h,section:f,field:F,data:F,path:P,pageIndex:L,sectionIndex:V,rowIndex:z,columnIndex:O,fieldIndex:U},`component-${a}-${F==null?void 0:F.uuid}`);return o.jsx("div",{style:e?{...hxe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ui,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:F=>o.jsx(fxe,{options:F,pageIndex:l,sectionIndex:c,rowIndex:u,data:s,columnIndex:d}),children:[((S=s==null?void 0:s.children)==null?void 0:S.length)>0?(T=s==null?void 0:s.children)==null?void 0:T.map((F,P)=>{const L=`${a}-${P}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:L,childrenCount:s.children.length,droppedField:s},onDrop:i}),E(F,L,l,c,u,d,P)]},L)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((x=s==null?void 0:s.children)==null?void 0:x.length)>0?(_=s==null?void 0:s.children)==null?void 0:_.map((F,P)=>{const L=`${a}-${P}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:L,childrenCount:s.children.length,droppedField:s},onDrop:i}),E(F,L,l,c,u,d,P)]},L)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(I=s==null?void 0:s.children)==null?void 0:I.map((F,P)=>{const L=`${a}-${P}`;return o.jsx(M.Fragment,{children:E(F,L,l,c,u,d,P)},L)})})})},gxe=t=>{var E,S,T,x;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:s}=t,[,a]=M.useState(!1),l=M.useRef(null),{isPreview:c,emitSocketData:u}=Qt(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:g,userSelectedLanguage:m}=an(),v=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,w=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!1?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(tn,{})]}),o.jsxs("span",{className:w,children:["Row:"," ",((E=s==null?void 0:s.heading)==null?void 0:E[m==null?void 0:m.type])!==""?(S=s==null?void 0:s.heading)==null?void 0:S[m==null?void 0:m.type]:"Untitled"]})]}),c===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((x=(T=g[n])==null?void 0:T.children[r])==null?void 0:x.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(s,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>a(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},mxe={},vxe=t=>{var de,Z,ne,K,R,fe,be,Te,ye,Ae,re;const{isAdvanceView:e,isRenderView:n,isPreview:r,isAdmin:i,renderType:s,emitSocketData:a}=Qt(),{handleDrop:l}=an(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:g,page:m}=t,v=M.useRef(null),{userSelectedLanguage:A}=an(),{userTaskSubmitFormData:w,taskRegisterData:E,updateTaskRegisterData:S,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:x,removeUserDataFormSectionRepeatableData:_,task_status:I,TASK_PUBLISHED:F}=vr(),[P,L]=M.useState(!1),[{isDragging:V},z]=is({type:Oo,item:{type:Oo,uuid:c.uuid,children:c.children,path:u,data:c},collect:q=>({isDragging:q.isDragging()})}),O=V?.25:1;z(v);const U=(q,ie,W,ue,Ie,Ee)=>o.jsx(pxe,{page:m,row:c,section:g,data:q,path:ie,pageIndex:W,sectionIndex:ue,rowIndex:Ie,columnIndex:Ee,emitSocketData:a},`column-${u}-${q.uuid}`),te=It.findIndex(w,function(q){return(q==null?void 0:q.rowId)===(c==null?void 0:c.uuid)}),ge=()=>{var W,ue,Ie;const q=It.cloneDeep(E);((ue=(W=w[te])==null?void 0:W.repeatableFieldsData)==null?void 0:ue.length)>=(c==null?void 0:c.minimumEntries)?q[c==null?void 0:c.uuid]=(Ie=w[te])==null?void 0:Ie.repeatableFields:delete q[c==null?void 0:c.uuid];const ie=Object.keys(q).length;S(q),T(ie)},ee=(de=c==null?void 0:c.repeatableFields)==null?void 0:de.map(q=>{var ie;return{fieldUuid:q==null?void 0:q.uuid,field:q==null?void 0:q.uuid,header:(ie=q==null?void 0:q.label)==null?void 0:ie.english}}),Q=ee==null?void 0:ee.map(q=>o.jsx(Ar,{field:q.field,header:q.header,body:ie=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ie[q==null?void 0:q.field]}})})},q.field)),he=()=>{var ue;const q=[...w],ie=[];let W=!0;e:for(const[,Ie]of c.children.entries()){for(const[,Ee]of Ie.children.entries())if(Ee!=null&&Ee.isPostField&&Ee.isValid!==1){const ve={fieldId:Ee.uuid,rowIndex:h};console.log("inValidData",ve),ie.push(ve),Jt.emit("OnInvalidFieldCatch",ve),W=!1;break e}W=!0}W&&(ie==null?void 0:ie.length)===0&&(x(c==null?void 0:c.uuid,(ue=q[te])==null?void 0:ue.repeatableFields),Jt.emit("clearRepeatableFields",c==null?void 0:c.uuid),ge())},Y=q=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{_(c==null?void 0:c.uuid,q==null?void 0:q.rowIndex),setTimeout(()=>{ge()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...mxe,opacity:O,marginTop:`${(Z=c==null?void 0:c.margin)==null?void 0:Z.top}px`,marginBottom:`${(ne=c==null?void 0:c.margin)==null?void 0:ne.bottom}px`,marginLeft:`${(K=c==null?void 0:c.margin)==null?void 0:K.left}px`,marginRight:`${(R=c==null?void 0:c.margin)==null?void 0:R.right}px`},className:n?"row container-row":"draggable row container-row",children:[P&&o.jsx(Zg,{renderType:s,visibilty:P,setVisibility:L,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:a},"row_settings_"+d+f+h),r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsx(ui,{header:"Row",toggleable:!0,headerTemplate:q=>o.jsx(gxe,{options:q,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(fe=c==null?void 0:c.children)==null?void 0:fe.map((q,ie)=>{const W=`${u}-${ie}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:W,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),U(q,W,d,f,h,ie)]},W)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(be=c==null?void 0:c.children)==null?void 0:be.map((q,ie)=>{const W=`${u}-${ie}`;return o.jsx(M.Fragment,{children:U(q,W,d,f,h,ie)},W)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&I===F)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Te=c==null?void 0:c.heading)==null?void 0:Te[A==null?void 0:A.type]}),o.jsx("span",{children:(ye=c==null?void 0:c.subHeadingText)==null?void 0:ye[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((q,ie)=>{const W=`${u}-${ie}`;return o.jsx(M.Fragment,{children:U(q,W,d,f,h,ie)},W)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&I!==F&&o.jsx(qt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>he(),label:(Ae=c.addToListButtonLabel)==null?void 0:Ae[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(oo,{value:(w==null?void 0:w.length)>0?(re=w[te])==null?void 0:re.repeatableFieldsData:[],children:[Q,I!==F&&o.jsx(Ar,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:q=>Y(q)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:c})]})]})]})},bxe=t=>{var ge,ee,Q,he,Y,de,Z,ne;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Qt(),{handleDrop:s}=an(),{data:a,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:m,formBuilderFormLayout:v,userSelectedLanguage:A}=an(),[w,E]=M.useState(!1),[S,T]=M.useState(!1),[x,_]=M.useState({reusable_template_schema:""}),[I,F]=M.useState(!1),P=M.useRef(null),L=(K,R)=>{_(fe=>({...fe,[K]:R}))},[{isDragging:V},z]=is({type:ns,item:{type:ns,uuid:a.uuid,children:a.children,path:l},collect:K=>({isDragging:K.isDragging()})}),O=V?.25:1;z(P);const U=(K,R,fe,be,Te)=>o.jsx(vxe,{page:f,section:d,data:K,path:R,pageIndex:fe,sectionIndex:be,rowIndex:Te,emitSocketData:i},`row-${l}-${K.uuid}`),te=(K,R,fe)=>{var Ae,re;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!1?P:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ye,children:[fe+1," ",(Ae=a==null?void 0:a.heading)==null?void 0:Ae[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(R),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((re=v[R])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(R,fe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{L("reusable_template_schema",a),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(a,R,fe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>E(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:O,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(rp,{saveBuilderElementModalData:x,setSaveBuilderElementModalData:_,saveElementModal:S,setSaveElementModal:T}),w===!0&&o.jsx(np,{renderType:r,visibilty:w,setVisibility:E,section:a,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ui,{header:(ge=a==null?void 0:a.heading)==null?void 0:ge.english,toggleable:!0,headerTemplate:K=>te(K,c,u),onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[((ee=a==null?void 0:a.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(Q=a==null?void 0:a.subHeadingText)==null?void 0:Q[A==null?void 0:A.type]}),o.jsxs("div",{children:[a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:fe,childrenCount:a.children.length},onDrop:s}),U(K,fe,c,u,R)]},fe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:s,isLast:!0})]}),I&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(tn,{})})}),((he=v[c])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=a==null?void 0:a.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(de=a==null?void 0:a.subHeadingText)==null?void 0:de[A==null?void 0:A.type]}),o.jsx("div",{children:a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsx(M.Fragment,{children:U(K,fe,c,u,R)},fe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(a==null?void 0:a.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Z=a==null?void 0:a.heading)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("p",{children:(ne=a==null?void 0:a.subHeadingText)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("hr",{})]}),a.children.map((K,R)=>{const fe=`${l}-${R}`;return o.jsx(M.Fragment,{children:o.jsx("div",{className:"",children:U(K,fe,c,u,R)},fe)},fe)})]})})]})},yxe={position:"relative"},Axe=t=>{var S,T,x;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Qt(),{handleDrop:i}=an(),{data:s,path:a,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,m=M.useRef(null),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:s==null?void 0:s.uuid,children:s.children,path:a},collect:_=>({isDragging:_.isDragging()})}),w=v&&!n?.25:1;A(m);const E=(_,I,F,P,L,V,z)=>o.jsx(eu,{page:g,type:"field",row:h,column:s,section:f,field:_,data:_,path:I,pageIndex:F,sectionIndex:P,rowIndex:L,columnIndex:V,fieldIndex:z},`component-${a}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:e?{...yxe,opacity:w}:{},className:n?"":"draggable column container-column",children:r===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=s==null?void 0:s.children)==null?void 0:S.length)>0?(T=s==null?void 0:s.children)==null?void 0:T.map((_,I)=>{const F=`${a}-${I}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:F,childrenCount:s.children.length,droppedField:s},onDrop:i}),E(_,F,l,c,u,d,I)]},F)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${a}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(x=s==null?void 0:s.children)==null?void 0:x.map((_,I)=>{const F=`${a}-${I}`;return o.jsx(M.Fragment,{children:E(_,F,l,c,u,d,I)},F)})})})},wxe=t=>{var l;const{isAdvanceView:e}=Qt(),{data:n,page:r,currentPath:i,pageIndex:s}=t,a=(c,u,d,f,h,g,m,v)=>o.jsx(Axe,{page:r,row:v,section:m,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((m,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(M.Fragment,{children:a(m,A,s,u,h,v,c,f)},A)})})})})})})},Sxe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isRenderView:s,isPreview:a}=Qt(),{formBuilderFormSchema:l,handleDrop:c}=an(),u=M.useRef(null),[{},d]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,g,m,v)=>o.jsx(bxe,{data:h,section:h,path:g,page:e,pageIndex:m,sectionIndex:v},`section_${m}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${s?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!1?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,g)=>{const m=`${n}-${g}`;return o.jsxs(M.Fragment,{children:[i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:m,childrenCount:e.children.length},onDrop:c}),f(h,m,r,g)]},`section-${g}-${h.uuid}`)}),i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(wxe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,g)=>{const m=`${n}-${g}`;return o.jsx(M.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:f(h,m,r,g)})}):((h==null?void 0:h.isHidden)===!1||!a)&&f(h,m,r,g)},`section-${g}-${h.uuid}`)})})})})},xxe=()=>{const[t,e]=M.useState(!1),{formBuilderFormLayout:n}=an(),{isPreview:r}=Qt(),i=()=>{},s=(a,l,c)=>o.jsx(Sxe,{data:a,path:l,pageIndex:c},`page-${a.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((a,l)=>{const c=`${l}`;if((a==null?void 0:a.isHidden)===!1||!r)return o.jsxs("div",{children:[o.jsx(o1,{setVisibility:e,visibilty:t,pageIndex:l,page:a,emitSocketData:i}),s(a,c,l)]},`policie-page-${l}`)})})})})},Cxe={position:"relative"},Txe=t=>{var S;const{isPreview:e,isRenderView:n,isAdvanceView:r}=Qt(),{data:i,path:s,pageIndex:a,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,g=M.useRef(null),{handleDrop:m}=an(),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:i==null?void 0:i.uuid,children:i.children,path:s},collect:T=>({isDragging:T.isDragging()})}),w=v&&!n?.25:1;A(g);const E=(T,x,_,I,F,P,L)=>o.jsx(eu,{page:h,type:"field",row:f,section:d,field:T,data:T,path:x,pageIndex:_,sectionIndex:I,rowIndex:F,columnIndex:P,fieldIndex:L},`component-${s}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:r?{...Cxe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:!e&&o.jsxs("div",{children:[(S=i==null?void 0:i.children)==null?void 0:S.map((T,x)=>{const _=`${s}-${x}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:r,data:{path:_,childrenCount:i.children.length,droppedField:i},onDrop:m}),E(T,_,a,l,c,u,x)]},_)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:r,data:{path:`${s}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:m,isLast:!0})]})})},Exe={},Ixe=t=>{var Y,de,Z,ne,K,R,fe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,c=M.useRef(null),{userSelectedLanguage:u,handleDrop:d}=an(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:m,addUserDataFormSectionRepeatableData:v,removeUserDataFormSectionRepeatableData:A,task_status:w,TASK_PUBLISHED:E}=vr(),{isRenderView:S,isAdmin:T,isAdvanceView:x,emitSocketData:_,renderType:I}=Qt(),[F,P]=M.useState(!1),[{isDragging:L},V]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:be=>({isDragging:be.isDragging()})}),z=L?.25:1;V(c);const O=(be,Te,ye,Ae,re,q)=>o.jsx(Txe,{page:l,row:e,section:a,data:be,path:Te,pageIndex:ye,sectionIndex:Ae,rowIndex:re,columnIndex:q},`column-${n}-${be.uuid}`),U=It.findIndex(f,function(be){return(be==null?void 0:be.rowId)===(e==null?void 0:e.uuid)}),te=()=>{var ye,Ae,re;const be=It.cloneDeep(h);((Ae=(ye=f[U])==null?void 0:ye.repeatableFieldsData)==null?void 0:Ae.length)>=(e==null?void 0:e.minimumEntries)?be[e==null?void 0:e.uuid]=(re=f[U])==null?void 0:re.repeatableFields:delete be[e==null?void 0:e.uuid];const Te=Object.keys(be).length;g(be),m(Te)},ge=(Y=e==null?void 0:e.repeatableFields)==null?void 0:Y.map(be=>{var Te;return{fieldUuid:be==null?void 0:be.uuid,field:be==null?void 0:be.uuid,header:(Te=be==null?void 0:be.label)==null?void 0:Te.english}}),ee=ge==null?void 0:ge.map(be=>o.jsx(Ar,{field:be.field,header:be.header,body:Te=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Te[be==null?void 0:be.field]}})})},be.field)),Q=()=>{var Ae;const be=[...f],Te=[];let ye=!0;e:for(const[,re]of e.children.entries()){for(const[,q]of re.children.entries())if(console.log("field.isValid",q.isValid),q!=null&&q.isPostField&&q.isValid!==1){const ie={fieldId:q.uuid,rowIndex:s};console.log("inValidData",ie),Te.push(ie),Jt.emit("OnInvalidFieldCatch",ie),ye=!1;break e}ye=!0}ye&&(Te==null?void 0:Te.length)===0&&(v(e==null?void 0:e.uuid,(Ae=be[U])==null?void 0:Ae.repeatableFields),Jt.emit("clearRepeatableFields",e==null?void 0:e.uuid),te())},he=be=>o.jsx(o.Fragment,{children:o.jsx(qt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,be==null?void 0:be.rowIndex),setTimeout(()=>{te()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...Exe,opacity:z,marginTop:`${(de=e==null?void 0:e.margin)==null?void 0:de.top}px`,marginBottom:`${(Z=e==null?void 0:e.margin)==null?void 0:Z.bottom}px`,marginLeft:`${(ne=e==null?void 0:e.margin)==null?void 0:ne.left}px`,marginRight:`${(K=e==null?void 0:e.margin)==null?void 0:K.right}px`},className:S?"row container-row":"draggable row container-row",children:[F&&o.jsx(Zg,{renderType:I,visibilty:F,setVisibility:P,row:e,pageIndex:r,sectionIndex:i,rowIndex:s,emitSocketData:_},"row_settings_"+r+i+s),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((be,Te)=>{const ye=`${n}-${Te}`;return o.jsxs(M.Fragment,{children:[I===t0&&o.jsx(Fr,{isAdvanceView:x,data:{path:ye,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),O(be,ye,r,i,s,Te)]},ye)}),o.jsx(Fr,{isAdvanceView:x,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&w!==E&&o.jsx(qt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>Q(),label:(R=e.addToListButtonLabel)==null?void 0:R[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(oo,{value:(f==null?void 0:f.length)>0?(fe=f[U])==null?void 0:fe.repeatableFieldsData:[],children:[ee,w!==E&&o.jsx(Ar,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:be=>he(be)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},_xe=t=>{var O,U;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:s,page:a}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=an(),{isPreview:g,isAdvanceView:m,renderType:v,emitSocketData:A}=Qt(),[w,E]=M.useState(!1),[S,T]=M.useState(!1),[x,_]=M.useState({reusable_template_schema:""}),I=M.useRef(null),[{isDragging:F},P]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:te=>({isDragging:te.isDragging()})}),L=F?.25:1;P(I);const V=(te,ge,ee,Q,he)=>o.jsx(Ixe,{page:a,section:s,data:te,path:ge,pageIndex:ee,sectionIndex:Q,rowIndex:he},`row-${n}-${te.uuid}`),z=(te,ge,ee)=>{var de,Z;const Q=te.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",he=`${te.className} justify-content-space-between panel-tab-section`,Y=`${te.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:he,children:[o.jsxs("span",{ref:g===!1?I:null,children:[o.jsx("button",{className:te.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:te.togglerClassName,onClick:te.onTogglerClick,children:[o.jsx("span",{className:Q}),o.jsx(tn,{})]}),o.jsxs("span",{className:Y,children:[ee+1," ",(de=e==null?void 0:e.heading)==null?void 0:de[f==null?void 0:f.type]]})]}),g===!1&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:te.togglerClassName,onClick:()=>{c(ge),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((Z=d[ge])==null?void 0:Z.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:te.togglerClassName,onClick:()=>{l(ge,ee),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:te.togglerClassName,onClick:()=>{u(e,ge,ee),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:te.togglerClassName,onClick:()=>E(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:L,marginBottom:20},className:m?"draggable row":"",children:[g===!1&&o.jsx(rp,{saveBuilderElementModalData:x,setSaveBuilderElementModalData:_,saveElementModal:S,setSaveElementModal:T}),w===!0&&o.jsx(np,{renderType:v,visibilty:w,setVisibility:E,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!1?o.jsxs(ui,{className:"mb-5",header:(O=e==null?void 0:e.heading)==null?void 0:O.english,toggleable:!0,headerTemplate:te=>z(te,r,i),children:[o.jsx("p",{children:(U=e==null?void 0:e.subHeadingText)==null?void 0:U[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((te,ge)=>{const ee=`${n}-${ge}`;return o.jsx(M.Fragment,{children:V(te,ee,r,i,ge)},ee)}),o.jsx(Fr,{isAdvanceView:m,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]}):o.jsx(o.Fragment,{})]})},Dxe=t=>{const{isRenderView:e,isPreview:n}=Qt(),{data:r,path:i,pageIndex:s}=t,a=M.useRef(null),[,l]=is({type:ns,item:{type:ns,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(a);const c=(u,d,f,h)=>o.jsx(_xe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${e?"":"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx(o.Fragment,{}):o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(M.Fragment,{children:c(u,f,s,d)},`section-${d}-${u.uuid}`)})})})},h6=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:s,title:a}=t,[l,c]=M.useState(!1),{userTrainingSaveData:u}=vr(),d=h=>{var g,m;if(u!==null&&h){const v=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(g=u[v])!=null&&g.isSeen?(m=u[v])==null?void 0:m.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const m=u.findIndex(v=>(v==null?void 0:v.fieldId)===(i==null?void 0:i.uuid));h=u[m].logs}else h=[];return h==null?void 0:h.map((m,v)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[m==null?void 0:m.action," on ",((m==null?void 0:m.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Fn(m==null?void 0:m.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(m==null?void 0:m.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((m==null?void 0:m.videoTime)/(m==null?void 0:m.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((m==null?void 0:m.videoTime)/(m==null?void 0:m.totalTime)*100),"%"]})]})]},`logs_${v}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(qt,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(qt,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(qt,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[s+1," - ",a]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[s+1," - ",a]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(qt,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${s}`)},Nxe=t=>{var S,T,x,_,I,F;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:s,setvideoJsOptions:a,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=vr(),g=(S=d==null?void 0:d.training)!=null&&S.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},m=P=>{if(f!==null){const L=[...f],V=L.findIndex(z=>(z==null?void 0:z.fieldId)===(P==null?void 0:P.uuid));V>=0&&(L[V]={...L[V],isSeen:!0}),h([...L])}},v=P=>{var L;i(P),s(l),a({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(L=P==null?void 0:P.media_url)==null?void 0:L.english}]})},A=P=>{var L;m(P),i(P),c((L=P==null?void 0:P.media_url)==null?void 0:L.english),s(l)},w=P=>{m(P),i(P),u(P==null?void 0:P.documents),s(l)},E=P=>{var L,V;(L=P==null?void 0:P.quizSchema)!=null&&L.assessment_id&&(g((V=P==null?void 0:P.quizSchema)==null?void 0:V.assessment_id),s(l),i(P))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(h6,{title:(x=e==null?void 0:e.title)==null?void 0:x.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:v,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(h6,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(h6,{title:(I=e==null?void 0:e.title)==null?void 0:I.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:w,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(h6,{title:(F=e==null?void 0:e.quizSchema)==null?void 0:F.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:E,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},Oxe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:s,setCurrentItem:a,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(Nxe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:a,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:s,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},Fxe=t=>{var m,v,A,w,E,S,T,x,_,I;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:s,index:a,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Qt(),g=(m=h==null?void 0:h.image)!=null&&m.MediaImage?(v=h==null?void 0:h.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:F=>{e(P=>{var L;return(L=n==null?void 0:n.answersText)==null?void 0:L[r==null?void 0:r.type]}),i(F,a,l,n,c),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((w=n.answersText)==null?void 0:w[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(ss,{inputId:a,value:n.answersText,checked:((E=n.answersText)==null?void 0:E[r==null?void 0:r.type])===f,onChange:F=>{u({isCorrect:null,text:null}),e(P=>{var L;return(L=F.target.value)==null?void 0:L[r==null?void 0:r.type]}),i(F,a,l,n,c),s(!0)}}),((S=n.answersTextImage)==null?void 0:S[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(g,{mediaId:(x=n.answersTextImage)==null?void 0:x[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:a,children:(_=n.answersText)==null?void 0:_[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((I=n.answersText)==null?void 0:I[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct Answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong Answer"]}):""})]},a)},kxe=t=>{var g,m,v,A,w,E,S;const{media:e}=Qt(),n=(g=e==null?void 0:e.image)!=null&&g.MediaImage?(m=e==null?void 0:e.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:s,setIsOptionSelected:a,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return M.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(x=>{var _;return x===((_=i.answersText)==null?void 0:_[s==null?void 0:s.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[s==null?void 0:s.type]),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var x;return(T==null?void 0:T.text)===((x=i.answersText)==null?void 0:x[s==null?void 0:s.type])}))?d!=null&&d.some(T=>{var x;return(T==null?void 0:T.text)===((x=i.answersText)==null?void 0:x[s==null?void 0:s.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((v=i.answersText)==null?void 0:v[s==null?void 0:s.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(zr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var x;return T===((x=i.answersText)==null?void 0:x[s==null?void 0:s.type])}),onChange:T=>{var x;h(T.checked,(x=T.target.value)==null?void 0:x[s==null?void 0:s.type],i,c),a(!0)}}),((A=i.answersTextImage)==null?void 0:A[s==null?void 0:s.type])&&((w=i.answersTextImage)==null?void 0:w[s==null?void 0:s.type])!==""&&o.jsx(n,{mediaId:(E=i.answersTextImage)==null?void 0:E[s==null?void 0:s.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(S=i.answersText)==null?void 0:S[s==null?void 0:s.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var x;return(T==null?void 0:T.text)===((x=i.answersText)==null?void 0:x[s==null?void 0:s.type])}))?d!=null&&d.some(T=>{var x;return(T==null?void 0:T.text)===((x=i.answersText)==null?void 0:x[s==null?void 0:s.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function bj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pxe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yj(t,e,n){return e&&Pxe(t.prototype,e),t}function Aj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jS(t,e)}function p6(t){return p6=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},p6(t)}function jS(t,e){return jS=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},jS(t,e)}function Mxe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Lxe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bxe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:Lxe(t)}function wj(t){var e=Mxe();return function(){var r=p6(t),i;if(e){var s=p6(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return Bxe(this,i)}}function Vxe(t){return Uxe(t)||qxe(t)||$xe(t)||jxe()}function Uxe(t){if(Array.isArray(t))return zS(t)}function qxe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function $xe(t,e){if(t){if(typeof t=="string")return zS(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 zS(t,e)}}function zS(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 jxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4288
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function em(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",s=r?r[3]:"",a=r?r[2]:n,l=a.length>=e?a:(Vxe(Array(e)).map(function(){return"0"}).join("")+a).slice(e*-1);return"".concat(i).concat(l).concat(s)}var Sj={daysInHours:!1,zeroPadTime:2};function zxe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,s=i===void 0?0:i,a=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,a||(d+=c);var f=a?d:d-r(),h=Math.min(20,Math.max(0,s)),g=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),m=Math.abs(g)/1e3;return{total:g,days:Math.floor(m/(3600*24)),hours:Math.floor(m/3600%24),minutes:Math.floor(m/60%60),seconds:Math.floor(m%60),milliseconds:Number((m%1*1e3).toFixed()),completed:g<=0}}function Hxe(t,e){var n=t.days,r=t.hours,i=t.minutes,s=t.seconds,a=Object.assign(Object.assign({},Sj),e),l=a.daysInHours,c=a.zeroPadTime,u=a.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?em(r+n*24,c):em(r,f);return{days:l?"":em(n,d),hours:h,minutes:em(i,f),seconds:em(s,f)}}var xj=function(t){Aj(n,t);var e=wj(n);function n(){var r;return bj(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(s){return{count:s.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(s){return{count:s.count+i}},r.startCountdown)},r}return yj(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?M.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(M.Component);xj.propTypes={count:us.number,children:us.element,onComplete:us.func};var tm=function(t){Aj(n,t);var e=wj(n);function n(r){var i;if(bj(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var a=i.calcTimeDelta(),l=a.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(a,void 0,l)},i.setLegacyCountdownRef=function(a){i.legacyCountdownRef=a},i.start=function(){if(!i.isStarted()){var a=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=a?i.calcOffsetStartTimestamp()-a:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var s=i.calcTimeDelta();i.state={timeDelta:s,status:s.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return yj(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,s=i.date,a=i.now,l=i.precision,c=i.controlled,u=i.overtime;return zxe(s,{now:a,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,s,a){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&s==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){a&&a(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=s||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!s&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,s=i.daysInHours,a=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:Hxe(c,{daysInHours:s,zeroPadTime:a,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,s=i.count,a=i.children,l=i.onComplete;return M.createElement(xj,{ref:this.setLegacyCountdownRef,count:s,onComplete:l},a)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,g=this.getRenderProps();if(h)return h(g);if(f&&this.state.timeDelta.completed&&!d)return M.cloneElement(f,{countdown:g});var m=g.formatted,v=m.days,A=m.hours,w=m.minutes,E=m.seconds;return M.createElement("span",{className:u},g.total<0?"-":"",v,v?":":"",A,":",w,":",E)}}]),n}(M.Component);tm.defaultProps=Object.assign(Object.assign({},Sj),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),tm.propTypes={date:us.oneOfType([us.instanceOf(Date),us.string,us.number]),daysInHours:us.bool,zeroPadTime:us.number,zeroPadDays:us.number,controlled:us.bool,intervalDelay:us.number,precision:us.number,autoStart:us.bool,overtime:us.bool,className:us.string,children:us.element,renderer:us.func,now:us.func,onMount:us.func,onStart:us.func,onPause:us.func,onStop:us.func,onTick:us.func,onComplete:us.func};const Yxe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,s,a;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(tm,{renderer:n,date:Date.now()+parseInt((a=(s=t==null?void 0:t.time_limit)==null?void 0:s.time_limit_info)==null?void 0:a.num_of_mins)*60*1e3})})},Kxe=M.memo(Yxe),Xxe=t=>{var d,f,h,g;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,s]=M.useState(Date.now()),[a,l]=M.useState(!1),c=M.useCallback(()=>{s(Date.now()),l(!1)},[r]);M.useEffect(()=>{c()},[r,c]);const u=m=>(m.seconds<10&&(m.seconds="0"+m.seconds),m.minutes===0&&(m.minutes="0"+m.minutes),m.completed&&!a?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[m.minutes,":",m.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(tm,{renderer:u,date:i+parseInt((g=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:g.time_per_question)*1e3,intervalDelay:0},i)})},Rxe=()=>{const t=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(s)},e=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(s)},n=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(s)},r=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(s)},i=s=>{s.play().then(()=>{}).catch(a=>{console.info("Not Played,"+a.error+a.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},Gxe="1",Cj=t=>{var ve,me,Se,De,$,oe,pe,ce;const e=le=>{const[ae,Oe]=M.useState(le),Ne=M.useRef(ae);return M.useEffect(()=>{Ne.current=ae},[ae]),[ae,Ne,Oe]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:s}=vr(),[a,l]=M.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:g,setAssessmentModal:m=()=>{},saveNewQuizData:v}=t,{quizStartAlert:A}=Rxe(),{userSelectedLanguage:w}=an(),[E,,S]=e(0),{media:T}=Qt(),x=(ve=T==null?void 0:T.image)!=null&&ve.MediaImage?(me=T==null?void 0:T.image)==null?void 0:me.MediaImage:o.jsx(o.Fragment,{}),[_,I,F]=e(null),[P,L]=M.useState(!1),[V,,z]=e([]),[O,U]=M.useState(!1),[te,ge]=M.useState(!1),[ee,Q]=M.useState(0),[he,Y]=M.useState(0),[de,Z]=M.useState(0),[ne,K]=M.useState(!1),[R,fe]=M.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},M.useEffect(()=>{O||U(!0)},[V,P,O]),M.useEffect(()=>{u!==null&&(A(),be())},[]);const be=()=>{Y(u.quizConfiguration.quizPassMark)},Te=M.useCallback((le,ae,Oe,Ne,Ke)=>{const dt=[...V];if((Ke==null?void 0:Ke.answerInputType)!=="checkbox"){const pt={uuid:Ke==null?void 0:Ke.uuid,question:Ke==null?void 0:Ke.questionText,isCorrect:Ne.isCorrect,selectedAnswer:Ne.answersText,viewed:!0},ht=V.findIndex(Ft=>(Ft==null?void 0:Ft.uuid)===Ke.uuid);ht>=0?(dt[ht]={...dt[ht],...pt},z(dt)):z([...V,pt])}},[_]),ye=le=>{var ae;if(E!==0){const Oe=[...V],Ne=E-1;F((ae=Oe[Ne])==null?void 0:ae.selectedAnswer[w==null?void 0:w.type]),L(!0),S(Ne),Ae(0)}},Ae=le=>{for(const ae of V)if(ae.questionIndex===E+le){F(ae.selectedAnswerEnglish);break}},re=(le,ae,Oe,Ne)=>{var pt;const Ke=[..._];if(le)Ke.push(ae);else{const ht=Ke.findIndex(Ft=>Ft===ae);ht>=0&&Ke.splice(ht,1)}F(Ke);const dt=[...V];if((Ne==null?void 0:Ne.answerInputType)==="checkbox"){let ht=!1;for(const[,Vt]of(Ne==null?void 0:Ne.answerOptions.entries())||[])if(Vt.isCorrect===!0)if(It.includes(Ke,(pt=Vt==null?void 0:Vt.answersText)==null?void 0:pt[w==null?void 0:w.type]))ht=!0;else{ht=!1;break}const Ft={uuid:Ne==null?void 0:Ne.uuid,question:Ne==null?void 0:Ne.questionText,isCorrect:ht,selectedAnswer:Oe.answersText,viewed:!0},An=V.findIndex(Vt=>(Vt==null?void 0:Vt.uuid)===Ne.uuid);An>=0?(dt[An]={...dt[An],...Ft},z(dt)):z([...V,Ft])}},q=M.useCallback(()=>{var dt,pt,ht,Ft,An,Vt,Nt,$e,yt,jt,fn,gn;const le=I.current,ae=It.findIndex((dt=u==null?void 0:u.quizElements[E])==null?void 0:dt.answerOptions,function(En){return En.isCorrect===!0}),Oe=u==null?void 0:u.quizElements[E],Ne=(ht=(pt=Oe==null?void 0:Oe.answerOptions[ae])==null?void 0:pt.answersText)!=null&&ht[w==null?void 0:w.type]?(An=(Ft=Oe==null?void 0:Oe.answerOptions[ae])==null?void 0:Ft.answersText)==null?void 0:An[w==null?void 0:w.type]:"",Ke=(Vt=V[E])!=null&&Vt.isCorrect?1:0;if(u!=null&&u.quizElements&&E+1!==(u==null?void 0:u.quizElements.length)){const En={assessment_user_attempt_id:($e=i==null?void 0:i.assesment_user_attempts[((Nt=i==null?void 0:i.assesment_user_attempts)==null?void 0:Nt.length)-1])==null?void 0:$e.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(yt=Oe.questionText)==null?void 0:yt[w==null?void 0:w.type],question_uid:Oe==null?void 0:Oe.uuid,start_time:a,finish_time:new Date,correct_answer:Ne,selected_answer:Array.isArray(le)?le.toString():le,is_correct_answer:Ke};r(En),F(null),S(E+1),l(new Date),Ae(2)}else if((u==null?void 0:u.quizElements.length)===E+1){const En={assessment_user_attempt_id:(fn=i==null?void 0:i.assesment_user_attempts[((jt=i==null?void 0:i.assesment_user_attempts)==null?void 0:jt.length)-1])==null?void 0:fn.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:Oe==null?void 0:Oe.uuid,question:(gn=Oe.questionText)==null?void 0:gn[w==null?void 0:w.type],start_time:a,finish_time:new Date,correct_answer:Ne,selected_answer:Array.isArray(le)?le.toString():le,is_correct_answer:Ke};r(En),ie(),ue()}L(!1)},[E,V]),ie=()=>{ge(!0)},W=()=>{Ee?(console.log("Restart"),g(L3),v(),U(!0),A(),be(),S(0),F(null),L(!1),z([]),ge(!1),Q(0),Z(0),K(!1),fe({isCorrect:null,text:null})):(g(t2),m(!1))},ue=()=>{var Ke,dt;let le=0,ae=0,Oe=!1;for(const pt of V)pt!=null&&pt.isCorrect&&le++;Q(le),ae=le/((Ke=u==null?void 0:u.quizElements)==null?void 0:Ke.length)*100,ae=Math.round(ae),Z(ae),Oe=ae>=he,K(Oe);const Ne={...u,...i,result:ae,status:Oe,selectedAnswers:V};d(Ne),n({session_id:c,is_pass:Oe?1:0,score:le,out_of:(dt=u==null?void 0:u.quizElements)==null?void 0:dt.length,finish_time:new Date,status:1})},Ie=()=>{var le,ae,Oe,Ne,Ke,dt,pt;if(((le=u==null?void 0:u.quizElements[E])==null?void 0:le.answerInputType)==="radio"){const ht=It.findIndex((ae=u==null?void 0:u.quizElements[E])==null?void 0:ae.answerOptions,function(Ft){return Ft.isCorrect===!0});_===((Ke=(Ne=(Oe=u==null?void 0:u.quizElements[E])==null?void 0:Oe.answerOptions[ht])==null?void 0:Ne.answersText)==null?void 0:Ke[w==null?void 0:w.type])?fe({isCorrect:!0,text:_}):fe({isCorrect:!1,text:_})}if(((dt=u==null?void 0:u.quizElements[E])==null?void 0:dt.answerInputType)==="checkbox"){const ht=(pt=u==null?void 0:u.quizElements[E])==null?void 0:pt.answerOptions.filter(Ft=>Ft.isCorrect===!0);if(_!=null&&_.length){const Ft=_==null?void 0:_.map(An=>({isCorrect:ht==null?void 0:ht.some(Vt=>{var Nt;return((Nt=Vt==null?void 0:Vt.answersText)==null?void 0:Nt[w==null?void 0:w.type])===An}),text:An}));fe(Ft)}}},Ee=(i==null?void 0:i.noOfAttempts)-((Se=i==null?void 0:i.assesment_user_attempts)==null?void 0:Se.length)>0&&!ne;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[te&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(De=s==null?void 0:s.assessment)==null?void 0:De.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",ee," out of"," ",($=u==null?void 0:u.quizElements)==null?void 0:$.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",de,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",he,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",ne?o.jsx(qc,{severity:"success",value:"Passed"}):o.jsx(qc,{severity:"danger",value:"Failed"})]}),ne&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:te&&o.jsx("div",{className:"text-center my-5",children:o.jsx(qt,{label:Ee?"Restart":"End",onClick:()=>W()})})})]})]})})}),te&&((oe=i==null?void 0:i.assessment_type)==null?void 0:oe.key)===Gxe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:V==null?void 0:V.map((le,ae)=>{var Oe,Ne;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(Oe=le==null?void 0:le.question)==null?void 0:Oe[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(Ne=le==null?void 0:le.selectedAnswer)==null?void 0:Ne[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),le!=null&&le.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(R4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(R4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},ae)})})})]}),f!==UD?o.jsx(o.Fragment,{children:te&&o.jsx("div",{className:"text-center my-5",children:o.jsx(qt,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{g(t2)}})})}):o.jsx(o.Fragment,{}),O&&!te&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(Kxe,{assessmentData:i,setDisplaySummary:ge}),o.jsx(Xxe,{currentQuestionIndex:E,assessmentData:i,onNextQuestion:q})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(pe=u==null?void 0:u.quizElements)==null?void 0:pe.map((le,ae)=>{var Oe,Ne,Ke,dt,pt;return o.jsxs("div",{className:"quiz-card-box",children:[E===ae&&((Oe=le==null?void 0:le.questionTextImage)==null?void 0:Oe[w==null?void 0:w.type])&&((Ne=le==null?void 0:le.questionTextImage)==null?void 0:Ne[w==null?void 0:w.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(x,{mediaId:(Ke=le==null?void 0:le.questionTextImage)==null?void 0:Ke[w==null?void 0:w.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:E===ae&&((dt=le==null?void 0:le.questionText)==null?void 0:dt[w==null?void 0:w.type])}),E===ae&&((pt=le==null?void 0:le.answerOptions)==null?void 0:pt.map((ht,Ft)=>(le==null?void 0:le.answerInputType)==="checkbox"?o.jsx(M.Fragment,{children:o.jsx(kxe,{onChangeCheckbox:re,setSelectedOption:F,quiz:ht,userSelectedLanguage:w,onSetAnswer:Te,setIsOptionSelected:L,index:Ft,eleIndex:ae,ele:le,setCorrectAnswerCheck:fe,correctAnswerCheck:R,selectedOption:_})},`checkbox-question-${Ft}`):o.jsx(M.Fragment,{children:o.jsx(Fxe,{setSelectedOption:F,quiz:ht,userSelectedLanguage:w,onSetAnswer:Te,setIsOptionSelected:L,index:Ft,eleIndex:ae,ele:le,setCorrectAnswerCheck:fe,correctAnswerCheck:R,selectedOption:_})},`radio-question-${Ft}`)))]},ae)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",E+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),E>0&&o.jsx(qt,{size:"large",className:"mx-2",label:"Previous",onClick:le=>ye()}),((i==null?void 0:i.skippable)===!0||P===!0)&&o.jsx(qt,{size:"large",label:(u==null?void 0:u.quizElements.length)===E+1?"Finish":P===!0?"Next":"Skip",onClick:q}),P===!0&&((ce=i==null?void 0:i.assessment_type)==null?void 0:ce.key)==="1"&&o.jsx(qt,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>Ie()})]})]})]})})},Wxe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:s,currentItem:a}=t,{userTrainingSaveData:l}=vr();M.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var g,m,v,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(v=(m=(g=d==null?void 0:d.layout[0])==null?void 0:g.children[0])==null?void 0:m.children[0])==null?void 0:v.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=Vm.shuffle(h).map((w,E)=>({...w}))),f!=null&&f.randomiseAnswers&&(h=h.map((w,E)=>({...w,answerOptions:Vm.shuffle(w==null?void 0:w.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(g=>(g==null?void 0:g.fieldId)===(a==null?void 0:a.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}s()}};return o.jsx("div",{children:n&&o.jsx(Cj,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},Qxe=t=>{var v,A;const{currentItem:e,videoJsOptions:n}=t,r=M.useRef(null),{userTrainingSaveData:i,updateUserTraining:s,taskRegisterData:a}=vr(),{media:l}=Qt(),c=(v=l==null?void 0:l.video)!=null&&v.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=w=>{r.current=w,w.on("waiting",()=>{_t.log("player is waiting")}),w.on("dispose",()=>{_t.log("player will dispose")})},d=w=>{if(i!==null){const E=[...i],S=E==null?void 0:E.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid));S>=0&&(E[S].seenTime=w==null?void 0:w.target.currentTime)}},f=w=>{const E=[...i],S=E==null?void 0:E.findIndex(T=>(T==null?void 0:T.fieldId)===(w==null?void 0:w.uuid));S>=0&&(i[S]={...i[S],isSeen:!0},s(E),h("Ended"))},h=w=>{const E=r.current,S=i!==null?i==null?void 0:i.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid)):-1;S>=0&&i[S].logs.push({action:w,videoTime:i[S].seenTime,totalTime:E.duration,timeState:new Date})},g=w=>{const{mediaId:E}=w,[S,T]=M.useState(!1);return M.useEffect(()=>{if(!S&&i!==null){const x=i.findIndex(_=>(_==null?void 0:_.fieldId)===(e==null?void 0:e.uuid));if(x>=0){T(!0);const _=r.current;_.currentTime=i[x].seenTime}T(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:E,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},m=M.useCallback(w=>o.jsx(g,{mediaId:w}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:m(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(rV,{options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},g6=t=>{var _,I,F,P,L,V;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=vr(),[s]=M.useState(!1),[,a]=M.useState(fy),[l,c]=M.useState([]),[u,d]=M.useState(null),{userSelectedLanguage:f}=an(),[h,g]=M.useState(null),[m,v]=M.useState(null),A=(_=i==null?void 0:i.training)!=null&&_.getAssessmentByIdFromStore?(I=i==null?void 0:i.training)==null?void 0:I.getAssessmentByIdFromStore:()=>{},w=(F=i==null?void 0:i.training)!=null&&F.TrainingOverView?(P=i==null?void 0:i.training)==null?void 0:P.TrainingOverView:()=>o.jsx(o.Fragment,{}),[E,S]=M.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});M.useEffect(()=>{s||T()},[s]);const T=()=>{var z,O,U,te,ge,ee,Q,he,Y,de,Z,ne,K,R,fe,be,Te,ye,Ae,re,q;switch(g((U=(O=(z=e[0])==null?void 0:z.children[0])==null?void 0:O.children[0])==null?void 0:U.children[0]),v(e[0]),(Q=(ee=(ge=(te=e[0])==null?void 0:te.children[0])==null?void 0:ge.children[0])==null?void 0:ee.children[0])==null?void 0:Q.componentType){case"video":S({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(ne=(Z=(de=(Y=(he=e[0])==null?void 0:he.children[0])==null?void 0:Y.children[0])==null?void 0:de.children[0])==null?void 0:Z.media_url)==null?void 0:ne.english}]});break;case"image":a((Te=(be=(fe=(R=(K=e[0])==null?void 0:K.children[0])==null?void 0:R.children[0])==null?void 0:fe.children[0])==null?void 0:be.media_url)==null?void 0:Te.english);break;case"document":c((q=(re=(Ae=(ye=e[0])==null?void 0:ye.children[0])==null?void 0:Ae.children[0])==null?void 0:re.children[0])==null?void 0:q.documents);break}},x=z=>{switch(z==null?void 0:z.componentType){case"video":return o.jsx("div",{children:o.jsx(Qxe,{videoJsOptions:E,currentItem:z},z==null?void 0:z.uuid)});case"image":return o.jsx(ik,{field:z,isPreview:!0});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((O,U)=>o.jsx("li",{children:o.jsx("a",{href:O==null?void 0:O.url,children:O==null?void 0:O.url})},`document-item-${U}`))})]});case"quiz":return A!=null&&A.form_template_schema?o.jsx(Wxe,{renderIn:UD,getAssessmentByIdFromStore:A,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:z}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("h3",{children:[(L=m==null?void 0:m.heading)==null?void 0:L[f==null?void 0:f.type]," -"," ",(V=h==null?void 0:h.title)==null?void 0:V[f==null?void 0:f.type]," "]}),x(h),n&&o.jsx(w,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((z,O)=>{var U,te;return o.jsxs(ui,{className:"mb-5",header:(U=z==null?void 0:z.heading)==null?void 0:U.english,toggleable:!0,children:[o.jsx("p",{children:(te=z==null?void 0:z.subHeadingText)==null?void 0:te[f==null?void 0:f.type]}),z.children.map((ge,ee)=>{const Q=`${ee}`;return o.jsx("div",{children:ge.children.map((he,Y)=>{const de=`${ee}-${Q}`;return o.jsx(Oxe,{setCurrentSection:v,section:z,setCurrentItem:g,currentItem:h,path:de,fields:he.children,setvideoJsOptions:S,setImage:a,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${Y}`)})},`training-sidebar-container-${ee}`)})]},`train-sidebar-panel-${O}`)})})]})};g6.defaultProps={showInfoPanel:!0,sections:{},updateTrainingProgress:()=>{}},g6.propTypes={showInfoPanel:xn.bool,sections:xn.array,updateTrainingProgress:xn.func};const Jxe=()=>{var r;const{formBuilderFormLayout:t}=an(),{isPreview:e}=Qt(),n=(i,s,a)=>o.jsx(Dxe,{data:i,path:s,pageIndex:a},`page-${i.uuid}`);return e?o.jsx(g6,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,s)=>{const a=`${s}`;return o.jsx("div",{children:n(i,a,s)},`exam-page-${s}`)})})})},Zxe=t=>{var _,I,F,P,L;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=an(),s=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:a}=t,[l,c]=M.useState(),[u,d]=M.useState([]),{media:f}=Qt(),h=(_=f==null?void 0:f.image)!=null&&_.MediaImage?(I=f==null?void 0:f.image)==null?void 0:I.MediaImage:o.jsx(o.Fragment,{}),g={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(a==null?void 0:a.length)>0?a:s},[m,v]=M.useState(0),[A,w]=M.useState(!1);function E(V,z){return(V==null?void 0:V.length)<=z?V:(V==null?void 0:V.slice(0,z))+"..."}M.useEffect(()=>{w(!0)},[]);const S=()=>{m!==0&&v(m-1)},T=()=>{if(g!=null&&g.quizElements&&m+1!==(g==null?void 0:g.quizElements.length))v(m+1);else if((g==null?void 0:g.quizElements.length)===m+1)return},x=(V,z)=>{let O=[...u];V.checked?O.push(z):O=O.filter(U=>(U==null?void 0:U[e==null?void 0:e.type])!==(z==null?void 0:z[e==null?void 0:e.type])),d(O)};return o.jsxs("div",{className:"scroll-height-200 mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[g==null?void 0:g.name," "]}),(F=g==null?void 0:g.quizElements)==null?void 0:F.map((V,z)=>{var O,U,te,ge,ee,Q,he,Y,de;return(V==null?void 0:V.answerInputType)==="radio"?o.jsxs("div",{className:m===z?"card":" flex align-items-center p-field-radiobutton",children:[((O=V==null?void 0:V.questionTextImage)==null?void 0:O[e==null?void 0:e.type])&&((U=V==null?void 0:V.questionTextImage)==null?void 0:U[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(te=V==null?void 0:V.questionTextImage)==null?void 0:te[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:m===z&&((ge=V==null?void 0:V.questionText)==null?void 0:ge[e==null?void 0:e.type])}),m===z&&((ee=V==null?void 0:V.answerOptions)==null?void 0:ee.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ss,{inputId:`${ne}-preview`,value:Z==null?void 0:Z.answersText,checked:l===ne,onChange:()=>{c(ne)}}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${ne}-preview`,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z):(V==null?void 0:V.answerInputType)==="checkbox"?o.jsxs("div",{className:m===z?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:m===z&&((Q=V==null?void 0:V.questionText)==null?void 0:Q[e==null?void 0:e.type])}),m===z&&((he=V==null?void 0:V.answerOptions)==null?void 0:he.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(zr,{inputId:ne,value:Z==null?void 0:Z.answersText,onChange:Te=>{x(Te,Z==null?void 0:Z.answersText)},checked:u.some(Te=>{var ye;return(Te==null?void 0:Te[e==null?void 0:e.type])===((ye=Z==null?void 0:Z.answersText)==null?void 0:ye[e==null?void 0:e.type])})}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:ne,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z):o.jsxs("div",{className:m===z?"card":"",children:[o.jsx("h3",{className:"mb-5",children:m===z&&((Y=V==null?void 0:V.questionText)==null?void 0:Y[e==null?void 0:e.type])}),m===z&&((de=V==null?void 0:V.answerOptions)==null?void 0:de.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ss,{inputId:ne,value:Z==null?void 0:Z.answersText,onChange:()=>{}}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:ne,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",m+1+"/"+(g==null?void 0:g.quizElements.length)]}),o.jsx("br",{}),m>0&&o.jsx(qt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>S()}),o.jsx(qt,{text:!0,label:(g==null?void 0:g.quizElements.length)===m+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(P=g==null?void 0:g.quizElements)==null?void 0:P.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(qc,{className:"mr-2",severity:"success",value:"True"}):o.jsx(qc,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question Time Limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam Time Limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Questions Randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(L=g==null?void 0:g.quizElements)==null?void 0:L.map((V,z)=>{var O;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:E(((O=V==null?void 0:V.questionText)==null?void 0:O[e==null?void 0:e.type])||"",30)})})},`preview-question-${z}`)})})})]})]})]})]})},eCe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,columnIndex:a,section:l,row:c,page:u}=t,d=M.useRef(null),{handleDrop:f}=an(),{isRenderView:h,isAdvanceView:g,isPreview:m}=Qt(),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:x=>({isDragging:x.isDragging()})}),E={position:"relative",opacity:v&&!h?.25:1};A(d);const S=(x,_,I,F,P,L,V)=>o.jsx(eu,{page:u,type:"field",row:c,section:l,field:x,data:x,path:_,pageIndex:I,sectionIndex:F,rowIndex:P,columnIndex:L,fieldIndex:V},`component-${n}-${x==null?void 0:x.uuid}`);return o.jsx("div",{style:g?E:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:m===!1?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((x,_)=>{const I=`${n}-${_}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,fieldDropArea:!0,data:{path:I,childrenCount:e.children.length,droppedField:e},onDrop:f}),S(x,I,r,i,s,a,_)]},I)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Fr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(Zxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},tCe={},nCe=t=>{var m,v,A,w;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,c=M.useRef(null),{isRenderView:u}=Qt(),[{isDragging:d},f]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:E=>({isDragging:E.isDragging()})}),h=d?.25:1;f(c);const g=(E,S,T,x,_,I)=>o.jsx(eCe,{page:l,row:e,section:a,data:E,path:S,pageIndex:T,sectionIndex:x,rowIndex:_,columnIndex:I},`column-${n}-${E.uuid}`);return o.jsx("div",{style:{...tCe,opacity:h,marginTop:`${(m=e==null?void 0:e.margin)==null?void 0:m.top}px`,marginBottom:`${(v=e==null?void 0:e.margin)==null?void 0:v.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(w=e==null?void 0:e.margin)==null?void 0:w.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((E,S)=>{const T=`${n}-${S}`;return o.jsx(M.Fragment,{children:g(E,T,r,i,s,S)},T)})})})},rCe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:s,page:a}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Qt(),[f,h]=M.useState(!1),[g,m]=M.useState(!1),[v,A]=M.useState(null),w=M.useRef(null),[{isDragging:E},S]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),T=E?.25:1;S(w);const x=(_,I,F,P,L)=>o.jsx(nCe,{page:a,section:s,data:_,path:I,pageIndex:F,sectionIndex:P,rowIndex:L},`row-${n}-${_.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(rp,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:A,saveElementModal:g,setSaveElementModal:m}),f===!0&&o.jsx(np,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((_,I)=>{const F=`${n}-${I}`;return o.jsx(M.Fragment,{children:x(_,F,r,i,I)},F)})})]})},iCe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Qt(),s=M.useRef(null),[{},a]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});a(s);const l=(c,u,d,f)=>o.jsx(rCe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(M.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},sCe=()=>{const{formBuilderFormLayout:t}=an(),e=(n,r,i)=>o.jsx(iCe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},m6=()=>{const{renderType:t}=Qt();switch(t){case W0:return o.jsx(WSe,{});case Q0:return o.jsx(ixe,{});case gf:return o.jsx(dxe,{});case qm:return o.jsx(xxe,{});case $m:return o.jsx(Jxe,{});case t0:return o.jsx(sCe,{})}},aCe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:s,updateTaskProgressValue:a}=vr();return M.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;a(u),s(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(g6,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},oCe=({taskId:t,onStart:e})=>{var w,E,S,T,x,_,I,F,P,L,V,z,O,U,te,ge,ee,Q,he;const[n,r]=M.useState(t2),[i,s]=M.useState(null),{examComplete:a,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=vr();M.useEffect(()=>{var Y,de,Z,ne,K;if(((Y=c==null?void 0:c.formType)==null?void 0:Y.key)==="exam"){let R=[...((ne=(Z=(de=c==null?void 0:c.layout[0])==null?void 0:de.children[0])==null?void 0:Z.children[0])==null?void 0:ne.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(R=Vm.shuffle(R).map(fe=>({...fe}))),l!=null&&l.randomiseAnswers&&(R=R.map(fe=>({...fe,answerOptions:Vm.shuffle(fe==null?void 0:fe.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(R=R.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),s({assessment_id:1,name:(K=u==null?void 0:u.assessment)==null?void 0:K.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:R})}},[c]);const f=o.jsxs("div",{children:[o.jsx(qt,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(t2)}),o.jsx(qt,{label:"Start Immediately",onClick:()=>{g(),r(L3)}})]}),h=Y=>Y.completed?(g(),r(L3),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your Quiz is about to start in ",Y.seconds," seconds"]}),g=()=>{const Y={task_id:t,session_id:tt(),start_time:new Date,finish_time:new Date};s(de=>({...de,...Y})),d(Y,s)},m=()=>{r(b7),g()},v=((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)>0?(E=l==null?void 0:l.assesment_user_attempts)==null?void 0:E.some(Y=>(Y==null?void 0:Y.is_pass)===1):!1;function A(){var be;const Y=l==null?void 0:l.assesment_user_attempts[0],de=l==null?void 0:l.assesment_user_attempts[((be=l==null?void 0:l.assesment_user_attempts)==null?void 0:be.length)-1],Z=Y==null?void 0:Y.start_time,ne=de==null?void 0:de.finish_time;if(!de||!Z||!ne)return"";const K=Fn.utc(Z),fe=Fn.utc(ne).diff(K,"seconds");return fe<60?fe+" seconds":Math.floor(fe/60)+" minutes"}return o.jsxs(o.Fragment,{children:[n===b7&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(tm,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===t2&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(S=u==null?void 0:u.assessment)==null?void 0:S.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Fn(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(_=i==null?void 0:i.quizElements)==null?void 0:_.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((F=(I=l==null?void 0:l.time_limit)==null?void 0:I.type)==null?void 0:F.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((L=(P=l==null?void 0:l.time_limit)==null?void 0:P.time_limit_info)==null?void 0:L.num_of_mins)," ","mins"]}),l&&((z=(V=l==null?void 0:l.time_limit)==null?void 0:V.type)==null?void 0:z.key)==="PerQuestion"&&o.jsxs(o.Fragment,{children:[Math.floor(((U=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:U.time_per_question)*((te=i==null?void 0:i.quizElements)==null?void 0:te.length)/60)," ","mins"]}),l&&((ee=(ge=l==null?void 0:l.time_limit)==null?void 0:ge.type)==null?void 0:ee.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No Time Limit"})]})]}),((Q=l==null?void 0:l.assesment_user_attempts)==null?void 0:Q.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time Taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((he=l==null?void 0:l.assesment_user_attempts)==null?void 0:he.length)>0?o.jsx(o.Fragment,{children:o.jsx(qt,{size:"large",label:v===!0?"Passed":"Start now",disabled:v,className:"p-button-info",onClick:()=>{r(b7),e&&e()}})}):o.jsx(D7,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===L3&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(Cj,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:m,saveNewQuizData:g,quizData:i,taskSchema:c,saveProgress:a,setAssessmentModal:()=>{}})})]})]})},lCe=t=>{var R,fe,be,Te,ye,Ae,re,q,ie,W,ue,Ie;const[e,n]=M.useState(!1),{isAdmin:r}=Qt(),i=M.useRef(!1),{taskId:s,endPoints:a,isRenderView:l,showFieldsAfterSubmit:c,messageWhileSubmittingForm:u,enableFormScroll:d,formScrollHeight:f="scroll-height-225",onStart:h,setAssessmentModal:g=()=>{}}=t,{setLayout:m}=an(),{taskProgressValue:v,taskRegisterData:A,task_status:w,assessmentData:E,taskProgressLoading:S,taskSchema:T,taskData:x,updateTaskFormData:_,submitTaskFormData:I,TasksLoading:F,userTaskSubmitFormData:P,TasksHTTPRequest:L,TasksSubmitLoading:V,clearTaskSchema:z,TASK_PUBLISHED:O,saveProgressDataHook:U,taskOptions:te}=vr(),ge=te!=null&&te.successMessage?te==null?void 0:te.successMessage:"Submitted Successfully";M.useEffect(()=>{if(T!==null&&m((T==null?void 0:T.layout)||[]),s){const ve={viewed_at:new Date().toISOString()};_(P,s,a==null?void 0:a.updateFormData,M3,()=>{},ve)}return()=>{z()}},[s]);const ee=(Ee="One or more field is required")=>{i.current.show({severity:"error",summary:"Alert",detail:Ee,life:3e3})},Q=()=>{Jt.emit("onSubmitUserForm","complete"),Z()},he=()=>{I(P,s,a==null?void 0:a.submitFormData),n(!1)},Y=Ee=>{_(Ee,s,a==null?void 0:a.updateFormData,M3,()=>{var ve;(ve=i==null?void 0:i.current)==null||ve.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3})})};M.useEffect(()=>{const Ee=setTimeout(()=>{var ve;P!==null&&((T==null?void 0:T.enableAutoSave)===!0||((ve=T==null?void 0:T.formType)==null?void 0:ve.key)===_7)&&U(P,s,a==null?void 0:a.updateFormData)},2e3);return()=>clearTimeout(Ee)},[A,v]);const de=(Ee,ve,me,Se)=>{var oe,pe;let De=Se;const $={fieldId:Ee.uuid};if(me!=null&&me[Ee==null?void 0:Ee.uuid]){if((ve==null?void 0:ve.length)>0){e:for(const[,ce]of ve.entries())if(((oe=ce==null?void 0:ce.children)==null?void 0:oe.length)>0&&(ce==null?void 0:ce.enableConditionalField)===!0){for(const[,le]of(ce==null?void 0:ce.children.entries())||[])if((pe=le==null?void 0:le.attributes)!=null&&pe.required&&(De=de(le,le==null?void 0:le.options,me,De),De===!1))break e}}}else Jt.emit("OnInvalidFieldCatch",$),De=!1,ee();return De},Z=M.useCallback(()=>{var ve,me,Se,De,$,oe,pe,ce,le,ae,Oe,Ne,Ke,dt,pt,ht,Ft,An,Vt,Nt,$e,yt,jt,fn;let Ee=!1;e:for(const[gn,En]of T.layout.entries())if((En==null?void 0:En.isHidden)===!1)for(const[$n,On]of En.children.entries())for(const[,Zt]of On.children.entries())if(Zt!=null&&Zt.rowIsRepeatable){const We=P.findIndex(Qe=>(Qe==null?void 0:Qe.rowId)===Zt.uuid);if(We>=0){if(((ve=P[We].repeatableFieldsData)==null?void 0:ve.length)<(Zt==null?void 0:Zt.minimumEntries)){ee(`Need minimun ${Zt==null?void 0:Zt.minimumEntries} entries`),Ee=!1;break e}Ee=!0}}else for(const[,We]of Zt.children.entries())for(const[,Qe]of We.children.entries()){if(Qe.isValid===0&&Qe.isPostField===!0&&(Qe==null?void 0:Qe.componentType)!=="hidden-field"){console.log("field",Qe);const ct={pageIndex:gn,fieldId:Qe.uuid,sectionIndex:$n},kt=P.findIndex(vn=>(vn==null?void 0:vn.fieldId)===Qe.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",(me=P[kt])==null?void 0:me.postData),!(kt===-1||(Se=P[kt])!=null&&Se.postData[0]&&((($=(De=P[kt])==null?void 0:De.postData[0].postValue)==null?void 0:$.length)>0||((oe=P[kt])==null?void 0:oe.postData[0].postValue)>0||(ce=(pe=P[kt])==null?void 0:pe.postData[0].postValue)!=null&&ce.name))){console.log("inValidData",ct),Jt.emit("OnInvalidFieldCatch",ct),Ee=!1,ee();break e}}if((Qe==null?void 0:Qe.componentType)==="radio-hierarchal"){const ct=P.findIndex(kt=>(kt==null?void 0:kt.fieldId)===Qe.uuid);if(ct>=0&&(Ee=de(Qe,Qe==null?void 0:Qe.options,(le=P[ct])==null?void 0:le.postData[0].postValue,!0),!Ee))break e}if(((ae=Qe==null?void 0:Qe.children)==null?void 0:ae.length)>0)for(const[,ct]of Qe.children.entries()){const kt=Object.keys(ct);if(kt[0]){const vn=ct[kt[0]],Pn={fieldId:vn.uuid,sectionIndex:$n},Mn=P.findIndex(Xn=>(Xn==null?void 0:Xn.fieldId)===vn.uuid);if(!((Oe=P[Mn])!=null&&Oe.postData[0]&&(((Ke=(Ne=P[Mn])==null?void 0:Ne.postData[0].postValue)==null?void 0:Ke.length)>0||((dt=P[Mn])==null?void 0:dt.postData[0].postValue)>0||((Ft=(ht=(pt=P[Mn])==null?void 0:pt.postData[0])==null?void 0:ht.postValue)==null?void 0:Ft.addressOne)!==""))){Jt.emit("OnInvalidFieldCatch",Pn),Ee=!1,ee();break e}}}if(Qe!=null&&Qe.inlineConditionalRules&&((Vt=(An=Qe==null?void 0:Qe.inlineConditionalRules)==null?void 0:An.rules)==null?void 0:Vt.length)>0){for(const[,ct]of((Nt=Qe==null?void 0:Qe.inlineConditionalRules)==null?void 0:Nt.rules.entries())||[])for(const[,kt]of(ct==null?void 0:ct.conditions.entries())||[])for(const[,vn]of(kt==null?void 0:kt.children.entries())||[])if(vn.isValid===0){const Pn={fieldId:vn.uuid,sectionIndex:$n},Mn=P.findIndex(Xn=>(Xn==null?void 0:Xn.fieldId)===vn.uuid);if(Mn>=0&&!(($e=P[Mn])!=null&&$e.postData[0]&&(((jt=(yt=P[Mn])==null?void 0:yt.postData[0].postValue)==null?void 0:jt.length)>0||((fn=P[Mn])==null?void 0:fn.postData[0].postValue)>0))){Jt.emit("OnInvalidFieldCatch",Pn),Ee=!1,ee();break e}}}Ee=!0}Ee&&n(!0)},[P]),ne=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-5"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"})]})}),K=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(qt,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(qt,{label:"Yes",icon:"pi pi-check",onClick:()=>he(),autoFocus:!0})]});return o.jsxs("div",{style:{position:"relative"},children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:u}),K()]}),F||V||L?o.jsx("div",{className:"w-full",children:o.jsx(ne,{})}):o.jsxs(o.Fragment,{children:[(((R=T==null?void 0:T.formType)==null?void 0:R.key)===$3||((fe=T==null?void 0:T.formType)==null?void 0:fe.key)==="survey")&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${l===!1?"builder_container":""}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:x==null?void 0:x.task_title}),o.jsx("div",{className:"ml-4 ",children:w===Vee&&o.jsx(D7,{classes:"",value:"COMPLETED",level:"success"})})]}),c===!1&&w===O?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:ge})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[F&&o.jsx(ne,{}),!F&&o.jsxs(o.Fragment,{children:[o.jsx(Kte,{}),o.jsx("div",{className:`${d===!0?f:" "} mt-2 mb-2`,children:o.jsx(Pf,{backend:Lf,children:T!==null&&((be=T==null?void 0:T.layout)==null?void 0:be.length)&&o.jsx(m6,{})})}),o.jsx(V3,{ref:i}),((Te=T==null?void 0:T.formType)==null?void 0:Te.key)!==""&&(w===M3||w===null)&&o.jsx("span",{children:ec.createPortal(o.jsx("div",{style:{zIndex:9999999},className:"card surface-card shadow-1 border-round py-2 render-form-footer",children:o.jsxs("div",{className:" flex justify-content-center",children:[o.jsx(qt,{text:!0,className:"mr-2 p-button-info",label:"Save Progress",onClick:()=>Y(P),loading:S,disabled:V}),o.jsx(qt,{label:"Submit",onClick:()=>Q(),disabled:S,loading:V})]})}),document.body)})]})]})})]})}),((ye=T==null?void 0:T.formType)==null?void 0:ye.key)==="policies"&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{id:"invoice-content",children:o.jsxs("div",{className:"invoice",children:[o.jsx("div",{className:"invoice-header",children:o.jsx("div",{className:"invoice-company flex align-items-center",children:o.jsxs("h3",{children:[x==null?void 0:x.task_title," "]})})}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(Pf,{backend:Lf,children:T!==null&&((Ae=T==null?void 0:T.layout)==null?void 0:Ae.length)&&o.jsx(m6,{})})}),((re=T==null?void 0:T.formType)==null?void 0:re.key)!==""&&(w===1||w===null)&&r===!1&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"flex justify-content-center",children:o.jsx(qt,{className:"p-button-primary",label:"Accept",onClick:()=>Q(),loading:S})})})]})})})})})}),(((q=T==null?void 0:T.formType)==null?void 0:q.key)==="page"||((ie=T==null?void 0:T.formType)==null?void 0:ie.key)==="pdf")&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(Pf,{backend:Lf,children:T!==null&&((W=T==null?void 0:T.layout)==null?void 0:W.length)&&o.jsx(m6,{})})})})})}),((ue=T==null?void 0:T.formType)==null?void 0:ue.key)==="training"&&o.jsx(aCe,{renderIn:Vte,taskSchema:T,taskId:s,endPoints:a}),((Ie=T==null?void 0:T.formType)==null?void 0:Ie.key)==="exam"&&o.jsx(oCe,{taskId:s,endPoints:a,onStart:h})]})]})};/**
4288
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function em(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",s=r?r[3]:"",a=r?r[2]:n,l=a.length>=e?a:(Vxe(Array(e)).map(function(){return"0"}).join("")+a).slice(e*-1);return"".concat(i).concat(l).concat(s)}var Sj={daysInHours:!1,zeroPadTime:2};function zxe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,s=i===void 0?0:i,a=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,a||(d+=c);var f=a?d:d-r(),h=Math.min(20,Math.max(0,s)),g=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),m=Math.abs(g)/1e3;return{total:g,days:Math.floor(m/(3600*24)),hours:Math.floor(m/3600%24),minutes:Math.floor(m/60%60),seconds:Math.floor(m%60),milliseconds:Number((m%1*1e3).toFixed()),completed:g<=0}}function Hxe(t,e){var n=t.days,r=t.hours,i=t.minutes,s=t.seconds,a=Object.assign(Object.assign({},Sj),e),l=a.daysInHours,c=a.zeroPadTime,u=a.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?em(r+n*24,c):em(r,f);return{days:l?"":em(n,d),hours:h,minutes:em(i,f),seconds:em(s,f)}}var xj=function(t){Aj(n,t);var e=wj(n);function n(){var r;return bj(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(s){return{count:s.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(s){return{count:s.count+i}},r.startCountdown)},r}return yj(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?M.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(M.Component);xj.propTypes={count:us.number,children:us.element,onComplete:us.func};var tm=function(t){Aj(n,t);var e=wj(n);function n(r){var i;if(bj(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var a=i.calcTimeDelta(),l=a.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(a,void 0,l)},i.setLegacyCountdownRef=function(a){i.legacyCountdownRef=a},i.start=function(){if(!i.isStarted()){var a=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=a?i.calcOffsetStartTimestamp()-a:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var s=i.calcTimeDelta();i.state={timeDelta:s,status:s.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return yj(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,s=i.date,a=i.now,l=i.precision,c=i.controlled,u=i.overtime;return zxe(s,{now:a,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,s,a){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&s==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){a&&a(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=s||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!s&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,s=i.daysInHours,a=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:Hxe(c,{daysInHours:s,zeroPadTime:a,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,s=i.count,a=i.children,l=i.onComplete;return M.createElement(xj,{ref:this.setLegacyCountdownRef,count:s,onComplete:l},a)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,g=this.getRenderProps();if(h)return h(g);if(f&&this.state.timeDelta.completed&&!d)return M.cloneElement(f,{countdown:g});var m=g.formatted,v=m.days,A=m.hours,w=m.minutes,E=m.seconds;return M.createElement("span",{className:u},g.total<0?"-":"",v,v?":":"",A,":",w,":",E)}}]),n}(M.Component);tm.defaultProps=Object.assign(Object.assign({},Sj),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),tm.propTypes={date:us.oneOfType([us.instanceOf(Date),us.string,us.number]),daysInHours:us.bool,zeroPadTime:us.number,zeroPadDays:us.number,controlled:us.bool,intervalDelay:us.number,precision:us.number,autoStart:us.bool,overtime:us.bool,className:us.string,children:us.element,renderer:us.func,now:us.func,onMount:us.func,onStart:us.func,onPause:us.func,onStop:us.func,onTick:us.func,onComplete:us.func};const Yxe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,s,a;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(tm,{renderer:n,date:Date.now()+parseInt((a=(s=t==null?void 0:t.time_limit)==null?void 0:s.time_limit_info)==null?void 0:a.num_of_mins)*60*1e3})})},Kxe=M.memo(Yxe),Xxe=t=>{var d,f,h,g;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,s]=M.useState(Date.now()),[a,l]=M.useState(!1),c=M.useCallback(()=>{s(Date.now()),l(!1)},[r]);M.useEffect(()=>{c()},[r,c]);const u=m=>(m.seconds<10&&(m.seconds="0"+m.seconds),m.minutes===0&&(m.minutes="0"+m.minutes),m.completed&&!a?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[m.minutes,":",m.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(tm,{renderer:u,date:i+parseInt((g=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:g.time_per_question)*1e3,intervalDelay:0},i)})},Rxe=()=>{const t=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(s)},e=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(s)},n=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(s)},r=()=>{const s=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(s)},i=s=>{s.play().then(()=>{}).catch(a=>{console.info("Not Played,"+a.error+a.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},Gxe="1",Cj=t=>{var ve,me,Se,De,$,oe,pe,ce;const e=le=>{const[ae,Oe]=M.useState(le),Ne=M.useRef(ae);return M.useEffect(()=>{Ne.current=ae},[ae]),[ae,Ne,Oe]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:s}=vr(),[a,l]=M.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:g,setAssessmentModal:m=()=>{},saveNewQuizData:v}=t,{quizStartAlert:A}=Rxe(),{userSelectedLanguage:w}=an(),[E,,S]=e(0),{media:T}=Qt(),x=(ve=T==null?void 0:T.image)!=null&&ve.MediaImage?(me=T==null?void 0:T.image)==null?void 0:me.MediaImage:o.jsx(o.Fragment,{}),[_,I,F]=e(null),[P,L]=M.useState(!1),[V,,z]=e([]),[O,U]=M.useState(!1),[te,ge]=M.useState(!1),[ee,Q]=M.useState(0),[he,Y]=M.useState(0),[de,Z]=M.useState(0),[ne,K]=M.useState(!1),[R,fe]=M.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},M.useEffect(()=>{O||U(!0)},[V,P,O]),M.useEffect(()=>{u!==null&&(A(),be())},[]);const be=()=>{Y(u.quizConfiguration.quizPassMark)},Te=M.useCallback((le,ae,Oe,Ne,Ke)=>{const dt=[...V];if((Ke==null?void 0:Ke.answerInputType)!=="checkbox"){const pt={uuid:Ke==null?void 0:Ke.uuid,question:Ke==null?void 0:Ke.questionText,isCorrect:Ne.isCorrect,selectedAnswer:Ne.answersText,viewed:!0},ht=V.findIndex(Ft=>(Ft==null?void 0:Ft.uuid)===Ke.uuid);ht>=0?(dt[ht]={...dt[ht],...pt},z(dt)):z([...V,pt])}},[_]),ye=le=>{var ae;if(E!==0){const Oe=[...V],Ne=E-1;F((ae=Oe[Ne])==null?void 0:ae.selectedAnswer[w==null?void 0:w.type]),L(!0),S(Ne),Ae(0)}},Ae=le=>{for(const ae of V)if(ae.questionIndex===E+le){F(ae.selectedAnswerEnglish);break}},re=(le,ae,Oe,Ne)=>{var pt;const Ke=[..._];if(le)Ke.push(ae);else{const ht=Ke.findIndex(Ft=>Ft===ae);ht>=0&&Ke.splice(ht,1)}F(Ke);const dt=[...V];if((Ne==null?void 0:Ne.answerInputType)==="checkbox"){let ht=!1;for(const[,Vt]of(Ne==null?void 0:Ne.answerOptions.entries())||[])if(Vt.isCorrect===!0)if(It.includes(Ke,(pt=Vt==null?void 0:Vt.answersText)==null?void 0:pt[w==null?void 0:w.type]))ht=!0;else{ht=!1;break}const Ft={uuid:Ne==null?void 0:Ne.uuid,question:Ne==null?void 0:Ne.questionText,isCorrect:ht,selectedAnswer:Oe.answersText,viewed:!0},An=V.findIndex(Vt=>(Vt==null?void 0:Vt.uuid)===Ne.uuid);An>=0?(dt[An]={...dt[An],...Ft},z(dt)):z([...V,Ft])}},q=M.useCallback(()=>{var dt,pt,ht,Ft,An,Vt,Nt,$e,yt,jt,fn,gn;const le=I.current,ae=It.findIndex((dt=u==null?void 0:u.quizElements[E])==null?void 0:dt.answerOptions,function(En){return En.isCorrect===!0}),Oe=u==null?void 0:u.quizElements[E],Ne=(ht=(pt=Oe==null?void 0:Oe.answerOptions[ae])==null?void 0:pt.answersText)!=null&&ht[w==null?void 0:w.type]?(An=(Ft=Oe==null?void 0:Oe.answerOptions[ae])==null?void 0:Ft.answersText)==null?void 0:An[w==null?void 0:w.type]:"";console.log("selectedAnswers",V),console.log("currentQuestionIndex",E),console.log("selectedAnswers[currentQuestionIndex]",V[E]);const Ke=(Vt=V[E])!=null&&Vt.isCorrect?1:0;if(console.log("isCorrectAnswer[currentQuestionIndex]",Ke),u!=null&&u.quizElements&&E+1!==(u==null?void 0:u.quizElements.length)){const En={assessment_user_attempt_id:($e=i==null?void 0:i.assesment_user_attempts[((Nt=i==null?void 0:i.assesment_user_attempts)==null?void 0:Nt.length)-1])==null?void 0:$e.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(yt=Oe.questionText)==null?void 0:yt[w==null?void 0:w.type],question_uid:Oe==null?void 0:Oe.uuid,start_time:a,finish_time:new Date,correct_answer:Ne,selected_answer:Array.isArray(le)?le.toString():le,is_correct_answer:Ke};r(En),F(null),S(E+1),l(new Date),Ae(2)}else if((u==null?void 0:u.quizElements.length)===E+1){const En={assessment_user_attempt_id:(fn=i==null?void 0:i.assesment_user_attempts[((jt=i==null?void 0:i.assesment_user_attempts)==null?void 0:jt.length)-1])==null?void 0:fn.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:Oe==null?void 0:Oe.uuid,question:(gn=Oe.questionText)==null?void 0:gn[w==null?void 0:w.type],start_time:a,finish_time:new Date,correct_answer:Ne,selected_answer:Array.isArray(le)?le.toString():le,is_correct_answer:Ke};r(En),ie(),ue()}L(!1)},[E,V]),ie=()=>{ge(!0)},W=()=>{Ee?(console.log("Restart"),g(L3),v(),U(!0),A(),be(),S(0),F(null),L(!1),z([]),ge(!1),Q(0),Z(0),K(!1),fe({isCorrect:null,text:null})):(g(t2),m(!1))},ue=()=>{var Ke,dt;let le=0,ae=0,Oe=!1;for(const pt of V)pt!=null&&pt.isCorrect&&le++;Q(le),ae=le/((Ke=u==null?void 0:u.quizElements)==null?void 0:Ke.length)*100,ae=Math.round(ae),Z(ae),Oe=ae>=he,K(Oe);const Ne={...u,...i,result:ae,status:Oe,selectedAnswers:V};d(Ne),n({session_id:c,is_pass:Oe?1:0,score:le,out_of:(dt=u==null?void 0:u.quizElements)==null?void 0:dt.length,finish_time:new Date,status:1})},Ie=()=>{var le,ae,Oe,Ne,Ke,dt,pt;if(((le=u==null?void 0:u.quizElements[E])==null?void 0:le.answerInputType)==="radio"){const ht=It.findIndex((ae=u==null?void 0:u.quizElements[E])==null?void 0:ae.answerOptions,function(Ft){return Ft.isCorrect===!0});_===((Ke=(Ne=(Oe=u==null?void 0:u.quizElements[E])==null?void 0:Oe.answerOptions[ht])==null?void 0:Ne.answersText)==null?void 0:Ke[w==null?void 0:w.type])?fe({isCorrect:!0,text:_}):fe({isCorrect:!1,text:_})}if(((dt=u==null?void 0:u.quizElements[E])==null?void 0:dt.answerInputType)==="checkbox"){const ht=(pt=u==null?void 0:u.quizElements[E])==null?void 0:pt.answerOptions.filter(Ft=>Ft.isCorrect===!0);if(_!=null&&_.length){const Ft=_==null?void 0:_.map(An=>({isCorrect:ht==null?void 0:ht.some(Vt=>{var Nt;return((Nt=Vt==null?void 0:Vt.answersText)==null?void 0:Nt[w==null?void 0:w.type])===An}),text:An}));fe(Ft)}}},Ee=(i==null?void 0:i.noOfAttempts)-((Se=i==null?void 0:i.assesment_user_attempts)==null?void 0:Se.length)>0&&!ne;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[te&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(De=s==null?void 0:s.assessment)==null?void 0:De.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",ee," out of"," ",($=u==null?void 0:u.quizElements)==null?void 0:$.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",de,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",he,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",ne?o.jsx(qc,{severity:"success",value:"Passed"}):o.jsx(qc,{severity:"danger",value:"Failed"})]}),ne&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:te&&o.jsx("div",{className:"text-center my-5",children:o.jsx(qt,{label:Ee?"Restart":"End",onClick:()=>W()})})})]})]})})}),te&&((oe=i==null?void 0:i.assessment_type)==null?void 0:oe.key)===Gxe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:V==null?void 0:V.map((le,ae)=>{var Oe,Ne;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(Oe=le==null?void 0:le.question)==null?void 0:Oe[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(Ne=le==null?void 0:le.selectedAnswer)==null?void 0:Ne[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),le!=null&&le.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(R4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(R4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},ae)})})})]}),f!==UD?o.jsx(o.Fragment,{children:te&&o.jsx("div",{className:"text-center my-5",children:o.jsx(qt,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{g(t2)}})})}):o.jsx(o.Fragment,{}),O&&!te&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(Kxe,{assessmentData:i,setDisplaySummary:ge}),o.jsx(Xxe,{currentQuestionIndex:E,assessmentData:i,onNextQuestion:q})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(pe=u==null?void 0:u.quizElements)==null?void 0:pe.map((le,ae)=>{var Oe,Ne,Ke,dt,pt;return o.jsxs("div",{className:"quiz-card-box",children:[E===ae&&((Oe=le==null?void 0:le.questionTextImage)==null?void 0:Oe[w==null?void 0:w.type])&&((Ne=le==null?void 0:le.questionTextImage)==null?void 0:Ne[w==null?void 0:w.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(x,{mediaId:(Ke=le==null?void 0:le.questionTextImage)==null?void 0:Ke[w==null?void 0:w.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:E===ae&&((dt=le==null?void 0:le.questionText)==null?void 0:dt[w==null?void 0:w.type])}),E===ae&&((pt=le==null?void 0:le.answerOptions)==null?void 0:pt.map((ht,Ft)=>(le==null?void 0:le.answerInputType)==="checkbox"?o.jsx(M.Fragment,{children:o.jsx(kxe,{onChangeCheckbox:re,setSelectedOption:F,quiz:ht,userSelectedLanguage:w,onSetAnswer:Te,setIsOptionSelected:L,index:Ft,eleIndex:ae,ele:le,setCorrectAnswerCheck:fe,correctAnswerCheck:R,selectedOption:_})},`checkbox-question-${Ft}`):o.jsx(M.Fragment,{children:o.jsx(Fxe,{setSelectedOption:F,quiz:ht,userSelectedLanguage:w,onSetAnswer:Te,setIsOptionSelected:L,index:Ft,eleIndex:ae,ele:le,setCorrectAnswerCheck:fe,correctAnswerCheck:R,selectedOption:_})},`radio-question-${Ft}`)))]},ae)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",E+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),E>0&&o.jsx(qt,{size:"large",className:"mx-2",label:"Previous",onClick:le=>ye()}),((i==null?void 0:i.skippable)===!0||P===!0)&&o.jsx(qt,{size:"large",label:(u==null?void 0:u.quizElements.length)===E+1?"Finish":P===!0?"Next":"Skip",onClick:q}),P===!0&&((ce=i==null?void 0:i.assessment_type)==null?void 0:ce.key)==="1"&&o.jsx(qt,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>Ie()})]})]})]})})},Wxe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:s,currentItem:a}=t,{userTrainingSaveData:l}=vr();M.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var g,m,v,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(v=(m=(g=d==null?void 0:d.layout[0])==null?void 0:g.children[0])==null?void 0:m.children[0])==null?void 0:v.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=Vm.shuffle(h).map((w,E)=>({...w}))),f!=null&&f.randomiseAnswers&&(h=h.map((w,E)=>({...w,answerOptions:Vm.shuffle(w==null?void 0:w.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(g=>(g==null?void 0:g.fieldId)===(a==null?void 0:a.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}s()}};return o.jsx("div",{children:n&&o.jsx(Cj,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},Qxe=t=>{var v,A;const{currentItem:e,videoJsOptions:n}=t,r=M.useRef(null),{userTrainingSaveData:i,updateUserTraining:s,taskRegisterData:a}=vr(),{media:l}=Qt(),c=(v=l==null?void 0:l.video)!=null&&v.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=w=>{r.current=w,w.on("waiting",()=>{_t.log("player is waiting")}),w.on("dispose",()=>{_t.log("player will dispose")})},d=w=>{if(i!==null){const E=[...i],S=E==null?void 0:E.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid));S>=0&&(E[S].seenTime=w==null?void 0:w.target.currentTime)}},f=w=>{const E=[...i],S=E==null?void 0:E.findIndex(T=>(T==null?void 0:T.fieldId)===(w==null?void 0:w.uuid));S>=0&&(i[S]={...i[S],isSeen:!0},s(E),h("Ended"))},h=w=>{const E=r.current,S=i!==null?i==null?void 0:i.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid)):-1;S>=0&&i[S].logs.push({action:w,videoTime:i[S].seenTime,totalTime:E.duration,timeState:new Date})},g=w=>{const{mediaId:E}=w,[S,T]=M.useState(!1);return M.useEffect(()=>{if(!S&&i!==null){const x=i.findIndex(_=>(_==null?void 0:_.fieldId)===(e==null?void 0:e.uuid));if(x>=0){T(!0);const _=r.current;_.currentTime=i[x].seenTime}T(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:E,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},m=M.useCallback(w=>o.jsx(g,{mediaId:w}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:m(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(rV,{options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},g6=t=>{var _,I,F,P,L,V;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=vr(),[s]=M.useState(!1),[,a]=M.useState(fy),[l,c]=M.useState([]),[u,d]=M.useState(null),{userSelectedLanguage:f}=an(),[h,g]=M.useState(null),[m,v]=M.useState(null),A=(_=i==null?void 0:i.training)!=null&&_.getAssessmentByIdFromStore?(I=i==null?void 0:i.training)==null?void 0:I.getAssessmentByIdFromStore:()=>{},w=(F=i==null?void 0:i.training)!=null&&F.TrainingOverView?(P=i==null?void 0:i.training)==null?void 0:P.TrainingOverView:()=>o.jsx(o.Fragment,{}),[E,S]=M.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});M.useEffect(()=>{s||T()},[s]);const T=()=>{var z,O,U,te,ge,ee,Q,he,Y,de,Z,ne,K,R,fe,be,Te,ye,Ae,re,q;switch(g((U=(O=(z=e[0])==null?void 0:z.children[0])==null?void 0:O.children[0])==null?void 0:U.children[0]),v(e[0]),(Q=(ee=(ge=(te=e[0])==null?void 0:te.children[0])==null?void 0:ge.children[0])==null?void 0:ee.children[0])==null?void 0:Q.componentType){case"video":S({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(ne=(Z=(de=(Y=(he=e[0])==null?void 0:he.children[0])==null?void 0:Y.children[0])==null?void 0:de.children[0])==null?void 0:Z.media_url)==null?void 0:ne.english}]});break;case"image":a((Te=(be=(fe=(R=(K=e[0])==null?void 0:K.children[0])==null?void 0:R.children[0])==null?void 0:fe.children[0])==null?void 0:be.media_url)==null?void 0:Te.english);break;case"document":c((q=(re=(Ae=(ye=e[0])==null?void 0:ye.children[0])==null?void 0:Ae.children[0])==null?void 0:re.children[0])==null?void 0:q.documents);break}},x=z=>{switch(z==null?void 0:z.componentType){case"video":return o.jsx("div",{children:o.jsx(Qxe,{videoJsOptions:E,currentItem:z},z==null?void 0:z.uuid)});case"image":return o.jsx(ik,{field:z,isPreview:!0});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((O,U)=>o.jsx("li",{children:o.jsx("a",{href:O==null?void 0:O.url,children:O==null?void 0:O.url})},`document-item-${U}`))})]});case"quiz":return A!=null&&A.form_template_schema?o.jsx(Wxe,{renderIn:UD,getAssessmentByIdFromStore:A,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:z}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("h3",{children:[(L=m==null?void 0:m.heading)==null?void 0:L[f==null?void 0:f.type]," -"," ",(V=h==null?void 0:h.title)==null?void 0:V[f==null?void 0:f.type]," "]}),x(h),n&&o.jsx(w,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((z,O)=>{var U,te;return o.jsxs(ui,{className:"mb-5",header:(U=z==null?void 0:z.heading)==null?void 0:U.english,toggleable:!0,children:[o.jsx("p",{children:(te=z==null?void 0:z.subHeadingText)==null?void 0:te[f==null?void 0:f.type]}),z.children.map((ge,ee)=>{const Q=`${ee}`;return o.jsx("div",{children:ge.children.map((he,Y)=>{const de=`${ee}-${Q}`;return o.jsx(Oxe,{setCurrentSection:v,section:z,setCurrentItem:g,currentItem:h,path:de,fields:he.children,setvideoJsOptions:S,setImage:a,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${Y}`)})},`training-sidebar-container-${ee}`)})]},`train-sidebar-panel-${O}`)})})]})};g6.defaultProps={showInfoPanel:!0,sections:{},updateTrainingProgress:()=>{}},g6.propTypes={showInfoPanel:xn.bool,sections:xn.array,updateTrainingProgress:xn.func};const Jxe=()=>{var r;const{formBuilderFormLayout:t}=an(),{isPreview:e}=Qt(),n=(i,s,a)=>o.jsx(Dxe,{data:i,path:s,pageIndex:a},`page-${i.uuid}`);return e?o.jsx(g6,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,s)=>{const a=`${s}`;return o.jsx("div",{children:n(i,a,s)},`exam-page-${s}`)})})})},Zxe=t=>{var _,I,F,P,L;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=an(),s=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:a}=t,[l,c]=M.useState(),[u,d]=M.useState([]),{media:f}=Qt(),h=(_=f==null?void 0:f.image)!=null&&_.MediaImage?(I=f==null?void 0:f.image)==null?void 0:I.MediaImage:o.jsx(o.Fragment,{}),g={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(a==null?void 0:a.length)>0?a:s},[m,v]=M.useState(0),[A,w]=M.useState(!1);function E(V,z){return(V==null?void 0:V.length)<=z?V:(V==null?void 0:V.slice(0,z))+"..."}M.useEffect(()=>{w(!0)},[]);const S=()=>{m!==0&&v(m-1)},T=()=>{if(g!=null&&g.quizElements&&m+1!==(g==null?void 0:g.quizElements.length))v(m+1);else if((g==null?void 0:g.quizElements.length)===m+1)return},x=(V,z)=>{let O=[...u];V.checked?O.push(z):O=O.filter(U=>(U==null?void 0:U[e==null?void 0:e.type])!==(z==null?void 0:z[e==null?void 0:e.type])),d(O)};return o.jsxs("div",{className:"scroll-height-200 mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[g==null?void 0:g.name," "]}),(F=g==null?void 0:g.quizElements)==null?void 0:F.map((V,z)=>{var O,U,te,ge,ee,Q,he,Y,de;return(V==null?void 0:V.answerInputType)==="radio"?o.jsxs("div",{className:m===z?"card":" flex align-items-center p-field-radiobutton",children:[((O=V==null?void 0:V.questionTextImage)==null?void 0:O[e==null?void 0:e.type])&&((U=V==null?void 0:V.questionTextImage)==null?void 0:U[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(te=V==null?void 0:V.questionTextImage)==null?void 0:te[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:m===z&&((ge=V==null?void 0:V.questionText)==null?void 0:ge[e==null?void 0:e.type])}),m===z&&((ee=V==null?void 0:V.answerOptions)==null?void 0:ee.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ss,{inputId:`${ne}-preview`,value:Z==null?void 0:Z.answersText,checked:l===ne,onChange:()=>{c(ne)}}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${ne}-preview`,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z):(V==null?void 0:V.answerInputType)==="checkbox"?o.jsxs("div",{className:m===z?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:m===z&&((Q=V==null?void 0:V.questionText)==null?void 0:Q[e==null?void 0:e.type])}),m===z&&((he=V==null?void 0:V.answerOptions)==null?void 0:he.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(zr,{inputId:ne,value:Z==null?void 0:Z.answersText,onChange:Te=>{x(Te,Z==null?void 0:Z.answersText)},checked:u.some(Te=>{var ye;return(Te==null?void 0:Te[e==null?void 0:e.type])===((ye=Z==null?void 0:Z.answersText)==null?void 0:ye[e==null?void 0:e.type])})}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:ne,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z):o.jsxs("div",{className:m===z?"card":"",children:[o.jsx("h3",{className:"mb-5",children:m===z&&((Y=V==null?void 0:V.questionText)==null?void 0:Y[e==null?void 0:e.type])}),m===z&&((de=V==null?void 0:V.answerOptions)==null?void 0:de.map((Z,ne)=>{var K,R,fe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ss,{inputId:ne,value:Z==null?void 0:Z.answersText,onChange:()=>{}}),((K=Z.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((R=Z.answersTextImage)==null?void 0:R[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(fe=Z.answersTextImage)==null?void 0:fe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:ne,children:(be=Z.answersText)==null?void 0:be[e==null?void 0:e.type]})]},ne)}))]},z)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",m+1+"/"+(g==null?void 0:g.quizElements.length)]}),o.jsx("br",{}),m>0&&o.jsx(qt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>S()}),o.jsx(qt,{text:!0,label:(g==null?void 0:g.quizElements.length)===m+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(P=g==null?void 0:g.quizElements)==null?void 0:P.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(qc,{className:"mr-2",severity:"success",value:"True"}):o.jsx(qc,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question Time Limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam Time Limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Questions Randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(L=g==null?void 0:g.quizElements)==null?void 0:L.map((V,z)=>{var O;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:E(((O=V==null?void 0:V.questionText)==null?void 0:O[e==null?void 0:e.type])||"",30)})})},`preview-question-${z}`)})})})]})]})]})]})},eCe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,columnIndex:a,section:l,row:c,page:u}=t,d=M.useRef(null),{handleDrop:f}=an(),{isRenderView:h,isAdvanceView:g,isPreview:m}=Qt(),[{isDragging:v},A]=is({type:Aa,item:{type:Aa,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:x=>({isDragging:x.isDragging()})}),E={position:"relative",opacity:v&&!h?.25:1};A(d);const S=(x,_,I,F,P,L,V)=>o.jsx(eu,{page:u,type:"field",row:c,section:l,field:x,data:x,path:_,pageIndex:I,sectionIndex:F,rowIndex:P,columnIndex:L,fieldIndex:V},`component-${n}-${x==null?void 0:x.uuid}`);return o.jsx("div",{style:g?E:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:m===!1?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((x,_)=>{const I=`${n}-${_}`;return o.jsxs(M.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,fieldDropArea:!0,data:{path:I,childrenCount:e.children.length,droppedField:e},onDrop:f}),S(x,I,r,i,s,a,_)]},I)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Fr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(Zxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},tCe={},nCe=t=>{var m,v,A,w;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:s,section:a,page:l}=t,c=M.useRef(null),{isRenderView:u}=Qt(),[{isDragging:d},f]=is({type:Oo,item:{type:Oo,uuid:e.uuid,children:e.children,path:n,data:e},collect:E=>({isDragging:E.isDragging()})}),h=d?.25:1;f(c);const g=(E,S,T,x,_,I)=>o.jsx(eCe,{page:l,row:e,section:a,data:E,path:S,pageIndex:T,sectionIndex:x,rowIndex:_,columnIndex:I},`column-${n}-${E.uuid}`);return o.jsx("div",{style:{...tCe,opacity:h,marginTop:`${(m=e==null?void 0:e.margin)==null?void 0:m.top}px`,marginBottom:`${(v=e==null?void 0:e.margin)==null?void 0:v.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(w=e==null?void 0:e.margin)==null?void 0:w.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((E,S)=>{const T=`${n}-${S}`;return o.jsx(M.Fragment,{children:g(E,T,r,i,s,S)},T)})})})},rCe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:s,page:a}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Qt(),[f,h]=M.useState(!1),[g,m]=M.useState(!1),[v,A]=M.useState(null),w=M.useRef(null),[{isDragging:E},S]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),T=E?.25:1;S(w);const x=(_,I,F,P,L)=>o.jsx(nCe,{page:a,section:s,data:_,path:I,pageIndex:F,sectionIndex:P,rowIndex:L},`row-${n}-${_.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(rp,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:A,saveElementModal:g,setSaveElementModal:m}),f===!0&&o.jsx(np,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((_,I)=>{const F=`${n}-${I}`;return o.jsx(M.Fragment,{children:x(_,F,r,i,I)},F)})})]})},iCe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Qt(),s=M.useRef(null),[{},a]=is({type:ns,item:{type:ns,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});a(s);const l=(c,u,d,f)=>o.jsx(rCe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(M.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},sCe=()=>{const{formBuilderFormLayout:t}=an(),e=(n,r,i)=>o.jsx(iCe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},m6=()=>{const{renderType:t}=Qt();switch(t){case W0:return o.jsx(WSe,{});case Q0:return o.jsx(ixe,{});case gf:return o.jsx(dxe,{});case qm:return o.jsx(xxe,{});case $m:return o.jsx(Jxe,{});case t0:return o.jsx(sCe,{})}},aCe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:s,updateTaskProgressValue:a}=vr();return M.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;a(u),s(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(g6,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},oCe=({taskId:t,onStart:e})=>{var w,E,S,T,x,_,I,F,P,L,V,z,O,U,te,ge,ee,Q,he;const[n,r]=M.useState(t2),[i,s]=M.useState(null),{examComplete:a,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=vr();M.useEffect(()=>{var Y,de,Z,ne,K;if(((Y=c==null?void 0:c.formType)==null?void 0:Y.key)==="exam"){let R=[...((ne=(Z=(de=c==null?void 0:c.layout[0])==null?void 0:de.children[0])==null?void 0:Z.children[0])==null?void 0:ne.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(R=Vm.shuffle(R).map(fe=>({...fe}))),l!=null&&l.randomiseAnswers&&(R=R.map(fe=>({...fe,answerOptions:Vm.shuffle(fe==null?void 0:fe.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(R=R.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),s({assessment_id:1,name:(K=u==null?void 0:u.assessment)==null?void 0:K.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:R})}},[c]);const f=o.jsxs("div",{children:[o.jsx(qt,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(t2)}),o.jsx(qt,{label:"Start Immediately",onClick:()=>{g(),r(L3)}})]}),h=Y=>Y.completed?(g(),r(L3),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your Quiz is about to start in ",Y.seconds," seconds"]}),g=()=>{const Y={task_id:t,session_id:tt(),start_time:new Date,finish_time:new Date};s(de=>({...de,...Y})),d(Y,s)},m=()=>{r(b7),g()},v=((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)>0?(E=l==null?void 0:l.assesment_user_attempts)==null?void 0:E.some(Y=>(Y==null?void 0:Y.is_pass)===1):!1;function A(){var be;const Y=l==null?void 0:l.assesment_user_attempts[0],de=l==null?void 0:l.assesment_user_attempts[((be=l==null?void 0:l.assesment_user_attempts)==null?void 0:be.length)-1],Z=Y==null?void 0:Y.start_time,ne=de==null?void 0:de.finish_time;if(!de||!Z||!ne)return"";const K=Fn.utc(Z),fe=Fn.utc(ne).diff(K,"seconds");return fe<60?fe+" seconds":Math.floor(fe/60)+" minutes"}return o.jsxs(o.Fragment,{children:[n===b7&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(tm,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===t2&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(S=u==null?void 0:u.assessment)==null?void 0:S.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Fn(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(_=i==null?void 0:i.quizElements)==null?void 0:_.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((F=(I=l==null?void 0:l.time_limit)==null?void 0:I.type)==null?void 0:F.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((L=(P=l==null?void 0:l.time_limit)==null?void 0:P.time_limit_info)==null?void 0:L.num_of_mins)," ","mins"]}),l&&((z=(V=l==null?void 0:l.time_limit)==null?void 0:V.type)==null?void 0:z.key)==="PerQuestion"&&o.jsxs(o.Fragment,{children:[Math.floor(((U=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:U.time_per_question)*((te=i==null?void 0:i.quizElements)==null?void 0:te.length)/60)," ","mins"]}),l&&((ee=(ge=l==null?void 0:l.time_limit)==null?void 0:ge.type)==null?void 0:ee.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No Time Limit"})]})]}),((Q=l==null?void 0:l.assesment_user_attempts)==null?void 0:Q.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time Taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((he=l==null?void 0:l.assesment_user_attempts)==null?void 0:he.length)>0?o.jsx(o.Fragment,{children:o.jsx(qt,{size:"large",label:v===!0?"Passed":"Start now",disabled:v,className:"p-button-info",onClick:()=>{r(b7),e&&e()}})}):o.jsx(D7,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===L3&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(Cj,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:m,saveNewQuizData:g,quizData:i,taskSchema:c,saveProgress:a,setAssessmentModal:()=>{}})})]})]})},lCe=t=>{var R,fe,be,Te,ye,Ae,re,q,ie,W,ue,Ie;const[e,n]=M.useState(!1),{isAdmin:r}=Qt(),i=M.useRef(!1),{taskId:s,endPoints:a,isRenderView:l,showFieldsAfterSubmit:c,messageWhileSubmittingForm:u,enableFormScroll:d,formScrollHeight:f="scroll-height-225",onStart:h,setAssessmentModal:g=()=>{}}=t,{setLayout:m}=an(),{taskProgressValue:v,taskRegisterData:A,task_status:w,assessmentData:E,taskProgressLoading:S,taskSchema:T,taskData:x,updateTaskFormData:_,submitTaskFormData:I,TasksLoading:F,userTaskSubmitFormData:P,TasksHTTPRequest:L,TasksSubmitLoading:V,clearTaskSchema:z,TASK_PUBLISHED:O,saveProgressDataHook:U,taskOptions:te}=vr(),ge=te!=null&&te.successMessage?te==null?void 0:te.successMessage:"Submitted Successfully";M.useEffect(()=>{if(T!==null&&m((T==null?void 0:T.layout)||[]),s){const ve={viewed_at:new Date().toISOString()};_(P,s,a==null?void 0:a.updateFormData,M3,()=>{},ve)}return()=>{z()}},[s]);const ee=(Ee="One or more field is required")=>{i.current.show({severity:"error",summary:"Alert",detail:Ee,life:3e3})},Q=()=>{Jt.emit("onSubmitUserForm","complete"),Z()},he=()=>{I(P,s,a==null?void 0:a.submitFormData),n(!1)},Y=Ee=>{_(Ee,s,a==null?void 0:a.updateFormData,M3,()=>{var ve;(ve=i==null?void 0:i.current)==null||ve.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3})})};M.useEffect(()=>{const Ee=setTimeout(()=>{var ve;P!==null&&((T==null?void 0:T.enableAutoSave)===!0||((ve=T==null?void 0:T.formType)==null?void 0:ve.key)===_7)&&U(P,s,a==null?void 0:a.updateFormData)},2e3);return()=>clearTimeout(Ee)},[A,v]);const de=(Ee,ve,me,Se)=>{var oe,pe;let De=Se;const $={fieldId:Ee.uuid};if(me!=null&&me[Ee==null?void 0:Ee.uuid]){if((ve==null?void 0:ve.length)>0){e:for(const[,ce]of ve.entries())if(((oe=ce==null?void 0:ce.children)==null?void 0:oe.length)>0&&(ce==null?void 0:ce.enableConditionalField)===!0){for(const[,le]of(ce==null?void 0:ce.children.entries())||[])if((pe=le==null?void 0:le.attributes)!=null&&pe.required&&(De=de(le,le==null?void 0:le.options,me,De),De===!1))break e}}}else Jt.emit("OnInvalidFieldCatch",$),De=!1,ee();return De},Z=M.useCallback(()=>{var ve,me,Se,De,$,oe,pe,ce,le,ae,Oe,Ne,Ke,dt,pt,ht,Ft,An,Vt,Nt,$e,yt,jt,fn;let Ee=!1;e:for(const[gn,En]of T.layout.entries())if((En==null?void 0:En.isHidden)===!1)for(const[$n,On]of En.children.entries())for(const[,Zt]of On.children.entries())if(Zt!=null&&Zt.rowIsRepeatable){const We=P.findIndex(Qe=>(Qe==null?void 0:Qe.rowId)===Zt.uuid);if(We>=0){if(((ve=P[We].repeatableFieldsData)==null?void 0:ve.length)<(Zt==null?void 0:Zt.minimumEntries)){ee(`Need minimun ${Zt==null?void 0:Zt.minimumEntries} entries`),Ee=!1;break e}Ee=!0}}else for(const[,We]of Zt.children.entries())for(const[,Qe]of We.children.entries()){if(Qe.isValid===0&&Qe.isPostField===!0&&(Qe==null?void 0:Qe.componentType)!=="hidden-field"){console.log("field",Qe);const ct={pageIndex:gn,fieldId:Qe.uuid,sectionIndex:$n},kt=P.findIndex(vn=>(vn==null?void 0:vn.fieldId)===Qe.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",(me=P[kt])==null?void 0:me.postData),!(kt===-1||(Se=P[kt])!=null&&Se.postData[0]&&((($=(De=P[kt])==null?void 0:De.postData[0].postValue)==null?void 0:$.length)>0||((oe=P[kt])==null?void 0:oe.postData[0].postValue)>0||(ce=(pe=P[kt])==null?void 0:pe.postData[0].postValue)!=null&&ce.name))){console.log("inValidData",ct),Jt.emit("OnInvalidFieldCatch",ct),Ee=!1,ee();break e}}if((Qe==null?void 0:Qe.componentType)==="radio-hierarchal"){const ct=P.findIndex(kt=>(kt==null?void 0:kt.fieldId)===Qe.uuid);if(ct>=0&&(Ee=de(Qe,Qe==null?void 0:Qe.options,(le=P[ct])==null?void 0:le.postData[0].postValue,!0),!Ee))break e}if(((ae=Qe==null?void 0:Qe.children)==null?void 0:ae.length)>0)for(const[,ct]of Qe.children.entries()){const kt=Object.keys(ct);if(kt[0]){const vn=ct[kt[0]],Pn={fieldId:vn.uuid,sectionIndex:$n},Mn=P.findIndex(Xn=>(Xn==null?void 0:Xn.fieldId)===vn.uuid);if(!((Oe=P[Mn])!=null&&Oe.postData[0]&&(((Ke=(Ne=P[Mn])==null?void 0:Ne.postData[0].postValue)==null?void 0:Ke.length)>0||((dt=P[Mn])==null?void 0:dt.postData[0].postValue)>0||((Ft=(ht=(pt=P[Mn])==null?void 0:pt.postData[0])==null?void 0:ht.postValue)==null?void 0:Ft.addressOne)!==""))){Jt.emit("OnInvalidFieldCatch",Pn),Ee=!1,ee();break e}}}if(Qe!=null&&Qe.inlineConditionalRules&&((Vt=(An=Qe==null?void 0:Qe.inlineConditionalRules)==null?void 0:An.rules)==null?void 0:Vt.length)>0){for(const[,ct]of((Nt=Qe==null?void 0:Qe.inlineConditionalRules)==null?void 0:Nt.rules.entries())||[])for(const[,kt]of(ct==null?void 0:ct.conditions.entries())||[])for(const[,vn]of(kt==null?void 0:kt.children.entries())||[])if(vn.isValid===0){const Pn={fieldId:vn.uuid,sectionIndex:$n},Mn=P.findIndex(Xn=>(Xn==null?void 0:Xn.fieldId)===vn.uuid);if(Mn>=0&&!(($e=P[Mn])!=null&&$e.postData[0]&&(((jt=(yt=P[Mn])==null?void 0:yt.postData[0].postValue)==null?void 0:jt.length)>0||((fn=P[Mn])==null?void 0:fn.postData[0].postValue)>0))){Jt.emit("OnInvalidFieldCatch",Pn),Ee=!1,ee();break e}}}Ee=!0}Ee&&n(!0)},[P]),ne=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-5"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"}),o.jsx(ys,{className:"mb-2"})]})}),K=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(qt,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(qt,{label:"Yes",icon:"pi pi-check",onClick:()=>he(),autoFocus:!0})]});return o.jsxs("div",{style:{position:"relative"},children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:u}),K()]}),F||V||L?o.jsx("div",{className:"w-full",children:o.jsx(ne,{})}):o.jsxs(o.Fragment,{children:[(((R=T==null?void 0:T.formType)==null?void 0:R.key)===$3||((fe=T==null?void 0:T.formType)==null?void 0:fe.key)==="survey")&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${l===!1?"builder_container":""}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:x==null?void 0:x.task_title}),o.jsx("div",{className:"ml-4 ",children:w===Vee&&o.jsx(D7,{classes:"",value:"COMPLETED",level:"success"})})]}),c===!1&&w===O?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:ge})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[F&&o.jsx(ne,{}),!F&&o.jsxs(o.Fragment,{children:[o.jsx(Kte,{}),o.jsx("div",{className:`${d===!0?f:" "} mt-2 mb-2`,children:o.jsx(Pf,{backend:Lf,children:T!==null&&((be=T==null?void 0:T.layout)==null?void 0:be.length)&&o.jsx(m6,{})})}),o.jsx(V3,{ref:i}),((Te=T==null?void 0:T.formType)==null?void 0:Te.key)!==""&&(w===M3||w===null)&&o.jsx("span",{children:ec.createPortal(o.jsx("div",{style:{zIndex:9999999},className:"card surface-card shadow-1 border-round py-2 render-form-footer",children:o.jsxs("div",{className:" flex justify-content-center",children:[o.jsx(qt,{text:!0,className:"mr-2 p-button-info",label:"Save Progress",onClick:()=>Y(P),loading:S,disabled:V}),o.jsx(qt,{label:"Submit",onClick:()=>Q(),disabled:S,loading:V})]})}),document.body)})]})]})})]})}),((ye=T==null?void 0:T.formType)==null?void 0:ye.key)==="policies"&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{id:"invoice-content",children:o.jsxs("div",{className:"invoice",children:[o.jsx("div",{className:"invoice-header",children:o.jsx("div",{className:"invoice-company flex align-items-center",children:o.jsxs("h3",{children:[x==null?void 0:x.task_title," "]})})}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(Pf,{backend:Lf,children:T!==null&&((Ae=T==null?void 0:T.layout)==null?void 0:Ae.length)&&o.jsx(m6,{})})}),((re=T==null?void 0:T.formType)==null?void 0:re.key)!==""&&(w===1||w===null)&&r===!1&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"flex justify-content-center",children:o.jsx(qt,{className:"p-button-primary",label:"Accept",onClick:()=>Q(),loading:S})})})]})})})})})}),(((q=T==null?void 0:T.formType)==null?void 0:q.key)==="page"||((ie=T==null?void 0:T.formType)==null?void 0:ie.key)==="pdf")&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(Pf,{backend:Lf,children:T!==null&&((W=T==null?void 0:T.layout)==null?void 0:W.length)&&o.jsx(m6,{})})})})})}),((ue=T==null?void 0:T.formType)==null?void 0:ue.key)==="training"&&o.jsx(aCe,{renderIn:Vte,taskSchema:T,taskId:s,endPoints:a}),((Ie=T==null?void 0:T.formType)==null?void 0:Ie.key)==="exam"&&o.jsx(oCe,{taskId:s,endPoints:a,onStart:h})]})]})};/**
4289
4289
  * React Router v6.28.0
4290
4290
  *
4291
4291
  * Copyright (c) Remix Software Inc.
@@ -57901,7 +57901,7 @@ var jue = function() {
57901
57901
  theme: i.theme,
57902
57902
  formats: i.formats
57903
57903
  };
57904
- jue ? w(new Quill(d.current, V)) : import("./quill-CiEJmMaT.js").then(function(q) {
57904
+ jue ? w(new Quill(d.current, V)) : import("./quill-I2VEGpzI.js").then(function(q) {
57905
57905
  if (q && Se.isExist(d.current)) {
57906
57906
  var N;
57907
57907
  q.default ? N = new q.default(d.current, V) : N = new q(d.current, V), w(N);
@@ -127715,8 +127715,10 @@ const HTe = ({
127715
127715
  function(In) {
127716
127716
  return In.isCorrect === !0;
127717
127717
  }
127718
- ), Fe = u == null ? void 0 : u.quizElements[E], Oe = (mt = (gt = Fe == null ? void 0 : Fe.answerOptions[ae]) == null ? void 0 : gt.answersText) != null && mt[x == null ? void 0 : x.type] ? (Sn = (Mt = Fe == null ? void 0 : Fe.answerOptions[ae]) == null ? void 0 : Mt.answersText) == null ? void 0 : Sn[x == null ? void 0 : x.type] : "", Ge = (Lt = V[E]) != null && Lt.isCorrect ? 1 : 0;
127719
- if (u != null && u.quizElements && E + 1 !== (u == null ? void 0 : u.quizElements.length)) {
127718
+ ), Fe = u == null ? void 0 : u.quizElements[E], Oe = (mt = (gt = Fe == null ? void 0 : Fe.answerOptions[ae]) == null ? void 0 : gt.answersText) != null && mt[x == null ? void 0 : x.type] ? (Sn = (Mt = Fe == null ? void 0 : Fe.answerOptions[ae]) == null ? void 0 : Mt.answersText) == null ? void 0 : Sn[x == null ? void 0 : x.type] : "";
127719
+ console.log("selectedAnswers", V), console.log("currentQuestionIndex", E), console.log("selectedAnswers[currentQuestionIndex]", V[E]);
127720
+ const Ge = (Lt = V[E]) != null && Lt.isCorrect ? 1 : 0;
127721
+ if (console.log("isCorrectAnswer[currentQuestionIndex]", Ge), u != null && u.quizElements && E + 1 !== (u == null ? void 0 : u.quizElements.length)) {
127720
127722
  const In = {
127721
127723
  assessment_user_attempt_id: (je = i == null ? void 0 : i.assesment_user_attempts[((Dt = i == null ? void 0 : i.assesment_user_attempts) == null ? void 0 : Dt.length) - 1]) == null ? void 0 : je.assessment_user_attempt_id,
127722
127724
  session_id: l,
@@ -1,7 +1,7 @@
1
1
  var Bl = Object.defineProperty;
2
2
  var Ml = (n, t, e) => t in n ? Bl(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var T = (n, t, e) => Ml(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, 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 Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-CF_unu9H.js";
4
+ import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, 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 Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-Bjar2tlD.js";
5
5
  function Ki(n) {
6
6
  return n;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cft-builder",
3
- "version": "0.2.102",
3
+ "version": "0.2.103",
4
4
  "type": "module",
5
5
  "types": "dist/types/index",
6
6
  "files": [