snipe-it/public/js/dist/all-defer.js

2 lines
42 KiB
JavaScript
Raw Normal View History

(()=>{var e,t,n,r,i=!1,o=!1,a=[],s=-1;function l(e){!function(e){a.includes(e)||a.push(e);o||i||(i=!0,queueMicrotask(u))}(e)}function c(e){let t=a.indexOf(e);-1!==t&&t>s&&a.splice(t,1)}function u(){i=!1,o=!0;for(let e=0;e<a.length;e++)a[e](),s=e;a.length=0,s=-1,o=!1}var f=!0;function d(e){t=e}function _(e,r){let i,o=!0,a=t((()=>{let t=e();JSON.stringify(t),o?i=t:queueMicrotask((()=>{r(t,i),i=t})),o=!1}));return()=>n(a)}function p(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function h(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach((e=>h(e,t)));let n=!1;if(t(e,(()=>n=!0)),n)return;let r=e.firstElementChild;for(;r;)h(r,t),r=r.nextElementSibling}function x(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var g=!1;var m=[],v=[];function y(){return m.map((e=>e()))}function b(){return m.concat(v).map((e=>e()))}function w(e){m.push(e)}function E(e){v.push(e)}function A(e,t=!1){return O(e,(e=>{if((t?b():y()).some((t=>e.matches(t))))return!0}))}function O(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return O(e.parentElement,t)}}var S=[];function k(e,t=h,n=(()=>{})){!function(e){ve=!0;let t=Symbol();be=t,ye.set(t,[]);let n=()=>{for(;ye.get(t).length;)ye.get(t).shift()();ye.delete(t)},r=()=>{ve=!1,n()};e(n),r()}((()=>{t(e,((e,t)=>{n(e,t),S.forEach((n=>n(e,t))),ge(e,e.attributes).forEach((e=>e())),e._x_ignore&&t()}))}))}function j(e){h(e,(e=>{R(e),function(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}(e)}))}var C=[],$=[],N=[];function M(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,$.push(t))}function L(e){C.push(e)}function P(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function R(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach((([n,r])=>{(void 0===t||t.includes(n))&&(r.forEach((e=>e())),delete e._x_attributeCleanups[n])}))}var T=new MutationObserver(K),z=!1;function B(){T.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),z=!0}function I(){!function(){let e=T.takeRecords();D.push((()=>e.length>0&&K(e)));let t=D.length;queueMicrotask((()=>{if(D.length===t)for(;D.length>0;)D.shift()()}))}(),T.disconnect(),z=!1}var D=[];function q(e){if(!z)return e();I();let t=e();return B(),t}var F=!1,W=[];function K(e){if(F)return void(W=W.concat(e));let t=new Set,n=new Set,r=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&("childList"===e[o].type&&(e[o].addedNodes.forEach((e=>1===e.nodeType&&t.add(e))),e[o].removedNodes.forEach((e=>1===e.nodeType&&n.add(e)))),"attributes"===e[o].type)){let t=e[o].target,n=e[o].attributeName,a=e[o].oldValue,s=()=>{r.has(t)||r.set(t,[]),r.get(t).push({name:n,value:t.getAttribute(n)})},l=()=>{i.has(t)||i.set(t,[]),i.get(t).push(n)};t.hasAttribute(n)&&null===a?s():t.hasAttribute(n)?(l(),s()):l()}i.forEach(((e,t)=>{R(t,e)})),r.forEach(((e,t)=>{C.forEach((n=>n(t,e)))}));for(let e of n)t.has(e)||($.forEach((t=>t(e))),j(e));t.forEach((e=>{e._x_ignoreSelf=!0,e._x_ignore=!0}));for(let e of t)n.has(e)||e.isConnected&&(delete e._x_ignoreSelf,delete e._x_ignore,N.forEach((t=>t(e))),e._x_ignore=!0,e._x_ignoreSelf=!0);t.forEach((e=>{delete e._x_ignoreSelf,delete e._x_ignore})),t=null,n=null,r=null,i=null}function U(e){return H(J(e))}function V(e,t,n){return e._x_dataStack=[t,...J(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter((e=>e!==t))}}function J(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?J(e.host):e.parentNode?J(e.parentNode):[]}function H(e){return new Proxy({objects:e},Z)}var Z={ownKeys:({objects:e})=>Array.from(new Set(e.flatMap((e=>Object.keys(e))))),has:({objects:e},t)=>t!=Symbol.unscopables&&e.some((e=>Object.prototype.hasOwnProperty.call(e,t))),get:({objects:e},t,n)=>"toJSON"==t?X:Reflect.get(e.find((e=>Object.prototype.hasOwnProperty.call(e,t)))||{},