PageSourceSearch

https://ntfy.cz/wp-content/themes/ntfy/dist/4270-d57ddb1702504125ae45.js

js ntfy.cz collected 2026-10-06 13:22:35 UTC 14,177 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkntfy=self.webpackChunkntfy||[]).push([[4270],{4270:function(n,t,r){r.r(t),r.d(t,{AddToCart:function(){return f},add_to_cart:function(){return a}}),r(4486);var e=r(9335),u=r(9780),o=r(4968),i=r(9766);function c(n,t){for(var r=0;r<t.length;r++){var e=t[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}var f=function(){function n(t){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.notify=new u.Z,this.form=t,this.validateStatus=!0,this.data=this.getDefaultData(),this.form.addEventListener("submit",this.callbackSubmit.bind(this)),this.form.addEventListener("form_refresh",this.callbackRefresh.bind(this)),document.querySelector("#modal-add-to-cart a").addEventListener("click",(function(n){(0,o.Z)({event:"przejdz do koszyka"})})),this.addAnother=document.getElementById("add-another"),this.addAnother.addEventListener("click",this.callbackAddAnother.bind(this))}var t,r;return t=n,(r=[{key:"getDefaultData",value:function(){return{action:"ntfy_add_to_cart",product_id:parseInt(this.form.querySelector('[name="product_id"]').value),rows:[]}}},{key:"callbackAddAnother",value:function(n){n.preventDefault(),this.appendRow();var t=this.form.querySelectorAll(".card-form__row").length;e.default.scroll(null,{offset:100}).scrollTo(this.form.querySelectorAll(".card-form__row")[t-1])}},{key:"appendRow",value:function(){var n=(0,i.$)("#template-form-row").innerHTML;(0,i.R3)("#card-rows",n),(0,i.$$)("#card-rows [data-component]:not(.component-active)").forEach(window.ntfy.addComponent),this.form.dispatchEvent(new CustomEvent("form_refresh"))}},{key:"callbackRefresh",value:function(){(0,i.$)("#card-rows").childElementCount>1?this.form.classList.add("multiply"):this.form.classList.remove("multiply")}},{key:"clearForm",value:function(){(0,i.$$)(".card-form__row",this.form).forEach((function(n){n.dispatchEvent(new CustomEvent("row_remove"))})),this.appendRow()}},{key:"callbackAddToCartAjax",value:function(n){if(n.success){this.clearForm(),this.data=this.getDefaultData(),document.querySelector("#ntfy-cart").classList.add("not-empty"),document.querySelector("#ntfy-cart .count").innerHTML=n.data.count;var t=document.querySelector("#modal-add-to-cart");e.default.modal(t).show()}else this.notify.attach().then((function(){e.default.notification({message:n.data[0].message,status:"danger",pos:"top-right",timeout:3e3})}))}},{key:"callbackValidate",value:function(n,t,r){n||(this.validateStatus=!1),(0,o.Z)({event:"eec.addToCart",ecommerce:{currencyCode:"PLN",add:{products:[{name:"Karta podarunkowa",id:_ntfy_gift_card_.product_id,price:t.amount_value.toFixed(2),quantity:r}]}}}),this.data.rows.push(t)}},{key:"callbackSubmit",value:function(n){n.preventDefault();var t=this,r=(0,i.$$)(".card-form__row",this.form);this.validateStatus=!0,this.data.rows=[],r.forEach((function(n){n.dispatchEvent(new CustomEvent("row_validate",{detail:{callbackValidate:t.callbackValidate.bind(t)}}))})),this.validateStatus&&jQuery.post("/wp-admin/admin-ajax.php",this.data,this.callbackAddToCartAjax.bind(this))}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),n}();function a(n){new f(n)}t.default=a},4968:function(n,t,r){r.d(t,{Z:function(){return o}});var e=r(2353),u=r.n(e);function o(n){console.log(n),u()(window.dataLayer)||window.dataLayer.push(n)}},6693:function(n,t,r){r.d(t,{Lj:function(){return u},B$:function(){return o},uV:function(){return i},aT:function(){return c}});var e=r(2014);function u(n,t,r){if((0,e.Kn)(t))for(const r in t)u(n,r,t[r]);else{if((0,e.o8)(r))return(0,e.zs)(n)?.getAttribute(t);for(const o of(0,e.as)(n))(0,e.mf)(r)&&(r=r.call(o,u(o,t))),null===r?i(o,t):o.setAttribute(t,r)}}function o(n,t){return(0,e.as)(n).some((n=>n.hasAttribute(t)))}function i(n,t){const r=(0,e.as)(n);for(const n of t.split(" "))for(const t of r)t.removeAttribute(n)}function c(n,t){for(const r of[t,`data-${t}`])if(o(n,r))return u(n,r)}},9766:function(n,t,r){r.d(t,{Cd:function(){return c},YR:function(){return f},cS:function(){return a},dy:function(){return s},Ce:function(){return l},R3:function(){return d},bb:function(){return h},e4:function(){return m},Od:function(){return b},Lm:function(){return y},nv:function(){return v},Wg:function(){return w},Dx:function(){return E},nn:function(){return $},$:function(){return L},$$:function(){return _}});var e=r(1010),u=r(1875),o=r(3852),i=r(2014);function c(n){"loading"===document.readyState?(0,e.IH)(document,"DOMContentLoaded",n):n()}function f(n,t){return n?.tagName?.toLowerCase()===t.toLowerCase()}function a(n){return(n=L(n)).innerHTML="",n}function s(n,t){return(0,i.o8)(t)?L(n).innerHTML:d(a(n),t)}const l=p("prepend"),d=p("append"),h=p("before"),m=p("after");function p(n){return function(t,r){const e=(0,i.as)((0,i.HD)(r)?E(r):r);return L(t)?.[n](...e),C(e)}}
1function b(n){(0,i.as)(n).forEach((n=>n.remove()))}function y(n,t){for(t=(0,i.zs)(h(n,t));t.firstChild;)t=t.firstChild;return d(t,n),t}function v(n,t){return(0,i.as)((0,i.as)(n).map((n=>n.hasChildNodes()?y((0,i.as)(n.childNodes),t):d(n,t))))}function w(n){(0,i.as)(n).map(u.qm).filter(((n,t,r)=>r.indexOf(n)===t)).forEach((n=>n.replaceWith(...n.childNodes)))}const g=/^\s*<(\w+|!)[^>]*>/,k=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function E(n){const t=k.exec(n);if(t)return document.createElement(t[1]);const r=document.createElement("div");return g.test(n)?r.insertAdjacentHTML("beforeend",n.trim()):r.textContent=n,C(r.childNodes)}function C(n){return n.length>1?n:n[0]}function $(n,t){if((0,i.kK)(n))for(t(n),n=n.firstElementChild;n;){const r=n.nextElementSibling;$(n,t),n=r}}function L(n,t){return q(n)?(0,i.zs)(E(n)):(0,o.sE)(n,t)}function _(n,t){return q(n)?(0,i.as)(E(n)):(0,o.Oq)(n,t)}function q(n){return(0,i.HD)(n)&&(0,i.Ny)(n.trim(),"<")}},1010:function(n,t,r){r.d(t,{on:function(){return i},S1:function(){return c},IH:function(){return f},X$:function(){return a},yM:function(){return s},RD:function(){return m},T:function(){return p},sT:function(){return b}});var e=r(3852),u=r(1875),o=r(2014);function i(...n){let[t,r,i,f,a=!1]=l(n);f.length>1&&(f=function(n){return t=>(0,o.kJ)(t.detail)?n(t,...t.detail):n(t)}(f)),a?.self&&(f=function(n){return function(t){if(t.target===t.currentTarget||t.target===t.current)return n.call(null,t)}}(f)),i&&(f=function(n,t){return r=>{const o=">"===n[0]?(0,e.Oq)(n,r.currentTarget).reverse().filter((n=>(0,u.uh)(r.target,n)))[0]:(0,u.oq)(r.target,n);o&&(r.current=o,t.call(this,r))}}(i,f));for(const n of r)for(const r of t)r.addEventListener(n,f,a);return()=>c(t,r,f,a)}function c(...n){let[t,r,,e,u=!1]=l(n);for(const n of r)for(const r of t)r.removeEventListener(n,e,u)}function f(...n){const[t,r,e,u,o=!1,c]=l(n),f=i(t,r,e,(n=>{const t=!c||c(n);t&&(f(),u(n,t))}),o);return f}function a(n,t,r){return m(n).every((n=>n.dispatchEvent(s(t,!0,!0,r))))}function s(n,t=!0,r=!1,e){return(0,o.HD)(n)&&(n=new CustomEvent(n,{bubbles:t,cancelable:r,detail:e})),n}function l(n){return n[0]=m(n[0]),(0,o.HD)(n[1])&&(n[1]=n[1].split(" ")),(0,o.mf)(n[2])&&n.splice(2,0,!1),n}function d(n){return n&&"addEventListener"in n}function h(n){return d(n)?n:(0,o.zs)(n)}function m(n){return(0,o.kJ)(n)?n.map(h).filter(Boolean):(0,o.HD)(n)?(0,e.Oq)(n):d(n)?[n]:(0,o.as)(n)}function p(n){return"touch"===n.pointerType||!!n.touches}function b(n){const{clientX:t,clientY:r}=n.touches?.[0]||n.changedTouches?.[0]||n;return{x:t,y:r}}},1875:function(n,t,r){r.d(t,{OC:function(){return o},pn:function(){return i},di:function(){return c},u7:function(){return f},vb:function(){return a},EB:function(){return s},qm:function(){return l},hX:function(){return d},wB:function(){return h},oq:function(){return m},uh:function(){return p},wV:function(){return b},pI:function(){return y},Kz:function(){return v}});var e=r(2014);const u={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function o(n){return(0,e.as)(n).some((n=>u[n.tagName.toLowerCase()]))}function i(n){return(0,e.as)(n).some((n=>n.offsetWidth||n.offsetHeight||n.getClientRects().length))}const c="input,select,textarea,button";function f(n){return(0,e.as)(n).some((n=>h(n,c)))}const a=`${c},a[href],[tabindex]`;function s(n){return h(n,a)}function l(n){return(0,e.zs)(n)?.parentElement}function d(n,t){return(0,e.as)(n).filter((n=>h(n,t)))}function h(n,t){return(0,e.as)(n).some((n=>n.matches(t)))}function m(n,t){return(0,e.kK)(n)?n.closest((0,e.Ny)(t,">")?t.slice(1):t):(0,e.as)(n).map((n=>m(n,t))).filter(Boolean)}function p(n,t){return(0,e.HD)(t)?!!m(n,t):(0,e.zs)(t).contains((0,e.zs)(n))}function b(n,t){const r=[];for(;n=l(n);)t&&!h(n,t)||r.push(n);return r}function y(n,t){const r=(n=(0,e.zs)(n))?(0,e.as)(n.children):[];return t?d(r,t):r}function v(n,t){return t?(0,e.as)(n).indexOf((0,e.zs)(t)):y(l(n)).indexOf(n)}},2014:function(n,t,r){r.d(t,{RI:function(){return o},rs:function(){return c},_A:function(){return a},Ps:function(){return s},Ny:function(){return d},pn:function(){return h},q9:function(){return m},cx:function(){return p},kJ:function(){return b},qo:function(){return y},f0:function(){return v},mf:function(){return w},Kn:function(){return g},PO:function(){return k},FJ:function(){return E},qk:function(){return C},UG:function(){return $},kK:function(){return L},jn:function(){return q},HD:function(){return j},hj:function(){return A},kE:function(){return H},xb:function(){return S},o8:function(){return x},sw:function(){return D},He:function(){return O},f_:function(){return T},zs:function(){return N},as:function(){return z},bc:function(){return M},Xy:function(){return R},LF:function(){return P},Z$:function(){return B},S6:function(){return K},MR:function(){return I},uw:function(){return Z},uZ:function(){return F},ZT:function(){return V},qb:function(){return W},qr:function(){return J},Db:function(){return Y},rw:function(){return G},HP:function(){return Q},BH:function(){return nn}});const{hasOwnProperty:e,toString:u}=Object.prototype;function o(n,t){return e.call(n,t)}const i=/\B([A-Z])/g,c=Q((n=>n.replace(i,"-$1").toLowerCase())),f=/-(\w)/g,a=Q((n=>n.replace(f,l))),s=Q((n=>n.length?l(0,n.charAt(0))+n.slice(1):""));function l(n,t){return t?t.toUpperCase():""}function d(n,t){return n?.startsWith?.(t)}function h(n,t){return n?.endsWith?.(t)}function m(n,t){return n?.includes?.(t)}function p(n,t){return n?.findIndex?.(t)}const{isArray:b,from:y}=Array,{assign:v}=Object;function w(n){return"function"==typeof n}function g(n){return null!==n&&"object"==typeof n}function k(n){return"[object Object]"===u.call(n)}function E(n){return g(n)&&n===n.window}function C(n){return 9===_(n)}function $(n){return _(n)>=1}function L(n){return 1===_(n)}function _(n){return!E(n)&&g(n)&&n.nodeType}function q(n){return"boolean"==typeof n}function j(n){return"string"==typeof n}function A(n){return"number"==typeof n}function H(n){return A(n)||j(n)&&!isNaN(n-parseFloat(n))}function S(n){return!(b(n)?n.length:g(n)&&Object.keys(n).length)}function x(n){return void 0===n}function D(n){return q(n)?n:"true"===n||"1"===n||""===n||"false"!==n&&"0"!==n&&n}function O(n){const t=Number(n);return!isNaN(t)&&t}function T(n){return parseFloat(n)||0}function N(n){return z(n)[0]}function z(n){return n&&($(n)?[n]:Array.from(n).filter($))||[]}function M(n){return E(n)?n:(C(n=N(n))?n:n?.ownerDocument)?.defaultView||window}function R(n,t){return n===t||g(n)&&g(t)&&Object.keys(n).length===Object.keys(t).length&&K(n,((n,r)=>n===t[r]))}function P(n,t,r){return n.replace(new RegExp(`${t}|${r}`,"g"),(n=>n===t?r:t))}function B(n){return n[n.length-1]}function K(n,t){for(const r in n)if(!1===t(n[r],r))return!1;return!0}function I(n,t){return n.slice().sort((({[t]:n=0},{[t]:r=0})=>n>r?1:r>n?-1:0))}function Z(n,t){const r=new Set;return n.filter((({[t]:n})=>!r.has(n)&&r.add(n)))}function F(n,t=0,r=1){return Math.min(Math.max(O(n)||0,t),r)}function V(){}function W(...n){return[["bottom","top"],["right","left"]].every((([t,r])=>Math.min(...n.map((({[t]:n})=>n)))-Math.max(...n.map((({[r]:n})=>n)))>0))}function J(n,t){return n.x<=t.right&&n.x>=t.left&&n.y<=t.bottom&&n.y>=t.top}function X(n,t,r){const e="width"===t?"height":"width";return{[e]:n[t]?Math.round(r*n[e]/n[t]):n[e],[t]:r}}function U(n,t){n={...n};for(const r in n)n=n[r]>t[r]?X(n,r,t[r]):n;return n}const Y={ratio:X,contain:U,cover:function(n,t){n=U(n,t);for(const r in n)n=n[r]<t[r]?X(n,r,t[r]):n;return n}};
1function G(n,t,r=0,e=!1){t=z(t);const{length:u}=t;return u?(n=H(n)?O(n):"next"===n?r+1:"previous"===n?r-1:t.indexOf(N(n)),e?F(n,0,u-1):(n%=u)<0?n+u:n):-1}function Q(n){const t=Object.create(null);return r=>t[r]||(t[r]=n(r))}class nn{constructor(){this.promise=new Promise(((n,t)=>{this.reject=t,this.resolve=n}))}}},3852:function(n,t,r){r.d(t,{IO:function(){return i},Kt:function(){return c},sE:function(){return f},Oq:function(){return a},YU:function(){return w}});var e=r(6693),u=r(1875),o=r(2014);function i(n,t){return f(n,d(n,t))}function c(n,t){return a(n,d(n,t))}function f(n,t){return(0,o.zs)(p(n,t,"querySelector"))}function a(n,t){return(0,o.as)(p(n,t,"querySelectorAll"))}const s=/(^|[^\\],)\s*[!>+~-]/,l=(0,o.HP)((n=>n.match(s)));function d(n,t=document){return(0,o.HD)(n)&&l(n)||(0,o.qk)(t)?t:t.ownerDocument}const h=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,m=(0,o.HP)((n=>n.replace(h,"$1 *")));function p(n,t=document,r){if(!n||!(0,o.HD)(n))return n;if(n=m(n),l(n)){const r=y(n);n="";for(let e of r){let o=t;if("!"===e[0]){const n=e.substr(1).trim().split(" ");if(o=(0,u.oq)((0,u.qm)(t),n[0]),e=n.slice(1).join(" ").trim(),!e.length&&1===r.length)return o}if("-"===e[0]){const n=e.substr(1).trim().split(" "),r=(o||t).previousElementSibling;o=(0,u.wB)(r,e.substr(1))?r:null,e=n.slice(1).join(" ")}o&&(n+=`${n?",":""}${v(o)} ${e}`)}t=document}try{return t[r](n)}catch(n){return null}}const b=/.*?[^\\](?:,|$)/g,y=(0,o.HP)((n=>n.match(b).map((n=>n.replace(/,$/,"").trim()))));function v(n){const t=[];for(;n.parentNode;){const r=(0,e.Lj)(n,"id");if(r){t.unshift(`#${w(r)}`);break}{let{tagName:r}=n;"HTML"!==r&&(r+=`:nth-child(${(0,u.Kz)(n)+1})`),t.unshift(r),n=n.parentNode}}return t.join(" > ")}function w(n){return(0,o.HD)(n)?CSS.escape(n):""}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.