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

2 lines
41 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 p(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function _(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach((e=>_(e,t)));let n=!1;if(t(e,(()=>n=!0)),n)return;let r=e.firstElementChild;for(;r;)_(r,t),r=r.nextElementSibling}function h(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var x=!1;var m=[],g=[];function v(){return m.map((e=>e()))}function y(){return m.concat(g).map((e=>e()))}function b(e){m.push(e)}function w(e){g.push(e)}function E(e,t=!1){return A(e,(e=>{if((t?y():v()).some((t=>e.matches(t))))return!0}))}function A(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return A(e.parentElement,t)}}var k=[];function O(e,t=_,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),k.forEach((n=>n(e,t))),me(e,e.attributes).forEach((e=>e())),e._x_ignore&&t()}))}))}function S(e){_(e,(e=>{P(e),function(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}(e)}))}var C=[],j=[],$=[];function N(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,j.push(t))}function M(e){C.push(e)}function L(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function P(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 R=new MutationObserver(J),T=!1;function z(){R.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),T=!0}function I(){(B=B.concat(R.takeRecords())).length&&!D&&(D=!0,queueMicrotask((()=>{J(B),B.length=0,D=!1}))),R.disconnect(),T=!1}var B=[],D=!1;function q(e){if(!T)return e();I();let t=e();return z(),t}var F=!1,W=[];function J(e){if(F)return void(W=W.concat(e));let t=[],n=[],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.push(e))),e[o].removedNodes.forEach((e=>1===e.nodeType&&n.push(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)=>{P(t,e)})),r.forEach(((e,t)=>{C.forEach((n=>n(t,e)))}));for(let e of n)t.includes(e)||(j.forEach((t=>t(e))),S(e));t.forEach((e=>{e._x_ignoreSelf=!0,e._x_ignore=!0}));for(let e of t)n.includes(e)||e.isConnected&&(delete e._x_ignoreSelf,delete e._x_ignore,$.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 K(e){return H(V(e))}function U(e,t,n){return e._x_dataStack=[t,...V(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter((e=>e!==t))}}function V(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?V(e.host):e.parentNode?V(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)))||{},t,n),set:({objects:e},t,n)=>Reflect.set(e.find((e=>Object.prototype.hasOwnProperty.call(e,t)))||e[e.length-1],t,n)};function X(){return Reflect.ownKeys(this).reduce(((e,t)=>(e[t]=R