Your IP : 18.188.227.15


Current Path : /home/church/public_html/inspirewithangela.com/wp-content/plugins/ninja-forms/build/
Upload File :
Current File : /home/church/public_html/inspirewithangela.com/wp-content/plugins/ninja-forms/build/form-block.js

(()=>{var e={92703:(e,t,r)=>{"use strict";var n=r(50414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},45697:(e,t,r)=>{e.exports=r(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React;var t=r.n(e);const n=window.wp.element,o=window.wp.components,a=window.wp.blockEditor;function i(e){const[r]=t().useState((()=>Array.isArray(e.forms)?e.forms:Object.values(e.forms)));return{getFormTitle:e=>{if(e=parseInt(e,10),!r.length)return;let t=r.find((t=>t.formID===e));return t?t.formTitle:void 0},asSelectOptions:()=>r.length?r.map((e=>({label:e.formTitle,value:e.formID}))):[]}}var s=r(45697),l=r.n(s);function m(e){let{formID:r,homeUrl:a,previewToken:i}=e;const s=t().useRef(),[l,m]=t().useState(!0),[c,f]=t().useState(0),[p,u]=t().useState("auto");return(0,n.createElement)("div",{className:"nf-iframe-container"},(0,n.createElement)("div",{className:"nf-iframe-overlay"},l&&(0,n.createElement)(o.Spinner,null),(0,n.createElement)("iframe",{src:`${a}?nf_preview_form=${r}&nf_iframe=${i}`,title:`nf-preview-form-${r}`,ref:e=>s.current=e,style:{pointerEvents:"none"},onLoad:()=>{m(!1);const e=s.current.contentWindow.document.getElementById(`nf-form-${r}-cont`),t=e.querySelectorAll(".ninja-forms-form-wrap");t&&t.length?(u(t[0].scrollWidth),f(t[0].scrollHeight)):(u(e.scrollWidth),f(e.scrollHeight))},scrolling:"no",height:c||0,width:p||"auto"})))}m.propTypes={formID:l().number.isRequired,homeUrl:l().string.isRequired,previewToken:l().string.isRequired};const c=(0,n.createElement)("svg",{"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",width:"30px",height:"30px",viewBox:"0 0 29.93 13.43"},(0,n.createElement)("path",{fill:"#fff",d:"M22,21.7a4.72,4.72,0,0,0-2.44-4,14.44,14.44,0,0,0-13.38-.06,4.61,4.61,0,0,0-2.53,4Z",transform:"translate(-0.03 -8.27)"}),(0,n.createElement)("path",{fill:"#414242",d:"M3.68,21.7a4.6,4.6,0,0,1,2.53-4,14.44,14.44,0,0,1,13.38,0,4.73,4.73,0,0,1,2.44,4h3.65v-.37a12.76,12.76,0,0,0-1.2-5.42A7.59,7.59,0,0,0,24,15a31.79,31.79,0,0,1,4.14-1c1.36-.28,2.14-.46,1.68-.83-1-.81-2.24-1.68-2.24-1.68s5.05-4.18,0-2.91a9.62,9.62,0,0,0-2.53,1,10.69,10.69,0,0,0-3.13,2.76,12.83,12.83,0,0,0-21.9,9,3.15,3.15,0,0,0,0,.37Z",transform:"translate(-0.03 -8.27)"}),(0,n.createElement)("path",{fill:"#414242",d:"M9.3,21.7c0-1-.58-1.81-1.29-1.81s-1.27.81-1.29,1.81Z",transform:"translate(-0.03 -8.27)"}),(0,n.createElement)("path",{fill:"#414242",d:"M19,21.7c0-1-.59-1.81-1.29-1.81s-1.27.81-1.29,1.81Z",transform:"translate(-0.03 -8.27)"})),f=e=>(0,n.createElement)(o.Placeholder,{icon:(0,n.createElement)("div",null,e.icon?e.icon:c),instructions:"Display a form",style:{alignItems:"center"}},(0,n.createElement)("div",{style:{margin:"auto",width:"50%"}},e.children));f.propTypes={children:l().element.isRequired};const p=e=>{let{formID:r,forms:a,onChange:s,labelText:l}=e;const{asSelectOptions:m}=i({forms:a}),c=t().useMemo((()=>[{label:"---"},...m()]),[a,m]);return(0,n.createElement)(o.SelectControl,{label:l||"Select Form",value:r,onChange:s,options:c})};function u(e){let{formID:r,forms:o,labelText:s,setAttributes:l,homeUrl:c,previewToken:u,icon:d}=e;const{getFormTitle:h}=i({forms:o}),y=e=>{const t=e?h(e):"";l({formID:parseInt(e),formTitle:t})};return r?(0,n.createElement)(t().Fragment,null,(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(p,{formID:r,forms:o,onChange:y,labelText:s})),(0,n.createElement)(m,{homeUrl:c,previewToken:u,formID:r})):(0,n.createElement)(f,{icon:d},(0,n.createElement)(p,{label:s||"Select Form",formID:r,forms:o,onChange:y,labelText:s}))}p.propTypes={formID:l().PropTypes.number,forms:l().oneOfType([l().array,l().object]).isRequired,onChange:l().func.isRequired,labelText:l().string},u.propTypes={formID:l().number,forms:l().oneOfType([l().array,l().object]).isRequired,labelText:l().string,setAttributes:l().func.isRequired,homeUrl:l().string.isRequired,previewToken:l().string.isRequired};const d=JSON.parse('{"icon":"feedback","category":"common","attributes":{"formID":{"type":"integer"},"formTitle":{"type":"string"}}}'),h=window.wp.i18n,y=window.wp.blocks,g=window.nfFormsBlock||{},{forms:v,homeUrl:w,previewToken:T}=g;(0,y.registerBlockType)("ninja-forms/form",{...d,title:(0,h.__)("Ninja Form","ninja-forms"),edit:e=>{let{attributes:t,setAttributes:r}=e;return(0,n.createElement)(u,{forms:v,formID:t.formID,formTitle:t.formTitle,setAttributes:r,homeUrl:w,previewToken:T})},save:()=>null,deprecated:[{attributes:{formID:{type:"integer",default:0},formName:{type:"string",default:""}},save:function(e){var t=e.attributes.formID;if(!t)return"";var r="[ninja_forms id="+parseInt(t)+"]";return(0,n.createElement)("div",null,r)}}]})})()})();