Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/elementor-pro/assets/js/gutenberg-woocommerce-notice.min.js
Назад
/*! elementor-pro - v3.25.0 - 13-11-2024 */ (()=>{"use strict";var t={2470:t=>{t.exports=wp.i18n},8120:(t,e,r)=>{var n=r(1483),o=r(8761),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},2293:(t,e,r)=>{var n=r(1704),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},6651:(t,e,r)=>{var n=r(5599),o=r(3392),i=r(6960),createMethod=function(t){return function(e,r,c){var a=n(e),s=i(a);if(0===s)return!t&&-1;var u,p=o(c,s);if(t&&r!=r){for(;s>p;)if((u=a[p++])!=u)return!0}else for(;s>p;p++)if((t||p in a)&&a[p]===r)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},9273:(t,e,r)=>{var n=r(382),o=r(4914),i=TypeError,c=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!c(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1278:(t,e,r)=>{var n=r(4762),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},6726:(t,e,r)=>{var n=r(5755),o=r(9497),i=r(4961),c=r(5835);t.exports=function(t,e,r){for(var a=o(e),s=c.f,u=i.f,p=0;p<a.length;p++){var f=a[p];n(t,f)||r&&n(r,f)||s(t,f,u(e,f))}}},9037:(t,e,r)=>{var n=r(382),o=r(5835),i=r(7738);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},7738:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7914:(t,e,r)=>{var n=r(1483),o=r(5835),i=r(169),c=r(2095);t.exports=function(t,e,r,a){a||(a={});var s=a.enumerable,u=void 0!==a.name?a.name:e;if(n(r)&&i(r,u,a),a.global)s?t[e]=r:c(e,r);else{try{a.unsafe?t[e]&&(s=!0):delete t[e]}catch(t){}s?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},2095:(t,e,r)=>{var n=r(5578),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},382:(t,e,r)=>{var n=r(8473);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3145:(t,e,r)=>{var n=r(5578),o=r(1704),i=n.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},1091:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},4741:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9461:(t,e,r)=>{var n=r(5578).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},6477:(t,e,r)=>{var n,o,i=r(5578),c=r(9461),a=i.process,s=i.Deno,u=a&&a.versions||s&&s.version,p=u&&u.v8;p&&(o=(n=p.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},8612:(t,e,r)=>{var n=r(5578),o=r(4961).f,i=r(9037),c=r(7914),a=r(2095),s=r(6726),u=r(8730);t.exports=function(t,e){var r,p,f,l,v,h=t.target,m=t.global,y=t.stat;if(r=m?n:y?n[h]||a(h,{}):n[h]&&n[h].prototype)for(p in e){if(l=e[p],f=t.dontCallGetSet?(v=o(r,p))&&v.value:r[p],!u(m?p:h+(y?".":"#")+p,t.forced)&&void 0!==f){if(typeof l==typeof f)continue;s(l,f)}(t.sham||f&&f.sham)&&i(l,"sham",!0),c(r,p,l,t)}}},8473:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},274:(t,e,r)=>{var n=r(8473);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},1807:(t,e,r)=>{var n=r(274),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},2048:(t,e,r)=>{var n=r(382),o=r(5755),i=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),s=a&&"something"===function something(){}.name,u=a&&(!n||n&&c(i,"name").configurable);t.exports={EXISTS:a,PROPER:s,CONFIGURABLE:u}},4762:(t,e,r)=>{var n=r(274),o=Function.prototype,i=o.call,c=n&&o.bind.bind(i,i);t.exports=n?c:function(t){return function(){return i.apply(t,arguments)}}},1409:(t,e,r)=>{var n=r(5578),o=r(1483);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},2564:(t,e,r)=>{var n=r(8120),o=r(5983);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},5578:function(t,e,r){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r.g&&r.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5755:(t,e,r)=>{var n=r(4762),o=r(2347),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,e){return i(o(t),e)}},1507:t=>{t.exports={}},1799:(t,e,r)=>{var n=r(382),o=r(8473),i=r(3145);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},2121:(t,e,r)=>{var n=r(4762),o=r(8473),i=r(1278),c=Object,a=n("".split);t.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):c(t)}:c},7268:(t,e,r)=>{var n=r(4762),o=r(1483),i=r(1831),c=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return c(t)}),t.exports=i.inspectSource},4483:(t,e,r)=>{var n,o,i,c=r(4644),a=r(5578),s=r(1704),u=r(9037),p=r(5755),f=r(1831),l=r(5409),v=r(1507),h="Object already initialized",m=a.TypeError,y=a.WeakMap;if(c||f.state){var g=f.state||(f.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw new m(h);return e.facade=t,g.set(t,e),e},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var b=l("state");v[b]=!0,n=function(t,e){if(p(t,b))throw new m(h);return e.facade=t,u(t,b,e),e},o=function(t){return p(t,b)?t[b]:{}},i=function(t){return p(t,b)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}}}},4914:(t,e,r)=>{var n=r(1278);t.exports=Array.isArray||function isArray(t){return"Array"===n(t)}},1483:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},8730:(t,e,r)=>{var n=r(8473),o=r(1483),i=/#|\.prototype\./,isForced=function(t,e){var r=a[c(t)];return r===u||r!==s&&(o(e)?n(e):!!e)},c=isForced.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=isForced.data={},s=isForced.NATIVE="N",u=isForced.POLYFILL="P";t.exports=isForced},5983:t=>{t.exports=function(t){return null==t}},1704:(t,e,r)=>{var n=r(1483);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},9557:t=>{t.exports=!1},1423:(t,e,r)=>{var n=r(1409),o=r(1483),i=r(4815),c=r(5022),a=Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,a(t))}},6960:(t,e,r)=>{var n=r(8324);t.exports=function(t){return n(t.length)}},169:(t,e,r)=>{var n=r(4762),o=r(8473),i=r(1483),c=r(5755),a=r(382),s=r(2048).CONFIGURABLE,u=r(7268),p=r(4483),f=p.enforce,l=p.get,v=String,h=Object.defineProperty,m=n("".slice),y=n("".replace),g=n([].join),b=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),d=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===m(v(e),0,7)&&(e="["+y(v(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!c(t,"name")||s&&t.name!==e)&&(a?h(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&c(r,"arity")&&t.length!==r.arity&&h(t,"length",{value:r.arity});try{r&&c(r,"constructor")&&r.constructor?a&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=f(t);return c(n,"source")||(n.source=g(d,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function toString(){return i(this)&&l(this).source||u(this)}),"toString")},1703:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(t){var n=+t;return(n>0?r:e)(n)}},5835:(t,e,r)=>{var n=r(382),o=r(1799),i=r(3896),c=r(2293),a=r(3815),s=TypeError,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",v="writable";e.f=n?i?function defineProperty(t,e,r){if(c(t),e=a(e),c(r),"function"==typeof t&&"prototype"===e&&"value"in r&&v in r&&!r[v]){var n=p(t,e);n&&n[v]&&(t[e]=r.value,r={configurable:l in r?r[l]:n[l],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function defineProperty(t,e,r){if(c(t),e=a(e),c(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new s("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},4961:(t,e,r)=>{var n=r(382),o=r(1807),i=r(7611),c=r(7738),a=r(5599),s=r(3815),u=r(5755),p=r(1799),f=Object.getOwnPropertyDescriptor;e.f=n?f:function getOwnPropertyDescriptor(t,e){if(t=a(t),e=s(e),p)try{return f(t,e)}catch(t){}if(u(t,e))return c(!o(i.f,t,e),t[e])}},2278:(t,e,r)=>{var n=r(6742),o=r(4741).concat("length","prototype");e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return n(t,o)}},4347:(t,e)=>{e.f=Object.getOwnPropertySymbols},4815:(t,e,r)=>{var n=r(4762);t.exports=n({}.isPrototypeOf)},6742:(t,e,r)=>{var n=r(4762),o=r(5755),i=r(5599),c=r(6651).indexOf,a=r(1507),s=n([].push);t.exports=function(t,e){var r,n=i(t),u=0,p=[];for(r in n)!o(a,r)&&o(n,r)&&s(p,r);for(;e.length>u;)o(n,r=e[u++])&&(~c(p,r)||s(p,r));return p}},7611:(t,e)=>{var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function propertyIsEnumerable(t){var e=n(this,t);return!!e&&e.enumerable}:r},348:(t,e,r)=>{var n=r(1807),o=r(1483),i=r(1704),c=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&o(r=t.toString)&&!i(a=n(r,t)))return a;if(o(r=t.valueOf)&&!i(a=n(r,t)))return a;if("string"!==e&&o(r=t.toString)&&!i(a=n(r,t)))return a;throw new c("Can't convert object to primitive value")}},9497:(t,e,r)=>{var n=r(1409),o=r(4762),i=r(2278),c=r(4347),a=r(2293),s=o([].concat);t.exports=n("Reflect","ownKeys")||function ownKeys(t){var e=i.f(a(t)),r=c.f;return r?s(e,r(t)):e}},3312:(t,e,r)=>{var n=r(5983),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},5409:(t,e,r)=>{var n=r(7255),o=r(1866),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},1831:(t,e,r)=>{var n=r(9557),o=r(5578),i=r(2095),c="__core-js_shared__",a=t.exports=o[c]||i(c,{});(a.versions||(a.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7255:(t,e,r)=>{var n=r(1831);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},6029:(t,e,r)=>{var n=r(6477),o=r(8473),i=r(5578).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3392:(t,e,r)=>{var n=r(3005),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5599:(t,e,r)=>{var n=r(2121),o=r(3312);t.exports=function(t){return n(o(t))}},3005:(t,e,r)=>{var n=r(1703);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8324:(t,e,r)=>{var n=r(3005),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},2347:(t,e,r)=>{var n=r(3312),o=Object;t.exports=function(t){return o(n(t))}},2355:(t,e,r)=>{var n=r(1807),o=r(1704),i=r(1423),c=r(2564),a=r(348),s=r(1),u=TypeError,p=s("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,s=c(t,p);if(s){if(void 0===e&&(e="default"),r=n(s,t,e),!o(r)||i(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},3815:(t,e,r)=>{var n=r(2355),o=r(1423);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},8761:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1866:(t,e,r)=>{var n=r(4762),o=0,i=Math.random(),c=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+i,36)}},5022:(t,e,r)=>{var n=r(6029);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3896:(t,e,r)=>{var n=r(382),o=r(8473);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4644:(t,e,r)=>{var n=r(5578),o=r(1483),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},1:(t,e,r)=>{var n=r(5578),o=r(7255),i=r(5755),c=r(1866),a=r(6029),s=r(5022),u=n.Symbol,p=o("wks"),f=s?u.for||u:u&&u.withoutSetter||c;t.exports=function(t){return i(p,t)||(p[t]=a&&i(u,t)?u[t]:f("Symbol."+t)),p[t]}},5724:(t,e,r)=>{var n=r(8612),o=r(2347),i=r(6960),c=r(9273),a=r(1091);n({target:"Array",proto:!0,arity:1,forced:r(8473)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var e=o(this),r=i(e),n=arguments.length;a(r+n);for(var s=0;s<n;s++)e[r]=arguments[s],r++;return c(e,r),r}})}},e={};function __webpack_require__(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,__webpack_require__),o.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var r=__webpack_require__(2470).__;__webpack_require__(5724),function(t){let e,n,o,i=[];const c={handleGutenbergEditorNotices(){wp.data.subscribe((async()=>{const t=wp.data.select("core/block-editor").getBlocks();i=this.getBlockNames(t),1===t.length&&(i=this.maybeRemoveEmptyDefaultBlockFromBlockNames(t)),i.length!==e&&await this.maybeCreateNotice()}))},getPostId:()=>wp.data.select("core/editor").getCurrentPostId(),async maybeCreateNotice(){if(e=i.length||0,null===this.getPostId())return;const t=["woocommerce/cart","woocommerce/classic-shortcode"];if(!(void 0!==Object.keys(i).find((e=>t.includes(i[e])))))return o&&this.setCartNoticeDismissalState(!1),void this.removeNotice();await this.shouldHideNotice()?this.removeNotice():this.createNotice()},createNotice(){const t=r("This page uses the WooCommerce Cart Block. Before editing the page with Elementor and using the Elementor Cart widget, please check out this article.","elementor-pro"),e=r("Read More","elementor-pro");wp.data.dispatch("core/notices").createNotice("warning",t,{id:"elementor-woocommerce-editor-block-notice",isDismissible:!0,actions:[{label:e,onClick:()=>window.open("https://go.elementor.com/wp-dash-woocommerce-cart-block/","_blank")}],onDismiss:()=>this.setCartNoticeDismissalState(!0)})},removeNotice(){wp.data.dispatch("core/notices").removeNotice("elementor-woocommerce-editor-block-notice")},getCartNoticeDismissalState(){return fetch(`${elementorCommon.config.urls.rest}elementor-pro/v1/get-notice-dismissed/${this.getPostId()}`,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":elementorWebCliConfig.nonce}}).then((t=>t instanceof Response&&(!t.ok||400<=t.status)?{}:t.json())).catch((()=>({})))},setCartNoticeDismissalState(t){return fetch(`${elementorCommon.config.urls.rest}elementor-pro/v1/set-notice-dismissed`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":elementorWebCliConfig.nonce},body:JSON.stringify({post_id:this.getPostId(),is_custom_wc_cart_notice_dismissed:t})}).then((e=>e instanceof Response?!e.ok||400<=e.status?{}:(o=!0,n=t,e.json()):e.json())).catch((()=>({})))},async shouldHideNotice(){if(void 0!==n)return n;const t=await this.getCartNoticeDismissalState(this.getPostId());return t.hasOwnProperty("is_custom_wc_cart_notice_dismissed")&&(o=!0),n="true"===t.is_custom_wc_cart_notice_dismissed||!1,n},getBlockNames(t,e=[]){return i=e,Object.keys(t).forEach((e=>{const r=t[e];i.push(r.name);0!==(r.innerBlocks?.length||0)&&this.getBlockNames(r.innerBlocks,i)})),i},maybeRemoveEmptyDefaultBlockFromBlockNames:t=>1===t.length&&"core/paragraph"===t[0].name&&""===t[0].attributes.content?[]:i,init(){this.handleGutenbergEditorNotices()}};t((function(){c.init()}))}(jQuery)})();
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка