(()=>{var e,t,s={2(e,t,s){var r=s(2199),a=s(4664),n=s(5950);e.exports=function(e){return r(e,n,a)}},14(e,t,s){var r=s(5389),a=s(5765);e.exports=function(e,t){return e&&e.length?a(e,r(t,2)):[]}},76(e){"use strict";e.exports=Function.prototype.call},79(e,t,s){var r=s(3702),a=s(80),n=s(4739),i=s(8655),o=s(1175);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t "+this.props.text+"-1&&e%1==0&&e<=9007199254740991}},317(e){e.exports=function(e){var t=-1,s=Array(e.size);return e.forEach(function(e,r){s[++t]=[r,e]}),s}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,s){var r=typeof e;return!!(s=null==s?9007199254740991:s)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=function(e){var t=B(e,0,1),s=B(e,-1);if("%"===t&&"%"!==s)throw new p("invalid intrinsic syntax, expected closing `%`");if("%"===s&&"%"!==t)throw new p("invalid intrinsic syntax, expected opening `%`");var r=[];return L(e,W,function(e,t,s,a){r[r.length]=s?L(a,q,"$1"):t||e}),r}(e),r=s.length>0?s[0]:"",a=H("%"+r+"%",t),n=a.name,i=a.value,o=!1,l=a.alias;l&&(r=l[0],I(s,M([0,1],l)));for(var u=1,d=!0;u{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(s,r){if(1&r&&(s=this(s)),8&r)return s;if("object"==typeof s&&s){if(4&r&&s.__esModule)return s;if(16&r&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&s;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>i[e]=()=>s[e]);return i.default=()=>s,a.d(n,i),n},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};a.r(e),a.d(e,{hasBrowserEnv:()=>qs,hasStandardBrowserEnv:()=>Qs,hasStandardBrowserWebWorkerEnv:()=>Ys,navigator:()=>Hs,origin:()=>Ks});var t={};a.r(t),a.d(t,{resetSettings:()=>an,saveBuilder:()=>nn,updateSetting:()=>sn,updateSettings:()=>rn});var s={};a.r(s),a.d(s,{hideModal:()=>co,showModal:()=>po});var r={};a.r(r),a.d(r,{updateField:()=>Sm,updateFieldSettings:()=>Cm,updateFields:()=>km});var n={};a.r(n),a.d(n,{updateNotification:()=>Om,updateNotifications:()=>Pm});var i={};a.r(i),a.d(i,{updateIntegrationConditions:()=>Dm});var o={};a.r(o),a.d(o,{updateBehavior:()=>Am,updateBehaviorArray:()=>Fm});var l={};a.r(l),a.d(l,{updatePdfs:()=>Tm});var p={};a.r(p),a.d(p,{hideModal:()=>Qm,showModal:()=>Hm});var c={};a.r(c),a.d(c,{updatePermissions:()=>Ym});var u=a(1594),d=a.n(u),m=a(5338);function h(e,t){const s=document.getElementById(e);if(_.isNull(s))return;(0,m.H)(s).render(t)}function f(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var b=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),g=()=>Math.random().toString(36).substring(7).split("").join("."),y={INIT:`@@redux/INIT${g()}`,REPLACE:`@@redux/REPLACE${g()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${g()}`};function E(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function v(e,t,s){if("function"!=typeof e)throw new Error(f(2));if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error(f(0));if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(f(1));return s(v)(e,t)}let r=e,a=t,n=new Map,i=n,o=0,l=!1;function p(){i===n&&(i=new Map,n.forEach((e,t)=>{i.set(t,e)}))}function c(){if(l)throw new Error(f(3));return a}function u(e){if("function"!=typeof e)throw new Error(f(4));if(l)throw new Error(f(5));let t=!0;p();const s=o++;return i.set(s,e),function(){if(t){if(l)throw new Error(f(6));t=!1,p(),i.delete(s),n=null}}}function d(e){if(!E(e))throw new Error(f(7));if(void 0===e.type)throw new Error(f(8));if("string"!=typeof e.type)throw new Error(f(17));if(l)throw new Error(f(9));try{l=!0,a=r(a,e)}finally{l=!1}return(n=i).forEach(e=>{e()}),e}d({type:y.INIT});return{dispatch:d,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(f(10));r=e,d({type:y.REPLACE})},[b]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(f(11));function s(){const e=t;e.next&&e.next(c())}s();return{unsubscribe:e(s)}},[b](){return this}}}}}function w(e){const t=Object.keys(e),s={};for(let r=0;r1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:X;R&&R(e,null);let r=t.length;for(;r--;){let a=t[r];if("string"==typeof a){const e=s(a);e!==a&&(M(t)||(t[r]=e),a=e)}e[a]=!0}return e}function ce(e){for(let t=0;t`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=s?e.length>1?"since :\n"+e.map(Vr).join("\n"):" "+Vr(e[0]):"as no adapter specified";throw new Ds("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:Ur};function Mr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pr(null,e)}function Ir(e){Mr(e),e.headers=ir.from(e.headers),e.data=or.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Rr.getAdapter(e.adapter||Zs.adapter,e)(e).then(function(t){return Mr(e),t.data=or.call(e,e.transformResponse,t),t.headers=ir.from(t.headers),t},function(t){return lr(t)||(Mr(e),t&&t.response&&(t.response.data=or.call(e,e.transformResponse,t.response),t.response.headers=ir.from(t.response.headers))),Promise.reject(t)})}const Lr="1.13.5",Br={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Br[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const zr={};Br.transitional=function(e,t,s){function r(e,t){return"[Axios v"+Lr+"] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,a,n)=>{if(!1===e)throw new Ds(r(a," has been removed"+(t?" in "+t:"")),Ds.ERR_DEPRECATED);return t&&!zr[a]&&(zr[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,a,n)}},Br.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};const Wr={assertOptions:function(e,t,s){if("object"!=typeof e)throw new Ds("options must be an object",Ds.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const n=r[a],i=t[n];if(i){const t=e[n],s=void 0===t||i(t,n,e);if(!0!==s)throw new Ds("option "+n+" must be "+s,Ds.ERR_BAD_OPTION_VALUE);continue}if(!0!==s)throw new Ds("Unknown option "+n,Ds.ERR_BAD_OPTION)}},validators:Br},qr=Wr.validators;class Hr{constructor(e){this.defaults=e||{},this.interceptors={request:new Bs,response:new Bs}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=vr(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:a}=t;void 0!==s&&Wr.assertOptions(s,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean),legacyInterceptorReqResOrdering:qr.transitional(qr.boolean)},!1),null!=r&&(Ps.isFunction(r)?t.paramsSerializer={serialize:r}:Wr.assertOptions(r,{encode:qr.function,serialize:qr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Wr.assertOptions(t,{baseUrl:qr.spelling("baseURL"),withXsrfToken:qr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=a&&Ps.merge(a.common,a[t.method]);a&&Ps.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=ir.concat(n,a);const i=[];let o=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;o=o&&e.synchronous;const s=t.transitional||zs;s&&s.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const l=[];let p;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,u=0;if(!o){const e=[Ir.bind(this),void 0];for(e.unshift(...i),e.push(...l),c=e.length,p=Promise.resolve(t);u
${lt("You have added both Stripe and PayPal fields to your form. We recommend that you use the visibility conditions, so only one of them is visible at a time. For example:")}
\n\t1. ${lt("Add an option to your form using a Radio (or Select) field that allows visitors to choose the payment method.")}
\n\t2. ${lt("Apply visibility conditions to both Stripe and PayPal fields so only one is visible based on the visitor's selection in the Radio (or Select) field.")}`,dismiss:!0}).open()}render(){let e=forminatorData.fields.filter(e=>e.category),t={},s={};const r=forminatorData.fieldsPro||[],a=tt("password",this.props.wrappers),n=this.props.modal.modalProps.groupId;e=_.filter(e,function(e){return"gdprcheckbox"!==e.slug&&"stripe"!==e.slug}),("registration"!==this.props.formType&&"login"!==this.props.formType||a&&"registration"===this.props.formType)&&(e=_.filter(e,function(e){return"password"!==e.slug})),n&&(e=_.filter(e,function(e){return!_.includes(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"],e.slug)}));const i=_.sortBy(e,"position");(this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal)&&(t={display:"block"}),forminatorData.isPro||this.props.skipProNotice||(s={display:"block"});const o=this.props.formType;let l,p;return"pdf-form"===o?(l=lt("PDF file"),p="blue"):(l=lt("form"),p="red"),d().createElement(Be.Fragment,null,d().createElement(fo,{closeType:"icon",closeModal:this.closeModal},d().createElement(yo,{id:this.props.modal.modalProps.id,label:lt("Insert Fields")})),d().createElement("div",{className:"sui-box-body"},d().createElement("p",null,lt("Select one or more fields below to include in your %s.",{args:[l]})),(this.hasStripe||this.hasCaptcha||this.hasStripeOCS||this.hasPayPal||"pdf-form"===o)&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-${p} sui-active`,"aria-live":"assertive",style:{display:"block"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),(this.hasStripe||this.hasStripeOCS)&&d().createElement("p",null,lt("You can have only one Stripe field in your form for Stripe to work accurately. Please delete the existing Stripe field to add a new one.")),this.hasPayPal&&d().createElement("p",null,lt("You can have only one PayPal field in your form for PayPal to work accurately. Please delete the existing PayPal field to add a new one.")),this.hasCaptcha&&d().createElement("p",null,lt("You can have only one captcha field in your form for captcha to work accurately. Please delete the existing captcha field to add a new one.")),"pdf-form"===o&&d().createElement("p",null,lt("{{b}}Note{{/b}}: You can use the {{b}}Rich Text{{/b}} field to add form fields and custom text to your PDF.",{components:{b:d().createElement("b",null)}})))))),d().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-5",style:{margin:0}},d().createElement("ul",{id:"forminator-form-fields-to-insert",className:`sui-spacing-slim ${o}-field-selectors`},i.map(e=>d().createElement("li",{key:e.slug},d().createElement("label",{htmlFor:`forminator-form-field-${e.slug}`,className:"sui-box-selector sui-box-selector-vertical"},d().createElement("input",{type:"checkbox",id:`forminator-form-field-${e.slug}`,"data-field":e.slug,onChange:t=>this.toggleField(e.slug,t)}),d().createElement("span",null,d().createElement("i",{className:e.icon,"aria-hidden":"true"}),e.name)))),!forminatorData.isPro&&r.map(e=>{if("signature"!==e.field_type||"signature"===e.field_type&&_.isEmpty(n))return d().createElement("li",{key:e.slug},d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:e.icon,"aria-hidden":"true"}),e.name,d().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro"))))}),_.isEmpty(n)&&!forminatorData.isPro&&_.isEmpty(r)&&"pdf-form"!==o&&d().createElement("li",null,d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:"sui-icon-pencil","aria-hidden":"true"}),lt("E-Signature"),d().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro")))),"pdf-form"===o&&d().createElement(Be.Fragment,null,d().createElement("li",{className:"pdf-field-coming-soon sui-tooltip","data-tooltip":lt("Coming soon")},d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:"sui-icon-code","aria-hidden":"true"}),lt("Quotation")))))),"pdf-form"!==o&&d().createElement("div",{role:"alert",id:"fui-notice-pro-fields",className:`sui-notice sui-notice-purple ${!forminatorData.isPro&&!this.props.skipProNotice&&" sui-active"}`,style:s,"aria-live":"assertive"},_.isEmpty(n)&&!forminatorData.isPro&&!this.props.skipProNotice&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,lt("Need access to pro form fields? {{link}}Upgrade to Pro{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_forms_insertfields_upsell_notice",target:"_blank",style:{color:"#8d00b1"}})}}))),d().createElement("div",{className:"sui-notice-actions"},d().createElement(xo,{icon:"check",iconSize:"sm",label:lt("Dismiss"),onClick:this.skipProNotice})))),"pdf-form"===o&&this.missingPaymentField&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block",marginTop:"15px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,lt("This PDF is linked to a form without a payment field. To include payment information in your PDF, please add either a PayPal or Stripe field to your form.")))))),d().createElement(bo,{alignment:"separated"},d().createElement(uo,{label:lt("Cancel"),customClass:"sui-button-ghost forminator-builder-fields-close",closeModal:this.closeModal}),d().createElement("button",{id:"forminator-builder-insert-fields",className:"sui-button sui-button-blue",disabled:!this.state.fields.length||this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal||this.missingPaymentField,onClick:this.insertFields},d().createElement("span",{className:"sui-loading-text"},lt("Insert Fields")),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var ko,So=a(961),Co=a.t(So,2);function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t
"+lt("Add a rule to control when it should be hidden or shown."):this.props.isPayment?lt("Add conditions for how this plan will be processed based on your form field data."):lt("By default, this field is always visible.")+"
"+lt("Add rules to control when it should appear based on user input.");const i=d().createElement("div",{className:"fui-visibility-group"},this.props.wrappers.length<2&&this.fields.length<2&&_.isEmpty(this.fields)&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active fui-visibility-notice",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,lt("You need more than one field to configure visibility conditions. Add more fields!"))))),(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("div",{className:"fui-visibility-header"},!this.props.isPayment&&d().createElement("div",dp({className:"fui-visibility-header-message"},s&&{style:{marginBottom:0}}),a,e),t,r),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-empty-message forminator-visibility-field-empty-message"},d().createElement("p",{dangerouslySetInnerHTML:{__html:n}}),(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&!s&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?lt("Add conditions"):lt("Add Rule")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&Be.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>0)&&d().createElement("div",{className:"fui-visibility-header"},!this.props.isPayment&&d().createElement("div",dp({className:"fui-visibility-header-message has-conditions"},s&&{style:{marginBottom:0}}),a,e),t,r),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,(e,t)=>d().createElement(pp,dp({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateField:this.updateField,updateRule:this.updateRule,updateValue:this.updateValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),!this.isPageBreak&&d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?lt("Add conditions"):lt("Add Rule"))):d().createElement(Be.Fragment,null,i)}}function hp(){return hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t
'+lt("Loading Preset data...")+"