|
1
|
|
-(()=>{"use strict";var e={252:e=>{e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!==r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!==r--;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const o=window.wp.i18n,r=window.wp.data,i=window.wp.plugins,a=window.wp.element,l=window.wp.blocks,c=window.wp.components,s=window.wp.blockEditor,u=window.wp.editor,p=window.wp.notices,m=window.lodash;n(252);const d=window.wp.apiFetch;var f=n.n(d);const{entries:h,setPrototypeOf:b,isFrozen:g,getPrototypeOf:_,getOwnPropertyDescriptor:y}=Object;let{freeze:T,seal:E,create:k}=Object,{apply:S,construct:A}="undefined"!=typeof Reflect&&Reflect;T||(T=function(e){return e}),E||(E=function(e){return e}),S||(S=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),A||(A=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const w=H(Array.prototype.forEach),N=H(Array.prototype.lastIndexOf),v=H(Array.prototype.pop),x=H(Array.prototype.push),C=H(Array.prototype.splice),O=H(String.prototype.toLowerCase),R=H(String.prototype.toString),D=H(String.prototype.match),L=H(String.prototype.replace),M=H(String.prototype.indexOf),I=H(String.prototype.trim),P=H(Object.prototype.hasOwnProperty),z=H(RegExp.prototype.test),U=(F=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(F,t)});var F;function H(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return S(e,t,o)}}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;b&&b(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(g(t)||(t[o]=e),r=e)}e[r]=!0}return e}function j(e){for(let t=0;t<e.length;t++)P(e,t)||(e[t]=null);return e}function G(e){const t=k(null);for(const[n,o]of h(e))P(e,n)&&(Array.isArray(o)?t[n]=j(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=G(o):t[n]=o);return t}function W(e,t){for(;null!==e;){const n=y(e,t);if(n){if(n.get)return H(n.get);if("function"==typeof n.value)return H(n.value)}e=_(e)}return function(){return null}}const Y=T(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),V=T(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),X=T(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$=T(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),q=T(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),K=T(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),J=T(["#text"]),Z=T(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Q=T(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ee=T(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),te=T(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ne=E(/\{\{[\w\W]*|[\w\W]*\}\}/gm),oe=E(/<%[\w\W]*|[\w\W]*%>/gm),re=E(/\$\{[\w\W]*/gm),ie=E(/^data-[\-\w.\u00B7-\uFFFF]+$/),ae=E(/^aria-[\-\w]+$/),le=E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ce=E(/^(?:\w+script|data):/i),se=E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ue=E(/^html$/i),pe=E(/^[a-z][.\w]*(-[.\w]+)+$/i);var me=Object.freeze({__proto__:null,ARIA_ATTR:ae,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:pe,DATA_ATTR:ie,DOCTYPE_NAME:ue,ERB_EXPR:oe,IS_ALLOWED_URI:le,IS_SCRIPT_OR_DATA:ce,MUSTACHE_EXPR:ne,TMPLIT_EXPR:re});const de=function(){return"undefined"==typeof window?null:window};!function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const r=o,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:d,trustedTypes:f}=t,b=s.prototype,g=W(b,"cloneNode"),_=W(b,"remove"),y=W(b,"nextSibling"),E=W(b,"childNodes"),S=W(b,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let A,F="";const{implementation:H,createNodeIterator:j,createDocumentFragment:ne,getElementsByTagName:oe}=o,{importNode:re}=r;let ie={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof h&&"function"==typeof S&&H&&void 0!==H.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:pe,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:be,CUSTOM_ELEMENT:ge}=me;let{IS_ALLOWED_URI:_e}=me,ye=null;const Te=B({},[...Y,...V,...X,...q,...J]);let Ee=null;const ke=B({},[...Z,...Q,...ee,...te]);let Se=Object.seal(k(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,we=null;const Ne=Object.seal(k(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,xe=!0,Ce=!1,Oe=!0,Re=!1,De=!0,Le=!1,Me=!1,Ie=!1,Pe=!1,ze=!1,Ue=!1,Fe=!0,He=!1,Be=!0,je=!1,Ge={},We=null;const Ye=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Xe=B({},["audio","video","img","source","image","track"]);let $e=null;const qe=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Qe=Ze,et=!1,tt=null;const nt=B({},[Ke,Je,Ze],R);let ot=B({},["mi","mo","mn","ms","mtext"]),rt=B({},["annotation-xml"]);const it=B({},["title","style","font","a","script"]);let at=null;const lt=["application/xhtml+xml","text/html"];let ct=null,st=null;const ut=o.createElement("form"),pt=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=G(e),at=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===at?R:O,ye=P(e,"ALLOWED_TAGS")?B({},e.ALLOWED_TAGS,ct):Te,Ee=P(e,"ALLOWED_ATTR")?B({},e.ALLOWED_ATTR,ct):ke,tt=P(e,"ALLOWED_NAMESPACES")?B({},e.ALLOWED_NAMESPACES,R):nt,$e=P(e,"ADD_URI_SAFE_ATTR")?B(G(qe),e.ADD_URI_SAFE_ATTR,ct):qe,Ve=P(e,"ADD_DATA_URI_TAGS")?B(G(Xe),e.ADD_DATA_URI_TAGS,ct):Xe,We=P(e,"FORBID_CONTENTS")?B({},e.FORBID_CONTENTS,ct):Ye,Ae=P(e,"FORBID_TAGS")?B({},e.FORBID_TAGS,ct):G({}),we=P(e,"FORBID_ATTR")?B({},e.FORBID_ATTR,ct):G({}),Ge=!!P(e,"USE_PROFILES")&&e.USE_PROFILES,ve=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,De=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||le,Qe=e.NAMESPACE||Ze,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(xe=!1),ze&&(Pe=!0),Ge&&(ye=B({},J),Ee=[],!0===Ge.html&&(B(ye,Y),B(Ee,Z)),!0===Ge.svg&&(B(ye,V),B(Ee,Q),B(Ee,te)),!0===Ge.svgFilters&&(B(ye,X),B(Ee,Q),B(Ee,te)),!0===Ge.mathMl&&(B(ye,q),B(Ee,ee),B(Ee,te))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ne.tagCheck=e.ADD_TAGS:(ye===Te&&(ye=G(ye)),B(ye,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ne.attributeCheck=e.ADD_ATTR:(Ee===ke&&(Ee=G(Ee)),B(Ee,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&B($e,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(We===Ye&&(We=G(We)),B(We,e.FORBID_CONTENTS,ct)),Be&&(ye["#text"]=!0),Le&&B(ye,["html","head","body"]),ye.table&&(B(ye,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=e.TRUSTED_TYPES_POLICY,F=A.createHTML("")}else void 0===A&&(A=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(f,i)),null!==A&&"string"==typeof F&&(F=A.createHTML(""));T&&T(e),st=e}},dt=B({},[...V,...X,...$]),ft=B({},[...q,...K]),ht=function(e){x(n.removed,{element:e});try{S(e).removeChild(e)}catch(t){_(e)}},bt=function(e,t){try{x(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){x(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||ze)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=D(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Qe===Ze&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=A?A.createHTML(e):e;if(Qe===Ze)try{t=(new d).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=H.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?F:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Qe===Ze?oe.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},_t=function(e){return j.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(e){return"function"==typeof c&&e instanceof c};function Et(e,t,o){w(e,e=>{e.call(n,t,o,st)})}const kt=function(e){let t=null;if(Et(ie.beforeSanitizeElements,e,null),yt(e))return ht(e),!0;const o=ct(e.nodeName);if(Et(ie.uponSanitizeElement,e,{tagName:o,allowedTags:ye}),De&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&z(/<[/\w!]/g,e.innerHTML)&&z(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(De&&8===e.nodeType&&z(/<[/\w]/g,e.data))return ht(e),!0;if(!(Ne.tagCheck instanceof Function&&Ne.tagCheck(o))&&(!ye[o]||Ae[o])){if(!Ae[o]&&At(o)){if(Se.tagNameCheck instanceof RegExp&&z(Se.tagNameCheck,o))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(o))return!1}if(Be&&!We[o]){const t=S(e)||e.parentNode,n=E(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=g(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,y(e))}}return ht(e),!0}return e instanceof s&&!function(e){let t=S(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=O(e.tagName),o=O(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Je?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(dt[n]):e.namespaceURI===Ke?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Je?"math"===n&&rt[o]:Boolean(ft[n]):e.namespaceURI===Ze?!(t.namespaceURI===Je&&!rt[o])&&!(t.namespaceURI===Ke&&!ot[o])&&!ft[n]&&(it[n]||!dt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!z(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,w([ae,ce,se],e=>{t=L(t,e," ")}),e.textContent!==t&&(x(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(ie.afterSanitizeElements,e,null),!1):(ht(e),!0)},St=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(xe&&!we[t]&&z(pe,t));else if(ve&&z(fe,t));else if(Ne.attributeCheck instanceof Function&&Ne.attributeCheck(t,e));else if(!Ee[t]||we[t]){if(!(At(e)&&(Se.tagNameCheck instanceof RegExp&&z(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&z(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t,e))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&z(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if($e[t]);else if(z(_e,L(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==M(n,"data:")||!Ve[e])if(Ce&&!z(he,L(n,be,"")));else if(n)return!1;return!0},At=function(e){return"annotation-xml"!==e&&D(e,ge)},wt=function(e){Et(ie.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ct(a),u=c;let p="value"===a?u:I(u);if(o.attrName=s,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,Et(ie.uponSanitizeAttribute,e,o),p=o.attrValue,!He||"id"!==s&&"name"!==s||(bt(a,e),p="user-content-"+p),De&&z(/((--!?|])>)|<\/(style|title|textarea)/i,p)){bt(a,e);continue}if("attributename"===s&&D(p,"href")){bt(a,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){bt(a,e);continue}if(!Oe&&z(/\/>/i,p)){bt(a,e);continue}Re&&w([ae,ce,se],e=>{p=L(p,e," ")});const m=ct(e.nodeName);if(St(m,s,p)){if(A&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(m,s)){case"TrustedHTML":p=A.createHTML(p);break;case"TrustedScriptURL":p=A.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),yt(e)?ht(e):v(n.removed)}catch(t){bt(a,e)}}else bt(a,e)}Et(ie.afterSanitizeAttributes,e,null)},Nt=function e(t){let n=null;const o=_t(t);for(Et(ie.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Et(ie.uponSanitizeShadowNode,n,null),kt(n),wt(n),n.content instanceof a&&e(n.content);Et(ie.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,l=null,s=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Tt(e)){if("function"!=typeof e.toString)throw U("toString is not a function");if("string"!=typeof(e=e.toString()))throw U("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||mt(t),n.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=ct(e.nodeName);if(!ye[t]||Ae[t])throw U("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=gt("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Pe&&!Re&&!Le&&-1===e.indexOf("<"))return A&&Ue?A.createHTML(e):e;if(o=gt(e),!o)return Pe?null:Ue?F:""}o&&Ie&&ht(o.firstChild);const u=_t(je?e:o);for(;l=u.nextNode();)kt(l),wt(l),l.content instanceof a&&Nt(l.content);if(je)return e;if(Pe){if(ze)for(s=ne.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(Ee.shadowroot||Ee.shadowrootmode)&&(s=re.call(r,s,!0)),s}let p=Le?o.outerHTML:o.innerHTML;return Le&&ye["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&z(ue,o.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+p),Re&&w([ae,ce,se],e=>{p=L(p,e," ")}),A&&Ue?A.createHTML(p):p},n.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){st=null,Me=!1},n.isValidAttribute=function(e,t,n){st||mt({});const o=ct(e),r=ct(t);return St(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&x(ie[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=N(ie[e],t);return-1===n?void 0:C(ie[e],n,1)[0]}return v(ie[e])},n.removeHooks=function(e){ie[e]=[]},n.removeAllHooks=function(){ie={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const fe=window.wp.url,he=window.ReactJSXRuntime,be=window.wp.primitives;be.SVG,be.Path,be.SVG,be.Path,be.SVG,be.Path;window.wp.hooks;const ge="Mobile",_e="Tablet",ye="Desktop",Te={},Ee=getComputedStyle(document.documentElement);Te[ge]=Ee.getPropertyValue("--wp--custom--breakpoint--sm")||"576px",Te[_e]=Ee.getPropertyValue("--wp--custom--breakpoint--md")||"768px",Te[ye]=Ee.getPropertyValue("--wp--custom--breakpoint--lg")||"1024px";const ke={};Object.keys(Te).map(e=>{ke[e]=e===ge?"":`@media (min-width: ${Te[e]})`}),(0,o.__)("Mobile","content-blocks-builder"),ke[ge],(0,o.__)("Tablet","content-blocks-builder"),ke[_e],(0,o.__)("Desktop","content-blocks-builder"),ke[ye];const Se=window.wp.coreData,Ae={edit:(0,o.__)("Edit","content-blocks-builder"),editItem:(0,o.__)("Edit %s","content-blocks-builder"),save:(0,o.__)("Save","content-blocks-builder"),cancel:(0,o.__)("Cancel","content-blocks-builder"),delete:(0,o.__)("Delete","content-blocks-builder"),closeModal:(0,o.__)("Close modal","content-blocks-builder"),name:(0,o.__)("Name","content-blocks-builder"),label:(0,o.__)("Label","content-blocks-builder"),block:(0,o.__)("block","content-blocks-builder"),variation:(0,o.__)("variation","content-blocks-builder"),defaultVariation:(0,o.__)("default variation","content-blocks-builder"),pattern:(0,o.__)("pattern","content-blocks-builder"),blocks:(0,o.__)("Blocks","content-blocks-builder"),variations:(0,o.__)("Variations","content-blocks-builder"),patterns:(0,o.__)("Patterns","content-blocks-builder")};function we({modalTitle:e,title:t,titleHelp:n,setIsModalOpen:o,onSubmit:r=m.noop,onCancel:i=m.noop,className:l}){const[s,u]=(0,a.useState)(t),p=()=>{o(!1),u(""),i()};return(0,he.jsx)(c.Modal,{title:e,closeLabel:Ae.closeModal,onRequestClose:()=>p(),overlayClassName:"reusable-blocks-menu-items__convert-modal",className:l,children:(0,he.jsxs)("form",{onSubmit:e=>{e.preventDefault(),r(s),p()},children:[(0,he.jsx)(c.TextControl,{label:Ae.name,value:s,onChange:u,help:n,className:"title-input"}),(0,he.jsxs)(c.Flex,{className:"reusable-blocks-menu-items__convert-modal-actions",justify:"flex-end",children:[(0,he.jsx)(c.FlexItem,{children:(0,he.jsx)(c.Button,{variant:"secondary",onClick:()=>p(),children:Ae.cancel})}),(0,he.jsx)(c.FlexItem,{children:(0,he.jsx)(c.Button,{variant:"primary",type:"submit",disabled:!s,children:Ae.save})})]})]})})}function Ne(e){let t=[];return e.forEach(({name:e,attributes:n,innerBlocks:o})=>{t.push([e,n,Ne(o)])}),t}(0,i.registerPlugin)("boldblocks-create-block-variation",{render:()=>{var e;const{getSelectedBlock:t}=(0,r.useSelect)(e=>e(s.store),[]),{getBlockVariations:n}=(0,r.useSelect)(e=>e(l.store),[]),{createSuccessNotice:i,createErrorNotice:u}=(0,r.useDispatch)(p.store),[m,d]=(0,a.useState)(!1),h=m?t():{},{name:b}=null!=h?h:{},g=b&&null!==(e=n(b))&&void 0!==e?e:[],_=b?`${b} variation ${g.length+1}`:"",y=b?`${b}-variation-${((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t})(10)}`:"";if(!(0,r.useSelect)(e=>e(Se.store).canUser("update","settings"),[]))return null;const T=(0,o.__)("Create block variation","content-blocks-builder");return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(s.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1===e?.length?(0,he.jsx)(c.MenuItem,{label:T,icon:"plus-alt2",onClick:()=>d(!0),children:T}):null}),m&&(0,he.jsx)(we,{modalTitle:(0,o.sprintf)((0,o.__)("Create a new variation for the block: '%s'","content-blocks-builder"),b),title:_,setIsModalOpen:d,onSubmit:e=>{(({variationName:e,blockName:t,title:n,description:r="",iconString:i="",block:a,createSuccessNotice:c,createErrorNotice:s,isDefault:u=!1,doneCb:p,finallyCb:m})=>{const d=(0,l.serialize)([a]),h=(({blockName:e,variationName:t,title:n,block:o})=>{const{attributes:r={},innerBlocks:i=[]}=null!=o?o:{};return{blockName:e,variation:{name:t,title:n,attributes:r,innerBlocks:Ne(i)}}})({blockName:t,variationName:e,title:n,block:a});f()({path:"boldblocks/v1/createVariation",method:"POST",data:{title:n,content:d,status:"publish",meta:{boldblocks_variation_block_name:t,boldblocks_variation_name:e,boldblocks_variation_data:JSON.stringify(h),boldblocks_variation_icon:i,boldblocks_variation_description:r,boldblocks_variation_is_default:u,boldblocks_variation_is_transformable:!0},cbb_variation_nonce:CBBBlocks?.variationNonce}}).then(e=>{const{success:n,data:r,post:i}=e;var a;n?(c(r||(0,o.__)("Your variation has been created successfully!","content-blocks-builder"),{type:"snackbar",actions:[{label:(0,o.sprintf)(Ae.editItem,Ae.variation),url:(a=i.id,(0,fe.addQueryArgs)(`post.php?post=${a}&action=edit`))}]}),(0,l.registerBlockVariation)(t,h.variation),p&&p(i)):s(r||"Request failed!",{type:"snackbar"})}).catch(({data:e})=>{s(e,{type:"snackbar"})}).finally(()=>{m&&m()})})({title:e,block:h,blockName:b,variationName:y,createSuccessNotice:i,createErrorNotice:u})},className:"cbb-block-modal"})]})}}),(0,i.registerPlugin)("boldblocks-variations",{render:()=>{const{getCurrentPostType:e}=(0,r.useSelect)(e=>e(u.store),[]),t=(()=>{const e=(0,a.useRef)(!0);return(0,a.useEffect)(()=>{e.current=!1},[]),e.current})(),{setNavigationMode:n}=(0,r.useDispatch)(s.store);return"boldblocks_variation"===e()&&t&&n(!0),null}})})(); |