Everest Forms – Easy Contact Form and Form Builder - Version 1.9.6

Version Description

  • 17-11-2022
  • Fix - Flatpickr date localization not working while the form has more than one date field.
  • Enhancement - Entry ID smart tag in the email message.
  • Enhancement - Set date range x days after or before.
Download this release

Release Info

Developer everestforms
Plugin Icon 128x128 Everest Forms – Easy Contact Form and Form Builder
Version 1.9.6
Comparing to
See all releases

Code changes from version 1.9.5 to 1.9.6

assets/css/menu-rtl.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:EverestForms;src:url("../fonts/EverestForms.eot?q9mcqj");src:url("../fonts/EverestForms.eot?q9mcqj#iefix") format("embedded-opentype"),url("../fonts/EverestForms.ttf?q9mcqj") format("truetype"),url("../fonts/EverestForms.woff?q9mcqj") format("woff"),url("../fonts/EverestForms.svg?q9mcqj#EverestForms") format("svg");font-weight:400;font-style:normal;font-display:block}.evf-icon{padding:8px;border-radius:4px}.evf-icon *{display:block}.evf-h2{font-size:28px;font-weight:600}.evf-text-center{text-align:center}#evf-modal-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-right:-250px;margin-top:-125px;position:fixed;top:50%;right:50%;z-index:100105;transition:height .2s,margin-top .2s}#evf-modal-wrap #evf-modal{height:100%;position:relative}#evf-modal-wrap #evf-modal #evf-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;top:0;left:0;right:0}#evf-modal-wrap #evf-modal #evf-modal-close{color:#666;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center;background:100% 0;border:none;cursor:pointer}#evf-modal-wrap #evf-modal #evf-modal-close:focus,#evf-modal-wrap #evf-modal #evf-modal-close:hover{color:#2ea2cc}#evf-modal-wrap #evf-modal #evf-modal-close:focus{outline:0;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#evf-modal-wrap #evf-modal #evf-modal-close::before{content:'\f158';font:normal 20px/36px dashicons;vertical-align:top;speak:none;width:36px;height:36px}#evf-modal-wrap #evf-modal #evf-modal-inner{padding:0 16px 50px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-notice{padding:10px;color:#31708f;background-color:#d9edf7;border:1px solid #bce8f1}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options{padding:8px 0 12px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options .evf-modal-inline{margin:0;padding:0 0 0 20px;display:inline-block}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options #evf-modal-select-form{max-width:100%;margin-bottom:1em}#evf-modal-wrap #evf-modal .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;right:0;left:0}#evf-modal-wrap #evf-modal .submitbox #evf-modal-cancel{float:right;line-height:25px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update{float:left;line-height:23px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update #evf-modal-submit{float:left;margin-bottom:0}#evf-modal-backdrop{display:none;position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100100}@media screen and (max-width:782px){#evf-modal-wrap{height:280px;margin-top:-140px}#evf-modal-inner{padding:0 16px 60px}#evf-modal-cancel{line-height:32px}}@media screen and (max-width:520px){#evf-modal-wrap{width:auto;margin-right:0;right:10px;left:10px;max-width:500px}}@media screen and (max-height:520px){#evf-modal-wrap{transition:none}}@media screen and (max-height:290px){#evf-modal-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#evf-modal-inner{overflow:auto;height:calc(100% - 92px);padding-bottom:2px}}[class*=' evf-icon-'],[class^=evf-icon-]{font-family:EverestForms!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;-webkit-font-feature-settings:'liga';-ms-font-feature-settings:'liga' 1;font-feature-settings:'liga';-webkit-font-variant-ligatures:discretionary-ligatures;font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.evf-icon-captcha::before{content:'\e004'}.evf-icon-password::before{content:'\e004'}.evf-icon-email::before{content:'\e005'}.evf-icon-map-marker::before{content:'\e007'}.evf-icon-flag::before{content:'\e00a'}.evf-icon-first-name::before{content:'\e00d'}.evf-icon-last-name::before{content:'\e00e'}.evf-icon-text::before{content:'\e00f'}.evf-icon-paragraph::before{content:'\e010'}.evf-icon-dropdown::before{content:'\e011'}.evf-icon-checkbox::before{content:'\e012'}.evf-icon-multiple-choices::before{content:'\e013'}.evf-icon-multiple-choices-radio::before{content:'\e014'}.evf-icon-number::before{content:'\e015'}.evf-icon-website::before{content:'\e016'}.evf-icon-calendar::before{content:'\e017'}.evf-icon-single-item::before{content:'\e018'}.evf-icon-file-upload::before{content:'\e019'}.evf-icon-hidden::before{content:'\e01a'}.evf-icon-phone::before{content:'\e01b'}.evf-icon-custom-html::before{content:'\e01c'}.evf-icon-section-divider::before{content:'\e01d'}.evf-icon-payment::before{content:'\e01f'}.evf-icon-total::before{content:'\e020'}.evf-icon-img-upload::before{content:'\e022'}.evf-icon-star::before{content:'\e024'}.evf-icon-likert::before{content:'\e025'}.evf-icon-scale-rating::before{content:'\e026'}.evf-icon-signature::before{content:'\e028'}.evf-icon-privacy-policy::before{content:'\e02c'}.evf-icon-repeater::before{content:'\e032'}.evf-icon-range-slider::before{content:'\e02b'}.evf-icon-divider::before{content:'\e031'}.evf-icon-wysiwyg::before{content:'\e901'}.evf-icon-eye::before{content:'\e903'}.evf-icon-coupon::before{content:'\e904'}.evf-icon-yes-no::before{content:'\e905'}.evf-icon-reset::before{content:'\e907'}.evf-icon-progress::before{content:'\e908'}.evf-icon-color::before{content:'\e909'}
1
+ @font-face{font-family:EverestForms;src:url("../fonts/EverestForms.eot?q9mcqj");src:url("../fonts/EverestForms.eot?q9mcqj#iefix") format("embedded-opentype"),url("../fonts/EverestForms.ttf?q9mcqj") format("truetype"),url("../fonts/EverestForms.woff?q9mcqj") format("woff"),url("../fonts/EverestForms.svg?q9mcqj#EverestForms") format("svg");font-weight:400;font-style:normal;font-display:block}.evf-icon{padding:8px;border-radius:4px}.evf-icon *{display:block}.evf-h2{font-size:28px;font-weight:600}.evf-text-center{text-align:center}#evf-modal-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-right:-250px;margin-top:-125px;position:fixed;top:50%;right:50%;z-index:100105;transition:height .2s,margin-top .2s}#evf-modal-wrap #evf-modal{height:100%;position:relative}#evf-modal-wrap #evf-modal #evf-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;top:0;left:0;right:0}#evf-modal-wrap #evf-modal #evf-modal-close{color:#666;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center;background:100% 0;border:none;cursor:pointer}#evf-modal-wrap #evf-modal #evf-modal-close:focus,#evf-modal-wrap #evf-modal #evf-modal-close:hover{color:#2ea2cc}#evf-modal-wrap #evf-modal #evf-modal-close:focus{outline:0;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#evf-modal-wrap #evf-modal #evf-modal-close::before{content:'\f158';font:normal 20px/36px dashicons;vertical-align:top;speak:none;width:36px;height:36px}#evf-modal-wrap #evf-modal #evf-modal-inner{padding:0 16px 50px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-notice{padding:10px;color:#31708f;background-color:#d9edf7;border:1px solid #bce8f1}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options{padding:8px 0 12px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options .evf-modal-inline{margin:0;padding:0 0 0 20px;display:inline-block}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options #evf-modal-select-form{max-width:100%;margin-bottom:1em}#evf-modal-wrap #evf-modal .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;right:0;left:0}#evf-modal-wrap #evf-modal .submitbox #evf-modal-cancel{float:right;line-height:25px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update{float:left;line-height:23px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update #evf-modal-submit{float:left;margin-bottom:0}#evf-modal-backdrop{display:none;position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100100}@media screen and (max-width:782px){#evf-modal-wrap{height:280px;margin-top:-140px}#evf-modal-inner{padding:0 16px 60px}#evf-modal-cancel{line-height:32px}}@media screen and (max-width:520px){#evf-modal-wrap{width:auto;margin-right:0;right:10px;left:10px;max-width:500px}}@media screen and (max-height:520px){#evf-modal-wrap{transition:none}}@media screen and (max-height:290px){#evf-modal-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#evf-modal-inner{overflow:auto;height:calc(100% - 92px);padding-bottom:2px}}[class*=' evf-icon-'],[class^=evf-icon-]{font-family:EverestForms!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;-webkit-font-feature-settings:'liga';-ms-font-feature-settings:'liga' 1;font-feature-settings:'liga';-webkit-font-variant-ligatures:discretionary-ligatures;font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.evf-icon-captcha::before{content:'\e004'}.evf-icon-password::before{content:'\e004'}.evf-icon-email::before{content:'\e005'}.evf-icon-map-marker::before{content:'\e007'}.evf-icon-flag::before{content:'\e00a'}.evf-icon-first-name::before{content:'\e00d'}.evf-icon-last-name::before{content:'\e00e'}.evf-icon-text::before{content:'\e00f'}.evf-icon-paragraph::before{content:'\e010'}.evf-icon-dropdown::before{content:'\e011'}.evf-icon-checkbox::before{content:'\e012'}.evf-icon-multiple-choices::before{content:'\e013'}.evf-icon-multiple-choices-radio::before{content:'\e014'}.evf-icon-number::before{content:'\e015'}.evf-icon-website::before{content:'\e016'}.evf-icon-calendar::before{content:'\e017'}.evf-icon-single-item::before{content:'\e018'}.evf-icon-file-upload::before{content:'\e019'}.evf-icon-hidden::before{content:'\e01a'}.evf-icon-phone::before{content:'\e01b'}.evf-icon-custom-html::before{content:'\e01c'}.evf-icon-section-divider::before{content:'\e01d'}.evf-icon-payment::before{content:'\e01f'}.evf-icon-total::before{content:'\e020'}.evf-icon-subtotal::before{content:'\e020'}.evf-icon-img-upload::before{content:'\e022'}.evf-icon-star::before{content:'\e024'}.evf-icon-likert::before{content:'\e025'}.evf-icon-scale-rating::before{content:'\e026'}.evf-icon-signature::before{content:'\e028'}.evf-icon-privacy-policy::before{content:'\e02c'}.evf-icon-repeater::before{content:'\e032'}.evf-icon-range-slider::before{content:'\e02b'}.evf-icon-divider::before{content:'\e031'}.evf-icon-wysiwyg::before{content:'\e901'}.evf-icon-eye::before{content:'\e903'}.evf-icon-coupon::before{content:'\e904'}.evf-icon-yes-no::before{content:'\e905'}.evf-icon-reset::before{content:'\e907'}.evf-icon-progress::before{content:'\e908'}.evf-icon-color::before{content:'\e909'}
assets/css/menu.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:EverestForms;src:url("../fonts/EverestForms.eot?q9mcqj");src:url("../fonts/EverestForms.eot?q9mcqj#iefix") format("embedded-opentype"),url("../fonts/EverestForms.ttf?q9mcqj") format("truetype"),url("../fonts/EverestForms.woff?q9mcqj") format("woff"),url("../fonts/EverestForms.svg?q9mcqj#EverestForms") format("svg");font-weight:400;font-style:normal;font-display:block}.evf-icon{padding:8px;border-radius:4px}.evf-icon *{display:block}.evf-h2{font-size:28px;font-weight:600}.evf-text-center{text-align:center}#evf-modal-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-left:-250px;margin-top:-125px;position:fixed;top:50%;left:50%;z-index:100105;transition:height .2s,margin-top .2s}#evf-modal-wrap #evf-modal{height:100%;position:relative}#evf-modal-wrap #evf-modal #evf-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;top:0;right:0;left:0}#evf-modal-wrap #evf-modal #evf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#evf-modal-wrap #evf-modal #evf-modal-close:focus,#evf-modal-wrap #evf-modal #evf-modal-close:hover{color:#2ea2cc}#evf-modal-wrap #evf-modal #evf-modal-close:focus{outline:0;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#evf-modal-wrap #evf-modal #evf-modal-close::before{content:'\f158';font:normal 20px/36px dashicons;vertical-align:top;speak:none;width:36px;height:36px}#evf-modal-wrap #evf-modal #evf-modal-inner{padding:0 16px 50px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-notice{padding:10px;color:#31708f;background-color:#d9edf7;border:1px solid #bce8f1}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options{padding:8px 0 12px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options .evf-modal-inline{margin:0;padding:0 20px 0 0;display:inline-block}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options #evf-modal-select-form{max-width:100%;margin-bottom:1em}#evf-modal-wrap #evf-modal .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;left:0;right:0}#evf-modal-wrap #evf-modal .submitbox #evf-modal-cancel{float:left;line-height:25px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update{float:right;line-height:23px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update #evf-modal-submit{float:right;margin-bottom:0}#evf-modal-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100100}@media screen and (max-width:782px){#evf-modal-wrap{height:280px;margin-top:-140px}#evf-modal-inner{padding:0 16px 60px}#evf-modal-cancel{line-height:32px}}@media screen and (max-width:520px){#evf-modal-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height:520px){#evf-modal-wrap{transition:none}}@media screen and (max-height:290px){#evf-modal-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#evf-modal-inner{overflow:auto;height:calc(100% - 92px);padding-bottom:2px}}[class*=' evf-icon-'],[class^=evf-icon-]{font-family:EverestForms!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;-webkit-font-feature-settings:'liga';-ms-font-feature-settings:'liga' 1;font-feature-settings:'liga';-webkit-font-variant-ligatures:discretionary-ligatures;font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.evf-icon-captcha::before{content:'\e004'}.evf-icon-password::before{content:'\e004'}.evf-icon-email::before{content:'\e005'}.evf-icon-map-marker::before{content:'\e007'}.evf-icon-flag::before{content:'\e00a'}.evf-icon-first-name::before{content:'\e00d'}.evf-icon-last-name::before{content:'\e00e'}.evf-icon-text::before{content:'\e00f'}.evf-icon-paragraph::before{content:'\e010'}.evf-icon-dropdown::before{content:'\e011'}.evf-icon-checkbox::before{content:'\e012'}.evf-icon-multiple-choices::before{content:'\e013'}.evf-icon-multiple-choices-radio::before{content:'\e014'}.evf-icon-number::before{content:'\e015'}.evf-icon-website::before{content:'\e016'}.evf-icon-calendar::before{content:'\e017'}.evf-icon-single-item::before{content:'\e018'}.evf-icon-file-upload::before{content:'\e019'}.evf-icon-hidden::before{content:'\e01a'}.evf-icon-phone::before{content:'\e01b'}.evf-icon-custom-html::before{content:'\e01c'}.evf-icon-section-divider::before{content:'\e01d'}.evf-icon-payment::before{content:'\e01f'}.evf-icon-total::before{content:'\e020'}.evf-icon-img-upload::before{content:'\e022'}.evf-icon-star::before{content:'\e024'}.evf-icon-likert::before{content:'\e025'}.evf-icon-scale-rating::before{content:'\e026'}.evf-icon-signature::before{content:'\e028'}.evf-icon-privacy-policy::before{content:'\e02c'}.evf-icon-repeater::before{content:'\e032'}.evf-icon-range-slider::before{content:'\e02b'}.evf-icon-divider::before{content:'\e031'}.evf-icon-wysiwyg::before{content:'\e901'}.evf-icon-eye::before{content:'\e903'}.evf-icon-coupon::before{content:'\e904'}.evf-icon-yes-no::before{content:'\e905'}.evf-icon-reset::before{content:'\e907'}.evf-icon-progress::before{content:'\e908'}.evf-icon-color::before{content:'\e909'}
1
+ @font-face{font-family:EverestForms;src:url("../fonts/EverestForms.eot?q9mcqj");src:url("../fonts/EverestForms.eot?q9mcqj#iefix") format("embedded-opentype"),url("../fonts/EverestForms.ttf?q9mcqj") format("truetype"),url("../fonts/EverestForms.woff?q9mcqj") format("woff"),url("../fonts/EverestForms.svg?q9mcqj#EverestForms") format("svg");font-weight:400;font-style:normal;font-display:block}.evf-icon{padding:8px;border-radius:4px}.evf-icon *{display:block}.evf-h2{font-size:28px;font-weight:600}.evf-text-center{text-align:center}#evf-modal-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-left:-250px;margin-top:-125px;position:fixed;top:50%;left:50%;z-index:100105;transition:height .2s,margin-top .2s}#evf-modal-wrap #evf-modal{height:100%;position:relative}#evf-modal-wrap #evf-modal #evf-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;top:0;right:0;left:0}#evf-modal-wrap #evf-modal #evf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#evf-modal-wrap #evf-modal #evf-modal-close:focus,#evf-modal-wrap #evf-modal #evf-modal-close:hover{color:#2ea2cc}#evf-modal-wrap #evf-modal #evf-modal-close:focus{outline:0;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#evf-modal-wrap #evf-modal #evf-modal-close::before{content:'\f158';font:normal 20px/36px dashicons;vertical-align:top;speak:none;width:36px;height:36px}#evf-modal-wrap #evf-modal #evf-modal-inner{padding:0 16px 50px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-notice{padding:10px;color:#31708f;background-color:#d9edf7;border:1px solid #bce8f1}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options{padding:8px 0 12px}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options .evf-modal-inline{margin:0;padding:0 20px 0 0;display:inline-block}#evf-modal-wrap #evf-modal #evf-modal-inner #evf-modal-options #evf-modal-select-form{max-width:100%;margin-bottom:1em}#evf-modal-wrap #evf-modal .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;left:0;right:0}#evf-modal-wrap #evf-modal .submitbox #evf-modal-cancel{float:left;line-height:25px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update{float:right;line-height:23px}#evf-modal-wrap #evf-modal .submitbox #evf-modal-update #evf-modal-submit{float:right;margin-bottom:0}#evf-modal-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100100}@media screen and (max-width:782px){#evf-modal-wrap{height:280px;margin-top:-140px}#evf-modal-inner{padding:0 16px 60px}#evf-modal-cancel{line-height:32px}}@media screen and (max-width:520px){#evf-modal-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height:520px){#evf-modal-wrap{transition:none}}@media screen and (max-height:290px){#evf-modal-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#evf-modal-inner{overflow:auto;height:calc(100% - 92px);padding-bottom:2px}}[class*=' evf-icon-'],[class^=evf-icon-]{font-family:EverestForms!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;-webkit-font-feature-settings:'liga';-ms-font-feature-settings:'liga' 1;font-feature-settings:'liga';-webkit-font-variant-ligatures:discretionary-ligatures;font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.evf-icon-captcha::before{content:'\e004'}.evf-icon-password::before{content:'\e004'}.evf-icon-email::before{content:'\e005'}.evf-icon-map-marker::before{content:'\e007'}.evf-icon-flag::before{content:'\e00a'}.evf-icon-first-name::before{content:'\e00d'}.evf-icon-last-name::before{content:'\e00e'}.evf-icon-text::before{content:'\e00f'}.evf-icon-paragraph::before{content:'\e010'}.evf-icon-dropdown::before{content:'\e011'}.evf-icon-checkbox::before{content:'\e012'}.evf-icon-multiple-choices::before{content:'\e013'}.evf-icon-multiple-choices-radio::before{content:'\e014'}.evf-icon-number::before{content:'\e015'}.evf-icon-website::before{content:'\e016'}.evf-icon-calendar::before{content:'\e017'}.evf-icon-single-item::before{content:'\e018'}.evf-icon-file-upload::before{content:'\e019'}.evf-icon-hidden::before{content:'\e01a'}.evf-icon-phone::before{content:'\e01b'}.evf-icon-custom-html::before{content:'\e01c'}.evf-icon-section-divider::before{content:'\e01d'}.evf-icon-payment::before{content:'\e01f'}.evf-icon-total::before{content:'\e020'}.evf-icon-subtotal::before{content:'\e020'}.evf-icon-img-upload::before{content:'\e022'}.evf-icon-star::before{content:'\e024'}.evf-icon-likert::before{content:'\e025'}.evf-icon-scale-rating::before{content:'\e026'}.evf-icon-signature::before{content:'\e028'}.evf-icon-privacy-policy::before{content:'\e02c'}.evf-icon-repeater::before{content:'\e032'}.evf-icon-range-slider::before{content:'\e02b'}.evf-icon-divider::before{content:'\e031'}.evf-icon-wysiwyg::before{content:'\e901'}.evf-icon-eye::before{content:'\e903'}.evf-icon-coupon::before{content:'\e904'}.evf-icon-yes-no::before{content:'\e905'}.evf-icon-reset::before{content:'\e907'}.evf-icon-progress::before{content:'\e908'}.evf-icon-color::before{content:'\e909'}
assets/css/menu.scss CHANGED
@@ -295,6 +295,9 @@
295
  &total::before {
296
  content: '\e020';
297
  }
 
 
 
298
  &img-upload::before {
299
  content: '\e022';
300
  }
295
  &total::before {
296
  content: '\e020';
297
  }
298
+ &subtotal::before {
299
+ content: '\e020';
300
+ }
301
  &img-upload::before {
302
  content: '\e022';
303
  }
assets/js/admin/form-builder.js CHANGED
@@ -41,6 +41,22 @@
41
  },
42
  });
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $( '.everest-forms-row-option select.evf-field-show-hide' ).each( function() {
45
  $(this).find( '[selected="selected"]').prop( 'selected', true );
46
  });
@@ -1100,7 +1116,12 @@
1100
  $( '#everest-forms-field-option-' + id + '-enable_min_max' ).parent().show();
1101
  //Check if min max date enabled.
1102
  if( $('#everest-forms-field-option-' + id + '-enable_min_max' ).prop( 'checked' ) ) {
1103
- $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-option').removeClass('everest-forms-hidden');
 
 
 
 
 
1104
  }
1105
  $('#everest-forms-field-option-' + id + '-time_interval' ).show();
1106
  $('#everest-forms-field-option-' + id + '-enable_min_max_time').hide();
@@ -1118,6 +1139,8 @@
1118
  $('#everest-forms-field-option-row-' + id + '-placeholder').hide();
1119
  $('#everest-forms-field-option-' + id + '-enable_min_max').parent().hide();
1120
  $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-option').addClass( 'everest-forms-hidden' );
 
 
1121
  $('#everest-forms-field-option-' + id + '-disable_dates' ).hide();
1122
  $('label[for=everest-forms-field-option-' + id + '-disable_dates]').hide();
1123
  $('.everest-forms-field-option-row-date_format .everest-forms-checklist' ).hide();
@@ -2655,7 +2678,7 @@
2655
  },
2656
 
