abchospitality/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.min.js
2024-04-18 15:32:23 +05:45

1 line
30 KiB
JavaScript

(()=>{var e={905:()=>{jQuery,acf.jsxNameReplacements={"accent-height":"accentHeight",accentheight:"accentHeight","accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey","alignment-baseline":"alignmentBaseline",alignmentbaseline:"alignmentBaseline",allowedblocks:"allowedBlocks",allowfullscreen:"allowFullScreen",allowreorder:"allowReorder","arabic-form":"arabicForm",arabicform:"arabicForm",attributename:"attributeName",attributetype:"attributeType",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autoreverse:"autoReverse",autosave:"autoSave",basefrequency:"baseFrequency","baseline-shift":"baselineShift",baselineshift:"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode","cap-height":"capHeight",capheight:"capHeight",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className","clip-path":"clipPath","clip-rule":"clipRule",clippath:"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","color-interpolation":"colorInterpolation","color-interpolation-filters":"colorInterpolationFilters","color-profile":"colorProfile","color-rendering":"colorRendering",colorinterpolation:"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters",colorprofile:"colorProfile",colorrendering:"colorRendering",colspan:"colSpan",contenteditable:"contentEditable",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",diffuseconstant:"diffuseConstant",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback","dominant-baseline":"dominantBaseline",dominantbaseline:"dominantBaseline",edgemode:"edgeMode","enable-background":"enableBackground",enablebackground:"enableBackground",enctype:"encType",enterkeyhint:"enterKeyHint",externalresourcesrequired:"externalResourcesRequired","fill-opacity":"fillOpacity","fill-rule":"fillRule",fillopacity:"fillOpacity",fillrule:"fillRule",filterres:"filterRes",filterunits:"filterUnits","flood-color":"floodColor","flood-opacity":"floodOpacity",floodcolor:"floodColor",floodopacity:"floodOpacity","font-family":"fontFamily","font-size":"fontSize","font-size-adjust":"fontSizeAdjust","font-stretch":"fontStretch","font-style":"fontStyle","font-variant":"fontVariant","font-weight":"fontWeight",fontfamily:"fontFamily",fontsize:"fontSize",fontsizeadjust:"fontSizeAdjust",fontstretch:"fontStretch",fontstyle:"fontStyle",fontvariant:"fontVariant",fontweight:"fontWeight",for:"htmlFor",foreignobject:"foreignObject",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder","glyph-name":"glyphName","glyph-orientation-horizontal":"glyphOrientationHorizontal","glyph-orientation-vertical":"glyphOrientationVertical",glyphname:"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits","horiz-adv-x":"horizAdvX","horiz-origin-x":"horizOriginX",horizadvx:"horizAdvX",horizoriginx:"horizOriginX",hreflang:"hrefLang",htmlfor:"htmlFor","http-equiv":"httpEquiv",httpequiv:"httpEquiv","image-rendering":"imageRendering",imagerendering:"imageRendering",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keyparams:"keyParams",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",keytype:"keyType",lengthadjust:"lengthAdjust","letter-spacing":"letterSpacing",letterspacing:"letterSpacing","lighting-color":"lightingColor",lightingcolor:"lightingColor",limitingconeangle:"limitingConeAngle",marginheight:"marginHeight",marginwidth:"marginWidth","marker-end":"markerEnd","marker-mid":"markerMid","marker-start":"markerStart",markerend:"markerEnd",markerheight:"markerHeight",markermid:"markerMid",markerstart:"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",numoctaves:"numOctaves","overline-position":"overlinePosition","overline-thickness":"overlineThickness",overlineposition:"overlinePosition",overlinethickness:"overlineThickness","paint-order":"paintOrder",paintorder:"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",playsinline:"playsInline","pointer-events":"pointerEvents",pointerevents:"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",refx:"refX",refy:"refY","rendering-intent":"renderingIntent",renderingintent:"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",rowspan:"rowSpan","shape-rendering":"shapeRendering",shaperendering:"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spellcheck:"spellCheck",spreadmethod:"spreadMethod",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles","stop-color":"stopColor","stop-opacity":"stopOpacity",stopcolor:"stopColor",stopopacity:"stopOpacity","strikethrough-position":"strikethroughPosition","strikethrough-thickness":"strikethroughThickness",strikethroughposition:"strikethroughPosition",strikethroughthickness:"strikethroughThickness","stroke-dasharray":"strokeDasharray","stroke-dashoffset":"strokeDashoffset","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","stroke-miterlimit":"strokeMiterlimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth",strokedasharray:"strokeDasharray",strokedashoffset:"strokeDashoffset",strokelinecap:"strokeLinecap",strokelinejoin:"strokeLinejoin",strokemiterlimit:"strokeMiterlimit",strokeopacity:"strokeOpacity",strokewidth:"strokeWidth",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tabindex:"tabIndex",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",templatelock:"templateLock","text-anchor":"textAnchor","text-decoration":"textDecoration","text-rendering":"textRendering",textanchor:"textAnchor",textdecoration:"textDecoration",textlength:"textLength",textrendering:"textRendering","underline-position":"underlinePosition","underline-thickness":"underlineThickness",underlineposition:"underlinePosition",underlinethickness:"underlineThickness","unicode-bidi":"unicodeBidi","unicode-range":"unicodeRange",unicodebidi:"unicodeBidi",unicoderange:"unicodeRange","units-per-em":"unitsPerEm",unitsperem:"unitsPerEm",usemap:"useMap","v-alphabetic":"vAlphabetic","v-hanging":"vHanging","v-ideographic":"vIdeographic","v-mathematical":"vMathematical",valphabetic:"vAlphabetic","vector-effect":"vectorEffect",vectoreffect:"vectorEffect","vert-adv-y":"vertAdvY","vert-origin-x":"vertOriginX","vert-origin-y":"vertOriginY",vertadvy:"vertAdvY",vertoriginx:"vertOriginX",vertoriginy:"vertOriginY",vhanging:"vHanging",videographic:"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","word-spacing":"wordSpacing",wordspacing:"wordSpacing","writing-mode":"writingMode",writingmode:"writingMode","x-height":"xHeight",xchannelselector:"xChannelSelector",xheight:"xHeight","xlink:actuate":"xlinkActuate","xlink:arcrole":"xlinkArcrole","xlink:href":"xlinkHref","xlink:role":"xlinkRole","xlink:show":"xlinkShow","xlink:title":"xlinkTitle","xlink:type":"xlinkType",xlinkactuate:"xlinkActuate",xlinkarcrole:"xlinkArcrole",xlinkhref:"xlinkHref",xlinkrole:"xlinkRole",xlinkshow:"xlinkShow",xlinktitle:"xlinkTitle",xlinktype:"xlinkType","xml:base":"xmlBase","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlbase:"xmlBase",xmllang:"xmlLang","xmlns:xlink":"xmlnsXlink",xmlnsxlink:"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"}},487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},12:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],i=0;i<4;i++)8*n+6*i<=8*e.length?r.push(t.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}},e.exports=r},738:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:(e,t,r)=>{var n,o,i,a,s;n=r(12),o=r(487).utf8,i=r(738),a=r(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),l=8*e.length,c=1732584193,p=-271733879,u=-1732584194,d=271733878,f=0;f<r.length;f++)r[f]=16711935&(r[f]<<8|r[f]>>>24)|4278255360&(r[f]<<24|r[f]>>>8);r[l>>>5]|=128<<l%32,r[14+(l+64>>>9<<4)]=l;var h=s._ff,m=s._gg,g=s._hh,y=s._ii;for(f=0;f<r.length;f+=16){var b=c,k=p,v=u,x=d;c=h(c,p,u,d,r[f+0],7,-680876936),d=h(d,c,p,u,r[f+1],12,-389564586),u=h(u,d,c,p,r[f+2],17,606105819),p=h(p,u,d,c,r[f+3],22,-1044525330),c=h(c,p,u,d,r[f+4],7,-176418897),d=h(d,c,p,u,r[f+5],12,1200080426),u=h(u,d,c,p,r[f+6],17,-1473231341),p=h(p,u,d,c,r[f+7],22,-45705983),c=h(c,p,u,d,r[f+8],7,1770035416),d=h(d,c,p,u,r[f+9],12,-1958414417),u=h(u,d,c,p,r[f+10],17,-42063),p=h(p,u,d,c,r[f+11],22,-1990404162),c=h(c,p,u,d,r[f+12],7,1804603682),d=h(d,c,p,u,r[f+13],12,-40341101),u=h(u,d,c,p,r[f+14],17,-1502002290),c=m(c,p=h(p,u,d,c,r[f+15],22,1236535329),u,d,r[f+1],5,-165796510),d=m(d,c,p,u,r[f+6],9,-1069501632),u=m(u,d,c,p,r[f+11],14,643717713),p=m(p,u,d,c,r[f+0],20,-373897302),c=m(c,p,u,d,r[f+5],5,-701558691),d=m(d,c,p,u,r[f+10],9,38016083),u=m(u,d,c,p,r[f+15],14,-660478335),p=m(p,u,d,c,r[f+4],20,-405537848),c=m(c,p,u,d,r[f+9],5,568446438),d=m(d,c,p,u,r[f+14],9,-1019803690),u=m(u,d,c,p,r[f+3],14,-187363961),p=m(p,u,d,c,r[f+8],20,1163531501),c=m(c,p,u,d,r[f+13],5,-1444681467),d=m(d,c,p,u,r[f+2],9,-51403784),u=m(u,d,c,p,r[f+7],14,1735328473),c=g(c,p=m(p,u,d,c,r[f+12],20,-1926607734),u,d,r[f+5],4,-378558),d=g(d,c,p,u,r[f+8],11,-2022574463),u=g(u,d,c,p,r[f+11],16,1839030562),p=g(p,u,d,c,r[f+14],23,-35309556),c=g(c,p,u,d,r[f+1],4,-1530992060),d=g(d,c,p,u,r[f+4],11,1272893353),u=g(u,d,c,p,r[f+7],16,-155497632),p=g(p,u,d,c,r[f+10],23,-1094730640),c=g(c,p,u,d,r[f+13],4,681279174),d=g(d,c,p,u,r[f+0],11,-358537222),u=g(u,d,c,p,r[f+3],16,-722521979),p=g(p,u,d,c,r[f+6],23,76029189),c=g(c,p,u,d,r[f+9],4,-640364487),d=g(d,c,p,u,r[f+12],11,-421815835),u=g(u,d,c,p,r[f+15],16,530742520),c=y(c,p=g(p,u,d,c,r[f+2],23,-995338651),u,d,r[f+0],6,-198630844),d=y(d,c,p,u,r[f+7],10,1126891415),u=y(u,d,c,p,r[f+14],15,-1416354905),p=y(p,u,d,c,r[f+5],21,-57434055),c=y(c,p,u,d,r[f+12],6,1700485571),d=y(d,c,p,u,r[f+3],10,-1894986606),u=y(u,d,c,p,r[f+10],15,-1051523),p=y(p,u,d,c,r[f+1],21,-2054922799),c=y(c,p,u,d,r[f+8],6,1873313359),d=y(d,c,p,u,r[f+15],10,-30611744),u=y(u,d,c,p,r[f+6],15,-1560198380),p=y(p,u,d,c,r[f+13],21,1309151649),c=y(c,p,u,d,r[f+4],6,-145523070),d=y(d,c,p,u,r[f+11],10,-1120210379),u=y(u,d,c,p,r[f+2],15,718787259),p=y(p,u,d,c,r[f+9],21,-343485551),c=c+b>>>0,p=p+k>>>0,u=u+v>>>0,d=d+x>>>0}return n.endian([c,p,u,d])})._ff=function(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._gg=function(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._hh=function(e,t,r,n,o,i,a){var s=e+(t^r^n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._ii=function(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},408:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=(Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator,{isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}}),o=Object.assign,i={};function a(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}function s(){}function l(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=a.prototype;var c=l.prototype=new s;c.constructor=l,o(c,a.prototype),c.isPureReactComponent=!0;Array.isArray;var p=Object.prototype.hasOwnProperty,u=null,d={key:!0,ref:!0,__self:!0,__source:!0};t.createElement=function(e,t,n){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)p.call(t,o)&&!d.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:r,type:e,key:a,ref:s,props:i,_owner:u}}},294:(e,t,r)=>{"use strict";e.exports=r(408)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:String(r)}r(905);var n=r(294);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){var o,i,a;o=e,i=r,a=n[r],(i=t(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const a=r(568);((e,t)=>{const{BlockControls:r,InspectorControls:o,InnerBlocks:s,useBlockProps:l,AlignmentToolbar:c,BlockVerticalAlignmentToolbar:p}=wp.blockEditor,{ToolbarGroup:u,ToolbarButton:d,Placeholder:f,Spinner:h}=wp.components,{Fragment:m}=wp.element,{Component:g}=React,{withSelect:y}=wp.data,{createHigherOrderComponent:b}=wp.compose,k=wp.blockEditor.__experimentalBlockAlignmentMatrixToolbar||wp.blockEditor.BlockAlignmentMatrixToolbar,v=wp.blockEditor.__experimentalBlockAlignmentMatrixControl||wp.blockEditor.BlockAlignmentMatrixControl,x=wp.blockEditor.__experimentalBlockFullHeightAligmentControl||wp.blockEditor.__experimentalBlockFullHeightAlignmentControl||wp.blockEditor.BlockFullHeightAlignmentControl,w=wp.blockEditor.__experimentalUseInnerBlocksProps||wp.blockEditor.useInnerBlocksProps,S={};function E(e){return S[e]||!1}function A(e){return E(e).acf_block_version||1}function T(e){const t=wp.data.select("core/block-editor").getBlockParents(e);return wp.data.select("core/block-editor").getBlocksByClientId(t).filter((e=>"core/query"===e.name)).length}function _(){return"string"==typeof pagenow&&"site-editor"===pagenow}function C(){const e=O("core/edit-post");return!!e&&!!e.isEditingTemplate&&e.isEditingTemplate()}function B(){return e("iframe[name=editor-canvas]").length&&!function(){const e=O("core/edit-post");return!e||(e.__experimentalGetPreviewDeviceType?"Desktop"===e.__experimentalGetPreviewDeviceType():!e.getPreviewDeviceType||"Desktop"===e.getPreviewDeviceType())}()}function j(e){const o=e.post_types||[];if(o.length){o.push("wp_block");const e=acf.get("postType");if(!o.includes(e))return!1}if("string"==typeof e.icon&&"<svg"===e.icon.substr(0,4)){const t=e.icon;e.icon=(0,n.createElement)($,null,t)}e.icon||delete e.icon,wp.blocks.getCategories().filter((({slug:t})=>t===e.category)).pop()||(e.category="common"),e=acf.parseArgs(e,{title:"",name:"",category:"",api_version:2,acf_block_version:1});for(const t in e.attributes)0===e.attributes[t].default.length&&delete e.attributes[t].default;e.supports.anchor&&(e.attributes.anchor={type:"string"});let a=L,s=q;var l;(e.supports.alignText||e.supports.align_text)&&(e.attributes=Z(e.attributes,"align_text","string"),a=function(e,t){const o=Q;return t.alignText=o(t.alignText),class extends g{render(){const{attributes:t,setAttributes:a}=this.props,{alignText:s}=t;return(0,n.createElement)(m,null,(0,n.createElement)(r,{group:"block"},(0,n.createElement)(c,{value:o(s),onChange:function(e){a({alignText:o(e)})}})),(0,n.createElement)(e,i({},this.props)))}}}(a,e)),(e.supports.alignContent||e.supports.align_content)&&(e.attributes=Z(e.attributes,"align_content","string"),a=function(e,o){let a,s,l=o.supports.align_content||o.supports.alignContent;return"matrix"===l?(a=v||k,s=K):(a=p,s=G),a===t?(console.warn(`The "${l}" alignment component was not found.`),e):(o.alignContent=s(o.alignContent),class extends g{render(){const{attributes:t,setAttributes:o}=this.props,{alignContent:l}=t;return(0,n.createElement)(m,null,(0,n.createElement)(r,{group:"block"},(0,n.createElement)(a,{label:acf.__("Change content alignment"),value:s(l),onChange:function(e){o({alignContent:s(e)})}})),(0,n.createElement)(e,i({},this.props)))}})}(a,e)),(e.supports.fullHeight||e.supports.full_height)&&(e.attributes=Z(e.attributes,"full_height","boolean"),l=a,e.blockType,a=x?class extends g{render(){const{attributes:e,setAttributes:t}=this.props,{fullHeight:o}=e;return(0,n.createElement)(m,null,(0,n.createElement)(r,{group:"block"},(0,n.createElement)(x,{isActive:o,onToggle:function(e){t({fullHeight:e})}})),(0,n.createElement)(l,i({},this.props)))}}:l),e.edit=e=>(0,n.createElement)(a,i({},e)),e.save=()=>(0,n.createElement)(s,null),S[e.name]=e;const u=wp.blocks.registerBlockType(e.name,e);return u.attributes.anchor&&(u.attributes.anchor={type:"string"}),u}function O(e){return"core/block-editor"===e?wp.data.select("core/block-editor")||wp.data.select("core/editor"):wp.data.select(e)}const P={},R={};function I(t){const{attributes:r={},context:n={},query:o={},clientId:s=null,delay:l=0}=t,c=a(JSON.stringify(i(i(i({},r),n),o))),p=P[c]||{query:{},timeout:!1,promise:e.Deferred(),started:!1};return p.query=i(i({},p.query),o),p.started||(clearTimeout(p.timeout),p.timeout=setTimeout((()=>{p.started=!0,R[c]?(P[c]=null,p.promise.resolve.apply(R[c][0],R[c][1])):e.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",cache:!1,data:acf.prepareForAjax({action:"acf/ajax/fetch-block",block:JSON.stringify(r),clientId:s,context:JSON.stringify(n),query:p.query})}).always((()=>{P[c]=null})).done((function(){R[c]=[this,arguments],p.promise.resolve.apply(this,arguments)})).fail((function(){p.promise.reject.apply(this,arguments)}))}),l),P[c]=p),p.promise}function D(e,t){return JSON.stringify(e)===JSON.stringify(t)}function M(e,t,r=0){const o=function(e,t){switch(e){case"innerblocks":return t<2?s:"ACFInnerBlocks";case"script":return X;case"#comment":return null;default:e=H(e)}return e}(e.nodeName.toLowerCase(),t);if(!o)return null;const a={};if(1===r&&"ACFInnerBlocks"!==o&&(a.ref=React.createRef()),acf.arrayArgs(e.attributes).map(F).forEach((({name:e,value:t})=>{a[e]=t})),"ACFInnerBlocks"===o)return(0,n.createElement)(z,i({},a));const l=[o,a];return acf.arrayArgs(e.childNodes).forEach((e=>{if(e instanceof Text){const t=e.textContent;t&&l.push(t)}else l.push(M(e,t,r+1))})),React.createElement.apply(this,l)}function H(e){return acf.isget(acf,"jsxNameReplacements",e)||e}function z(e){const{className:t="acf-innerblocks-container"}=e,r=w({className:t},e);return(0,n.createElement)("div",i({},r),r.children)}function F(e){let t=e.name,r=e.value,n=acf.applyFilters("acf_blocks_parse_node_attr",!1,e);if(n)return n;switch(t){case"class":t="className";break;case"style":const e={};r.split(";").forEach((t=>{const r=t.indexOf(":");if(r>0){let n=t.substr(0,r).trim();const o=t.substr(r+1).trim();"-"!==n.charAt(0)&&(n=acf.strCamelCase(n)),e[n]=o}})),r=e;break;default:if(0===t.indexOf("data-"))break;t=H(t);const n=r.charAt(0);"["!==n&&"{"!==n||(r=JSON.parse(r)),"true"!==r&&"false"!==r||(r="true"===r)}return{name:t,value:r}}acf.parseJSX=(t,r)=>(t=(t="<div>"+t+"</div>").replace(/<InnerBlocks([^>]+)?\/>/,"<InnerBlocks$1></InnerBlocks>"),M(e(t)[0],r,0).props.children);const N=b((e=>class extends g{constructor(e){super(e);const{name:r,attributes:n}=this.props,o=E(r);if(!o)return;Object.keys(n).forEach((e=>{""===n[e]&&delete n[e]}));const i={full_height:"fullHeight",align_content:"alignContent",align_text:"alignText"};Object.keys(i).forEach((e=>{n[e]!==t?n[i[e]]=n[e]:n[i[e]]===t&&o[e]!==t&&(n[i[e]]=o[e]),delete o[e],delete n[e]}));for(let e in o.attributes)n[e]===t&&o[e]!==t&&(n[e]=o[e])}render(){return(0,n.createElement)(e,i({},this.props))}}),"withDefaultAttributes");function q(){return(0,n.createElement)(s.Content,null)}wp.hooks.addFilter("editor.BlockListBlock","acf/with-default-attributes",N);class L extends g{constructor(e){super(e),this.setup()}setup(){const{name:e,attributes:t,clientId:r}=this.props,n=E(e);function o(e){e.includes(t.mode)||(t.mode=e[0])}if(T(r)||_()||B()||C())o(["preview"]);else switch(n.mode){case"edit":o(["edit","preview"]);break;case"preview":o(["preview","edit"]);break;default:o(["auto"])}}render(){const{name:e,attributes:t,setAttributes:a,clientId:s}=this.props,l=E(e),c=T(s)||_()||B()||C();let{mode:p}=t;c&&(p="preview");let f=l.supports.mode;("auto"===p||c)&&(f=!1);const h="preview"===p?acf.__("Switch to Edit"):acf.__("Switch to Preview"),g="preview"===p?"edit":"welcome-view-site";return(0,n.createElement)(m,null,(0,n.createElement)(r,null,f&&(0,n.createElement)(u,null,(0,n.createElement)(d,{className:"components-icon-button components-toolbar__control",label:h,icon:g,onClick:function(){a({mode:"preview"===p?"edit":"preview"})}}))),(0,n.createElement)(o,null,"preview"===p&&(0,n.createElement)("div",{className:"acf-block-component acf-block-panel"},(0,n.createElement)(V,i({},this.props)))),(0,n.createElement)(U,i({},this.props)))}}const U=y(((e,t)=>{const{clientId:r}=t,n=e("core/block-editor").getBlockRootClientId(r);return{index:e("core/block-editor").getBlockIndex(r,n)}}))((function(e){const{attributes:t,isSelected:r,name:o}=e,{mode:a}=t;let s=!0,c="acf-block-component acf-block-body";return("auto"===a&&!r||"preview"===a)&&(c+=" acf-block-preview",s=!1),A(o)>1?(0,n.createElement)("div",i({},l({className:c})),s?(0,n.createElement)(V,i({},e)):(0,n.createElement)(Y,i({},e))):(0,n.createElement)("div",i({},l()),(0,n.createElement)("div",{className:"acf-block-component acf-block-body"},s?(0,n.createElement)(V,i({},e)):(0,n.createElement)(Y,i({},e))))}));class $ extends g{render(){return(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:this.props.children}})}}class X extends g{render(){return(0,n.createElement)("div",{ref:e=>this.el=e})}setHTML(t){e(this.el).html(`<script>${t}<\/script>`)}componentDidUpdate(){this.setHTML(this.props.children)}componentDidMount(){this.setHTML(this.props.children)}}const W={};class J extends g{constructor(e){super(e),this.setRef=this.setRef.bind(this),this.id="",this.el=!1,this.subscribed=!0,this.renderMethod="jQuery",this.setup(e),this.loadState()}setup(e){}fetch(){}maybePreload(e,r,n){if(this.state.html===t&&!T(this.props.clientId)){const t=acf.get("preloadedBlocks");if(t&&t[e])return!(n&&!t[e].form||!n&&t[e].form)&&t[e].html.replaceAll(e,r)}return!1}loadState(){this.state=W[this.id]||{}}setState(e){W[this.id]=i(i({},this.state),e),this.subscribed&&super.setState(e)}setHtml(t){if((t=t?t.trim():"")===this.state.html)return;const r={html:t};if("jsx"===this.renderMethod){if(r.jsx=acf.parseJSX(t,A(this.props.name)),r.jsx||(console.warn("Your ACF block template contains no valid HTML elements. Appending a empty div to prevent React JS errors."),r.html+="<div></div>",r.jsx=acf.parseJSX(r.html,A(this.props.name))),Array.isArray(r.jsx)){let e=r.jsx.find((e=>React.isValidElement(e)));r.ref=e.ref}else r.ref=r.jsx.ref;r.$el=e(this.el)}else r.$el=e(t);this.setState(r)}setRef(e){this.el=e}render(){return this.state.jsx?A(this.props.name)>1?(this.setRef(this.state.jsx),this.state.jsx):(0,n.createElement)("div",{ref:this.setRef},this.state.jsx):(0,n.createElement)("div",{ref:this.setRef},(0,n.createElement)(f,null,(0,n.createElement)(h,null)))}shouldComponentUpdate({index:e},{html:t}){return e!==this.props.index&&this.componentWillMove(),t!==this.state.html}display(t){if("jQuery"===this.renderMethod){const t=this.state.$el,r=t.parent(),n=e(this.el);n.html(t),r.length&&r[0]!==n[0]&&r.html(t.clone())}switch(t){case"append":this.componentDidAppend();break;case"remount":this.componentDidRemount()}}componentDidMount(){this.state.html===t?this.fetch():this.display("remount")}componentDidUpdate(e,t){this.display("append")}componentDidAppend(){acf.doAction("append",this.state.$el)}componentWillUnmount(){acf.doAction("unmount",this.state.$el),this.subscribed=!1}componentDidRemount(){this.subscribed=!0,setTimeout((()=>{acf.doAction("remount",this.state.$el)}))}componentWillMove(){acf.doAction("unmount",this.state.$el),setTimeout((()=>{acf.doAction("remount",this.state.$el)}))}}class V extends J{setup({clientId:e}){this.id=`BlockForm-${e}`}fetch(){const{attributes:e,context:t,clientId:r}=this.props,n=ee(e,t),o=this.maybePreload(n,r,!0);o?this.setHtml(o):I({attributes:e,context:t,clientId:r,query:{form:!0}}).done((({data:e})=>{this.setHtml(e.form.replaceAll(e.clientId,r))}))}componentDidRemount(){super.componentDidRemount();const{$el:e}=this.state;!0!==e.data("acf-events-added")&&this.componentDidAppend()}componentDidAppend(){super.componentDidAppend();const{attributes:e,setAttributes:t,clientId:r}=this.props,{$el:n}=(this.props,this.state);function o(o=!1){const i=acf.serialize(n,`acf-${r}`);o?e.data=i:t({data:i})}let i=!1;n.on("change keyup",(()=>{clearTimeout(i),i=setTimeout(o,300)})),n.data("acf-events-added",!0),e.data||o(!0)}}class Y extends J{setup({clientId:e,name:t}){const r=E(t),n=acf.isget(this.props,"context","postId");this.id=`BlockPreview-${e}`,n&&(this.id=`BlockPreview-${e}-${n}`),r.supports.jsx&&(this.renderMethod="jsx")}fetch(e={}){const{attributes:t=this.props.attributes,clientId:r=this.props.clientId,context:n=this.props.context,delay:o=0}=e,{name:i}=this.props;this.setState({prevAttributes:t,prevContext:n});const a=ee(t,n);let s=this.maybePreload(a,r,!1);if(s)return 1==A(i)&&(s='<div class="acf-block-preview">'+s+"</div>"),void this.setHtml(s);I({attributes:t,context:n,clientId:r,query:{preview:!0},delay:o}).done((({data:e})=>{let t=e.preview.replaceAll(e.clientId,r);1==A(i)&&(t='<div class="acf-block-preview">'+t+"</div>"),this.setHtml(t)}))}componentDidAppend(){super.componentDidAppend(),this.renderBlockPreviewEvent()}shouldComponentUpdate(e,t){const r=e.attributes,n=this.props.attributes;if(!D(r,n)||!D(e.context,this.props.context)){let t=0;r.className!==n.className&&(t=300),r.anchor!==n.anchor&&(t=300),this.fetch({attributes:r,context:e.context,delay:t})}return super.shouldComponentUpdate(e,t)}renderBlockPreviewEvent(){const{attributes:t,name:r}=this.props,{$el:n,ref:o}=this.state;var i;const a=t.name.replace("acf/","");i=o&&o.current?e(o.current).parent():1==A(r)?n:n.parents(".acf-block-preview"),acf.doAction("render_block_preview",i,t),acf.doAction(`render_block_preview/type=${a}`,i,t)}componentDidRemount(){super.componentDidRemount(),D(this.state.prevAttributes,this.props.attributes)&&D(this.state.prevContext,this.props.context)||this.fetch(),this.renderBlockPreviewEvent()}}function G(e){return["top","center","bottom"].includes(e)?e:"top"}function Q(e){const t=acf.get("rtl")?"right":"left";return["left","center","right"].includes(e)?e:t}function K(e){if(e){const[t,r]=e.split(" ");return`${G(t)} ${Q(r)}`}return"center center"}function Z(e,t,r){return e[t]={type:r},e}function ee(e,t){return e._acf_context=t,a(JSON.stringify(Object.keys(e).sort().reduce(((t,r)=>(t[r]=e[r],t)),{})))}acf.addAction("prepare",(function(){wp.blockEditor||(wp.blockEditor=wp.editor);const e=acf.get("blockTypes");e&&e.map(j)}))})(jQuery)})()})();