|
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:S}=Object,{apply:k,construct:w}="undefined"!=typeof Reflect&&Reflect;T||(T=function(e){return e}),E||(E=function(e){return e}),k||(k=function(e,t,n){return e.apply(t,n)}),w||(w=function(e,t){return new e(...t)});const N=H(Array.prototype.forEach),A=H(Array.prototype.lastIndexOf),v=H(Array.prototype.pop),x=H(Array.prototype.push),O=H(Array.prototype.splice),R=H(String.prototype.toLowerCase),C=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 w(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 k(e,t,o)}}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R;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=S(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","section","select","shadow","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","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","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","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):|[^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.2.5",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"),k=W(b,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let w,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 k&&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 Se=B({},[...Z,...Q,...ee,...te]);let ke=Object.seal(S(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}})),we=null,Ne=null,Ae=!0,ve=!0,xe=!1,Oe=!0,Re=!1,Ce=!0,De=!1,Le=!1,Me=!1,Ie=!1,Pe=!1,ze=!1,Ue=!0,Fe=!1,He=!0,Be=!1,je={},Ge=null;const We=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 Ye=null;const Ve=B({},["audio","video","img","source","image","track"]);let Xe=null;const $e=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Ze=Je,Qe=!1,et=null;const tt=B({},[qe,Ke,Je],C);let nt=B({},["mi","mo","mn","ms","mtext"]),ot=B({},["annotation-xml"]);const rt=B({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const st=o.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=G(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?C:R,ye=P(e,"ALLOWED_TAGS")?B({},e.ALLOWED_TAGS,lt):Te,Ee=P(e,"ALLOWED_ATTR")?B({},e.ALLOWED_ATTR,lt):Se,et=P(e,"ALLOWED_NAMESPACES")?B({},e.ALLOWED_NAMESPACES,C):tt,Xe=P(e,"ADD_URI_SAFE_ATTR")?B(G($e),e.ADD_URI_SAFE_ATTR,lt):$e,Ye=P(e,"ADD_DATA_URI_TAGS")?B(G(Ve),e.ADD_DATA_URI_TAGS,lt):Ve,Ge=P(e,"FORBID_CONTENTS")?B({},e.FORBID_CONTENTS,lt):We,we=P(e,"FORBID_TAGS")?B({},e.FORBID_TAGS,lt):{},Ne=P(e,"FORBID_ATTR")?B({},e.FORBID_ATTR,lt):{},je=!!P(e,"USE_PROFILES")&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||le,Ze=e.NAMESPACE||Je,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,ot=e.HTML_INTEGRATION_POINTS||ot,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(ve=!1),Pe&&(Ie=!0),je&&(ye=B({},J),Ee=[],!0===je.html&&(B(ye,Y),B(Ee,Z)),!0===je.svg&&(B(ye,V),B(Ee,Q),B(Ee,te)),!0===je.svgFilters&&(B(ye,X),B(Ee,Q),B(Ee,te)),!0===je.mathMl&&(B(ye,q),B(Ee,ee),B(Ee,te))),e.ADD_TAGS&&(ye===Te&&(ye=G(ye)),B(ye,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Ee===Se&&(Ee=G(Ee)),B(Ee,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&B(Xe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ge===We&&(Ge=G(Ge)),B(Ge,e.FORBID_CONTENTS,lt)),He&&(ye["#text"]=!0),De&&B(ye,["html","head","body"]),ye.table&&(B(ye,["tbody"]),delete we.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.');w=e.TRUSTED_TYPES_POLICY,F=w.createHTML("")}else void 0===w&&(w=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!==w&&"string"==typeof F&&(F=w.createHTML(""));T&&T(e),ct=e}},mt=B({},[...V,...X,...$]),dt=B({},[...q,...K]),ft=function(e){x(n.removed,{element:e});try{k(e).removeChild(e)}catch(t){_(e)}},ht=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(Ie||Pe)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=D(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Ze===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=w?w.createHTML(e):e;if(Ze===Je)try{t=(new d).parseFromString(r,it)}catch(e){}if(!t||!t.documentElement){t=H.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Qe?F:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ze===Je?oe.call(t,De?"html":"body")[0]:De?t.documentElement:i},gt=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)},_t=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)},yt=function(e){return"function"==typeof c&&e instanceof c};function Tt(e,t,o){N(e,(e=>{e.call(n,t,o,ct)}))}const Et=function(e){let t=null;if(Tt(ie.beforeSanitizeElements,e,null),_t(e))return ft(e),!0;const o=lt(e.nodeName);if(Tt(ie.uponSanitizeElement,e,{tagName:o,allowedTags:ye}),e.hasChildNodes()&&!yt(e.firstElementChild)&&z(/<[/\w!]/g,e.innerHTML)&&z(/<[/\w!]/g,e.textContent))return ft(e),!0;if(7===e.nodeType)return ft(e),!0;if(Ce&&8===e.nodeType&&z(/<[/\w]/g,e.data))return ft(e),!0;if(!ye[o]||we[o]){if(!we[o]&&kt(o)){if(ke.tagNameCheck instanceof RegExp&&z(ke.tagNameCheck,o))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(o))return!1}if(He&&!Ge[o]){const t=k(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 ft(e),!0}return e instanceof s&&!function(e){let t=k(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=R(e.tagName),o=R(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Ke?t.namespaceURI===Je?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===o||nt[o]):Boolean(mt[n]):e.namespaceURI===qe?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ke?"math"===n&&ot[o]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ke&&!ot[o])&&!(t.namespaceURI===qe&&!nt[o])&&!dt[n]&&(rt[n]||!mt[n]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(ft(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!z(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,N([ae,ce,se],(e=>{t=L(t,e," ")})),e.textContent!==t&&(x(n.removed,{element:e.cloneNode()}),e.textContent=t)),Tt(ie.afterSanitizeElements,e,null),!1):(ft(e),!0)},St=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in o||n in st))return!1;if(ve&&!Ne[t]&&z(pe,t));else if(Ae&&z(fe,t));else if(!Ee[t]||Ne[t]){if(!(kt(e)&&(ke.tagNameCheck instanceof RegExp&&z(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&z(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&z(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Xe[t]);else if(z(_e,L(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==M(n,"data:")||!Ye[e])if(xe&&!z(he,L(n,be,"")));else if(n)return!1;return!0},kt=function(e){return"annotation-xml"!==e&&D(e,ge)},wt=function(e){Tt(ie.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(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=lt(a);let u="value"===a?c:I(c);if(o.attrName=s,o.attrValue=u,o.keepAttr=!0,o.forceKeepAttr=void 0,Tt(ie.uponSanitizeAttribute,e,o),u=o.attrValue,!Fe||"id"!==s&&"name"!==s||(ht(a,e),u="user-content-"+u),Ce&&z(/((--!?|])>)|<\/(style|title)/i,u)){ht(a,e);continue}if(o.forceKeepAttr)continue;if(ht(a,e),!o.keepAttr)continue;if(!Oe&&z(/\/>/i,u)){ht(a,e);continue}Re&&N([ae,ce,se],(e=>{u=L(u,e," ")}));const p=lt(e.nodeName);if(St(p,s,u)){if(w&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(p,s)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),_t(e)?ft(e):v(n.removed)}catch(e){}}}Tt(ie.afterSanitizeAttributes,e,null)},Nt=function e(t){let n=null;const o=gt(t);for(Tt(ie.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Tt(ie.uponSanitizeShadowNode,n,null),Et(n),wt(n),n.content instanceof a&&e(n.content);Tt(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(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!yt(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(Le||pt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||we[t])throw U("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=bt("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Ie&&!Re&&!De&&-1===e.indexOf("<"))return w&&ze?w.createHTML(e):e;if(o=bt(e),!o)return Ie?null:ze?F:""}o&&Me&&ft(o.firstChild);const u=gt(Be?e:o);for(;l=u.nextNode();)Et(l),wt(l),l.content instanceof a&&Nt(l.content);if(Be)return e;if(Ie){if(Pe)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=De?o.outerHTML:o.innerHTML;return De&&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&&N([ae,ce,se],(e=>{p=L(p,e," ")})),w&&ze?w.createHTML(p):p},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Le=!0},n.clearConfig=function(){ct=null,Le=!1},n.isValidAttribute=function(e,t,n){ct||pt({});const o=lt(e),r=lt(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=A(ie[e],t);return-1===n?void 0:O(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.wp.primitives,be=window.ReactJSXRuntime,ge=(he.SVG,he.Path,he.SVG,he.Path,he.SVG,he.Path,window.wp.hooks,"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 Se={};Object.keys(Te).map((e=>{Se[e]=e===ge?"":`@media (min-width: ${Te[e]})`})),(0,o.__)("Mobile","content-blocks-builder"),Se[ge],(0,o.__)("Tablet","content-blocks-builder"),Se[_e],(0,o.__)("Desktop","content-blocks-builder"),Se[ye];const ke=window.wp.coreData,we={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 Ne({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,be.jsx)(c.Modal,{title:e,closeLabel:we.closeModal,onRequestClose:()=>p(),overlayClassName:"reusable-blocks-menu-items__convert-modal",className:l,children:(0,be.jsxs)("form",{onSubmit:e=>{e.preventDefault(),r(s),p()},children:[(0,be.jsx)(c.TextControl,{label:we.name,value:s,onChange:u,help:n,className:"title-input"}),(0,be.jsxs)(c.Flex,{className:"reusable-blocks-menu-items__convert-modal-actions",justify:"flex-end",children:[(0,be.jsx)(c.FlexItem,{children:(0,be.jsx)(c.Button,{variant:"secondary",onClick:()=>p(),children:we.cancel})}),(0,be.jsx)(c.FlexItem,{children:(0,be.jsx)(c.Button,{variant:"primary",type:"submit",disabled:!s,children:we.save})})]})]})})}function Ae(e){let t=[];return e.forEach((({name:e,attributes:n,innerBlocks:o})=>{t.push([e,n,Ae(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(ke.store).canUser("update","settings")),[]))return null;const T=(0,o.__)("Create block variation","content-blocks-builder");return(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)(s.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1===e?.length?(0,be.jsx)(c.MenuItem,{label:T,icon:"plus-alt2",onClick:()=>d(!0),children:T}):null}),m&&(0,be.jsx)(Ne,{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:Ae(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)(we.editItem,we.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}})})(); |