Skip to content

The only tool you need to know what is happening and how to fix it.

1.2 KB
Raw Blame
import{j as o,af as f,X as d,g as i,l as a,ag as n}from"./BKFspo1J.js";var c=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],v=["difference","intersection","symmetricDifference","union"],h=!1;class u extends Set{#r=new Map;#e=o(0);#s=o(0);#t=f||-1;constructor(e){if(super(),e){for(var s of e)super.add(s);this.#s.v=super.size}h||this.#a()}#i(e){return f===this.#t?o(e):d(e)}#a(){h=!0;var e=u.prototype,s=Set.prototype;for(const r of c)e[r]=function(...t){return i(this.#e),s[r].apply(this,t)};for(const r of v)e[r]=function(...t){i(this.#e);var p=s[r].apply(this,t);return new u(p)}}has(e){var s=super.has(e),r=this.#r,t=r.get(e);if(t===void 0){if(!s)return i(this.#e),!1;t=this.#i(!0),r.set(e,t)}return i(t),s}add(e){return super.has(e)||(super.add(e),a(this.#s,super.size),n(this.#e)),this}delete(e){var s=super.delete(e),r=this.#r,t=r.get(e);return t!==void 0&&(r.delete(e),a(t,!1)),s&&(a(this.#s,super.size),n(this.#e)),s}clear(){if(super.size!==0){super.clear();var e=this.#r;for(var s of e.values())a(s,!1);e.clear(),a(this.#s,0),n(this.#e)}}keys(){return this.values()}values(){return i(this.#e),super.values()}entries(){return i(this.#e),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return i(this.#s)}}export{u as S};