balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

editorplus.min.js (12411B)


      1 (()=>{var t={135:(t,e,r)=>{t.exports=r(248)},248:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:d,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",y={};function v(){}function m(){}function w(){}var g={};g[i]=function(){return this};var x=Object.getPrototypeOf,b=x&&x(x(j([])));b&&b!==r&&n.call(b,i)&&(g=b);var E=w.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return m.prototype=E.constructor=w,w.constructor=m,m.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},L(_.prototype),_.prototype[a]=function(){return this},t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),u(E,c,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(135),e=r.n(t);const n=wp.data;function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t){var e,r=!1;if(!(t instanceof CSSRule))return!1;var n,o=["https://dl.airtable.com"],a=i(null!==(e=t.cssText.match(/[(http(s)?)://(www.)?a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g))&&void 0!==e?e:[]);try{var c=function(){var t=n.value;try{var e=new URL(t);if(!o.includes(e.origin))return r=!0,"break"}catch(e){var i=["https://","http://",".com"].some((function(e){return-1!==t.indexOf(e)})),a=-1!==t.indexOf(o[0]);if(i&&!a)return r=!0,"break"}};for(a.s();!(n=a.n()).done;){if("break"===c())break}}catch(t){a.e(t)}finally{a.f()}return r}function u(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(t=null===(e=window.wp.data.select("core/editor").getEditedPostAttribute("meta"))||void 0===e?void 0:e.extendify_custom_stylesheet)&&void 0!==t?t:"";if("string"==typeof r){r=r.replace(/(.eplus_styles)/g,"");var n=document.querySelector("#extendify-root"),o="extendify-custom-stylesheet";if(document.getElementById(o))document.getElementById(o).innerHTML=r;else{var i=document.createElement("style");i.id=o,i.type="text/css",i.appendChild(document.createTextNode(r)),n.appendChild(i)}}}function l(t,e){var r,n,o="",a=function(t){return e.some((function(e){return t.startsWith(e)}))},u=i(null!==(r=null==t?void 0:t.cssRules)&&void 0!==r?r:[]);try{for(u.s();!(n=u.n()).done;){var l=n.value;if(l instanceof CSSMediaRule){var s;if(c(l))continue;for(var f=null!==(s=null==l?void 0:l.cssRules)&&void 0!==s?s:[],d=[],h=0,p=Object.keys(f);h<p.length;h++){var y=p[h];a((y in f?f[y]:{}).selectorText)||d.push(y)}for(var v=0,m=d;v<m.length;v++){var w=m[v];l.deleteRule(w)}o+=l.cssText}if(l instanceof CSSStyleRule){if(c(l))continue;o+=a(l.selectorText)?l.cssText:""}}}catch(t){u.e(t)}finally{u.f()}return o}window._wpLoadBlockEditor&&window.addEventListener("extendify-sdk::template-inserted",(function(t){var e,r,o,i,a=t.detail.template,c="editorplus-template.php";if(null!=a&&null!==(e=a.fields)&&void 0!==e&&null!==(r=e.instructions)&&void 0!==r&&r.includes("enable_page_template")){var u=null!==(o=null===(i=(0,n.select)("core/editor").getEditorSettings())||void 0===i?void 0:i.availableTemplates)&&void 0!==o?o:{};Object.keys(u).includes(c)&&(0,n.dispatch)("core/editor").editPost({template:c})}})),window._wpLoadBlockEditor&&window.addEventListener("extendify-sdk::template-inserted",function(){var t,r=(t=e().mark((function t(r){var o,i,a,c,s,f,d,h,p,y,v,m;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=r.detail.template,c=null!==(o=null==a||null===(i=a.fields)||void 0===i?void 0:i.stylesheet)&&void 0!==o?o:""){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,fetch(c);case 7:return t.next=9,t.sent.text();case 9:return d=t.sent,h=null!==(s=null===(f=(0,n.select)("core/editor").getEditedPostAttribute("meta"))||void 0===f?void 0:f.extendify_custom_stylesheet)&&void 0!==s?s:"",p=document.createElement("style"),y="extendify-stylesheet",p.id=y,p.type="text/css",p.appendChild(document.createTextNode(d)),document.querySelector("#extendify-root").appendChild(p),(v=document.getElementById(y)).sheet.disable=!0,m=l(null==v?void 0:v.sheet,[".extendify-",".eplus_styles",".eplus-",'[class*="extendify-"]','[class*="extendify"]']),m+=h,v.parentNode.removeChild(v),u(m),t.next=25,(0,n.dispatch)("core/editor").editPost({meta:{extendify_custom_stylesheet:m}});case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(4),console.error(t.t0);case 30:case"end":return t.stop()}}),t,null,[[4,27]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))});return function(t){return r.apply(this,arguments)}}()),window._wpLoadBlockEditor&&window.wp.domReady((function(){setTimeout((function(){return u()}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){var t="editorplus-template.php"===window.wp.data.select("core/editor").getEditedPostAttribute("template"),e=document.querySelector(".edit-post-visual-editor__post-title-wrapper"),r=document.querySelector(".editor-styles-wrapper");e&&r&&(t?(Promise.resolve().then((function(){return e.style.display="none"})),r.style.paddingTop="0",r.style.backgroundColor="#ffffff"):(e.style.removeProperty("display"),r.style.removeProperty("padding-top"),r.style.removeProperty("background-color")))}))})()})();