|
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.components,l=window.wp.editor,c=window.wp.notices,s=window.wp.element,u=window.wp.apiFetch;var p=n.n(u);window.lodash,window.wp.blockEditor,n(252);const{entries:f,setPrototypeOf:m,isFrozen:d,getPrototypeOf:h,getOwnPropertyDescriptor:g}=Object;let{freeze:y,seal:T,create:b}=Object,{apply:E,construct:A}="undefined"!=typeof Reflect&&Reflect;y||(y=function(e){return e}),T||(T=function(e){return e}),E||(E=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 _=z(Array.prototype.forEach),w=z(Array.prototype.lastIndexOf),S=z(Array.prototype.pop),N=z(Array.prototype.push),v=z(Array.prototype.splice),O=z(String.prototype.toLowerCase),k=z(String.prototype.toString),R=z(String.prototype.match),D=z(String.prototype.replace),x=z(String.prototype.indexOf),C=z(String.prototype.trim),L=z(Object.prototype.hasOwnProperty),M=z(RegExp.prototype.test),I=(P=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(P,t)});var P;function z(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 E(e,t,o)}}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;m&&m(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(d(t)||(t[o]=e),r=e)}e[r]=!0}return e}function F(e){for(let t=0;t<e.length;t++)L(e,t)||(e[t]=null);return e}function H(e){const t=b(null);for(const[n,o]of f(e))L(e,n)&&(Array.isArray(o)?t[n]=F(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=H(o):t[n]=o);return t}function B(e,t){for(;null!==e;){const n=g(e,t);if(n){if(n.get)return z(n.get);if("function"==typeof n.value)return z(n.value)}e=h(e)}return function(){return null}}const G=y(["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"]),j=y(["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"]),W=y(["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"]),Y=y(["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"]),V=y(["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"]),X=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=y(["#text"]),$=y(["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"]),K=y(["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"]),Z=y(["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"]),J=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=T(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=T(/<%[\w\W]*|[\w\W]*%>/gm),te=T(/\$\{[\w\W]*/gm),ne=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),oe=T(/^aria-[\-\w]+$/),re=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=T(/^(?:\w+script|data):/i),ae=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=T(/^html$/i),ce=T(/^[a-z][.\w]*(-[.\w]+)+$/i);var se=Object.freeze({__proto__:null,ARIA_ATTR:oe,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:ce,DATA_ATTR:ne,DOCTYPE_NAME:le,ERB_EXPR:ee,IS_ALLOWED_URI:re,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:Q,TMPLIT_EXPR:te});const ue=function(){return"undefined"==typeof window?null:window};!function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue();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:h}=t,g=s.prototype,T=B(g,"cloneNode"),E=B(g,"remove"),A=B(g,"nextSibling"),P=B(g,"childNodes"),z=B(g,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let F,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=o,{importNode:ie}=r;let ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:pe,TMPLIT_EXPR:fe,DATA_ATTR:me,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ye}=se;let{IS_ALLOWED_URI:Te}=se,be=null;const Ee=U({},[...G,...j,...W,...V,...q]);let Ae=null;const _e=U({},[...$,...K,...Z,...J]);let we=Object.seal(b(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}})),Se=null,Ne=null;const ve=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,ke=!0,Re=!1,De=!0,xe=!1,Ce=!0,Le=!1,Me=!1,Ie=!1,Pe=!1,ze=!1,Ue=!1,Fe=!0,He=!1,Be=!0,Ge=!1,je={},We=null;const Ye=U({},["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=U({},["audio","video","img","source","image","track"]);let qe=null;const $e=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=U({},[Ke,Ze,Je],k);let ot=U({},["mi","mo","mn","ms","mtext"]),rt=U({},["annotation-xml"]);const it=U({},["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},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=H(e),at=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===at?k:O,be=L(e,"ALLOWED_TAGS")?U({},e.ALLOWED_TAGS,ct):Ee,Ae=L(e,"ALLOWED_ATTR")?U({},e.ALLOWED_ATTR,ct):_e,tt=L(e,"ALLOWED_NAMESPACES")?U({},e.ALLOWED_NAMESPACES,k):nt,qe=L(e,"ADD_URI_SAFE_ATTR")?U(H($e),e.ADD_URI_SAFE_ATTR,ct):$e,Ve=L(e,"ADD_DATA_URI_TAGS")?U(H(Xe),e.ADD_DATA_URI_TAGS,ct):Xe,We=L(e,"FORBID_CONTENTS")?U({},e.FORBID_CONTENTS,ct):Ye,Se=L(e,"FORBID_TAGS")?U({},e.FORBID_TAGS,ct):H({}),Ne=L(e,"FORBID_ATTR")?U({},e.FORBID_ATTR,ct):H({}),je=!!L(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Ce=!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,Ge=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||re,Qe=e.NAMESPACE||Je,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(ke=!1),ze&&(Pe=!0),je&&(be=U({},q),Ae=[],!0===je.html&&(U(be,G),U(Ae,$)),!0===je.svg&&(U(be,j),U(Ae,K),U(Ae,J)),!0===je.svgFilters&&(U(be,W),U(Ae,K),U(Ae,J)),!0===je.mathMl&&(U(be,V),U(Ae,Z),U(Ae,J))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ve.tagCheck=e.ADD_TAGS:(be===Ee&&(be=H(be)),U(be,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ve.attributeCheck=e.ADD_ATTR:(Ae===_e&&(Ae=H(Ae)),U(Ae,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&U(qe,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(We===Ye&&(We=H(We)),U(We,e.FORBID_CONTENTS,ct)),Be&&(be["#text"]=!0),Le&&U(be,["html","head","body"]),be.table&&(U(be,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');F=e.TRUSTED_TYPES_POLICY,Q=F.createHTML("")}else void 0===F&&(F=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}}(h,i)),null!==F&&"string"==typeof Q&&(Q=F.createHTML(""));y&&y(e),st=e}},mt=U({},[...j,...W,...Y]),dt=U({},[...V,...X]),ht=function(e){N(n.removed,{element:e});try{z(e).removeChild(e)}catch(t){E(e)}},gt=function(e,t){try{N(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){N(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){}},yt=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=R(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=F?F.createHTML(e):e;if(Qe===Je)try{t=(new d).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Qe===Je?oe.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},Tt=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},bt=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)},Et=function(e){return"function"==typeof c&&e instanceof c};function At(e,t,o){_(e,e=>{e.call(n,t,o,st)})}const _t=function(e){let t=null;if(At(ae.beforeSanitizeElements,e,null),bt(e))return ht(e),!0;const o=ct(e.nodeName);if(At(ae.uponSanitizeElement,e,{tagName:o,allowedTags:be}),Ce&&e.hasChildNodes()&&!Et(e.firstElementChild)&&M(/<[/\w!]/g,e.innerHTML)&&M(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(Ce&&8===e.nodeType&&M(/<[/\w]/g,e.data))return ht(e),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(o))&&(!be[o]||Se[o])){if(!Se[o]&&St(o)){if(we.tagNameCheck instanceof RegExp&&M(we.tagNameCheck,o))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(o))return!1}if(Be&&!We[o]){const t=z(e)||e.parentNode,n=P(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=T(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,A(e))}}return ht(e),!0}return e instanceof s&&!function(e){let t=z(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=O(e.tagName),o=O(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(mt[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&rt[o]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!rt[o])&&!(t.namespaceURI===Ke&&!ot[o])&&!dt[n]&&(it[n]||!mt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!M(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,_([ce,pe,fe],e=>{t=D(t,e," ")}),e.textContent!==t&&(N(n.removed,{element:e.cloneNode()}),e.textContent=t)),At(ae.afterSanitizeElements,e,null),!1):(ht(e),!0)},wt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(ke&&!Ne[t]&&M(me,t));else if(Oe&&M(de,t));else if(ve.attributeCheck instanceof Function&&ve.attributeCheck(t,e));else if(!Ae[t]||Ne[t]){if(!(St(e)&&(we.tagNameCheck instanceof RegExp&&M(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&M(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t,e))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&M(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(qe[t]);else if(M(Te,D(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==x(n,"data:")||!Ve[e])if(Re&&!M(he,D(n,ge,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&R(e,ye)},Nt=function(e){At(ae.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,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:C(u);if(o.attrName=s,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,At(ae.uponSanitizeAttribute,e,o),p=o.attrValue,!He||"id"!==s&&"name"!==s||(gt(a,e),p="user-content-"+p),Ce&&M(/((--!?|])>)|<\/(style|title|textarea)/i,p)){gt(a,e);continue}if("attributename"===s&&R(p,"href")){gt(a,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){gt(a,e);continue}if(!De&&M(/\/>/i,p)){gt(a,e);continue}xe&&_([ce,pe,fe],e=>{p=D(p,e," ")});const f=ct(e.nodeName);if(wt(f,s,p)){if(F&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(f,s)){case"TrustedHTML":p=F.createHTML(p);break;case"TrustedScriptURL":p=F.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),bt(e)?ht(e):S(n.removed)}catch(t){gt(a,e)}}else gt(a,e)}At(ae.afterSanitizeAttributes,e,null)},vt=function e(t){let n=null;const o=Tt(t);for(At(ae.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)At(ae.uponSanitizeShadowNode,n,null),_t(n),Nt(n),n.content instanceof a&&e(n.content);At(ae.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&&!Et(e)){if("function"!=typeof e.toString)throw I("toString is not a function");if("string"!=typeof(e=e.toString()))throw I("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ft(t),n.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){const t=ct(e.nodeName);if(!be[t]||Se[t])throw I("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=yt("\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&&!xe&&!Le&&-1===e.indexOf("<"))return F&&Ue?F.createHTML(e):e;if(o=yt(e),!o)return Pe?null:Ue?Q:""}o&&Ie&&ht(o.firstChild);const u=Tt(Ge?e:o);for(;l=u.nextNode();)_t(l),Nt(l),l.content instanceof a&&vt(l.content);if(Ge)return e;if(Pe){if(ze)for(s=ne.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(Ae.shadowroot||Ae.shadowrootmode)&&(s=ie.call(r,s,!0)),s}let p=Le?o.outerHTML:o.innerHTML;return Le&&be["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&M(le,o.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+p),xe&&_([ce,pe,fe],e=>{p=D(p,e," ")}),F&&Ue?F.createHTML(p):p},n.setConfig=function(){ft(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||ft({});const o=ct(e),r=ct(t);return wt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&N(ae[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=w(ae[e],t);return-1===n?void 0:v(ae[e],n,1)[0]}return S(ae[e])},n.removeHooks=function(e){ae[e]=[]},n.removeAllHooks=function(){ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),window.wp.url;const pe=window.ReactJSXRuntime,fe=window.wp.primitives;fe.SVG,fe.Path,fe.SVG,fe.Path,fe.SVG,fe.Path;window.wp.hooks;const me="Mobile",de="Tablet",he="Desktop",ge={},ye=getComputedStyle(document.documentElement);ge[me]=ye.getPropertyValue("--wp--custom--breakpoint--sm")||"576px",ge[de]=ye.getPropertyValue("--wp--custom--breakpoint--md")||"768px",ge[he]=ye.getPropertyValue("--wp--custom--breakpoint--lg")||"1024px";const Te={};Object.keys(ge).map(e=>{Te[e]=e===me?"":`@media (min-width: ${ge[e]})`}),(0,o.__)("Mobile","content-blocks-builder"),Te[me],(0,o.__)("Tablet","content-blocks-builder"),Te[de],(0,o.__)("Desktop","content-blocks-builder"),Te[he],(0,i.registerPlugin)("cbb-copy-post",{render:()=>{const e=(0,r.useSelect)(e=>e(l.store).getCurrentPostId(),[]),{createSuccessNotice:t,createErrorNotice:n}=(0,r.useDispatch)(c.store),[i,u]=(0,s.useState)(!1);return(0,pe.jsx)(pe.Fragment,{children:(0,pe.jsx)(l.PluginPostStatusInfo,{children:(0,pe.jsx)(a.Button,{variant:"link",disabled:i,isBusy:i,onClick:()=>{u(!0),p()({path:`boldblocks/v1/copyPost/${e}`,method:"POST"}).then(e=>{if(e?.data?.notice){const{message:n,edit_url:o,edit_label:r}=e.data.notice;t(n,{actions:[{url:o,label:r}]})}}).catch(e=>{((e,t="log")=>{e&&"development"===window?.BBLOG?.environmentType&&(["log","info","warn","error","debug","dir","table"].includes(t)?console[t](e):console.log(e))})(e,"error"),n((0,o.__)("An error has occurred. Please try refreshing the page.","content-blocks-builder"))}).finally(()=>{u(!1)})},children:(0,o.__)("Copy to a new item","content-blocks-builder")})})})}})})(); |
|
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.components,l=window.wp.editor,c=window.wp.notices,s=window.wp.element,u=window.wp.apiFetch;var p=n.n(u);window.lodash,window.wp.blockEditor,n(252);const{entries:f,setPrototypeOf:m,isFrozen:d,getPrototypeOf:h,getOwnPropertyDescriptor:g}=Object;let{freeze:T,seal:y,create:b}=Object,{apply:A,construct:E}="undefined"!=typeof Reflect&&Reflect;T||(T=function(e){return e}),y||(y=function(e){return e}),A||(A=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)}),E||(E=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 _=z(Array.prototype.forEach),w=z(Array.prototype.lastIndexOf),S=z(Array.prototype.pop),N=z(Array.prototype.push),O=z(Array.prototype.splice),v=z(String.prototype.toLowerCase),D=z(String.prototype.toString),k=z(String.prototype.match),R=z(String.prototype.replace),C=z(String.prototype.indexOf),x=z(String.prototype.trim),L=z(Object.prototype.hasOwnProperty),I=z(RegExp.prototype.test),M=(P=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return E(P,t)});var P;function z(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 A(e,t,o)}}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;m&&m(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(d(t)||(t[o]=e),r=e)}e[r]=!0}return e}function F(e){for(let t=0;t<e.length;t++)L(e,t)||(e[t]=null);return e}function H(e){const t=b(null);for(const[n,o]of f(e))L(e,n)&&(Array.isArray(o)?t[n]=F(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=H(o):t[n]=o);return t}function B(e,t){for(;null!==e;){const n=g(e,t);if(n){if(n.get)return z(n.get);if("function"==typeof n.value)return z(n.value)}e=h(e)}return function(){return null}}const G=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"]),j=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"]),W=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"]),Y=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"]),V=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"]),X=T(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=T(["#text"]),$=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"]),K=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"]),Z=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"]),J=T(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=y(/<%[\w\W]*|[\w\W]*%>/gm),te=y(/\$\{[\w\W]*/gm),ne=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),oe=y(/^aria-[\-\w]+$/),re=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=y(/^(?:\w+script|data):/i),ae=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=y(/^html$/i),ce=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var se=Object.freeze({__proto__:null,ARIA_ATTR:oe,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:ce,DATA_ATTR:ne,DOCTYPE_NAME:le,ERB_EXPR:ee,IS_ALLOWED_URI:re,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:Q,TMPLIT_EXPR:te});const ue=function(){return"undefined"==typeof window?null:window};!function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue();const n=t=>e(t);if(n.version="3.3.3",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:h}=t,g=s.prototype,y=B(g,"cloneNode"),A=B(g,"remove"),E=B(g,"nextSibling"),P=B(g,"childNodes"),z=B(g,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let F,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=o,{importNode:ie}=r;let ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:pe,TMPLIT_EXPR:fe,DATA_ATTR:me,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=se;let{IS_ALLOWED_URI:ye}=se,be=null;const Ae=U({},[...G,...j,...W,...V,...q]);let Ee=null;const _e=U({},[...$,...K,...Z,...J]);let we=Object.seal(b(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}})),Se=null,Ne=null;const Oe=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,De=!0,ke=!1,Re=!0,Ce=!1,xe=!0,Le=!1,Ie=!1,Me=!1,Pe=!1,ze=!1,Ue=!1,Fe=!0,He=!1,Be=!0,Ge=!1,je={},We=null;const Ye=U({},["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=U({},["audio","video","img","source","image","track"]);let qe=null;const $e=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=U({},[Ke,Ze,Je],D);let ot=U({},["mi","mo","mn","ms","mtext"]),rt=U({},["annotation-xml"]);const it=U({},["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},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=H(e),at=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===at?D:v,be=L(e,"ALLOWED_TAGS")?U({},e.ALLOWED_TAGS,ct):Ae,Ee=L(e,"ALLOWED_ATTR")?U({},e.ALLOWED_ATTR,ct):_e,tt=L(e,"ALLOWED_NAMESPACES")?U({},e.ALLOWED_NAMESPACES,D):nt,qe=L(e,"ADD_URI_SAFE_ATTR")?U(H($e),e.ADD_URI_SAFE_ATTR,ct):$e,Ve=L(e,"ADD_DATA_URI_TAGS")?U(H(Xe),e.ADD_DATA_URI_TAGS,ct):Xe,We=L(e,"FORBID_CONTENTS")?U({},e.FORBID_CONTENTS,ct):Ye,Se=L(e,"FORBID_TAGS")?U({},e.FORBID_TAGS,ct):H({}),Ne=L(e,"FORBID_ATTR")?U({},e.FORBID_ATTR,ct):H({}),je=!!L(e,"USE_PROFILES")&&e.USE_PROFILES,ve=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,xe=!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,Me=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||re,Qe=e.NAMESPACE||Je,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(De=!1),ze&&(Pe=!0),je&&(be=U({},q),Ee=b(null),!0===je.html&&(U(be,G),U(Ee,$)),!0===je.svg&&(U(be,j),U(Ee,K),U(Ee,J)),!0===je.svgFilters&&(U(be,W),U(Ee,K),U(Ee,J)),!0===je.mathMl&&(U(be,V),U(Ee,Z),U(Ee,J))),L(e,"ADD_TAGS")||(Oe.tagCheck=null),L(e,"ADD_ATTR")||(Oe.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Oe.tagCheck=e.ADD_TAGS:(be===Ae&&(be=H(be)),U(be,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Oe.attributeCheck=e.ADD_ATTR:(Ee===_e&&(Ee=H(Ee)),U(Ee,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&U(qe,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(We===Ye&&(We=H(We)),U(We,e.FORBID_CONTENTS,ct)),e.ADD_FORBID_CONTENTS&&(We===Ye&&(We=H(We)),U(We,e.ADD_FORBID_CONTENTS,ct)),Be&&(be["#text"]=!0),Le&&U(be,["html","head","body"]),be.table&&(U(be,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');F=e.TRUSTED_TYPES_POLICY,Q=F.createHTML("")}else void 0===F&&(F=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}}(h,i)),null!==F&&"string"==typeof Q&&(Q=F.createHTML(""));T&&T(e),st=e}},mt=U({},[...j,...W,...Y]),dt=U({},[...V,...X]),ht=function(e){N(n.removed,{element:e});try{z(e).removeChild(e)}catch(t){A(e)}},gt=function(e,t){try{N(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){N(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){}},Tt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=k(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=F?F.createHTML(e):e;if(Qe===Je)try{t=(new d).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Qe===Je?oe.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},yt=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},bt=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)},At=function(e){return"function"==typeof c&&e instanceof c};function Et(e,t,o){_(e,e=>{e.call(n,t,o,st)})}const _t=function(e){let t=null;if(Et(ae.beforeSanitizeElements,e,null),bt(e))return ht(e),!0;const o=ct(e.nodeName);if(Et(ae.uponSanitizeElement,e,{tagName:o,allowedTags:be}),xe&&e.hasChildNodes()&&!At(e.firstElementChild)&&I(/<[/\w!]/g,e.innerHTML)&&I(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(xe&&8===e.nodeType&&I(/<[/\w]/g,e.data))return ht(e),!0;if(!(Oe.tagCheck instanceof Function&&Oe.tagCheck(o))&&(!be[o]||Se[o])){if(!Se[o]&&St(o)){if(we.tagNameCheck instanceof RegExp&&I(we.tagNameCheck,o))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(o))return!1}if(Be&&!We[o]){const t=z(e)||e.parentNode,n=P(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=y(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,E(e))}}return ht(e),!0}return e instanceof s&&!function(e){let t=z(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=v(e.tagName),o=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(mt[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&rt[o]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!rt[o])&&!(t.namespaceURI===Ke&&!ot[o])&&!dt[n]&&(it[n]||!mt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!I(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,_([ce,pe,fe],e=>{t=R(t,e," ")}),e.textContent!==t&&(N(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(ae.afterSanitizeElements,e,null),!1):(ht(e),!0)},wt=function(e,t,n){if(Ne[t])return!1;if(Fe&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(De&&!Ne[t]&&I(me,t));else if(ve&&I(de,t));else if(Oe.attributeCheck instanceof Function&&Oe.attributeCheck(t,e));else if(!Ee[t]||Ne[t]){if(!(St(e)&&(we.tagNameCheck instanceof RegExp&&I(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&I(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t,e))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&I(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(qe[t]);else if(I(ye,R(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(n,"data:")||!Ve[e])if(ke&&!I(he,R(n,ge,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&k(e,Te)},Nt=function(e){Et(ae.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(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:x(u);if(o.attrName=s,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,Et(ae.uponSanitizeAttribute,e,o),p=o.attrValue,!He||"id"!==s&&"name"!==s||(gt(a,e),p="user-content-"+p),xe&&I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)){gt(a,e);continue}if("attributename"===s&&k(p,"href")){gt(a,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){gt(a,e);continue}if(!Re&&I(/\/>/i,p)){gt(a,e);continue}Ce&&_([ce,pe,fe],e=>{p=R(p,e," ")});const f=ct(e.nodeName);if(wt(f,s,p)){if(F&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(f,s)){case"TrustedHTML":p=F.createHTML(p);break;case"TrustedScriptURL":p=F.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),bt(e)?ht(e):S(n.removed)}catch(t){gt(a,e)}}else gt(a,e)}Et(ae.afterSanitizeAttributes,e,null)},Ot=function e(t){let n=null;const o=yt(t);for(Et(ae.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Et(ae.uponSanitizeShadowNode,n,null),_t(n),Nt(n),n.content instanceof a&&e(n.content);Et(ae.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&&!At(e)){if("function"!=typeof e.toString)throw M("toString is not a function");if("string"!=typeof(e=e.toString()))throw M("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||ft(t),n.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){const t=ct(e.nodeName);if(!be[t]||Se[t])throw M("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=Tt("\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&&!Ce&&!Le&&-1===e.indexOf("<"))return F&&Ue?F.createHTML(e):e;if(o=Tt(e),!o)return Pe?null:Ue?Q:""}o&&Me&&ht(o.firstChild);const u=yt(Ge?e:o);for(;l=u.nextNode();)_t(l),Nt(l),l.content instanceof a&&Ot(l.content);if(Ge)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=ie.call(r,s,!0)),s}let p=Le?o.outerHTML:o.innerHTML;return Le&&be["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&I(le,o.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+p),Ce&&_([ce,pe,fe],e=>{p=R(p,e," ")}),F&&Ue?F.createHTML(p):p},n.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){st=null,Ie=!1},n.isValidAttribute=function(e,t,n){st||ft({});const o=ct(e),r=ct(t);return wt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&N(ae[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=w(ae[e],t);return-1===n?void 0:O(ae[e],n,1)[0]}return S(ae[e])},n.removeHooks=function(e){ae[e]=[]},n.removeAllHooks=function(){ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),window.wp.url;const pe=window.ReactJSXRuntime,fe=window.wp.primitives;fe.SVG,fe.Path,fe.SVG,fe.Path,fe.SVG,fe.Path;window.wp.hooks;const me="Mobile",de="Tablet",he="Desktop",ge={},Te=getComputedStyle(document.documentElement);ge[me]=Te.getPropertyValue("--wp--custom--breakpoint--sm")||"576px",ge[de]=Te.getPropertyValue("--wp--custom--breakpoint--md")||"768px",ge[he]=Te.getPropertyValue("--wp--custom--breakpoint--lg")||"1024px";const ye={};Object.keys(ge).map(e=>{ye[e]=e===me?"":`@media (min-width: ${ge[e]})`}),(0,o.__)("Mobile","content-blocks-builder"),ye[me],(0,o.__)("Tablet","content-blocks-builder"),ye[de],(0,o.__)("Desktop","content-blocks-builder"),ye[he],(0,i.registerPlugin)("cbb-copy-post",{render:()=>{const{postId:e,postType:t,postTypelabel:n}=(0,r.useSelect)(e=>({postId:e(l.store).getCurrentPostId(),postType:e(l.store).getCurrentPostType(),postTypelabel:e(l.store).getPostTypeLabel().toLowerCase()}),[]),{createSuccessNotice:i,createErrorNotice:u}=(0,r.useDispatch)(c.store),[f,m]=(0,s.useState)(!1),d=CBB_COPY_POST?.postTypes||[];return e&&t&&d.includes(t)?(0,pe.jsx)(pe.Fragment,{children:(0,pe.jsx)(l.PluginPostStatusInfo,{children:(0,pe.jsx)(a.Button,{variant:"link",disabled:f,isBusy:f,onClick:()=>{m(!0),p()({path:`boldblocks/v1/copyPost/${e}`,method:"POST"}).then(e=>{if(e?.data?.notice){const{message:t,edit_url:n,edit_label:o}=e.data.notice;i(t,{actions:[{url:n,label:o}]})}}).catch(e=>{((e,t="log")=>{e&&"development"===window?.BBLOG?.environmentType&&(["log","info","warn","error","debug","dir","table"].includes(t)?console[t](e):console.log(e))})(e,"error"),u((0,o.__)("An error has occurred. Please try refreshing the page.","content-blocks-builder"))}).finally(()=>{m(!1)})},children:(0,o.sprintf)((0,o.__)("Copy to a new %s","content-blocks-builder"),n)})})}):null}})})(); |