2657
  paymentFieldAppendToDropdown: function( dragged_field_id, field_type ){
2658
- if('payment-quantity' === field_type || 'payment-coupon' === field_type ) {
2659
  var match_fields = [ 'payment-checkbox', 'payment-multiple', 'payment-single', 'range-slider' ],
2660
  qty_dropdown = $('#everest-forms-field-option-' + dragged_field_id + '-map_field');
2661
  match_fields.forEach(function(single_field){
@@ -3032,32 +3055,55 @@ jQuery( function ( $ ) {
3032
  $( document ).on( 'click', '.everest-forms-min-max-date-format input', function() {
3033
  var minDate = $( this ).closest( '.everest-forms-date' ).find( '.everest-forms-min-date' ).val();
3034
  var maxDate = $(this).closest('.everest-forms-date').find('.everest-forms-min-date').val();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3035
  if ( $( this ).is( ':checked' ) ) {
3036
- $( '.everest-forms-min-max-date-option' ).removeClass( 'everest-forms-hidden' );
3037
- if( '' === minDate ){
3038
- $('.everest-forms-min-date').addClass('flatpickr-field').flatpickr({
3039
- disableMobile : true,
3040
- onChange : function(selectedDates, dateStr, instance) {
3041
- $( '.everest-forms-min-date' ).val(dateStr);
3042
- },
3043
- onOpen: function(selectedDates, dateStr, instance) {
3044
- instance.set('maxDate', $('.everest-forms-max-date').val());
3045
- },
3046
- });
3047
- }
3048
- if('' === maxDate ){
3049
- $( '.everest-forms-max-date' ).addClass( 'flatpickr-field' ).flatpickr({
3050
- disableMobile : true,
3051
- onChange : function(selectedDates, dateStr, instance) {
3052
- $( '.everest-forms-max-date' ).val(dateStr);
3053
- },
3054
- onOpen: function(selectedDates, dateStr, instance) {
3055
- instance.set('minDate', $( '.everest-forms-min-date' ).val());
3056
- },
3057
- });
3058
- }
3059
  } else {
3060
- $( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
 
3061
  }
3062
  });
3063
 
41
  },
42
  });
43
  }
44
+
45
+ $( '.everest-forms-min-max-date-format' ).each( function () {
46
+ if( $( this ).find( 'input[type="checkbox"]' ).is( ':checked' ) ) {
47
+ $( this ).next( '.everest-forms-min-max-date-range-format' ).removeClass( 'everest-forms-hidden' );
48
+ $( this ).next().next( '.everest-forms-min-max-date-option' ).removeClass( 'everest-forms-hidden' );
49
+ if( $( this ).next( '.everest-forms-min-max-date-range-format' ).find( 'input[type="checkbox"]' ).is( ':checked' ) ) {
50
+ $( this ).next().next().next( '.everest-forms-min-max-date-range-option' ).removeClass( 'everest-forms-hidden' );
51
+ $( this ).next().next( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
52
+ }
53
+ } else {
54
+ $( this ).next().next().next( '.everest-forms-min-max-date-range-option' ).addClass( 'everest-forms-hidden' );
55
+ $( this ).next( '.everest-forms-min-max-date-range-format' ).addClass( 'everest-forms-hidden' );
56
+ $( this ).next().next( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
57
+ }
58
+ } );
59
+
60
  $( '.everest-forms-row-option select.evf-field-show-hide' ).each( function() {
61
  $(this).find( '[selected="selected"]').prop( 'selected', true );
62
  });
1116
  $( '#everest-forms-field-option-' + id + '-enable_min_max' ).parent().show();
1117
  //Check if min max date enabled.
1118
  if( $('#everest-forms-field-option-' + id + '-enable_min_max' ).prop( 'checked' ) ) {
1119
+ $('#everest-forms-field-option-' + id + '-set_date_range' ).parent().show();
1120
+ if ( $('#everest-forms-field-option-' + id + '-set_date_range' ).prop( 'checked' ) ) {
1121
+ $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-range-option').removeClass('everest-forms-hidden');
1122
+ } else {
1123
+ $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-option').removeClass('everest-forms-hidden');
1124
+ }
1125
  }
1126
  $('#everest-forms-field-option-' + id + '-time_interval' ).show();
1127
  $('#everest-forms-field-option-' + id + '-enable_min_max_time').hide();
1139
  $('#everest-forms-field-option-row-' + id + '-placeholder').hide();
1140
  $('#everest-forms-field-option-' + id + '-enable_min_max').parent().hide();
1141
  $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-option').addClass( 'everest-forms-hidden' );
1142
+ $('#everest-forms-field-option-' + id + '-set_date_range').parent().hide();
1143
+ $('#everest-forms-field-option-row-' + id + '-date_format .everest-forms-min-max-date-range-option').addClass( 'everest-forms-hidden' );
1144
  $('#everest-forms-field-option-' + id + '-disable_dates' ).hide();
1145
  $('label[for=everest-forms-field-option-' + id + '-disable_dates]').hide();
1146
  $('.everest-forms-field-option-row-date_format .everest-forms-checklist' ).hide();
2678
  },
2679
 
2680
  paymentFieldAppendToDropdown: function( dragged_field_id, field_type ){
2681
+ if('payment-quantity' === field_type || 'payment-coupon' === field_type || 'payment-subtotal' === field_type ) {
2682
  var match_fields = [ 'payment-checkbox', 'payment-multiple', 'payment-single', 'range-slider' ],
2683
  qty_dropdown = $('#everest-forms-field-option-' + dragged_field_id + '-map_field');
2684
  match_fields.forEach(function(single_field){
3055
  $( document ).on( 'click', '.everest-forms-min-max-date-format input', function() {
3056
  var minDate = $( this ).closest( '.everest-forms-date' ).find( '.everest-forms-min-date' ).val();
3057
  var maxDate = $(this).closest('.everest-forms-date').find('.everest-forms-min-date').val();
3058
+
3059
+ if ( $( this ).is( ':checked' ) ) {
3060
+ var setDateRange = $( this ).parent().next( '.everest-forms-min-max-date-range-format' );
3061
+ if( setDateRange.find( 'input[type="checkbox"]' ).is( ':checked' ) ) {
3062
+ setDateRange.next( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
3063
+ setDateRange.next().next( '.everest-forms-min-max-date-range-option' ).removeClass( 'everest-forms-hidden' );
3064
+ } else {
3065
+ setDateRange.next( '.everest-forms-min-max-date-option' ).removeClass( 'everest-forms-hidden' );
3066
+ setDateRange.next().next( '.everest-forms-min-max-date-range-option' ).addClass( 'everest-forms-hidden' );
3067
+ }
3068
+
3069
+ $( this ).parent().next( '.everest-forms-min-max-date-range-format' ).removeClass( 'everest-forms-hidden' );
3070
+
3071
+ if( '' === minDate ){
3072
+ $('.everest-forms-min-date').addClass('flatpickr-field').flatpickr({
3073
+ disableMobile : true,
3074
+ onChange : function(selectedDates, dateStr, instance) {
3075
+ $( '.everest-forms-min-date' ).val(dateStr);
3076
+ },
3077
+ onOpen: function(selectedDates, dateStr, instance) {
3078
+ instance.set('maxDate', $('.everest-forms-max-date').val());
3079
+ },
3080
+ });
3081
+ }
3082
+ if('' === maxDate ){
3083
+ $( '.everest-forms-max-date' ).addClass( 'flatpickr-field' ).flatpickr({
3084
+ disableMobile : true,
3085
+ onChange : function(selectedDates, dateStr, instance) {
3086
+ $( '.everest-forms-max-date' ).val(dateStr);
3087
+ },
3088
+ onOpen: function(selectedDates, dateStr, instance) {
3089
+ instance.set('minDate', $( '.everest-forms-min-date' ).val());
3090
+ },
3091
+ });
3092
+ }
3093
+ } else {
3094
+ $( this ).parent().next().next( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
3095
+ $( this ).parent().next().next().next( '.everest-forms-min-max-date-range-option' ).addClass( 'everest-forms-hidden' );
3096
+ $( this ).parent().next( '.everest-forms-min-max-date-range-format' ).addClass( 'everest-forms-hidden' );
3097
+ }
3098
+ });
3099
+
3100
+ $( document ).on( 'click', '.everest-forms-min-max-date-range-format input[type="checkbox"]', function() {
3101
  if ( $( this ).is( ':checked' ) ) {
3102
+ $( this ).parent().next( '.everest-forms-min-max-date-option' ).addClass( 'everest-forms-hidden' );
3103
+ $( this ).parent().next().next( '.everest-forms-min-max-date-range-option' ).removeClass( 'everest-forms-hidden' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3104
  } else {
3105
+ $( this ).parent().next( '.everest-forms-min-max-date-option' ).removeClass( 'everest-forms-hidden' );
3106
+ $( this ).parent().next().next( '.everest-forms-min-max-date-range-option' ).addClass( 'everest-forms-hidden' );
3107
  }
3108
  });
3109
 
assets/js/admin/form-builder.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(p,c){var a,m={init:function(){p(document).ready(function(e){e("evf-panel-integrations-button a").hasClass("active")||(e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").first().addClass("active"),e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").hasClass("active")&&e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").next(".everest-forms-active-connections").first().addClass("active"),e(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active"))}),p(document).ready(function(o){"1"===o(".everest-forms-min-max-date-format input").val()&&(o(".everest-forms-min-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){o(".everest-forms-min-date").val(t)},onOpen:function(e,t,i){i.set("maxDate",o(".everest-forms-max-date").val())}}),o(".everest-forms-max-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){o(".everest-forms-max-date").val(t)},onOpen:function(e,t,i){i.set("minDate",o(".everest-forms-min-date").val())}})),o(".everest-forms-row-option select.evf-field-show-hide").each(function(){o(this).find('[selected="selected"]').prop("selected",!0)})}),p("evf-panel-payments-button a").hasClass("active")||(p("#everest-forms-panel-payments").find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-payment-setting-content").first().addClass("active")),p(document.body).find("#copy-shortcode").on("click",this.copyShortcode).on("aftercopy",this.copySuccess).on("aftercopyfailure",this.copyFail),p(document.body).find(".evf-copy-shortcode").each(function(){p(this).on("click",m.copyShortcode).on("aftercopy",m.copySuccess).on("aftercopyfailure",m.copyFail)}),p(document).ready(m.ready),p(window).on("load",m.load),p(document.body).on("evf-init-builder-fields",function(){m.bindFields()}).trigger("evf-init-builder-fields"),p(document.body).on("adjust_builder_width",function(){var e=p("#adminmenuwrap").width();p("#everest-forms-builder-form").css({width:"calc(100% - "+e+"px)"})}).trigger("adjust_builder_width"),p(document.body).on("click","#collapse-button",function(){p("#everest-forms-builder-form").width(""),p(document.body).trigger("adjust_builder_width")}),p(window).on("resize orientationchange",function(){clearTimeout(void 0),setTimeout(function(){p("#everest-forms-builder").width(""),p(document.body).trigger("adjust_builder_width")},250)}).trigger("resize")},copyShortcode:function(e){evfClearClipboard(),evfSetClipboard(p(this).closest(".evf-shortcode-field").find("input").val(),p(this)),e.preventDefault()},copySuccess:function(){p(this).tooltipster("content",p(this).attr("data-copied")).trigger("mouseenter").on("mouseleave",function(){var e=p(this);setTimeout(function(){e.tooltipster("content",e.attr("data-tip"))},1e3)})},copyFail:function(){p(this).closest(".evf-shortcode-field").find("input").focus().select()},load:function(){p(".everest-forms-overlay").fadeOut()},ready:function(){var e,t;a=p("#everest-forms-builder"),m.bindUIActions(),m.bindEditActions(),jconfirm.defaults={closeIcon:!0,backgroundDismiss:!0,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"400px",columnClass:"evf-responsive-class"},"undefined"!=typeof PerfectScrollbar&&(e=p(".everest-forms-tab-content"),t=p(".everest-forms-panel"),1<=e.length&&(window.evf_tab_scroller=new PerfectScrollbar(".everest-forms-tab-content",{suppressScrollX:!0})),t.each(function(){var e=p(this),t=e.attr("id");1<=e.find(".everest-forms-panel-sidebar").length&&(window.evf_setting_scroller=new PerfectScrollbar("#"+t+" .everest-forms-panel-sidebar"))})),a.on("change",".everest-forms-field-option-row-limit_enabled input",function(e){m.updateTextFieldsLimitControls(p(e.target).parents(".everest-forms-field-option-row-limit_enabled").data().fieldId,e.target.checked)}),a.on("change",".everest-forms-field-option-row-min_length_enabled input",function(e){m.updateTextFieldsMinLengthControls(p(e.target).parents(".everest-forms-field-option-row-min_length_enabled").data().fieldId,e.target.checked)}),a.on("change",".everest-forms-field-option-select .everest-forms-field-option-row-enhanced_select input",function(e){m.enhancedSelectFieldStyle(p(e.target).parents(".everest-forms-field-option-row-enhanced_select").data().fieldId,e.target.checked)}),a.on("click",".everest-forms-field-option-row-choices .everest-forms-btn-group span",function(e){var t;p(this).hasClass("upgrade-modal")&&"checkbox"===p(this).data("type")?(p(this).parent().find("span").addClass("is-active"),p(this).removeClass("is-active"),m.updateEnhandedSelectField(p(e.target).parents(".everest-forms-field-option-row-choices").data().fieldId,!1)):(p(this).parent().find("span").removeClass("is-active"),p(this).addClass("is-active"),m.updateEnhandedSelectField(p(e.target).parents(".everest-forms-field-option-row-choices").data().fieldId,"multiple"===p(this).data("selection"))),"multiple"===p(this).data("selection")&&"checkbox"===p(this).data("type")&&p(this).hasClass("is-active")?(t=p(this).parent().parent().data("field-id"),p("#everest-forms-field-option-row-"+t+"-select_all").show()):(t=p(this).parent().parent().data("field-id"),p("#everest-forms-field-option-row-"+t+"-select_all").hide())}),p(document.body).on("click",'.everest-forms-field, .everest-forms-field-select[data-field-type="select"]',function(){a.find(".everest-forms-field-option-row-choices .everest-forms-btn-group span").each(function(){var e=p(this).parent().parent().data("field-id");"multiple"===p(this).data("selection")&&"checkbox"===p(this).data("type")&&p(this).hasClass("is-active")?p("#everest-forms-field-option-"+e+"-select_all").parent().show():p("#everest-forms-field-option-"+e+"-select_all").parent().hide()})}),a.on("keyup",".everest-forms-search-fields",function(){var t=p(this).val().toLowerCase();p(".evf-registered-item").each(function(){var e=p(this);field_type=e.data("field-type"),field_label=e.text().toLowerCase(),-1<field_type.search(t)||-1<field_label.search(t)?(e.addClass("evf-searched-item"),e.show()):(e.removeClass("evf-searched-item"),e.hide())}),p(".everest-forms-add-fields-group").each(function(){p(this).find(".evf-registered-item.evf-searched-item").length<=0?p(this).hide():p(this).show()}),p(".evf-registered-item.evf-searched-item").length?p(".everest-forms-fields-not-found").addClass("hidden"):p(".everest-forms-fields-not-found").removeClass("hidden")}),p(document).trigger("everest_forms_ready")},updateTextFieldsLimitControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-limit_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-limit_controls").addClass("everest-forms-hidden")},updateTextFieldsMinLengthControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-min_length_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-min_length_controls").addClass("everest-forms-hidden")},enhancedSelectFieldStyle:function(e,t){var i=p("#everest-forms-field-"+e+" .primary-input"),e=p("#everest-forms-field-option-"+e+"-enhanced_select").is(":checked");t&&e&&i.prop("multiple")?(i.addClass("evf-enhanced-select"),p(document.body).trigger("evf-enhanced-select-init")):(i.removeClass("evf-enhanced-select enhanced"),i.filter(".select2-hidden-accessible").selectWoo("destroy"))},updateEnhandedSelectField:function(e,t){var i=p("#everest-forms-field-"+e+" .primary-input"),o=i.find(".placeholder"),s=p("#everest-forms-field-option-"+e+"-multiple_choices"),n=p("#everest-forms-field-option-row-"+e+"-choices input.default"),r=n.filter(":checked");s.val(t?1:0),i.prop("multiple",t),n.prop("type",t?"checkbox":"radio"),!t&&r.length&&(n.prop("checked",!1),p(r.get(0)).prop("checked",!0)),o.length&&t&&o.prop("selected",!t),m.enhancedSelectFieldStyle(e,t)},bindUIActions:function(){m.bindDefaultTabs(),m.checkEmptyGrid(),m.bindFields(),m.bindFormPreview(),m.bindFormPreviewWithKeyEvent(),m.bindFormEntriesWithKeyEvent(),m.bindGridSwitcher(),m.bindFieldSettings(),m.bindFieldDelete(),m.bindFieldDeleteWithKeyEvent(),m.bindCloneField(),m.bindSaveOption(),m.bindSaveOptionWithKeyEvent(),m.bindOpenShortcutKeysModalWithKeyEvent(),m.bindAddNewRow(),m.bindRemoveRow(),m.bindFormSettings(),m.bindFormEmail(),m.bindFormSmsNotifications(),m.bindFormConversational(),m.bindFormIntegrations(),m.bindFormPayment(),m.choicesInit(),m.bindToggleHandleActions(),m.bindLabelEditInputActions(),m.bindSyncedInputActions(),m.init_datepickers(),m.bindBulkOptionActions(),m.bindUIActionsFields(),"field-options"===c.tab&&p(".evf-panel-field-options-button").trigger("click"),p(document.body).on("everest-forms-field-drop",".evf-registered-buttons .evf-registered-item",function(){m.fieldDrop(p(this).clone())})},bindBulkOptionActions:function(){p(document.body).on("click",".evf-toggle-bulk-options",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-add_bulk_options").slideToggle()}),p(document.body).on("click",".evf-toggle-presets-list",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row .evf-options-presets").slideToggle()}),p(document.body).on("click",".evf-add-bulk-options",function(e){var t,i=p(this).closest(".everest-forms-field-option-row"),o=i.data("field-id");i.length&&(t=i.closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices .evf-choices-list"),i=(o=i.find("textarea#everest-forms-field-option-"+o+"-add_bulk_options")).val().split("\n"),m.addBulkOptions(i,t),o.val(""))}),p(document.body).on("click",".evf-options-preset-label",function(e){var t,i=p(this).closest(".everest-forms-field-option-row"),o=i.data("field-id");i.length&&(t=p(this).closest(".evf-options-preset").find(".evf-options-preset-value").val(),i.find("textarea#everest-forms-field-option-"+o+"-add_bulk_options").val(t),p(this).closest(".evf-options-presets").slideUp())}),p(document.body).on("click",".everest-forms-field-option-row-password_strength",function(){p(this).find('[type="checkbox"]:first').prop("checked")&&p(this).next().find('[type="checkbox"]:first').prop("checked",!1)}),p(document.body).on("click",".everest-forms-field-option-row-password_validation",function(){p(this).find('[type="checkbox"]:first').prop("checked")&&(p(this).prev().find('[type="checkbox"]:first').prop("checked",!1),p(this).prev().find(".everest-forms-inner-options").addClass("everest-forms-hidden"))})},addBulkOptions:function(e,i){e.forEach(function(e){var t;""!==e&&(t=i.find("li").last().find("a.add"),m.choiceAdd(null,t,e.trim()))})},init_datepickers:function(){var e=p(".everest-forms-disable-dates").data("date-format");p(".everest-forms-disable-dates").each(function(){p(this).get(0)._flatpickr||p(this).flatpickr({dateFormat:e,mode:"multiple"})}),p(document.body).on("change",".evf-date-format",function(e){var t=p(".everest-forms-field-option:visible .everest-forms-disable-dates"),i=t.get(0)._flatpickr,o=i.selectedDates,s=p(this).val(),n=[];o.forEach(function(e){n.push(flatpickr.formatDate(e,s))}),i.set("dateFormat",s),t.val(n.join(", "))}),p(document.body).on("click",".evf-clear-disabled-dates",function(){p(".everest-forms-field-option:visible .everest-forms-disable-dates").get(0)._flatpickr.clear()}),p(".everest-forms-field-date-time").each(function(){var e=p(this).attr("data-field-id");m.dateSettingToggler(e,p("#everest-forms-field-option-"+e+"-datetime_style").val())})},bindEditActions:function(){p("#edit-form-name").on("click",function(e){e.stopPropagation(),""!==p("#evf-edit-form-name").val().trim()&&m.toggleEditTitle(e)}),p("#evf-edit-form-name").on("change keypress",function(e){var t=p(this);e.stopPropagation(),13===e.which&&""!==p(this).val().trim()&&m.toggleEditTitle(e),""!==t.val().trim()&&p("#everest-forms-panel-field-settings-form_title").val(t.val().trim())}).on("click",function(e){e.stopPropagation()}),p(document).not(p(".everest-forms-title-desc")).on("click",function(e){var t=p("#evf-edit-form-name");e.stopPropagation(),!t.prop("disabled")&&t.val()&&""!==t.val().trim()&&m.toggleEditTitle(e)})},toggleEditTitle:function(e){var t=p("#edit-form-name").siblings("#evf-edit-form-name");e.preventDefault(),t.prop("disabled",function(e,t){return!t}),t.hasClass("everst-forms-name-editing")||t.focus(),t.toggleClass("everst-forms-name-editing")},formObject:function(e){for(var t=jQuery(e).find("[name]"),i={},o={},s=0;s<t.length;s++){var n=jQuery(t[s]),r=n.prop("name").replace(/\]/gi,"").split("["),a=n.val(),d={};if(!n.is(":radio")&&!n.is(":checkbox")||n.is(":checked")){for(var l=r.length-1;0<=l;l--){var f=r[l];if(0===(f=void 0===f?"":f).length&&(d=[],"undefined"==typeof o[r[l-1]]?o[r[l-1]]=0:o[r[l-1]]+=1,f=o[r[l-1]]),l===r.length-1){if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if(isNaN(parseFloat(a))||parseFloat(a).toString()!==a)if("string"!=typeof a||"{"!==a.substr(0,1)&&"["!==a.substr(0,1)){if("object"==typeof a&&a.length&&n.is("select")){for(var c={},l=0;l<a.length;l++)c["n"+l]=a[l];a=c}}else try{a=JSON.parse(a)}catch(v){}else a=parseFloat(a);d[f]=a}else{var m=d;(d={})[f]=m}}p.extend(!0,i,d)}}return i},bindUIActionsFields:function(){a.on("click",".everest-forms-field-option-row-choices .add",function(e){m.choiceAdd(e,p(this))}),a.on("click",".everest-forms-field-option-row-choices .remove",function(e){m.choiceDelete(e,p(this))}),a.on("mousedown",".everest-forms-field-option-row-choices input[type=radio]",function(){var e=p(this);e.is(":checked")?e.attr("data-checked","1"):e.attr("data-checked","0")}),a.on("click",".everest-forms-field-option-row-choices input[type=radio]",function(){var e=p(this),t=e.parent().parent();e.parent().parent().find("input[type=radio]").not(this).prop("checked",!1),"1"===e.attr("data-checked")&&(e.prop("checked",!1),e.attr("data-checked","0")),m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("change",".everest-forms-field-option-row-choices input[type=checkbox]",function(e){var t=p(this).parent().parent();m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("keyup paste focusout",".everest-forms-field-option-row-choices input.label, .everest-forms-field-option-row-choices input.value",function(e){var t=p(this).parent().parent().parent();m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("change",".everest-forms-field-option-row-show_values input",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices ul").toggleClass("show-values")}),a.on("change",".everest-forms-field-option-row-choices_images input",function(){var e=p(this),t=e.parent().data("field-id"),i=p("#everest-forms-field-option-"+t),o=p("#everest-forms-field-option-"+t+"-input_columns"),s=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();e.parent().find(".notice").toggleClass("hidden"),i.find(".everest-forms-field-option-row-choices ul").toggleClass("show-images"),(e.is(":checked")?o.val("inline"):o.val("")).trigger("change"),m.choiceUpdate(s,t)}),a.on("click",".everest-forms-attachment-media-view .upload-button",function(e){var t,i,o=p(this);e.preventDefault(),i||(i=wp.media.frames.everestforms_media_frame=wp.media({title:c.i18n_upload_image_title,className:"media-frame everest-forms-media-frame",frame:"select",multiple:!1,library:{type:"image"},button:{text:c.i18n_upload_image_button}})).on("select",function(){var e=i.state().get("selection").first().toJSON();(t=o.hasClass("button-add-media")?(o.hide(),o.parent()):o.parent().parent().parent()).find(".source").val(e.url),t.find(".attachment-thumb").remove(),t.find(".thumbnail-image").prepend('<img class="attachment-thumb" src="'+e.url+'">'),t.find(".actions").show(),a.trigger("everestFormsImageUploadAdd",[o,t])}),i.open()}),a.on("click",".everest-forms-attachment-media-view .remove-button",function(e){e.preventDefault();e=p(this).parent().parent();e.find(".attachment-thumb").remove(),e.parent().find(".source").val(""),e.parent().find(".button-add-media").show(),a.trigger("everestFormsImageUploadRemove",[p(this),e])}),a.on("everestFormsImageUploadAdd everestFormsImageUploadRemove",function(e,t,i){var i=i.closest(".evf-choices-list"),o=i.data("field-type"),i=i.data("field-id");m.choiceUpdate(o,i)}),a.on("change",".everest-forms-field-option-row-input_columns select",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id"),i="";"inline"===t?i="everest-forms-list-inline":""!==t&&(i="everest-forms-list-"+t+"-columns"),p("#everest-forms-field-"+e).removeClass("everest-forms-list-inline everest-forms-list-2-columns everest-forms-list-3-columns").addClass(i)}),a.on("click",".everest-forms-fields-tab a",function(e){e.preventDefault(),m.fieldTabChoice(p(this).attr("id"))}),p(document).on("mouseenter",'.everest-forms-tabs li[class*="part_"]',function(){!1===p(this).hasClass("active")&&(p(document).find(".everest-forms-field").hasClass("ui-sortable-helper")||p(document).find(".evf-registered-buttons button.evf-registered-item").hasClass("field-dragged"))&&p(this).find("a").trigger("click")}),a.on("change",".everest-forms-field-option-address input.hide",function(){var e=p(this),t=e.parent().parent().data("field-id"),e=e.parent().parent().data("subfield");p("#everest-forms-field-"+t).find(".everest-forms-"+e).toggleClass("hidden")}),a.on("input",".everest-forms-field-option-row-label input",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id");($label=p("#everest-forms-field-"+e).find(".label-title .text")).hasClass("nl2br")?$label.html(t.replace(/\n/g,"<br>")):$label.html(t)}),a.on("change",".everest-forms-field-option-row-enable_prepopulate input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("parameter_name"),p(e.target).is(":checked")?p("#everest-forms-field-option-row-"+t+"-parameter_name").show():p("#everest-forms-field-option-row-"+t+"-parameter_name").hide()}),a.on("input",".everest-forms-field-option-row-description textarea",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id"),e=p("#everest-forms-field-"+e).find(".description");e.hasClass("nl2br")?e.html(t.replace(/\n/g,"<br>")):e.html(t)}),a.on("change",".everest-forms-field-option-row-required input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required"),p(e.target).is(":checked")?(p("#everest-forms-field-option-row-"+t+"-required_field_message_setting").show(),p("#everest-forms-field-option-"+t+"-required_field_message_setting-individual").is(":checked")&&p("#everest-forms-field-option-row-"+t+"-required-field-message").show()):(p("#everest-forms-field-option-row-"+t+"-required_field_message_setting").hide(),p("#everest-forms-field-option-row-"+t+"-required-field-message").hide())}),a.on("change",".everest-forms-field-option-row-required_field_message_setting input",function(e){var t=p(this).parent().parent().parent().parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required_field_message_setting"),"individual"===p(this).val()?p("#everest-forms-field-option-row-"+t+"-required-field-message").show():p("#everest-forms-field-option-row-"+t+"-required-field-message").hide()}),a.on("change",".everest-forms-field-option-row-confirmation input",function(e){var t=p(this).parent().data("field-id");p(e.target).is(":checked")?(p("#everest-forms-field-"+t).find(".everest-forms-confirm").removeClass("everest-forms-confirm-disabled").addClass("everest-forms-confirm-enabled"),p("#everest-forms-field-option-"+t).removeClass("everest-forms-confirm-disabled").addClass("everest-forms-confirm-enabled")):(p("#everest-forms-field-"+t).find(".everest-forms-confirm").removeClass("everest-forms-confirm-enabled").addClass("everest-forms-confirm-disabled"),p("#everest-forms-field-option-"+t).removeClass("everest-forms-confirm-enabled").addClass("everest-forms-confirm-disabled"))}),a.on("input",".everest-forms-field-option-row-placeholder input",function(e){var t=p(this),i=t.val(),t=t.parent().data("field-id"),t=p("#everest-forms-field-"+t).find(".widefat:not(.secondary-input)");t.is("select")?i.length?(t.find(".placeholder").length?t.find(".placeholder").text(i):t.prepend('<option class="placeholder" selected>'+i+"</option>"),t.data("placeholder",i),t.hasClass("enhanced")&&t.parent().find(".select2-search__field").prop("placeholder",i)):t.find(".placeholder").remove():t.attr("placeholder",i)}),a.on("input",".everest-forms-field-option-address input.placeholder",function(e){var t=p(this),i=t.val(),o=t.parent().parent().data("field-id"),t=t.parent().parent().data("subfield");p("#everest-forms-field-"+o).find(".everest-forms-"+t+" input").attr("placeholder",i)}),a.on("input",".everest-forms-field-option-row-confirmation_placeholder input",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id");p("#everest-forms-field-"+e).find(".secondary-input").attr("placeholder",t)}),a.on("change",".everest-forms-field-option-row-label_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("label_hide")}),a.on("change",".everest-forms-field-option-row-sublabel_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("sublabel_hide")}),a.on("change",".everest-forms-field-option-row-datetime_format select, .everest-forms-field-option-row-phone_format select, .everest-forms-field-option-row-item_price select, .everest-forms-field-option-row-format select",function(e){var t=p(this),i=t.val(),t=t.parent().data("field-id");p("#everest-forms-field-"+t).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i),p("#everest-forms-field-option-"+t).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i)}),a.on("change",".everest-forms-field-option-row-datetime_style select",function(){m.dateSettingToggler(p(this).parent().attr("data-field-id"),p(this).val())}),p(".everest-forms-field-option-row-time_interval_format [id*=enable_min_max_time]").each(function(){p(this).prop("checked")?(p(this).parent().parent().find(".input-group-col-2").has(" [id*=min_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [id*=max_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [for*=select_min_time]").show(),p(this).parent().parent().find(".input-group-col-2").has("[for*=select_max_time]").show()):(p(this).parent().parent().find(".input-group-col-2").has("[id*=min_time_hour]").hide(),p(this).parent().parent().find(".input-group-col-2").has("[id*=max_time_hour]").hide(),p(this).parent().parent().find("[for*=select_min_time]").hide(),p(this).parent().parent().find("[for*=select_max_time]").hide())}),a.on("click",".everest-forms-field-option-row-time_interval_format [id*=enable_min_max_time]",function(){p(this).prop("checked")?(p(this).parent().parent().find(".input-group-col-2").has(" [id*=min_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [id*=max_time_hour]").show(),p(this).parent().parent().find("[for*=select_min_time]").show(),p(this).parent().parent().find("[for*=select_max_time]").show()):(p(this).parent().parent().find(".input-group-col-2").has("[id*=min_time_hour]").hide(),p(this).parent().parent().find(".input-group-col-2").has("[id*=max_time_hour]").hide(),p(this).parent().parent().find("[for*=select_min_time]").hide(),p(this).parent().parent().find("[for*=select_max_time]").hide())}),a.on("change",".everest-forms-field-option-row-time_interval_format select[id*=time_format]",function(){min_hour=p(this).parent().siblings(".input-group-col-2").find("[id*=min_time_hour]"),max_hour=p(this).parent().siblings(".input-group-col-2").find("[id*=max_time_hour]");var e,t,o=min_hour.find("option:selected").val(),s=max_hour.find("option:selected").val(),n="";for(i=0;i<=23;i++)"H:i"===p(this).val()?n+='<option value = "'+i+'">'+(i<10?"0"+i:i)+"</option>":(e=" PM",0==(t=i<12?(e=" AM",i):i-12)&&(t=12),n+='<option value = "'+i+'">'+t+e+"</option>");min_hour.html(n),max_hour.html(n),min_hour.find("option[value="+o+"]").prop("selected",!0),max_hour.find("option[value="+s+"]").prop("selected",!0)})},dateSettingToggler:function(e,t){"picker"==t?(p("#everest-forms-field-option-row-"+e+"-placeholder").show(),p("#everest-forms-field-option-"+e+"-disable_dates").show(),p("label[for=everest-forms-field-option-"+e+"-disable_dates]").show(),p("#everest-forms-field-option-"+e+"-date_mode-range").parents().find("everest-forms-checklist").show(),p(".everest-forms-field-option-row-date_format .time_interval").show(),p("#everest-forms-field-option-"+e+"-date_localization").show(),p("label[for=everest-forms-field-option-"+e+"-date_localization]").show(),p("#everest-forms-field-option-"+e+"-date_default").parent().show(),p("#everest-forms-field-option-"+e+"-past_date_disable").parent().show(),p("#everest-forms-field-option-"+e+"-enable_min_max").parent().show(),p("#everest-forms-field-option-"+e+"-enable_min_max").prop("checked")&&p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-option").removeClass("everest-forms-hidden"),p("#everest-forms-field-option-"+e+"-time_interval").show(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").hide(),p("label[for=everest-forms-field-option-"+e+"-enable_min_max_time]").hide(),p("label[for=everest-forms-field-option-"+e+"-select_min_time]").hide(),p("label[for=everest-forms-field-option-"+e+"-select_max_time]").hide(),p("#everest-forms-field-option-"+e+"-min_time_hour").parent().hide(),p("#everest-forms-field-option-"+e+"-max_time_hour").parent().hide()):(p("#everest-forms-field-option-"+e+"-date_mode-range").parents().find("everest-forms-checklist").hide(),p("#everest-forms-field-option-"+e+"-date_default").parent().hide(),p("#everest-forms-field-option-"+e+"-past_date_disable").parent().hide(),p("#everest-forms-field-option-row-"+e+"-placeholder").hide(),p("#everest-forms-field-option-"+e+"-enable_min_max").parent().hide(),p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-option").addClass("everest-forms-hidden"),p("#everest-forms-field-option-"+e+"-disable_dates").hide(),p("label[for=everest-forms-field-option-"+e+"-disable_dates]").hide(),p(".everest-forms-field-option-row-date_format .everest-forms-checklist").hide(),p(".everest-forms-field-option-row-date_format .time_interval").hide(),p("#everest-forms-field-option-"+e+"-date_localization").hide(),p("label[for=everest-forms-field-option-"+e+"-date_localization]").hide(),p("#everest-forms-field-option-"+e+"-time_interval").hide(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").show(),p("label[for=everest-forms-field-option-"+e+"-enable_min_max_time]").show(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").prop("checked")&&(p("label[for=everest-forms-field-option-"+e+"-select_min_time]").show(),p("label[for=everest-forms-field-option-"+e+"-select_max_time]").show(),p("#everest-forms-field-option-"+e+"-min_time_hour").parent().show(),p("#everest-forms-field-option-"+e+"-max_time_hour").parent().show()))},choicesInit:function(e){p(e=e||".everest-forms-field-option-row-choices ul").sortable({items:"li",axis:"y",handle:".sort",scrollSensitivity:40,stop:function(e){var e=p(e.target).attr("data-field-id"),t=p("#everest-forms-field-option-"+e).find(".everest-forms-field-option-hidden-type").val();m.choiceUpdate(t,e)}})},choiceAdd:function(e,t,i){e&&e.preventDefault&&e.preventDefault();var e=p(t),t=e.parent(),o=t.find("input.default").is(":checked"),e=e.closest(".everest-forms-field-option-row-choices").data("field-id"),s=t.parent().attr("data-next-id"),n=t.parent().data("field-type"),r=t.clone().insertAfter(t);r.attr("data-key",s),r.find("input.label").val(i).attr("name","form_fields["+e+"][choices]["+s+"][label]"),r.find("input.value").val(i).attr("name","form_fields["+e+"][choices]["+s+"][value]"),r.find("input.source").val("").attr("name","form_fields["+e+"][choices]["+s+"][image]"),r.find("input.default").attr("name","form_fields["+e+"][choices]["+s+"][default]").prop("checked",!1),r.find(".attachment-thumb").remove(),r.find(".button-add-media").show(),!0===o&&t.find("input.default").prop("checked",!0),s++,t.parent().attr("data-next-id",s),a.trigger("everestFormsChoiceAdd"),m.choiceUpdate(n,e)},choiceDelete:function(e,t){e.preventDefault();e=p(t),t=e.parent().parent();t.find("li").length<2?p.alert({title:!1,content:c.i18n_field_error_choice,icon:"dashicons dashicons-info",type:"blue",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}):(e.parent().remove(),m.choiceUpdate(t.data("field-type"),t.data("field-id")),a.trigger("everestFormsChoiceDelete"))},choiceUpdate:function(s,n){var e,t,r,i=p("#everest-forms-field-option-"+n);if($primary=p("#everest-forms-field-"+n+" .primary-input"),"radio"===s||"checkbox"===s||"payment-multiple"===s||"payment-checkbox"===s)return e=[],i=m.formObject(i).form_fields[n],p("#everest-forms-field-option-"+n).find(".evf-choices-list li").each(function(){e.push(p(this).data("key"))}),t=wp.template("everest-forms-field-preview-choices"),data={type:s="checkbox"===s||"payment-checkbox"===s?"checkbox":"radio",order:e,settings:i,amountFilter:m.amountFilter},void p("#everest-forms-field-"+n).find("ul.primary-input").replaceWith(t(data));"select"===s&&(r="<option>{label}</option>",$primary.find("option").not(".placeholder").remove()),p("#everest-forms-field-option-row-"+n+"-choices .evf-choices-list li").each(function(e){var t=p(this),i=t.find("input.label").val(),t=t.find("input.default").is(":checked"),o=p(r.replace("{label}",i));if(p("#everest-forms-field-"+n+" .primary-input").append(o),i&&!0===t)switch(s){case"select":o.prop("selected",!0);break;case"radio":case"checkbox":o.find("input").prop("checked",!0)}})},amountFilter:function(e,t){return"right"===e.currency_symbol_pos?t+" "+e.currency_symbol:e.currency_symbol+" "+t},bindFormSettings:function(){p("body").on("click",".evf-setting-panel",function(e){var t=p(this).attr("data-section");p(".evf-setting-panel").removeClass("active"),p(".everest-forms-active-email").removeClass("active"),p(".everest-forms-active-sms-notifications").removeClass("active"),p(".everest-forms-active-conversational-forms").removeClass("active"),p(".evf-content-section").removeClass("active"),p(this).addClass("active"),p(".evf-content-"+t+"-settings").addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormEmail:function(){p("body").on("click",".everest-forms-panel-sidebar-section-email",function(e){p(this).siblings(".everest-forms-active-email").removeClass("active"),p(this).next(".everest-forms-active-email").addClass("active");var t=p(this).siblings(".everest-forms-active-email.active").find(".everest-forms-active-email-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormSmsNotifications:function(){p("body").on("click",".everest-forms-panel-sidebar-section-sms-notifications",function(e){p(this).siblings(".everest-forms-active-sms-notifications").removeClass("active"),p(this).next(".everest-forms-active-sms-notifications").addClass("active");var t=p(this).siblings(".everest-forms-active-sms-notifications.active").find(".everest-forms-active-sms-notifications-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormConversational:function(){p("body").on("click",".everest-forms-panel-sidebar-section-conversational-forms ",function(e){p(this);p(this).siblings(".everest-forms-active-conversational-forms").removeClass("active"),p(this).next(".everest-forms-active-conversational-forms").addClass("active");var t=p(this).siblings(".everest-forms-active-conversational-forms.active");t.length&&t.children(".evf-content-tab ").trigger("click"),e.preventDefault()})},bindFormIntegrations:function(){p("body").on("click",".evf-integrations-panel",function(e){var t=p(this).attr("data-section"),i=(p(".evf-integrations-panel").removeClass("active"),p("#everest-forms-panel-integrations").find(".evf-panel-content-section").removeClass("active"),p(this).addClass("active"),p(this).parent().find(".everest-forms-active-connections").removeClass("active"),p(this).next(".everest-forms-active-connections").addClass("active"),p(this).siblings(".everest-forms-active-connections.active").find(".everest-forms-active-connections-list li"));i.length&&i.children(".user-nickname").first().trigger("click"),p(".evf-panel-content-section-"+t).addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormPayment:function(){p("body").on("click",".evf-payments-panel",function(e){var t=p(this).attr("data-section");p(".evf-payments-panel").removeClass("active"),p(this).siblings().removeClass("icon active"),p(this).addClass("active"),p(this).parents("#everest-forms-panel-payments").find(".evf-payment-setting-content").removeClass("active").hide(),p(".evf-content-"+t+"-settings").addClass("active").show(),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},removeRow:function(e){p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id"),e=p("#everest-forms-field-option-"+e);p(this).remove(),e.remove()}),e.remove()},bindRemoveRow:function(){p("body").on("click",".evf-delete-row",function(){var e=p(this),t=p(".evf-admin-row").length,i=e.closest(".evf-admin-row"),o=i.attr("data-row-id"),e=e.parents(".evf-admin-field-container").attr("data-current-part"),s=p("#everest-forms-builder").hasClass("multi-part-activated");(t=e&&s?p("#part_"+e).find(".evf-admin-row").length:t)<2?p.alert({title:c.i18n_row_locked,content:c.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_delete_row_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.removeRow(i),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),p("#everest-forms-row-option-row_"+o).remove()}},cancel:{text:c.i18n_cancel}}})})},bindAddNewRow:function(){p("body").on("click",".evf-add-row span",function(){p("#add-fields").trigger("click");var t,e=p(this),i=p(".evf-admin-field-wrapper"),o=p(".evf-admin-row").map(function(){return p(this).data("row-id")}).get(),o=Math.max.apply(Math,o),s=p(".evf-admin-row").eq(0).clone(),n=e.parent().attr("data-total-rows"),r=e.parents(".evf-admin-field-container").attr("data-current-part");o++,n++,r&&(i=p(".evf-admin-field-wrapper").find("#part_"+r)),s.find(".evf-admin-grid").html(""),s.attr("data-row-id",o),e.parent().attr("data-total-rows",n),e.parent().attr("data-next-row-id",o),0<p(".everest-forms-row-options").length&&!1===e.closest(".evf-add-row").hasClass("repeater-row")?(s.find("div").hide(),s.css({padding:"40px"}).append('<i class="spinner is-active" style="margin:0px auto;"></i>'),i.append(s),m.bindFields(),m.checkEmptyGrid(),t=s.attr("data-row-id"),r=window.evf_data,p.ajax({url:r.ajax_url,type:"POST",data:{action:"everest_forms_new_row",security:r.evf_add_row_nonce,form_id:r.form_id,row_id:t},success:function(e){!0===e.success&&"undefined"!=typeof e.data.html&&(p(document).find(".everest-forms-row-option-group").append(e.data.html),m.conditionalLogicAppendRow(t),p("#everest-forms-panel-field-form_rows-connection_row_"+t+"-conditional_logic_status").prop("checked",!1))}}).always(function(){s.css({padding:0}),s.find("div").show(),s.find(".evf-toggle-row-content").css("display","none"),s.find("i").remove(),e.trigger("everest-forms-after-add-row",s)})):(i.append(s),m.bindFields(),m.checkEmptyGrid(),e.trigger("everest-forms-after-add-row",s))})},bindCloneField:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-duplicate",function(){var e=p(this).closest(".everest-forms-field");e.hasClass("no-duplicate")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_duplicate_field_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.cloneFieldAction(e)}},cancel:{text:c.i18n_cancel}}})}),p("body").on("click",".evf-admin-row .evf-duplicate-row",function(){var e=p(this).closest(".evf-admin-row");e.find(".everest-forms-field").hasClass("no-duplicate")?p.alert({title:c.i18n_field_locked,content:c.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_duplicate_row_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.cloneRowAction(e)}},cancel:{text:c.i18n_cancel}}})})},cloneRowAction:function(t){row_ids=p(".evf-admin-row").map(function(){return p(this).data("row-id")}).get(),max_row_id=Math.max.apply(Math,row_ids),row_clone=t.clone(),total_rows=p(".evf-add-row").attr("data-total-rows"),max_row_id++,total_rows++,row_clone.attr("data-row-id",max_row_id),p(".evf-add-row").attr("data-total-rows",total_rows),p(".evf-add-row").attr("data-next-row-id",max_row_id);var e={action:"everest_forms_get_next_id",security:c.evf_get_next_id,form_id:c.form_id,fields:row_clone.find(".everest-forms-field").length};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){"boolean"==typeof e.success&&!0===e.success&&(t.after(row_clone),p.each(e.data,function(e,t){var i=t.field_id,t=t.field_key,i=(p("#everest-forms-field-id").val(i),(field=row_clone.find(".everest-forms-field").eq(e)).attr("data-field-id"));m.render_node(field,i,t),field.remove(),p(document.body).trigger("init_field_options_toggle")}),m.bindFields())}})},cloneFieldAction:function(i){var o=i.attr("data-field-id"),e=c.form_id,e={action:"everest_forms_get_next_id",security:c.evf_get_next_id,form_id:e};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t;"boolean"==typeof e.success&&!0===e.success&&(t=e.data.field_id,e=e.data.field_key,p("#everest-forms-field-id").val(t),m.render_node(i,o,e),p(document.body).trigger("init_field_options_toggle"))}})},render_node:function(e,o,s){var t=p(".everest-forms-field-options #everest-forms-field-option-"+o),i=p("#everest-forms-field-option-"+o+"-label").val(),n=p("#everest-forms-field-option-"+o+"-meta-key").length?p("#everest-forms-field-option-"+o+"-meta-key").val():"",r=e.attr("data-field-type"),a=t.html(),i=i+" "+c.i18n_copy,n="html"!==r?n.replace(/\(|\)/g,"").toLowerCase().substring(0,n.lastIndexOf("_"))+"_"+Math.floor(1e3+9e3*Math.random()):"",d=e.clone(),l=new RegExp(o,"g"),a=a.replace(l,s),f=p('<div class="everest-forms-field-option everest-forms-field-option-'+r+'" id="everest-forms-field-option-'+s+'" data-field-id="'+s+'" />');f.append(a),p.each(t.find(":input"),function(){var e,t=p(this).attr("type"),i=(p(this).attr("name")?p(this).attr("name"):"").replace(l,s);"text"===t||"hidden"===t?(e=p(this).val(),f.find('input[name="'+i+'"]').val(e),f.find('input[value="'+o+'"]').val(s)):"checkbox"===t||"radio"===t?p(this).is(":checked")?f.find('input[name="'+i+'"]').prop("checked",!0).attr("checked","checked"):f.find('[name="'+i+'"]').prop("checked",!1).attr("checked",!1):p(this).is("select")?p(this).find("option:selected").length&&(e=p(this).find("option:selected").val(),f.find('[name="'+i+'"]').find('[value="'+e+'"]').prop("selected",!0)):""!==p(this).val()&&f.find('[name="'+i+'"]').val(p(this).val())}),p(".everest-forms-field-options").append(f),p("#everest-forms-field-option-"+s+"-label").val(i),p("#everest-forms-field-option-"+s+"-meta-key").val(n),d.attr("class",e.attr("class")),d.attr("id","everest-forms-field-"+s),d.attr("data-field-id",s),d.attr("data-field-type",r),d.find(".label-title .text").text(i),e.closest(".evf-admin-grid").find('[data-field-id="'+o+'"]').after(d),p(document).trigger("everest-form-cloned",[s,r]),m.switchToFieldOptionPanel(s),p(document.body).trigger("evf_render_node_complete",[r,s,d,f])},bindFieldDelete:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-delete",function(){var t=p(this).closest(".everest-forms-field"),e=t.attr("data-field-id"),i=p("#everest-forms-field-option-"+e);p(this).closest(".evf-admin-grid");t.hasClass("no-delete")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),t.fadeOut("slow",function(){var e=t.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),t.remove(),i.remove(),m.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),m.conditionalLogicRemoveField(e),m.conditionalLogicRemoveFieldIntegration(e),m.paymentFieldRemoveFromQuantity(e)})}},cancel:{text:c.i18n_cancel}}})})},bindFieldDeleteWithKeyEvent:function(){p("body").on("keyup",function(e){var t,i=p(".everest-forms-preview .everest-forms-field.active");46===e.which&&!0===i.hasClass("active")&&!1===i.hasClass("evf-delete-event-active")&&0!=p(".evf-admin-row").hasClass("evf-hover")&&(i.addClass("evf-delete-event-active"),e=i.attr("data-field-id"),t=p("#everest-forms-field-option-"+e),i.hasClass("no-delete")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"],action:function(){i.removeClass("evf-delete-event-active")}}}}):p.confirm({title:!1,content:c.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),i.fadeOut("slow",function(){var e=i.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),i.remove(),t.remove(),m.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),m.conditionalLogicRemoveField(e),m.conditionalLogicRemoveFieldIntegration(e),m.paymentFieldRemoveFromQuantity(e)}),i.removeClass("evf-delete-event-active")}},cancel:{text:c.i18n_cancel,action:function(){i.removeClass("evf-delete-event-active")}}}}))})},bindSaveOption:function(){p("body").on("click",".everest-forms-save-button",function(){var t=p(this),e=p("form#everest-forms-builder-form"),i=m.getStructure(),o=e.serializeArray(),s=p("#evf-edit-form-name").val().trim();if(p(document).trigger("everest_forms_save_args",[o]),""===s)p.alert({title:c.i18n_field_title_empty,content:c.i18n_field_title_payload,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}});else{e.triggerHandler("everest_forms_process_ajax_data",[t,o])&&(o=e.triggerHandler("everest_forms_process_ajax_data",[t,o])),p(".everest-forms-panel-content-wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});for(var n,r=[],a=(p(".everest-forms-field[data-field-id]").each(function(){r.push(p(this).attr("data-field-id"))}),o.length);a--;)o[a].name.startsWith("form_fields")&&(n=!1,r.forEach(function(e){o[a].name.startsWith("form_fields["+e+"]")&&(n=!0)}),-1<a&&!1===n&&o.splice(a,1));s=o.concat(i),e={action:"everest_forms_save_form",security:c.evf_save_form,form_data:JSON.stringify(s)};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){t.addClass("processing"),t.find(".loading-dot").remove(),t.append('<span class="loading-dot"></span>')},success:function(e){t.removeClass("processing"),t.find(".loading-dot").remove(),p(document).trigger("everest_forms_save_data",e.data),e.success||p.alert({title:e.data.errorTitle,content:e.data.errorMessage,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}),p(".everest-forms-panel-content-wrap").unblock()}})}})},bindSaveOptionWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"s"!==String.fromCharCode(e.which).toLowerCase()&&83!==e.which||(e.preventDefault(),p(".everest-forms-save-button").trigger("click"))})},bindOpenShortcutKeysModalWithKeyEvent:function(){p("body").on("keydown",function(e){var i;!e.ctrlKey&&!e.metaKey||"h"!==String.fromCharCode(e.which).toLowerCase()&&72!==e.which||(e.preventDefault(),i="",p.each(c.i18n_shortcut_keys,function(e,t){i+=`
2
  <ul class="evf-shortcut-keyword">
3
  <li>
4
  <div class="evf-shortcut-title">${t}</div>
@@ -8,4 +8,4 @@
8
  </div>
9
  </li>
10
  </ul>
11
- `}),p.alert({title:c.i18n_shortcut_key_title,content:i,icon:"dashicons dashicons-info",type:"blue",boxWidth:"550px",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}},onContentReady:function(){p("body").on("keydown",function(e){(e.ctrlKey||e.metaKey&&"h"===String.fromCharCode(e.which).toLowerCase()||72===e.which)&&p(".btn-confirm").trigger("click")})}}))})},getStructure:function(){var e=p(".evf-admin-field-wrapper"),n=[];return p.each(e.find(".evf-admin-row"),function(){var e=p(this),s=e.attr("data-row-id");p.each(e.find(".evf-admin-grid"),function(){var e=p(this),i=e.attr("data-grid-id"),o=0;p.each(e.find(".everest-forms-field"),function(){var e={name:"",value:""},t=p(this).attr("data-field-id");e.name="structure[row_"+s+"][grid_"+i+"]["+o+"]",o++,e.value=t,n.push(e)}),e.find(".everest-forms-field").length<1&&n.push({name:"structure[row_"+s+"][grid_"+i+"]",value:""})})}),n},getFieldArray:function(e){var t=[];return p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id");t.push(e)}),t},checkEmptyGrid:function(e){p.each(p(".evf-admin-grid"),function(){p(this).find(".everest-forms-field, .evf-registered-item:not(.ui-draggable-dragging)").not(".ui-sortable-helper").length<1?p(this).addClass("evf-empty-grid"):p(this).removeClass("evf-empty-grid")}),m.choicesInit()},bindDefaultTabs:function(){p(document).on("click",".evf-nav-tab-wrapper a",function(e){e.preventDefault(),m.switchTab(p(this).data("panel"))})},switchTab:function(e){var t=p("#everest-forms-panel-"+e),i=p(".evf-panel-"+e+"-button");p(".evf-nav-tab-wrapper").find("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),t.closest(".evf-tab-content").find(".everest-forms-panel").removeClass("active"),t.addClass("active"),"integrations"!==e&&"payments"!==e||(t.find(".everest-forms-panel-sidebar a").hasClass("active")||t.find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-panel-content-section").hasClass("active")||p(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active")),history.replaceState({},null,m.updateQueryString("tab",e)),m.switchPanel(e)},updateQueryString:function(e,t,i){i=i||window.location.href;var o,s=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");return s.test(i)?null!=t?i.replace(s,"$1"+e+"="+t+"$2$3"):(i=(o=i.split("#"))[0].replace(s,"$1$3").replace(/(&|\?)$/,""),"undefined"!=typeof o[1]&&null!==o[1]&&(i+="#"+o[1]),i):(null!=t&&(s=-1!==i.indexOf("?")?"&":"?",i=(o=i.split("#"))[0]+s+e+"="+t,"undefined"!=typeof o[1]&&null!==o[1]&&(i+="#"+o[1])),i)},switchPanel:function(e){"field-options"===e&&m.switchToFieldOptionPanel()},switchToFieldOptionPanel:function(e){p(".everest-forms-field-options").find(".no-fields").hide(),p(".evf-admin-field-wrapper .everest-forms-field").removeClass("active"),p("#everest-forms-panel-fields").addClass("active"),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").last().addClass("active"),p(".everest-forms-add-fields").hide(),p(".everest-forms-field-options").show(),p(".everest-forms-field-options").find(".everest-forms-field-option").hide(),p(".evf-tab-lists").find("li a").removeClass("active"),p(".evf-tab-lists").find("li.evf-panel-field-options-button a").addClass("active"),p(document.body).trigger("evf-init-switch-field-options"),void 0!==e?(p("#everest-forms-field-option-"+e).show(),p("#everest-forms-field-"+e).addClass("active")):0<p(".evf-admin-field-wrapper .everest-forms-field").length?(p(".evf-admin-field-wrapper .everest-forms-field").eq(0).addClass("active"),p("#everest-forms-field-option-"+p(".evf-admin-field-wrapper .everest-forms-field").eq(0).attr("data-field-id")).show()):p(".everest-forms-field-options").find(".no-fields").show()},bindFields:function(){p(".evf-admin-field-wrapper").sortable({items:".evf-admin-row",axis:"y",cursor:"move",opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,placeholder:"evf-sortable-placeholder",containment:".everest-forms-panel-content",start:function(e,t){t.item.css({backgroundColor:"#f7fafc",border:"1px dashed #5d96ee"})},stop:function(e,t){t.item.removeAttr("style")}}).disableSelection(),p(".evf-admin-grid").sortable({items:'> .everest-forms-field[data-field-type!="repeater-fields"]',delay:100,opacity:.65,cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,connectWith:".evf-admin-grid",appendTo:document.body,containment:".everest-forms-field-wrap",out:function(e){p(".evf-admin-grid").removeClass("evf-hover"),p(e.target).removeClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").removeClass("evf-hover"),m.checkEmptyGrid()},over:function(e,t){p(".evf-admin-grid").addClass("evf-hover"),p(e.target).addClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").addClass("evf-hover"),m.checkEmptyGrid()},receive:function(e,t){t.sender.is("button")&&m.fieldDrop(t.helper)},update:function(e,t){p(document).trigger("evf_sort_update_complete",{event:e,ui:t})},stop:function(e,t){t.item.removeAttr("style"),m.checkEmptyGrid()}}).disableSelection(),p(".evf-registered-buttons button.evf-registered-item").draggable({delay:200,cancel:!1,scroll:!1,revert:"invalid",scrollSensitivity:40,forcePlaceholderSize:!0,start:function(){p(this).addClass("field-dragged")},helper:function(){return p(this).clone().insertAfter(p(this).closest(".everest-forms-tab-content").siblings(".everest-forms-fields-tab"))},stop:function(){p(this).removeClass("field-dragged")},opacity:.75,containment:"#everest-forms-builder",connectToSortable:".evf-admin-grid"}).disableSelection(),p(".evf-registered-item.evf-repeater-field").draggable("option","connectToSortable",".evf-repeatable-grid"),p(".evf-admin-row").on("mouseenter mouseleave",function(e){e.buttons<1&&("mouseenter"===e.type?p(this).addClass("evf-hover"):p(".evf-admin-row").removeClass("evf-hover"))}),p(".everest-forms-panel-content").on("scroll",function(){p(".evf-admin-grid").sortable("refreshPositions"),p(".evf-admin-field-wrapper").sortable("refreshPositions")})},fieldTabChoice:function(e){p(".everest-forms-tab-content").scrollTop(0),p(".everest-forms-fields-tab a").removeClass("active"),p(".everest-forms-field, .everest-forms-title-desc").removeClass("active"),p("#"+e).addClass("active"),"add-fields"===e?(p(".everest-forms-add-fields").show(),p(".everest-forms-field-options").hide()):("field-options"===e?(e=p(".everest-forms-field").first().data("field-id"),p(".everest-forms-field-options").show(),p(".everest-forms-field").first().addClass("active")):p("#everest-forms-field-"+e).addClass("active"),p(".everest-forms-field-option").hide(),p("#everest-forms-field-option-"+e).show(),p(".everest-forms-add-fields").hide())},bindFormPreview:function(){},bindFormPreviewWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"p"!==String.fromCharCode(e.which).toLowerCase()&&80!==e.which||(e.preventDefault(),window.open(c.preview_url))})},bindFormEntriesWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"e"!==String.fromCharCode(e.which).toLowerCase()&&69!==e.which||(e.preventDefault(),window.open(c.entries_url))})},bindGridSwitcher:function(){p("body").on("click",".evf-show-grid",function(e){e.stopPropagation(),m.checkEmptyGrid(),p(this).closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideToggle(200)}),p(document).on("click",function(){m.checkEmptyGrid(),p(".evf-show-grid").closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideUp(200)});p("body").on("click",".evf-grid-selector",function(){var e=p(this).closest(".evf-admin-row");if(!p(this).hasClass("active")){var t=parseInt(p(this).attr("data-evf-grid"),10);if(!(4<t)){var i=p('<div class="evf-admin-grid evf-grid-'+t+' ui-sortable evf-empty-grid" />'),o=p("<div/>");p.each(e.find(".evf-admin-grid"),function(){p(this).children("*").each(function(){o.append(p(this).clone())})}),e.find(".evf-admin-grid").remove(),e.find(".evf-clear ").remove(),e.append('<div class="clear evf-clear"></div>');for(var s=1;s<=t;s++)i.attr("data-grid-id",s),e.append(i.clone());e.append('<div class="clear evf-clear"></div>'),e.find(".evf-admin-grid").eq(0).append(o.html()),e.find(".evf-grid-selector").removeClass("active"),p(this).addClass("active"),m.bindFields()}}})},fieldDrop:function(r){var e=r.attr("data-field-type");if(["payment-total"].includes(e)&&r.closest(".evf-admin-row").hasClass("evf-repeater-fields"))return p.confirm({title:!1,content:"This field cannot be added to Repeater Fields",type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{cancel:{text:c.i18n_close,btnClass:"btn-default"}}}),r.remove(),!1;r.css({left:"0",width:"100%"}).append('<i class="spinner is-active"></i>'),p.ajax({url:c.ajax_url,type:"POST",data:{action:"everest_forms_new_field_"+e,security:c.evf_field_drop_nonce,field_type:e,form_id:c.form_id},beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t=e.data.preview,i=e.data.options,o=e.data.form_field_id,e=e.data.field.type,s=p(t).attr("id"),n=p(t).attr("data-field-id");p("#everest-forms-field-id").val(o),p(".everest-forms-field-options").find(".no-fields").hide(),p(".everest-forms-field-options").append(i),p(".everest-forms-field-option-row-icon_color input.colorpicker").wpColorPicker({change:function(e){var t=p(this),i=t.val(),t=t.closest(".everest-forms-field-option-row").data("field-id");p("#everest-forms-field-"+t+" .rating-icon svg").css("fill",i)}}),r.after(t),null!==p("#everest-forms-panel-field-settings-enable_survey")&&p("#everest-forms-panel-field-settings-enable_survey").prop("checked")&&p("#everest-forms-field-option-"+n+"-survey_status").prop("checked",!0),null!==p("#everest-forms-panel-field-settings-enable_quiz")&&p("#everest-forms-panel-field-settings-enable_quiz").prop("checked")&&(p("#everest-forms-field-option-"+n+"-quiz_status").prop("checked",!0),p("#everest-forms-field-option-"+n+"-quiz_status").closest(".everest-forms-field-option-row-quiz_status").siblings(".everst-forms-field-quiz-settings").removeClass("everest-forms-hidden").addClass("everest-forms-show")),r.remove(),p(document.body).trigger("init_tooltips"),p(document.body).trigger("init_field_options_toggle"),p(document.body).trigger("evf_after_field_append",[s]),m.conditionalLogicAppendField(s),m.conditionalLogicAppendFieldIntegration(s),m.paymentFieldAppendToQuantity(s),m.paymentFieldAppendToDropdown(n,e),m.init_datepickers(),p("#everest-forms-field-option-"+n+"-enable_min_max_time").hide(),p("label[for=everest-forms-field-option-"+n+"-enable_min_max_time]").hide(),p("label[for=everest-forms-field-option-"+n+"-select_min_time]").hide(),p("label[for=everest-forms-field-option-"+n+"-select_max_time]").hide(),p("#everest-forms-field-option-"+n+"-min_time_hour").parent().hide(),p("#everest-forms-field-option-"+n+"-max_time_hour").parent().hide(),p(document.body).trigger("evf_field_drop_complete",[e,n,t,i]),m.checkEmptyGrid()}})},conditionalLogicAppendField:function(s){var e=p("#"+s),n=e.index(),r=p(".evf-field-conditional-field-select"),a=e.attr("data-field-type"),d=e.attr("data-field-id"),l=e.find(".label-title .text ").text(),f=(p.fn.insertAt=function(e,t,i){var o=p.makeArray(this.children().clone(!0));o.splice(t,0,e),p.each(o,function(e,t){i===p(t)[0].value&&(p(t)[0].selected=!0,o[e]=t)}),this.empty().append(o)},d);r.each(function(o,e){var t=p(e).val(),i=s.replace("everest-forms-field-",""),e=p(e).attr("name");i===e.substring(e.indexOf("[")+1,e.indexOf("]"))?p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert","yes-no"],-1===p.inArray(e,field_to_be_restricted)&&f!==t&&0===r.eq(o).find('option[data-field_id="'+t+'"]').length&&r.eq(o).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")}):(i='<option class="evf-conditional-fields" data-field_type="'+a+'" data-field_id="'+d+'" value="'+d+'">'+l+"</option>","html"!==a&&"title"!==a&&"address"!==a&&"image-upload"!==a&&"file-upload"!==a&&"date-time"!==a&&"hidden"!==a&&"likert"!==a&&"scale-rating"!==a&&"yes-no"!==a&&"divider"!==a&&r.eq(o).insertAt(i,n,t)),1<r.eq(o).find("option:not(.evf-conditional-fields)").length&&r.eq(o).find("option:not(.evf-conditional-fields):gt(0)").remove()})},conditionalLogicAppendRow:function(o){var s=p("#everest-forms-row-option-row_"+o);p(".everest-forms-field").each(function(){var e=p(this),t=e.attr("data-field-id"),i=e.attr("data-field-type"),e=(e.find(".required").remove(),'<option class="evf-conditional-fields" data-field_type="'+i+'" data-field_id="'+t+'" value="'+t+'">'+e.find(".label-title").html()+"</option>");0===p(document).find('.evf-admin-row[data-row-id="'+o+'"] #everest-forms-field-'+t).length&&0===s.find('.evf-field-conditional-field-select option[data-field_id="'+t+'"]').length&&"html"!==i&&"title"!==i&&"address"!==i&&"image-upload"!==i&&"file-upload"!==i&&"date-time"!==i&&"hidden"!==i&&"likert"!==i&&"scale-rating"!==i&&"divider"!==i&&s.find(".evf-field-conditional-field-select").append(e),1<s.find(".evf-field-conditional-field-select option:not(.evf-conditional-fields)").length&&s.find(".evf-field-conditional-field-select option:not(.evf-conditional-fields):gt(0)").remove()})},paymentFieldAppendToQuantity:function(e){var e=p("#"+e),t=p(".everest-forms-field-option-row-map_field select"),i=e.attr("data-field-type"),o=e.attr("data-field-id"),e=e.find(".label-title .text ").text();"payment-single"!==i&&"payment-multiple"!==i&&"payment-checkbox"!==i||t.append('<option value="'+o+'">'+e+"</option>")},paymentFieldAppendToDropdown:function(e,t){var i;"payment-quantity"!==t&&"payment-coupon"!==t||(i=p("#everest-forms-field-option-"+e+"-map_field"),["payment-checkbox","payment-multiple","payment-single","range-slider"].forEach(function(e){p(".everest-forms-field-"+e).each(function(){if("range-slider"===p(this).attr("data-field-type")){if("true"!==p(this).find(".evf-range-slider-preview").attr("data-enable-payment-slider"))return;var e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>"}e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>";i.append(e)})}))},conditionalLogicAppendFieldIntegration:function(i){var s=p("#"+i),n=s.index(),r=p(".evf-provider-conditional").find(".evf-conditional-field-select"),a=s.attr("data-field-type"),d=s.attr("data-field-id"),l=s.find(".label-title .text ").text();p.fn.insertAt=function(e,t){var i=p.makeArray(this.children().clone(!0));i.splice(t,0,e),this.empty().append(i)},r.each(function(o,e){var t=i.replace("everest-forms-field-",""),e=p(e).attr("name");t===e.substring(e.indexOf("[")+1,e.indexOf("]"))?p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","signature","divider","date-time","hidden","scale-rating","likert","yes-no",s.attr("data-field-type")],-1===p.inArray(e,field_to_be_restricted)&&r.eq(o).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")}):(t='<option class="evf-conditional-fields" data-field_type="'+a+'" data-field_id="'+d+'" value="'+d+'">'+l+"</option>","html"!==a&&"title"!==a&&"address"!==a&&"image-upload"!==a&&"file-upload"!==a&&"date-time"!==a&&"hidden"!==a&&"likert"!==a&&"scale-rating"!==a&&"yes-no"!==a&&r.eq(o).insertAt(t,n))})},conditionalLogicRemoveField:function(e){p(".evf-field-conditional-field-select option[value = "+e+" ]").remove()},conditionalLogicRemoveFieldIntegration:function(e){p(".evf-provider-conditional .evf-conditional-field-select option[value = "+e+" ]").remove()},paymentFieldRemoveFromQuantity:function(e){p(".everest-forms-field-option-row-map_field select option[value = "+e+" ]").remove()},bindFieldSettings:function(){p("body").on("click",".everest-forms-preview .everest-forms-field, .everest-forms-preview .everest-forms-field .everest-forms-field-setting",function(e){e.preventDefault();e=p(this).closest(".everest-forms-field").attr("data-field-id");p(".everest-forms-tab-content").scrollTop(0),m.switchToFieldOptionPanel(e)})},toggleLabelEdit:function(e,t){p(e).toggleClass("everest-forms-hidden"),p(t).toggleClass("everest-forms-hidden"),p(t).is(":visible")&&p(t).focus()},bindToggleHandleActions:function(){p("body").on("click",".toggle-handle",function(e){var t=p(this).data("label"),i=p(this).data("input");p(i).is(":visible")||m.toggleLabelEdit(t,i)})},bindLabelEditInputActions:function(){p("body").on("focusout",".label-edit-input",function(e){var t=p(this).data("label");m.toggleLabelEdit(t,this)})},bindSyncedInputActions:function(){p("body").on("input",".sync-input",function(e){var t=p(this).val(),i=p(this).data("sync-targets");t&&i&&p(i).text(t)})}};m.init()}(jQuery,window.evf_data),jQuery(function(){"checked"!=jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").attr("checked")&&jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide(),jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").on("change",function(){"checked"!=jQuery(this).attr("checked")?jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide():jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().show()}),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap input").on("change",function(){jQuery(this).is(":checked")?jQuery("#everest-forms-panel-field-settings-query_string-wrap").show():jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()});var e=jQuery("#everest-forms-panel-field-settings-redirect_to option:selected").val();"same"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"custom_page"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"external_url"==e&&(jQuery("#everest-forms-panel-field-settings-external_url-wrap").show(),jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()),jQuery("#everest-forms-panel-field-settings-redirect_to").on("change",function(){"same"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()):"custom_page"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string").is(":checked")?jQuery("#everest-forms-panel-field-settings-query_string-wrap").show():jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()):"external_url"==this.value&&(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").show())}),jQuery(".evf-panel-field-options-button.evf-disabled-tab").hide(),jQuery(".everest-forms-conditional-field-settings-redirect_to").each(function(){var e=this.value;"custom_page"==e?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").show(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide()):"external_url"==e?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").show()):(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide())}),jQuery(document).on("change",".everest-forms-conditional-field-settings-redirect_to",function(){"custom_page"==this.value?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").show(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide()):"external_url"==this.value?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").show()):(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide())})}),jQuery(function(c){c(document.body).on("init_add_fields_toogle",function(){c(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group > a",function(e){e.preventDefault(),c(this).parent(".everest-forms-add-fields-group").toggleClass("closed").toggleClass("open")}),c(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group a",function(){c(this).next(".evf-registered-buttons").stop().slideToggle()}),c(".everest-forms-add-fields-group.closed").each(function(){c(this).find(".evf-registered-buttons").hide()})}).trigger("init_add_fields_toogle"),c(document.body).on("click",".everest-forms-field-option .everest-forms-field-option-group > a",function(e){e.preventDefault(),c(this).parent(".everest-forms-field-option-group").toggleClass("closed").toggleClass("open")}),c(document.body).on("click",".everest-forms-field-option .everest-forms-field-option-group a",function(e){c(e.target).filter(":input, option, .sort").length||c(this).next(".everest-forms-field-option-group-inner").stop().slideToggle()}),c(document.body).on("init_field_options_toggle",function(){c(".everest-forms-field-option-group.closed").each(function(){c(this).find(".everest-forms-field-option-group-inner").hide()})}).trigger("init_field_options_toggle"),c(document).on("click",function(){c(".evf-smart-tag-lists").hide()}),c(".evf-smart-tag-lists").hide(),c(document.body).on("click",".evf-toggle-smart-tag-display",function(e){e.stopPropagation(),c(".evf-smart-tag-lists").hide(),c(".evf-smart-tag-lists ul").empty(),c(this).parent().find(".evf-smart-tag-lists").toggle("show");var t,e=c(this).data("type"),i=c(this).data("fields"),o=c(this),s=[],n=[],r=[],a=[];if(c(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e,t=c(this).data("field-type"),i=c(this).data("field-id");"email"===t?(e=c(this).find(".label-title span").first().text(),r[i]=e):"phone"===t?(e=c(this).find(".label-title span").first().text(),a[i]=e):(t=c(this).find(".label-title span").first().text(),s[i]=t),n[i]=c(this).find(".label-title span").first().text()}),"other"===e||"all"===e){var d=evf_data.smart_tags_other;for(l in d)c(o).parent().find(".evf-smart-tag-lists .evf-others").append('<li class = "smart-tag-field" data-type="other" data-field_id="'+l+'">'+d[l]+"</li>")}if("fields"===e||"all"===e)if("email"===i)for(var l in Object.keys(r).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),c(o).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),c(o).parent().find(".evf-smart-tag-lists .evf-others").remove(),c(o).parent().find(".evf-smart-tag-lists").append('<div class="smart-tag-title other-tag-title">Others</div><ul class="evf-others"></ul>'),c(o).parent().find(".evf-smart-tag-lists .evf-others").append('<li class="smart-tag-field" data-type="other" data-field_id="admin_email">Site Admin Email</li><li class="smart-tag-field" data-type="other" data-field_id="user_email">User Email</li>'),r)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+l+'">'+r[l]+"</li>");else if("phone"===i)for(var l in Object.keys(a).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),c(o).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),c(o).parent().find(".evf-smart-tag-lists .evf-others").remove(),a)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+l+'">'+a[l]+"</li>");else for(var f in Object.keys(n).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),n)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+f+'">'+n[f]+"</li>");"calculations"===e&&(t=["number","payment-single","range-slider","payment-checkbox","payment-multiple"],c(document).find(".everest-forms-field").each(function(){t.includes(c(this).attr("data-field-type"))&&c(o).parents(".everest-forms-field-option-row-calculation_field").attr("data-field-id")!==c(this).attr("data-field-id")&&c(o).parent().find(".evf-smart-tag-lists .calculations").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+c(this).attr("data-field-id")+'">'+c(this).find(".label-title .text").text()+"</li>")}))}),c(document.body).on("click",".smart-tag-field",function(e){var t=c(this).data("field_id"),i=c(this).text(),o=c(this).data("type"),s=c(this).parent().parent().parent(),n=s.find("input[type=text]"),s=s.find("textarea");if("fullname"!==t&&"email"!==t&&"subject"!==t&&"message"!==t&&"other"!==o){for(var i=i.split(/[\s-_]/),r=0;r<i.length;r++)i[r]=0===r?i[r].charAt(0).toLowerCase()+i[r].substr(1):i[r].charAt(0).toUpperCase()+i[r].substr(1);t=(i=i.join(""))+"_"+t}"field"===o?(n.val(n.val()+'{field_id="'+t+'"}'),s.val(s.val()+'{field_id="'+t+'"}'),s.trigger("change")):"other"===o&&(n.val(n.val()+"{"+t+"}"),s.val(s.val()+"{"+t+"}"))}),c(document).on("change",".wp-list-table .everest-forms-toggle-form input",function(e){e.stopPropagation(),c.post(evf_data.ajax_url,{action:"everest_forms_enabled_form",security:evf_data.evf_enabled_form,form_id:c(this).data("form_id"),enabled:c(this).prop("checked")?1:0})}),c(document).on("change",".evf-content-email-settings .evf-toggle-switch input",function(e){var t=c(this),i=t.prop("checked");!1===i?(t.val(""),t.closest(".evf-content-email-settings").find(".email-disable-message").remove(),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").addClass("everest-forms-hidden"),c('<p class="email-disable-message everest-forms-notice everest-forms-notice-info">'+evf_data.i18n_email_disable_message+"</p>").insertAfter(t.closest(".evf-content-section-title"))):!0===i&&(t.val("1"),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").removeClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove())}),c(document).on("click",".everest-forms-min-max-date-format input",function(){var e=c(this).closest(".everest-forms-date").find(".everest-forms-min-date").val(),t=c(this).closest(".everest-forms-date").find(".everest-forms-min-date").val();c(this).is(":checked")?(c(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"),""===e&&c(".everest-forms-min-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){c(".everest-forms-min-date").val(t)},onOpen:function(e,t,i){i.set("maxDate",c(".everest-forms-max-date").val())}}),""===t&&c(".everest-forms-max-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){c(".everest-forms-max-date").val(t)},onOpen:function(e,t,i){i.set("minDate",c(".everest-forms-min-date").val())}})):c(".everest-forms-min-max-date-option").addClass("everest-forms-hidden")})});
1
+ !function(p,c){var a,m={init:function(){p(document).ready(function(e){e("evf-panel-integrations-button a").hasClass("active")||(e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").first().addClass("active"),e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").hasClass("active")&&e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").next(".everest-forms-active-connections").first().addClass("active"),e(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active"))}),p(document).ready(function(o){"1"===o(".everest-forms-min-max-date-format input").val()&&(o(".everest-forms-min-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){o(".everest-forms-min-date").val(t)},onOpen:function(e,t,i){i.set("maxDate",o(".everest-forms-max-date").val())}}),o(".everest-forms-max-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){o(".everest-forms-max-date").val(t)},onOpen:function(e,t,i){i.set("minDate",o(".everest-forms-min-date").val())}})),o(".everest-forms-min-max-date-format").each(function(){o(this).find('input[type="checkbox"]').is(":checked")?(o(this).next(".everest-forms-min-max-date-range-format").removeClass("everest-forms-hidden"),o(this).next().next(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"),o(this).next(".everest-forms-min-max-date-range-format").find('input[type="checkbox"]').is(":checked")&&(o(this).next().next().next(".everest-forms-min-max-date-range-option").removeClass("everest-forms-hidden"),o(this).next().next(".everest-forms-min-max-date-option").addClass("everest-forms-hidden"))):(o(this).next().next().next(".everest-forms-min-max-date-range-option").addClass("everest-forms-hidden"),o(this).next(".everest-forms-min-max-date-range-format").addClass("everest-forms-hidden"),o(this).next().next(".everest-forms-min-max-date-option").addClass("everest-forms-hidden"))}),o(".everest-forms-row-option select.evf-field-show-hide").each(function(){o(this).find('[selected="selected"]').prop("selected",!0)})}),p("evf-panel-payments-button a").hasClass("active")||(p("#everest-forms-panel-payments").find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-payment-setting-content").first().addClass("active")),p(document.body).find("#copy-shortcode").on("click",this.copyShortcode).on("aftercopy",this.copySuccess).on("aftercopyfailure",this.copyFail),p(document.body).find(".evf-copy-shortcode").each(function(){p(this).on("click",m.copyShortcode).on("aftercopy",m.copySuccess).on("aftercopyfailure",m.copyFail)}),p(document).ready(m.ready),p(window).on("load",m.load),p(document.body).on("evf-init-builder-fields",function(){m.bindFields()}).trigger("evf-init-builder-fields"),p(document.body).on("adjust_builder_width",function(){var e=p("#adminmenuwrap").width();p("#everest-forms-builder-form").css({width:"calc(100% - "+e+"px)"})}).trigger("adjust_builder_width"),p(document.body).on("click","#collapse-button",function(){p("#everest-forms-builder-form").width(""),p(document.body).trigger("adjust_builder_width")}),p(window).on("resize orientationchange",function(){clearTimeout(void 0),setTimeout(function(){p("#everest-forms-builder").width(""),p(document.body).trigger("adjust_builder_width")},250)}).trigger("resize")},copyShortcode:function(e){evfClearClipboard(),evfSetClipboard(p(this).closest(".evf-shortcode-field").find("input").val(),p(this)),e.preventDefault()},copySuccess:function(){p(this).tooltipster("content",p(this).attr("data-copied")).trigger("mouseenter").on("mouseleave",function(){var e=p(this);setTimeout(function(){e.tooltipster("content",e.attr("data-tip"))},1e3)})},copyFail:function(){p(this).closest(".evf-shortcode-field").find("input").focus().select()},load:function(){p(".everest-forms-overlay").fadeOut()},ready:function(){var e,t;a=p("#everest-forms-builder"),m.bindUIActions(),m.bindEditActions(),jconfirm.defaults={closeIcon:!0,backgroundDismiss:!0,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"400px",columnClass:"evf-responsive-class"},"undefined"!=typeof PerfectScrollbar&&(e=p(".everest-forms-tab-content"),t=p(".everest-forms-panel"),1<=e.length&&(window.evf_tab_scroller=new PerfectScrollbar(".everest-forms-tab-content",{suppressScrollX:!0})),t.each(function(){var e=p(this),t=e.attr("id");1<=e.find(".everest-forms-panel-sidebar").length&&(window.evf_setting_scroller=new PerfectScrollbar("#"+t+" .everest-forms-panel-sidebar"))})),a.on("change",".everest-forms-field-option-row-limit_enabled input",function(e){m.updateTextFieldsLimitControls(p(e.target).parents(".everest-forms-field-option-row-limit_enabled").data().fieldId,e.target.checked)}),a.on("change",".everest-forms-field-option-row-min_length_enabled input",function(e){m.updateTextFieldsMinLengthControls(p(e.target).parents(".everest-forms-field-option-row-min_length_enabled").data().fieldId,e.target.checked)}),a.on("change",".everest-forms-field-option-select .everest-forms-field-option-row-enhanced_select input",function(e){m.enhancedSelectFieldStyle(p(e.target).parents(".everest-forms-field-option-row-enhanced_select").data().fieldId,e.target.checked)}),a.on("click",".everest-forms-field-option-row-choices .everest-forms-btn-group span",function(e){var t;p(this).hasClass("upgrade-modal")&&"checkbox"===p(this).data("type")?(p(this).parent().find("span").addClass("is-active"),p(this).removeClass("is-active"),m.updateEnhandedSelectField(p(e.target).parents(".everest-forms-field-option-row-choices").data().fieldId,!1)):(p(this).parent().find("span").removeClass("is-active"),p(this).addClass("is-active"),m.updateEnhandedSelectField(p(e.target).parents(".everest-forms-field-option-row-choices").data().fieldId,"multiple"===p(this).data("selection"))),"multiple"===p(this).data("selection")&&"checkbox"===p(this).data("type")&&p(this).hasClass("is-active")?(t=p(this).parent().parent().data("field-id"),p("#everest-forms-field-option-row-"+t+"-select_all").show()):(t=p(this).parent().parent().data("field-id"),p("#everest-forms-field-option-row-"+t+"-select_all").hide())}),p(document.body).on("click",'.everest-forms-field, .everest-forms-field-select[data-field-type="select"]',function(){a.find(".everest-forms-field-option-row-choices .everest-forms-btn-group span").each(function(){var e=p(this).parent().parent().data("field-id");"multiple"===p(this).data("selection")&&"checkbox"===p(this).data("type")&&p(this).hasClass("is-active")?p("#everest-forms-field-option-"+e+"-select_all").parent().show():p("#everest-forms-field-option-"+e+"-select_all").parent().hide()})}),a.on("keyup",".everest-forms-search-fields",function(){var t=p(this).val().toLowerCase();p(".evf-registered-item").each(function(){var e=p(this);field_type=e.data("field-type"),field_label=e.text().toLowerCase(),-1<field_type.search(t)||-1<field_label.search(t)?(e.addClass("evf-searched-item"),e.show()):(e.removeClass("evf-searched-item"),e.hide())}),p(".everest-forms-add-fields-group").each(function(){p(this).find(".evf-registered-item.evf-searched-item").length<=0?p(this).hide():p(this).show()}),p(".evf-registered-item.evf-searched-item").length?p(".everest-forms-fields-not-found").addClass("hidden"):p(".everest-forms-fields-not-found").removeClass("hidden")}),p(document).trigger("everest_forms_ready")},updateTextFieldsLimitControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-limit_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-limit_controls").addClass("everest-forms-hidden")},updateTextFieldsMinLengthControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-min_length_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-min_length_controls").addClass("everest-forms-hidden")},enhancedSelectFieldStyle:function(e,t){var i=p("#everest-forms-field-"+e+" .primary-input"),e=p("#everest-forms-field-option-"+e+"-enhanced_select").is(":checked");t&&e&&i.prop("multiple")?(i.addClass("evf-enhanced-select"),p(document.body).trigger("evf-enhanced-select-init")):(i.removeClass("evf-enhanced-select enhanced"),i.filter(".select2-hidden-accessible").selectWoo("destroy"))},updateEnhandedSelectField:function(e,t){var i=p("#everest-forms-field-"+e+" .primary-input"),o=i.find(".placeholder"),s=p("#everest-forms-field-option-"+e+"-multiple_choices"),n=p("#everest-forms-field-option-row-"+e+"-choices input.default"),r=n.filter(":checked");s.val(t?1:0),i.prop("multiple",t),n.prop("type",t?"checkbox":"radio"),!t&&r.length&&(n.prop("checked",!1),p(r.get(0)).prop("checked",!0)),o.length&&t&&o.prop("selected",!t),m.enhancedSelectFieldStyle(e,t)},bindUIActions:function(){m.bindDefaultTabs(),m.checkEmptyGrid(),m.bindFields(),m.bindFormPreview(),m.bindFormPreviewWithKeyEvent(),m.bindFormEntriesWithKeyEvent(),m.bindGridSwitcher(),m.bindFieldSettings(),m.bindFieldDelete(),m.bindFieldDeleteWithKeyEvent(),m.bindCloneField(),m.bindSaveOption(),m.bindSaveOptionWithKeyEvent(),m.bindOpenShortcutKeysModalWithKeyEvent(),m.bindAddNewRow(),m.bindRemoveRow(),m.bindFormSettings(),m.bindFormEmail(),m.bindFormSmsNotifications(),m.bindFormConversational(),m.bindFormIntegrations(),m.bindFormPayment(),m.choicesInit(),m.bindToggleHandleActions(),m.bindLabelEditInputActions(),m.bindSyncedInputActions(),m.init_datepickers(),m.bindBulkOptionActions(),m.bindUIActionsFields(),"field-options"===c.tab&&p(".evf-panel-field-options-button").trigger("click"),p(document.body).on("everest-forms-field-drop",".evf-registered-buttons .evf-registered-item",function(){m.fieldDrop(p(this).clone())})},bindBulkOptionActions:function(){p(document.body).on("click",".evf-toggle-bulk-options",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-add_bulk_options").slideToggle()}),p(document.body).on("click",".evf-toggle-presets-list",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row .evf-options-presets").slideToggle()}),p(document.body).on("click",".evf-add-bulk-options",function(e){var t,i=p(this).closest(".everest-forms-field-option-row"),o=i.data("field-id");i.length&&(t=i.closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices .evf-choices-list"),i=(o=i.find("textarea#everest-forms-field-option-"+o+"-add_bulk_options")).val().split("\n"),m.addBulkOptions(i,t),o.val(""))}),p(document.body).on("click",".evf-options-preset-label",function(e){var t,i=p(this).closest(".everest-forms-field-option-row"),o=i.data("field-id");i.length&&(t=p(this).closest(".evf-options-preset").find(".evf-options-preset-value").val(),i.find("textarea#everest-forms-field-option-"+o+"-add_bulk_options").val(t),p(this).closest(".evf-options-presets").slideUp())}),p(document.body).on("click",".everest-forms-field-option-row-password_strength",function(){p(this).find('[type="checkbox"]:first').prop("checked")&&p(this).next().find('[type="checkbox"]:first').prop("checked",!1)}),p(document.body).on("click",".everest-forms-field-option-row-password_validation",function(){p(this).find('[type="checkbox"]:first').prop("checked")&&(p(this).prev().find('[type="checkbox"]:first').prop("checked",!1),p(this).prev().find(".everest-forms-inner-options").addClass("everest-forms-hidden"))})},addBulkOptions:function(e,i){e.forEach(function(e){var t;""!==e&&(t=i.find("li").last().find("a.add"),m.choiceAdd(null,t,e.trim()))})},init_datepickers:function(){var e=p(".everest-forms-disable-dates").data("date-format");p(".everest-forms-disable-dates").each(function(){p(this).get(0)._flatpickr||p(this).flatpickr({dateFormat:e,mode:"multiple"})}),p(document.body).on("change",".evf-date-format",function(e){var t=p(".everest-forms-field-option:visible .everest-forms-disable-dates"),i=t.get(0)._flatpickr,o=i.selectedDates,s=p(this).val(),n=[];o.forEach(function(e){n.push(flatpickr.formatDate(e,s))}),i.set("dateFormat",s),t.val(n.join(", "))}),p(document.body).on("click",".evf-clear-disabled-dates",function(){p(".everest-forms-field-option:visible .everest-forms-disable-dates").get(0)._flatpickr.clear()}),p(".everest-forms-field-date-time").each(function(){var e=p(this).attr("data-field-id");m.dateSettingToggler(e,p("#everest-forms-field-option-"+e+"-datetime_style").val())})},bindEditActions:function(){p("#edit-form-name").on("click",function(e){e.stopPropagation(),""!==p("#evf-edit-form-name").val().trim()&&m.toggleEditTitle(e)}),p("#evf-edit-form-name").on("change keypress",function(e){var t=p(this);e.stopPropagation(),13===e.which&&""!==p(this).val().trim()&&m.toggleEditTitle(e),""!==t.val().trim()&&p("#everest-forms-panel-field-settings-form_title").val(t.val().trim())}).on("click",function(e){e.stopPropagation()}),p(document).not(p(".everest-forms-title-desc")).on("click",function(e){var t=p("#evf-edit-form-name");e.stopPropagation(),!t.prop("disabled")&&t.val()&&""!==t.val().trim()&&m.toggleEditTitle(e)})},toggleEditTitle:function(e){var t=p("#edit-form-name").siblings("#evf-edit-form-name");e.preventDefault(),t.prop("disabled",function(e,t){return!t}),t.hasClass("everst-forms-name-editing")||t.focus(),t.toggleClass("everst-forms-name-editing")},formObject:function(e){for(var t=jQuery(e).find("[name]"),i={},o={},s=0;s<t.length;s++){var n=jQuery(t[s]),r=n.prop("name").replace(/\]/gi,"").split("["),a=n.val(),d={};if(!n.is(":radio")&&!n.is(":checkbox")||n.is(":checked")){for(var l=r.length-1;0<=l;l--){var f=r[l];if(0===(f=void 0===f?"":f).length&&(d=[],"undefined"==typeof o[r[l-1]]?o[r[l-1]]=0:o[r[l-1]]+=1,f=o[r[l-1]]),l===r.length-1){if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if(isNaN(parseFloat(a))||parseFloat(a).toString()!==a)if("string"!=typeof a||"{"!==a.substr(0,1)&&"["!==a.substr(0,1)){if("object"==typeof a&&a.length&&n.is("select")){for(var c={},l=0;l<a.length;l++)c["n"+l]=a[l];a=c}}else try{a=JSON.parse(a)}catch(v){}else a=parseFloat(a);d[f]=a}else{var m=d;(d={})[f]=m}}p.extend(!0,i,d)}}return i},bindUIActionsFields:function(){a.on("click",".everest-forms-field-option-row-choices .add",function(e){m.choiceAdd(e,p(this))}),a.on("click",".everest-forms-field-option-row-choices .remove",function(e){m.choiceDelete(e,p(this))}),a.on("mousedown",".everest-forms-field-option-row-choices input[type=radio]",function(){var e=p(this);e.is(":checked")?e.attr("data-checked","1"):e.attr("data-checked","0")}),a.on("click",".everest-forms-field-option-row-choices input[type=radio]",function(){var e=p(this),t=e.parent().parent();e.parent().parent().find("input[type=radio]").not(this).prop("checked",!1),"1"===e.attr("data-checked")&&(e.prop("checked",!1),e.attr("data-checked","0")),m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("change",".everest-forms-field-option-row-choices input[type=checkbox]",function(e){var t=p(this).parent().parent();m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("keyup paste focusout",".everest-forms-field-option-row-choices input.label, .everest-forms-field-option-row-choices input.value",function(e){var t=p(this).parent().parent().parent();m.choiceUpdate(t.data("field-type"),t.data("field-id"))}),a.on("change",".everest-forms-field-option-row-show_values input",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices ul").toggleClass("show-values")}),a.on("change",".everest-forms-field-option-row-choices_images input",function(){var e=p(this),t=e.parent().data("field-id"),i=p("#everest-forms-field-option-"+t),o=p("#everest-forms-field-option-"+t+"-input_columns"),s=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();e.parent().find(".notice").toggleClass("hidden"),i.find(".everest-forms-field-option-row-choices ul").toggleClass("show-images"),(e.is(":checked")?o.val("inline"):o.val("")).trigger("change"),m.choiceUpdate(s,t)}),a.on("click",".everest-forms-attachment-media-view .upload-button",function(e){var t,i,o=p(this);e.preventDefault(),i||(i=wp.media.frames.everestforms_media_frame=wp.media({title:c.i18n_upload_image_title,className:"media-frame everest-forms-media-frame",frame:"select",multiple:!1,library:{type:"image"},button:{text:c.i18n_upload_image_button}})).on("select",function(){var e=i.state().get("selection").first().toJSON();(t=o.hasClass("button-add-media")?(o.hide(),o.parent()):o.parent().parent().parent()).find(".source").val(e.url),t.find(".attachment-thumb").remove(),t.find(".thumbnail-image").prepend('<img class="attachment-thumb" src="'+e.url+'">'),t.find(".actions").show(),a.trigger("everestFormsImageUploadAdd",[o,t])}),i.open()}),a.on("click",".everest-forms-attachment-media-view .remove-button",function(e){e.preventDefault();e=p(this).parent().parent();e.find(".attachment-thumb").remove(),e.parent().find(".source").val(""),e.parent().find(".button-add-media").show(),a.trigger("everestFormsImageUploadRemove",[p(this),e])}),a.on("everestFormsImageUploadAdd everestFormsImageUploadRemove",function(e,t,i){var i=i.closest(".evf-choices-list"),o=i.data("field-type"),i=i.data("field-id");m.choiceUpdate(o,i)}),a.on("change",".everest-forms-field-option-row-input_columns select",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id"),i="";"inline"===t?i="everest-forms-list-inline":""!==t&&(i="everest-forms-list-"+t+"-columns"),p("#everest-forms-field-"+e).removeClass("everest-forms-list-inline everest-forms-list-2-columns everest-forms-list-3-columns").addClass(i)}),a.on("click",".everest-forms-fields-tab a",function(e){e.preventDefault(),m.fieldTabChoice(p(this).attr("id"))}),p(document).on("mouseenter",'.everest-forms-tabs li[class*="part_"]',function(){!1===p(this).hasClass("active")&&(p(document).find(".everest-forms-field").hasClass("ui-sortable-helper")||p(document).find(".evf-registered-buttons button.evf-registered-item").hasClass("field-dragged"))&&p(this).find("a").trigger("click")}),a.on("change",".everest-forms-field-option-address input.hide",function(){var e=p(this),t=e.parent().parent().data("field-id"),e=e.parent().parent().data("subfield");p("#everest-forms-field-"+t).find(".everest-forms-"+e).toggleClass("hidden")}),a.on("input",".everest-forms-field-option-row-label input",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id");($label=p("#everest-forms-field-"+e).find(".label-title .text")).hasClass("nl2br")?$label.html(t.replace(/\n/g,"<br>")):$label.html(t)}),a.on("change",".everest-forms-field-option-row-enable_prepopulate input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("parameter_name"),p(e.target).is(":checked")?p("#everest-forms-field-option-row-"+t+"-parameter_name").show():p("#everest-forms-field-option-row-"+t+"-parameter_name").hide()}),a.on("input",".everest-forms-field-option-row-description textarea",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id"),e=p("#everest-forms-field-"+e).find(".description");e.hasClass("nl2br")?e.html(t.replace(/\n/g,"<br>")):e.html(t)}),a.on("change",".everest-forms-field-option-row-required input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required"),p(e.target).is(":checked")?(p("#everest-forms-field-option-row-"+t+"-required_field_message_setting").show(),p("#everest-forms-field-option-"+t+"-required_field_message_setting-individual").is(":checked")&&p("#everest-forms-field-option-row-"+t+"-required-field-message").show()):(p("#everest-forms-field-option-row-"+t+"-required_field_message_setting").hide(),p("#everest-forms-field-option-row-"+t+"-required-field-message").hide())}),a.on("change",".everest-forms-field-option-row-required_field_message_setting input",function(e){var t=p(this).parent().parent().parent().parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required_field_message_setting"),"individual"===p(this).val()?p("#everest-forms-field-option-row-"+t+"-required-field-message").show():p("#everest-forms-field-option-row-"+t+"-required-field-message").hide()}),a.on("change",".everest-forms-field-option-row-confirmation input",function(e){var t=p(this).parent().data("field-id");p(e.target).is(":checked")?(p("#everest-forms-field-"+t).find(".everest-forms-confirm").removeClass("everest-forms-confirm-disabled").addClass("everest-forms-confirm-enabled"),p("#everest-forms-field-option-"+t).removeClass("everest-forms-confirm-disabled").addClass("everest-forms-confirm-enabled")):(p("#everest-forms-field-"+t).find(".everest-forms-confirm").removeClass("everest-forms-confirm-enabled").addClass("everest-forms-confirm-disabled"),p("#everest-forms-field-option-"+t).removeClass("everest-forms-confirm-enabled").addClass("everest-forms-confirm-disabled"))}),a.on("input",".everest-forms-field-option-row-placeholder input",function(e){var t=p(this),i=t.val(),t=t.parent().data("field-id"),t=p("#everest-forms-field-"+t).find(".widefat:not(.secondary-input)");t.is("select")?i.length?(t.find(".placeholder").length?t.find(".placeholder").text(i):t.prepend('<option class="placeholder" selected>'+i+"</option>"),t.data("placeholder",i),t.hasClass("enhanced")&&t.parent().find(".select2-search__field").prop("placeholder",i)):t.find(".placeholder").remove():t.attr("placeholder",i)}),a.on("input",".everest-forms-field-option-address input.placeholder",function(e){var t=p(this),i=t.val(),o=t.parent().parent().data("field-id"),t=t.parent().parent().data("subfield");p("#everest-forms-field-"+o).find(".everest-forms-"+t+" input").attr("placeholder",i)}),a.on("input",".everest-forms-field-option-row-confirmation_placeholder input",function(){var e=p(this),t=e.val(),e=e.parent().data("field-id");p("#everest-forms-field-"+e).find(".secondary-input").attr("placeholder",t)}),a.on("change",".everest-forms-field-option-row-label_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("label_hide")}),a.on("change",".everest-forms-field-option-row-sublabel_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("sublabel_hide")}),a.on("change",".everest-forms-field-option-row-datetime_format select, .everest-forms-field-option-row-phone_format select, .everest-forms-field-option-row-item_price select, .everest-forms-field-option-row-format select",function(e){var t=p(this),i=t.val(),t=t.parent().data("field-id");p("#everest-forms-field-"+t).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i),p("#everest-forms-field-option-"+t).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i)}),a.on("change",".everest-forms-field-option-row-datetime_style select",function(){m.dateSettingToggler(p(this).parent().attr("data-field-id"),p(this).val())}),p(".everest-forms-field-option-row-time_interval_format [id*=enable_min_max_time]").each(function(){p(this).prop("checked")?(p(this).parent().parent().find(".input-group-col-2").has(" [id*=min_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [id*=max_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [for*=select_min_time]").show(),p(this).parent().parent().find(".input-group-col-2").has("[for*=select_max_time]").show()):(p(this).parent().parent().find(".input-group-col-2").has("[id*=min_time_hour]").hide(),p(this).parent().parent().find(".input-group-col-2").has("[id*=max_time_hour]").hide(),p(this).parent().parent().find("[for*=select_min_time]").hide(),p(this).parent().parent().find("[for*=select_max_time]").hide())}),a.on("click",".everest-forms-field-option-row-time_interval_format [id*=enable_min_max_time]",function(){p(this).prop("checked")?(p(this).parent().parent().find(".input-group-col-2").has(" [id*=min_time_hour]").show(),p(this).parent().parent().find(".input-group-col-2").has(" [id*=max_time_hour]").show(),p(this).parent().parent().find("[for*=select_min_time]").show(),p(this).parent().parent().find("[for*=select_max_time]").show()):(p(this).parent().parent().find(".input-group-col-2").has("[id*=min_time_hour]").hide(),p(this).parent().parent().find(".input-group-col-2").has("[id*=max_time_hour]").hide(),p(this).parent().parent().find("[for*=select_min_time]").hide(),p(this).parent().parent().find("[for*=select_max_time]").hide())}),a.on("change",".everest-forms-field-option-row-time_interval_format select[id*=time_format]",function(){min_hour=p(this).parent().siblings(".input-group-col-2").find("[id*=min_time_hour]"),max_hour=p(this).parent().siblings(".input-group-col-2").find("[id*=max_time_hour]");var e,t,o=min_hour.find("option:selected").val(),s=max_hour.find("option:selected").val(),n="";for(i=0;i<=23;i++)"H:i"===p(this).val()?n+='<option value = "'+i+'">'+(i<10?"0"+i:i)+"</option>":(e=" PM",0==(t=i<12?(e=" AM",i):i-12)&&(t=12),n+='<option value = "'+i+'">'+t+e+"</option>");min_hour.html(n),max_hour.html(n),min_hour.find("option[value="+o+"]").prop("selected",!0),max_hour.find("option[value="+s+"]").prop("selected",!0)})},dateSettingToggler:function(e,t){"picker"==t?(p("#everest-forms-field-option-row-"+e+"-placeholder").show(),p("#everest-forms-field-option-"+e+"-disable_dates").show(),p("label[for=everest-forms-field-option-"+e+"-disable_dates]").show(),p("#everest-forms-field-option-"+e+"-date_mode-range").parents().find("everest-forms-checklist").show(),p(".everest-forms-field-option-row-date_format .time_interval").show(),p("#everest-forms-field-option-"+e+"-date_localization").show(),p("label[for=everest-forms-field-option-"+e+"-date_localization]").show(),p("#everest-forms-field-option-"+e+"-date_default").parent().show(),p("#everest-forms-field-option-"+e+"-past_date_disable").parent().show(),p("#everest-forms-field-option-"+e+"-enable_min_max").parent().show(),p("#everest-forms-field-option-"+e+"-enable_min_max").prop("checked")&&(p("#everest-forms-field-option-"+e+"-set_date_range").parent().show(),(p("#everest-forms-field-option-"+e+"-set_date_range").prop("checked")?p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-range-option"):p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-option")).removeClass("everest-forms-hidden")),p("#everest-forms-field-option-"+e+"-time_interval").show(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").hide(),p("label[for=everest-forms-field-option-"+e+"-enable_min_max_time]").hide(),p("label[for=everest-forms-field-option-"+e+"-select_min_time]").hide(),p("label[for=everest-forms-field-option-"+e+"-select_max_time]").hide(),p("#everest-forms-field-option-"+e+"-min_time_hour").parent().hide(),p("#everest-forms-field-option-"+e+"-max_time_hour").parent().hide()):(p("#everest-forms-field-option-"+e+"-date_mode-range").parents().find("everest-forms-checklist").hide(),p("#everest-forms-field-option-"+e+"-date_default").parent().hide(),p("#everest-forms-field-option-"+e+"-past_date_disable").parent().hide(),p("#everest-forms-field-option-row-"+e+"-placeholder").hide(),p("#everest-forms-field-option-"+e+"-enable_min_max").parent().hide(),p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-option").addClass("everest-forms-hidden"),p("#everest-forms-field-option-"+e+"-set_date_range").parent().hide(),p("#everest-forms-field-option-row-"+e+"-date_format .everest-forms-min-max-date-range-option").addClass("everest-forms-hidden"),p("#everest-forms-field-option-"+e+"-disable_dates").hide(),p("label[for=everest-forms-field-option-"+e+"-disable_dates]").hide(),p(".everest-forms-field-option-row-date_format .everest-forms-checklist").hide(),p(".everest-forms-field-option-row-date_format .time_interval").hide(),p("#everest-forms-field-option-"+e+"-date_localization").hide(),p("label[for=everest-forms-field-option-"+e+"-date_localization]").hide(),p("#everest-forms-field-option-"+e+"-time_interval").hide(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").show(),p("label[for=everest-forms-field-option-"+e+"-enable_min_max_time]").show(),p("#everest-forms-field-option-"+e+"-enable_min_max_time").prop("checked")&&(p("label[for=everest-forms-field-option-"+e+"-select_min_time]").show(),p("label[for=everest-forms-field-option-"+e+"-select_max_time]").show(),p("#everest-forms-field-option-"+e+"-min_time_hour").parent().show(),p("#everest-forms-field-option-"+e+"-max_time_hour").parent().show()))},choicesInit:function(e){p(e=e||".everest-forms-field-option-row-choices ul").sortable({items:"li",axis:"y",handle:".sort",scrollSensitivity:40,stop:function(e){var e=p(e.target).attr("data-field-id"),t=p("#everest-forms-field-option-"+e).find(".everest-forms-field-option-hidden-type").val();m.choiceUpdate(t,e)}})},choiceAdd:function(e,t,i){e&&e.preventDefault&&e.preventDefault();var e=p(t),t=e.parent(),o=t.find("input.default").is(":checked"),e=e.closest(".everest-forms-field-option-row-choices").data("field-id"),s=t.parent().attr("data-next-id"),n=t.parent().data("field-type"),r=t.clone().insertAfter(t);r.attr("data-key",s),r.find("input.label").val(i).attr("name","form_fields["+e+"][choices]["+s+"][label]"),r.find("input.value").val(i).attr("name","form_fields["+e+"][choices]["+s+"][value]"),r.find("input.source").val("").attr("name","form_fields["+e+"][choices]["+s+"][image]"),r.find("input.default").attr("name","form_fields["+e+"][choices]["+s+"][default]").prop("checked",!1),r.find(".attachment-thumb").remove(),r.find(".button-add-media").show(),!0===o&&t.find("input.default").prop("checked",!0),s++,t.parent().attr("data-next-id",s),a.trigger("everestFormsChoiceAdd"),m.choiceUpdate(n,e)},choiceDelete:function(e,t){e.preventDefault();e=p(t),t=e.parent().parent();t.find("li").length<2?p.alert({title:!1,content:c.i18n_field_error_choice,icon:"dashicons dashicons-info",type:"blue",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}):(e.parent().remove(),m.choiceUpdate(t.data("field-type"),t.data("field-id")),a.trigger("everestFormsChoiceDelete"))},choiceUpdate:function(s,n){var e,t,r,i=p("#everest-forms-field-option-"+n);if($primary=p("#everest-forms-field-"+n+" .primary-input"),"radio"===s||"checkbox"===s||"payment-multiple"===s||"payment-checkbox"===s)return e=[],i=m.formObject(i).form_fields[n],p("#everest-forms-field-option-"+n).find(".evf-choices-list li").each(function(){e.push(p(this).data("key"))}),t=wp.template("everest-forms-field-preview-choices"),data={type:s="checkbox"===s||"payment-checkbox"===s?"checkbox":"radio",order:e,settings:i,amountFilter:m.amountFilter},void p("#everest-forms-field-"+n).find("ul.primary-input").replaceWith(t(data));"select"===s&&(r="<option>{label}</option>",$primary.find("option").not(".placeholder").remove()),p("#everest-forms-field-option-row-"+n+"-choices .evf-choices-list li").each(function(e){var t=p(this),i=t.find("input.label").val(),t=t.find("input.default").is(":checked"),o=p(r.replace("{label}",i));if(p("#everest-forms-field-"+n+" .primary-input").append(o),i&&!0===t)switch(s){case"select":o.prop("selected",!0);break;case"radio":case"checkbox":o.find("input").prop("checked",!0)}})},amountFilter:function(e,t){return"right"===e.currency_symbol_pos?t+" "+e.currency_symbol:e.currency_symbol+" "+t},bindFormSettings:function(){p("body").on("click",".evf-setting-panel",function(e){var t=p(this).attr("data-section");p(".evf-setting-panel").removeClass("active"),p(".everest-forms-active-email").removeClass("active"),p(".everest-forms-active-sms-notifications").removeClass("active"),p(".everest-forms-active-conversational-forms").removeClass("active"),p(".evf-content-section").removeClass("active"),p(this).addClass("active"),p(".evf-content-"+t+"-settings").addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormEmail:function(){p("body").on("click",".everest-forms-panel-sidebar-section-email",function(e){p(this).siblings(".everest-forms-active-email").removeClass("active"),p(this).next(".everest-forms-active-email").addClass("active");var t=p(this).siblings(".everest-forms-active-email.active").find(".everest-forms-active-email-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormSmsNotifications:function(){p("body").on("click",".everest-forms-panel-sidebar-section-sms-notifications",function(e){p(this).siblings(".everest-forms-active-sms-notifications").removeClass("active"),p(this).next(".everest-forms-active-sms-notifications").addClass("active");var t=p(this).siblings(".everest-forms-active-sms-notifications.active").find(".everest-forms-active-sms-notifications-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormConversational:function(){p("body").on("click",".everest-forms-panel-sidebar-section-conversational-forms ",function(e){p(this);p(this).siblings(".everest-forms-active-conversational-forms").removeClass("active"),p(this).next(".everest-forms-active-conversational-forms").addClass("active");var t=p(this).siblings(".everest-forms-active-conversational-forms.active");t.length&&t.children(".evf-content-tab ").trigger("click"),e.preventDefault()})},bindFormIntegrations:function(){p("body").on("click",".evf-integrations-panel",function(e){var t=p(this).attr("data-section"),i=(p(".evf-integrations-panel").removeClass("active"),p("#everest-forms-panel-integrations").find(".evf-panel-content-section").removeClass("active"),p(this).addClass("active"),p(this).parent().find(".everest-forms-active-connections").removeClass("active"),p(this).next(".everest-forms-active-connections").addClass("active"),p(this).siblings(".everest-forms-active-connections.active").find(".everest-forms-active-connections-list li"));i.length&&i.children(".user-nickname").first().trigger("click"),p(".evf-panel-content-section-"+t).addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormPayment:function(){p("body").on("click",".evf-payments-panel",function(e){var t=p(this).attr("data-section");p(".evf-payments-panel").removeClass("active"),p(this).siblings().removeClass("icon active"),p(this).addClass("active"),p(this).parents("#everest-forms-panel-payments").find(".evf-payment-setting-content").removeClass("active").hide(),p(".evf-content-"+t+"-settings").addClass("active").show(),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},removeRow:function(e){p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id"),e=p("#everest-forms-field-option-"+e);p(this).remove(),e.remove()}),e.remove()},bindRemoveRow:function(){p("body").on("click",".evf-delete-row",function(){var e=p(this),t=p(".evf-admin-row").length,i=e.closest(".evf-admin-row"),o=i.attr("data-row-id"),e=e.parents(".evf-admin-field-container").attr("data-current-part"),s=p("#everest-forms-builder").hasClass("multi-part-activated");(t=e&&s?p("#part_"+e).find(".evf-admin-row").length:t)<2?p.alert({title:c.i18n_row_locked,content:c.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_delete_row_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.removeRow(i),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),p("#everest-forms-row-option-row_"+o).remove()}},cancel:{text:c.i18n_cancel}}})})},bindAddNewRow:function(){p("body").on("click",".evf-add-row span",function(){p("#add-fields").trigger("click");var t,e=p(this),i=p(".evf-admin-field-wrapper"),o=p(".evf-admin-row").map(function(){return p(this).data("row-id")}).get(),o=Math.max.apply(Math,o),s=p(".evf-admin-row").eq(0).clone(),n=e.parent().attr("data-total-rows"),r=e.parents(".evf-admin-field-container").attr("data-current-part");o++,n++,r&&(i=p(".evf-admin-field-wrapper").find("#part_"+r)),s.find(".evf-admin-grid").html(""),s.attr("data-row-id",o),e.parent().attr("data-total-rows",n),e.parent().attr("data-next-row-id",o),0<p(".everest-forms-row-options").length&&!1===e.closest(".evf-add-row").hasClass("repeater-row")?(s.find("div").hide(),s.css({padding:"40px"}).append('<i class="spinner is-active" style="margin:0px auto;"></i>'),i.append(s),m.bindFields(),m.checkEmptyGrid(),t=s.attr("data-row-id"),r=window.evf_data,p.ajax({url:r.ajax_url,type:"POST",data:{action:"everest_forms_new_row",security:r.evf_add_row_nonce,form_id:r.form_id,row_id:t},success:function(e){!0===e.success&&"undefined"!=typeof e.data.html&&(p(document).find(".everest-forms-row-option-group").append(e.data.html),m.conditionalLogicAppendRow(t),p("#everest-forms-panel-field-form_rows-connection_row_"+t+"-conditional_logic_status").prop("checked",!1))}}).always(function(){s.css({padding:0}),s.find("div").show(),s.find(".evf-toggle-row-content").css("display","none"),s.find("i").remove(),e.trigger("everest-forms-after-add-row",s)})):(i.append(s),m.bindFields(),m.checkEmptyGrid(),e.trigger("everest-forms-after-add-row",s))})},bindCloneField:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-duplicate",function(){var e=p(this).closest(".everest-forms-field");e.hasClass("no-duplicate")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_duplicate_field_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.cloneFieldAction(e)}},cancel:{text:c.i18n_cancel}}})}),p("body").on("click",".evf-admin-row .evf-duplicate-row",function(){var e=p(this).closest(".evf-admin-row");e.find(".everest-forms-field").hasClass("no-duplicate")?p.alert({title:c.i18n_field_locked,content:c.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_duplicate_row_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){m.cloneRowAction(e)}},cancel:{text:c.i18n_cancel}}})})},cloneRowAction:function(t){row_ids=p(".evf-admin-row").map(function(){return p(this).data("row-id")}).get(),max_row_id=Math.max.apply(Math,row_ids),row_clone=t.clone(),total_rows=p(".evf-add-row").attr("data-total-rows"),max_row_id++,total_rows++,row_clone.attr("data-row-id",max_row_id),p(".evf-add-row").attr("data-total-rows",total_rows),p(".evf-add-row").attr("data-next-row-id",max_row_id);var e={action:"everest_forms_get_next_id",security:c.evf_get_next_id,form_id:c.form_id,fields:row_clone.find(".everest-forms-field").length};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){"boolean"==typeof e.success&&!0===e.success&&(t.after(row_clone),p.each(e.data,function(e,t){var i=t.field_id,t=t.field_key,i=(p("#everest-forms-field-id").val(i),(field=row_clone.find(".everest-forms-field").eq(e)).attr("data-field-id"));m.render_node(field,i,t),field.remove(),p(document.body).trigger("init_field_options_toggle")}),m.bindFields())}})},cloneFieldAction:function(i){var o=i.attr("data-field-id"),e=c.form_id,e={action:"everest_forms_get_next_id",security:c.evf_get_next_id,form_id:e};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t;"boolean"==typeof e.success&&!0===e.success&&(t=e.data.field_id,e=e.data.field_key,p("#everest-forms-field-id").val(t),m.render_node(i,o,e),p(document.body).trigger("init_field_options_toggle"))}})},render_node:function(e,o,s){var t=p(".everest-forms-field-options #everest-forms-field-option-"+o),i=p("#everest-forms-field-option-"+o+"-label").val(),n=p("#everest-forms-field-option-"+o+"-meta-key").length?p("#everest-forms-field-option-"+o+"-meta-key").val():"",r=e.attr("data-field-type"),a=t.html(),i=i+" "+c.i18n_copy,n="html"!==r?n.replace(/\(|\)/g,"").toLowerCase().substring(0,n.lastIndexOf("_"))+"_"+Math.floor(1e3+9e3*Math.random()):"",d=e.clone(),l=new RegExp(o,"g"),a=a.replace(l,s),f=p('<div class="everest-forms-field-option everest-forms-field-option-'+r+'" id="everest-forms-field-option-'+s+'" data-field-id="'+s+'" />');f.append(a),p.each(t.find(":input"),function(){var e,t=p(this).attr("type"),i=(p(this).attr("name")?p(this).attr("name"):"").replace(l,s);"text"===t||"hidden"===t?(e=p(this).val(),f.find('input[name="'+i+'"]').val(e),f.find('input[value="'+o+'"]').val(s)):"checkbox"===t||"radio"===t?p(this).is(":checked")?f.find('input[name="'+i+'"]').prop("checked",!0).attr("checked","checked"):f.find('[name="'+i+'"]').prop("checked",!1).attr("checked",!1):p(this).is("select")?p(this).find("option:selected").length&&(e=p(this).find("option:selected").val(),f.find('[name="'+i+'"]').find('[value="'+e+'"]').prop("selected",!0)):""!==p(this).val()&&f.find('[name="'+i+'"]').val(p(this).val())}),p(".everest-forms-field-options").append(f),p("#everest-forms-field-option-"+s+"-label").val(i),p("#everest-forms-field-option-"+s+"-meta-key").val(n),d.attr("class",e.attr("class")),d.attr("id","everest-forms-field-"+s),d.attr("data-field-id",s),d.attr("data-field-type",r),d.find(".label-title .text").text(i),e.closest(".evf-admin-grid").find('[data-field-id="'+o+'"]').after(d),p(document).trigger("everest-form-cloned",[s,r]),m.switchToFieldOptionPanel(s),p(document.body).trigger("evf_render_node_complete",[r,s,d,f])},bindFieldDelete:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-delete",function(){var t=p(this).closest(".everest-forms-field"),e=t.attr("data-field-id"),i=p("#everest-forms-field-option-"+e);p(this).closest(".evf-admin-grid");t.hasClass("no-delete")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:c.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),t.fadeOut("slow",function(){var e=t.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),t.remove(),i.remove(),m.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),m.conditionalLogicRemoveField(e),m.conditionalLogicRemoveFieldIntegration(e),m.paymentFieldRemoveFromQuantity(e)})}},cancel:{text:c.i18n_cancel}}})})},bindFieldDeleteWithKeyEvent:function(){p("body").on("keyup",function(e){var t,i=p(".everest-forms-preview .everest-forms-field.active");46===e.which&&!0===i.hasClass("active")&&!1===i.hasClass("evf-delete-event-active")&&0!=p(".evf-admin-row").hasClass("evf-hover")&&(i.addClass("evf-delete-event-active"),e=i.attr("data-field-id"),t=p("#everest-forms-field-option-"+e),i.hasClass("no-delete")?p.alert({title:c.i18n_field_locked,content:c.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"],action:function(){i.removeClass("evf-delete-event-active")}}}}):p.confirm({title:!1,content:c.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),i.fadeOut("slow",function(){var e=i.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),i.remove(),t.remove(),m.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),m.conditionalLogicRemoveField(e),m.conditionalLogicRemoveFieldIntegration(e),m.paymentFieldRemoveFromQuantity(e)}),i.removeClass("evf-delete-event-active")}},cancel:{text:c.i18n_cancel,action:function(){i.removeClass("evf-delete-event-active")}}}}))})},bindSaveOption:function(){p("body").on("click",".everest-forms-save-button",function(){var t=p(this),e=p("form#everest-forms-builder-form"),i=m.getStructure(),o=e.serializeArray(),s=p("#evf-edit-form-name").val().trim();if(p(document).trigger("everest_forms_save_args",[o]),""===s)p.alert({title:c.i18n_field_title_empty,content:c.i18n_field_title_payload,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}});else{e.triggerHandler("everest_forms_process_ajax_data",[t,o])&&(o=e.triggerHandler("everest_forms_process_ajax_data",[t,o])),p(".everest-forms-panel-content-wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});for(var n,r=[],a=(p(".everest-forms-field[data-field-id]").each(function(){r.push(p(this).attr("data-field-id"))}),o.length);a--;)o[a].name.startsWith("form_fields")&&(n=!1,r.forEach(function(e){o[a].name.startsWith("form_fields["+e+"]")&&(n=!0)}),-1<a&&!1===n&&o.splice(a,1));s=o.concat(i),e={action:"everest_forms_save_form",security:c.evf_save_form,form_data:JSON.stringify(s)};p.ajax({url:c.ajax_url,data:e,type:"POST",beforeSend:function(){t.addClass("processing"),t.find(".loading-dot").remove(),t.append('<span class="loading-dot"></span>')},success:function(e){t.removeClass("processing"),t.find(".loading-dot").remove(),p(document).trigger("everest_forms_save_data",e.data),e.success||p.alert({title:e.data.errorTitle,content:e.data.errorMessage,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:c.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}),p(".everest-forms-panel-content-wrap").unblock()}})}})},bindSaveOptionWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"s"!==String.fromCharCode(e.which).toLowerCase()&&83!==e.which||(e.preventDefault(),p(".everest-forms-save-button").trigger("click"))})},bindOpenShortcutKeysModalWithKeyEvent:function(){p("body").on("keydown",function(e){var i;!e.ctrlKey&&!e.metaKey||"h"!==String.fromCharCode(e.which).toLowerCase()&&72!==e.which||(e.preventDefault(),i="",p.each(c.i18n_shortcut_keys,function(e,t){i+=`
2
  <ul class="evf-shortcut-keyword">
3
  <li>
4
  <div class="evf-shortcut-title">${t}</div>
8
  </div>
9
  </li>
10
  </ul>
11
+ `}),p.alert({title:c.i18n_shortcut_key_title,content:i,icon:"dashicons dashicons-info",type:"blue",boxWidth:"550px",buttons:{confirm:{text:c.i18n_close,btnClass:"btn-confirm",keys:["enter"]}},onContentReady:function(){p("body").on("keydown",function(e){(e.ctrlKey||e.metaKey&&"h"===String.fromCharCode(e.which).toLowerCase()||72===e.which)&&p(".btn-confirm").trigger("click")})}}))})},getStructure:function(){var e=p(".evf-admin-field-wrapper"),n=[];return p.each(e.find(".evf-admin-row"),function(){var e=p(this),s=e.attr("data-row-id");p.each(e.find(".evf-admin-grid"),function(){var e=p(this),i=e.attr("data-grid-id"),o=0;p.each(e.find(".everest-forms-field"),function(){var e={name:"",value:""},t=p(this).attr("data-field-id");e.name="structure[row_"+s+"][grid_"+i+"]["+o+"]",o++,e.value=t,n.push(e)}),e.find(".everest-forms-field").length<1&&n.push({name:"structure[row_"+s+"][grid_"+i+"]",value:""})})}),n},getFieldArray:function(e){var t=[];return p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id");t.push(e)}),t},checkEmptyGrid:function(e){p.each(p(".evf-admin-grid"),function(){p(this).find(".everest-forms-field, .evf-registered-item:not(.ui-draggable-dragging)").not(".ui-sortable-helper").length<1?p(this).addClass("evf-empty-grid"):p(this).removeClass("evf-empty-grid")}),m.choicesInit()},bindDefaultTabs:function(){p(document).on("click",".evf-nav-tab-wrapper a",function(e){e.preventDefault(),m.switchTab(p(this).data("panel"))})},switchTab:function(e){var t=p("#everest-forms-panel-"+e),i=p(".evf-panel-"+e+"-button");p(".evf-nav-tab-wrapper").find("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),t.closest(".evf-tab-content").find(".everest-forms-panel").removeClass("active"),t.addClass("active"),"integrations"!==e&&"payments"!==e||(t.find(".everest-forms-panel-sidebar a").hasClass("active")||t.find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-panel-content-section").hasClass("active")||p(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active")),history.replaceState({},null,m.updateQueryString("tab",e)),m.switchPanel(e)},updateQueryString:function(e,t,i){i=i||window.location.href;var o,s=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");return s.test(i)?null!=t?i.replace(s,"$1"+e+"="+t+"$2$3"):(i=(o=i.split("#"))[0].replace(s,"$1$3").replace(/(&|\?)$/,""),"undefined"!=typeof o[1]&&null!==o[1]&&(i+="#"+o[1]),i):(null!=t&&(s=-1!==i.indexOf("?")?"&":"?",i=(o=i.split("#"))[0]+s+e+"="+t,"undefined"!=typeof o[1]&&null!==o[1]&&(i+="#"+o[1])),i)},switchPanel:function(e){"field-options"===e&&m.switchToFieldOptionPanel()},switchToFieldOptionPanel:function(e){p(".everest-forms-field-options").find(".no-fields").hide(),p(".evf-admin-field-wrapper .everest-forms-field").removeClass("active"),p("#everest-forms-panel-fields").addClass("active"),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").last().addClass("active"),p(".everest-forms-add-fields").hide(),p(".everest-forms-field-options").show(),p(".everest-forms-field-options").find(".everest-forms-field-option").hide(),p(".evf-tab-lists").find("li a").removeClass("active"),p(".evf-tab-lists").find("li.evf-panel-field-options-button a").addClass("active"),p(document.body).trigger("evf-init-switch-field-options"),void 0!==e?(p("#everest-forms-field-option-"+e).show(),p("#everest-forms-field-"+e).addClass("active")):0<p(".evf-admin-field-wrapper .everest-forms-field").length?(p(".evf-admin-field-wrapper .everest-forms-field").eq(0).addClass("active"),p("#everest-forms-field-option-"+p(".evf-admin-field-wrapper .everest-forms-field").eq(0).attr("data-field-id")).show()):p(".everest-forms-field-options").find(".no-fields").show()},bindFields:function(){p(".evf-admin-field-wrapper").sortable({items:".evf-admin-row",axis:"y",cursor:"move",opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,placeholder:"evf-sortable-placeholder",containment:".everest-forms-panel-content",start:function(e,t){t.item.css({backgroundColor:"#f7fafc",border:"1px dashed #5d96ee"})},stop:function(e,t){t.item.removeAttr("style")}}).disableSelection(),p(".evf-admin-grid").sortable({items:'> .everest-forms-field[data-field-type!="repeater-fields"]',delay:100,opacity:.65,cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,connectWith:".evf-admin-grid",appendTo:document.body,containment:".everest-forms-field-wrap",out:function(e){p(".evf-admin-grid").removeClass("evf-hover"),p(e.target).removeClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").removeClass("evf-hover"),m.checkEmptyGrid()},over:function(e,t){p(".evf-admin-grid").addClass("evf-hover"),p(e.target).addClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").addClass("evf-hover"),m.checkEmptyGrid()},receive:function(e,t){t.sender.is("button")&&m.fieldDrop(t.helper)},update:function(e,t){p(document).trigger("evf_sort_update_complete",{event:e,ui:t})},stop:function(e,t){t.item.removeAttr("style"),m.checkEmptyGrid()}}).disableSelection(),p(".evf-registered-buttons button.evf-registered-item").draggable({delay:200,cancel:!1,scroll:!1,revert:"invalid",scrollSensitivity:40,forcePlaceholderSize:!0,start:function(){p(this).addClass("field-dragged")},helper:function(){return p(this).clone().insertAfter(p(this).closest(".everest-forms-tab-content").siblings(".everest-forms-fields-tab"))},stop:function(){p(this).removeClass("field-dragged")},opacity:.75,containment:"#everest-forms-builder",connectToSortable:".evf-admin-grid"}).disableSelection(),p(".evf-registered-item.evf-repeater-field").draggable("option","connectToSortable",".evf-repeatable-grid"),p(".evf-admin-row").on("mouseenter mouseleave",function(e){e.buttons<1&&("mouseenter"===e.type?p(this).addClass("evf-hover"):p(".evf-admin-row").removeClass("evf-hover"))}),p(".everest-forms-panel-content").on("scroll",function(){p(".evf-admin-grid").sortable("refreshPositions"),p(".evf-admin-field-wrapper").sortable("refreshPositions")})},fieldTabChoice:function(e){p(".everest-forms-tab-content").scrollTop(0),p(".everest-forms-fields-tab a").removeClass("active"),p(".everest-forms-field, .everest-forms-title-desc").removeClass("active"),p("#"+e).addClass("active"),"add-fields"===e?(p(".everest-forms-add-fields").show(),p(".everest-forms-field-options").hide()):("field-options"===e?(e=p(".everest-forms-field").first().data("field-id"),p(".everest-forms-field-options").show(),p(".everest-forms-field").first().addClass("active")):p("#everest-forms-field-"+e).addClass("active"),p(".everest-forms-field-option").hide(),p("#everest-forms-field-option-"+e).show(),p(".everest-forms-add-fields").hide())},bindFormPreview:function(){},bindFormPreviewWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"p"!==String.fromCharCode(e.which).toLowerCase()&&80!==e.which||(e.preventDefault(),window.open(c.preview_url))})},bindFormEntriesWithKeyEvent:function(){p("body").on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"e"!==String.fromCharCode(e.which).toLowerCase()&&69!==e.which||(e.preventDefault(),window.open(c.entries_url))})},bindGridSwitcher:function(){p("body").on("click",".evf-show-grid",function(e){e.stopPropagation(),m.checkEmptyGrid(),p(this).closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideToggle(200)}),p(document).on("click",function(){m.checkEmptyGrid(),p(".evf-show-grid").closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideUp(200)});p("body").on("click",".evf-grid-selector",function(){var e=p(this).closest(".evf-admin-row");if(!p(this).hasClass("active")){var t=parseInt(p(this).attr("data-evf-grid"),10);if(!(4<t)){var i=p('<div class="evf-admin-grid evf-grid-'+t+' ui-sortable evf-empty-grid" />'),o=p("<div/>");p.each(e.find(".evf-admin-grid"),function(){p(this).children("*").each(function(){o.append(p(this).clone())})}),e.find(".evf-admin-grid").remove(),e.find(".evf-clear ").remove(),e.append('<div class="clear evf-clear"></div>');for(var s=1;s<=t;s++)i.attr("data-grid-id",s),e.append(i.clone());e.append('<div class="clear evf-clear"></div>'),e.find(".evf-admin-grid").eq(0).append(o.html()),e.find(".evf-grid-selector").removeClass("active"),p(this).addClass("active"),m.bindFields()}}})},fieldDrop:function(r){var e=r.attr("data-field-type");if(["payment-total"].includes(e)&&r.closest(".evf-admin-row").hasClass("evf-repeater-fields"))return p.confirm({title:!1,content:"This field cannot be added to Repeater Fields",type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{cancel:{text:c.i18n_close,btnClass:"btn-default"}}}),r.remove(),!1;r.css({left:"0",width:"100%"}).append('<i class="spinner is-active"></i>'),p.ajax({url:c.ajax_url,type:"POST",data:{action:"everest_forms_new_field_"+e,security:c.evf_field_drop_nonce,field_type:e,form_id:c.form_id},beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t=e.data.preview,i=e.data.options,o=e.data.form_field_id,e=e.data.field.type,s=p(t).attr("id"),n=p(t).attr("data-field-id");p("#everest-forms-field-id").val(o),p(".everest-forms-field-options").find(".no-fields").hide(),p(".everest-forms-field-options").append(i),p(".everest-forms-field-option-row-icon_color input.colorpicker").wpColorPicker({change:function(e){var t=p(this),i=t.val(),t=t.closest(".everest-forms-field-option-row").data("field-id");p("#everest-forms-field-"+t+" .rating-icon svg").css("fill",i)}}),r.after(t),null!==p("#everest-forms-panel-field-settings-enable_survey")&&p("#everest-forms-panel-field-settings-enable_survey").prop("checked")&&p("#everest-forms-field-option-"+n+"-survey_status").prop("checked",!0),null!==p("#everest-forms-panel-field-settings-enable_quiz")&&p("#everest-forms-panel-field-settings-enable_quiz").prop("checked")&&(p("#everest-forms-field-option-"+n+"-quiz_status").prop("checked",!0),p("#everest-forms-field-option-"+n+"-quiz_status").closest(".everest-forms-field-option-row-quiz_status").siblings(".everst-forms-field-quiz-settings").removeClass("everest-forms-hidden").addClass("everest-forms-show")),r.remove(),p(document.body).trigger("init_tooltips"),p(document.body).trigger("init_field_options_toggle"),p(document.body).trigger("evf_after_field_append",[s]),m.conditionalLogicAppendField(s),m.conditionalLogicAppendFieldIntegration(s),m.paymentFieldAppendToQuantity(s),m.paymentFieldAppendToDropdown(n,e),m.init_datepickers(),p("#everest-forms-field-option-"+n+"-enable_min_max_time").hide(),p("label[for=everest-forms-field-option-"+n+"-enable_min_max_time]").hide(),p("label[for=everest-forms-field-option-"+n+"-select_min_time]").hide(),p("label[for=everest-forms-field-option-"+n+"-select_max_time]").hide(),p("#everest-forms-field-option-"+n+"-min_time_hour").parent().hide(),p("#everest-forms-field-option-"+n+"-max_time_hour").parent().hide(),p(document.body).trigger("evf_field_drop_complete",[e,n,t,i]),m.checkEmptyGrid()}})},conditionalLogicAppendField:function(s){var e=p("#"+s),n=e.index(),r=p(".evf-field-conditional-field-select"),a=e.attr("data-field-type"),d=e.attr("data-field-id"),l=e.find(".label-title .text ").text(),f=(p.fn.insertAt=function(e,t,i){var o=p.makeArray(this.children().clone(!0));o.splice(t,0,e),p.each(o,function(e,t){i===p(t)[0].value&&(p(t)[0].selected=!0,o[e]=t)}),this.empty().append(o)},d);r.each(function(o,e){var t=p(e).val(),i=s.replace("everest-forms-field-",""),e=p(e).attr("name");i===e.substring(e.indexOf("[")+1,e.indexOf("]"))?p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert","yes-no"],-1===p.inArray(e,field_to_be_restricted)&&f!==t&&0===r.eq(o).find('option[data-field_id="'+t+'"]').length&&r.eq(o).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")}):(i='<option class="evf-conditional-fields" data-field_type="'+a+'" data-field_id="'+d+'" value="'+d+'">'+l+"</option>","html"!==a&&"title"!==a&&"address"!==a&&"image-upload"!==a&&"file-upload"!==a&&"date-time"!==a&&"hidden"!==a&&"likert"!==a&&"scale-rating"!==a&&"yes-no"!==a&&"divider"!==a&&r.eq(o).insertAt(i,n,t)),1<r.eq(o).find("option:not(.evf-conditional-fields)").length&&r.eq(o).find("option:not(.evf-conditional-fields):gt(0)").remove()})},conditionalLogicAppendRow:function(o){var s=p("#everest-forms-row-option-row_"+o);p(".everest-forms-field").each(function(){var e=p(this),t=e.attr("data-field-id"),i=e.attr("data-field-type"),e=(e.find(".required").remove(),'<option class="evf-conditional-fields" data-field_type="'+i+'" data-field_id="'+t+'" value="'+t+'">'+e.find(".label-title").html()+"</option>");0===p(document).find('.evf-admin-row[data-row-id="'+o+'"] #everest-forms-field-'+t).length&&0===s.find('.evf-field-conditional-field-select option[data-field_id="'+t+'"]').length&&"html"!==i&&"title"!==i&&"address"!==i&&"image-upload"!==i&&"file-upload"!==i&&"date-time"!==i&&"hidden"!==i&&"likert"!==i&&"scale-rating"!==i&&"divider"!==i&&s.find(".evf-field-conditional-field-select").append(e),1<s.find(".evf-field-conditional-field-select option:not(.evf-conditional-fields)").length&&s.find(".evf-field-conditional-field-select option:not(.evf-conditional-fields):gt(0)").remove()})},paymentFieldAppendToQuantity:function(e){var e=p("#"+e),t=p(".everest-forms-field-option-row-map_field select"),i=e.attr("data-field-type"),o=e.attr("data-field-id"),e=e.find(".label-title .text ").text();"payment-single"!==i&&"payment-multiple"!==i&&"payment-checkbox"!==i||t.append('<option value="'+o+'">'+e+"</option>")},paymentFieldAppendToDropdown:function(e,t){var i;"payment-quantity"!==t&&"payment-coupon"!==t&&"payment-subtotal"!==t||(i=p("#everest-forms-field-option-"+e+"-map_field"),["payment-checkbox","payment-multiple","payment-single","range-slider"].forEach(function(e){p(".everest-forms-field-"+e).each(function(){if("range-slider"===p(this).attr("data-field-type")){if("true"!==p(this).find(".evf-range-slider-preview").attr("data-enable-payment-slider"))return;var e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>"}e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>";i.append(e)})}))},conditionalLogicAppendFieldIntegration:function(i){var s=p("#"+i),n=s.index(),r=p(".evf-provider-conditional").find(".evf-conditional-field-select"),a=s.attr("data-field-type"),d=s.attr("data-field-id"),l=s.find(".label-title .text ").text();p.fn.insertAt=function(e,t){var i=p.makeArray(this.children().clone(!0));i.splice(t,0,e),this.empty().append(i)},r.each(function(o,e){var t=i.replace("everest-forms-field-",""),e=p(e).attr("name");t===e.substring(e.indexOf("[")+1,e.indexOf("]"))?p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","signature","divider","date-time","hidden","scale-rating","likert","yes-no",s.attr("data-field-type")],-1===p.inArray(e,field_to_be_restricted)&&r.eq(o).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")}):(t='<option class="evf-conditional-fields" data-field_type="'+a+'" data-field_id="'+d+'" value="'+d+'">'+l+"</option>","html"!==a&&"title"!==a&&"address"!==a&&"image-upload"!==a&&"file-upload"!==a&&"date-time"!==a&&"hidden"!==a&&"likert"!==a&&"scale-rating"!==a&&"yes-no"!==a&&r.eq(o).insertAt(t,n))})},conditionalLogicRemoveField:function(e){p(".evf-field-conditional-field-select option[value = "+e+" ]").remove()},conditionalLogicRemoveFieldIntegration:function(e){p(".evf-provider-conditional .evf-conditional-field-select option[value = "+e+" ]").remove()},paymentFieldRemoveFromQuantity:function(e){p(".everest-forms-field-option-row-map_field select option[value = "+e+" ]").remove()},bindFieldSettings:function(){p("body").on("click",".everest-forms-preview .everest-forms-field, .everest-forms-preview .everest-forms-field .everest-forms-field-setting",function(e){e.preventDefault();e=p(this).closest(".everest-forms-field").attr("data-field-id");p(".everest-forms-tab-content").scrollTop(0),m.switchToFieldOptionPanel(e)})},toggleLabelEdit:function(e,t){p(e).toggleClass("everest-forms-hidden"),p(t).toggleClass("everest-forms-hidden"),p(t).is(":visible")&&p(t).focus()},bindToggleHandleActions:function(){p("body").on("click",".toggle-handle",function(e){var t=p(this).data("label"),i=p(this).data("input");p(i).is(":visible")||m.toggleLabelEdit(t,i)})},bindLabelEditInputActions:function(){p("body").on("focusout",".label-edit-input",function(e){var t=p(this).data("label");m.toggleLabelEdit(t,this)})},bindSyncedInputActions:function(){p("body").on("input",".sync-input",function(e){var t=p(this).val(),i=p(this).data("sync-targets");t&&i&&p(i).text(t)})}};m.init()}(jQuery,window.evf_data),jQuery(function(){"checked"!=jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").attr("checked")&&jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide(),jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").on("change",function(){"checked"!=jQuery(this).attr("checked")?jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide():jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().show()}),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap input").on("change",function(){jQuery(this).is(":checked")?jQuery("#everest-forms-panel-field-settings-query_string-wrap").show():jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()});var e=jQuery("#everest-forms-panel-field-settings-redirect_to option:selected").val();"same"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"custom_page"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"external_url"==e&&(jQuery("#everest-forms-panel-field-settings-external_url-wrap").show(),jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()),jQuery("#everest-forms-panel-field-settings-redirect_to").on("change",function(){"same"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()):"custom_page"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string").is(":checked")?jQuery("#everest-forms-panel-field-settings-query_string-wrap").show():jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide()):"external_url"==this.value&&(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-enable_redirect_query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-query_string-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").show())}),jQuery(".evf-panel-field-options-button.evf-disabled-tab").hide(),jQuery(".everest-forms-conditional-field-settings-redirect_to").each(function(){var e=this.value;"custom_page"==e?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").show(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide()):"external_url"==e?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").show()):(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide())}),jQuery(document).on("change",".everest-forms-conditional-field-settings-redirect_to",function(){"custom_page"==this.value?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").show(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide()):"external_url"==this.value?(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").show()):(jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-custom_page").hide(),jQuery(this).parents(".evf-field-conditional-container").find(".everest-forms-conditional-field-settings-external_url").hide())})}),jQuery(function(c){c(document.body).on("init_add_fields_toogle",function(){c(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group > a",function(e){e.preventDefault(),c(this).parent(".everest-forms-add-fields-group").toggleClass("closed").toggleClass("open")}),c(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group a",function(){c(this).next(".evf-registered-buttons").stop().slideToggle()}),c(".everest-forms-add-fields-group.closed").each(function(){c(this).find(".evf-registered-buttons").hide()})}).trigger("init_add_fields_toogle"),c(document.body).on("click",".everest-forms-field-option .everest-forms-field-option-group > a",function(e){e.preventDefault(),c(this).parent(".everest-forms-field-option-group").toggleClass("closed").toggleClass("open")}),c(document.body).on("click",".everest-forms-field-option .everest-forms-field-option-group a",function(e){c(e.target).filter(":input, option, .sort").length||c(this).next(".everest-forms-field-option-group-inner").stop().slideToggle()}),c(document.body).on("init_field_options_toggle",function(){c(".everest-forms-field-option-group.closed").each(function(){c(this).find(".everest-forms-field-option-group-inner").hide()})}).trigger("init_field_options_toggle"),c(document).on("click",function(){c(".evf-smart-tag-lists").hide()}),c(".evf-smart-tag-lists").hide(),c(document.body).on("click",".evf-toggle-smart-tag-display",function(e){e.stopPropagation(),c(".evf-smart-tag-lists").hide(),c(".evf-smart-tag-lists ul").empty(),c(this).parent().find(".evf-smart-tag-lists").toggle("show");var t,e=c(this).data("type"),i=c(this).data("fields"),o=c(this),s=[],n=[],r=[],a=[];if(c(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e,t=c(this).data("field-type"),i=c(this).data("field-id");"email"===t?(e=c(this).find(".label-title span").first().text(),r[i]=e):"phone"===t?(e=c(this).find(".label-title span").first().text(),a[i]=e):(t=c(this).find(".label-title span").first().text(),s[i]=t),n[i]=c(this).find(".label-title span").first().text()}),"other"===e||"all"===e){var d=evf_data.smart_tags_other;for(l in d)c(o).parent().find(".evf-smart-tag-lists .evf-others").append('<li class = "smart-tag-field" data-type="other" data-field_id="'+l+'">'+d[l]+"</li>")}if("fields"===e||"all"===e)if("email"===i)for(var l in Object.keys(r).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),c(o).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),c(o).parent().find(".evf-smart-tag-lists .evf-others").remove(),c(o).parent().find(".evf-smart-tag-lists").append('<div class="smart-tag-title other-tag-title">Others</div><ul class="evf-others"></ul>'),c(o).parent().find(".evf-smart-tag-lists .evf-others").append('<li class="smart-tag-field" data-type="other" data-field_id="admin_email">Site Admin Email</li><li class="smart-tag-field" data-type="other" data-field_id="user_email">User Email</li>'),r)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+l+'">'+r[l]+"</li>");else if("phone"===i)for(var l in Object.keys(a).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),c(o).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),c(o).parent().find(".evf-smart-tag-lists .evf-others").remove(),a)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+l+'">'+a[l]+"</li>");else for(var f in Object.keys(n).length<1?c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):c(o).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),n)c(o).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+f+'">'+n[f]+"</li>");"calculations"===e&&(t=["number","payment-single","range-slider","payment-checkbox","payment-multiple"],c(document).find(".everest-forms-field").each(function(){t.includes(c(this).attr("data-field-type"))&&c(o).parents(".everest-forms-field-option-row-calculation_field").attr("data-field-id")!==c(this).attr("data-field-id")&&c(o).parent().find(".evf-smart-tag-lists .calculations").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+c(this).attr("data-field-id")+'">'+c(this).find(".label-title .text").text()+"</li>")}))}),c(document.body).on("click",".smart-tag-field",function(e){var t=c(this).data("field_id"),i=c(this).text(),o=c(this).data("type"),s=c(this).parent().parent().parent(),n=s.find("input[type=text]"),s=s.find("textarea");if("fullname"!==t&&"email"!==t&&"subject"!==t&&"message"!==t&&"other"!==o){for(var i=i.split(/[\s-_]/),r=0;r<i.length;r++)i[r]=0===r?i[r].charAt(0).toLowerCase()+i[r].substr(1):i[r].charAt(0).toUpperCase()+i[r].substr(1);t=(i=i.join(""))+"_"+t}"field"===o?(n.val(n.val()+'{field_id="'+t+'"}'),s.val(s.val()+'{field_id="'+t+'"}'),s.trigger("change")):"other"===o&&(n.val(n.val()+"{"+t+"}"),s.val(s.val()+"{"+t+"}"))}),c(document).on("change",".wp-list-table .everest-forms-toggle-form input",function(e){e.stopPropagation(),c.post(evf_data.ajax_url,{action:"everest_forms_enabled_form",security:evf_data.evf_enabled_form,form_id:c(this).data("form_id"),enabled:c(this).prop("checked")?1:0})}),c(document).on("change",".evf-content-email-settings .evf-toggle-switch input",function(e){var t=c(this),i=t.prop("checked");!1===i?(t.val(""),t.closest(".evf-content-email-settings").find(".email-disable-message").remove(),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").addClass("everest-forms-hidden"),c('<p class="email-disable-message everest-forms-notice everest-forms-notice-info">'+evf_data.i18n_email_disable_message+"</p>").insertAfter(t.closest(".evf-content-section-title"))):!0===i&&(t.val("1"),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").removeClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove())}),c(document).on("click",".everest-forms-min-max-date-format input",function(){var e,t=c(this).closest(".everest-forms-date").find(".everest-forms-min-date").val(),i=c(this).closest(".everest-forms-date").find(".everest-forms-min-date").val();c(this).is(":checked")?((e=c(this).parent().next(".everest-forms-min-max-date-range-format")).find('input[type="checkbox"]').is(":checked")?(e.next(".everest-forms-min-max-date-option").addClass("everest-forms-hidden"),e.next().next(".everest-forms-min-max-date-range-option").removeClass("everest-forms-hidden")):(e.next(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"),e.next().next(".everest-forms-min-max-date-range-option").addClass("everest-forms-hidden")),c(this).parent().next(".everest-forms-min-max-date-range-format").removeClass("everest-forms-hidden"),""===t&&c(".everest-forms-min-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){c(".everest-forms-min-date").val(t)},onOpen:function(e,t,i){i.set("maxDate",c(".everest-forms-max-date").val())}}),""===i&&c(".everest-forms-max-date").addClass("flatpickr-field").flatpickr({disableMobile:!0,onChange:function(e,t,i){c(".everest-forms-max-date").val(t)},onOpen:function(e,t,i){i.set("minDate",c(".everest-forms-min-date").val())}})):(c(this).parent().next().next(".everest-forms-min-max-date-option").addClass("everest-forms-hidden"),c(this).parent().next().next().next(".everest-forms-min-max-date-range-option").addClass("everest-forms-hidden"),c(this).parent().next(".everest-forms-min-max-date-range-format").addClass("everest-forms-hidden"))}),c(document).on("click",'.everest-forms-min-max-date-range-format input[type="checkbox"]',function(){c(this).is(":checked")?(c(this).parent().next(".everest-forms-min-max-date-option").addClass("everest-forms-hidden"),c(this).parent().next().next(".everest-forms-min-max-date-range-option").removeClass("everest-forms-hidden")):(c(this).parent().next(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"),c(this).parent().next().next(".everest-forms-min-max-date-range-option").addClass("everest-forms-hidden"))})});
assets/js/frontend/ajax-submission.js CHANGED
@@ -7,25 +7,15 @@ jQuery( function( $ ) {
7
  $( document ).ready( function() {
8
  var formTuple = $( v ),
9
  btn = formTuple.find( '.evf-submit' ),
10
- stripeForms = formTuple.find( "[data-gateway*='stripe']" );
11
- var razorpayForms = formTuple.find( "[data-gateway='razorpay']" );
12
- // If it's an ajax form containing a stripe gateway, do not latch into the button.
13
 
14
- if ( stripeForms.length > 0 && 0 === stripeForms.children.length || razorpayForms.length > 0 ) {
15
- return;
16
- }
17
 
18
  btn.on( 'click', function( e ) {
19
-
20
  var paymentMethod = formTuple.find( ".everest-forms-stripe-gateways-tabs .evf-tab" ).has( 'a.active' ).data( 'gateway' );
21
  if(undefined === paymentMethod) {
22
  paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='stripe']" ).data( 'gateway' );
23
  }
24
 
25
- if( 'stripe' === paymentMethod && 'none' !== formTuple.find( ".everest-forms-gateway[data-gateway='ideal']" ).closest( '.evf-field' ).css( 'display' ) ) {
26
- return;
27
- }
28
-
29
  if ( typeof tinyMCE !== 'undefined' ) {
30
  tinyMCE.triggerSave();
31
  }
@@ -89,6 +79,20 @@ jQuery( function( $ ) {
89
  var paymentMethod = formTuple.find( ".everest-forms-stripe-gateways-tabs .evf-tab" ).has( 'a.active' ).data( 'gateway' );
90
 
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  if(undefined === paymentMethod) {
93
  paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='ideal']" ).data( 'gateway' );
94
  }
7
  $( document ).ready( function() {
8
  var formTuple = $( v ),
9
  btn = formTuple.find( '.evf-submit' ),
10
+ razorpayForms = formTuple.find( "[data-gateway='razorpay']" );
 
 
11
 
 
 
 
12
 
13
  btn.on( 'click', function( e ) {
 
14
  var paymentMethod = formTuple.find( ".everest-forms-stripe-gateways-tabs .evf-tab" ).has( 'a.active' ).data( 'gateway' );
15
  if(undefined === paymentMethod) {
16
  paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='stripe']" ).data( 'gateway' );
17
  }
18
 
 
 
 
 
19
  if ( typeof tinyMCE !== 'undefined' ) {
20
  tinyMCE.triggerSave();
21
  }
79
  var paymentMethod = formTuple.find( ".everest-forms-stripe-gateways-tabs .evf-tab" ).has( 'a.active' ).data( 'gateway' );
80
 
81
 
82
+ if(undefined === paymentMethod) {
83
+ paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='ideal']" ).data( 'gateway' );
84
+ if ('ideal' === paymentMethod ){
85
+ paymentMethod = 'ideal';
86
+ }else{
87
+ paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='stripe']" ).data( 'gateway' );
88
+ }
89
+ }
90
+
91
+ if( 'stripe' === paymentMethod && 'none' !== formTuple.find( ".everest-forms-gateway[data-gateway='stripe']" ).closest( '.evf-field' ).css( 'display' ) ) {
92
+ formTuple.trigger( 'everest_forms_frontend_before_ajax_complete_success_message', xhr.data );
93
+ return;
94
+ }
95
+
96
  if(undefined === paymentMethod) {
97
  paymentMethod = formTuple.find( ".everest-forms-gateway[data-gateway='ideal']" ).data( 'gateway' );
98
  }
assets/js/frontend/ajax-submission.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(d){"use strict";d('form[data-ajax_submission="1"]').each(function(e,s){d(document).ready(function(){var r=d(s),i=r.find(".evf-submit"),e=r.find("[data-gateway*='stripe']"),a=r.find("[data-gateway='razorpay']");0<e.length&&0===e.children.length||0<a.length||i.on("click",function(e){var a=r.find(".everest-forms-stripe-gateways-tabs .evf-tab").has("a.active").data("gateway");if("stripe"!==(a=undefined===a?r.find(".everest-forms-gateway[data-gateway='stripe']").data("gateway"):a)||"none"===r.find(".everest-forms-gateway[data-gateway='ideal']").closest(".evf-field").css("display")){"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave();a=i.get(0).recaptchaID;if(0===a)return grecaptcha.execute(a),!1;a=r.serializeArray(),e=(e.preventDefault(),r.trigger("focusout").trigger("change").trigger("submit"),r.find(".evf-error:visible"));0<e.length?d([document.documentElement,document.body]).animate({scrollTop:e.last().offset().top},800):(d(this).html(r.data("process-text")),a.push({name:"action",value:"everest_forms_ajax_form_submission"}),a.push({name:"security",value:everest_forms_ajax_submission_params.evf_ajax_submission}),d.ajax({url:everest_forms_ajax_submission_params.ajax_url,type:"POST",data:a}).done(function(s,e,a){var t=s.data&&s.data.redirect_url?s.data.redirect_url:"";if(t)return r.trigger("reset"),void(window.location=t);if("success"===s.data.response||!0===s.success){let e="",a="";s.data.form_id!==undefined&&s.data.entry_id!==undefined&&1==s.data.pdf_download&&(e='<br><small><a href="/?page=evf-entries-pdf&form_id='+s.data.form_id+"&entry_id="+s.data.entry_id+'">'+s.data.pdf_download_message+"</a></small>"),1==s.data.quiz_result_shown&&(a=s.data.quiz_reporting);t=r.find(".everest-forms-stripe-gateways-tabs .evf-tab").has("a.active").data("gateway");"ideal"===(t=undefined===t?r.find(".everest-forms-gateway[data-gateway='ideal']").data("gateway"):t)&&"none"!==r.find(".everest-forms-gateway[data-gateway='ideal']").closest(".evf-field").css("display")?r.trigger("evf_process_payment",s.data):(r.trigger("reset"),r.closest(".everest-forms").html('<div class="everest-forms-notice everest-forms-notice--success" role="alert">'+s.data.message+e+"</div>"+a).focus(),localStorage.removeItem(r.attr("id")))}else{var o=r.data("formid"),t=JSON.parse(a.responseText),a=(s="undefined"!=typeof t.data[o]?t.data[o].header:everest_forms_ajax_submission_params.error,t.data.error);"string"==typeof t.data.message&&(s=t.data.message),r.closest(".everest-forms").find(".everest-forms-notice").remove(),r.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+s+"</div>").focus(),d(a).each(function(e,a){var t,s=Object.values(a)[0],r=Object.keys(a)[0],a=!0,i="evf"-+o+"-field_"+r+"-container";d("#"+i).hasClass("evf-field-signature")?t=d("#"+("evf-signature-img-input-"+r)):d("#"+i).hasClass("evf-field-likert")?(a=!1,(t=d('[id^="'+("everest_forms-"+o+"-field_"+r+"_")+'"]')).each(function(e,a){var a=d(a).closest("tr.evf-"+o+"-field_"+r).find("th"),s="everest_forms[form_fields]["+r+"]["+(parseInt(a.closest("tr").index())+1)+"]";a.children().is("label")?a.children().find("#"+s).show():(a.parents("span.input-wrapper").length?a.parents("span.input-wrapper"):a).append('<label id="'+s+'" for="'+s+'" class="evf-error">'+everest_forms_ajax_submission_params.required+"</label>")})):d("#"+i).hasClass("evf-field-address")?(t=d('[id^="'+("evf-"+o+"-field_"+r)+'"]')).each(function(e,a){var s=String(d(a).attr("id"));(s.includes("-container")||s.includes("-address2")||void 0!==d(a).val())&&t.splice(e,1)}):t=d("#"+("evf-"+o+"-field_"+r)),t.addClass("evf-error"),t.attr("aria-invalid",!0),t.first().closest(".evf-field").addClass("everest-forms-invalid evf-has-error"),!0!==a||t.is("label")||(t.parents("span.input-wrapper").length?t.parents("span.input-wrapper"):t).after('<label id="'+t.attr("id")+'-error" class="evf-error" for="'+t.attr("id")+'">'+s+"</label>").show()}),i.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit)}}).fail(function(){i.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit),r.trigger("focusout").trigger("change"),r.closest(".everest-forms").find(".everest-forms-notice").remove(),r.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+everest_forms_ajax_submission_params.error+"</div>").focus()}).always(function(e){!(e.data&&e.data.redirect_url?e.data.redirect_url:"")&&d(".everest-forms-notice").length&&d([document.documentElement,document.body]).animate({scrollTop:d(".everest-forms-notice").offset().top},800)}))}})})})});
1
+ jQuery(function(o){"use strict";o('form[data-ajax_submission="1"]').each(function(e,a){o(document).ready(function(){var r=o(a),i=r.find(".evf-submit");r.find("[data-gateway='razorpay']");i.on("click",function(e){var a=r.find(".everest-forms-stripe-gateways-tabs .evf-tab").has("a.active").data("gateway"),a=(undefined===a&&r.find(".everest-forms-gateway[data-gateway='stripe']").data("gateway"),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),i.get(0).recaptchaID);if(0===a)return grecaptcha.execute(a),!1;a=r.serializeArray(),e.preventDefault(),r.trigger("focusout").trigger("change").trigger("submit"),e=r.find(".evf-error:visible");0<e.length?o([document.documentElement,document.body]).animate({scrollTop:e.last().offset().top},800):(o(this).html(r.data("process-text")),a.push({name:"action",value:"everest_forms_ajax_form_submission"}),a.push({name:"security",value:everest_forms_ajax_submission_params.evf_ajax_submission}),o.ajax({url:everest_forms_ajax_submission_params.ajax_url,type:"POST",data:a}).done(function(s,e,a){var t=s.data&&s.data.redirect_url?s.data.redirect_url:"";if(t)return r.trigger("reset"),void(window.location=t);if("success"===s.data.response||!0===s.success){let e="",a="";s.data.form_id!==undefined&&s.data.entry_id!==undefined&&1==s.data.pdf_download&&(e='<br><small><a href="/?page=evf-entries-pdf&form_id='+s.data.form_id+"&entry_id="+s.data.entry_id+'">'+s.data.pdf_download_message+"</a></small>"),1==s.data.quiz_result_shown&&(a=s.data.quiz_reporting);t=r.find(".everest-forms-stripe-gateways-tabs .evf-tab").has("a.active").data("gateway");"stripe"===(t=undefined===t?"ideal"===(t=r.find(".everest-forms-gateway[data-gateway='ideal']").data("gateway"))?"ideal":r.find(".everest-forms-gateway[data-gateway='stripe']").data("gateway"):t)&&"none"!==r.find(".everest-forms-gateway[data-gateway='stripe']").closest(".evf-field").css("display")?r.trigger("everest_forms_frontend_before_ajax_complete_success_message",s.data):"ideal"===(t=undefined===t?r.find(".everest-forms-gateway[data-gateway='ideal']").data("gateway"):t)&&"none"!==r.find(".everest-forms-gateway[data-gateway='ideal']").closest(".evf-field").css("display")?r.trigger("evf_process_payment",s.data):(r.trigger("reset"),r.closest(".everest-forms").html('<div class="everest-forms-notice everest-forms-notice--success" role="alert">'+s.data.message+e+"</div>"+a).focus(),localStorage.removeItem(r.attr("id")))}else{var d=r.data("formid"),t=JSON.parse(a.responseText),a=(s="undefined"!=typeof t.data[d]?t.data[d].header:everest_forms_ajax_submission_params.error,t.data.error);"string"==typeof t.data.message&&(s=t.data.message),r.closest(".everest-forms").find(".everest-forms-notice").remove(),r.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+s+"</div>").focus(),o(a).each(function(e,a){var t,s=Object.values(a)[0],r=Object.keys(a)[0],a=!0,i="evf"-+d+"-field_"+r+"-container";o("#"+i).hasClass("evf-field-signature")?t=o("#"+("evf-signature-img-input-"+r)):o("#"+i).hasClass("evf-field-likert")?(a=!1,(t=o('[id^="'+("everest_forms-"+d+"-field_"+r+"_")+'"]')).each(function(e,a){var a=o(a).closest("tr.evf-"+d+"-field_"+r).find("th"),s="everest_forms[form_fields]["+r+"]["+(parseInt(a.closest("tr").index())+1)+"]";a.children().is("label")?a.children().find("#"+s).show():(a.parents("span.input-wrapper").length?a.parents("span.input-wrapper"):a).append('<label id="'+s+'" for="'+s+'" class="evf-error">'+everest_forms_ajax_submission_params.required+"</label>")})):o("#"+i).hasClass("evf-field-address")?(t=o('[id^="'+("evf-"+d+"-field_"+r)+'"]')).each(function(e,a){var s=String(o(a).attr("id"));(s.includes("-container")||s.includes("-address2")||void 0!==o(a).val())&&t.splice(e,1)}):t=o("#"+("evf-"+d+"-field_"+r)),t.addClass("evf-error"),t.attr("aria-invalid",!0),t.first().closest(".evf-field").addClass("everest-forms-invalid evf-has-error"),!0!==a||t.is("label")||(t.parents("span.input-wrapper").length?t.parents("span.input-wrapper"):t).after('<label id="'+t.attr("id")+'-error" class="evf-error" for="'+t.attr("id")+'">'+s+"</label>").show()}),i.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit)}}).fail(function(){i.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit),r.trigger("focusout").trigger("change"),r.closest(".everest-forms").find(".everest-forms-notice").remove(),r.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+everest_forms_ajax_submission_params.error+"</div>").focus()}).always(function(e){!(e.data&&e.data.redirect_url?e.data.redirect_url:"")&&o(".everest-forms-notice").length&&o([document.documentElement,document.body]).animate({scrollTop:o(".everest-forms-notice").offset().top},800)}))})})})});
assets/js/frontend/everest-forms.js CHANGED
@@ -92,12 +92,38 @@ jQuery( function ( $ ) {
92
  },
93
  init_datepicker: function () {
94
  var evfDateField = $( '.evf-field-date-time' );
95
- if ( evfDateField.length > 0 ) {
96
- $( '.flatpickr-field' ).each( function() {
97
  var timeInterval = 5,
98
  inputData = $( this ).data(),
99
  disableDates = [];
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  // Extract list of disabled dates.
102
  if ( inputData.disableDates ) {
103
  disableDates = inputData.disableDates.split( ',' );
@@ -115,8 +141,8 @@ jQuery( function ( $ ) {
115
  $( this ).flatpickr({
116
  disableMobile : true,
117
  mode : inputData.mode,
118
- minDate : inputData.minDate ? inputData.minDate : pastDisableDate,
119
- maxDate : inputData.maxDate,
120
  dateFormat : inputData.dateFormat,
121
  disable : disableDates,
122
  });
@@ -147,8 +173,8 @@ jQuery( function ( $ ) {
147
  noCalendar : false,
148
  disableMobile : true,
149
  mode : inputData.mode,
150
- minDate : inputData.minDate ? inputData.minDate : pastDisableDate,
151
- maxDate : inputData.maxDate,
152
  minuteIncrement : timeInterval,
153
  dateFormat : inputData.dateFormat,
154
  time_24hr : inputData.dateFormat.includes( 'H:i' ),
@@ -157,7 +183,7 @@ jQuery( function ( $ ) {
157
  break;
158
  default:
159
  }
160
- });
161
  }
162
  },
163
  init_datedropdown: function () {
@@ -208,7 +234,7 @@ jQuery( function ( $ ) {
208
  }
209
  options += '<option value = "' + i + '"> ' + ( ( i< 10 ) ? '0' + i : i ) + '</option>';
210
  }
211
-
212
  $this.siblings( '#minute-select-'+id ).html( options );
213
  $this.siblings( '#minute-select-'+id ).attr('value', $this.siblings( '#minute-select-'+id ).find('option:first').val());
214
  }
@@ -501,6 +527,7 @@ jQuery( function ( $ ) {
501
  processText = $submit.data( 'process-text' );
502
  var recaptchaID = $submit.get( 0 ).recaptchaID;
503
  var razorpayForms = $form.find( "[data-gateway='razorpay']" );
 
504
  // Process form.
505
  if ( processText ) {
506
  $submit.text( processText ).prop( 'disabled', true );
@@ -515,8 +542,8 @@ jQuery( function ( $ ) {
515
  return;
516
  }
517
 
518
- if ( 1 !== $form.data( 'ajax_submission' ) ) {
519
- form.submit();
520
  } else {
521
  return;
522
  }
92
  },
93
  init_datepicker: function () {
94
  var evfDateField = $( '.evf-field-date-time' );
95
+ if ( evfDateField.length && evfDateField.find( '.flatpickr-field' ).length ) {
96
+ evfDateField.find( '.flatpickr-field' ).each( function () {
97
  var timeInterval = 5,
98
  inputData = $( this ).data(),
99
  disableDates = [];
100
 
101
+ var minDateRange = '';
102
+ if( inputData.minDateRange ) {
103
+ minDateRange = 'today';
104
+ if( 'today' === inputData.minDateRange ) {
105
+ minDateRange = minDateRange
106
+ } else if ( /^\s*[-+]?\d+\s*d/i.test( inputData.minDateRange ) ) {
107
+ minDateRange = inputData.minDateRange.match( /^\s*[-+]?\d+\s*d/i )[0].replace( 'd', '' );
108
+ minDateRange = new Date().fp_incr( minDateRange );
109
+ } else {
110
+ minDateRange = 'today';
111
+ }
112
+ }
113
+
114
+ var maxDateRange = '';
115
+ if( inputData.maxDateRange ) {
116
+ maxDateRange = 'today';
117
+ if( 'today' === inputData.maxDateRange ) {
118
+ maxDateRange = maxDateRange
119
+ } else if ( /^\s*[-+]?\d+\s*d/i.test( inputData.maxDateRange ) ) {
120
+ maxDateRange = inputData.maxDateRange.match( /^\s*[-+]?\d+\s*d/i )[0].replace( 'd', '' );
121
+ maxDateRange = new Date().fp_incr( maxDateRange );
122
+ } else {
123
+ maxDateRange = '';
124
+ }
125
+ }
126
+
127
  // Extract list of disabled dates.
128
  if ( inputData.disableDates ) {
129
  disableDates = inputData.disableDates.split( ',' );
141
  $( this ).flatpickr({
142
  disableMobile : true,
143
  mode : inputData.mode,
144
+ minDate : minDateRange ? minDateRange : ( inputData.minDate ? inputData.minDate : pastDisableDate ),
145
+ maxDate : maxDateRange ? maxDateRange : inputData.maxDate,
146
  dateFormat : inputData.dateFormat,
147
  disable : disableDates,
148
  });
173
  noCalendar : false,
174
  disableMobile : true,
175
  mode : inputData.mode,
176
+ minDate : minDateRange ? minDateRange : ( inputData.minDate ? inputData.minDate : pastDisableDate ),
177
+ maxDate : maxDateRange ? maxDateRange : inputData.maxDate,
178
  minuteIncrement : timeInterval,
179
  dateFormat : inputData.dateFormat,
180
  time_24hr : inputData.dateFormat.includes( 'H:i' ),
183
  break;
184
  default:
185
  }
186
+ } );
187
  }
188
  },
189
  init_datedropdown: function () {
234
  }
235
  options += '<option value = "' + i + '"> ' + ( ( i< 10 ) ? '0' + i : i ) + '</option>';
236
  }
237
+
238
  $this.siblings( '#minute-select-'+id ).html( options );
239
  $this.siblings( '#minute-select-'+id ).attr('value', $this.siblings( '#minute-select-'+id ).find('option:first').val());
240
  }
527
  processText = $submit.data( 'process-text' );
528
  var recaptchaID = $submit.get( 0 ).recaptchaID;
529
  var razorpayForms = $form.find( "[data-gateway='razorpay']" );
530
+ var stripeForms = $form.find( "[data-gateway*='stripe']" );
531
  // Process form.
532
  if ( processText ) {
533
  $submit.text( processText ).prop( 'disabled', true );
542
  return;
543
  }
544
 
545
+ if ( 1 !== $form.data( 'ajax_submission' ) || (stripeForms.length < 0 && 0 !== stripeForms.children.length) ) {
546
+ form.submit();
547
  } else {
548
  return;
549
  }
assets/js/frontend/everest-forms.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(f){"use strict";if("undefined"==typeof everest_forms_params)return!1;var l={$everest_form:f("form.everest-form"),init:function(){this.init_inputMask(),this.init_mailcheck(),this.init_datepicker(),this.init_datedropdown(),this.load_validation(),this.submission_scroll(),this.randomize_elements(),this.init_enhanced_select(),this.checkUncheckAllcheckbox(),this.validateMinimumWordLength(),this.$everest_form.on("input validate change",".input-text, select, input:checkbox, input:radio",this.validate_field),f(document.body).trigger("everest_forms_loaded")},init_inputMask:function(){"undefined"!=typeof f.fn.inputmask&&f(".evf-masked-input").inputmask()},init_mailcheck:function(){"undefined"!=typeof f.fn.mailcheck&&everest_forms_params.mailcheck_enabled&&(0<everest_forms_params.mailcheck_domains.length&&(Mailcheck.defaultDomains=Mailcheck.defaultDomains.concat(everest_forms_params.mailcheck_domains)),0<everest_forms_params.mailcheck_toplevel_domains.length&&(Mailcheck.defaultTopLevelDomains=Mailcheck.defaultTopLevelDomains.concat(everest_forms_params.mailcheck_toplevel_domains)),f(document).on("blur",".evf-field-email input",function(){var e=f(this),i=e.attr("id");e.mailcheck({suggested:function(e,t){f("#"+i+"_suggestion").remove();t=everest_forms_params.i18n_messages_email_suggestion.replace("{suggestion}",'<a href="#" class="mailcheck-suggestion" data-id="'+i+'" title="'+everest_forms_params.i18n_messages_email_suggestion_title+'">'+t.full+"</a>");(e.parents("span.input-wrapper").length?f(e).parents("span.input-wrapper"):f(e)).after('<label class="evf-error mailcheck-error" id="'+i+'_suggestion">'+t+"</label>")},empty:function(){f("#"+i+"_suggestion").remove()}})}),f(document).on("click",".evf-field-email .mailcheck-suggestion",function(e){var t=f(this),i=t.attr("data-id");e.preventDefault(),f("#"+i).val(t.text()),t.parent().remove()}))},init_datepicker:function(){0<f(".evf-field-date-time").length&&f(".flatpickr-field").each(function(){var e,t=5,i=f(this).data(),a=[];switch(i.disableDates&&(a=i.disableDates.split(",")),e=i.pastDisableDate||"",i.dateTime){case"date":f(this).flatpickr({disableMobile:!0,mode:i.mode,minDate:i.minDate||e,maxDate:i.maxDate,dateFormat:i.dateFormat,disable:a});break;case"time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!0,minuteIncrement:t,dateFormat:i.dateFormat,disableMobile:!0,time_24hr:i.dateFormat.includes("H:i")});break;case"date-time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!1,disableMobile:!0,mode:i.mode,minDate:i.minDate||e,maxDate:i.maxDate,minuteIncrement:t,dateFormat:i.dateFormat,time_24hr:i.dateFormat.includes("H:i"),disable:a})}})},init_datedropdown:function(){f(".date-dropdown-field").each(function(){var e=f(this);e.hide(),l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=hour-select]",function(){var e=f(this).siblings("input.date-dropdown-field");l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=-select]",function(){var e=f(this).siblings("input.date-dropdown-field");e.val(l.format_dropdown_date(e))})},change_minutes:function(e){var t=e.attr("id");if(void 0!==e.siblings("#minute-select-"+t).attr("id")){for(var i=e.attr("data-max-hour"),a=e.attr("data-min-hour"),s=e.attr("data-max-minute"),r=e.attr("data-min-minute"),n=(void 0!==a&&""!=a||(a=0),void 0!==i&&""!=i||(a=23),void 0!==r&&""!=r||(r=0),void 0!==s&&""!=s||(s=59),""),d=0;d<=59;d++)if(!(e.siblings("#hour-select-"+t).val()==a&&d<r)){if(e.siblings("#hour-select-"+t).val()==i&&s<d)break;n+='<option value = "'+d+'"> '+(d<10?"0"+d:d)+"</option>"}e.siblings("#minute-select-"+t).html(n),e.siblings("#minute-select-"+t).attr("value",e.siblings("#minute-select-"+t).find("option:first").val())}e.val(l.format_dropdown_date(e))},format_dropdown_date:function(e){var t=e.attr("id"),t={selected_year:e.siblings("#year-select-"+t).val(),selected_month:e.siblings("#month-select-"+t).val(),selected_day:e.siblings("#day-select-"+t).val(),selected_hour:e.siblings("#hour-select-"+t).val(),selected_minute:e.siblings("#minute-select-"+t).val()},e={date_format:e.attr("data-date-format"),date_time:e.attr("data-date-time")},i="";return"date"!=e.date_time&&"date-time"!=e.date_time||(t.selected_day=t.selected_day<10?"0"+t.selected_day:t.selected_day,i=e.date_format.match(/F j, Y/)?["January","Febuary","March","April","May","June","July","August","September","October","November","December"][parseInt(t.selected_month)-1]+" "+t.selected_day+", "+t.selected_year:(t.selected_month=t.selected_month<10?"0"+t.selected_month:t.selected_month,e.date_format.match(/Y-m-d/)?t.selected_year+"-"+t.selected_month+"-"+t.selected_day:e.date_format.match(/m\/d\/Y/)?t.selected_month+"/"+t.selected_day+"/"+t.selected_year:t.selected_day+"/"+t.selected_month+"/"+t.selected_year)),"time"!=e.date_time&&"date-time"!=e.date_time||(t.selected_minute=t.selected_minute<10?"0"+t.selected_minute:t.selected_minute,e.date_format.match(/H:i/)?(t.selected_hour=t.selected_hour<10?"0"+t.selected_hour:t.selected_hour,i+=" "+t.selected_hour+":"+t.selected_minute):(e="PM",t.selected_hour<12?(e="AM",0==t.selected_hour&&(t.selected_hour=12)):12<t.selected_hour&&(t.selected_hour=t.selected_hour-12),i+=" "+t.selected_hour+":"+t.selected_minute+" "+e)),i.trim()},load_validation:function(){if("undefined"==typeof f.fn.validate)return!1;f(".evf-field-url input[type=url]").on("change",function(){var e=f(this).val();if(!e)return!1;"http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&f(this).val("http://"+e)}),f.extend(f.validator.messages,{required:everest_forms_params.i18n_messages_required,url:everest_forms_params.i18n_messages_url,email:everest_forms_params.i18n_messages_email,number:everest_forms_params.i18n_messages_number}),f.validator.methods.email=function(e,t){var i=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return this.optional(t)||i.test(e)},f.validator.addMethod("confirm",function(e,t,i){return f.validator.methods.equalTo.call(this,e,t,i)},everest_forms_params.i18n_messages_confirm),f.validator.addMethod("check-limit",function(e,t){var t=f(t).closest("ul"),i=t.find('input[type="checkbox"]:checked'),t=parseInt(t.attr("data-choice-limit")||0,10);return 0===t||i.length<=t},function(e,t){t=parseInt(f(t).closest("ul").attr("data-choice-limit")||0,10);return everest_forms_params.i18n_messages_check_limit.replace("{#}",t)}),this.$everest_form.each(function(){var e=f(this),u={};f(".evf-field").each(function(){var e=f(this).closest("form").data("formid"),t=f(this).data("field-id"),i=f(this).data("required-field-message"),a="everest_forms[form_fields]["+t+"]";if(f(this).is(".evf-field-payment-single"))f(this).find(".evf-payment-price").is(".evf-payment-user-input")||(f(this).find(".evf-payment-price").attr("required",!1),i=null);else if(f(this).is(".evf-field-checkbox, .evf-field-payment-checkbox"))a+="[]";else if(f(this).is(".evf-field-image-upload"))a="evf_"+e+"_"+t;else if(f(this).is(".evf-field-signature"))a="everest_forms[form_fields]["+t+"][signature_image]";else if(f(this).is(".evf-field-phone"))a+="[phone_field]";else if(f(this).is(".evf-field-email")||f(this).is(".evf-field-password"))u[a="everest_forms[form_fields]["+t+"]"]={required:i},u[a="everest_forms[form_fields]["+t+"][primary]"]={required:i},u[a="everest_forms[form_fields]["+t+"][secondary]"]={required:i},i=null;else if(f(this).is(".evf-field-address")){for(var s={address1:f(this).data("required-field-message-address1"),city:f(this).data("required-field-message-city"),state:f(this).data("required-field-message-state"),postal:f(this).data("required-field-message-postal"),country:f(this).data("required-field-message-country")},r=Object.keys(s),n=0;n<r.length;n++){var d=r[n],i=s[r[n]];u[a="everest_forms[form_fields]["+t+"]["+d+"]"]={required:i}}i=null}else if(f(this).is(".evf-field-likert")){var l=f(this).data("row-keys"),s={};if(l&&Array.isArray(l)){for(n=0;n<l.length;n++){var o=l[n];s[o]=f(this).data("required-field-message-"+o)}for(n=0;n<l.length;n++)i=s[l[n]],a="everest_forms[form_fields]["+t+"]["+l[n]+"]",u[a]={required:i}}i=null}else f(this).is(".evf-field-file-upload")&&(a="everest_forms_"+e+"_"+t);i&&(u[a]={required:i})}),e.validate({messages:u,ignore:"",errorClass:"evf-error",validClass:"evf-valid",errorPlacement:function(e,t){t.closest(".evf-field").is(".evf-field-privacy-policy")?t.closest(".evf-field").append(e):t.closest(".evf-field").is(".evf-field-range-slider")?t.closest(".evf-field").find(".evf-field-description").length?t.closest(".evf-field").find(".evf-field-description").before(e):t.closest(".evf-field").append(e):t.closest(".evf-field").is(".evf-field-scale-rating")?t.closest(".evf-field").find(".everest-forms-field-scale-rating").after(e):"radio"===t.attr("type")||"checkbox"===t.attr("type")?t.hasClass("everest-forms-likert-field-option")?t.closest("tr").children("th").append(e):(t.closest(".evf-field-checkbox").find("label.evf-error").remove(),t.parent().parent().parent().append(e)):t.is("select")&&t.attr("class").match(/date-month|date-day|date-year/)?0===t.parent().find("label.evf-error:visible").length&&t.parent().find("select:last").after(e):t.is("select")&&t.hasClass("evf-enhanced-select")?0===t.parent().find("label.evf-error:visible").length&&t.parent().find(".select2").after(e):t.hasClass("evf-smart-phone-field")||t.hasClass("everest-forms-field-password-primary")||t.hasClass("everest-forms-field-password-secondary")?(t.parents("span.input-wrapper").length?t.parents("span.input-wrapper"):t.parent()).after(e):t.parents("span.input-wrapper").length?t.parents("span.input-wrapper").after(e):e.insertAfter(t)},highlight:function(e,t,i){var e=f(e),a=e.closest(".form-row"),s=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?a.find('input[name="'+s+'"]'):e).addClass(t).removeClass(i),a.removeClass("everest-forms-validated").addClass("everest-forms-invalid evf-has-error")},unhighlight:function(e,t,i){var e=f(e),a=e.closest(".form-row"),s=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?a.find('input[name="'+s+'"]'):e).addClass(i).removeClass(t),a.removeClass("evf-has-error")},submitHandler:function(e){var t=f(e),i=t.find(".evf-submit"),a=i.data("process-text"),s=i.get(0).recaptchaID,r=t.find("[data-gateway='razorpay']");if(a&&i.text(a).prop("disabled",!0),0===s)return grecaptcha.execute(s),!1;0<r.length||1!==t.data("ajax_submission")&&e.submit()},onkeyup:function(e,t){f(e).hasClass("everest-forms-novalidate-onkeyup")||9===t.which&&""===this.elementValue(e)||-1!==f.inArray(t.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onfocusout:function(e){var t=!1;f(e).hasClass("everest-forms-novalidate-onkeyup")&&!e.value&&(t=!0),(t=this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)?t:!0)&&this.element(e)},onclick:function(e){var t=!1,i=(e||{}).type,a=f(e);"checkbox"===i?(a.closest(".evf-field-checkbox").find("label.evf-error").remove(),t=!0):!1===i&&f(e).valid(),t&&this.element(e)}})})},validate_field:function(e){var t=f(this),i=f("body"),a=t.closest(".form-row"),s=!0,r=a.is(".validate-required"),n=a.is(".validate-email"),e=e.type;i.hasClass("everest-forms-is-offline")?a.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email everest-forms-validated"):a.hasClass("evf-field-address")||a.hasClass("evf-field-payment-single")||f("body").hasClass("everest-forms-is-offline")?0===a.find("input.evf-error").length&&a.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email").addClass("everest-forms-validated"):("input"===e&&a.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email everest-forms-validated"),"validate"!==e&&"change"!==e||(r&&(t.hasClass("everest-forms-likert-field-option")?0<a.find("input.evf-error").length&&(a.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-required-field"),s=!1):("checkbox"===t.attr("type")&&0===a.find("input:checked").length||""===t.val())&&(a.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-required-field"),s=!1)),n&&t.val()&&!new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(t.val())&&(a.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-email"),s=!1),s&&a.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email").addClass("everest-forms-validated")))},submission_scroll:function(){f("div.everest-forms-submission-scroll").length&&f("html,body").animate({scrollTop:f("div.everest-forms-submission-scroll").offset().top-100},1e3)},randomize_elements:function(){f(".everest-forms-randomize").each(function(){for(var e=f(this),t=e.children();t.length;)e.append(t.splice(Math.floor(Math.random()*t.length),1)[0])})},init_enhanced_select:function(){try{f(document.body).on("evf-frontend-enhanced-select-init",function(){"undefined"!=typeof f.fn.selectWoo&&f("select.evf-enhanced-select:visible").filter(":not(.evf-enhanced)").each(function(){var e=f.extend({minimumResultsForSearch:10<f(this).find("option").length?10:null,placeholder:f(this).attr("placeholder")||"",allowClear:!f(this).prop("multiple")},{language:{noResults:function(){return everest_forms_params.i18n_no_matches}}});f(this).selectWoo(e).addClass("evf-enhanced")})}).trigger("evf-frontend-enhanced-select-init")}catch(e){window.console.log(e)}},checkUncheckAllcheckbox:function(){var e=f("form.everest-form").find(".evf-field, .evf-field-checkbox, .form-row").find("ul").find("li.evf-select-all-checkbox-li").find("#evfCheckAll");e.length&&e.each(function(){var i=f(this);i.on("click",function(){1==f(this).prop("checked")?i.parent().parent().find("li").find("input:checkbox").not(i).prop("checked",!0):0==f(this).prop("checked")&&i.parent().parent().find("li").find("input:checkbox").not(i).prop("checked",!1)}),i.parent().parent().find("li").find("input:checkbox").not(i).on("change",function(){var e=i.parent().parent().find("li").find("input:checkbox:checked").not(i).length,t=i.parent().parent().find("li").find("input:checkbox").not(i).length;e===t?i.prop("checked",!0):e<t&&i.prop("checked",!1)})})},validateMinimumWordLength:function(){Array.prototype.slice.call(document.querySelectorAll(".everest-forms-min-words-length-enabled")).map(function(e){var t=parseInt(e.dataset.textMinLength,10)||0;jQuery.validator.addMethod("minWordLength",function(e,t,i){return e.trim().split(/\s+/).length>=i[0]}),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minWordLength:[t]})})})}};l.init()});
1
+ jQuery(function(f){"use strict";if("undefined"==typeof everest_forms_params)return!1;var l={$everest_form:f("form.everest-form"),init:function(){this.init_inputMask(),this.init_mailcheck(),this.init_datepicker(),this.init_datedropdown(),this.load_validation(),this.submission_scroll(),this.randomize_elements(),this.init_enhanced_select(),this.checkUncheckAllcheckbox(),this.validateMinimumWordLength(),this.$everest_form.on("input validate change",".input-text, select, input:checkbox, input:radio",this.validate_field),f(document.body).trigger("everest_forms_loaded")},init_inputMask:function(){"undefined"!=typeof f.fn.inputmask&&f(".evf-masked-input").inputmask()},init_mailcheck:function(){"undefined"!=typeof f.fn.mailcheck&&everest_forms_params.mailcheck_enabled&&(0<everest_forms_params.mailcheck_domains.length&&(Mailcheck.defaultDomains=Mailcheck.defaultDomains.concat(everest_forms_params.mailcheck_domains)),0<everest_forms_params.mailcheck_toplevel_domains.length&&(Mailcheck.defaultTopLevelDomains=Mailcheck.defaultTopLevelDomains.concat(everest_forms_params.mailcheck_toplevel_domains)),f(document).on("blur",".evf-field-email input",function(){var e=f(this),a=e.attr("id");e.mailcheck({suggested:function(e,t){f("#"+a+"_suggestion").remove();t=everest_forms_params.i18n_messages_email_suggestion.replace("{suggestion}",'<a href="#" class="mailcheck-suggestion" data-id="'+a+'" title="'+everest_forms_params.i18n_messages_email_suggestion_title+'">'+t.full+"</a>");(e.parents("span.input-wrapper").length?f(e).parents("span.input-wrapper"):f(e)).after('<label class="evf-error mailcheck-error" id="'+a+'_suggestion">'+t+"</label>")},empty:function(){f("#"+a+"_suggestion").remove()}})}),f(document).on("click",".evf-field-email .mailcheck-suggestion",function(e){var t=f(this),a=t.attr("data-id");e.preventDefault(),f("#"+a).val(t.text()),t.parent().remove()}))},init_datepicker:function(){var e=f(".evf-field-date-time");e.length&&e.find(".flatpickr-field").length&&e.find(".flatpickr-field").each(function(){var e,t=5,a=f(this).data(),i=[],s="",r=(a.minDateRange&&(s="today")!==a.minDateRange&&(s=/^\s*[-+]?\d+\s*d/i.test(a.minDateRange)?(s=a.minDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(s)):"today"),"");switch(a.maxDateRange&&(r="today")!==a.maxDateRange&&(r=/^\s*[-+]?\d+\s*d/i.test(a.maxDateRange)?(r=a.maxDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(r)):""),a.disableDates&&(i=a.disableDates.split(",")),e=a.pastDisableDate||"",a.dateTime){case"date":f(this).flatpickr({disableMobile:!0,mode:a.mode,minDate:s||a.minDate||e,maxDate:r||a.maxDate,dateFormat:a.dateFormat,disable:i});break;case"time":undefined!==a.timeInterval&&(t=parseInt(a.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!0,minuteIncrement:t,dateFormat:a.dateFormat,disableMobile:!0,time_24hr:a.dateFormat.includes("H:i")});break;case"date-time":undefined!==a.timeInterval&&(t=parseInt(a.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!1,disableMobile:!0,mode:a.mode,minDate:s||a.minDate||e,maxDate:r||a.maxDate,minuteIncrement:t,dateFormat:a.dateFormat,time_24hr:a.dateFormat.includes("H:i"),disable:i})}})},init_datedropdown:function(){f(".date-dropdown-field").each(function(){var e=f(this);e.hide(),l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=hour-select]",function(){var e=f(this).siblings("input.date-dropdown-field");l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=-select]",function(){var e=f(this).siblings("input.date-dropdown-field");e.val(l.format_dropdown_date(e))})},change_minutes:function(e){var t=e.attr("id");if(void 0!==e.siblings("#minute-select-"+t).attr("id")){for(var a=e.attr("data-max-hour"),i=e.attr("data-min-hour"),s=e.attr("data-max-minute"),r=e.attr("data-min-minute"),n=(void 0!==i&&""!=i||(i=0),void 0!==a&&""!=a||(i=23),void 0!==r&&""!=r||(r=0),void 0!==s&&""!=s||(s=59),""),d=0;d<=59;d++)if(!(e.siblings("#hour-select-"+t).val()==i&&d<r)){if(e.siblings("#hour-select-"+t).val()==a&&s<d)break;n+='<option value = "'+d+'"> '+(d<10?"0"+d:d)+"</option>"}e.siblings("#minute-select-"+t).html(n),e.siblings("#minute-select-"+t).attr("value",e.siblings("#minute-select-"+t).find("option:first").val())}e.val(l.format_dropdown_date(e))},format_dropdown_date:function(e){var t=e.attr("id"),t={selected_year:e.siblings("#year-select-"+t).val(),selected_month:e.siblings("#month-select-"+t).val(),selected_day:e.siblings("#day-select-"+t).val(),selected_hour:e.siblings("#hour-select-"+t).val(),selected_minute:e.siblings("#minute-select-"+t).val()},e={date_format:e.attr("data-date-format"),date_time:e.attr("data-date-time")},a="";return"date"!=e.date_time&&"date-time"!=e.date_time||(t.selected_day=t.selected_day<10?"0"+t.selected_day:t.selected_day,a=e.date_format.match(/F j, Y/)?["January","Febuary","March","April","May","June","July","August","September","October","November","December"][parseInt(t.selected_month)-1]+" "+t.selected_day+", "+t.selected_year:(t.selected_month=t.selected_month<10?"0"+t.selected_month:t.selected_month,e.date_format.match(/Y-m-d/)?t.selected_year+"-"+t.selected_month+"-"+t.selected_day:e.date_format.match(/m\/d\/Y/)?t.selected_month+"/"+t.selected_day+"/"+t.selected_year:t.selected_day+"/"+t.selected_month+"/"+t.selected_year)),"time"!=e.date_time&&"date-time"!=e.date_time||(t.selected_minute=t.selected_minute<10?"0"+t.selected_minute:t.selected_minute,e.date_format.match(/H:i/)?(t.selected_hour=t.selected_hour<10?"0"+t.selected_hour:t.selected_hour,a+=" "+t.selected_hour+":"+t.selected_minute):(e="PM",t.selected_hour<12?(e="AM",0==t.selected_hour&&(t.selected_hour=12)):12<t.selected_hour&&(t.selected_hour=t.selected_hour-12),a+=" "+t.selected_hour+":"+t.selected_minute+" "+e)),a.trim()},load_validation:function(){if("undefined"==typeof f.fn.validate)return!1;f(".evf-field-url input[type=url]").on("change",function(){var e=f(this).val();if(!e)return!1;"http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&f(this).val("http://"+e)}),f.extend(f.validator.messages,{required:everest_forms_params.i18n_messages_required,url:everest_forms_params.i18n_messages_url,email:everest_forms_params.i18n_messages_email,number:everest_forms_params.i18n_messages_number}),f.validator.methods.email=function(e,t){var a=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return this.optional(t)||a.test(e)},f.validator.addMethod("confirm",function(e,t,a){return f.validator.methods.equalTo.call(this,e,t,a)},everest_forms_params.i18n_messages_confirm),f.validator.addMethod("check-limit",function(e,t){var t=f(t).closest("ul"),a=t.find('input[type="checkbox"]:checked'),t=parseInt(t.attr("data-choice-limit")||0,10);return 0===t||a.length<=t},function(e,t){t=parseInt(f(t).closest("ul").attr("data-choice-limit")||0,10);return everest_forms_params.i18n_messages_check_limit.replace("{#}",t)}),this.$everest_form.each(function(){var e=f(this),u={};f(".evf-field").each(function(){var e=f(this).closest("form").data("formid"),t=f(this).data("field-id"),a=f(this).data("required-field-message"),i="everest_forms[form_fields]["+t+"]";if(f(this).is(".evf-field-payment-single"))f(this).find(".evf-payment-price").is(".evf-payment-user-input")||(f(this).find(".evf-payment-price").attr("required",!1),a=null);else if(f(this).is(".evf-field-checkbox, .evf-field-payment-checkbox"))i+="[]";else if(f(this).is(".evf-field-image-upload"))i="evf_"+e+"_"+t;else if(f(this).is(".evf-field-signature"))i="everest_forms[form_fields]["+t+"][signature_image]";else if(f(this).is(".evf-field-phone"))i+="[phone_field]";else if(f(this).is(".evf-field-email")||f(this).is(".evf-field-password"))u[i="everest_forms[form_fields]["+t+"]"]={required:a},u[i="everest_forms[form_fields]["+t+"][primary]"]={required:a},u[i="everest_forms[form_fields]["+t+"][secondary]"]={required:a},a=null;else if(f(this).is(".evf-field-address")){for(var s={address1:f(this).data("required-field-message-address1"),city:f(this).data("required-field-message-city"),state:f(this).data("required-field-message-state"),postal:f(this).data("required-field-message-postal"),country:f(this).data("required-field-message-country")},r=Object.keys(s),n=0;n<r.length;n++){var d=r[n],a=s[r[n]];u[i="everest_forms[form_fields]["+t+"]["+d+"]"]={required:a}}a=null}else if(f(this).is(".evf-field-likert")){var l=f(this).data("row-keys"),s={};if(l&&Array.isArray(l)){for(n=0;n<l.length;n++){var o=l[n];s[o]=f(this).data("required-field-message-"+o)}for(n=0;n<l.length;n++)a=s[l[n]],i="everest_forms[form_fields]["+t+"]["+l[n]+"]",u[i]={required:a}}a=null}else f(this).is(".evf-field-file-upload")&&(i="everest_forms_"+e+"_"+t);a&&(u[i]={required:a})}),e.validate({messages:u,ignore:"",errorClass:"evf-error",validClass:"evf-valid",errorPlacement:function(e,t){t.closest(".evf-field").is(".evf-field-privacy-policy")?t.closest(".evf-field").append(e):t.closest(".evf-field").is(".evf-field-range-slider")?t.closest(".evf-field").find(".evf-field-description").length?t.closest(".evf-field").find(".evf-field-description").before(e):t.closest(".evf-field").append(e):t.closest(".evf-field").is(".evf-field-scale-rating")?t.closest(".evf-field").find(".everest-forms-field-scale-rating").after(e):"radio"===t.attr("type")||"checkbox"===t.attr("type")?t.hasClass("everest-forms-likert-field-option")?t.closest("tr").children("th").append(e):(t.closest(".evf-field-checkbox").find("label.evf-error").remove(),t.parent().parent().parent().append(e)):t.is("select")&&t.attr("class").match(/date-month|date-day|date-year/)?0===t.parent().find("label.evf-error:visible").length&&t.parent().find("select:last").after(e):t.is("select")&&t.hasClass("evf-enhanced-select")?0===t.parent().find("label.evf-error:visible").length&&t.parent().find(".select2").after(e):t.hasClass("evf-smart-phone-field")||t.hasClass("everest-forms-field-password-primary")||t.hasClass("everest-forms-field-password-secondary")?(t.parents("span.input-wrapper").length?t.parents("span.input-wrapper"):t.parent()).after(e):t.parents("span.input-wrapper").length?t.parents("span.input-wrapper").after(e):e.insertAfter(t)},highlight:function(e,t,a){var e=f(e),i=e.closest(".form-row"),s=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?i.find('input[name="'+s+'"]'):e).addClass(t).removeClass(a),i.removeClass("everest-forms-validated").addClass("everest-forms-invalid evf-has-error")},unhighlight:function(e,t,a){var e=f(e),i=e.closest(".form-row"),s=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?i.find('input[name="'+s+'"]'):e).addClass(a).removeClass(t),i.removeClass("evf-has-error")},submitHandler:function(e){var t=f(e),a=t.find(".evf-submit"),i=a.data("process-text"),s=a.get(0).recaptchaID,r=t.find("[data-gateway='razorpay']"),n=t.find("[data-gateway*='stripe']");if(i&&a.text(i).prop("disabled",!0),0===s)return grecaptcha.execute(s),!1;0<r.length||(1!==t.data("ajax_submission")||n.length<0&&0!==n.children.length)&&e.submit()},onkeyup:function(e,t){f(e).hasClass("everest-forms-novalidate-onkeyup")||9===t.which&&""===this.elementValue(e)||-1!==f.inArray(t.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onfocusout:function(e){var t=!1;f(e).hasClass("everest-forms-novalidate-onkeyup")&&!e.value&&(t=!0),(t=this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)?t:!0)&&this.element(e)},onclick:function(e){var t=!1,a=(e||{}).type,i=f(e);"checkbox"===a?(i.closest(".evf-field-checkbox").find("label.evf-error").remove(),t=!0):!1===a&&f(e).valid(),t&&this.element(e)}})})},validate_field:function(e){var t=f(this),a=f("body"),i=t.closest(".form-row"),s=!0,r=i.is(".validate-required"),n=i.is(".validate-email"),e=e.type;a.hasClass("everest-forms-is-offline")?i.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email everest-forms-validated"):i.hasClass("evf-field-address")||i.hasClass("evf-field-payment-single")||f("body").hasClass("everest-forms-is-offline")?0===i.find("input.evf-error").length&&i.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email").addClass("everest-forms-validated"):("input"===e&&i.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email everest-forms-validated"),"validate"!==e&&"change"!==e||(r&&(t.hasClass("everest-forms-likert-field-option")?0<i.find("input.evf-error").length&&(i.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-required-field"),s=!1):("checkbox"===t.attr("type")&&0===i.find("input:checked").length||""===t.val())&&(i.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-required-field"),s=!1)),n&&t.val()&&!new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(t.val())&&(i.removeClass("everest-forms-validated").addClass("everest-forms-invalid everest-forms-invalid-email"),s=!1),s&&i.removeClass("everest-forms-invalid everest-forms-invalid-required-field everest-forms-invalid-email").addClass("everest-forms-validated")))},submission_scroll:function(){f("div.everest-forms-submission-scroll").length&&f("html,body").animate({scrollTop:f("div.everest-forms-submission-scroll").offset().top-100},1e3)},randomize_elements:function(){f(".everest-forms-randomize").each(function(){for(var e=f(this),t=e.children();t.length;)e.append(t.splice(Math.floor(Math.random()*t.length),1)[0])})},init_enhanced_select:function(){try{f(document.body).on("evf-frontend-enhanced-select-init",function(){"undefined"!=typeof f.fn.selectWoo&&f("select.evf-enhanced-select:visible").filter(":not(.evf-enhanced)").each(function(){var e=f.extend({minimumResultsForSearch:10<f(this).find("option").length?10:null,placeholder:f(this).attr("placeholder")||"",allowClear:!f(this).prop("multiple")},{language:{noResults:function(){return everest_forms_params.i18n_no_matches}}});f(this).selectWoo(e).addClass("evf-enhanced")})}).trigger("evf-frontend-enhanced-select-init")}catch(e){window.console.log(e)}},checkUncheckAllcheckbox:function(){var e=f("form.everest-form").find(".evf-field, .evf-field-checkbox, .form-row").find("ul").find("li.evf-select-all-checkbox-li").find("#evfCheckAll");e.length&&e.each(function(){var a=f(this);a.on("click",function(){1==f(this).prop("checked")?a.parent().parent().find("li").find("input:checkbox").not(a).prop("checked",!0):0==f(this).prop("checked")&&a.parent().parent().find("li").find("input:checkbox").not(a).prop("checked",!1)}),a.parent().parent().find("li").find("input:checkbox").not(a).on("change",function(){var e=a.parent().parent().find("li").find("input:checkbox:checked").not(a).length,t=a.parent().parent().find("li").find("input:checkbox").not(a).length;e===t?a.prop("checked",!0):e<t&&a.prop("checked",!1)})})},validateMinimumWordLength:function(){Array.prototype.slice.call(document.querySelectorAll(".everest-forms-min-words-length-enabled")).map(function(e){var t=parseInt(e.dataset.textMinLength,10)||0;jQuery.validator.addMethod("minWordLength",function(e,t,a){return e.trim().split(/\s+/).length>=a[0]}),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minWordLength:[t]})})})}};l.init()});
everest-forms.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Everest Forms
4
  * Plugin URI: https://wpeverest.com/wordpress-plugins/everest-forms/
5
  * Description: Drag and Drop contact form builder to easily create simple to complex forms for any purpose. Lightweight, Beautiful design, responsive and more.
6
- * Version: 1.9.5
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: everest-forms
3
  * Plugin Name: Everest Forms
4
  * Plugin URI: https://wpeverest.com/wordpress-plugins/everest-forms/
5
  * Description: Drag and Drop contact form builder to easily create simple to complex forms for any purpose. Lightweight, Beautiful design, responsive and more.
6
+ * Version: 1.9.6
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: everest-forms
includes/class-everest-forms.php CHANGED
@@ -21,7 +21,7 @@ final class EverestForms {
21
  *
22
  * @var string
23
  */
24
- public $version = '1.9.5';
25
 
26
  /**
27
  * The single instance of the class.
21
  *
22
  * @var string
23
  */
24
+ public $version = '1.9.6';
25
 
26
  /**
27
  * The single instance of the class.
includes/class-evf-emails.php CHANGED
@@ -332,6 +332,8 @@ class EVF_Emails {
332
  // Hooks before email is sent.
333
  do_action( 'everest_forms_email_send_before', $this );
334
 
 
 
335
  // Email Template Enabled or not checked.
336
  $email_template_included = ! empty( $this->form_data['settings']['email'][ $connection_id ]['choose_template'] ) ? true : false;
337
 
332
  // Hooks before email is sent.
333
  do_action( 'everest_forms_email_send_before', $this );
334
 
335
+ $message = apply_filters( 'everest_forms_entry_email__message', str_replace( '{entry_id}', $this->entry_id, $message ), $this );
336
+
337
  // Email Template Enabled or not checked.
338
  $email_template_included = ! empty( $this->form_data['settings']['email'][ $connection_id ]['choose_template'] ) ? true : false;
339
 
includes/class-evf-form-task.php CHANGED
@@ -173,8 +173,10 @@ class EVF_Form_Task {
173
  do_action( "everest_forms_process_before_{$form_id}", $entry, $this->form_data );
174
 
175
  $ajax_form_submission = isset( $this->form_data['settings']['ajax_form_submission'] ) ? $this->form_data['settings']['ajax_form_submission'] : 0;
 
 
 
176
  if ( '1' === $ajax_form_submission ) {
177
-
178
  // For the sake of validation we completely remove the validator option.
179
  update_option( 'evf_validation_error', '' );
180
 
@@ -859,7 +861,6 @@ class EVF_Form_Task {
859
  $email['reply_to'] = ! empty( $notification['evf_reply_to'] ) ? $notification['evf_reply_to'] : $email['sender_address'];
860
  $email['message'] = ! empty( $notification['evf_email_message'] ) ? $notification['evf_email_message'] : '{all_fields}';
861
  $email = apply_filters( 'everest_forms_entry_email_atts', $email, $fields, $entry, $form_data );
862
-
863
 
864
  $attachment = '';
865
 
173
  do_action( "everest_forms_process_before_{$form_id}", $entry, $this->form_data );
174
 
175
  $ajax_form_submission = isset( $this->form_data['settings']['ajax_form_submission'] ) ? $this->form_data['settings']['ajax_form_submission'] : 0;
176
+ if ( isset( $this->form_data['payments']['stripe']['enable_stripe'] ) && '1' === $this->form_data['payments']['stripe']['enable_stripe'] ) {
177
+ $ajax_form_submission = '1';
178
+ }
179
  if ( '1' === $ajax_form_submission ) {
 
180
  // For the sake of validation we completely remove the validator option.
181
  update_option( 'evf_validation_error', '' );
182
 
861
  $email['reply_to'] = ! empty( $notification['evf_reply_to'] ) ? $notification['evf_reply_to'] : $email['sender_address'];
862
  $email['message'] = ! empty( $notification['evf_email_message'] ) ? $notification['evf_email_message'] : '{all_fields}';
863
  $email = apply_filters( 'everest_forms_entry_email_atts', $email, $fields, $entry, $form_data );
 
864
 
865
  $attachment = '';
866
 
includes/class-evf-forms-features.php CHANGED
@@ -50,12 +50,14 @@ class EVF_Forms_Features {
50
  'EVF_Field_Payment_Checkbox',
51
  'EVF_Field_Payment_Quantity',
52
  'EVF_Field_Payment_Total',
 
53
  'EVF_Field_Payment_Coupon',
54
  'EVF_Field_Credit_Card',
55
  'EVF_Field_Rating',
56
  'EVF_Field_Likert',
57
  'EVF_Field_Scale_Rating',
58
  'EVF_Field_Yes_No',
 
59
  'EVF_Field_Reset',
60
  );
61
 
50
  'EVF_Field_Payment_Checkbox',
51
  'EVF_Field_Payment_Quantity',
52
  'EVF_Field_Payment_Total',
53
+ 'EVF_Field_Payment_Subtotal',
54
  'EVF_Field_Payment_Coupon',
55
  'EVF_Field_Credit_Card',
56
  'EVF_Field_Rating',
57
  'EVF_Field_Likert',
58
  'EVF_Field_Scale_Rating',
59
  'EVF_Field_Yes_No',
60
+ 'EVF_Field_Color',
61
  'EVF_Field_Reset',
62
  );
63
 
includes/fields/class-evf-field-color.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Color field
4
+ *
5
+ * @package EverestForms\Fields
6
+ * @since 1.9.6
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit;
10
+
11
+ /**
12
+ * EVF_Field_Color Class.
13
+ */
14
+ class EVF_Field_Color extends EVF_Form_Fields {
15
+
16
+ /**
17
+ * Constructor.
18
+ */
19
+ public function __construct() {
20
+ $this->name = esc_html__( 'Color', 'everest-forms' );
21
+ $this->type = 'color';
22
+ $this->icon = 'evf-icon evf-icon-color';
23
+ $this->order = 210;
24
+ $this->group = 'advanced';
25
+ $this->is_pro = true;
26
+
27
+ parent::__construct();
28
+ }
29
+ }
includes/fields/class-evf-field-date-time.php CHANGED
@@ -394,9 +394,67 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
394
  false
395
  );
396
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  $args = array(
398
  'slug' => 'date_format',
399
- 'content' => $date_format_label . $date_format_select . $disable_dates_label . $disable_dates . $date_localization_label . $date_localization_select . '<div class="everest-forms-checklist everest-forms-checklist-inline">' . $current_date_mode . '</div><div class="everest-forms-current-date-format">' . $current_date_default . '</div><div class="everest-forms-past-date-disable-format">' . $enable_past_date_disable . '</div><div class="everest-forms-min-max-date-format">' . $enable_min_max . '</div><div class="everest-forms-min-max-date-option ' . $class_name . '">' . $min_date_label . $min_date . $max_date_label . $max_date . '</div>',
400
  );
401
  $this->field_element( 'row', $field, $args );
402
 
@@ -617,9 +675,11 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
617
  } else {
618
  $properties['inputs']['primary']['attr']['data-mode'] = isset( $field['date_mode'] ) ? $field['date_mode'] : 'single';
619
  }
620
- $properties['inputs']['primary']['attr']['data-locale'] = isset( $field['date_localization'] ) ? $field['date_localization'] : 'en';
621
- $properties['inputs']['primary']['attr']['data-min-date'] = isset( $field['enable_min_max'], $field['min_date'] ) ? $field['min_date'] : '';
622
- $properties['inputs']['primary']['attr']['data-max-date'] = isset( $field['enable_min_max'], $field['max_date'] ) ? $field['max_date'] : '';
 
 
623
  }
624
 
625
  if ( 'date' !== $field['datetime_format'] ) {
@@ -783,18 +843,26 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
783
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
784
  $form_obj = evf()->form->get( $form_id );
785
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
786
- $data_i10n = 'en';
787
 
788
  if ( ! empty( $form_data['form_fields'] ) ) {
 
789
  foreach ( $form_data['form_fields'] as $form_field ) {
790
- if ( 'date-time' === $form_field['type'] ) {
791
  $data_i10n = isset( $form_field['date_localization'] ) ? $form_field['date_localization'] : 'en';
 
 
 
 
792
  }
793
  }
794
- }
795
 
796
- if ( wp_script_is( 'flatpickr' ) && 'en' !== $data_i10n && 'picker' === $form_field['datetime_style'] ) {
797
- wp_enqueue_script( 'flatpickr-localization', evf()->plugin_url() . '/assets/js/flatpickr/dist/I10n/' . $data_i10n . '.js', array(), EVF_VERSION, true );
 
 
 
 
 
798
  }
799
 
800
  }
394
  false
395
  );
396
 
397
+ $set_date_range = $this->field_element(
398
+ 'checkbox',
399
+ $field,
400
+ array(
401
+ 'slug' => 'set_date_range',
402
+ 'value' => isset( $field['set_date_range'] ) ? $field['set_date_range'] : '',
403
+ 'desc' => esc_html__( 'Enable Custom Input', 'everest-forms' ),
404
+ 'tooltip' => esc_html__( "Check this option to set date range 'x' days after today.", 'everest-forms' ),
405
+ ),
406
+ false
407
+ );
408
+
409
+ $min_date_range_level = $this->field_element(
410
+ 'label',
411
+ $field,
412
+ array(
413
+ 'slug' => 'min_date_range',
414
+ 'value' => esc_html__( 'Minimum Date', 'everest-forms' ),
415
+ 'tooltip' => esc_html__( 'Number of days after today or before for negative numbers. Example: today or +14 days or -5 days.', 'everest-forms' ),
416
+ ),
417
+ false
418
+ );
419
+
420
+ $min_date_range = $this->field_element(
421
+ 'text',
422
+ $field,
423
+ array(
424
+ 'slug' => 'min_date_range',
425
+ 'value' => isset( $field['min_date_range'] ) ? $field['min_date_range'] : '',
426
+ 'class' => 'everest-forms-min-date-range',
427
+ 'placeholder' => 'e.g. today',
428
+ ),
429
+ false
430
+ );
431
+
432
+ $max_date_range_label = $this->field_element(
433
+ 'label',
434
+ $field,
435
+ array(
436
+ 'slug' => 'max_date_range',
437
+ 'value' => esc_html__( 'Maximum Date', 'everest-forms' ),
438
+ 'tooltip' => esc_html__( 'Number of days after today or before for negative numbers. Example: today or +14 days or -5 days.', 'everest-forms' ),
439
+ ),
440
+ false
441
+ );
442
+
443
+ $max_date_range = $this->field_element(
444
+ 'text',
445
+ $field,
446
+ array(
447
+ 'slug' => 'max_date_range',
448
+ 'value' => isset( $field['max_date_range'] ) ? $field['max_date_range'] : '',
449
+ 'class' => 'everest-forms-max-date-range',
450
+ 'placeholder' => 'e.g. +14 days',
451
+ ),
452
+ false
453
+ );
454
+
455
  $args = array(
456
  'slug' => 'date_format',
457
+ 'content' => $date_format_label . $date_format_select . $disable_dates_label . $disable_dates . $date_localization_label . $date_localization_select . '<div class="everest-forms-checklist everest-forms-checklist-inline">' . $current_date_mode . '</div><div class="everest-forms-current-date-format">' . $current_date_default . '</div><div class="everest-forms-past-date-disable-format">' . $enable_past_date_disable . '</div><div class="everest-forms-min-max-date-format">' . $enable_min_max . '</div><div class="everest-forms-min-max-date-range-format ' . $class_name . '">' . $set_date_range . '</div><div class="everest-forms-min-max-date-option ' . $class_name . '">' . $min_date_label . $min_date . $max_date_label . $max_date . '</div><div class="everest-forms-min-max-date-range-option ' . $class_name . '">' . $min_date_range_level . $min_date_range . $max_date_range_label . $max_date_range . '</div>',
458
  );
459
  $this->field_element( 'row', $field, $args );
460
 
675
  } else {
676
  $properties['inputs']['primary']['attr']['data-mode'] = isset( $field['date_mode'] ) ? $field['date_mode'] : 'single';
677
  }
678
+ $properties['inputs']['primary']['attr']['data-locale'] = isset( $field['date_localization'] ) ? $field['date_localization'] : 'en';
679
+ $properties['inputs']['primary']['attr']['data-min-date'] = isset( $field['enable_min_max'], $field['min_date'] ) && ! isset( $field['set_date_range'] ) ? $field['min_date'] : '';
680
+ $properties['inputs']['primary']['attr']['data-max-date'] = isset( $field['enable_min_max'], $field['max_date'] ) && ! isset( $field['set_date_range'] ) ? $field['max_date'] : '';
681
+ $properties['inputs']['primary']['attr']['data-min-date-range'] = isset( $field['set_date_range'], $field['enable_min_max'], $field['min_date_range'] ) ? $field['min_date_range'] : '';
682
+ $properties['inputs']['primary']['attr']['data-max-date-range'] = isset( $field['set_date_range'], $field['enable_min_max'], $field['max_date_range'] ) ? $field['max_date_range'] : '';
683
  }
684
 
685
  if ( 'date' !== $field['datetime_format'] ) {
843
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
844
  $form_obj = evf()->form->get( $form_id );
845
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
 
846
 
847
  if ( ! empty( $form_data['form_fields'] ) ) {
848
+ $data_i10ns = array();
849
  foreach ( $form_data['form_fields'] as $form_field ) {
850
+ if ( 'date-time' === $form_field['type'] && 'picker' === $form_field['datetime_style'] ) {
851
  $data_i10n = isset( $form_field['date_localization'] ) ? $form_field['date_localization'] : 'en';
852
+
853
+ if ( ! in_array( $data_i10n, $data_i10ns, true ) && 'en' !== $data_i10n ) {
854
+ $data_i10ns[] = $data_i10n;
855
+ }
856
  }
857
  }
 
858
 
859
+ if ( ! empty( $data_i10ns ) ) {
860
+ foreach ( $data_i10ns as $data_i10n ) {
861
+ if ( wp_script_is( 'flatpickr' ) ) {
862
+ wp_enqueue_script( 'flatpickr-localization-' . $data_i10n, evf()->plugin_url() . '/assets/js/flatpickr/dist/I10n/' . $data_i10n . '.js', array(), EVF_VERSION, true );
863
+ }
864
+ }
865
+ }
866
  }
867
 
868
  }
includes/fields/class-evf-field-payment-subtotal.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Payment Subtotal field
4
+ *
5
+ * @package EverestForms\Fields
6
+ * @since 1.9.6
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit;
10
+
11
+ /**
12
+ * EVF_Field_Payment_Subtotal Class.
13
+ */
14
+ class EVF_Field_Payment_Subtotal extends EVF_Form_Fields {
15
+
16
+ /**
17
+ * Constructor.
18
+ */
19
+ public function __construct() {
20
+ $this->name = esc_html__( 'Subtotal', 'everest-forms' );
21
+ $this->type = 'payment-subtotal';
22
+ $this->icon = 'evf-icon evf-icon-subtotal';
23
+ $this->order = 220;
24
+ $this->group = 'payment';
25
+ $this->is_pro = true;
26
+
27
+ parent::__construct();
28
+ }
29
+ }
includes/shortcodes/class-evf-shortcode-form.php CHANGED
@@ -881,17 +881,21 @@ class EVF_Shortcode_Form {
881
  }
882
 
883
  // Basic form information.
884
- $form_data = apply_filters( 'everest_forms_frontend_form_data', evf_decode( $form->post_content ) );
885
- $form_id = absint( $form->ID );
886
- $settings = $form_data['settings'];
887
- $action = esc_url_raw( remove_query_arg( 'evf-forms' ) );
888
- $title = filter_var( $title, FILTER_VALIDATE_BOOLEAN );
889
- $description = filter_var( $description, FILTER_VALIDATE_BOOLEAN );
890
- $errors = isset( evf()->task->errors[ $form_id ] ) ? evf()->task->errors[ $form_id ] : array();
891
- $form_enabled = isset( $form_data['form_enabled'] ) ? absint( $form_data['form_enabled'] ) : 1;
892
- $kff_enabled = isset( $settings['keyboard_friendly_form'] ) ? absint( $settings['keyboard_friendly_form'] ) : 0;
893
- $disable_message = isset( $form_data['settings']['form_disable_message'] ) ? evf_string_translation( $form_data['id'], 'form_disable_message', $form_data['settings']['form_disable_message'] ) : __( 'This form is disabled.', 'everest-forms' );
894
- $ajax_form_submission = isset( $settings['ajax_form_submission'] ) ? $settings['ajax_form_submission'] : 0;
 
 
 
 
895
 
896
  if ( 0 !== $ajax_form_submission ) {
897
  wp_enqueue_script( 'everest-forms-ajax-submission' );
881
  }
882
 
883
  // Basic form information.
884
+ $form_data = apply_filters( 'everest_forms_frontend_form_data', evf_decode( $form->post_content ) );
885
+ $form_id = absint( $form->ID );
886
+ $settings = $form_data['settings'];
887
+ $action = esc_url_raw( remove_query_arg( 'evf-forms' ) );
888
+ $title = filter_var( $title, FILTER_VALIDATE_BOOLEAN );
889
+ $description = filter_var( $description, FILTER_VALIDATE_BOOLEAN );
890
+ $errors = isset( evf()->task->errors[ $form_id ] ) ? evf()->task->errors[ $form_id ] : array();
891
+ $form_enabled = isset( $form_data['form_enabled'] ) ? absint( $form_data['form_enabled'] ) : 1;
892
+ $kff_enabled = isset( $settings['keyboard_friendly_form'] ) ? absint( $settings['keyboard_friendly_form'] ) : 0;
893
+ $disable_message = isset( $form_data['settings']['form_disable_message'] ) ? evf_string_translation( $form_data['id'], 'form_disable_message', $form_data['settings']['form_disable_message'] ) : __( 'This form is disabled.', 'everest-forms' );
894
+ if ( isset( $form_data['payments']['stripe']['enable_stripe'] ) && '1' === $form_data['payments']['stripe']['enable_stripe'] ) {
895
+ $ajax_form_submission = isset( $settings['ajax_form_submission'] ) ? 1 : 0;
896
+ } else {
897
+ $ajax_form_submission = isset( $settings['ajax_form_submission'] ) ? $settings['ajax_form_submission'] : 0;
898
+ }
899
 
900
  if ( 0 !== $ajax_form_submission ) {
901
  wp_enqueue_script( 'everest-forms-ajax-submission' );
languages/everest-forms.pot CHANGED
@@ -2,16 +2,16 @@
2
  # This file is distributed under the same license as the Everest Forms plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Everest Forms 1.9.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/everest-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-10-18T10:04:53+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
- "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: everest-forms\n"
16
 
17
  #. Plugin Name of the plugin
@@ -640,8 +640,8 @@ msgid "Check this option to select all the options."
640
  msgstr ""
641
 
642
  #: includes/abstracts/class-evf-form-fields.php:1873
643
- #: includes/class-evf-emails.php:442
644
- #: includes/class-evf-emails.php:562
645
  msgid "(empty)"
646
  msgstr ""
647
 
@@ -792,7 +792,7 @@ msgstr ""
792
  #: includes/admin/builder/class-evf-builder-settings.php:77
793
  #: includes/admin/builder/class-evf-builder-settings.php:402
794
  #: includes/admin/builder/class-evf-builder-settings.php:462
795
- #: includes/class-evf-form-task.php:826
796
  #: includes/evf-update-functions.php:140
797
  #: includes/templates/contact.php:71
798
  msgid "Admin Notification"
@@ -2736,12 +2736,12 @@ msgid "You cannot send emails with EVF_Emails until init/admin_init has been rea
2736
  msgstr ""
2737
 
2738
  #. translators: %d - field ID.
2739
- #: includes/class-evf-emails.php:536
2740
- #: includes/class-evf-emails.php:578
2741
  msgid "Field ID #%d"
2742
  msgstr ""
2743
 
2744
- #: includes/class-evf-emails.php:590
2745
  msgid "An empty form was submitted."
2746
  msgstr ""
2747
 
@@ -2804,8 +2804,8 @@ msgid "Popup Size"
2804
  msgstr ""
2805
 
2806
  #: includes/class-evf-form-task.php:91
2807
- #: includes/class-evf-form-task.php:504
2808
- #: includes/shortcodes/class-evf-shortcode-form.php:957
2809
  #: includes/templates/contact.php:61
2810
  msgid "Thanks for contacting us! We will be in touch with you shortly."
2811
  msgstr ""
@@ -2826,59 +2826,59 @@ msgstr ""
2826
  msgid "Everest Forms Process Before Form ID."
2827
  msgstr ""
2828
 
2829
- #: includes/class-evf-form-task.php:245
2830
- #: includes/class-evf-form-task.php:368
2831
- #: includes/class-evf-form-task.php:442
2832
  msgid "Form has not been submitted, please see the errors below."
2833
  msgstr ""
2834
 
2835
- #: includes/class-evf-form-task.php:248
2836
  msgid "Form has not been submitted."
2837
  msgstr ""
2838
 
2839
- #: includes/class-evf-form-task.php:276
2840
  msgid "hCaptcha verification failed, please try again later."
2841
  msgstr ""
2842
 
2843
- #: includes/class-evf-form-task.php:278
2844
  msgid "Google reCAPTCHA verification failed, please try again later."
2845
  msgstr ""
2846
 
2847
- #: includes/class-evf-form-task.php:380
2848
  msgid "Everest Forms honeypot field triggered."
2849
  msgstr ""
2850
 
2851
- #: includes/class-evf-form-task.php:445
2852
  msgid "Form has not been submitted"
2853
  msgstr ""
2854
 
2855
- #: includes/class-evf-form-task.php:454
2856
  msgid "Entry Added to Database."
2857
  msgstr ""
2858
 
2859
- #: includes/class-evf-form-task.php:463
2860
  msgid "Sent Email Notification."
2861
  msgstr ""
2862
 
2863
- #: includes/class-evf-form-task.php:480
2864
  msgid "Everest Forms Process Completed."
2865
  msgstr ""
2866
 
2867
- #: includes/class-evf-form-task.php:535
2868
  #: templates/notices/success.php:69
2869
  msgid "Download your form submission in PDF format"
2870
  msgstr ""
2871
 
2872
  #. translators: %s - form name.
2873
- #: includes/class-evf-form-task.php:854
2874
  msgid "New %s Entry"
2875
  msgstr ""
2876
 
2877
- #: includes/class-evf-form-task.php:955
2878
  msgid "No form ID was found."
2879
  msgstr ""
2880
 
2881
- #: includes/class-evf-form-task.php:962
2882
  msgid "Could not create an entry"
2883
  msgstr ""
2884
 
@@ -11962,6 +11962,10 @@ msgstr ""
11962
  msgid "Check this to manually set form field values."
11963
  msgstr ""
11964
 
 
 
 
 
11965
  #: includes/fields/class-evf-field-credit-card.php:20
11966
  msgid "Credit Card"
11967
  msgstr ""
@@ -11979,7 +11983,7 @@ msgid "Select a format for the date field."
11979
  msgstr ""
11980
 
11981
  #: includes/fields/class-evf-field-date-time.php:85
11982
- #: includes/fields/class-evf-field-date-time.php:406
11983
  msgid "Time"
11984
  msgstr ""
11985
 
@@ -12069,6 +12073,7 @@ msgid "Check this option to set min max date."
12069
  msgstr ""
12070
 
12071
  #: includes/fields/class-evf-field-date-time.php:358
 
12072
  msgid "Minimum Date"
12073
  msgstr ""
12074
 
@@ -12077,6 +12082,7 @@ msgid "Select minium date."
12077
  msgstr ""
12078
 
12079
  #: includes/fields/class-evf-field-date-time.php:380
 
12080
  msgid "Maximum Date"
12081
  msgstr ""
12082
 
@@ -12084,51 +12090,64 @@ msgstr ""
12084
  msgid "Select maximum date."
12085
  msgstr ""
12086
 
12087
- #: includes/fields/class-evf-field-date-time.php:413
 
 
 
 
 
 
 
 
 
 
 
 
 
12088
  msgid "Time interval and format"
12089
  msgstr ""
12090
 
12091
- #: includes/fields/class-evf-field-date-time.php:414
12092
  msgid "Choose time interval and format to display."
12093
  msgstr ""
12094
 
12095
- #: includes/fields/class-evf-field-date-time.php:428
12096
  msgid "15 minutes"
12097
  msgstr ""
12098
 
12099
- #: includes/fields/class-evf-field-date-time.php:429
12100
  msgid "30 minutes"
12101
  msgstr ""
12102
 
12103
- #: includes/fields/class-evf-field-date-time.php:442
12104
  msgid "12 H"
12105
  msgstr ""
12106
 
12107
- #: includes/fields/class-evf-field-date-time.php:443
12108
  msgid "24 H"
12109
  msgstr ""
12110
 
12111
- #: includes/fields/class-evf-field-date-time.php:508
12112
  msgid "Enable Min Max Time."
12113
  msgstr ""
12114
 
12115
- #: includes/fields/class-evf-field-date-time.php:509
12116
  msgid "Check this option to set min max time."
12117
  msgstr ""
12118
 
12119
- #: includes/fields/class-evf-field-date-time.php:520
12120
  msgid "Minimum Time"
12121
  msgstr ""
12122
 
12123
- #: includes/fields/class-evf-field-date-time.php:521
12124
  msgid "Select minium time."
12125
  msgstr ""
12126
 
12127
- #: includes/fields/class-evf-field-date-time.php:531
12128
  msgid "Maximum Time"
12129
  msgstr ""
12130
 
12131
- #: includes/fields/class-evf-field-date-time.php:532
12132
  msgid "Select maximum time."
12133
  msgstr ""
12134
 
@@ -12236,6 +12255,10 @@ msgstr ""
12236
  msgid "Single Item"
12237
  msgstr ""
12238
 
 
 
 
 
12239
  #: includes/fields/class-evf-field-payment-total.php:20
12240
  msgid "Total"
12241
  msgstr ""
@@ -12371,7 +12394,7 @@ msgid "Yes/No"
12371
  msgstr ""
12372
 
12373
  #. translators: %s - URL to a non-amp version of a page with the form.
12374
- #: includes/shortcodes/class-evf-shortcode-form.php:930
12375
  msgid "<a href=\"%s\">Go to the full page</a> to view and submit the form."
12376
  msgstr ""
12377
 
2
  # This file is distributed under the same license as the Everest Forms plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Everest Forms 1.9.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/everest-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-11-17T07:43:03+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.7.1\n"
15
  "X-Domain: everest-forms\n"
16
 
17
  #. Plugin Name of the plugin
640
  msgstr ""
641
 
642
  #: includes/abstracts/class-evf-form-fields.php:1873
643
+ #: includes/class-evf-emails.php:444
644
+ #: includes/class-evf-emails.php:564
645
  msgid "(empty)"
646
  msgstr ""
647
 
792
  #: includes/admin/builder/class-evf-builder-settings.php:77
793
  #: includes/admin/builder/class-evf-builder-settings.php:402
794
  #: includes/admin/builder/class-evf-builder-settings.php:462
795
+ #: includes/class-evf-form-task.php:828
796
  #: includes/evf-update-functions.php:140
797
  #: includes/templates/contact.php:71
798
  msgid "Admin Notification"
2736
  msgstr ""
2737
 
2738
  #. translators: %d - field ID.
2739
+ #: includes/class-evf-emails.php:538
2740
+ #: includes/class-evf-emails.php:580
2741
  msgid "Field ID #%d"
2742
  msgstr ""
2743
 
2744
+ #: includes/class-evf-emails.php:592
2745
  msgid "An empty form was submitted."
2746
  msgstr ""
2747
 
2804
  msgstr ""
2805
 
2806
  #: includes/class-evf-form-task.php:91
2807
+ #: includes/class-evf-form-task.php:506
2808
+ #: includes/shortcodes/class-evf-shortcode-form.php:961
2809
  #: includes/templates/contact.php:61
2810
  msgid "Thanks for contacting us! We will be in touch with you shortly."
2811
  msgstr ""
2826
  msgid "Everest Forms Process Before Form ID."
2827
  msgstr ""
2828
 
2829
+ #: includes/class-evf-form-task.php:247
2830
+ #: includes/class-evf-form-task.php:370
2831
+ #: includes/class-evf-form-task.php:444
2832
  msgid "Form has not been submitted, please see the errors below."
2833
  msgstr ""
2834
 
2835
+ #: includes/class-evf-form-task.php:250
2836
  msgid "Form has not been submitted."
2837
  msgstr ""
2838
 
2839
+ #: includes/class-evf-form-task.php:278
2840
  msgid "hCaptcha verification failed, please try again later."
2841
  msgstr ""
2842
 
2843
+ #: includes/class-evf-form-task.php:280
2844
  msgid "Google reCAPTCHA verification failed, please try again later."
2845
  msgstr ""
2846
 
2847
+ #: includes/class-evf-form-task.php:382
2848
  msgid "Everest Forms honeypot field triggered."
2849
  msgstr ""
2850
 
2851
+ #: includes/class-evf-form-task.php:447
2852
  msgid "Form has not been submitted"
2853
  msgstr ""
2854
 
2855
+ #: includes/class-evf-form-task.php:456
2856
  msgid "Entry Added to Database."
2857
  msgstr ""
2858
 
2859
+ #: includes/class-evf-form-task.php:465
2860
  msgid "Sent Email Notification."
2861
  msgstr ""
2862
 
2863
+ #: includes/class-evf-form-task.php:482
2864
  msgid "Everest Forms Process Completed."
2865
  msgstr ""
2866
 
2867
+ #: includes/class-evf-form-task.php:537
2868
  #: templates/notices/success.php:69
2869
  msgid "Download your form submission in PDF format"
2870
  msgstr ""
2871
 
2872
  #. translators: %s - form name.
2873
+ #: includes/class-evf-form-task.php:856
2874
  msgid "New %s Entry"
2875
  msgstr ""
2876
 
2877
+ #: includes/class-evf-form-task.php:956
2878
  msgid "No form ID was found."
2879
  msgstr ""
2880
 
2881
+ #: includes/class-evf-form-task.php:963
2882
  msgid "Could not create an entry"
2883
  msgstr ""
2884
 
11962
  msgid "Check this to manually set form field values."
11963
  msgstr ""
11964
 
11965
+ #: includes/fields/class-evf-field-color.php:20
11966
+ msgid "Color"
11967
+ msgstr ""
11968
+
11969
  #: includes/fields/class-evf-field-credit-card.php:20
11970
  msgid "Credit Card"
11971
  msgstr ""
11983
  msgstr ""
11984
 
11985
  #: includes/fields/class-evf-field-date-time.php:85
11986
+ #: includes/fields/class-evf-field-date-time.php:464
11987
  msgid "Time"
11988
  msgstr ""
11989
 
12073
  msgstr ""
12074
 
12075
  #: includes/fields/class-evf-field-date-time.php:358
12076
+ #: includes/fields/class-evf-field-date-time.php:414
12077
  msgid "Minimum Date"
12078
  msgstr ""
12079
 
12082
  msgstr ""
12083
 
12084
  #: includes/fields/class-evf-field-date-time.php:380
12085
+ #: includes/fields/class-evf-field-date-time.php:437
12086
  msgid "Maximum Date"
12087
  msgstr ""
12088
 
12090
  msgid "Select maximum date."
12091
  msgstr ""
12092
 
12093
+ #: includes/fields/class-evf-field-date-time.php:403
12094
+ msgid "Enable Custom Input"
12095
+ msgstr ""
12096
+
12097
+ #: includes/fields/class-evf-field-date-time.php:404
12098
+ msgid "Check this option to set date range 'x' days after today."
12099
+ msgstr ""
12100
+
12101
+ #: includes/fields/class-evf-field-date-time.php:415
12102
+ #: includes/fields/class-evf-field-date-time.php:438
12103
+ msgid "Number of days after today or before for negative numbers. Example: today or +14 days or -5 days."
12104
+ msgstr ""
12105
+
12106
+ #: includes/fields/class-evf-field-date-time.php:471
12107
  msgid "Time interval and format"
12108
  msgstr ""
12109
 
12110
+ #: includes/fields/class-evf-field-date-time.php:472
12111
  msgid "Choose time interval and format to display."
12112
  msgstr ""
12113
 
12114
+ #: includes/fields/class-evf-field-date-time.php:486
12115
  msgid "15 minutes"
12116
  msgstr ""
12117
 
12118
+ #: includes/fields/class-evf-field-date-time.php:487
12119
  msgid "30 minutes"
12120
  msgstr ""
12121
 
12122
+ #: includes/fields/class-evf-field-date-time.php:500
12123
  msgid "12 H"
12124
  msgstr ""
12125
 
12126
+ #: includes/fields/class-evf-field-date-time.php:501
12127
  msgid "24 H"
12128
  msgstr ""
12129
 
12130
+ #: includes/fields/class-evf-field-date-time.php:566
12131
  msgid "Enable Min Max Time."
12132
  msgstr ""
12133
 
12134
+ #: includes/fields/class-evf-field-date-time.php:567
12135
  msgid "Check this option to set min max time."
12136
  msgstr ""
12137
 
12138
+ #: includes/fields/class-evf-field-date-time.php:578
12139
  msgid "Minimum Time"
12140
  msgstr ""
12141
 
12142
+ #: includes/fields/class-evf-field-date-time.php:579
12143
  msgid "Select minium time."
12144
  msgstr ""
12145
 
12146
+ #: includes/fields/class-evf-field-date-time.php:589
12147
  msgid "Maximum Time"
12148
  msgstr ""
12149
 
12150
+ #: includes/fields/class-evf-field-date-time.php:590
12151
  msgid "Select maximum time."
12152
  msgstr ""
12153
 
12255
  msgid "Single Item"
12256
  msgstr ""
12257
 
12258
+ #: includes/fields/class-evf-field-payment-subtotal.php:20
12259
+ msgid "Subtotal"
12260
+ msgstr ""
12261
+
12262
  #: includes/fields/class-evf-field-payment-total.php:20
12263
  msgid "Total"
12264
  msgstr ""
12394
  msgstr ""
12395
 
12396
  #. translators: %s - URL to a non-amp version of a page with the form.
12397
+ #: includes/shortcodes/class-evf-shortcode-form.php:934
12398
  msgid "<a href=\"%s\">Go to the full page</a> to view and submit the form."
12399
  msgstr ""
12400
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: WPEverest
3
  Tags: contact form, forms, form builder, contact, custom form
4
  Requires at least: 5.0
5
- Tested up to: 6.0
6
  Requires PHP: 5.4
7
- Stable tag: 1.9.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -324,6 +324,11 @@ Yes you can! Join in on our [GitHub repository](https://github.com/wpeverest/eve
324
 
325
  == Changelog ==
326
 
 
 
 
 
 
327
  = 1.9.5 - 18-10-2022
328
  * Enhancement - Form ID smart tag.​
329
  * Fix - Date format not working issue in the Date/Time field.
2
  Contributors: WPEverest
3
  Tags: contact form, forms, form builder, contact, custom form
4
  Requires at least: 5.0
5
+ Tested up to: 6.1
6
  Requires PHP: 5.4
7
+ Stable tag: 1.9.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
324
 
325
  == Changelog ==
326
 
327
+ = 1.9.6 - 17-11-2022
328
+ * Fix - Flatpickr date localization not working while the form has more than one date field.
329
+ * Enhancement - Entry ID smart tag in the email message.
330
+ * Enhancement - Set date range x days after or before.
331
+
332
  = 1.9.5 - 18-10-2022
333
  * Enhancement - Form ID smart tag.​
334
  * Fix - Date format not working issue in the Date/Time field.