"use strict";(globalThis.webpackChunkhelpgent=globalThis.webpackChunkhelpgent||[]).push([[46],{8863:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNC40MzMiIHZpZXdCb3g9IjAgMCAxNSAxNC40MzMiPgogIDxnIGlkPSJleWUtY3Jvc3NlZF8xXyIgZGF0YS1uYW1lPSJleWUtY3Jvc3NlZCAoMSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTkuNjE5KSI+CiAgICA8cGF0aCBpZD0iUGF0aF8xNTI1IiBkYXRhLW5hbWU9IlBhdGggMTUyNSIgZD0iTTE0LjQsMTQuODc5aDBhOS42MTMsOS42MTMsMCwwLDAtMS43MjEtMS45bDEuNzctMS43NjlhLjk0Mi45NDIsMCwwLDAtMS4zMzMtMS4zMzFsLTIuMDM5LDIuMDRBNy44NzgsNy44NzgsMCwwLDAsNy41LDExLjA4Nyw4LjMxOSw4LjMxOSwwLDAsMCwuNiwxNC44NzlhMy40NjEsMy40NjEsMCwwLDAsMCwzLjg5Miw5LjYxMyw5LjYxMywwLDAsMCwxLjcyMSwxLjlMLjU1LDIyLjQ0M2EuOTQzLjk0MywwLDAsMCwxLjMzMywxLjMzM2wyLjAzOS0yLjA0YTcuODc4LDcuODc4LDAsMCwwLDMuNTc3LjgzMSw4LjMxOSw4LjMxOSwwLDAsMCw2LjktMy43OTJBMy40NjEsMy40NjEsMCwwLDAsMTQuNCwxNC44NzlaTTIuMTUzLDE3LjcwN2ExLjU2MSwxLjU2MSwwLDAsMSwwLTEuNzU5QTYuMzc1LDYuMzc1LDAsMCwxLDcuNSwxMi45NzJhNi4xMjksNi4xMjksMCwwLDEsMi4xNDYuMzc3TDguNDgxLDE0LjUxM2EyLjUxMywyLjUxMywwLDAsMC0zLjMsMy4zTDMuNjU0LDE5LjM0QTcuNTk0LDcuNTk0LDAsMCwxLDIuMTUzLDE3LjcwN1ptMTAuNjkyLDBBNi4zNzUsNi4zNzUsMCwwLDEsNy41LDIwLjY4MmE2LjEyOSw2LjEyOSwwLDAsMS0yLjE0Ni0uMzc3TDYuNTE4LDE5LjE0YTIuNTEzLDIuNTEzLDAsMCwwLDMuMy0zLjNsMS41MzEtMS41MzFhNy42LDcuNiwwLDAsMSwxLjUsMS42MzQsMS41NjEsMS41NjEsMCwwLDEsMCwxLjc1OVoiIGZpbGw9IiM2ZTZlNmUiLz4KICA8L2c+Cjwvc3ZnPgo="},10155:(e,t,l)=>{l.d(t,{BT:()=>o,jD:()=>a,oF:()=>i,yY:()=>s});var n=l(38267);const a=n.Ay.div`
    display: flex;
    justify-content: center;
    align-items: center;
    &.helpgent-permission-modal{
        width: auto;
        padding: 0;
    }
    .helpgent-media-preview{
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        height: calc(100vh - 160px);
    }
`,i=n.Ay.div`
    position: relative;
    padding-top: 52.54%;
    width: 100%;

    .helpgent-video-recorder-wrap {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
    }

    .helpgent-video-recorder-container {
        position: relative;
        height: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
        background: var(--helpgent-color-dark);
        border-radius: 30px;
        &.helpgent-record-screen{
            .helpgent-sec{
                font-size: 50px;
                font-weight: 500;
                color: var(--helpgent-color-text);
            }
        }
        &.helpgent-record-audio--start{
            .helpgent-record-btn{
                position: relative;
                background-color: transparent;
                &:after{
                    position: absolute;
                    width: 30px;
                    height: 30px;
                    left: 50%;
                    top: 50%;
                    border-radius: 8px;
                    content: "";
                    background-color: rgb(252, 73, 93);
                    transform: translate(-50%, -50%);
                }
                svg{
                    display: none;
                }
            }
        }
        &.helpgent-video-recorder{
            position: relative;
            &:after,
            &:before{
                position: absolute;
                left: 0px;
                top: 0px;
                width: 100%;
                height: 20%;
                content: "";
                z-index: 1;
                opacity: 0.8;
                background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgb(0, 0, 0));
            }
            &:before{
                top: auto;
                bottom: 0px;
                border-radius: 0px 0px 23px 23px;
                opacity: 0.6;
                background-image: linear-gradient(rgba(0, 0, 0, 0), rgb(0, 0, 0));
            }
            video{
                position: absolute;
                width: 100%;
                height: 100%;
                border-radius: 25px;
                object-fit: cover;
                inset: 0px;
            }
            .helpgent-video-recorder-countdown-container {
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0;
                bottom: 0;
                left: 0;
                right: 0;
                .helpgent-countdown-timer {
                    color: #ffffff;
                }
            }
            .helpgent-timer{
                position: absolute;
                display: block;
                top: 20px;
                left: 65px;
                z-index: 2;
                .helpgent-sec{
                    font-size: 20px;
                    color: var(--helpgent-color-white);
                    font-family: var(--font-family);
                }
            }
            .helpgent-record-action{
                position: relative;
                margin: auto 0 calc(var(--helpgent-bottom-extras-height) + 20px);
                padding: 0;
                z-index: 101;
                &.helpgent-record-start{
                    .helpgent-record-btn{
                        &::after{
                            width: 30px;
                            height: 30px;
                            border-radius: 6px;
                        }
                    }
                }
            }
            .helpgent-record-btn{
                position: relative;
                display: block;
                width: 70px;
                height: 70px;
                margin: 0px auto;
                border-radius: 50%;
                border: 5px solid var(--helpgent-color-white);
                background-color: var(--helpgent-color-white);
                &:after{
                    position: absolute;
                    left: 50%;
                    top: 50%;
                    transform: translate(-50%, -50%);
                    width: calc(100%);
                    height: calc(100%);
                    border-radius: 50%;
                    content: "";
                    z-index: 101;
                    transition-property: width, height, border-radius;
                    transition-duration: 0.2s;
                    transition-timing-function: ease-in;
                    background-color: rgb(252, 73, 93);
                }
            }
        }
        .helpgent-btn-back{
            position: absolute;
            left: 15px;
            top: 15px;
            z-index: 99;
        }
        .helpgent-timer{
            &.helpgent-timer-start{
                .helpgent-sec{
                    color: rgb(252, 73, 93);
                }
            }
            .helpgent-sec{
                font-size: 50px;
                font-weight: 500;
                color: var(--helpgent-color-text)
            }
        }

        .helpgent-record-action{
            padding-top: 200px;
        }
        .helpgent-record-action-inner{
            position: relative;
        }
        .helpgent-record-btn{
            display: flex;
            align-items: center;
            justify-content: center;
            width: 110px;
            height: 110px;
            margin: 0px auto;
            border-radius: 50%;
            transition: background-color 0.3s ease-in-out 0s;
            background-color: rgb(252, 73, 93);
            border: 2px solid rgb(252, 73, 93);
            &:hover{
                color: rgb(252, 73, 93);
                background-color: rgb(255, 255, 255);
                svg{
                    path{
                        fill: rgb(252, 73, 93);
                    }
                }
            }
            svg{
                width: 36px;
                height: 36px;
                path{
                    fill: var(--helpgent-color-white);
                }
            }
        }
        .helpgent-btn-record-right{
            display: flex;
            justify-content: center;
            align-items: center;
            width: 55px;
            height: 55px;
            position: absolute;
            right: 30px;
            top: 50%;
            transform: translateY(-50%);
            border-radius: 50%;
            background-color: rgb(180, 180, 180);
            border: 2px solid transparent;
            text-decoration: none;
            transition: background-color 0.3s ease-in-out 0s;
            color: var(--helpgent-color-white);
            svg{
                width: 20px;
                height: 20px;
                path{
                    fill: var(--helpgent-color-white);
                }
            }
            &:hover{
                background-color: transparent;
                border-color: rgb(180, 180, 180);
                svg{
                    path{
                        fill: rgb(180, 180, 180);
                    }
                }
            }
        }
    }
`,o=n.Ay.div`
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 25px;
    height: 100%;
    max-width: 300px;
    background-color: #fff;
    border-radius: 20px;
    .helpgent-permission-title {
        font-size: 18px;
        font-weight: 500;
        margin: 0px 0px 30px;
        font-family: var(--font-family);
    }

    img {
        width: 100%;
        max-width: 370px;
        margin-bottom: 26px;
    }

    .helpgent-text-right {
        text-align: right;
    }

    .helpgent-header-action {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .helpgent-header-action-item {
        flex-grow: 1;
    }

    .helpgent-action-icon {
        padding: 5px;
        outline: none;
        box-shadow: none;
        &:active, &:focus {
            outline: none;
            box-shadow: none;
        }
        svg {
            width: 15px;
            height: 15px;

            path {
                fill: #2188ff;
            }
        }
    }

    .helpgent-btn {
        justify-content: center;
    }
`,s=n.Ay.div`
    display: block;
    .helpgent-video-recorder-container-area {
        width: calc( 80vw - 40px );

        @media only screen and (max-width: 1400px) {
            width: calc( 80vw - 20px );
        }

        @media only screen and (max-width: 1200px) {
            width: calc( 90vw - 20px );
        }

        @media only screen and (max-width: 992px) {
            width: calc( 100vw - 20px );
        }

        @media only screen and (max-width: 768px) {
            width: calc( 100vw - 40px );
        }

        @media only screen and (max-width: 576px) {
            width: calc( 100vw - 20px );
        }
    }

    .helpgent-media-preview-container {
        width: calc( 70vw - 40px );

        @media only screen and (max-width: 1400px) {
            width: calc( 80vw - 20px );
        }

        @media only screen and (max-width: 1200px) {
            width: calc( 90vw - 20px );
        }

        @media only screen and (max-width: 992px) {
            width: calc( 100vw - 20px );
        }

        @media only screen and (max-width: 768px) {
            width: calc( 100vw - 40px );
        }

        @media only screen and (max-width: 576px) {
            width: calc( 100vw - 20px );
        }
    }
`},10426:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(63064);function a(){const e=(0,n.jE)();return{setStoreData:(t,l)=>{e.setQueryData(t,l)},getStoreData:t=>e.getQueryData(t),removeStoreData:t=>{e.removeQueries(t)}}}},17331:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjwhLS0hRm9udCBBd2Vzb21lIEZyZWUgNi41LjEgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UvZnJlZSBDb3B5cmlnaHQgMjAyMyBGb250aWNvbnMsIEluYy4tLT48cGF0aCBvcGFjaXR5PSIxIiBmaWxsPSIjMUUzMDUw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});var n=l(51609),a=l(86087),i=l(65604),o=l(48036),s=l(35372),r=l(6945),c=l(87277),m=l(56427),g=l(49876),d=l(82900),p=l(61518),u=l(38745);function h(e,t,l){var n;const a=JSON.parse(JSON.stringify(e));if(a.isPro&&!(0,u.L)()||"user_validation"===a.element_type)return;const{singleForm:i,activeElement:o}=t,{elements:s}=i.content,r=s.findIndex(e=>e.id===a.id);a.id=o?.id,a.controls.general.description.value=null!==(n=o?.controls?.general?.description.value)&&void 0!==n?n:"";const c=s[r+1];c&&(a.controls.elementLogic.default_target=c.id),l({...t,isTypeChangeModalActive:!0,changingElement:a})}var N=l(18562),M=l(75035);function E(e,t,l,n,a,i){l.platforms.push({...e,id:(0,N.A)()}),(0,M.A)("controls",t,n,a,i)}var v=l(27716),_=l(88869),w=l(27723);function L(e,t,l,n,a,i,o){switch(e){case"label":l.label=o;break;case"required":l.isRequired=o;break;case"visible":l.isVisible=o}(0,M.A)("fields",t,n,a,i)}const b="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDEyIDE0Ij4KICA8cGF0aCBpZD0ibWVkaWNhbC1zdGFyXzFfIiBkYXRhLW5hbWU9Im1lZGljYWwtc3RhciAoMSkiIGQ9Ik0xMy4zNzcsMTAuNjU2YS44NTcuODU3LDAsMCwxLS43MzUuNDE4Ljg0My44NDMsMCwwLDEtLjQ0OS0uMTI5TDguMzY1LDguNTYydjQuNTYzYS44NjEuODYxLDAsMSwxLTEuNzIyLDBWOC41NjJMMi44MTQsMTAuOTQ1YS44NTEuODUxLDAsMCwxLTEuMTgzLS4yODkuODgyLjg4MiwwLDAsMSwuMjg1LTEuMkw1Ljg1NSw3LDEuOTE1LDQuNTQ4YS44ODMuODgzLDAsMCwxLS4yODUtMS4yLjg1My44NTMsMCwwLDEsMS4xODMtLjI4OUw2LjY0Myw1LjQzOVYuODc1YS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vPgogIDxwYXRoIGlkPSJQYXRoXzE1MjIiIGRhdGEtbmFtZT0iUGF0aCAxNTIyIiBkPSJNMTg3LjY0NSwwaDEuMjI0YS45NzkuOTc5LDAsMCwxLC45NzkuOTc5VjIuMmEuOTc5Ljk3OSwwLDAsMS0uOTc5Ljk3OWgtMS4yMjRhLjk3OS45NzksMCwwLDEtLjk3OS0uOTc5Vi45NzlBLjk3OS45NzksMCwwLDEsMTg3LjY0NSwwWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE4MS4yNTcpIiBmaWxsPSIjY2JjYmNiIi8+Cjwvc3ZnPgo=";var S=l(23142),A=l(76012),x=l(90453);let C;const j="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNC40IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTQuNCAxNiI+CiAgPHBhdGggaWQ9InRyYXNoLXNvbGlkIiBkPSJNMTYuNiw1LjJIMTMuNFY0LjRBMi40LDIuNCwwLDAsMCwxMSwySDkuNEEyLjQsMi40LDAsMCwwLDcsNC40di44SDMuOGEuOC44LDAsMSwwLDAsMS42aC44djguOEEyLjQsMi40LDAsMCwwLDcsMThoNi40YTIuNCwyLjQsMCwwLDAsMi40LTIuNFY2LjhoLjhhLjguOCwwLDEsMCwwLTEuNlptLTgtLjhhLjguOCwwLDAsMSwuOC0uOEgxMWEuOC44LDAsMCwxLC44Ljh2LjhIOC42Wm01LjYsMTEuMmEuOC44LDAsMCwxLS44LjhIN2EuOC44LDAsMCwxLS44LS44VjYuOGg4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMgLTIpIiBmaWxsPSIjZWYwMDAwIi8+Cjwvc3ZnPgo=";var T=l(62957);const z=l.p+"images/placeholder.2549b5c4.png";function k(e,t,l,n,a,i,o,s){let r="";switch("default"===n?r="default_field":"registered"===n?r="registered_field":"guest"===n&&(r="guest_field"),e){case"label":l.label=s;break;case"visible":l.isVisible=s;break;case"required":l.isRequired=s}(0,M.A)(r,t,a,i,o)}var Y=l(30912);function F(e){const{fields:t,fieldName:l,label:a}=e,{singleFormState:s,setSingleFormState:r}=(0,o.$)(),{userVerificationField:c,activeElementId:m}=s,g=Object.keys(t).map(e=>({name:e,...t[e]}));return(0,n.createElement)(Y.px,{className:l!==c?"helpgent-collapsed":null},(0,n.createElement)("div",{className:"helpgent-validation-top",onClick:()=>function(e){r({...s,userVerificationField:e})}(l)},(0,n.createElement)("span",{className:"helpgent-validation-label"},a),(0,n.createElement)("span",{className:"helpgent-validation-collapse"}," ",l===c?(0,n.createElement)(i.A,{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjEuNzM5IiB2aWV3Qm94PSIwIDAgOCAxLjczOSI+CiAgPHBhdGggaWQ9Ikljb25fYXdlc29tZS1wbHVzIiBkYXRhLW5hbWU9Ikljb24gYXdlc29tZS1wbHVzIiBkPSJNNy40MjksNS4zOTNINC44NTdjLS4zOTItLjAwNi0uOTI2LDAtMS43MTQuMDI0TC41NzEsNS4zOTNBLjU3Mi41NzIsMCwwLDAsMCw1Ljk2NHYuNTcxYS41NzEuNTcxLDAsMCwwLC41NzEuNTcxSDMuMTQzYy40NzQtLjAyLjk2My4wNTgsMS43MTQsMEg3LjQyOUEuNTcxLjU3MSwwLDAsMCw4LDYuNTM2VjUuOTY0QS41NzEuNTcxLDAsMCwwLDcuNDI5LDUuMzkzWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtNS4zOTEpIiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="}):(0,n.createElement)(i.A,{src:A.A})," ")),(0,n.createElement)("div",{className:"helpgent-validation-content"},0!==g.length&&g.map((e,a)=>"acceptance"===e.name?(0,n.createElement)("div",{className:"helpgent-field-element",key:a},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>k("visible",t,t[e.name],l,m,s,r,"1"===e.isVisible?"0":"1"),label:(0,w.__)("Add checkbox","helpgent"),isActive:e?.isVisible,className:"helpgent-toggle--has-dependent-field "+("0"===e.isVisible?"helpgent-mb-0":"")})),"1"===e.isVisible?(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("textarea",{type:"text",className:"helpgent-form-group__element",id:"helpgent-user-validation-acceptance",value:e?.label,onChange:n=>k("label",t,t[e.name],l,m,s,r,n.target.value),placeholder:(0,w.__)("Ex: I agree to....","helpgent")}))):null):(0,n.createElement)("div",{className:"helpgent-form-group helpgent-form-group-column",key:a},(0,n.createElement)("div",{className:"helpgent-form-element-inline"},(0,n.createElement)("label",{htmlFor:`helpgent-${e.name}`,className:"helpgent-form-group__label"},e.label),(0,n.createElement)("div",{className:"helpgent-field-element-action"},e.isVisible&&(0,n.createElement)("span",{className:"helpgent-field-visibility","data-key":a,onClick:()=>k("visible",t,t[e.name],l,m,s,r,"1"===e.isVisible?"0":"1")},(0,n.createElement)(i.A,{src:"1"===e.isVisible?f.A:I.A})),e.isRequired&&(0,n.createElement)("span",{className:"helpgent-field-required","data-key":a,onClick:()=>k("required",t,t[e.name],l,m,s,r,"1"===e.isRequired?"0":"1")},(0,n.createElement)(i.A,{src:"1"===e.isRequired?b:y})))),(0,n.createElement)("input",{type:"text",id:`helpgent-${e.name}`,className:"helpgent-form-group__element",value:e.label,placeholder:e.label,onChange:n=>k("label",t,t[e.name],l,m,s,r,n.target.value)})))))}var O=l(88589),Z=l(37734),U=l(27921),G=l(5232),R=l(36834),P=l(14647),W=l(64456),B=l(37877),H=l(95644),Q=l(14905),J=l(1294),V=l(16622),X=l(90781),$=l(13777);function K(e){const{value:t,options:l,onChange:a}=e;return(0,n.createElement)("div",{className:"helpgent-inline-list"},Array.isArray(l)&&l.map(e=>(0,n.createElement)("button",{key:e.value,className:"helpgent-inline-list-item helpgent-btn helpgent-btn-sm helpgent-btn-no-hover helpgent-btn-"+(t===e.value?"primary":"gray"),onClick:()=>{"function"==typeof a&&a(e)}},e.label)))}function q(e){const t="helpgent-separator"+("boolean"==typeof e.shortWidth&&e.shortWidth?" helpgent-separator--short-width":"");return(0,n.createElement)("div",{className:t})}function ee(e){const{top:t,bottom:l,isTopShortWidth:a,isBottomShortWidth:i}=e;return(0,n.createElement)(n.Fragment,null,t&&(0,n.createElement)(q,{shortWidth:a}),e.children,l&&(0,n.createElement)(q,{shortWidth:i}))}const te={toggle:function(e){const{generalControls:t,controls:l,activeElementId:a,label:i,showTopSeparator:r,showBottomSeparator:c}=e,{singleFormState:m,setSingleFormState:g}=(0,o.$)(),{isActive:d}=t;return(0,n.createElement)(ee,{top:r,bottom:c},(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",d,l,t,a,m,g),label:i,isActive:d}))))},select:function(e){const{generalControls:t,controls:l,activeElementId:a,label:i,options:r}=e,{singleFormState:c,setSingleFormState:m}=(0,o.$)(),{value:g}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-maxValue"},i)),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)(_.SelectField,{value:g,options:r,onChange:e=>(0,s.A)("value",e,l,t,a,c,m,e)}))))},text:function(e){const{generalControls:t,controls:l,activeElementId:a,label:i,placeholder:r,hasSubField:c}=e,{singleFormState:m,setSingleFormState:g}=(0,o.$)(),{value:d}=t,p=c?"helpgent-form-group helpgent-mb-10":"helpgent-form-group";return(0,n.createElement)("div",{className:"helpgent-field-element"},i&&(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-text-field"},i)),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:p},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-text-field",value:d,placeholder:r,onChange:e=>(0,s.A)("value",d,l,t,a,m,g,e.target.value)}))))},required:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c}=t,{activeElement:m}=i;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Required","helpgent"),isActive:c,className:"map"===m.element_type?"helpgent-mb-0":""})))},buttonOption:function(e){const{generalControls:t,controls:l,activeElementId:a,label:i,options:r}=e,{singleFormState:c,setSingleFormState:m}=(0,o.$)(),{value:g}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-maxValue"},i)),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)(K,{value:g,options:r,onChange:e=>(0,s.A)("value",g,l,t,a,c,m,e.value)}))))},showTimer:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c,time_in_mins:m}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Show timer","helpgent"),isActive:c,tooltip:!0,tooltipText:(0,w.__)("Timer Text","helpgent")}))),"1"===c?(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-timer-time"},(0,w.__)("Time in mins","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-timer-time",value:m,onChange:e=>(0,s.A)("time-mins",m,l,t,a,i,r,e.target.value)})))):null)},timeComplete:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Time to complete","helpgent"),isActive:c,tooltip:!0,tooltipText:(0,w.__)("It displays an estimated time to users, giving them an idea of how long the form may take to complete. Great for increasing form submission rates.","helpgent")}))))},btnText:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-btnText"},(0,w.__)("Button text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-btnText",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value)}))))},btnUrl:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-btnText"},(0,w.__)("Button url","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"url",className:"helpgent-form-group__element",id:"helpgent-btnText",value:c,placeholder:"ex: https://wpwax.com/helpgent",onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value)}))))},actionButton:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Add action button","helpgent"),isActive:c}))))},maxLength:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c,value:m}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Max characters","helpgent"),isActive:c,className:"helpgent-toggle--has-dependent-field helpgent-mt-30 "+("0"===c?"helpgent-mb-0":"helpgent-mb-10")})),"1"===c?(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-max-character",placeholder:"00",min:0,value:m,onChange:e=>(0,s.A)("value",m,l,t,a,i,r,e.target.value)}))):null))},placeholderText:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-placeholderText"},(0,w.__)("Placeholder text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-placeholderText",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value)}))))},uploadButtonText:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-uploadButtonText"},(0,w.__)("Button text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-uploadButtonText",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value),placeholder:(0,w.__)("Drop file here or click to upload","helpgent")}))))},uploadNoteText:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-uploadNoteText"},(0,w.__)("Upload note","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-uploadNoteText",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value),placeholder:(0,w.__)("Max File Size 10MB","helpgent")}))))},fileSize:function(e){const{generalControls:t,controls:l,activeElementId:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{isActive:m,value:g}=t,{file_size_unit:d}=l.general,[p,u]=(0,a.useState)({isValid:!0,message:""}),h=[{label:"KB",value:"kb"},{label:"MB",value:"mb"}];return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",m,l,t,i,r,c),label:(0,w.__)("Limit file size","helpgent"),isActive:m,className:"helpgent-toggle--has-dependent-field "+("0"===m?"helpgent-mb-25":"")})),"1"===m?(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("div",{className:"helpgent-no-wrap"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-limit-file-size",value:g,min:1,onChange:e=>function(e){const n=e.target.value;"kb"===d.value&&n>2e5||"mb"===d.value&&n>200?u({isValid:!1,message:(0,w.__)("Max allowed size 200MB","helpgent")}):(u({isValid:!0,message:""}),(0,s.A)("value",g,l,t,i,r,c,e.target.value))}(e),placeholder:"10"}),(0,n.createElement)("span",{className:"helpgent-form-group__text-selection"},(0,n.createElement)(_.Select,{options:h,defaultValue:h.filter(e=>e.value===d.value)[0],inputId:"helpgent-country-select",className:"helpgent-select",classNamePrefix:"helpgent-select",isSearchable:!1,placeholder:null,onChange:e=>(0,s.A)("value",m,l,d,i,r,c,e.value)}))),p.isValid?null:(0,n.createElement)("div",{className:"helpgent-validate-danger"},p.message))):null))},fileCount:function(e){const{generalControls:t,controls:l,activeElementId:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{isActive:m,value:g}=t,[d,p]=(0,a.useState)({isValid:!0,message:""});return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",m,l,t,i,r,c),label:(0,w.__)("Limit number of files","helpgent"),isActive:m,className:"helpgent-toggle--has-dependent-field "+("0"===m?"helpgent-mb-0":"")})),"1"===m?(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-limit-total-files",value:g,min:1,onChange:e=>function(e){e.target.value>50?p({isValid:!1,message:(0,w.__)("Max allowed file 50","helpgent")}):(p({isValid:!0,message:""}),(0,s.A)("value",g,l,t,i,r,c,e.target.value))}(e),placeholder:"6"}),d.isValid?null:(0,n.createElement)("div",{className:"helpgent-validate-danger"},d.message))):null))},social:function(e){const{singleFormState:t,setSingleFormState:l}=(0,o.$)(),{controls:r,activeElementId:c,addSocialValidationMessage:m,setAddSocialValidationMessage:g,handleAddSocial:d}=e,{socials:p}=r,{isActive:u,platforms:h}=p,[N,M]=(0,a.useState)({platform:"Facebook",url:""}),E=[{label:"Facebook",value:"facebook",icon:(0,n.createElement)(i.A,{src:G.A})},{label:"X",value:"x",icon:(0,n.createElement)(i.A,{src:R.A})},{label:"Youtube",value:"youtube",icon:(0,n.createElement)(i.A,{src:P.A})},{label:"Instagram",value:"instagram",icon:(0,n.createElement)(i.A,{src:W.A})}];return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",u,r,p,c,t,l),label:(0,w.__)("Social links","helpgent"),isActive:u,className:"helpgent-toggle--has-dependent-field "+("0"===u?"helpgent-mb-0":"")}))),"1"===u?(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-social-list"},0!==h.length&&h.map((e,a)=>(0,n.createElement)("div",{className:"helpgent-add-social__fields",key:a},(0,n.createElement)("div",{className:"helpgent-add-social__select-wrap"},(0,n.createElement)(_.Select,{inputId:"helpgent-social-select",className:"helpgent-select",classNamePrefix:"helpgent-select",placeholder:(0,w.__)("Select","helpgent"),options:E,getOptionLabel:e=>(0,n.createElement)("div",{style:{display:"flex",alignItems:"center"}},e.icon,(0,n.createElement)("span",null,e.label)),onChange:n=>(0,s.A)("social-platform",e.id,r,p,c,t,l,n.label),defaultValue:E.filter(function(t){return"X"===t.label&&"Twitter"===e.platform||t.label===e.platform})[0],value:E.filter(function(t){return"X"===t.label&&"Twitter"===e.platform||t.label===e.platform})[0]}),(0,n.createElement)("div",{className:"helpgent-add-social__action"},(0,n.createElement)("div",{className:"helpgent-social-remove helpgent-btn helpgent-btn-gray helpgent-btn-close",onClick:()=>(0,s.A)("social-remove",h,r,p,c,t,l,e.id)},(0,n.createElement)(i.A,{src:S.A})))),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"url",className:"helpgent-form-group__element",placeholder:(0,w.sprintf)((0,w.__)("Enter %s URL link","helpgent"),e.platform),value:e.url,onChange:n=>(0,s.A)("social-url",e.id,r,p,c,t,l,n.target.value)}))))),(0,n.createElement)("div",{className:"helpgent-add-social"},(0,n.createElement)("div",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-gray helpgent-add-social__btn",onClick:()=>d(N,r,p,c,t,l)},(0,n.createElement)(i.A,{src:A.A})," ",(0,w.__)("Add Social Link","helpgent")))):null)},externalButton:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{isActive:i,btn_text:r,btn_url:c}=t,{singleFormState:m,setSingleFormState:g}=(0,o.$)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",i,l,t,a,m,g),label:(0,w.__)("Add button","helpgent"),isActive:i,className:"helpgent-toggle--has-dependent-field "+("0"===i?"helpgent-mb-0":"")}))),"1"===i&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-external-btnText"},(0,w.__)("Button text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-external-btnText",value:r,onChange:e=>(0,s.A)("external-btn-text",r,l,t,a,m,g,e.target.value)})))),(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-external-btnUrl"},(0,w.__)("Button Url","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-external-btnUrl",value:c,onChange:e=>(0,s.A)("external-btn-url",c,l,t,a,m,g,e.target.value)}))))))},minValue:function(e){const{generalControls:t,controls:l,activeElementId:a,setRangeSliderValidation:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{value:m}=t,g=l?.general?.max_value?.value;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-minValue"},(0,w.__)("Min value","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-minValue",min:0,value:m,onChange:e=>{parseInt(e.target.value)<0?(0,s.A)("value",m,l,t,a,r,c,0):parseInt(e.target.value)>g?(i(!0),(0,s.A)("value",m,l,t,a,r,c,m)):(i(!1),(0,s.A)("value",m,l,t,a,r,c,e.target.value))}}))))},maxValue:function(e){const{generalControls:t,controls:l,activeElementId:a,setRangeSliderValidation:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{value:m}=t,g=l?.general?.min_value?.value;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-maxValue"},(0,w.__)("Max value","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-maxValue",min:g,value:m,onChange:e=>{parseInt(e.target.value)<0?(0,s.A)("value",m,l,t,a,r,c,0):parseInt(e.target.value)<g?(i(!0),(0,s.A)("value",m,l,t,a,r,c,m)):(i(!1),(0,s.A)("value",m,l,t,a,r,c,e.target.value))}}))))},startValue:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)();let{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline helpgent-mb-0"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-startValue"},(0,w.__)("Start value","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-startValue",value:c,min:l?.general?.min_value?.value,max:l?.general?.max_value?.value,onChange:e=>{(0,s.A)("value",c,l,t,a,i,r,e.target.value)}}))))},dateFormat:function(e){const{generalControls:t,controls:l,separator:a,activeElementId:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)();let{value:m}=t;const g=[{format:"en-US",value:`MM${a.value}DD${a.value}YYYY`,isActive:"en-US"===m?"1":"0"},{format:"en-GB",value:`DD${a.value}MM${a.value}YYYY`,isActive:"en-GB"===m?"1":"0"},{format:"en-ZA",value:`YYYY${a.value}MM${a.value}DD`,isActive:"en-ZA"===m?"1":"0"}];return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Date format","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group helpgent-date-format"},g.map((e,a)=>(0,n.createElement)("button",{className:`helpgent-btn helpgent-btn-gray helpgent-date-format__btn helpgent-btn-sm ${"1"===e.isActive&&"helpgent-btn-active"}`,id:`helpgent-dateFormat${a}`,"data-format":e.format,onClick:e=>{(0,s.A)("value",m,l,t,i,r,c,e.target.dataset.format),function(e){e.target.closest(".helpgent-date-format").querySelectorAll(".helpgent-btn").forEach(t=>{t.classList.toggle("helpgent-btn-active",t===e.target)}),m=e.target.dataset.format}(e)},key:a},e.value)))))},dateSeparator:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)();let{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Date separator","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group helpgent-date-separator"},[{value:"-",isActive:"1"},{value:"/",isActive:"0"},{value:".",isActive:"0"}].map((e,o)=>(0,n.createElement)("button",{key:o,className:`helpgent-btn helpgent-btn-gray helpgent-date-separator__btn helpgent-btn-sm ${e.value===c&&"helpgent-btn-active"}`,"data-id":`helpgent-date${o}`,"data-separator":e.value,onClick:e=>{(0,s.A)("value",c,l,t,a,i,r,e.target.dataset.separator),function(e){e.target.closest(".helpgent-date-separator").querySelectorAll(".helpgent-btn").forEach(t=>{t.classList.toggle("helpgent-btn-active",t===e.target)});const t=e.target.dataset.separator,l=document.querySelector(".helpgent-form-group__element--date"),n=l.getAttribute("placeholder");l.setAttribute("placeholder",n.replace(/[-\/.]/g,t))}(e)}},e.value)))))},addressFields:function(e){const{fieldsArray:t,fields:l,activeElementId:a}=e,{singleFormState:s,setSingleFormState:r}=(0,o.$)();return t.map((e,t)=>(0,n.createElement)(d.sx,{draggableId:e.id,index:t,key:e.id},o=>(0,n.createElement)("div",{className:"helpgent-field-element",key:t,ref:o.innerRef,...o.draggableProps,...o.dragHandleProps},(0,n.createElement)("div",{className:"helpgent-field-element__top helpgent-field-element__top--inline"},(0,n.createElement)("label",{className:"helpgent-field-element__label helpgent-mb-0",htmlFor:`helpgent-maxValue-${t}`},e.label),(0,n.createElement)("div",{className:"helpgent-field-element__top__action"},(0,n.createElement)("span",{className:"helpgent-field-visibility","data-key":t,onClick:()=>L("visible",l,l[e.name],a,s,r,"1"===e.isVisible?"0":"1")},(0,n.createElement)(m.Tooltip,{text:"1"===e.isVisible?(0,w.__)("Hide","helpgent"):(0,w.__)("Show","helpgent"),delay:"0",placement:"bottom",hideOnClick:!0},(0,n.createElement)("span",null,(0,n.createElement)(i.A,{src:"1"===e.isVisible?f.A:I.A})))),(0,n.createElement)("span",{className:"helpgent-field-required "+("0"===e.isVisible?"helpgent-field-required--disabled":""),"data-key":t,onClick:()=>{"1"===e.isVisible&&L("required",l,l[e.name],a,s,r,"1"===e.isRequired?"0":"1")}},(0,n.createElement)(m.Tooltip,{text:"1"===e.isRequired?(0,w.__)("Make optional","helpgent"):(0,w.__)("Make required","helpgent"),delay:"0",placement:"bottom",hideOnClick:!0},(0,n.createElement)("span",null,(0,n.createElement)(i.A,{src:"1"===e.isRequired?b:y})))))),(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-field-element__content--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__drag"},(0,n.createElement)(i.A,{src:D})),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:`helpgent-maxValue-${t}`,"data-key":e.id,value:e.label,onChange:t=>L("label",l,l[e.name],a,s,r,t.target.value),placeholder:e.label}))))))},contactFields:function(e){const{fieldsArray:t,fields:l,activeElementId:a}=e,{singleFormState:s,setSingleFormState:r}=(0,o.$)();return t.map((e,t)=>(0,n.createElement)(d.sx,{draggableId:e.id,index:t,key:e.id},o=>(0,n.createElement)("div",{className:"helpgent-field-element",key:t,ref:o.innerRef,...o.draggableProps,...o.dragHandleProps},(0,n.createElement)("div",{className:"helpgent-field-element__top helpgent-field-element__top--inline"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:`helpgent-maxValue-${t}`},e.label),(0,n.createElement)("div",{className:"helpgent-field-element__top__action"},(0,n.createElement)("span",{className:"helpgent-field-visibility","data-key":t,onClick:()=>L("visible",l,l[e.name],a,s,r,"1"===e.isVisible?"0":"1")},(0,n.createElement)(i.A,{src:"1"===e.isVisible?f.A:I.A})),(0,n.createElement)("span",{className:"helpgent-field-required","data-key":t,onClick:()=>L("required",l,l[e.name],a,s,r,"1"===e.isRequired?"0":"1")},(0,n.createElement)(i.A,{src:"1"===e.isRequired?b:y})))),(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-field-element__content--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__drag"},(0,n.createElement)(i.A,{src:D})),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:`helpgent-maxValue-${t}`,"data-key":e.id,value:e.label,onChange:t=>L("label",l,l[e.name],a,s,r,t.target.value),placeholder:e.label}))))))},selectOptionsField:function(e){const{paramsHook:t}=(0,r.Xd)("helpgent_router_references",null),[l,c]=(0,a.useState)(!1),[m,g]=(0,a.useState)(null),{singleFormState:p,setSingleFormState:u}=(0,o.$)(),{generalControls:h,controls:N,activeElementId:E,element_type:v,baseApiRoute:_}=e,{id:L}=t(),{options:b}=h;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top helpgent-mb-15"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Options","helpgent"))),"yes_no"!==v?(0,n.createElement)(d.JY,{onDragEnd:e=>function(e,t){const{destination:l,source:n,draggableId:a,type:i}=e;if(!l)return;if(l.droppableId===n.droppableId&&l.index===n.index)return;const[o]=t.splice(n.index,1);t.splice(l.index,0,o),N.general.options=t,(0,M.A)("controls",N,E,p,u)}(e,b)},(0,n.createElement)(d.gL,{droppableId:"helpgent-droppable-options",type:"helpgent-options"},e=>(0,n.createElement)("div",{ref:e.innerRef,...e.droppableProps},b&&b.map((e,t)=>(0,n.createElement)(d.sx,{draggableId:e.id,index:t,key:e.id},l=>(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-field-element__content--inline helpgent-mb-10",key:t,ref:l.innerRef,...l.draggableProps,...l.dragHandleProps},(0,n.createElement)("div",{className:"helpgent-field-element__drag"},(0,n.createElement)(i.A,{src:D})),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:`helpgent-maxValue-${t}`,"data-key":e.id,value:e.label,onChange:t=>(0,s.A)("select-option",e.id,N,h,E,p,u,t.target.value),placeholder:e.label})),(0,n.createElement)("button",{className:"helpgent-btn helpgent-btn-close helpgent-btn-gray","data-key":e.id,onClick:()=>{return t=e.id,c(!0),void g(t);var t}},(0,n.createElement)(i.A,{src:S.A}))))),e.placeholder))):b&&b.map((e,t)=>(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-field-element__content--inline helpgent-field-element__content--yesNo helpgent-ml-0 "+(t===b.length-1?"helpgent-mb-0":""),key:t},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:`helpgent-maxValue-${t}`,"data-key":e.id,value:e.label,onChange:t=>(0,s.A)("select-option",e.id,N,h,E,p,u,t.target.value),placeholder:e.label})))),l&&(0,n.createElement)(x.A,{title:(0,w.__)("Remove option?","helpgent"),elementId:E,formId:L,setIsDeleteModalActive:c,type:"option",optionData:{controls:N,generalControls:h,removableItemId:m},baseApiRoute:_,moduleState:p,setModuleState:u})),"yes_no"!==v&&(0,n.createElement)("a",{href:"#",className:"helpgent-add-option helpgent-mt-15",onClick:e=>{e.preventDefault(),(0,s.A)("add-option",0,N,h,E,p,u)}},(0,n.createElement)("span",null,(0,n.createElement)(i.A,{src:A.A})),(0,w.__)("Add Option","helpgent")))},selectPictureField:function(e){const{paramsHook:t}=(0,r.Xd)("helpgent_router_references",null),[l,c]=(0,a.useState)(!1),[m,g]=(0,a.useState)(null),{singleFormState:p,setSingleFormState:u}=(0,o.$)(),{generalControls:h,controls:E,activeElementId:v,element_type:_,baseApiRoute:L}=e,{id:b}=t(),{options:y}=h;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top helpgent-mb-15"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Options","helpgent"))),"picture_select"===_&&(0,n.createElement)(d.JY,{onDragEnd:e=>function(e,t){const{destination:l,source:n,draggableId:a,type:i}=e;if(!l)return;if(l.droppableId===n.droppableId&&l.index===n.index)return;const[o]=t.splice(n.index,1);t.splice(l.index,0,o),E.general.options=t,(0,M.A)("controls",E,v,p,u)}(e,y)},(0,n.createElement)(d.gL,{droppableId:"helpgent-droppable-options",type:"helpgent-options"},e=>(0,n.createElement)("div",{ref:e.innerRef,...e.droppableProps},y&&y.map((e,t)=>(0,n.createElement)(d.sx,{draggableId:e.id,index:t,key:e.id},l=>{var a;return(0,n.createElement)("div",{className:y.length!==t+1?"helpgent-mb-30":"helpgent-mb-20",key:t,ref:l.innerRef,...l.draggableProps,...l.dragHandleProps},(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-field-element__content--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__drag"},(0,n.createElement)(i.A,{src:D})),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:`helpgent-maxValue-${t}`,"data-key":e.id,value:e.label,onChange:t=>(0,s.A)("picture-label",e.id,E,h,v,p,u,t.target.value),placeholder:e.label})),(0,n.createElement)("button",{className:"helpgent-btn helpgent-btn-close helpgent-btn-gray","data-key":e.id,onClick:()=>{return t=e.id,c(!0),void g(t);var t}},(0,n.createElement)(i.A,{src:S.A}))),(0,n.createElement)("div",{className:"helpgent-picture-single"},(0,n.createElement)("img",{src:null!==(a=e.url)&&void 0!==a?a:z,alt:(0,w.__)("image","helpgent")}),(0,n.createElement)("div",{className:"helpgent-picture-select-action "+(e.url===z?"helpgent-picture-select-action--upload":"")},(0,n.createElement)("button",{className:"helpgent-btn helpgent-btn-white helpgent-btn-sm",onClick:t=>function(e,t,l,n,a,i,o){C&&C.el&&(C.remove(),C=void 0),C=wp.media({title:(0,w.__)("Select or Upload Media Of Your Chosen Persuasion","helpgent"),button:{text:(0,w.__)("Use this media","helpgent")},library:{type:["image"]},multiple:!1,uploader:{params:{type:"image"}}}),C.on("select",function(){let r=C.state().get("selection").first()&&C.state().get("selection").first().toJSON();r&&r.mime.startsWith("image")?((0,s.A)(e,o,t,l,n,a,i,r.url),i(e=>({...e,pictureUploadError:""}))):i({...a,pictureUploadError:(0,w.__)("Only image files are allowed.","helpgent")}),C=void 0}),C.open()}("picture-update",E,h,v,p,u,e.id)},(0,n.createElement)(i.A,{src:e.url!==z?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxMi4zNTUiIHZpZXdCb3g9IjAgMCAxNCAxMi4zNTUiPgogIDxnIGlkPSJzaHVmZmxlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMC4wMDMgLTEuNDE0KSI+CiAgICA8cGF0aCBpZD0iUGF0aF8xMjU1IiBkYXRhLW5hbWU9IlBhdGggMTI1NSIgZD0iTTEwLjc0NCw1LjJ2Ljk4NGEuNTgzLjU4MywwLDAsMCwxLC40MTNMMTMuODMyLDQuNWEuNTg0LjU4NCwwLDAsMCwwLS44MjVMMTEuNzQsMS41ODVhLjU4My41ODMsMCwwLDAtMSwuNDEzVjMuNEE4LjIsOC4yLDAsMCwwLDYuMzYzLDYuMjY0YTguMDA3LDguMDA3LDAsMCwwLTUuMjk0LTNjLS4wMjctLjAwNi0uMTgxLS4wMjMtLjE5My0uMDIzQS44NzUuODc1LDAsMCwwLC44LDQuOTg5aDBhNi4zODksNi4zODksMCwwLDEsNC40LDIuNkE2LjM4LDYuMzgsMCwwLDEsLjgsMTAuMTk0aDBBLjg3NS44NzUsMCwwLDAsLjg3NiwxMS45NGEuMy4zLDAsMCwwLC4wNjUsMGgwYzMuMDUxLS4yNiw0LjY4OS0yLjE1NCw2LjE0Ny0zLjg0MkE4LjE5Miw4LjE5MiwwLDAsMSwxMC43NDQsNS4yWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCkiLz4KICAgIDxwYXRoIGlkPSJQYXRoXzEyNTYiIGRhdGEtbmFtZT0iUGF0aCAxMjU2IiBkPSJNMTYuOTQ4LDEzLjU4NWEuNTgzLjU4MywwLDAsMC0xLC40MTJ2Ljk5MWE1LjM1NSw1LjM1NSwwLDAsMS0yLjAxMi0xLjE2Ni44NTUuODU1LDAsMCwwLTEuMi4wOTJsLS4wMTUuMDE2YS44NjkuODY5LDAsMCwwLC4xLDEuMjMxLDYuOTgyLDYuOTgyLDAsMCwwLDMuMTMzLDEuNjI2djEuMzk0YS41ODMuNTgzLDAsMCwwLDEsLjQxMmwyLjA5LTIuMDlhLjU4My41ODMsMCwwLDAsMC0uODI0WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMjA2IC00Ljk5NSkiLz4KICA8L2c+Cjwvc3ZnPgo=":T.A}),e.url!==z?(0,w.__)("Replace","helpgent"):(0,w.__)("Add Image","helpgent")),e.url!==z&&(0,n.createElement)("button",{className:"helpgent-btn helpgent-btn-white helpgent-btn-sm helpgent-btn-hover-danger",onClick:t=>(0,s.A)("picture-delete",e.id,E,h,v,p,u,z)},(0,n.createElement)(i.A,{src:j})))))})),e.placeholder))),(0,n.createElement)("button",{className:"helpgent-btn helpgent-btn-gray helpgent-btn-add-picture-field "+(0===y.length?"helpgent-w-f helpgent-btn-block helpgent-ml-0":""),onClick:()=>{const e=(0,N.A)();(0,s.A)("picture-add",z,E,h,v,p,u,e)}},(0,n.createElement)(i.A,{src:A.A}),(0,w.__)("Add new","helpgent")),l&&(0,n.createElement)(x.A,{title:(0,w.__)("Remove option?","helpgent"),elementId:v,formId:b,setIsDeleteModalActive:c,type:"option",optionData:{controls:E,generalControls:h,removableItemId:m},baseApiRoute:L,moduleState:p,setModuleState:u}))},lowestRating:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-low-rating-text"},(0,w.__)("Lowest rating text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-low-rating-text",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value),placeholder:"Ex: Worst"}))))},highestRating:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-high-rating-text"},(0,w.__)("Highest rating text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-high-rating-text",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value),placeholder:"Ex: Best"}))))},replyMethod:function(e){const{generalControls:t,controls:l,activeElementId:i}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),m=(0,u.L)();let g=!1;const d=Object.entries(t).map(([e,{isActive:t}])=>({method:e,isActive:t}));return 1===function(e){const t=[];for(const l in e)e.hasOwnProperty(l)&&"1"===e[l].isActive&&t.push(l);return t}(t).length&&(g=!0),(0,a.useEffect)(()=>{m||(t.screen.isActive="0",(0,M.A)("controls",l,i,r,c))},[m]),(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Users can reply in","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content helpgent-reply-method"},d.map((e,a)=>{let o=null;return"video"===e.method?o=B.A:"voice"===e.method?o=H.A:"text"===e.method?o=Q.A:"screen"===e.method&&(o=J.A),(0,n.createElement)("div",{className:"helpgent-reply-method__single",key:a},(0,n.createElement)(_.Switch,{handleToggle:()=>m||"screen"!==e?.method?(0,s.A)("toggle",t[e.method].isActive,l,t[e.method],i,r,c):c({...r,isProModalActive:!0}),icon:o,label:e.method,isActive:t[e.method].isActive,badgeText:"screen"!==e?.method||m?null:"PRO",disabled:"1"===t[e.method].isActive&&g,className:"helpgent-mb-20"}))}),"1"===t?.text?.isActive&&(0,n.createElement)("div",{className:"helpgent-edit-text-field",onClick:function(){c({...r,isActiveTextFieldScreen:!0})}},(0,w.__)("Edit text fields","helpgent"))))},ratingIcon:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{value:m}=t,g=Object.keys(V.Yi).map(e=>({name:e,...V.Yi[e]}));return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label"},(0,w.__)("Rating icon","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-rating-list"},g.map((e,o)=>(0,n.createElement)("div",{className:m===e.name?"helpgent-rating-single helpgent-active":"helpgent-rating-single",key:o,onClick:()=>{(0,s.A)("value",m,l,t,a,r,c,e.name)}},(0,n.createElement)(i.A,{src:`${m===e.name?e.solid:e.normal}`}))))))},ratingAmount:function(e){const[t,l]=(0,a.useState)({isValid:!0,message:""}),{generalControls:i,controls:r,activeElementId:c}=e,{singleFormState:m,setSingleFormState:g}=(0,o.$)(),{value:d}=i;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label helpgent-mb-15",htmlFor:"helpgent-minValue"},(0,w.__)("Rating amount","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",className:"helpgent-form-group__element",id:"helpgent-minValue",value:d,min:1,onChange:e=>function(e){(""===e.target.value||"0"===e.target.value?"1":e.target.value)>10?l({isValid:!1,message:(0,w.__)("Value must be less than or equal to 10","helpgent")}):(l({isValid:!0,message:""}),(0,s.A)("value",d,r,i,c,m,g,""===e.target.value||"0"===e.target.value?"1":e.target.value))}(e)}),t.isValid?null:(0,n.createElement)("div",{className:"helpgent-validate-danger"},t.message))))},validationGroup:function(e){const{defaultField:t,controls:l,registeredField:a,guestField:o}=e;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-verification-group"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("div",{className:"helpgent-field-element__label"},(0,w.__)("User validation field","helpgent"),(0,n.createElement)(m.Tooltip,{text:(0,w.__)('The User Validation Field validates user emails to identify whether users are registered members or guests. If "Anonymous Submission" is enabled, the "User Validation Field" is automatically removed from the form.',"helpgent"),delay:"0"},(0,n.createElement)("span",{className:"helpgent-tooltip-toggle"},(0,n.createElement)(i.A,{src:O.A}))))),(0,n.createElement)(F,{fields:t,fieldName:"default",label:(0,w.__)("Default field","helpgent")}),(0,n.createElement)(F,{fields:a,fieldName:"registered",label:(0,w.__)("Registered user field","helpgent")}),(0,n.createElement)(F,{fields:o,fieldName:"guest",label:(0,w.__)("Guest user field","helpgent")}))},validateButton:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c,value:m}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",c,l,t,a,i,r),label:(0,w.__)("Add button","helpgent"),isActive:c}))),"1"===c&&(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-external-btnText"},(0,w.__)("Button text","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-external-btnText",value:m,onChange:e=>(0,s.A)("value",m,l,t,a,i,r,e.target.value)})))))},leadToggleField:function(e){const{generalControls:t,controls:l}=e,{isActive:i}=t,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{activeElementId:m}=r,g=(0,u.L)();return(0,a.useEffect)(()=>{g||(t.isActive="1",(0,M.A)("controls",l,m,r,c))},[g]),(0,n.createElement)("div",{className:"helpgent-mb-25"},(0,n.createElement)(_.Switch,{handleToggle:()=>g?(0,s.A)("toggle",i,l,t,m,r,c):c({...r,isProModalActive:!0}),badgeText:g?null:"PRO",label:(0,w.__)("Collect lead","helpgent"),isActive:i}))},mapAuthorLocationField:function(e){const{generalControls:t,controls:l,activeElementId:r}=e,{singleFormState:c,setSingleFormState:m}=(0,o.$)(),{coordinates:g}=t,[d,p]=(0,a.useState)(null),u=(0,a.useRef)(null),h=(0,a.useRef)(null),[N,M]=(0,a.useState)(!1),[E,v]=(0,a.useState)(!1),{googleMapInstance:_,googleMapAutocomplete:L}=c;return(0,a.useEffect)(()=>{if(d){const e=d?.position.lat,n=d?.position.lng;(0,s.A)("author-location",{lat:e,lng:n},l,t,r,c,m)}},[d]),(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-author-location"},(0,w.__)("Add your location on Google Maps","helpgent")),(0,n.createElement)("div",{className:"helpgent-author-location-input"},(0,n.createElement)("input",{ref:u,type:"text",className:"helpgent-form-group__element",id:"helpgent-author-location",placeholder:"New York, NY, USA",onChange:e=>{const t=e.target.value;v(""!==t),""!==t&&L?L.getPlacePredictions({input:t},(e,t)=>{if(t===google.maps.places.PlacesServiceStatus.OK){let t="";e.forEach(e=>{t+=`\n\t\t\t\t  <div class="helpgent-map-dropdown-item" data-placeid="${e.place_id}">\n\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><g id="marker" transform="translate(-1.5)"><path id="Path_1494" data-name="Path 1494" d="M8.5,0a7.009,7.009,0,0,0-7,7c0,1.884,1.467,4.511,4.361,7.806a3.517,3.517,0,0,0,5.28,0C14.034,11.512,15.5,8.885,15.5,7A7.009,7.009,0,0,0,8.5,0ZM9.638,13.488a1.553,1.553,0,0,1-2.275,0C4.907,10.691,3.5,8.326,3.5,7a5,5,0,1,1,10,0C13.5,8.326,12.093,10.691,9.638,13.488Z" fill="#6e6e6e"/><path id="Path_1495" data-name="Path 1495" d="M10.546,6.055a2.909,2.909,0,1,0,2.909,2.909,2.909,2.909,0,0,0-2.909-2.909Zm0,3.817a.909.909,0,1,1,.909-.909A.909.909,0,0,1,10.546,9.872Z" transform="translate(-2.046 -2.018)" fill="#6e6e6e"/></g></svg>\n\t\t\t\t\t${e.description}\n\t\t\t\t  </div>`}),h.current&&(h.current.innerHTML=t)}else h.current&&(h.current.innerHTML="")}):h.current&&(h.current.innerHTML="")}}),N&&(0,n.createElement)("span",{className:"helpgent-input-icon-close",id:"helpgent-reset-author-location",onClick:function(){d&&d.setMap(g),M(!1),v(!1),u.current.value="",(0,s.A)("author-location",{lat:40.7127753,lng:-74.0059728},l,t,r,c,m)}},(0,n.createElement)(i.A,{src:X.A}))),E&&(0,n.createElement)("div",{ref:h,className:"helpgent-map-autocomplete-dropdown",id:"author-map-dropdown",onClick:e=>{(e=>{if(e.target&&e.target.classList.contains("helpgent-map-dropdown-item")){const t={placeId:e.target.getAttribute("data-placeid"),fields:["name","formatted_address","geometry"]};new google.maps.places.PlacesService(document.createElement("div")).getDetails(t,function(e,t){t===google.maps.places.PlacesServiceStatus.OK&&(u.current&&(u.current.value=e.formatted_address),M(!0)),d&&d.setMap(null);const l=document.createElement("img");l.src=$.A;const n=new google.maps.marker.AdvancedMarkerElement({position:e.geometry.location,map:_,content:l});p(n),_.panTo(e.geometry.location)})}v(!1)})(e)}}))))},mapUserLocationField:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{isActive:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)(_.Switch,{handleToggle:()=>{(0,s.A)("toggle",c,l,t,a,i,r)},label:(0,w.__)("Collect user location","helpgent"),isActive:c,className:"0"===c?"helpgent-mb-0":""})))},gdprDescriptionField:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{options:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-gdpr-description"},(0,w.__)("Description","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("textarea",{type:"value",className:"helpgent-form-group__element",id:"helpgent-gdpr-description",value:c[0]?.label,onChange:e=>(0,s.A)("gdpr-option",c[0]?.id,l,t,a,i,r,e.target.value),placeholder:(0,w.__)("GDPR consent","helpgent")}))))},gdprLearnMoreToggleField:function(e){const{generalControls:t,controls:l}=e,{isActive:a}=t,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{activeElementId:c}=i;return(0,u.L)(),(0,n.createElement)("div",{className:"helpgent-learn-more-toggle"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",a,l,t,c,i,r),tooltip:!0,tooltipText:"More information",label:"Enable learn more",isActive:a}))},gdprLabelField:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{value:c}=t;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element-gdpr-label helpgent-mt-25"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-gdpr-label"},(0,w.__)("Label","helpgent")),(0,n.createElement)("span",{className:"helpgent-field-element__label-inner",dangerouslySetInnerHTML:{__html:sprintf((0,w.__)("Place the linking text between two %s mark. %s Ex: %slink%s","helpgent"),"<span>%</span>","</br>","%","%")}})),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("textarea",{type:"value",className:"helpgent-form-group__element",id:"helpgent-gdpr-label",value:c,onChange:e=>(0,s.A)("value",c,l,t,a,i,r,e.target.value),placeholder:(0,w.__)("GDPR label","helpgent")}))))},gdprLinkField:function(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{value:g}=t;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element-gdpr-link"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-uploadNoteText"},(0,w.__)("Link url","helpgent"),(0,n.createElement)(m.Tooltip,{text:(0,w.__)('Link url more info <a href="#">test</a>',"helpgent"),delay:"0"},(0,n.createElement)("span",{className:"helpgent-tooltip-toggle"},(0,n.createElement)(i.A,{src:O.A}))))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"value",className:"helpgent-form-group__element",id:"helpgent-uploadNoteText",value:g,onChange:e=>(0,s.A)("value",g,l,t,a,r,c,e.target.value),placeholder:"https://"}))))},quotationMarkToggle:function(e){const{generalControls:t,controls:l}=e,{isActive:a}=t,{singleFormState:i,setSingleFormState:r}=(0,o.$)(),{activeElementId:c}=i;return(0,n.createElement)("div",{className:"helpgent-quotation-toggle helpgent-mb-25"},(0,n.createElement)(_.Switch,{handleToggle:()=>(0,s.A)("toggle",a,l,t,c,i,r),label:(0,w.__)("Quotation marks","helpgent"),isActive:a}))}},le={overlayToggle:function(e){const{mediaControls:t,controls:l,global:a}=e,{isActive:i}=t,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{activeElementId:m}=r;return(0,n.createElement)(_.Switch,{handleToggle:()=>l?(0,s.A)("toggle",i,l,t,m,r,c):(0,Z.A)("background_style","background_overlay",{isActive:"1"===i?"0":"1"},a.background_style,r,c),label:(0,w.__)("Background overlay","helpgent"),isActive:i})},overlayColor:function(e){const{mediaControls:t,controls:l,global:a}=e,{value:i}=t,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{activeElementId:m}=r;return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__left"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-btn-overlay-color"},(0,w.__)("Overlay color","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__right"},(0,n.createElement)(U.A,{id:"helpgent-btn-overlay-color",textColor:i,handler:e=>l?(0,s.A)("value",i,l,t,m,r,c,e.target.value):(0,Z.A)("background_style","overlay_color",{value:e.target.value},a.background_style,r,c)})))},overlayOpacity:function(e){const{mediaControls:t,controls:l,global:a}=e,{value:i}=t,{singleFormState:r,setSingleFormState:c}=(0,o.$)(),{activeElementId:g}=r;return(0,n.createElement)("div",{className:"helpgent-rangeControl helpgent-rangeControl--sm"},(0,n.createElement)("span",{className:"helpgent-field-element__label"},(0,w.__)("Overlay opacity","helpgent")),(0,n.createElement)("div",{className:"helpgent-rangeControl__wrapper"},(0,n.createElement)(m.RangeControl,{initialPosition:parseInt(i),max:100,min:0,railColor:"#D5D5D5",trackColor:"#6551F2",withInputField:!1,onChange:e=>l?(0,s.A)("value",i,l,t,g,r,c,e):(0,Z.A)("background_style","overlay_opacity",{value:e},a.background_style,r,c)}),(0,n.createElement)("span",{className:"helpgent-rangeControl__value"},i,"%")))},colorFields:function(e){const{global:t}=e,{singleFormState:l,setSingleFormState:a}=(0,o.$)();return t?.color_style&&Object.keys(t?.color_style).map((e,i)=>{if(("chat_title_color"===e||"footer_text_color"===e)&&"open_ended"!==l?.activeElement?.element_type)return;if("icon"===e&&"statement"!==l?.activeElement?.element_type)return;let o="";return"icon"===e?o=(0,w.__)("Icon","helpgent"):"title"===e?o=(0,w.__)("Title","helpgent"):"description"===e?o=(0,w.__)("Description","helpgent"):"options_color"===e?o=(0,w.__)("Options","helpgent"):"button"===e?o=(0,w.__)("Button","helpgent"):"button_text"===e?o=(0,w.__)("Button text","helpgent"):"chat_title_color"===e?o=(0,w.__)("Chat title","helpgent"):"footer_text_color"===e&&(o=(0,w.__)("Footer text","helpgent")),(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline",key:i},(0,n.createElement)("div",{className:"helpgent-field-element__left"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-btn-text-color"},o," ",(0,w.__)("color","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__right"},(0,n.createElement)(U.A,{id:"helpgent-btn-text-color",textColor:t?.color_style[e]?.value,handler:n=>(0,Z.A)("color_style",e,n.target.value,t.color_style,l,a)})))})},selectableOptionsField:function(e){let t="",l=[];const{optionType:a,global:s}=e,{singleFormState:r,setSingleFormState:c}=(0,o.$)();return"corner"===a?(t="Rounded corner",l=[{name:"round",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBpZD0iUGF0aF8xNjIyIiBkYXRhLW5hbWU9IlBhdGggMTYyMiIgZD0iTTEwOCw2My40NDZoOFY2MS42aC04YTgsOCwwLDEsMCwwLDE2aDhWNzUuNzU0aC04YTYuMTU0LDYuMTU0LDAsMSwxLDAtMTIuMzA4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwMCAtNjEuNikiIGZpbGw9IiMzYzNjM2MiLz4KPC9zdmc+Cg=="},{name:"partiallyRound",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBpZD0iUGF0aF8xNjI0IiBkYXRhLW5hbWU9IlBhdGggMTYyNCIgZD0iTTY4LjEwOCw2My40NDZINzkuOFY2MS42SDY4LjEwOEE0LjI4MSw0LjI4MSwwLDAsMCw2My44LDY1LjkwOHY3LjM4NUE0LjI4MSw0LjI4MSwwLDAsMCw2OC4xMDgsNzcuNkg3OS44Vjc1Ljc1NEg2OC4xMDhhMi40NjksMi40NjksMCwwLDEtMi40NjItMi40NjJWNjUuOTA4QTIuNDMsMi40MywwLDAsMSw2OC4xMDgsNjMuNDQ2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTYzLjggLTYxLjYpIiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},{name:"square",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBpZD0iUGF0aF8xNjIzIiBkYXRhLW5hbWU9IlBhdGggMTYyMyIgZD0iTTQyLDYzLjQ0NlY2MS42SDI2djE2SDQyVjc1Ljc1NEgyNy44NDZWNjMuNDQ2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI2IC02MS42KSIgZmlsbD0iIzNjM2MzYyIvPgo8L3N2Zz4K"}]):"element_size"===a?(t=(0,w.__)("Question elements","helpgent"),l=["lg","md","sm"]):"specialElement_size"===a&&(t=(0,w.__)("Welcome & Endings screens","helpgent"),l=["lg","md","sm"]),(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("span",{className:"helpgent-field-element__label helpgent-selectable-field-label"},t)),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)(Y.lm,{className:"helpgent-selectable-option-list"},l.map((e,t)=>(0,n.createElement)("span",{className:`helpgent-selectable-option ${("corner"===a?e.name:e)===s[a]?"helpgent-active":""} `,key:t,onClick:()=>function(e){(0,Z.A)(a,null,"corner"===a?e.name:e,s[a],r,c)}(e)},"corner"===a?(0,n.createElement)(i.A,{src:e.icon}):e)))))}},ne="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSI1LjQ0OCIgdmlld0JveD0iMCAwIDEwIDUuNDQ4Ij4KICA8cGF0aCBpZD0iYW5nbGUtc21hbGwtZG93biIgZD0iTTE0LjIwNyw3LjcwN2ExLDEsMCwwLDAtMS40MTUsMEw5LjczNSwxMC43NjRhLjMzMy4zMzMsMCwwLDEtLjQ3MSwwTDYuMjA3LDcuNzA3QTEsMSwwLDEsMCw0Ljc5Myw5LjEyMUw3Ljg1LDEyLjE3OWEyLjMzMywyLjMzMywwL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3JtPSJ0cmFuc2xhdGUoMTc4NSA3OTcuNzk5KSIgZmlsbD0iI2EyYTJhMiIvPgogIDwvZz4KPC9zdmc+Cg==",me="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDE0IDE0Ij4KICA8cGF0aCBpZD0iUGF0aF8xNTgxIiBkYXRhLW5hbWU9IlBhdGggMTU4MSIgZD0iTTcsLjVhNyw3LDAsMSwwLDcsN0E3LDcsMCwwLDAsNywuNVpNOC4yODUsNy44NjhBMS4yODUsMS4yODUsMCwwLDAsNyw2LjU4M0g3QTEuMjg1LDEuMjg1LDAsMCwwLDUuNzE1LDcuODY4VjEwLjZBMS4yODUsMS4yODUsMCwwLDAsNywxMS44ODlIN0ExLjI4NSwxLjI4NSwwLDAsMCw4LjI4NSwxMC42Wk03LDMuMTExQTEuMjg1LDEuMjg1LDAsMSwwLDguMjg1LDQuNCwxLjI4NiwxLjI4NiwwLDAsMCw3LDMuMTExWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC41KSIgZmlsbD0iIzIxODhmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo=";var ge=l(18864),de=l(5591),pe=l(74618),ue=l(40493),he=l(27308),Ne=l(29898);function Me(e){const{generalControls:t,controls:l,activeElementId:a}=e,{singleFormState:i,setSingleFormState:r}=(0,o.$)();return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-mt-25"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("span",{className:"helpgent-field-element__label helpgent-selectable-field-label"},"Theme"," ")),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)(Y.rp,{className:"helpgent-theme-selection-list"},(0,n.createElement)("li",{className:`helpgent-btn helpgent-btn-sm helpgent-btn-${"light"===t?.value?"primary":"light"} ${""===helpgent_localization?.google_recaptcha_site_key?"helpgent-btn-disabled":""}`,onClick:()=>{(0,s.A)("value",null,l,t,a,i,r,"light")}},"Light"),(0,n.createElement)("li",{className:`helpgent-btn helpgent-btn-sm helpgent-btn-${"dark"===t?.value?"primary":"light"} ${""===helpgent_localization?.google_recaptcha_site_key?"helpgent-btn-disabled":""}`,onClick:()=>{(0,s.A)("value",null,l,t,a,i,r,"dark")}},"Dark"))))}var Ee=l(90221),ve=l(86765),_e=l(20978);function we(e){const{paramsHook:t}=(0,r.Xd)("helpgent_router_references",null),{singleFormState:l,setSingleFormState:s}=(0,o.$)(),{singleForm:c,activeElement:u,deviceType:N,isTypeChangeModalActive:_}=l,{id:L}=t(),b=(0,a.useRef)(null),y=(0,a.useRef)(null),[f,I]=(0,a.useState)(!1),[D,S]=(0,a.useState)(!1),[A,C]=(0,a.useState)(!1),{activeScreen:j,baseApiRoute:T,baseLinkRoute:z}=e,{elements:k}=c.content,Y=(0,Ne.HS)(),{id:F,icon:O,title:Z,fields:U,default_field:G,registered_field:R,guest_field:P,controls:W,media:B,element_type:H,layout:Q}=u,{general:J,socials:X,externalButton:$,fieldDesign:K}=W,[q,ee]=(0,a.useState)(B.url);function we(e){"openEndedDefault"===e&&s(e=>({...e,deviceType:"desktop"})),(0,M.A)("layout",e,F,l,s)}te.required,(0,pe.A)(".helpgent-screen-setting-element__content",".helpgent-mega-dropdown",48);const[Le,be]=(0,a.useState)(null);(0,a.useEffect)(()=>{(0,v.A)(D,S,b)},[D]);for(const e in U)U[e].id=e;const ye=U&&Object.keys(U).map(e=>({name:e,...U[e]}));function fe(e,t){if(!(l=W)||"object"!=typeof l||Array.isArray(l))return!1;var l;if(!W[e].hasOwnProperty(t))return!1;const n=(0,r.CR)(`${H}.controls.${e}.${t}.canShow`,Y,null);return"function"!=typeof n||n(u)}(0,a.useEffect)(()=>{ee(""),setTimeout(()=>{ee(B.url)},0)},[F,B.url]);const[Ie,De]=(0,a.useState)({x:.5,y:.5});function Se(){(0,M.A)("media",{...u?.media,focalPoint:Ie},F,l,s)}return(0,a.useEffect)(()=>{0===Object.keys(u?.media).length&&De({x:.5,y:.5})},[u?.media]),(0,n.createElement)(ue.z,{className:"helpgent-screen-setting-wrap"},"user_validation"!==H&&"end"!==H&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},(0,n.createElement)("h5",{className:"helpgent-screen-setting-element__label"},(0,w.__)("Change element","helpgent")),(0,n.createElement)("div",{className:"helpgent-screen-setting-element__content",ref:b},(0,n.createElement)("div",{className:"helpgent-element-dropdown",onClick:function(e){S(!0),(0,de.A)(e,".helpgent-screen-setting-element__content",".helpgent-mega-dropdown",null,48,!1,"right")}},(0,n.createElement)("div",{className:"helpgent-element-dropdown__content"},(0,n.createElement)("div",{className:"helpgent-element-dropdown__icon"},(0,n.createElement)(i.A,{src:V.UF[O]})),(0,n.createElement)("h4",{className:"helpgent-element-dropdown__title"},function(e){switch(e){case"welcome":return"Welcome";case"address":return"Address";case"button":return"Button";case"contact_info":return"Contact info";case"date":return"Date";case"time":return"Time";case"dropdown":return"Dropdown";case"email":return"Email";case"end":return"End";case"file_upload":return"File upload";case"long_text":return"Long text";case"multi_select":return"Multi-select";case"number":return"Number";case"open_ended":return"Open ended";case"phone_number":return"Phone number";case"picture_select":return"Picture select";case"promoter_score":return"Promoter score";case"rating_star":return"Rating";case"short_text":return"Short text";case"single_select":return"Single select";case"range_slider":return"Range Slider";case"website":return"Website";case"user_validation":return"User validation";case"yes_no":return"Yes/No";case"gdpr":return"GDPR";case"statement":return"Statement";case"map":return"Map";case"recaptcha":return"reCaptcha"}}(H))),(0,n.createElement)("span",{className:"helpgent-element-dropdown__arrow"},(0,n.createElement)(i.A,{src:ne}))),(0,n.createElement)(p.A,{isOpenMegaDropdown:D,handleItemEvent:h,isElementTypeChangingDropdown:!0}))),_&&(0,n.createElement)(x.A,{title:(0,w.__)("Update element type?","helpgent"),elementId:F,formId:L,setIsDeleteModalActive:!0,type:"element-type",baseApiRoute:T,moduleState:l,setModuleState:s})),"end"!==H&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},"gdpr"===H&&(0,n.createElement)("div",{className:"helpgent-alert helpgent-alert--info helpgent-mb-25"},(0,n.createElement)("div",{className:"helpgent-alert__icon"},(0,n.createElement)(i.A,{src:me})),(0,n.createElement)("div",{className:"helpgent-alert__text"},(0,n.createElement)("p",null,(0,w.__)("The GDPR element ensures compliance by requesting user consent before data collection. It enhances transparency and accountability in data handling processes, aligning with the principles of the General Data Protection Regulation (GDPR)","helpgent")))),(0,n.createElement)("span",{className:"helpgent-screen-setting-block__label"},(0,w.__)("Element settings","helpgent")),(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},"recaptcha"===H&&(0,g.$)("helpgent_form_edit_recaptcha_key",{}),"map"===H&&(0,g.$)("helpgent_form_google_map_key",{}),J.theme&&(0,n.createElement)(Me,{generalControls:J.theme,controls:W,activeElementId:F}),J.quotation_mark&&(0,n.createElement)(te.quotationMarkToggle,{generalControls:J.quotation_mark,controls:W,activeElementId:F}),"gdpr"===H&&J?.options&&(0,n.createElement)(te.gdprDescriptionField,{generalControls:J,controls:W,activeElementId:F}),J.learn_more&&(0,n.createElement)(te.gdprLearnMoreToggleField,{generalControls:J.learn_more,controls:W,activeElementId:F}),J.learn_more_label&&"1"===J.learn_more.isActive&&(0,n.createElement)(te.gdprLabelField,{generalControls:J.learn_more_label,controls:W,activeElementId:F}),J.learn_more_link&&"1"===J.learn_more.isActive&&(0,n.createElement)(te.gdprLinkField,{generalControls:J.learn_more_link,controls:W,activeElementId:F}),J.required&&"map"!==H&&(0,n.createElement)(te.required,{generalControls:J.required,controls:W,activeElementId:F}),J.lead_collection&&(0,n.createElement)(te.leadToggleField,{generalControls:J.lead_collection,controls:W,activeElementId:F}),J.low_rating_text&&(0,n.createElement)(te.lowestRating,{generalControls:J.low_rating_text,controls:W,activeElementId:F}),J.high_rating_text&&(0,n.createElement)(te.highestRating,{generalControls:J.high_rating_text,controls:W,activeElementId:F}),J.rating_icon&&(0,n.createElement)(te.ratingIcon,{generalControls:J.rating_icon,controls:W,activeElementId:F}),J.rating_amount&&(0,n.createElement)(te.ratingAmount,{generalControls:J.rating_amount,controls:W,activeElementId:F}),"user_validation"===H&&(0,n.createElement)(te.validationGroup,{defaultField:G,controls:W,registeredField:R,guestField:P}),J.time_to_complete&&(0,n.createElement)(te.timeComplete,{generalControls:J.time_to_complete,controls:W,activeElementId:F}),J.validate_btn&&(0,n.createElement)(te.validateButton,{generalControls:J.validate_btn,controls:W,activeElementId:F}),J.btn_text&&(0,n.createElement)(te.btnText,{generalControls:J.btn_text,controls:W,activeElementId:F}),J.btn_url&&(0,n.createElement)(te.btnUrl,{generalControls:J.btn_url,controls:W,activeElementId:F}),J.max_length&&(0,n.createElement)(te.maxLength,{generalControls:J.max_length,controls:W,activeElementId:F}),J.placeholder&&(0,n.createElement)(te.placeholderText,{generalControls:J.placeholder,controls:W,activeElementId:F}),J.upload_btn_text&&(0,n.createElement)(te.uploadButtonText,{generalControls:J.upload_btn_text,controls:W,activeElementId:F}),J.upload_note&&(0,n.createElement)(te.uploadNoteText,{generalControls:J.upload_note,controls:W,activeElementId:F}),J.file_size&&(0,n.createElement)(te.fileSize,{generalControls:J.file_size,controls:W,activeElementId:F}),J.file_count&&(0,n.createElement)(te.fileCount,{generalControls:J.file_count,controls:W,activeElementId:F}),J.reply_methods&&(0,n.createElement)(te.replyMethod,{generalControls:J.reply_methods,controls:W,activeElementId:F}),J.min_value&&(0,n.createElement)(te.minValue,{generalControls:J.min_value,controls:W,activeElementId:F,setRangeSliderValidation:C}),J.max_value&&(0,n.createElement)(te.maxValue,{generalControls:J.max_value,controls:W,activeElementId:F,setRangeSliderValidation:C}),J.start_value&&(0,n.createElement)(te.startValue,{generalControls:J.start_value,controls:W,activeElementId:F}),A&&(0,n.createElement)("span",{className:"helpgent-validate-danger"},(0,w.__)("Min value must not be greater than Max value","helpgent")),J.date_format&&(0,n.createElement)(te.dateFormat,{generalControls:J.date_format,controls:W,separator:J.separator,activeElementId:F}),fe("general","timeFormat")&&(0,n.createElement)(te.buttonOption,{generalControls:J.timeFormat,controls:W,activeElementId:F,label:(0,w.__)("Time Format","helpgent"),options:[{value:24,label:(0,w.__)("24 Hours","helpgent")},{value:12,label:(0,w.__)("AM/PM","helpgent")}]}),fe("general","defaultTime")&&(0,n.createElement)(te.buttonOption,{generalControls:J.defaultTime,controls:W,activeElementId:F,label:(0,w.__)("Default Time","helpgent"),options:[{value:"none",label:(0,w.__)("None","helpgent")},{value:"current",label:(0,w.__)("Current","helpgent")}]}),fe("general","minuteStepping")&&(0,n.createElement)(te.select,{generalControls:J.minuteStepping,controls:W,activeElementId:F,label:(0,w.__)("Minute Stepping","helpgent"),options:[{value:1,label:(0,w.__)("1","helpgent")},{value:5,label:(0,w.__)("5","helpgent")},{value:10,label:(0,w.__)("10","helpgent")},{value:15,label:(0,w.__)("15","helpgent")},{value:30,label:(0,w.__)("30","helpgent")}]}),fe("general","isTimeRange")&&(0,n.createElement)(te.toggle,{generalControls:J.isTimeRange,controls:W,activeElementId:F,label:(0,w.__)("Time Range","helpgent"),showTopSeparator:!0}),fe("general","defaultPlaceholder")&&(0,n.createElement)(te.text,{generalControls:J.defaultPlaceholder,controls:W,activeElementId:F,label:(0,w.__)("Placeholder text","helpgent"),hasSubField:!0}),fe("general","startTimePlaceholder")&&(0,n.createElement)(te.text,{generalControls:J.startTimePlaceholder,controls:W,activeElementId:F,label:(0,w.__)("Placeholder text","helpgent"),hasSubField:!0}),fe("general","endTimePlaceholder")&&(0,n.createElement)(te.text,{generalControls:J.endTimePlaceholder,controls:W,activeElementId:F}),J.separator&&(0,n.createElement)(te.dateSeparator,{generalControls:J.separator,controls:W,activeElementId:F}),("address"===H||"contact_info"===H)&&U&&(0,n.createElement)(d.JY,{onDragEnd:e=>function(e,t){const{destination:n,source:a,draggableId:i,type:o}=e;if(!n)return;if(n.droppableId===a.droppableId&&n.index===a.index)return;const[r]=t.splice(a.index,1);t.splice(n.index,0,r);const c=t.reduce((e,t)=>(e[t.id]={...t},delete e[t.id].id,e),{});(0,M.A)("fields",c,F,l,s)}(e,ye)},(0,n.createElement)(d.gL,{droppableId:"helpgent-droppable-address",type:"helpgent-other-screens"},e=>(0,n.createElement)("div",{ref:e.innerRef,...e.droppableProps},(0,n.createElement)(te.addressFields,{fieldsArray:ye,fields:U,activeElementId:F}),e.placeholder))),("single_select"===H||"multi_select"===H||"dropdown"===H)&&J.options&&(0,n.createElement)(te.selectOptionsField,{generalControls:J,controls:W,activeElementId:F,element_type:"select-options",baseApiRoute:T}),"yes_no"===H&&J.options&&(0,n.createElement)(te.selectOptionsField,{generalControls:J,controls:W,activeElementId:F,element_type:"yes_no",baseApiRoute:T}),"picture_select"===H&&J.options&&(0,n.createElement)(te.selectPictureField,{generalControls:J,controls:W,activeElementId:F,element_type:"picture_select",baseApiRoute:T}),J.author_location&&(0,n.createElement)(te.mapAuthorLocationField,{generalControls:J.author_location,controls:W,activeElementId:F}),J.user_location&&(0,n.createElement)(te.mapUserLocationField,{generalControls:J.user_location,controls:W,activeElementId:F}),J.required&&"map"===H&&"1"===J?.user_location?.isActive&&(0,n.createElement)(te.required,{generalControls:J.required,controls:W,activeElementId:F}))),X&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},(0,n.createElement)(te.social,{controls:W,activeElementId:F,addSocialValidationMessage:Le,setAddSocialValidationMessage:be,handleAddSocial:E}))),$&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},(0,n.createElement)(te.externalButton,{generalControls:$,controls:W,activeElementId:F}))),"end"!==H&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("span",{className:"helpgent-screen-setting-block__label"},(0,w.__)("Layout","helpgent")),(0,n.createElement)("div",{className:"helpgent-layout-actions"},"open_ended"===u.element_type&&(0,n.createElement)("div",{className:"helpgent-layout-action__single helpgent-layout-action__single--open-ended "+("openEndedDefault"===Q?"helpgent-active":""),onClick:()=>we("openEndedDefault")},(0,n.createElement)(i.A,{src:re})),(0,n.createElement)("div",{className:"helpgent-layout-action__single "+("mediaLeft"===Q?"helpgent-active":""),onClick:()=>we("mediaLeft")},(0,n.createElement)(i.A,{src:"tablet"===N||"mobile"===N?oe:ae})),"tablet"!==N&&"mobile"!==N&&(0,n.createElement)("div",{className:"helpgent-layout-action__single "+("mediaRight"===Q?"helpgent-active":""),onClick:()=>we("mediaRight")},(0,n.createElement)(i.A,{src:ie})),(0,n.createElement)("div",{className:"helpgent-layout-action__single "+("mediaBehind"===Q?"helpgent-active":""),onClick:()=>we("mediaBehind")},(0,n.createElement)(i.A,{src:se})),(0,n.createElement)("div",{className:"helpgent-layout-action__single "+("noMedia"===Q?"helpgent-active":""),onClick:()=>we("noMedia")},(0,n.createElement)(i.A,{src:ce})))),"end"!==H&&"noMedia"!==Q&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("span",{className:"helpgent-screen-setting-block__label"},(0,w.__)("Add image or video","helpgent")),(0,n.createElement)(he.A,{value:B,onChange:e=>{(0,M.A)("media",e?{type:e.type,url:e.url,focalPoint:Ie}:{},F,l,s)}}),K?.mediaStyle&&q&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block helpgent-mt-0 helpgent-border-none"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},u?.media?.url&&"video"!==u?.media?.type&&(0,n.createElement)("div",{className:"helpgent-focal-point-picker"},(0,n.createElement)("div",{className:"helpgent-focal-point-picker-top"},(0,n.createElement)("span",{className:"helpgent-focal-point-label"},"Focal Point"),(0,n.createElement)("span",{className:"helpgent-focal-point-reset",onClick:function(){(0,M.A)("media",{...u?.media,focalPoint:{x:.5,y:.5}},F,l,s)}},(0,n.createElement)(i.A,{src:ge.A}))),(0,n.createElement)(m.FocalPointPicker,{url:u?.media?.url,value:u?.media?.focalPoint,onDragStart:e=>{De(e),Se()},onDrag:e=>{De(e),Se()},onChange:e=>{De(e),Se()}})),u?.media?.url&&"video"===u?.media?.type&&(0,n.createElement)("div",{className:"helpgent-media-preview helpgent-mb-15",style:{position:"relative"}},(0,n.createElement)("div",{className:"helpgent-media-src"},(0,n.createElement)("div",{className:"helpgent-media-src__video"},(0,n.createElement)("div",{className:"helpgent-video-thumbnail"}),(0,n.createElement)("video",{ref:y,src:u?.media?.url,playsInline:!0,preload:"auto"}),(0,n.createElement)("span",{className:"helpgent-video-control",onClick:()=>(0,Ee.A)(y.current,I)},f?(0,n.createElement)(i.A,{src:_e.A}):(0,n.createElement)(i.A,{src:ve.A}))))),K?.mediaStyle?.video_overlay&&(0,n.createElement)(le.overlayToggle,{mediaControls:K?.mediaStyle.video_overlay,controls:W}),"1"===K?.mediaStyle?.video_overlay?.isActive&&K?.mediaStyle?.overlay_color&&(0,n.createElement)(le.overlayColor,{mediaControls:K?.mediaStyle?.overlay_color,controls:W}),"1"===K?.mediaStyle?.video_overlay?.isActive&&K?.mediaStyle?.overlay_opacity&&(0,n.createElement)(le.overlayOpacity,{mediaControls:K?.mediaStyle?.overlay_opacity,controls:W})))))}var Le=l(50481),be=l(47690);function ye(e){const{global:t}=e,{singleFormState:l,setSingleFormState:a}=(0,o.$)();return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--inline"},(0,n.createElement)("div",{className:"helpgent-field-element__left"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-btn-text-color"},(0,w.__)("Color","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__right"},(0,n.createElement)(U.A,{id:"helpgent-btn-text-color",textColor:t?.background_color,handler:e=>(0,Z.A)("background_color",t.background_color,e.target.value,t.background_color,l,a)})))}let fe;function Ie(e){const t={uploadHandler:null,title:(0,w.__)("Select or Upload Media Of Your Chosen Persuasion","helpgent"),uploadBtnText:(0,w.__)("Use this media","helpgent"),uploadType:["video","image"],multiple:!1};var l;e=(l=e)&&"object"==typeof l&&!Array.isArray(l)?{...t,...e}:t,fe&&fe.el&&(fe.remove(),fe=void 0),fe=wp.media({title:e.title,button:{text:e.uploadBtnText},library:{type:e.uploadType},multiple:e.multiple}),fe.on("select",function(){let t=fe.state().get("selection").first()&&fe.state().get("selection").first().toJSON();e.uploadHandler(t),fe=void 0}),fe.open()}function De(e){var t,l;const{isFamily:i,availableFonts:s,isFontsFetching:c,global:m}=e,{singleFormState:g,setSingleFormState:d}=(0,o.$)(),p=(0,a.useRef)(null),u=m?.font_weight_variations&&"string"!=typeof m.font_family?m?.font_family?.family?.split(", ")[0]:m?.font_family,h=Object.keys(s?.system||{}).map(e=>({label:e,value:e})),N=Object.entries(s?.google||{}).map(([e,t])=>({label:e,value:e,variations:t.variations,category:t.category})),M=[{label:(0,w.__)("System Fonts","helpgent"),options:h},{label:(0,w.__)("Goggle Fonts","helpgent"),options:N}];return(0,n.createElement)("div",{className:"helpgent-field-element helpgent-field-element--typography",style:{"--helpgent-selected-font":m?.font_weight_variations&&"string"!=typeof m.font_family?`${m?.font_family?.family}, ${m?.font_family?.category}`:m.font_family}},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("span",{className:"helpgent-field-element__label"},"Font")),i&&(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)(_.SelectField,{name:"helpgent-font",isMulti:!1,options:M,components:{Option:e=>(0,n.createElement)(_.SelectComponents.Option,{...e},(0,n.createElement)("span",{className:"helpgent-font-option","data-font":e?.value,"data-font_weight_variation":e?.data?.variations,style:{fontFamily:`${e?.value}, ${e?.data?.category}`}},e.value))},isLoading:c,selectRef:p,onMenuOpen:function(){p.current&&setTimeout(()=>{p.current.menuListRef.addEventListener("scroll",e=>{const t=e.target.scrollTop,l=t+e.target.offsetHeight,n=e.target.querySelectorAll(".helpgent-font-option");for(const e of[...n])if(e.offsetTop>=t&&e.offsetTop<=l){const t=document.body||document.getElementsByTagName("body")[0],l=(0,r.Xd)(`helpgent_form_${g?.singleForm?.id}`,null),n=["Inter","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MX","Georgia"];if(!l?.hasOwnProperty(e.dataset.font)&&!n.includes(e.dataset.font)){const n={...l,[e.dataset.font]:e.dataset.font};(0,r.CS)(`helpgent_form_${g?.singleForm?.id}`,n);const a=document.createElement("link");a.href=`https://fonts.googleapis.com/css?family=${e?.dataset?.font}:${e?.dataset?.font_weight_variation}`,a.rel="stylesheet",a.type="text/css",t.appendChild(a)}}})},0)},value:null!==(t=h.concat(N).filter(e=>e.value===u)[0])&&void 0!==t?t:(0,w.__)("Select font","helpgent"),defaultValue:null!==(l=h.concat(N).filter(e=>e.value===u)[0])&&void 0!==l?l:(0,w.__)("Select font","helpgent"),onChange:e=>{const t=h.concat(N).filter(t=>t.value===e)[0],l={...g.singleForm,content:{...g.singleForm.content,global:{...g.singleForm.content.global,font_family:{family:t.value,category:t.category},font_weight_variations:t.variations}}};d(e=>({...e,singleForm:l}))},placeholder:(0,w.__)("Select...","helpgent")})))}var Se=l(64943);function Ae(e){const{singleFormState:t,setSingleFormState:l}=(0,o.$)(),{singleForm:s}=t,{global:r}=s.content,{activeScreen:c}=e,{controls:m}=c,{data:g,isLoading:d,errorMessage:p,isError:u}=(0,Se.A)(["helpgent-forms-fonts"],"/helpgent/fonts",{queryConfig:{refetchOnWindowFocus:!1,keepPreviousData:!1,staleTime:1e4}});function h(e){(0,Z.A)("background_image",null,{url:e.url,altText:e.alt},r.background_image,t,l)}return(0,n.createElement)(ue.z,{className:"helpgent-design-setting-wrap"},(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},(0,n.createElement)(De,{isFamily:!0,availableFonts:g?.fonts,isFontsFetching:d,global:r}))),(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},r?.color_style&&(0,n.createElement)(le.colorFields,{global:r,controls:m}))),(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("span",{className:"helpgent-screen-setting-block__label"},(0,w.__)("Background Style","helpgent")),(0,n.createElement)(ye,{global:r}),(0,n.createElement)("div",{className:"helpgent-field-element"},(0,n.createElement)("div",{className:"helpgent-field-element__top"},(0,n.createElement)("label",{className:"helpgent-field-element__label",htmlFor:"helpgent-high-rating-text"},(0,w.__)("Image","helpgent"))),(0,n.createElement)("div",{className:"helpgent-field-element__content"},(0,n.createElement)("div",{className:"helpgent-media-uploader "+(r?.background_image&&0!==Object.keys(r?.background_image).length?"helpgent-media-uploader--media-added":"")},(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-upload-trigger",onClick:e=>Ie({uploadHandler:h,uploadType:["image"]})},(0,w.__)("Add image","helpgent")),r?.background_image&&0!==Object.keys(r?.background_image).length&&(0,n.createElement)(a.Fragment,null,(0,n.createElement)("div",{className:"helpgent-media-preview"},(0,n.createElement)("div",{className:"helpgent-media-preview__src"},r.background_image?(0,n.createElement)(Le.A,{src:r.background_image.url,alt:r.background_image.altText}):null)),(0,n.createElement)("div",{className:"helpgent-media-actions"},(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-white helpgent-btn-replace",onClick:()=>Ie({uploadHandler:h,uploadType:["image"]})},(0,n.createElement)(i.A,{src:be.A}),(0,w.__)("Replace","helpgent")),(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-white helpgent-btn-remove",onClick:()=>(0,Z.A)("background_image",null,null,r.background_image,t,l)},(0,n.createElement)(i.A,{src:j}))))))),r?.background_style&&r.background_image&&(0,n.createElement)("div",{className:"helpgent-screen-setting-block helpgent-mt-0 helpgent-border-none"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},r?.background_style?.background_overlay&&(0,n.createElement)(le.overlayToggle,{mediaControls:r?.background_style.background_overlay,global:r}),"1"===r?.background_style?.background_overlay?.isActive&&r?.background_style?.overlay_color&&(0,n.createElement)(le.overlayColor,{mediaControls:r?.background_style?.overlay_color,global:r}),"1"===r?.background_style?.background_overlay?.isActive&&r?.background_style?.overlay_opacity&&(0,n.createElement)(le.overlayOpacity,{mediaControls:r?.background_style?.overlay_opacity,global:r})))),(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},r?.corner&&(0,n.createElement)(le.selectableOptionsField,{optionType:"corner",global:r,controls:m}))),(0,n.createElement)("div",{className:"helpgent-screen-setting-block"},(0,n.createElement)("span",{className:"helpgent-screen-setting-block__label"},(0,w.__)("Screen content size","helpgent")),(0,n.createElement)("div",{className:"helpgent-screen-setting-element helpgent-mb-20"},r?.corner&&(0,n.createElement)(le.selectableOptionsField,{optionType:"element_size",global:r,controls:m})),(0,n.createElement)("div",{className:"helpgent-screen-setting-element"},r?.corner&&(0,n.createElement)(le.selectableOptionsField,{optionType:"specialElement_size",global:r,controls:m}))))}function xe(e){const{icon:t,conditionalElementOptions:l,elementId:a}=e,o=l.filter(e=>e.id===a);return(0,n.createElement)(Y.Ih,{className:"helpgent-logic-source"},(0,n.createElement)("h4",{className:"helpgent-logic-source__label"},(0,w.__)("Add logic for","helpgent")),(0,n.createElement)("div",{className:"helpgent-logic-source__element"},0!==o.length&&(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-round helpgent-badge-gray"},o[0]?.index),(0,n.createElement)("div",{className:"helpgent-logic-source__icon"},(0,n.createElement)(i.A,{src:V.UF[t]}))))}const Ce="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxNy45OTkiIHZpZXdCb3g9IjAgMCAxOCAxNy45OTkiPgogIDxwYXRoIGlkPSJjb2RlLWJyYW5jaF8xXyIgZGF0YS1uYW1lPSJjb2RlLWJyYW5jaCAoMSkiIGQ9Ik0xOCwzYTMsMywwLDEsMC0zLjc1LDIuOVY2QTIuMjUzLDIuMjUzLDAsMCwxLDEyLDguMjVINkEzLjczNSwzLjczNSwwLDAsMCwzLjc1LDlWNS45YTMsMywwLDEsMC0xLjUsMHY2LjE5YTMsMywwLDEsMCwxLjUsMFYxMkEyLjI1MywyLjI1MywwLDAsMSw2LDkuNzQ5aDZBMy43NTQsMy43NTQsMCwwLDAsMTUuNzUsNlY1LjlBMy4wMDUsMy4wMDUsMCwwLDAsMTgsM1pNMS41LDNBMS41LDEuNSwwLDEsMSwzLDQuNSwxLjUsMS41LDAsMCwxLDEuNSwzWm0zLDEyQTEuNSwxLjUsMCwxLDEsMywxMy41LDEuNSwxLjUsMCwwLDEsNC41LDE1Wk0xNSw0LjVBMS41LDEuNSwwLDEsMSwxNi41LDMsMS41LDEuNSwwLDAsMSwxNSw0LjVaIi8+Cjwvc3ZnPgo=";var je=l(38930);function Te(e){const{elementLogic:t,elementOptions:l,filteredElementOptions:a,stateLogic:o,setStateLogic:s}=e,r={isEqual:"=",is:"=",isNotEqual:"≠",isNot:"≠",isLowerThan:"<",isGreaterThan:">",isLowerOrEqual:"<=",isGreaterOrEqual:">="};return(0,n.createElement)(Y.a8,{className:"helpgent-logic-list"},t.logics&&t?.logics.map((e,t)=>{const c=l.filter(t=>t?.id===e.conditions[0]?.element_id)[0],m=a.filter(t=>t.id===e.target_element)[0];if(o&&e.id!==o?.id||!o)return(0,n.createElement)("div",{className:"helpgent-logic helpgent-logic--conditional",key:t,onClick:()=>{s(e)}},(0,n.createElement)("span",null,(0,w.__)("If","helpgent")),(0,n.createElement)("div",{className:"helpgent-logic-list__element"},(0,n.createElement)("div",{className:"helpgent-logic-list__element--icon"},(0,n.createElement)(i.A,{src:V.UF[c.icon]}),(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-circle helpgent-badge-primary"},c.index)),function(e){if(e.length>1)return(0,n.createElement)("span",{className:"helpgent-logic-list__condition-answer"},(0,n.createElement)("span",null,"&"),(0,n.createElement)("span",null,"..."));{const t=l.filter(t=>t.id===e[0].element_id)[0];if("long_text"===t.type||"short_text"===t.type||"email"===t.type||"website"===t.type||"number"===t.type||"phone_number"===t.type||"promoter_score"===t.type||"range_slider"===t.type)return r[e[0]?.type]?(0,n.createElement)("span",{className:"helpgent-logic-list__condition-answer"},(0,n.createElement)("span",{className:"helpgent-logic-list__condition-type"},r[e[0]?.type]),(0,n.createElement)("span",{className:"helpgent-logic-list__condition-value"},e[0]?.value)):(0,n.createElement)("span",null,"...");if("dropdown"===t.type||"single_select"===t.type||"multi_select"===t.type||"yes_no"===t.type)return r[e[0]?.type]?(0,n.createElement)("span",{className:"helpgent-logic-list__condition-answer"},(0,n.createElement)("span",{className:"helpgent-logic-list__condition-type"},r[e[0]?.type]),(0,n.createElement)("span",{className:"helpgent-logic-list__condition-value"},e[0]?.value.label)):(0,n.createElement)("span",null,"...");if(["date","time"].includes(t.type))return(0,n.createElement)("span",{className:"helpgent-logic-list__condition-answer"},(0,n.createElement)("span",{className:"helpgent-logic-list__condition-type"},e[0]?.type),(0,n.createElement)("span",{className:"helpgent-logic-list__condition-value"},"..."))}}(e.conditions)),(0,n.createElement)("div",{className:"helpgent-logic-list__element-destination"},(0,n.createElement)("span",{className:"helpgent-logic-list__go-to-text"}," ",(0,w.__)("go to","helpgent")," "),(0,n.createElement)("div",{className:"helpgent-logic-list__element--icon"},(0,n.createElement)(i.A,{src:V.UF[m?.icon]}),(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-circle helpgent-badge-primary"},"end"===m?.type?String.fromCharCode(m?.endIndex-1+65):m?.index))))}))}var ze=l(46958),ke=l(4286);const Ye=e=>{const{handleChangeDate:t,date:l,placeholder:o,handlerProps:s}=e,[r,c]=(0,a.useState)(!1),g=(0,a.useRef)(null);return(0,pe.A)(".helpgent-datepicker",".components-datetime__date",55),(0,a.useEffect)(()=>{(0,v.A)(r,c,g)},[r]),(0,n.createElement)(ke.r,{className:r?"helpgent-datepicker helpgent-active":"helpgent-datepicker",ref:g},(0,n.createElement)("div",{className:"helpgent-form helpgent-form-group helpgent-form-icon-right helpgent-mb-0"},(0,n.createElement)("span",{className:"helpgent-input-icon"},(0,n.createElement)(i.A,{src:ze.A})),(0,n.createElement)("input",{type:"text",className:"helpgent-form-group__element helpgent-form-group__element--date",placeholder:o,value:l,onClick:e=>{var t;t=e,c(!0),(0,de.A)(t,".helpgent-datepicker",".components-datetime__date",140,55,!1,"right")},readOnly:!0})),(0,n.createElement)(m.DatePicker,{onChange:e=>{t(e,s),c(!1)}}))};Ye.defaultProps={},Ye.propTypes={};const Fe=Ye;var Oe=l(66582);function Ze(e,t,l,n,a,i,o,r,c){let m=["option","date","time"].includes(l)?e:e.target.value;if("number"===l)m=parseInt(e.target.value,10),m=isNaN(m)?"":m>0?m:0;else if("date"===l){const e={day:"2-digit",month:"2-digit",year:"numeric"},t=n?.general?.separator?.value;m=(0,Oe.Yq)("en-ZA",m,e).replace(/\//g,t)}const g=a.conditions.map(e=>e.id===t?{...e,value:m}:e);let d={...a,conditions:g};i({...a,conditions:g}),a.target_element&&(0,s.A)("update-logic",a.id,o?.controls,o?.controls?.elementLogic,o.id,r,c,d)}var Ue=l(98762);function Ge(e,t){const{conditionId:l,conditionElement:n,stateLogic:a,setStateLogic:i,activeElement:o,singleFormState:s,setSingleFormState:r}=t;Ze(e,l,"date",n,a,i,o,s,r)}function Re(e,t,l){var n;const a=e.conditions.filter(e=>e.id===t)[0],i=null!==(n=l.filter(e=>e.id===a.element_id)[0])&&void 0!==n?n:l[0];return"long_text"===i.type||"short_text"===i.type||"email"===i.type||"phone_number"===i.type||"website"===i.type?[{label:(0,w.__)("is equal to","helpgent"),value:"isEqual"},{label:(0,w.__)("Is not equal to","helpgent"),value:"isNotEqual"},{label:(0,w.__)("begins with","helpgent"),value:"beginsWith"},{label:(0,w.__)("ends with","helpgent"),value:"endsWith"},{label:(0,w.__)("contains","helpgent"),value:"contains"},{label:(0,w.__)("does not contain","helpgent"),value:"doesNotContain"}]:"number"===i.type||"promoter_score"===i.type||"range_slider"===i.type||"rating_star"===i.type?[{label:(0,w.__)("is equal to","helpgent"),value:"isEqual"},{label:(0,w.__)("Is not equal to","helpgent"),value:"isNotEqual"},{label:(0,w.__)("is lower than","helpgent"),value:"isLowerThan"},{label:(0,w.__)("is greater than","helpgent"),value:"isGreaterThan"},{label:(0,w.__)("is lower or equal","helpgent"),value:"isLowerOrEqual"},{label:(0,w.__)("is greater or equal","helpgent"),value:"isGreaterOrEqual"}]:"date"===i.type?[{label:(0,w.__)("is on","helpgent"),value:"isOn"},{label:(0,w.__)("is not on","helpgent"),value:"isNotOn"},{label:(0,w.__)("is before","helpgent"),value:"isBefore"},{label:(0,w.__)("is after","helpgent"),value:"isAfter"},{label:(0,w.__)("is before or on","helpgent"),value:"isBeforeOrOn"},{label:(0,w.__)("is after or on","helpgent"),value:"isAfterOrOn"}]:"multi_select"===i.type||"single_select"===i.type||"dropdown"===i.type||"yes_no"===i.type||"picture_select"===i.type?[{label:(0,w.__)("is","helpgent"),value:"is"},{label:(0,w.__)("is not","helpgent"),value:"isNot"}]:"time"===i.type?[{label:(0,w.__)("is at","helpgent"),value:"isAt"},{label:(0,w.__)("is not at","helpgent"),value:"isNotAt"},{label:(0,w.__)("is before","helpgent"),value:"isBefore"},{label:(0,w.__)("is after","helpgent"),value:"isAfter"},{label:(0,w.__)("is before or at","helpgent"),value:"isBeforeOrAt"},{label:(0,w.__)("is after or at","helpgent"),value:"isAfterOrAt"}]:void 0}function Pe(e,t,l,n){let a={},i="",o="";if("number"===e.type||"promoter_score"===e.type||"range_slider"===e.type||"rating_star"===e.type)o=1,i="isEqual";else if("date"===e.type){const t=new Date,l=e?.general?.separator?.value;o=function(e,t,l){return(0,Oe.Yq)("en-ZA",t,{day:"2-digit",month:"2-digit",year:"numeric"}).replace(/\//g,l)}(0,t,l),i="isOn"}else"time"===e.type?i="isAt":"long_text"===e.type||"short_text"===e.type||"email"===e.type||"phone_number"===e.type||"website"===e.type?(o="",i="isEqual"):"multi_select"!==e.type&&"single_select"!==e.type&&"dropdown"!==e.type&&"yes_no"!==e.type&&"picture_select"!==e.type||(i="is",o=e.options[0]);if(l){const t=l.conditions.map(t=>t.id===n?{...t,element_id:e.id,type:i,value:o}:t);a={...l,conditions:t}}else a={id:(0,N.A)(),conditions:[{id:(0,N.A)(),element_id:e.id,type:i,value:o}],target_element:null};return a}function We(e,t,l,n){const a=Pe(n.filter(e=>e.id===l.id)[0]||n[0]);t("done"===e?null:a)}function Be(e,t,l,n,a,i,o,r){const{id:c,controls:m}=o;if(t){let g=[];if(n?.logics&&(g=n?.logics.filter(e=>e.id===t.id)),g.length>0)(0,s.A)("update-logic",t.id,m,n,c,a,i,t);else{let e=[];n.logics?(e=[...n.logics],e.push(t)):e.push(t),(0,s.A)("add-logic",null,m,n,c,a,i,e)}We(e,l,o,r)}else We(e,l,o,r)}function He(e){var t,l;const{logicElementGroup:a,conditionalElementOptions:c,elementOptionGroup:m,filteredElementOptions:g,stateLogic:d,setStateLogic:p,activeElement:u,elementLogic:h}=e,{singleFormState:M,setSingleFormState:E}=(0,o.$)(),v=e=>(0,n.createElement)(_.SelectComponents.Option,{...e},(0,n.createElement)("span",{className:"helpgent-select__option__icon"},(0,n.createElement)(i.A,{src:V.UF[e.data.icon]})),"end"!==e.data.type&&"welcome"!==e.data.type&&(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},e.data.index),"end"===e.data.type&&(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},String.fromCharCode(e.data.endIndex-1+65)),(0,n.createElement)("span",{className:"helpgent-select__option__text",dangerouslySetInnerHTML:{__html:e?.data?.label}}));return(0,n.createElement)(Y.NO,{className:"helpgent-logic-rule-form"},(0,n.createElement)("div",{className:"helpgent-logic-rule-form__top-text"},(0,w.__)("If","helpgent")),d.conditions.map((e,t)=>{var l,o,m,g;return(0,n.createElement)("div",{className:"helpgent-logic-rule-form__condition",key:t},t>0&&(0,n.createElement)("div",{className:"helpgent-logic-rule-form__condition-top"},(0,n.createElement)("span",{className:"helpgent-logic-rule-form__and"},(0,w.__)("And","helpgent")),(0,n.createElement)("div",{className:"helpgent-btn helpgent-btn-close helpgent-btn-gray helpgent-logic-rule-form__condition-cancel",onClick:()=>function(e){if(d.conditions.length>1){const t=d.conditions.filter(t=>t.id!==e);p({...d,conditions:[...t]})}}(e.id)},(0,n.createElement)(i.A,{src:je.A}))),(0,n.createElement)(_.Select,{options:a,components:{Option:v},getOptionLabel:e=>(0,n.createElement)("div",{style:{display:"flex",alignItems:"center"}},(0,n.createElement)("div",{className:"helpgent-dropdown-icon"},(0,n.createElement)(i.A,{src:V.UF[e.icon]})),(0,n.createElement)("div",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},"end"===e.type?String.fromCharCode(e.endIndex-1+65):e.index),(0,n.createElement)("span",{className:"helpgent-select__option__text",dangerouslySetInnerHTML:{__html:e.label}})),value:null!==(l=a[0]?.options?.filter(t=>t?.value===e?.element_id)[0])&&void 0!==l?l:c[0],defaultValue:null!==(o=a[0]?.options?.filter(t=>t?.value===e?.element_id)[0])&&void 0!==o?o:c[0],onChange:t=>function(e,t,l,n,a,i,o,r){const c=Pe(a.filter(e=>e.id===t)[0],l.id,l,e);l.conditions.length>=1&&n(c),l.target_element&&(0,s.A)("update-logic",l.id,i?.controls,i?.controls?.elementLogic,i.id,o,r,c)}(e.id,t.value,d,p,c,u,M,E),inputId:"helpgent-logic-select",className:"helpgent-select helpgent-select-logic-element",classNamePrefix:"helpgent-select",isSearchable:!1,placeholder:null,menuPosition:"fixed"}),(0,n.createElement)("span",{className:"helpgent-logic-rule-form__condition-inner"},(0,n.createElement)(_.Select,{inputId:"helpgent-logic-conditional-field",className:"helpgent-select",classNamePrefix:"helpgent-select",value:null!==(m=Re(d,e.id,c).filter(t=>t.value===e.type)[0])&&void 0!==m?m:Re(d,e.id,c)[0],defaultValue:null!==(g=Re(d,e.id,c).filter(t=>t.value===e.type)[0])&&void 0!==g?g:Re(d,e.id,c)[0],options:Re(d,e.id,c),onChange:t=>function(e,t,l,n,a,i,o){const r=l.conditions.map(l=>l.id===e?{...l,type:t}:l),c={...l,conditions:r};n({...l,conditions:r}),l.target_element&&(0,s.A)("update-logic",l.id,a?.controls,a?.controls?.elementLogic,a.id,i,o,c)}(e.id,t.value,d,p,u,M,E)})),(0,n.createElement)("div",{className:"helpgent-logic-rule-form__element-answer"},function(e,t,l,a,i,o,s,c){let m=i.filter(e=>e.id===a)[0]||i[0];const g=e.conditions.filter(e=>e.id===l)[0];if("address"===m.type&&(m=i[0]),"date"===m?.type){const a=g?.value,i="en-US"===m?.general?.date_format.value?`MM${m?.general?.separator.value}DD${m?.general?.separator.value}YYYY`:"en-GB"===m?.general?.date_format.value?`DD${m?.general?.separator.value}MM${m?.general?.separator.value}YYYY`:"en-ZA"===m?.general?.date_format.value?`YYYY${m?.general?.separator.value}MM${m?.general?.separator.value}DD`:`MM${m?.general?.separator.value}DD${m?.general?.separator.value}YYYY`;return(0,n.createElement)(Fe,{handleChangeDate:Ge,handlerProps:{conditionId:l,conditionElement:m,stateLogic:e,setStateLogic:t,activeElement:o,singleFormState:s,setSingleFormState:c},date:a,placeholder:i})}if("number"===m?.type||"range_slider"===m?.type||"promoter_score"===m?.type||"rating_star"===m?.type)return(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"number",value:""===g?.value?0:g?.value?.toString().replace(/^0/,""),className:"helpgent-form-group__element",onChange:n=>Ze(n,l,"number",m,e,t,o,s,c)}));if("long_text"===m?.type||"short_text"===m?.type||"website"===m?.type||"phone_number"===m.type)return(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"text",className:"helpgent-form-group__element",value:g?.value,onChange:n=>Ze(n,l,"text",m,e,t,o,s,c)}));if("time"===m?.type){const a=(0,r.CR)("general.defaultPlaceholder.value",m,(0,w.__)("Select Time","helpgent")),i=12===(0,r.CR)("general.timeFormat.value",m,12);return(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)(Ue.A,{className:"helpgent-form-field-light",defaultPlaceholder:a,use12Hours:i,defaultValue:g?.value,onChange:n=>{Ze(n,l,"time",m,e,t,o,s,c)}}))}if("email"===m?.type)return(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"email",className:"helpgent-form-group__element",value:g?.value,onChange:n=>Ze(n,l,"text",m,e,t,o,s,c)}));if("dropdown"===m?.type||"single_select"===m?.type||"multi_select"===m?.type||"picture_select"===m?.type||"yes_no"===m?.type){var d;const a=m?.options.map(e=>({value:e.id,label:e.label}));return(0,n.createElement)(_.Select,{options:a,inputId:"helpgent-logic-conditional-element-answer",className:"helpgent-select",classNamePrefix:"helpgent-select",value:a.filter(e=>e.value===g?.value?.value)[0],defaultValue:null!==(d=a.filter(e=>e.value===g?.value?.value)[0])&&void 0!==d?d:null,onChange:n=>Ze(n,l,"option",m,e,t,o,s,c)})}}(d,p,e.id,e.element_id,c,u,M,E)))}),(0,n.createElement)("div",{className:"helpgent-logic-condition-add",onClick:()=>function(e,t,l,n,a){const i=[...e.conditions];i.push({id:(0,N.A)(),element_id:l.id,type:"is",value:""});let o={...e,conditions:[...i]};t({...e,conditions:[...i]}),e.target_element&&(0,s.A)("update-logic",e.id,l?.controls,l?.controls?.elementLogic,l.id,n,a,o)}(d,p,u,M,E)},(0,n.createElement)("span",{className:"helpgent-logic-condition-add__icon"},(0,n.createElement)(i.A,{src:A.A})),(0,w.__)("Add condition","helpgent")),(0,n.createElement)("div",{className:"helpgent-logic-rule-form__destination"},(0,n.createElement)("span",null,(0,w.__)("Then","helpgent")),(0,n.createElement)("span",{className:"helpgent-logic-rule-form__goTo"},(0,w.__)("Go to","helpgent")),(0,n.createElement)(_.Select,{options:m,components:{Option:v},getOptionLabel:e=>(0,n.createElement)("div",{style:{display:"flex",alignItems:"center"}},(0,n.createElement)("div",{className:"helpgent-dropdown-icon"},(0,n.createElement)(i.A,{src:V.UF[e.icon]})),(0,n.createElement)("div",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},"end"===e.type?String.fromCharCode(e.endIndex-1+65):e.index),(0,n.createElement)("span",{className:"helpgent-select__option__text",dangerouslySetInnerHTML:{__html:e.label}})),onChange:e=>function(e){p({...d,target_element:e});let t={...d,target_element:e};if(d.target_element)(0,s.A)("update-logic",d.id,u.controls,h,u.id,M,E,t);else{let e=[];h.logics?(e=[...h.logics],e.push(t)):e.push(t),(0,s.A)("add-logic",null,u.controls,h,u.id,M,E,e)}}(e.value),value:null!==(t=g.filter(e=>e?.value===d?.target_element)[0])&&void 0!==t?t:null,defaultValue:null!==(l=g.filter(e=>e?.value===d?.target_element)[0])&&void 0!==l?l:null,inputId:"helpgent-logic-select",className:"helpgent-select helpgent-select-logic-element",classNamePrefix:"helpgent-select",isSearchable:!1,placeholder:(0,w.__)("Select","helpgent"),menuPosition:"fixed"})),(0,n.createElement)("div",{className:"helpgent-logic-rule-form__action"},(0,n.createElement)("div",{className:"helpgent-btn-link",onClick:()=>function(e,t,l,n,a,i){const{id:o,controls:r}=l;if(t(null),n?.logics){const t=n.logics.filter(t=>t.id!==e);(0,s.A)("remove-logic",null,r,n,o,a,i,t)}}(d.id,p,u,h,M,E)},(0,w.__)("Delete this rule","helpgent")),(0,n.createElement)("div",{className:"helpgent-btn helpgent-btn-primary helpgent-btn-sm "+(!d||d?.target_element?"":"helpgent-btn-disabled"),onClick:()=>Be("done",d,p,h,M,E,u,c)},(0,w.__)("Done","helpgent"))))}const Qe="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMS42NzUiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMS42NzUgMTAiPgogIDxwYXRoIGlkPSJhcnJvdy1zbWFsbC1yaWdodCIgZD0iTTE1LjY3NSwxMS4wMDVoMGExLjY2OCwxLjY2OCwwLDAsMC0uNDkyLTEuMTY4TDExLjYwNSw2LjI1MkEuODM0LjgzNCwwLDEsMCwxMC40Myw3LjQzNmwyLjc0NCwyLjczNUg0LjgzNGEuODM0LjgzNCwwLDAsMCwwLDEuNjY4aDguMzM5TDEwLjQzLDE0LjU4M2EuODM0LjgzNCwwLDEsMCwxLjE3NiwxLjE4NGwzLjU3OC0zLjU4NkExLjY2OCwxLjY2OCwwLDAsMCwxNS42NzUsMTEuMDA1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQgLTYuMDA5KSIvPgo8L3N2Zz4K";function Je(e){const{elementLogic:t,stateLogic:l,elementOptionGroup:a,filteredElementOptions:r,activeElement:c}=e,{singleFormState:m,setSingleFormState:g}=(0,o.$)(),{controls:d,id:p}=c;return(0,n.createElement)(Y.vB,{className:"helpgent-logic helpgent-logic--default"},(0,n.createElement)("div",{className:"helpgent-logic__text"},t?.logics&&0!==t?.logics?.length||l?(0,n.createElement)("span",null,(0,w.__)("All other cases go to","helpgent")," "):(0,n.createElement)("span",null,(0,w.__)("Always jump to","helpgent")),(0,n.createElement)(i.A,{src:Qe})),(0,n.createElement)("div",{className:"helpgent-logic__dropdown"},(0,n.createElement)(_.Select,{options:a,components:{Option:e=>(0,n.createElement)(_.SelectComponents.Option,{...e},(0,n.createElement)("span",{className:"helpgent-select__option__icon"},(0,n.createElement)(i.A,{src:V.UF[e.data.icon]})),"end"!==e.data.type&&"welcome"!==e.data.type&&(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},e.data.index),"end"===e.data.type&&(0,n.createElement)("span",{className:"helpgent-badge helpgent-badge-gray helpgent-badge-circle"},String.fromCharCode(e.data.endIndex-1+65)),(0,n.createElement)("span",{className:"helpgent-select__option__text",dangerouslySetInnerHTML:{__html:e?.data?.label}}))},getOptionLabel:e=>(0,n.createElement)("div",{style:{display:"flex",alignItems:"center"}},(0,n.createElement)("div",{className:"helpgent-badge helpgent-badge-primary helpgent-badge-circle"},"end"===e.type?String.fromCharCode(e.endIndex-1+65):e.index),(0,n.createElement)(i.A,{src:V.UF[e.icon]})),defaultValue:r.filter(e=>e.value===t.default_target)[0],inputId:"helpgent-country-select",className:"helpgent-select",classNamePrefix:"helpgent-select",isSearchable:!1,onChange:e=>(0,s.A)("default-screen",null,d,t,p,m,g,e.value),placeholder:null})))}function Ve(e){const[t,l]=(0,a.useState)(null),{activeScreen:r}=e,{id:c,title:m,element_type:g,icon:d,controls:p}=r,{elementLogic:u}=p,{singleFormState:h,setSingleFormState:N}=(0,o.$)(),{singleForm:M}=h,{elements:E}=M.content;let v=0;const{filteredWelcomeElement:_,filteredEndElement:L,filteredOtherElement:b}=E.reduce((e,t)=>("welcome"===t.element_type?e.filteredWelcomeElement.push(t):"end"===t.element_type?e.filteredEndElement.push(t):"user_validation"!==t.element_type&&e.filteredOtherElement.push(t),e),{filteredWelcomeElement:[],filteredEndElement:[],filteredOtherElement:[]}),y=[...b,...L].map((e,t)=>{var l,n;return"end"===e.element_type&&v++,"welcome"!==e.element_type?{id:e.id,label:e.title,value:e.id,icon:e.icon,index:t+1,endIndex:v,type:e.element_type,options:null!==(l=e?.controls?.general?.options)&&void 0!==l?l:null,general:null!==(n=e?.controls?.general)&&void 0!==n?n:null}:{id:e.id,label:e.title,value:e.id,icon:e.icon,index:t,endIndex:v,type:e.element_type}}),f=y.filter(e=>e.id!==c),I=y.findIndex(e=>e.id===r.id);-1!==I&&y.splice(I+1);const D=y.filter(e=>"button"!==e.type&&"address"!==e.type&&"contact_info"!==e.type&&"file_upload"!==e.type&&"recaptcha"!==e.type&&"statement"!==e.type&&"gdpr"!==e.type&&"open_ended"!==e.type&&"map"!==e.type),S=[{label:(0,w.__)("Choose a destination…","helpgent"),options:f}],x=[{label:"",options:D}],C=y.filter(e=>e.id===r.id)[0]?.index;return(0,n.createElement)(Y.yA,{className:"helpgent-setting-logic-wrap"},void 0===u.default_target&&void 0===u.logics?(0,n.createElement)("div",{className:"helpgent-logic-add helpgent-btn helpgent-btn-gray helpgent-btn-lg",onClick:function(){let e={};e="yes_no"===g||"single_select"===g||"dropdown"===g?{logics:p.general.options.map((e,t)=>({index:t+1,if_element:c,value:"yes_no"===g?parseInt(e.value):e.id,type:"is",target_element:""}))}:{default_target:""},(0,s.A)("add-logic",null,p,u,c,h,N,e)}},(0,n.createElement)(i.A,{src:Ce})," ",(0,w.__)("Add Conditional Logic","helpgent")):(0,n.createElement)("div",{className:"helpgent-logic-inner"},(0,n.createElement)("div",{className:"helpgent-logic-top"},(0,n.createElement)(xe,{icon:d,conditionalElementOptions:D,elementId:c}),(0,n.createElement)(Te,{elementLogic:u,elementOptions:y,filteredElementOptions:f,stateLogic:t,setStateLogic:l}),t&&(0,n.createElement)(He,{logicElementGroup:x,conditionalElementOptions:D,elementOptionGroup:S,filteredElementOptions:f,stateLogic:t,setStateLogic:l,activeElement:r,elementLogic:u}),void 0!==u.default_target&&(0,n.createElement)(Je,{elementLogic:u,stateLogic:t,elementOptionGroup:S,filteredElementOptions:f,activeElement:r}),"welcome"!==r.element_type&&function(){if("open_ended"===r.element_type||"button"===r.element_type||"address"===r.element_type||"file_upload"===r.element_type||"recaptcha"===r.element_type||"statement"===r.element_type||"gdpr"===r.element_type){if(1===C)return null;if(0===D.length)return null}return"map"===r.element_type?null:(0,n.createElement)("div",{className:"helpgent-btn helpgent-btn-md helpgent-btn-gray helpgent-logic-add-rule helpgent-btn-block "+(!t||t?.target_element?"":"helpgent-btn-disabled"),onClick:()=>Be("add",t,l,u,h,N,r,D)},(0,n.createElement)(i.A,{src:A.A}),(0,w.__)("Add rule","helpgent"))}()),(0,n.createElement)("div",{className:"helpgent-logic-bottom"},(0,n.createElement)("div",{className:"helpgent-logic-remove "+(u.logics&&0!==u?.logics?.length?"":"helpgent-btn-disabled"),onClick:()=>(0,s.A)("remove-logic",null,p,u,c,h,N,[])},(0,n.createElement)(i.A,{src:je.A})," ",(0,w.__)("Remove logic","helpgent")))))}var Xe=l(22057),$e=l(17331);function Ke(e){const{baseApiRoute:t,baseLinkRoute:l}=e,{routeLink:g}=(0,r.Xd)("helpgent_router_references",null),{singleFormState:d,setSingleFormState:p}=(0,o.$)(),{singleForm:u,activeElementId:h,screenSettingType:N,isActiveTextFieldScreen:M}=d,{elements:E}=u.content,v=E.filter(e=>e.id===h),_=v[0].controls&&v[0].controls.general,L=(0,a.useRef)(null),D=(0,a.useRef)(null),[S,A]=(0,a.useState)(!1),[x,C]=(0,a.useState)(),[j,T]=(0,a.useState)();function z(e){p({...d,screenSettingType:e})}const k=_&&_.text_fields&&Object.keys(_.text_fields).map(e=>({name:e,..._.text_fields[e]}));return(0,a.useEffect)(()=>{const e=()=>(0,c.A)(L,C,T,window.innerWidth<=575||window.innerWidth<=1199?290:280);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,a.useEffect)(()=>{const e=e=>{if(S&&L.current&&!L.current.contains(e.target)&&!D.current.contains(e.target)){const e=L.current;e&&e.classList.add("helpgent-screen-settings--collapsed"),x<1040&&e.classList.remove("helpgent-screen-settings--float"),A(!1)}};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[S]),(0,n.createElement)(n.Fragment,null,x&&x<1040?(0,n.createElement)("button",{className:"helpgent-settings-float",onClick:e=>{!function(e){e.preventDefault();const t=L.current;t&&t.classList.toggle("helpgent-screen-settings--collapsed"),x<1040&&t.classList.toggle("helpgent-screen-settings--float"),A(!S),L.current.clientWidth!==j&&T(window.innerWidth<=575||window.innerWidth<=1199?290:340)}(e)},style:{right:S?`${j+20}px`:"20px",top:"0"},ref:D},(0,n.createElement)(i.A,{src:$e.A})):null,(0,n.createElement)(Y.xk,{className:"helpgent-screen-settings "+(x&&x<1040?"helpgent-screen-settings--collapsed":""),ref:L},(0,n.createElement)("div",{className:"helpgent-screen-setting-header"},(0,n.createElement)("ul",{className:"helpgent-screen-setting-list"},(0,n.createElement)("li",{className:"element"===N?"helpgent-active":null,onClick:()=>z("element")},(0,w.__)("Element","helpgent")),(0,n.createElement)("li",{className:"design"===N?"helpgent-active":null,onClick:()=>z("design")},(0,w.__)("Design","helpgent")),"user_validation"!==v[0]?.element_type&&"end"!==v[0]?.element_type&&(0,n.createElement)("li",{className:"logic"===N?"helpgent-active":null,onClick:()=>z("logic")},(0,w.__)("Logic","helpgent")))),(0,n.createElement)("div",{className:"helpgent-screen-setting-content helpgent-scrollbar-style"},"element"===N?(0,n.createElement)(we,{activeScreen:v[0],baseApiRoute:t,baseLinkRoute:l}):"design"===N?(0,n.createElement)(Ae,{activeScreen:v[0]}):"logic"===N&&v[0].controls.elementLogic?(0,n.createElement)(Ve,{activeScreen:v[0]}):void 0),"open_ended"===v[0].element_type&&M&&(0,n.createElement)(Y.mR,{className:"helpgent-screen-settings-textField"},(0,n.createElement)("div",null,(0,n.createElement)("a",{href:"#",className:"helpgent-btn-back",onClick:e=>function(e){e.preventDefault(),p({...d,isActiveTextFieldScreen:!1})}(e)},(0,n.createElement)(i.A,{src:Xe.A}),(0,w.__)("Back","helpgent")),(0,n.createElement)("h4",{className:"helpgent-screen-settings-textField"},(0,w.__)("Text field settings","helpgent")),_&&_.text_fields&&k.map((e,t)=>(0,n.createElement)("div",{className:"helpgent-textField-form",key:t},(0,n.createElement)("div",{className:"helpgent-textField-form__element"},(0,n.createElement)("label",{htmlFor:`helpgent-text-${e.name}`,className:"helpgent-form-group__label"},e.label,"1"===e.isRequired&&(0,n.createElement)("span",{className:"helpgent-required-sign"},"*")),(0,n.createElement)("div",{className:"helpgent-form-group"},(0,n.createElement)("input",{type:"text",className:"helpgent-form-group__element",id:`helpgent-text-${e.name}`,name:e.name,value:e.label,onChange:t=>(0,s.A)("label",_.text_fields[e.name].label,v[0].controls,_.text_fields[e.name],h,d,p,t.target.value)}))),(0,n.createElement)("div",{className:"helpgent-textField-form__action"},(0,n.createElement)(m.Tooltip,{text:"1"===e.isRequired?(0,w.__)("Make optional","helpgent"):(0,w.__)("Make required","helpgent"),delay:"0",placement:"bottom",hideOnClick:!0},(0,n.createElement)(g,{className:`helpgent-textField-form__action-item ${"1"===e.isRequired?"helpgent-active":""} ${"0"===e.isVisible?"helpgent-textField-form__action-item--disabled":""}`,onClick:()=>{"1"===e.isVisible&&(0,s.A)("required",_.text_fields[e.name].isRequired,v[0].controls,_.text_fields[e.name],h,d,p,"1"===e.isRequired?"0":"1")}},(0,n.createElement)(i.A,{src:"1"===e.isRequired?b:y}))),(0,n.createElement)(m.Tooltip,{text:"1"===e.isVisible?(0,w.__)("Hide","helpgent"):(0,w.__)("Show","helpgent"),delay:"0",placement:"bottom",hideOnClick:!0},(0,n.createElement)(g,{className:"helpgent-textField-form__action-item "+("1"===e.isVisible?"helpgent-active":""),onClick:()=>(0,s.A)("visible",_.text_fields[e.name].isRequired,v[0].controls,_.text_fields[e.name],h,d,p,"1"===e.isVisible?"0":"1")},(0,n.createElement)(i.A,{src:"1"===e.isVisible?f.A:I.A}))))))))))}},20978:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMS4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMjcyIDYzLjFsLTMyIDBjLTI2LjUxIDAtNDggMjEuNDktNDggNDcuMXYyODhjMCAyNi41MSAyMS40OSA0OCA0OCA0OEwyNzIgNDQ4YzI2LjUxIDAgNDgtMjEuNDkgNDgtNDh2LTI4OEMzMjAgODUuNDkgMjk4LjUgNjMuMSAyNzIgNjMuMXpNODAgNjMuMWwtMzIgMGMtMjYuNTEgMC00OCAyMS40OS00OCA0OHYyODhDMCA0MjYuNSAyMS40OSA0NDggNDggNDQ4bDMyIDBjMjYuNTEgMCA0OC0yMS40OSA0OC00OHYtMjg4QzEyOCA4NS40OSAxMDYuNSA2My4xIDgwIDYzLjF6Ii8+PC9zdmc+"},21113:(e,t,l)=>{function n(e,t,l,n){const{singleForm:a}=l,{elements:i,global:o}=a.content;let s={};s=e in o.bubble?{...o,bubble:{...o.bubble,[e]:t}}:e in o.email_notification?{...o,email_notification:{...o.email_notification,[e]:t}}:e in o.media?{...o,media:{...o.media,[e]:t}}:{...o,[e]:t};const r={...a,content:{elements:i,global:s}};n(e=>({...e,singleForm:r}))}l.d(t,{A:()=>n})},27308:(e,t,l)=>{l.d(t,{A:()=>N});var n=l(51609),a=l(86087),i=(l(50481),l(65604)),o=l(47690),s=l(38930),r=l(47977),c=l(62947),m=l(10155),g=l(26374),d=l(85168);const p=(e,t)=>{const l=helpgent_localization&&helpgent_localization.rest_nonce?helpgent_localization.rest_nonce:"",n=helpgent_localization&&helpgent_localization.rest_url?helpgent_localization.rest_url:"",a={method:"post",baseURL:t&&t.useRESTRootURL?(i=n,i.replace(/\/helpgent\/?$/,"")):n,headers:{"X-WP-Nonce":l}};var i;function o(e){return s(e.headers)||(e.headers={}),void 0===e.headers["X-WP-Nonce"]&&(e.headers["X-WP-Nonce"]=l),e}const s=e=>e&&"object"==typeof e&&!Array.isArray(e);return t=s(t)?o({...a,...t}):a,(0,g.n)(l=>(0,d.A)(e,o({...t,...l})))};function u({onComplete:e,isActive:t,setIsActive:l,videoResolution:i,maxVideoDuration:o,className:s}){const g=(0,a.useRef)(document.querySelector("body")),d=(0,a.useRef)(document.getElementById("helpgent-wp-video-recorder-container")||function(){const e=document.createElement("div");return e.setAttribute("class","helpgent-modal-portal"),e.setAttribute("id","helpgent-wp-video-recorder-container"),e}()),{mutateAsync:u}=p("wp/v2/media",{useRESTRootURL:!0});return(0,a.useEffect)(()=>{t?(g.current.appendChild(d.current),g.current.style.overflow="hidden"):(d.current.remove(),g.current.style.overflow="")},[t]),t?(0,n.createElement)(n.Fragment,null,(0,a.createPortal)((0,n.createElement)(r.A,{isActive:!0,onChange:()=>{l(!1)},className:s},(0,n.createElement)(m.yY,{className:"helpgent-video-recorder-modal-contents"},(0,n.createElement)(c.A,{videoResolution:i,maxRecordLength:o,onSubmit:async function(t){const l=t.type.match(/\/([a-zA-Z0-9]+)/),n=`record.${l?l[1]:"webm"}`,a=new FormData;a.append("file",t,n);const i={headers:{"Content-Disposition":`attachment; filename=${n}`}};try{const t=await u({data:a,...i});"function"==typeof e&&e(t)}catch(e){console.log(e)}},onExit:()=>{l(!1)},previewMode:"default"}))),d.current)):""}var h=l(27723);function N(e){const{title:t,buttonLabel:l,value:r,onChange:c,libraryType:m,videoResolution:g,maxVideoDuration:d}=e,p=e=>e&&"object"==typeof e&&!Array.isArray(e),N=(0,a.useRef)(),[M,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{E(p(r)&&Object.keys(r).length?r:null)},[r]);const[v,_]=(0,a.useState)(!1);function w(){N.current&&N.current.el&&N.current.remove(),N.current=wp.media({title:t||(0,h.__)("Select or Upload Media Of Your Chosen Persuasion","helpgent"),button:{text:l||(0,h.__)("Use this media","helpgent")},library:{type:m||["video","image"]},multiple:!1}),N.current.on("select",function(){const e=N.current.state().get("selection").first()&&N.current.state().get("selection").first().toJSON();N.current=void 0,L(e)}),N.current.open()}function L(e){p(e)&&(e.type||e.url)&&(E(e),"function"==typeof c&&c(e))}return(0,n.createElement)("div",{className:"helpgent-element-media-uploader"},!M&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-gray helpgent-btn-upload-trigger",onClick:w},(0,h.__)("Add Media","helpgent")),(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-gray helpgent-btn-upload-trigger",onClick:function(){_(!0)}},(0,h.__)("Record Video","helpgent"))),M&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-gray helpgent-btn-replace",onClick:w},(0,n.createElement)(i.A,{src:o.A}),(0,h.__)("Change","helpgent")),(0,n.createElement)("span",{className:"helpgent-btn helpgent-btn-sm helpgent-btn-gray helpgent-btn-remove",onClick:function(){E(null),"function"==typeof c&&c(null)}},(0,n.createElement)(i.A,{src:s.A}),(0,h.__)("Remove","helpgent"))),(0,n.createElement)(u,{videoResolution:g,maxVideoDuration:d,isActive:v,setIsActive:_,onComplete:function(e){p(e)&&L({type:"video",url:e.source_url}),_(!1)},className:"helpgent-video-recorder-modal"}))}},27921:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(51609),a=l(4286);function i(e){const{id:t,textColor:l,handler:i}=e;return(0,n.createElement)(a.ny,{className:"helpgent-color-picker"},(0,n.createElement)("span",{className:"helpgent-color-picker__text"},l),(0,n.createElement)("label",{htmlFor:`${t}`,className:"helpgent-color-picker__trigger",style:{backgroundColor:l}}),(0,n.createElement)("input",{type:"color",id:`${t}`,name:`${t}`,value:`${l.trim()}`,onChange:i}))}},30814:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzLjExMSIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDMuMTExIDE0Ij4KICA8cGF0aCBpZD0iZWxsaXBzaXMtaCIgZD0iTTEwLDEwYTEuNTU2LDEuNTU2LDAsMSwwLDEuNTU2LDEuNTU2QTEuNTU2LDEuNTU2LDAsMCwwLDEwLDEwWk00LjU1NiwxMGExLjU1NiwxLjU1NiwwLDEsMCwxLjU1NiwxLjU1NkExLjU1NiwxLjU1NiwwLDAsMCw0LjU1NiwxMFptMTAuODg5LDBBMS41NTYsMS41NTYsMCwxLDAsMTcsMTEuNTU2LDEuNTU2LDEuNTU2LDAsMCwwLDE1LjQ0NCwxMFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMCAxNykgcm90YXRlKC05MCkiIGZpbGw9IiNhMmEyYTIiLz4KPC9zdmc+Cg=="},37466:(e,t,l)=>{l.d(t,{A:()=>v});var n=l(51609),a=l(86087),i=l(65604),o=l(48036),s=l(6945),r=l(92283),c=l(88869),m=l(79682),g=l(16622),d=l(30814),p=l(47643),u=l(38930),h=l(30912),N=l(90453),M=l(38745),E=l(27723);function v({element:e,handler:t,hasDropdown:l,index:v,isDisabled:_,isSidebarItem:w,isActive:L,baseApiRoute:b,closeMegaDropdown:y,isDropdownActive:f,setLastNewItem:I,isSidebarOpen:D}){const{paramsHook:S,routeLink:A}=(0,s.Xd)("helpgent_router_references",null),x=(0,a.useRef)(null),{id:C}=S(),[j,T]=(0,a.useState)(!1),{singleFormState:z,setSingleFormState:k}=(0,o.$)(),{singleForm:Y,isUpdateFormAlertActive:F}=z,{elements:O,global:Z}=Y.content,{id:U,icon:G,title:R,isPro:P,isComing:W,element_type:B}=e,H=()=>{let e=[{name:"duplicate",icon:p.A,text:(0,E.__)("Duplicate","helpgent")},{name:"delete",icon:u.A,text:(0,E.__)("Delete","helpgent")}];return 1===O.filter(e=>"user_validation"!==e.element_type).length?"welcome"===B||"user_validation"===B?e.filter(e=>"duplicate"!==e.name&&"delete"!==e.name):e.filter(e=>"delete"!==e.name):"welcome"===B||"gdpr"===B?e.filter(e=>"duplicate"!==e.name):"user_validation"===B?e.filter(e=>"duplicate"!==e.name&&"delete"!==e.name):"end"===B&&O.filter(e=>"end"===e.element_type).length<2?e.filter(e=>"delete"!==e.name):e};return(0,a.useEffect)(()=>{const e=e=>{D||document.querySelectorAll(".helpgent-screen__content").forEach(t=>{const l=t.getBoundingClientRect();t.style.setProperty("--helpgent-sidebar-elm-position-top",`${l.top+e}px`),t.style.setProperty("--helpgent-sidebar-elm-position-right",`${l.right}px`)})};e(0),document.querySelectorAll(".helpgent-screenBar-content .helpgent-scrollbar-style").forEach(t=>{t.addEventListener("scroll",()=>{setTimeout(()=>{e(18)},0)})})},[D]),(0,n.createElement)(h.hH,{className:`${_?"helpgent-screen__item helpgent-screen__disabled":L?"helpgent-screen__item helpgent-active":"helpgent-screen__item"} ${!D&&w?"helpgent-screen__item--collapsed":""}`,ref:x},(0,n.createElement)("div",{className:"helpgent-screen__inner",onClick:()=>{t(e,z,k,f?"end"!==e.element_type?"megamenu-elements":"end-element":"",I),y&&y(!1)}},(0,n.createElement)("div",{className:"helpgent-screen__content","data-title":!D&&w?R:null},(0,n.createElement)("div",{className:"helpgent-screen__icon"},(0,n.createElement)(i.A,{src:g.UF[G]})),(0,n.createElement)("h4",{className:"helpgent-screen__title"},"end"===B&&(0,n.createElement)("span",{className:"helpgent-screen__counter-end"},String.fromCharCode(65+v)),v>0&&"end"!==B&&(0,n.createElement)("span",{className:"helpgent-screen__counter"},v),(0,n.createElement)("span",{className:"helpgent-screen__title-text",dangerouslySetInnerHTML:{__html:R}}),P&&!(0,M.L)()&&!w&&(0,n.createElement)(c.Badge,{type:"success",text:"PRO",modifier:"helpgent-badge-extended"}),W&&(0,n.createElement)(c.Badge,{type:"gray",text:(0,E.__)("Coming Soon","helpgent")})))),D&&l&&0!==H().length&&(0,n.createElement)(r.A,{className:"helpgent-screen-dropdown",dropDownIcon:d.A,dropdownList:H(),placement:"right",handleDropdownTrigger:function(t,l){if(t.preventDefault(),"delete"===l)T(!0);else if("duplicate"===l){const t=O.filter(e=>e.id===U)[0];(0,m.A)(t,z,k,"end"===e.element_type?"end-element":"megamenu-elements",I)}},Link:A}),j&&(0,n.createElement)(N.A,{title:(0,E.__)("Delete element","helpgent"),elementId:U,formId:C,setIsDeleteModalActive:T,type:"element",baseApiRoute:b,moduleState:z,setModuleState:k}))}},37734:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(21113);function a(e,t,l,a,i,o){function s(e,t,l){return{...t[e],[l]:{isActive:"1"===t[e][l].isActive?"0":"1"}}}switch(e){case"color_style":a={...a,[t]:{value:l}};break;case"background_style":a={...a,[t]:l};break;case"background_color":case"background_image":case"corner":case"element_size":case"specialElement_size":case"overlay_text":case"position":case"shape":case"size":a=l;break;case"max_video_duration":case"video_resolution":case"max_voice_duration":a={value:l};break;case"max_upload_size":let e={};e="unit"===t?{value:a.value,unit:l}:{unit:a.unit,value:l},a=e;break;case"helpgent_branding":case"save_incomplete_data":case"anonymous_submission":case"progress_count":case"action_btn":"toggle"===t&&(a.isActive="0"===l?"1":"0");break;case"submission_text":case"go_to_next_text":a.value=l;break;case"border":"has_border"===t?a={...a.border,has_border:"1"===a.border.has_border?"0":"1"}:"color"===t&&(a={...a.border,color:l});break;case"offset_x":case"offset_y":a=l<0||""===l?0:l;break;case"background_type":"color"===t?a={...a.background_type,color:l,upload:{id:"",type:"",url:""}}:"upload"===t&&(a={...a.background_type,color:"",upload:l});break;case"admin_notification":a="notify_on_new_response"===t||"notify_on_user_message"===t?s("admin_notification",a,t):{...a.admin_notification,[t]:{value:l}};break;case"user_notification":a="notify_on_new_response"===t||"notify_on_admin_message"===t?s("user_notification",a,t):{...a.user_notification,[t]:{value:l}};break;case"template_settings":a="enable_header"===t||"enable_footer"===t?s("template_settings",a,t):{...a.template_settings,[t]:{value:l}}}(0,n.A)(e,a,i,o)}},38930:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNC42NjciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNC42NjcgMTYiPgogIDxnIGlkPSJ0cmFzaF8xXyIgZGF0YS1uYW1lPSJ0cmFzaCAoMSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMS4zMzMpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzE1MDgiIGRhdGEtbmFtZT0iUGF0aCAxNTA4IiBkPSJNMzYsM2ExLDEsMCwwLDAtMS0xSDMyLjQ4MmEzLDMsMCwwLDAtMi44MTYtMmgtMkEzLDMsMCwwLDAsMjQuODUsMkgyMi4zMzNhMSwxLDAsMCwwLTEsMWgwYTEsMSwwLDAs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xMiwzLjIxMiwwLDAsMSwwLDcuODc1VjMuMjA4QTMuMjEyLDMuMjEyLDAsMCwxLDMuMjA4LDBINy44NzVhMy4yMTIsMy4yMTIsMCwwLDEsMy4yMDgsMy4yMDhWNy44NzVBMy4yMTIsMy4yMTIsMCwwLDEsNy44NzUsMTEuMDgzWk0zLjIwOCwxLjc1QTEuNDU4LDEuNDU4LDAsMCwwLDEuNzUsMy4yMDhWNy44NzVBMS40NTgsMS40NTgsMCwwLDAsMy4yMDgsOS4zMzNINy44NzVBMS40NTgsMS40NTgsMCwwLDAsOS4zMzMsNy44NzVWMy4yMDhBMS40NTgsMS40NTgsMCwwLDAsNy44NzUsMS43NVpNMTQsMTAuNzkyVjQuMDgzYS44NzUuODc1LDAsMSwwLTEuNzUsMHY2LjcwOGExLjQ1OCwxLjQ1OCwwLDAsMS0xLjQ1OCwxLjQ1OEg0LjA4M2EuODc1Ljg3NSwwLDEsMCwwLDEuNzVoNi43MDhBMy4yMTIsMy4yMTIsMCwwLDAsMTQsMTAuNzkyWiIvPgo8L3N2Zz4K"},47977:(e,t,l)=>{l.d(t,{A:()=>o});var n=l(51609),a=l(86087);const i=l(38267).Ay.div`
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: rgba( 0, 0, 0, 0.5 );
    overflow-y: auto;
    z-index: 999999;

    &.--active {
        display: flex;
    }
`,o=function({children:e,isActive:t,onChange:l,className:o}){const s=(0,a.useRef)(),[r,c]=(0,a.useState)("boolean"==typeof t&&t);return(0,a.useEffect)(()=>{c(t)},[t]),r?(0,n.createElement)(i,{ref:s,className:`helpgent-modal-container --active ${o}`,onClick:function(e){e.target===s.current&&(c(!1),"function"==typeof l&&l(!1))}},e):""}},54899:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIg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723);function c({type:e,screenList:t,handleItemEvent:l,baseApiRoute:a,closeMegaDropdown:i,setLastNewItem:c}){const{singleFormState:m,setSingleFormState:g}=(0,s.$)(),{singleForm:d}=m,{elements:p}=d.content,u=p.reduce((e,t)=>{const l=t.element_type;return e[l]||(e[l]=[]),e[l].push(t),e},{}),h=u.welcome||[],N=u.user_validation||[],M=u.gdpr||[];return 0!==t.length&&(0,n.createElement)("div",{className:"helpgent-screen-type"},(0,n.createElement)("span",{className:"helpgent-screen-type__title"},function(e){let t="";switch(e){case"basic":t=(0,r.__)("Basic","helpgent");break;case"contact":t=(0,r.__)("Contact","helpgent");break;case"choices":t=(0,r.__)("Choices","helpgent");break;case"rating":t=(0,r.__)("Rating & Ranking","helpgent");break;case"answer":t=(0,r.__)("Answers","helpgent");break;case"security":t=(0,r.__)("Security","helpgent");break;case"initial":t=(0,r.__)("Welcome & End","helpgent")}return t}(e)),t.map((e,t)=>(0,n.createElement)(o.A,{element:e,handler:l,key:t,isDisabled:"welcome"===e.element_type&&0!==h.length||"user_validation"===e.element_type&&0!==N.length||"gdpr"===e.element_type&&0!==M.length,baseApiRoute:a,closeMegaDropdown:i,isDropdownActive:!0,setLastNewItem:c})))}var m=l(97792),g=l(30912),d=l(29898);function p({isOpenMegaDropdown:e,handleItemEvent:t,isElementTypeChangingDropdown:l,baseApiRoute:o,closeMegaDropdown:s,setLastNewItem:p}){const u=(0,d.vf)(),[h,N]=(0,a.useState)(u),[M,E]=(0,a.useState)("");function v(e){const l=h.filter(t=>t.groupName===e);return(0,n.createElement)(c,{type:e,screenList:l,handleItemEvent:t,baseApiRoute:o,closeMegaDropdown:s,setLastNewItem:p})}return(0,a.useEffect)(()=>{e||(N(u),E(""))},[e]),(0,a.useEffect)(()=>{if(""===M.trim())N(u);else{const e=u.filter(e=>e.title.toLowerCase().includes(M.toLowerCase()));N(e)}},[M]),e&&(0,n.createElement)(g.Vz,{className:"helpgent-mega-dropdown"},(0,n.createElement)("div",{className:"helpgent-mega-dropdown__search"},(0,n.createElement)("span",{className:"helpgent-mega-dropdown__search-icon"},(0,n.createElement)(i.A,{src:m.A})),(0,n.createElement)("input",{type:"text",name:"helpgent-screen-search",placeholder:(0,r.__)("Find an element","helpgent"),onChange:e=>function(e){E(e.target.value)}(e)})),(0,n.createElement)("div",{className:"helpgent-mega-dropdown__content helpgent-scrollbar-style"},(0,n.createElement)("h3",{className:"helpgent-mega-dropdown__title"},(0,r.__)("All elements","helpgent")),(0,n.createElement)("div",{className:"helpgent-screen-type-wrap"},(0,n.createElement)("div",{className:"helpgent-screen-type-column"},v("basic"),v("rating")),(0,n.createElement)("div",{className:"helpgent-screen-type-column"},v("contact"),v("answer"),!l&&v("security")),(0,n.createElement)("div",{className:"helpgent-screen-type-column"},v("choices"),!l&&v("initial")))))}},62947:(e,t,l)=>{l.d(t,{A:()=>f});var n=l(51609),a=l(86087),i=l(44253),o=l(10155),s=l(65604),r=l(50481),c=l(22057),m=l(90781),g=l(72235),d=l(27723);function p({recorder:e,afterGrantPermission:t,onBack:l,onExit:a}){let i=e.getRecorderConfig("checkPermissions");return(0,n.createElement)(o.BT,{className:"helpgent-video-recorder-permission-container"},"function"==typeof a&&(0,n.createElement)("div",{className:"helpgent-close-btn"},(0,n.createElement)("a",{href:"#",className:"helpgent-close-btn-icon",onClick:e=>{e.preventDefault(),a()}},(0,n.createElement)(s.A,{src:m.A}))),("function"==typeof l||"function"==typeof a)&&(0,n.createElement)("div",{className:"helpgent-header-action"},"function"==typeof l&&(0,n.createElement)("div",{className:"helpgent-header-action-item"},(0,n.createElement)("a",{href:"#",className:"helpgent-btn-back helpgent-action-icon",onClick:e=>{e.preventDefault(),l()}},(0,n.createElement)(s.A,{src:c.A})))),(0,n.createElement)("h4",{className:"helpgent-permission-title"},(0,d.sprintf)((0,d.__)("To Record %s, your browser will need to request access to your %s.","helpgent"),e.getRecorderType(),i.length?i.join(", "):"")),(0,n.createElement)(r.A,{src:g,alt:"helpgent video support"}),(0,n.createElement)("div",{className:"helpgent-btn helpgent-btn-lg helpgent-btn-primary",onClick:l=>{l.preventDefault(),async function(){await e.requestPermission()&&t()}()}},(0,d.__)("Request Permission","helpgent")),e.isPermissionDenied&&(0,n.createElement)("div",{className:"helpgent-mt-10 helpgent-notice helpgent-notice-danger helpgent-text-center"},(0,d.__)("Please grant the requested permission","helpgent")))}var u=l(82902),h=l(62064),N=l(33410);function M({recorder:e,onCancel:t}){function l(){return e.isRecording||e.isPaused}return(0,a.useEffect)(()=>{e.setupStream()},[]),(0,n.createElement)(o.oF,{className:"helpgent-video-recorder-container-area"},(0,n.createElement)("div",{className:"helpgent-video-recorder-wrap"},(0,n.createElement)("div",{className:"helpgent-video-recorder-container helpgent-video-recorder"},(0,n.createElement)("a",{href:"#",className:"helpgent-btn-back",onClick:e=>{e.preventDefault(),t()}},(0,n.createElement)(s.A,{src:c.A})),(0,n.createElement)("video",{ref:e.videoPreviewStreamRef,muted:!0,playsInline:!0}),(0,n.createElement)("div",{className:"helpgent-timer"},(0,n.createElement)("span",{className:"helpgent-sec"},e.getFormattedRecordedTime())),e.isActiveCountdown&&(0,n.createElement)("div",{className:"helpgent-video-recorder-countdown-container"},(0,n.createElement)(u.A,{value:e.getCountdownTimeReversed(),onClick:e.skipCountdown,hint:(0,d.__)("Click anywhere to skip the countdown","helpgent")})),!e.isActiveCountdown&&(0,n.createElement)("div",{className:"helpgent-record-action"+(l()?" helpgent-record-start":"")},(0,n.createElement)("a",{href:"#",className:"helpgent-record-btn",onClick:t=>{t.preventDefault(),async function(){l()?e.stop():await e.start()}()}}),l()&&(0,n.createElement)("a",{href:"#",className:"helpgent-btn-record-right helpgent-btn-"+(e.isPaused?"play":"pause"),onClick:t=>{t.preventDefault(),async function(){e.isPaused?e.resume():e.pause()}()}}," ",(0,n.createElement)(s.A,{src:e.isPaused?N.A:h.A})," ")))))}var E=l(69466);const v=l(38267).Ay.div`
    position: relative;
    padding-top: calc( 56.25% + 79px );
    margin-right: 80px;
    margin-left: 80px;
    border-radius: 20px;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
    height: unset !important;

    .helpgent-media-preview-wrap {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
    }

    .helpgent-media-preview-close-action{
        position: absolute;
        right: 25px;
        top: 10px;
        z-index: 10;
        .helpgent-media-preview-close-action-link{
            svg{
                width: 12px;
                height: 12px;
                path{
                    fill: var(--helpgent-color-dark);
                    transition: var(--helpgent-transition);
                }
            }
            &:hover{
                svg path{
                    fill: var(--helpgent-color-danger);
                }
            }
        }
    }
    .helpgent-media-preview__media {
        height: calc( 100% - 79px );
        .helpgent-media-preview__video{
            height: 100%;
        }
        video{
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0;
        }
    }

    .helpgent-media-preview__actions {
        display: flex;
        flex-direction: column;
        background: var(--helpgent-color-bg-light);
        h4{
            padding: 25px;
            margin: 0;
            font-size: 20px;
        }
        .helpgent-media-preview-message{
            height: 100%;
            textarea{
                background: none;
                resize: none;
                border: 0 none;
                width: 100%;
                height: 100%;
                padding: 0 25px 15px;
                font-size: 18px;
                &:focus{
                    border: 0 none;
                    box-shadow: none;
                }
                &::-webkit-scrollbar {
                    width: 5px;
                }
                &::-webkit-scrollbar-track {
                    background: #f1f1f1;
                    border-radius: 3px;
                }
                &::-webkit-scrollbar-thumb {
                    background: var(--helpgent-color-bg-deep);
                    transition: var(--helpgent-transition);
                    border-radius: 3px;
                }
                &::-webkit-scrollbar-thumb:hover {
                    background: var(--helpgent-color-primary);
                }
            }
        }
        .helpgent-media-preview-buttons{
            margin-top: auto;
            display: flex;
            align-items: center;
            background: #fff;
            a{
                flex: 1;
                display: flex;
                align-items:center;
                justify-content: center;
                gap: 10px;
                font-size: 15px;
                color: var(--helpgent-color-gray);
                text-decoration: none;
                padding: 30px 15px;
                transition: var(--helpgent-transition);
                &:not(:last-child){
                    border-right: 1px solid var(--helpgent-color-border-light);
                }
                svg{
                    path{
                        fill: var(--helpgent-color-gray);
                        transition: var(--helpgent-transition);
                    }
                }
                &:hover{
                    color: var(--helpgent-color-primary);
                    svg path{
                        fill: var(--helpgent-color-primary);
                    }
                }
            }
        }
    }

    .helpgent-btn-recorded {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        margin: 0px auto;
        border-radius: 50%;
        z-index: 101;
        transition: box-shadow 0.2s ease-in 0s;
        background-color: var(--color-white);
        box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 50px;
        &:hover{
            box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 60px;
        }
        svg{
            path{
                fill: var(--helpgent-color-primary);
            }
        }
        &.helpgent-btn-recorded-pause{

        }
    }
    .helpgent-audio-range{
        width: calc(100% + 50px);
        display: block;
        margin: 100px 0px 0px -30px;
    }
    .helpgent-recorded-preview__bottom{
        margin-top: 35px;
        h4{
            font-size: 20px;
            font-weight: 600;
            margin: 0px 0px 20px;
        }
    }
    .helpgent-recorded-preview__bottom-actions{
        a{
            display: flex;
            justify-content: center;
            width: 100%;
            text-align: center;
            box-sizing: border-box;
            border-radius: 14px;
        }
        a + a{
            margin-top: 10px;
        }
    }
`;var _=l(21192),w=l(52973),L=l(23142),b=l(47539);function y({file:e,onSubmit:t,onBack:l,onExit:i,submitButtonLabel:o}){const[r,m]=(0,a.useState)(""),[g,p]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1);return o=o||"Save",(0,a.useEffect)(()=>{if(!e||"object"!=typeof e)return;let t=e.type.match(/^[^/]+/);t=t?t[0]:"",p(t),m(URL.createObjectURL(e))},[]),(0,n.createElement)(v,{className:"helpgent-media-preview"},(0,n.createElement)("div",{className:"helpgent-media-preview-wrap"},(0,n.createElement)("div",{className:"helpgent-media-preview-close-action"},(0,n.createElement)("a",{href:"#",className:"helpgent-media-preview-close-action-link",onClick:e=>{e.preventDefault(),i()}},(0,n.createElement)(s.A,{src:L.A}))),(0,n.createElement)("div",{className:"helpgent-media-preview__media"},"audio"===g&&(0,n.createElement)(_.A,{mediaURL:r}),"video"===g&&(0,n.createElement)(w.A,{mediaURL:r})),(0,n.createElement)("div",{className:"helpgent-media-preview__actions"},(0,n.createElement)("div",{className:"helpgent-media-preview-buttons"},("function"==typeof l||"function"==typeof i)&&(0,n.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),"function"!=typeof l?"function"!=typeof i||i():l()}},(0,n.createElement)(s.A,{src:c.A}),(0,d.__)("Cancel","helpgent")),(0,n.createElement)("a",{href:"#",onClick:async function(l){if(l.preventDefault(),"function"!=typeof t)return;if(u)return;if(!e)return;h(!0);const n=await t(e,g);h(!1),n&&n.success&&"function"==typeof i&&i()}},u?(0,d.__)("Please wait...","helpgent"):o,(0,n.createElement)(s.A,{src:b.A}))))))}function f({fileUploader:e,onSubmit:t,onExit:l,maxRecordLength:s,videoResolution:r,previewMode:c,submitButtonLabel:m}){const[g,d]=(0,a.useState)("recorder"),[u,h]=(0,a.useState)(""),N={default:y,previewWithText:E.A};c=c||"default";const v=N.hasOwnProperty(c)?N[c]:N.default,_={recorderType:"video",maxRecordLength:s?parseInt(s):120,countdownTimer:3,videoResolution:r?parseInt(r):null,afterStopRecording:function(t){t&&(e&&e.setFile(t.blob),d("mediaPreview"))}},w=(0,i.A)(_),L=()=>{w.reset(),l()},b={permission:(0,n.createElement)(p,{recorder:w,onExit:L,afterGrantPermission:()=>{d("recorder")}}),recorder:(0,n.createElement)(M,{recorder:w,onCancel:L}),mediaPreview:(0,n.createElement)("div",{className:"helpgent-media-preview-container"},(0,n.createElement)(v,{file:e&&e.hasFile()?e.getFile().file:w.recordedBlob,onSubmit:(l,n,a)=>t(e?e.files:l,n),onBack:()=>{w.reset(),d("recorder")},onExit:L,submitButtonLabel:m}))};return(0,a.useEffect)(()=>(async function(){await w.checkPermission()?d("recorder"):(d("permission"),h("helpgent-permission-modal"))}(),()=>{w.reset()}),[]),(0,n.createElement)(o.jD,{className:u},(f=g,b.hasOwnProperty(f)?b[f]:""));var f}},68469:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(1455),a=l.n(n);async function i(e,t,l){return l=l||{},await a()({path:e,method:"DELETE",data:t,...l}).then(e=>e)}},69466:(e,t,l)=>{l.d(t,{A:()=>p});var n=l(51609),a=l(86087);const i=l(38267).Ay.div`
    display: flex;
    box-sizing: border-box;
    background: #fff;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-left: 80px;
    margin-right: 80px;
    height: calc(100vh - 160px);
    @media only screen and (max-width: 575px){
        flex-wrap: wrap;
        flex-direction: column;
    }

    .helpgent-media-preview-close-action{
        position: absolute;
        right: 25px;
        top: 10px;
        .helpgent-media-preview-close-action-link{
            svg{
                width: 12px;
                height: 12px;
                path{
                    fill: var(--helpgent-color-dark);
                    transition: var(--helpgent-transition);
                }
            }
            &:hover{
                svg path{
                    fill: var(--helpgent-color-danger);
                }
            }
        }
    }
    .helpgent-media-preview__media {
        flex: 1;
        position: relative;
        .helpgent-media-preview__video{
            height: 100%;
        }
        video{
            width: 100%;
            height: calc(100% + 1px);
            object-fit: cover;
            border-radius: 0;
        }
    }

    .helpgent-media-preview__actions {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--helpgent-color-bg-light);
        h4{
            padding: 25px;
            margin: 0;
            font-size: 20px;
        }
        .helpgent-media-preview-message{
            height: 100%;
            textarea{
                background: none;
                resize: none;
                border: 0 none;
                width: 100%;
                height: 100%;
                padding: 0 25px 15px;
                font-size: 18px;
                &:focus{
                    border: 0 none;
                    box-shadow: none;
                }
                &::-webkit-scrollbar {
                    width: 5px;
                }
                &::-webkit-scrollbar-track {
                    background: #f1f1f1;
                    border-radius: 3px;
                }
                &::-webkit-scrollbar-thumb {
                    background: var(--helpgent-color-bg-deep);
                    transition: var(--helpgent-transition);
                    border-radius: 3px;
                }
                &::-webkit-scrollbar-thumb:hover {
                    background: var(--helpgent-color-primary);
                }
            }
        }
        .helpgent-media-preview-buttons{
            margin-top: auto;
            display: flex;
            align-items: center;
            background: #fff;
            a{
                flex: 1;
                display: flex;
                align-items:center;
                justify-content: center;
                gap: 10px;
                font-size: 15px;
                color: var(--helpgent-color-gray);
                text-decoration: none;
                padding: 30px 15px;
                transition: var(--helpgent-transition);
                &:not(:last-child){
                    border-right: 1px solid var(--helpgent-color-border-light);
                }
                svg{
                    path{
                        fill: var(--helpgent-color-gray);
                        transition: var(--helpgent-transition);
                    }
                }
                &:hover{
                    color: var(--helpgent-color-primary);
                    svg path{
                        fill: var(--helpgent-color-primary);
                    }
                }
            }
        }
    }

    .helpgent-btn-recorded {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        margin: 0px auto;
        border-radius: 50%;
        z-index: 101;
        transition: box-shadow 0.2s ease-in 0s;
        background-color: var(--color-white);
        box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 50px;
        &:hover{
            box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 60px;
        }
        svg{
            path{
                fill: var(--helpgent-color-primary);
            }
        }
        &.helpgent-btn-recorded-pause{

        }
    }
    .helpgent-audio-range{
        width: calc(100% + 50px);
        display: block;
        margin: 100px 0px 0px -30px;
    }
    .helpgent-recorded-preview__bottom{
        margin-top: 35px;
        h4{
            font-size: 20px;
            font-weight: 600;
            margin: 0px 0px 20px;
        }
    }
    .helpgent-recorded-preview__bottom-actions{
        a{
            display: flex;
            justify-content: center;
            width: 100%;
            text-align: center;
            box-sizing: border-box;
            border-radius: 14px;
        }
        a + a{
            margin-top: 10px;
        }
    }
`;var o=l(21192),s=l(52973),r=l(65604),c=l(23142),m=l(22057),g=l(47539),d=l(27723);function p({file:e,onSubmit:t,onBack:l,onExit:p,submitButtonLabel:u}){const[h,N]=(0,a.useState)(""),[M,E]=(0,a.useState)(""),[v,_]=(0,a.useState)(""),[w,L]=(0,a.useState)(""),[b,y]=(0,a.useState)(!1);return u=u||(0,d.__)("Save","helpgent"),(0,a.useEffect)(()=>{if(!e||"object"!=typeof e)return;let t=e.type.match(/^[^/]+/);t=t?t[0]:"",E(t),N(URL.createObjectURL(e))},[]),(0,n.createElement)(i,{className:"helpgent-media-preview"},(0,n.createElement)("div",{className:"helpgent-media-preview-close-action"},(0,n.createElement)("a",{href:"#",className:"helpgent-media-preview-close-action-link",onClick:e=>{e.preventDefault(),p()}},(0,n.createElement)(r.A,{src:c.A}))),(0,n.createElement)("div",{className:"helpgent-media-preview__media"},"audio"===M&&(0,n.createElement)(o.A,{mediaURL:h}),"video"===M&&(0,n.createElement)(s.A,{mediaURL:h})),(0,n.createElement)("div",{className:"helpgent-media-preview__actions"},(0,n.createElement)("h4",null,(0,d.__)("Ready to Send?","helpgent")),(0,n.createElement)("div",{className:"helpgent-media-preview-message"},(0,n.createElement)("textarea",{onChange:e=>_(e.target.value),value:v,placeholder:(0,d.__)("Type your text here","helpgent")})),w&&(0,n.createElement)("div",null,w),(0,n.createElement)("div",{className:"helpgent-media-preview-buttons"},("function"==typeof l||"function"==typeof p)&&(0,n.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),"function"!=typeof l?"function"!=typeof p||p():l()}},(0,n.createElement)(r.A,{src:m.A}),(0,d.__)("Cancel","helpgent")),(0,n.createElement)("a",{href:"#",onClick:async function(l){if(l.preventDefault(),"function"!=typeof t)return;if(b)return;if(L(""),!e)return void L((0,d.__)("Please select a file","helpgent"));y(!0);const n=await t(e,v,M);n&&(y(!1),n.success?"function"==typeof p&&p():L(n.message))}},b?(0,d.__)("Please wait...","helpgent"):u,(0,n.createElement)(r.A,{src:g.A})))))}},71899:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGQ9Ik0zMDQgNDhhNDggNDggMCAxIDAgLTk2IDAgNDggNDggMCAxIDAgOTYgMHptMCA0MTZhNDggNDggMCAxIDAgLTk2IDAgNDggNDggMCAxIDAgOTYgMHpNNDggMzA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()=>i});var n=l(18562),a=l(38745);function i(e,t,l,i,o){let s=JSON.parse(JSON.stringify(e));const{singleForm:r}=t,{elements:c,global:m}=r.content,g=(0,a.L)();if(s.isPro&&!g)return void l({...t,isProModalActive:!0});const d=c.reduce((e,t)=>{const l=t.element_type;return e[l]||(e[l]=[]),e[l].push(t),e},{}),p=d.welcome||[],u=d.gdpr||[],h=d.user_validation||[],N=d.end||[],M=c.filter(e=>"end"!==e.element_type&&"user_validation"!==e.element_type),E=M[M.length-1],v=N[0];if(s.id=(0,n.A)(),"welcome"===s.element_type){if(0===M.length?s.controls.elementLogic.default_target=v.id:s.controls.elementLogic.default_target=M[0].id,0!==p.length)return;c.splice(0,0,s)}else if("user_validation"===s.element_type){if(0!==h.length)return;c.splice(1,0,s)}else{if("gdpr"===s.element_type&&0!==u.length)return;if(E&&v){const e=c.findIndex(e=>e.id===E.id);-1!==e&&(v?"end"!==s.element_type&&(s.controls.elementLogic.default_target=v.id):"end"!==s.element_type&&(s.controls.elementLogic.default_target=null),c[e].controls.elementLogic.default_target=s.id)}else if(v)if("single_select"===s.element_type||"dropdown"===s.element_type||"yes_no"===s.element_type){const e=s?.controls?.general?.options.map((e,t)=>({index:t+1,if_element:s.id,value:"yes_no"===s.element_type?parseInt(e.value):e.id,type:"is",target_element:v.id}));s.controls.elementLogic.logics=e}else"end"!==s.element_type&&(s.controls.elementLogic.default_target=v.id);else if(E){const e=c.findIndex(e=>e.id===E.id);if(-1!==e)if("single_select"===E.element_type||"dropdown"===E.element_type||"yes_no"===E.element_type){const t=E?.controls?.general?.options.map((e,t)=>({index:t+1,if_element:E.id,value:"yes_no"===E.element_type?parseInt(e.value):e.id,type:"is",target_element:s.id}));c[e].controls.elementLogic.logics=t}else c[e].controls.elementLogic.default_target=s.id}c.push(s)}const _={...r,content:{elements:c,global:m}};l({...t,activeElement:s,activeElementId:s.id,singleForm:_,screenSettingType:"design"!==t.screenSettingType?"element":"design"}),"end-element"===i?o.end(s):o.other(s)}},86765:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOS41NCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDE5LjU0IDI0Ij4KICA8cGF0aCBpZD0icGxheS1yb3VuZCIgZD0iTTIwLjUsNy45NzFsLTkuNTQxLTdBNSw1LDAsMCwwLDMsNS4wMDd2MTRhNSw1LDAsMCwwLDcuOTU2LDQuMDMxbDkuNTQxLTdhNSw1LDAsMCwwLDAtOC4wNjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMyAtMC4wMDkpIi8+Cjwvc3ZnPgo="},87277:(e,t,l)=>{function n(e,t,l,n){const a=e?.current.closest(".helpgent-form-wrapper--adaptive");t(a&&a.clientWidth),l(n)}l.d(t,{A:()=>n})},88039:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(26374),a=l(68469);const i=(e,t)=>(0,n.n)(l=>"object"==typeof l?(l.id&&l.data&&(e=`${e}/${l.id}`,l=l.data),(0,a.A)(e,l,t)):(e=l?`${e}/${l}`:e,(0,a.A)(e,l||{},t)))},88589:(e,t,l)=>{l.d(t,{A:()=>n}),l(51609);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBpZD0iSWNvbl9hd2Vzb21lLXF1ZXN0aW9uLWNpcmNsZSIgZGF0YS1uYW1lPSJJY29uIGF3ZXNvbWUtcXVlc3Rpb24tY2lyY2xlIiBkPSJNMTYuNTYzLDguNTYzYTgsOCwwLDEsMS04LThBOCw4LDAsMCwxLDE2LjU2Myw4LjU2M1pNOC43NzcsMy4yMDhhNC4xNzgsNC4xNzgsMCwwLDAtMy43NiwyLjA1Ny4zODguMzg4LDAsMCwwLC4wODguNTI0bDEuMTE5Ljg0OWEuMzg3LjM4NywwLDAsMCwuNTM4LS4wNjhjLjU3Ni0uNzMxLjk3MS0xLjE1NSwxLjg0OC0xLjE1NS42NTksMCwxLjQ3NC40MjQsMS40NzQsMS4wNjMsMCwuNDgzLS40LjczMS0xLjA0OSwxLjFDOC4yNzYsOCw3LjI3Miw4LjUyOCw3LjI3Miw5Ljg1M3YuMTI5YS4zODcuMzg3LDAsMCwwLC4zODcuMzg3SDkuNDY2YS4zODcuMzg3LDAsMCwwLC4zODctLjM4N1Y5LjkzOWMwLS45MTgsMi42ODMtLjk1NiwyLjY4My0zLjQ0MUMxMi41MzYsNC42MjcsMTAuNiwzLjIwOCw4Ljc3NywzLjIwOFptLS4yMTUsOGExLjQ4NCwxLjQ4NCwwLDEsMCwxLjQ4NCwxLjQ4NEExLjQ4NiwxLjQ4NiwwLDAsMCw4LjU2MywxMS4yMDhaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMC41NjMgLTAuNTYzKSIgZmlsbD0iIzZlNmU2ZSIvPgo8L3N2Zz4K"},90221:(e,t,l)=>{function n(e,t){e&&(e.paused?(e.play(),t(!0)):(e.pause(),t(!1)))}l.d(t,{A:()=>n})},90453:(e,t,l)=>{l.d(t,{A:()=>g});var n=l(51609),a=l(78242),i=l(52619),o=l(10426),s=l(4286),r=l(88039),c=l(35372),m=l(27723);function g(e){const{title:t,elementId:l,formId:g,setIsDeleteModalActive:d,type:p,optionData:u,baseApiRoute:h,moduleState:N,setModuleState:M}=e,{singleForm:E,changingElement:v,activeElementId:_}=N,{elements:w,global:L}=E.content,{setStoreData:b}=(0,o.A)(),{mutateAsync:y,isLoading:f,error:I}=(0,r.A)(`${h?.form}/${g}/element/answer`),{mutateAsync:D,isLoading:S,error:A}=(0,r.A)(`${h?.form}/${g}/element/option`);return(0,n.createElement)(a.A,{title:t,onCancel:function(){"element-type"===p?M({...N,isTypeChangeModalActive:!1}):d(!1)},onSubmit:async function(){if(!f&&!S)if("element"===p){const e={element_id:l};try{await y(e),function(){const e=w.filter(e=>e.id!==l);let t=null;for(let e=0;e<w.length;e++)w[e].id===l&&(t=e>0?w[e-1]:w[e+1]);const n={...E,content:{global:L,elements:e}};M({...N,singleForm:n,activeElement:t,activeElementId:t.id}),d(!1),(0,i.doAction)("helpgent-toast",{message:(0,m.__)("Element removed successfully","helpgent")})}()}catch(e){console.log(e)}}else if("option"===p){const e={element_id:l,value:u.removableItemId};try{await D(e),(0,c.A)("remove-option",u.removableItemId,u.controls,u.generalControls,l,N,M,u.removableItemId,b),d(!1),(0,i.doAction)("helpgent-toast",{message:(0,m.__)("Option removed successfully","helpgent")})}catch(e){console.log(e)}}else if("element-type"===p){const e={element_id:l,new_element:JSON.stringify(v)};try{await y(e),function(e){const t=w.map(t=>t.id===_?{...e,id:_}:t),l={...E,content:{elements:t,global:L}};M({...N,singleForm:l,activeElement:e,isTypeChangeModalActive:!1})}(v)}catch(e){}}},hasCancelButton:!0,hasSubmitButton:!0,isActiveSubmit:!0,cancelText:(0,m.__)("No, cancel","helpgent"),submitText:f||S?"element-type"===p?(0,m.__)("Changing","helpgent"):(0,m.__)("Deleting","helpgent"):"element-type"===p?(0,m.__)("Yes, change type","helpgent"):(0,m.__)("Yes, delete it","helpgent"),cancelBtnType:"light",submitBtnType:"danger",className:"helpgent-delete-alert-modal"},(0,n.createElement)(s.fZ,null,(0,n.createElement)("div",{className:"helpgent-alert-content"},(0,n.createElement)("span",{className:"helpgent-text-warning helpgent-mb-15"},(0,m.__)("Warning:","helpgent")),(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,m.sprintf)((0,m.__)("Deleting this %s will result in the permanent loss of response data associated with this %s.","helpgent"),"element"===p?"screen":"option","element"===p?"screen":"option")),(0,n.createElement)("li",null,(0,m.sprintf)((0,m.__)("If logic rules are applied to this %s, deleting it will break the logic.","helpgent"),"element"===p?"element":"option"))),(0,n.createElement)("h4",null,(0,m.__)("Are you sure you want to delete it?","helpgent")))))}},92283:(e,t,l)=>{l.d(t,{A:()=>m});var n=l(51609),a=l(86087),i=l(65604),o=l(27716),s=l(5591),r=l(74618),c=l(71899);function m({className:e,dropDownText:t,dropDownIcon:l,dropdownList:m,placement:g,handleDropdownTrigger:d,Link:p,tooltipText:u,customItem:h,topPosition:N}){m=Array.isArray(m)?m.map(e=>({...e,isLoading:!1})):[];const M=(0,a.useRef)(null),[E,v]=(0,a.useState)(m),[_,w]=(0,a.useState)(!1),L=`helpgent-dropdown ${_?"helpgent-dropdown-open ":""}${e&&e} helpgent-dropdown-${g}`;function b(e,t,l){return e.map((e,n)=>n!==t?e:{...e,...l})}return(0,r.A)(".helpgent-dropdown-open",".helpgent-dropdown__content",40),(0,a.useEffect)(()=>{(0,o.A)(_,w,M)},[_]),(0,n.createElement)("div",{className:L,ref:M},(0,n.createElement)("a",{href:"#",className:"helpgent-dropdown__toggle helpgent-dropdown__toggle-icon-only",onClick:function(e){e.preventDefault(),w(!_),(0,s.A)(e,".helpgent-dropdown",".helpgent-dropdown__content",null,N||40,!1,"right")},"data-tooltip":""!==u?u:""},t||null,l?(0,n.createElement)("span",{className:"helpgent-dropdown-icon"},(0,n.createElement)(i.A,{src:l})):null),(0,n.createElement)("ul",{className:_?"helpgent-dropdown__content helpgent-show":"helpgent-dropdown__content"},(0,n.createElement)("li",null,h),E&&E.map((e,t)=>{let l=null;return l="blank"===e.target&&e.url?e.url:"blank"!==e.target&&e.url?`/${e.url}`:"#",(0,n.createElement)("li",{key:t},p?(0,n.createElement)(p,{to:l,onClick:async n=>{if("#"!==l)return void w(!1);if(e.isLoading)return;let a=b(E,t,{isLoading:!0});v(a),await d(n,e.name),a=b(a,t,{isLoading:!1}),v(a),w(!1)},className:e.className?e.className:"",target:"blank"===e.target?"_blank":null},e.isLoading||e.icon?(0,n.createElement)("span",{className:"helpgent-dropdown-item-icon"+(e.isLoading?" helpgent-animate-spin":"")},(0,n.createElement)(i.A,{src:e.isLoading?c.A:e.icon})):"",e.text):(0,n.createElement)("a",{href:l,onClick:t=>"#"===l&&(w(!1),d(t,e.name)),className:e.className?e.className:"",target:"blank"===e.target?"_blank":null},e.icon?(0,n.createElement)("span",{className:"helpgent-dropdown-item-icon"},(0,n.createElement)(i.A,{src:e.icon})):"",e.text))})))}}}]);