diff --git a/observable/benchmark-node.mjs b/observable/benchmark-node.mjs new file mode 100644 index 00000000..5012d27f --- /dev/null +++ b/observable/benchmark-node.mjs @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import { runTest } from "./src/test.mjs"; + +const then = performance.now(); +runTest(); +const duration = performance.now() - then; + +console.log(`Duration : ${duration.toFixed(2)}ms`); \ No newline at end of file diff --git a/observable/benchmark.js b/observable/benchmark.js new file mode 100644 index 00000000..fe870f85 --- /dev/null +++ b/observable/benchmark.js @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +const EXPECTED_LOG_LENGTH = 6824; + +class Benchmark extends StartupBenchmark { + lastResult; + + constructor({iterationCount}) { + super({ + iterationCount, + expectedCacheCommentCount: 464, + sourceCodeReuseCount: 8, + }); + } + + runIteration(iteration) { + // Module is loaded into PrismJSBenchmark + let MobXBenchmark; + eval(this.iterationSourceCodes[iteration]); + this.lastResult = MobXBenchmark.runTest(); + } + + validate() { + console.assert( + this.lastResult.length === EXPECTED_LOG_LENGTH, + `Expected this.lastResult.length to be ${EXPECTED_LOG_LENGTH}, but got ${this.lastResult.length}` + ); + } +} diff --git a/observable/dist/LICENSE.txt b/observable/dist/LICENSE.txt new file mode 100644 index 00000000..a3a269bc --- /dev/null +++ b/observable/dist/LICENSE.txt @@ -0,0 +1,35 @@ +This file was generated with the generate-license-file npm package! +https://www.npmjs.com/package/generate-license-file + +The following npm package may be included in this product: + + - kr-observable@3.1.14 + +This package contains the following license: + +The MIT License (MIT) + +Copyright (c) 2025 Roman Konstantin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + +This file was generated with the generate-license-file npm package! +https://www.npmjs.com/package/generate-license-file diff --git a/observable/dist/bundle.es5.js b/observable/dist/bundle.es5.js new file mode 100644 index 00000000..a7b22b98 --- /dev/null +++ b/observable/dist/bundle.es5.js @@ -0,0 +1,230 @@ +!function(){var __webpack_require__={d:function(exports,definition){for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},o:function(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)},r:function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})}},__webpack_exports__={};!function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{runTest:function(){return runTest}});class Executor{static#stack=[];static report(adm,property,set=!1){ +/*ThouShaltNotCache*/ +if(!this.#stack.length)return;const runnable=this.#stack[this.#stack.length-1];set?adm.unsubscribe(property,runnable):adm.subscribe(property,runnable)}static execute(runnable,...rest){ +/*ThouShaltNotCache*/ +runnable.active=!0,runnable.deps?this.dispose(runnable):runnable.deps=new Set,this.#stack.push(runnable);const result=runnable.run(...rest);return this.#stack.pop(),runnable.active=!1,result}static dispose(runnable){ +/*ThouShaltNotCache*/ +runnable.deps.forEach(this.unsubscribe,runnable)}static unsubscribe(list){ +/*ThouShaltNotCache*/ +list.delete(this)}}class Notifier{static queued=!1;static runId=2;static notify(runnable,changes){ +/*ThouShaltNotCache*/ +runnable.runId=Notifier.runId,runnable.subscriber(changes),Notifier.queued||(Notifier.queued=!0,queueMicrotask(Notifier.flush))}static flush(){ +/*ThouShaltNotCache*/ +Notifier.queued=!1,Notifier.runId=(Notifier.runId+1)%1e5}}class GlobalState{static untracked=!1;static action=!1;static queue=new Set;static meta=new WeakMap;static executor=Executor;static notifier=Notifier}const LibName=Symbol.for("kr-observable");globalThis[LibName]||(globalThis[LibName]=Object.seal(GlobalState));const global_Global=globalThis[LibName],queue=(global_Global.executor,global_Global.queue),notifier=global_Global.notifier;class Admin{static meta={key:"",adm:new Admin("")};owner;deps=new Map;listeners;changes=new Set;current=null;queued=!1;constructor(owner){ +/*ThouShaltNotCache*/ +this.owner=owner}subscribe(property,runnable){ +/*ThouShaltNotCache*/ +let list=this.deps.get(property);list||(list=new Set,this.deps.set(property,list)),list.has(runnable)||list.add(runnable),runnable.deps?.has(list)||runnable.deps?.add(list)}unsubscribe(property,runnable){ +/*ThouShaltNotCache*/ +this.deps.get(property)?.delete(runnable)}report(property,value){if( +/*ThouShaltNotCache*/ +this.listeners?.forEach(cb=>cb(property,value)),this.deps.has(property))if(this.changes.add(property),global_Global.action)queue.add(this);else{if(this.queued)return;this.queued=!0,queueMicrotask(this.enqueueBatch)}}enqueueBatch=()=>{ +/*ThouShaltNotCache*/ +this.batch(),this.queued=!1};batch(flag=!1){ +/*ThouShaltNotCache*/ +if(0===this.changes.size)return;const changes=this.changes;if(changes.size>1){const copy=new Set;for(const key of this.deps.keys())changes.has(key)&©.add(key);this.changes=copy}for(const change of this.changes){this.changes.delete(change),this.current=this.deps.get(change);for(const sub of this.current)if(sub.runId!==notifier.runId){if(sub.active)return;if(flag&&sub.computed)return this.changes.add(change);notifier.notify(sub,changes)}this.current=null}}static batch(adm){ +/*ThouShaltNotCache*/ +adm.batch()}}class Utils_Utils{static AdmKey=Symbol.for("adm");static IGNORED=0;static ACCESSOR=1;static SHALLOW=2;static WRITABLE=3;static isPlainObject(value){ +/*ThouShaltNotCache*/ +const ctor=value?.constructor;return!ctor||ctor===Object}static isPrimitive(val){ +/*ThouShaltNotCache*/ +return null===val||"object"!=typeof val&&"function"!=typeof val}static isDeepEqual(a,b){ +/*ThouShaltNotCache*/ +if(null==a||null==b)return Object.is(a,b);const A=a.valueOf(),B=b.valueOf();if("object"==typeof A){if("object"!=typeof B)return!1;const keys=Object.keys(A);if(keys.length!==Object.keys(B).length)return!1;for(const key of keys)if(!Utils_Utils.isDeepEqual(A[key],B[key]))return!1;return!0}return Object.is(a,b)}static getAdm(value){ +/*ThouShaltNotCache*/ +return value[Utils_Utils.AdmKey]}}const registry=new Map,error=new TypeError("First argument must be Observable"),subscribersRegistry=new Map;function autorun(work){ +/*ThouShaltNotCache*/ +let disposer=registry.get(work);if(disposer)return disposer;const runnable={run:work,subscriber(){ +/*ThouShaltNotCache*/ +global_Global.executor.execute(this)},debug:!1,runId:1,active:!1,deps:void 0};return disposer=()=>{ +/*ThouShaltNotCache*/ +registry.delete(work),global_Global.executor.dispose(runnable)},registry.set(work,disposer),global_Global.executor.execute(runnable),disposer}class Computed{enumerable;configurable;set;runId=1;debug=!1;active=!1;deps;#adm;#property;#descriptor;#value;#setterValue;changed=!1;computed=!0;name;constructor(property,descriptor,handler){ +/*ThouShaltNotCache*/ +this.enumerable=descriptor.enumerable,this.configurable=descriptor.configurable,this.#property=property,this.#descriptor=descriptor,this.#adm=handler.adm,descriptor.set&&(this.set=value=>{ +/*ThouShaltNotCache*/ +this.#descriptor.set(value);const prevValue=this.#setterValue;this.#setterValue=value,this.#report(prevValue,value)})}subscriber(){ +/*ThouShaltNotCache*/ +this.changed=!0,0!==this.#adm.deps.get(this.#property)?.size&&this.compute()}run(){ +/*ThouShaltNotCache*/ +return this.#descriptor.get()}compute(){ +/*ThouShaltNotCache*/ +const prev=this.#value;this.#reader(),this.#report(prev,this.#value)}#report(prevValue,newValue){ +/*ThouShaltNotCache*/ +Utils_Utils.isDeepEqual(prevValue,newValue)||this.#adm.report(this.#property,newValue),global_Global.action||this.#adm.batch()}#reader(){ +/*ThouShaltNotCache*/ +this.#value=global_Global.executor.execute(this)}get=()=>( +/*ThouShaltNotCache*/ +global_Global.action||this.#adm.batch(),this.deps?0===this.deps?.size?this.run():(this.changed&&(this.changed=!1,this.#reader()),this.#adm.current?.has(this)&&this.compute(),this.#value):(this.#reader(),this.#value))}const Proxy_handler_executor=global_Global.executor;class ProxyHandler{adm;types={};receiver;factory;constructor(adm,factory){ +/*ThouShaltNotCache*/ +this.adm=adm,this.factory=factory}#report(property,value){ +/*ThouShaltNotCache*/ +Proxy_handler_executor.report(this.adm,property,!0),this.adm.report(property,value)}#batch(property){ +/*ThouShaltNotCache*/ +this.types[property]!==Utils_Utils.IGNORED&&Proxy_handler_executor.report(this.adm,property),global_Global.action||this.adm.changes.size&&this.adm.changes.has(property)&&this.adm.batch(!0)}get(target,property){ +/*ThouShaltNotCache*/ +return property===Utils_Utils.AdmKey?this.adm:(this.#batch(property),target[property])}set(target,property,value){ +/*ThouShaltNotCache*/ +return property in this.types||(this.types[property]=Utils_Utils.WRITABLE,this.#report(property,value)),this.types[property]===Utils_Utils.ACCESSOR?Reflect.set(target,property,value):(target[property]!==value&&this.#report(property,value),Utils_Utils.isPrimitive(value)?target[property]=value:target[property]=this.factory.object(property,value,this),!0)}defineProperty(target,property,desc){ +/*ThouShaltNotCache*/ +return Reflect.defineProperty(target,property,this.factory.descriptor(property,desc,this))}deleteProperty(target,property){ +/*ThouShaltNotCache*/ +if(!(property in target))return!1;const res=Reflect.deleteProperty(target,property);return this.#report(property,void 0),res}setPrototypeOf(target,proto){ +/*ThouShaltNotCache*/ +const adm=Utils_Utils.getAdm(proto);return adm&&Object.assign(adm,this.adm),Reflect.setPrototypeOf(target,proto)}has(target,property){ +/*ThouShaltNotCache*/ +return this.#batch(property),property in target}getOwnPropertyDescriptor(target,property){ +/*ThouShaltNotCache*/ +return this.#batch(property),Reflect.getOwnPropertyDescriptor(target,property)}}class ActionHandler{ctx;constructor(receiver){ +/*ThouShaltNotCache*/ +this.ctx=receiver}apply(target,_,args){ +/*ThouShaltNotCache*/ +if(global_Global.action)return target.apply(this.ctx,args);global_Global.action=!0;try{let result=target.apply(this.ctx,args);const thenable=result instanceof Promise;return thenable&&(result=result.then(ActionHandler.resolve,ActionHandler.reject)),ActionHandler.flush(),global_Global.action=thenable,result}catch(e){ActionHandler.reject(e)}}static flush(){ +/*ThouShaltNotCache*/ +global_Global.queue.forEach(Admin.batch),global_Global.queue.clear(),global_Global.action=!1}static resolve(result){ +/*ThouShaltNotCache*/ +return ActionHandler.flush(),result}static reject(error){ +/*ThouShaltNotCache*/ +throw ActionHandler.flush(),error}}class ObservableSet extends Set{get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}report(result){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),result}add(value){ +/*ThouShaltNotCache*/ +return this.report(super.add(value))}delete(value){ +/*ThouShaltNotCache*/ +return this.report(super.delete(value))}clear(){ +/*ThouShaltNotCache*/ +return super.clear(),this.report(void 0)}}class ObservableMap extends Map{static#getKey(metaKey,key){ +/*ThouShaltNotCache*/ +return null==key?`${metaKey}.${key}`:"object"==typeof key?key:"symbol"==typeof key?`${metaKey}.${key.description}`:`${metaKey}.${key}`}get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}get size(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.size}keys(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.keys()}entries(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.entries()}values(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.values()}forEach(callback,thisArg){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.forEach(callback,thisArg)}[Symbol.iterator](){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super[Symbol.iterator]()}has(key){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,ObservableMap.#getKey(this.meta.key,key)),super.has(key)}get(key){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,ObservableMap.#getKey(this.meta.key,key)),super.get(key)}set(key,value){ +/*ThouShaltNotCache*/ +let newValue=value;this.meta.factory&&(Utils_Utils.isPrimitive(newValue)||(newValue=this.meta.factory(this.meta.key,value,this.meta.handler)));const hasKey=super.has(key),prevValue=super.get(key),result=super.set(key,newValue);return hasKey?prevValue!==newValue&&(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),newValue)):(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),newValue)),result}delete(key){ +/*ThouShaltNotCache*/ +const result=super.delete(key);return result&&(this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),void 0),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)),result}clear(){ +/*ThouShaltNotCache*/ +if(0===super.size)return;const metaKey=this.meta.key;for(const key of this.keys())this.meta.adm.report(ObservableMap.#getKey(metaKey,key),void 0);super.clear(),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)}}class ObservableArray extends Array{get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}report(result){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),result}prepare(items){ +/*ThouShaltNotCache*/ +const factory=this.meta.factory;if(!factory)return items;this.meta.adm;const key=this.meta.key,handler=this.meta.handler;if(""===key)return items;for(let i=0;itypes[key]=Utils_Utils.IGNORED),shallow?.forEach(key=>types[key]=Utils_Utils.SHALLOW),types}Reflect.has(Array.prototype,"set")||(Array.prototype.set=function(i,value){ +/*ThouShaltNotCache*/ +this[i]=value});class Factory{static descriptor(property,descriptor,handler){ +/*ThouShaltNotCache*/ +return property in handler.types||("value"in descriptor&&descriptor.writable?handler.types[property]=Utils_Utils.WRITABLE:handler.types[property]=Utils_Utils.ACCESSOR),descriptor.get&&(descriptor.get=descriptor.get.bind(handler.receiver)),descriptor.set&&(descriptor.set=descriptor.set.bind(handler.receiver)),handler.types[property]===Utils_Utils.IGNORED||(handler.types[property]===Utils_Utils.ACCESSOR?descriptor.get&&(descriptor=new Computed(property,descriptor,handler)):Utils_Utils.isPrimitive(descriptor.value)||(descriptor.value=Factory.object(property,descriptor.value,handler))),descriptor}static object(property,value,handler){ +/*ThouShaltNotCache*/ +if(Utils_Utils.getAdm(value))return value;if(handler.types[property]===Utils_Utils.IGNORED)return value;if(""===value.meta?.key)return value;if(Utils_Utils.isPlainObject(value))return function(value,ignore,shallow){ +/*ThouShaltNotCache*/ +if(Utils_Utils.isPrimitive(value))throw Observable_error;if(!Utils_Utils.isPlainObject(value))throw Observable_error;if(Utils_Utils.getAdm(value))return value;const adm=new Admin(""),handler=new ProxyHandler(adm,Factory),proxy=new Proxy(value,handler);handler.receiver=proxy,setDefaultTypes(handler.types,ignore,shallow);for(const key in value){const descriptor=Factory.descriptor(key,Object.getOwnPropertyDescriptor(value,key),handler);descriptor.writable?value[key]=descriptor.value:Object.defineProperty(value,key,descriptor)}return proxy}(value);if("function"==typeof value)return new Proxy(value,new ActionHandler(handler.receiver));const isShallow=handler.types[property]===Utils_Utils.SHALLOW,meta={key:property.toString(),handler:handler,adm:handler.adm,factory:isShallow?void 0:Factory.object};if(value instanceof Array){if(!isShallow)for(let i=0;i{ +/*ThouShaltNotCache*/ +room.addStatusUpdate(this,status)})}}class Room extends Observable{name;people=new Map;messages=[];roomUpdates=[];constructor(name){ +/*ThouShaltNotCache*/ +super(),this.name=name}get messageCount(){ +/*ThouShaltNotCache*/ +return this.messages.length}get peopleCount(){ +/*ThouShaltNotCache*/ +return this.people.size}get lastMessage(){ +/*ThouShaltNotCache*/ +return this.messages.at(-1)}get members(){ +/*ThouShaltNotCache*/ +return Array.from(this.people.values())}addPerson(person){ +/*ThouShaltNotCache*/ +this.people.has(person.id)||(this.people.set(person.id,person),person.addRoom(this))}removePerson(personId){ +/*ThouShaltNotCache*/ +const person=this.people.get(personId);person&&(person.removeRoom(this),this.people.delete(personId))}addMessage(message){var work; +/*ThouShaltNotCache*/ +work=()=>{ +/*ThouShaltNotCache*/ +message.author.setLastMessage(message),this.messages.push(message)}, +/*ThouShaltNotCache*/ +global_Global.action=!0,work(),global_Global.action=!1,global_Global.queue.forEach(Admin.batch),global_Global.queue.clear(),global_Global.notifier.flush()}addStatusUpdate(person,status){ +/*ThouShaltNotCache*/ +this.roomUpdates.push(`${person.name} is now ${status}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(notifications){ +/*ThouShaltNotCache*/ +this.people.forEach(person=>person.removeRoom(this)),notifications&¬ifications.removeRoom(this.name)}}class Message extends Observable{static ignore=new Set(["id","author","timestamp"]);static _nextId=0;id;text;author;timestamp;static nextId(){ +/*ThouShaltNotCache*/ +return Message._nextId++}constructor(text,author){ +/*ThouShaltNotCache*/ +super(),this.id=Message.nextId(),this.text=text,this.author=author,this.timestamp=new Date}updateText(text){ +/*ThouShaltNotCache*/ +this.text=text}}class Notifications extends Observable{static ignore=new Set(["lastMessage","roomDisposers"]);static roomSubscribeKeys=new Set(["lastMessage"]);lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(rooms){ +/*ThouShaltNotCache*/ +super(),rooms.forEach(room=>this.addRoom(room))}addRoom(room){ +/*ThouShaltNotCache*/ +room.lastMessage;const disposer=function(target,cb,keys){ +/*ThouShaltNotCache*/ +const adm=Utils_Utils.getAdm(target);if(!adm)throw error;let registered=subscribersRegistry.get(cb);if(registered)return registered.adms.has(adm)||keys.forEach(key=>adm.subscribe(key,registered.runnable)),registered.disposer;const runnable={subscriber:cb,runId:1,active:!1,deps:new Set};keys.forEach(key=>adm.subscribe(key,runnable));const disposer=()=>{ +/*ThouShaltNotCache*/ +subscribersRegistry.delete(cb),global_Global.executor.dispose(runnable)};return registered={runnable:runnable,disposer:disposer,adms:new Set([adm])},subscribersRegistry.set(cb,registered),disposer}(room,()=>{ +/*ThouShaltNotCache*/ +room.lastMessage&&this.updateLastMessage(room.name,room.lastMessage)},Notifications.roomSubscribeKeys);this.roomDisposers.set(room.name,disposer)}removeRoom(roomName){ +/*ThouShaltNotCache*/ +this.roomDisposers.has(roomName)&&(this.roomDisposers.get(roomName)(),this.roomDisposers.delete(roomName),this.lastMessages.delete(roomName))}updateLastMessage(roomName,message){ +/*ThouShaltNotCache*/ +this.lastMessages.set(roomName,message)}}function assert(condition){ +/*ThouShaltNotCache*/ +if(!condition)throw new Error("Assertion failure")}function runTest(){ +/*ThouShaltNotCache*/ +const logs=[],customLog=(...args)=>logs.push(args.join(" ")),techRoom=new Room("Tech Talk"),generalRoom=new Room("General Chat"),largeRoom=new Room("Large Meeting Room"),alice=new Person(1,"Alice"),bob=new Person(2,"Bob");techRoom.addPerson(alice),techRoom.addPerson(bob),generalRoom.addPerson(alice);const rooms=[techRoom,generalRoom,largeRoom],notifications=new Notifications(rooms);customLog("\n--- Setting up Large Meeting Room ---");const largeRoomMembers=[];for(let i=3;i<203;i++){const person=new Person(i,`Person ${i}`);largeRoomMembers.push(person),largeRoom.addPerson(person)}customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`),largeRoom.addPerson(alice),largeRoom.addPerson(bob),customLog("[INFO] Added Alice and Bob to the Large Meeting Room."),assert(3===alice.rooms.size),assert(alice.rooms.has(techRoom)&&alice.rooms.has(generalRoom)&&alice.rooms.has(largeRoom)),assert(2===bob.rooms.size&&bob.rooms.has(techRoom)&&bob.rooms.has(largeRoom)),customLog("[PASS] Verified Person.rooms associations with Set.");const notificationsDisposer=autorun(()=>{ +/*ThouShaltNotCache*/ +customLog("\n--- Global Notifications (Last Messages) ---"),0===notifications.lastMessages.size?customLog("No messages yet."):notifications.lastMessages.forEach((message,roomName)=>{ +/*ThouShaltNotCache*/ +customLog(`[${roomName}] "${message.text}" - ${message.author.name}`)}),customLog("------------------------------------------")}),roomUpdatesDisposer=autorun(()=>{ +/*ThouShaltNotCache*/ +rooms.forEach(room=>{ +/*ThouShaltNotCache*/ +room.roomUpdates.length>0&&customLog(`[${room.name} Update] ${room.roomUpdates[room.roomUpdates.length-1]}`)})});customLog("\n--- Status Update Scenario ---"),alice.setStatus("Away"),assert(techRoom.roomUpdates.includes("Alice is now Away")),assert(generalRoom.roomUpdates.includes("Alice is now Away")),assert(largeRoom.roomUpdates.includes("Alice is now Away")),customLog("[PASS] Verified that status updates are sent to all of Alice's rooms."),bob.setStatus("Busy"),assert(techRoom.roomUpdates.includes("Bob is now Busy")),assert(!generalRoom.roomUpdates.includes("Bob is now Busy")),assert(largeRoom.roomUpdates.includes("Bob is now Busy")),customLog("[PASS] Verified that status updates are only sent to Bob's rooms."),customLog("\n--- Sending Messages & Verifying Notifications ---");const msg1=new Message("First message to Tech Talk!",alice);techRoom.addMessage(msg1),assert(notifications.lastMessages.get("Tech Talk")===msg1),customLog("[PASS] Verified Tech Talk notification.");for(let i=0;i<20;i++){const msg2=new Message(`ping ${i}`,alice);generalRoom.addMessage(msg2),assert(notifications.lastMessages.get("General Chat")===msg2)}customLog("[PASS] Verified General Chat notification.");for(let i=0;i<=5;i++)for(const member of largeRoomMembers){const msg=new Message(`Hi, I am ${member.name}`,member);largeRoom.addMessage(msg),assert(largeRoom.lastMessage==msg),assert(notifications.lastMessages.get("Large Meeting Room")===msg)}customLog("[PASS] Verified Large Meeting Room notification.");for(let i=0;i<20;i++){const msg4=new Message(`ping ${i}`,bob);techRoom.addMessage(msg4),assert(notifications.lastMessages.get("Tech Talk")===msg4)}customLog("[PASS] Verified Tech Talk notification update.");const tempRooms=[];for(let i=0;i<10;i++){const roomId=`General Chat ${i}`,tempRoom=new Room(roomId);tempRooms.push(tempRoom),notifications.addRoom(tempRoom);for(const person of largeRoomMembers.slice(0,10))tempRoom.addPerson(person);for(const person of tempRoom.members.slice(0,5)){const msg=new Message(`ping ${i}`,person);tempRoom.addMessage(msg),assert(notifications.lastMessages.get(roomId)===msg)}}return tempRooms.forEach(room=>room.dispose(notifications)),notificationsDisposer(),roomUpdatesDisposer(),techRoom.dispose(notifications),generalRoom.dispose(notifications),largeRoom.dispose(notifications),logs}}(),MobXBenchmark=__webpack_exports__}(); +//# sourceMappingURL=bundle.es5.js.map \ No newline at end of file diff --git a/observable/dist/bundle.es5.js.map b/observable/dist/bundle.es5.js.map new file mode 100644 index 00000000..627740da --- /dev/null +++ b/observable/dist/bundle.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.es5.js","mappings":"YACA,IAAIA,oBAAsB,CCA1BA,EAAwB,SAASC,QAASC,YACzC,IAAI,IAAIC,OAAOD,WACXF,oBAAoBI,EAAEF,WAAYC,OAASH,oBAAoBI,EAAEH,QAASE,MAC5EE,OAAOC,eAAeL,QAASE,IAAK,CAAEI,YAAY,EAAMC,IAAKN,WAAW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enchmark/webpack/runtime/hasOwnProperty shorthand","webpack://MobXBenchmark/webpack/runtime/make namespace object","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Executor.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Notifier.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/global.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Admin.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Utils.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/api.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Computed.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Proxy.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Action.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.set.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.map.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.array.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.js","webpack://MobXBenchmark/./src/Person.mjs","webpack://MobXBenchmark/./src/Room.mjs","webpack://MobXBenchmark/./src/Message.mjs","webpack://MobXBenchmark/./src/Notifications.mjs","webpack://MobXBenchmark/./src/test.mjs"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Executor {\n static #stack = [];\n static report(adm, property, set = false) {\n if (!this.#stack.length)\n return;\n const runnable = this.#stack[this.#stack.length - 1];\n if (set) {\n adm.unsubscribe(property, runnable);\n }\n else {\n adm.subscribe(property, runnable);\n }\n }\n static execute(runnable, ...rest) {\n runnable.active = true;\n if (!runnable.deps) {\n runnable.deps = new Set;\n }\n else {\n this.dispose(runnable);\n }\n this.#stack.push(runnable);\n const result = runnable.run(...rest);\n this.#stack.pop();\n runnable.active = false;\n return result;\n }\n static dispose(runnable) {\n runnable.deps.forEach(this.unsubscribe, runnable);\n }\n static unsubscribe(list) {\n list.delete(this);\n }\n}\n","export class Notifier {\n static queued = false;\n static runId = 2;\n static notify(runnable, changes) {\n runnable.runId = Notifier.runId;\n runnable.subscriber(changes);\n if (Notifier.queued)\n return;\n Notifier.queued = true;\n queueMicrotask(Notifier.flush);\n }\n static flush() {\n Notifier.queued = false;\n Notifier.runId = (Notifier.runId + 1) % 100_000;\n }\n}\n","import { Executor } from './Executor.js';\nimport { Notifier } from './Notifier.js';\nclass GlobalState {\n static untracked = false;\n static action = false;\n static queue = new Set;\n static meta = new WeakMap;\n static executor = Executor;\n static notifier = Notifier;\n}\nconst LibName = Symbol.for('kr-observable');\nif (!globalThis[LibName]) {\n globalThis[LibName] = Object.seal(GlobalState);\n}\nexport const Global = globalThis[LibName];\nexport const executor = Global.executor;\n","import { Global } from './global.js';\nconst queue = Global.queue;\nconst notifier = Global.notifier;\nexport class Admin {\n static meta = { key: '', adm: new Admin('') };\n owner;\n deps = new Map;\n listeners;\n changes = new Set;\n current = null;\n queued = false;\n constructor(owner) {\n this.owner = owner;\n }\n subscribe(property, runnable) {\n let list = this.deps.get(property);\n if (!list) {\n list = new Set;\n this.deps.set(property, list);\n }\n if (!list.has(runnable)) {\n list.add(runnable);\n }\n if (!runnable.deps?.has(list)) {\n runnable.deps?.add(list);\n }\n }\n unsubscribe(property, runnable) {\n this.deps.get(property)?.delete(runnable);\n }\n report(property, value) {\n this.listeners?.forEach(cb => cb(property, value));\n if (!this.deps.has(property))\n return;\n this.changes.add(property);\n if (Global.action) {\n queue.add(this);\n }\n else {\n if (this.queued)\n return;\n this.queued = true;\n queueMicrotask(this.enqueueBatch);\n }\n }\n enqueueBatch = () => {\n this.batch();\n this.queued = false;\n };\n batch(flag = false) {\n if (this.changes.size === 0)\n return;\n const changes = this.changes;\n if (changes.size > 1) {\n const copy = new Set();\n for (const key of this.deps.keys()) {\n if (changes.has(key))\n copy.add(key);\n }\n this.changes = copy;\n }\n for (const change of this.changes) {\n this.changes.delete(change);\n this.current = this.deps.get(change);\n for (const sub of this.current) {\n if (sub.runId !== notifier.runId) {\n if (sub.active) {\n return;\n }\n if (flag && sub.computed) {\n return this.changes.add(change);\n }\n notifier.notify(sub, changes);\n }\n }\n this.current = null;\n }\n }\n static batch(adm) {\n adm.batch();\n }\n}\n","export class Utils {\n static AdmKey = Symbol.for('adm');\n static IGNORED = 0;\n static ACCESSOR = 1;\n static SHALLOW = 2;\n static WRITABLE = 3;\n static isPlainObject(value) {\n const ctor = value?.constructor;\n return !ctor || ctor === Object;\n }\n static isPrimitive(val) {\n return val === null || (typeof val !== 'object' && typeof val !== 'function');\n }\n static isDeepEqual(a, b) {\n if (a == null || b == null)\n return Object.is(a, b);\n const A = a.valueOf();\n const B = b.valueOf();\n if (typeof A === 'object') {\n if (typeof B !== 'object')\n return false;\n const keys = Object.keys(A);\n if (keys.length !== Object.keys(B).length)\n return false;\n for (const key of keys) {\n if (!Utils.isDeepEqual(A[key], B[key]))\n return false;\n }\n return true;\n }\n return Object.is(a, b);\n }\n static getAdm(value) {\n return value[Utils.AdmKey];\n }\n}\n","import { Admin } from './Admin.js';\nimport { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst registry = new Map();\nconst error = new TypeError('First argument must be Observable');\nconst subscribersRegistry = new Map();\nexport function subscribe(target, cb, keys) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n let registered = subscribersRegistry.get(cb);\n if (registered) {\n if (!registered.adms.has(adm)) {\n keys.forEach(key => adm.subscribe(key, registered.runnable));\n }\n return registered.disposer;\n }\n const runnable = { subscriber: cb, runId: 1, active: false, deps: new Set };\n keys.forEach(key => adm.subscribe(key, runnable));\n const disposer = () => {\n subscribersRegistry.delete(cb);\n Global.executor.dispose(runnable);\n };\n registered = { runnable, disposer, adms: new Set([adm]) };\n subscribersRegistry.set(cb, registered);\n return disposer;\n}\nexport function autorun(work) {\n let disposer = registry.get(work);\n if (disposer)\n return disposer;\n const runnable = {\n run: work,\n subscriber() {\n Global.executor.execute(this);\n },\n debug: false,\n runId: 1,\n active: false,\n deps: undefined\n };\n disposer = () => {\n registry.delete(work);\n Global.executor.dispose(runnable);\n };\n registry.set(work, disposer);\n Global.executor.execute(runnable);\n return disposer;\n}\nexport function listen(target, cb) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n if (!adm.listeners)\n adm.listeners = new Set();\n adm.listeners.add(cb);\n return () => void adm.listeners.delete(cb);\n}\nexport function transaction(work) {\n Global.action = true;\n work();\n Global.action = false;\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.notifier.flush();\n}\nexport function untracked(work) {\n Global.untracked = true;\n const result = work();\n Global.untracked = false;\n return result;\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nexport class Computed {\n enumerable;\n configurable;\n set;\n runId = 1;\n debug = false;\n active = false;\n deps;\n #adm;\n #property;\n #descriptor;\n #value;\n #setterValue;\n changed = false;\n computed = true;\n name;\n constructor(property, descriptor, handler) {\n this.enumerable = descriptor.enumerable;\n this.configurable = descriptor.configurable;\n this.#property = property;\n this.#descriptor = descriptor;\n this.#adm = handler.adm;\n if (descriptor.set) {\n this.set = (value) => {\n this.#descriptor.set(value);\n const prevValue = this.#setterValue;\n this.#setterValue = value;\n this.#report(prevValue, value);\n };\n }\n }\n subscriber() {\n this.changed = true;\n if (this.#adm.deps.get(this.#property)?.size === 0) {\n return;\n }\n this.compute();\n }\n run() {\n return this.#descriptor.get();\n }\n compute() {\n const prev = this.#value;\n this.#reader();\n this.#report(prev, this.#value);\n }\n #report(prevValue, newValue) {\n if (!Utils.isDeepEqual(prevValue, newValue)) {\n this.#adm.report(this.#property, newValue);\n }\n if (Global.action)\n return;\n this.#adm.batch();\n }\n #reader() {\n this.#value = Global.executor.execute(this);\n }\n get = () => {\n if (!Global.action) {\n this.#adm.batch();\n }\n if (!this.deps) {\n this.#reader();\n return this.#value;\n }\n if (this.deps?.size === 0) {\n return this.run();\n }\n if (this.changed) {\n this.changed = false;\n this.#reader();\n }\n if (this.#adm.current?.has(this)) {\n this.compute();\n }\n return this.#value;\n };\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst executor = Global.executor;\nexport class ProxyHandler {\n adm;\n types = {};\n receiver;\n factory;\n constructor(adm, factory) {\n this.adm = adm;\n this.factory = factory;\n }\n #report(property, value) {\n executor.report(this.adm, property, true);\n this.adm.report(property, value);\n }\n #batch(property) {\n if (this.types[property] !== Utils.IGNORED) {\n executor.report(this.adm, property);\n }\n if (Global.action)\n return;\n if (!this.adm.changes.size)\n return;\n if (this.adm.changes.has(property)) {\n this.adm.batch(true);\n }\n }\n get(target, property) {\n if (property === Utils.AdmKey)\n return this.adm;\n this.#batch(property);\n return target[property];\n }\n set(target, property, value) {\n if (!(property in this.types)) {\n this.types[property] = Utils.WRITABLE;\n this.#report(property, value);\n }\n if (this.types[property] === Utils.ACCESSOR) {\n return Reflect.set(target, property, value);\n }\n if (target[property] !== value) {\n this.#report(property, value);\n }\n if (Utils.isPrimitive(value)) {\n target[property] = value;\n }\n else {\n target[property] = this.factory.object(property, value, this);\n }\n return true;\n }\n defineProperty(target, property, desc) {\n return Reflect.defineProperty(target, property, this.factory.descriptor(property, desc, this));\n }\n deleteProperty(target, property) {\n if (!(property in target))\n return false;\n const res = Reflect.deleteProperty(target, property);\n this.#report(property, undefined);\n return res;\n }\n setPrototypeOf(target, proto) {\n const adm = Utils.getAdm(proto);\n if (adm)\n Object.assign(adm, this.adm);\n return Reflect.setPrototypeOf(target, proto);\n }\n has(target, property) {\n this.#batch(property);\n return property in target;\n }\n getOwnPropertyDescriptor(target, property) {\n this.#batch(property);\n return Reflect.getOwnPropertyDescriptor(target, property);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ActionHandler {\n ctx;\n constructor(receiver) {\n this.ctx = receiver;\n }\n apply(target, _, args) {\n if (Global.action)\n return target.apply(this.ctx, args);\n Global.action = true;\n try {\n let result = target.apply(this.ctx, args);\n const thenable = result instanceof Promise;\n if (thenable) {\n result = result.then(ActionHandler.resolve, ActionHandler.reject);\n }\n ActionHandler.flush();\n Global.action = thenable;\n return result;\n }\n catch (e) {\n ActionHandler.reject(e);\n }\n }\n static flush() {\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.action = false;\n }\n static resolve(result) {\n ActionHandler.flush();\n return result;\n }\n static reject(error) {\n ActionHandler.flush();\n throw error;\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ObservableSet extends Set {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n add(value) {\n return this.report(super.add(value));\n }\n delete(value) {\n return this.report(super.delete(value));\n }\n clear() {\n super.clear();\n return this.report(undefined);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableMap extends Map {\n static #getKey(metaKey, key) {\n if (key == undefined)\n return `${metaKey}.${key}`;\n if (typeof key === 'object')\n return key;\n if (typeof key === 'symbol')\n return `${metaKey}.${key.description}`;\n return `${metaKey}.${key}`;\n }\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n get size() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.size;\n }\n keys() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.keys();\n }\n entries() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.entries();\n }\n values() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.values();\n }\n forEach(callback, thisArg) {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.forEach(callback, thisArg);\n }\n [Symbol.iterator]() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super[Symbol.iterator]();\n }\n has(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.has(key);\n }\n get(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.get(key);\n }\n set(key, value) {\n let newValue = value;\n if (this.meta.factory) {\n if (!Utils.isPrimitive(newValue)) {\n newValue = this.meta.factory(this.meta.key, value, this.meta.handler);\n }\n }\n const hasKey = super.has(key);\n const prevValue = super.get(key);\n const result = super.set(key, newValue);\n if (!hasKey) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n else if (prevValue !== newValue) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n return result;\n }\n delete(key) {\n const result = super.delete(key);\n if (result) {\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), undefined);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n return result;\n }\n clear() {\n if (super.size === 0)\n return;\n const metaKey = this.meta.key;\n for (const key of this.keys()) {\n this.meta.adm.report(ObservableMap.#getKey(metaKey, key), undefined);\n }\n super.clear();\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableArray extends Array {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n prepare(items) {\n const factory = this.meta.factory;\n if (!factory)\n return items;\n const adm = this.meta.adm;\n const key = this.meta.key;\n const handler = this.meta.handler;\n if (key === '')\n return items;\n for (let i = 0; i < items.length; i++) {\n if (!Utils.isPrimitive(items[i])) {\n items[i] = factory(key, items[i], handler);\n }\n }\n return items;\n }\n push(...items) {\n return this.report(super.push(...this.prepare(items)));\n }\n unshift(...items) {\n return this.report(super.unshift(...this.prepare(items)));\n }\n splice(start, deleteCount, ...items) {\n return this.report(super.splice(start, deleteCount, ...this.prepare(items)));\n }\n copyWithin(target, start, end) {\n return this.report(super.copyWithin(target, start, end));\n }\n pop() {\n return this.report(super.pop());\n }\n reverse() {\n return this.report(super.reverse());\n }\n shift() {\n return this.report(super.shift());\n }\n sort(compareFn) {\n return this.report(super.sort(compareFn));\n }\n set(i, v) {\n return this.report(this[i] = v);\n }\n}\nif (!Reflect.has(Array.prototype, 'set')) {\n Array.prototype.set = function (i, value) {\n this[i] = value;\n };\n}\n","import { Admin } from './Admin.js';\nimport { Computed } from './Computed.js';\nimport { ProxyHandler } from './Proxy.handler.js';\nimport { ActionHandler } from './Action.handler.js';\nimport { ObservableSet } from './Observable.set.js';\nimport { ObservableMap } from './Observable.map.js';\nimport { ObservableArray } from './Observable.array.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nfunction setDefaultTypes(types, ignore, shallow) {\n ignore?.forEach(key => types[key] = Utils.IGNORED);\n shallow?.forEach(key => types[key] = Utils.SHALLOW);\n return types;\n}\nclass Factory {\n static descriptor(property, descriptor, handler) {\n if (!(property in handler.types)) {\n if ('value' in descriptor) {\n if (descriptor.writable) {\n handler.types[property] = Utils.WRITABLE;\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n if (descriptor.get)\n descriptor.get = descriptor.get.bind(handler.receiver);\n if (descriptor.set)\n descriptor.set = descriptor.set.bind(handler.receiver);\n if (handler.types[property] === Utils.IGNORED)\n return descriptor;\n if (handler.types[property] === Utils.ACCESSOR) {\n if (descriptor.get) {\n descriptor = new Computed(property, descriptor, handler);\n }\n }\n else {\n if (!Utils.isPrimitive(descriptor.value)) {\n descriptor.value = Factory.object(property, descriptor.value, handler);\n }\n }\n return descriptor;\n }\n static object(property, value, handler) {\n if (Utils.getAdm(value))\n return value;\n if (handler.types[property] === Utils.IGNORED)\n return value;\n if (value['meta']?.key === '')\n return value;\n if (Utils.isPlainObject(value)) {\n return makeObservable(value);\n }\n if (typeof value === 'function') {\n return new Proxy(value, new ActionHandler(handler.receiver));\n }\n const isShallow = handler.types[property] === Utils.SHALLOW;\n const meta = {\n key: property.toString(),\n handler,\n adm: handler.adm,\n factory: isShallow ? undefined : Factory.object\n };\n if (value instanceof Array) {\n if (!isShallow) {\n for (let i = 0; i < value.length; i++) {\n if (!Utils.isPrimitive(value[i])) {\n value[i] = Factory.object(property, value[i], handler);\n }\n }\n }\n Object.setPrototypeOf(value, ObservableArray.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Map) {\n Object.setPrototypeOf(value, ObservableMap.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Set) {\n Object.setPrototypeOf(value, ObservableSet.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n return value;\n }\n}\nexport class Observable {\n constructor() {\n const ctor = new.target;\n const adm = new Admin(ctor.name);\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(this, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ctor.ignore, ctor.shallow);\n const chain = [];\n let current = ctor.prototype;\n while (current !== Observable.prototype) {\n chain.push(current);\n current = Object.getPrototypeOf(current);\n }\n const skip = new Set(['constructor']);\n for (const proto of chain) {\n for (const key of Reflect.ownKeys(proto)) {\n if (skip.has(key))\n continue;\n skip.add(key);\n const desc = Reflect.getOwnPropertyDescriptor(proto, key);\n Object.defineProperty(this, key, Factory.descriptor(key, desc, handler));\n }\n }\n return proxy;\n }\n}\nconst error = new TypeError('Invalid argument. Only plain objects are allowed');\nexport function makeObservable(value, ignore, shallow) {\n if (Utils.isPrimitive(value))\n throw error;\n if (!Utils.isPlainObject(value))\n throw error;\n if (Utils.getAdm(value))\n return value;\n const adm = new Admin('');\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(value, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ignore, shallow);\n for (const key in value) {\n const descriptor = Factory.descriptor(key, Object.getOwnPropertyDescriptor(value, key), handler);\n if (descriptor.writable) {\n value[key] = descriptor.value;\n }\n else {\n Object.defineProperty(value, key, descriptor);\n }\n }\n return proxy;\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Person extends Observable {\n id;\n name;\n lastMessage = null;\n rooms = new Set();\n status = 'Online';\n \n constructor(id, name) {\n super()\n this.id = id;\n this.name = name;\n }\n\n setName(name) {\n this.name = name;\n }\n\n setLastMessage(message) {\n this.lastMessage = message;\n }\n\n addRoom(room) {\n this.rooms.add(room);\n }\n\n removeRoom(room) {\n this.rooms.delete(room);\n }\n\n setStatus(status) {\n this.status = status;\n this.rooms.forEach(room => {\n room.addStatusUpdate(this, status);\n });\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable, transaction } from \"kr-observable\";\n\nconst MAX_ROOM_UPDATES = 10;\n\nexport class Room extends Observable {\n name;\n people = new Map();\n messages = [];\n roomUpdates = [];\n\n constructor(name) {\n super()\n this.name = name;\n }\n\n get messageCount() {\n return this.messages.length;\n }\n\n get peopleCount() {\n return this.people.size;\n }\n\n get lastMessage() {\n // if (this.messages.length === 0) {\n // return null;\n // }\n return this.messages.at(-1);\n }\n\n get members() {\n return Array.from(this.people.values());\n }\n\n addPerson(person) {\n if (!this.people.has(person.id)) {\n this.people.set(person.id, person);\n person.addRoom(this);\n }\n }\n\n removePerson(personId) {\n const person = this.people.get(personId);\n if (person) {\n person.removeRoom(this);\n this.people.delete(personId);\n }\n }\n\n addMessage(message) {\n transaction(() => {\n message.author.setLastMessage(message);\n this.messages.push(message);\n })\n }\n\n addStatusUpdate(person, status) {\n this.roomUpdates.push(`${person.name} is now ${status}`);\n if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2)\n this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES);\n }\n\n dispose(notifications) {\n this.people.forEach(person => person.removeRoom(this));\n if (notifications) {\n notifications.removeRoom(this.name);\n }\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Message extends Observable {\n static ignore = new Set(['id', 'author', 'timestamp'])\n static _nextId = 0;\n \n id;\n text;\n author; // Person\n timestamp;\n\n static nextId() {\n return Message._nextId++;\n }\n\n constructor(text, author) {\n super();\n this.id = Message.nextId();\n this.text = text;\n this.author = author;\n this.timestamp = new Date();\n }\n\n updateText(text) {\n this.text = text;\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\nimport { Observable, listen, subscribe } from 'kr-observable';\n\nexport class Notifications extends Observable {\n static ignore = new Set(['lastMessage', 'roomDisposers'])\n static roomSubscribeKeys = new Set(['lastMessage'])\n lastMessages = new Map(); // Map\n lastMessage; roomDisposers = new Map(); // Map\n\n constructor(rooms) {\n super()\n rooms.forEach(room => this.addRoom(room));\n }\n\n addRoom(room) {\n // lastMessage is computed and evaluates lazy\n // const disposer = autorun(() => {\n // if (room.lastMessage) {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n // const disposer = listen(room, (k,v) => {\n // if (k && v === 'lastMessage') {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n room.lastMessage\n const disposer = subscribe(room, () => {\n if (room.lastMessage) {\n this.updateLastMessage(room.name, room.lastMessage);\n }\n }, Notifications.roomSubscribeKeys)\n this.roomDisposers.set(room.name, disposer);\n }\n\n removeRoom(roomName) {\n if (this.roomDisposers.has(roomName)) {\n this.roomDisposers.get(roomName)(); // Dispose the reaction\n this.roomDisposers.delete(roomName);\n this.lastMessages.delete(roomName);\n }\n }\n\n updateLastMessage(roomName, message) {\n this.lastMessages.set(roomName, message);\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { autorun, transaction } from \"kr-observable\";\nimport { Person } from \"./Person.mjs\";\nimport { Room } from \"./Room.mjs\";\nimport { Message } from \"./Message.mjs\";\nimport { Notifications } from \"./Notifications.mjs\";\n\nfunction assert(condition) {\n if (!condition) throw new Error(\"Assertion failure\");\n}\n\nexport function runTest() {\n const logs = [];\n const customLog = (...args) => logs.push(args.join(\" \"));\n\n // --- Setup ---\n const techRoom = new Room(\"Tech Talk\");\n const generalRoom = new Room(\"General Chat\");\n const largeRoom = new Room(\"Large Meeting Room\");\n\n const alice = new Person(1, \"Alice\");\n const bob = new Person(2, \"Bob\");\n\n techRoom.addPerson(alice);\n techRoom.addPerson(bob);\n generalRoom.addPerson(alice);\n\n const rooms = [techRoom, generalRoom, largeRoom];\n const notifications = new Notifications(rooms);\n\n // --- Large Room Setup ---\n customLog(\"\\n--- Setting up Large Meeting Room ---\");\n const largeRoomMembers = [];\n for (let i = 3; i < 203; i++) {\n const person = new Person(i, `Person ${i}`);\n largeRoomMembers.push(person);\n largeRoom.addPerson(person);\n }\n customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`);\n\n // Add Alice and Bob to the large room\n largeRoom.addPerson(alice);\n largeRoom.addPerson(bob);\n customLog(\"[INFO] Added Alice and Bob to the Large Meeting Room.\");\n\n // Verify Person.rooms with Set\n assert(alice.rooms.size === 3);\n assert(\n alice.rooms.has(techRoom) &&\n alice.rooms.has(generalRoom) &&\n alice.rooms.has(largeRoom)\n );\n assert(\n bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom)\n );\n customLog(\"[PASS] Verified Person.rooms associations with Set.\");\n\n // --- autorun for global notifications ---\n const notificationsDisposer = autorun(() => {\n customLog(\"\\n--- Global Notifications (Last Messages) ---\");\n if (notifications.lastMessages.size === 0) {\n customLog(\"No messages yet.\");\n } else {\n notifications.lastMessages.forEach((message, roomName) => {\n customLog(`[${roomName}] \"${message.text}\" - ${message.author.name}`);\n });\n }\n customLog(\"------------------------------------------\");\n });\n\n // --- autorun for room updates ---\n const roomUpdatesDisposer = autorun(() => {\n rooms.forEach((room) => {\n if (room.roomUpdates.length > 0) {\n customLog(\n `[${room.name} Update] ${\n room.roomUpdates[room.roomUpdates.length - 1]\n }`\n );\n }\n });\n });\n\n // --- Status Update Scenario ---\n customLog(\"\\n--- Status Update Scenario ---\");\n\n alice.setStatus(\"Away\");\n assert(techRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(generalRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(largeRoom.roomUpdates.includes(\"Alice is now Away\"));\n customLog(\n \"[PASS] Verified that status updates are sent to all of Alice's rooms.\"\n );\n\n bob.setStatus(\"Busy\");\n assert(techRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(!generalRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(largeRoom.roomUpdates.includes(\"Bob is now Busy\"));\n customLog(\n \"[PASS] Verified that status updates are only sent to Bob's rooms.\"\n );\n\n // --- Messaging and Verification ---\n customLog(\"\\n--- Sending Messages & Verifying Notifications ---\");\n\n // Message 1: Tech Room\n const msg1 = new Message(\"First message to Tech Talk!\", alice);\n techRoom.addMessage(msg1);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg1);\n customLog(\"[PASS] Verified Tech Talk notification.\");\n\n // Message 2: General Chat\n for (let i = 0; i < 20; i++) {\n const msg2 = new Message(`ping ${i}`, alice);\n generalRoom.addMessage(msg2);\n // console.log('lastMessages', notifications.lastMessages.get(\"General Chat\").author.lastMessage)\n // console.log('msg2', msg2.author.lastMessage)\n assert(notifications.lastMessages.get(\"General Chat\") === msg2);\n }\n customLog(\"[PASS] Verified General Chat notification.\");\n\n // Message 3: Large Meeting Room\n for (let i = 0; i <= 5; i++) {\n for (const member of largeRoomMembers) {\n const msg = new Message(`Hi, I am ${member.name}`, member);\n largeRoom.addMessage(msg);\n assert(largeRoom.lastMessage == msg);\n assert(notifications.lastMessages.get(\"Large Meeting Room\") === msg);\n }\n }\n customLog(\"[PASS] Verified Large Meeting Room notification.\");\n\n // Message 4: Tech Room again\n for (let i = 0; i < 20; i++) {\n const msg4 = new Message(`ping ${i}`, bob);\n techRoom.addMessage(msg4);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg4);\n }\n customLog(\"[PASS] Verified Tech Talk notification update.\");\n\n const tempRooms = [];\n for (let i = 0; i < 10; i++) {\n const roomId = `General Chat ${i}`;\n const tempRoom = new Room(roomId);\n tempRooms.push(tempRoom);\n notifications.addRoom(tempRoom);\n for (const person of largeRoomMembers.slice(0, 10)) {\n tempRoom.addPerson(person);\n }\n for (const person of tempRoom.members.slice(0, 5)) {\n const msg = new Message(`ping ${i}`, person);\n tempRoom.addMessage(msg);\n assert(notifications.lastMessages.get(roomId) === msg);\n }\n }\n tempRooms.forEach((room) => room.dispose(notifications));\n\n // --- Clean up ---\n notificationsDisposer();\n roomUpdatesDisposer(); // Added disposer for room updates\n techRoom.dispose(notifications);\n generalRoom.dispose(notifications);\n largeRoom.dispose(notifications);\n\n return logs;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Executor","static","report","adm","property","set","this","length","runnable","unsubscribe","subscribe","execute","rest","active","deps","dispose","Set","push","result","run","pop","forEach","list","delete","Notifier","notify","changes","runId","subscriber","queued","queueMicrotask","flush","GlobalState","WeakMap","LibName","for","globalThis","seal","Global","queue","executor","notifier","Admin","owner","Map","listeners","current","constructor","has","add","cb","action","enqueueBatch","batch","flag","size","copy","keys","change","sub","computed","Utils","isPlainObject","ctor","isPrimitive","val","isDeepEqual","a","b","is","A","valueOf","B","getAdm","AdmKey","registry","error","TypeError","subscribersRegistry","autorun","work","disposer","debug","undefined","Computed","configurable","changed","name","descriptor","handler","prevValue","compute","prev","newValue","ProxyHandler","types","receiver","factory","IGNORED","target","WRITABLE","ACCESSOR","Reflect","object","desc","deleteProperty","res","setPrototypeOf","proto","assign","getOwnPropertyDescriptor","ActionHandler","ctx","apply","_","args","thenable","Promise","then","resolve","reject","e","clear","ObservableSet","meta","super","ObservableMap","metaKey","description","entries","values","callback","thisArg","iterator","hasKey","ObservableArray","Array","prepare","items","i","unshift","splice","start","deleteCount","copyWithin","end","reverse","shift","sort","compareFn","v","setDefaultTypes","ignore","shallow","SHALLOW","Factory","writable","bind","proxy","Proxy","makeObservable","isShallow","toString","Observable","chain","getPrototypeOf","skip","ownKeys","Person","id","lastMessage","rooms","status","setName","setLastMessage","message","addRoom","room","removeRoom","setStatus","addStatusUpdate","Room","people","messages","roomUpdates","messageCount","peopleCount","at","members","from","addPerson","person","removePerson","personId","addMessage","author","MAX_ROOM_UPDATES","slice","notifications","Message","text","timestamp","nextId","_nextId","Date","updateText","Notifications","lastMessages","roomDisposers","registered","adms","updateLastMessage","roomSubscribeKeys","roomName","assert","condition","Error","runTest","logs","customLog","join","techRoom","generalRoom","largeRoom","alice","bob","largeRoomMembers","notificationsDisposer","roomUpdatesDisposer","includes","msg1","msg2","member","msg","msg4","tempRooms","roomId","tempRoom"],"sourceRoot":""} \ No newline at end of file diff --git a/observable/dist/bundle.es5.min.js b/observable/dist/bundle.es5.min.js new file mode 100644 index 00000000..72f5fc2a --- /dev/null +++ b/observable/dist/bundle.es5.min.js @@ -0,0 +1,230 @@ +!function(){var e={d:function(t,s){for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};!function(){"use strict";e.r(t),e.d(t,{runTest:function(){return $}});class s{static#e=[];static report(e,t,s=!1){ +/*ThouShaltNotCache*/ +if(!this.#e.length)return;const r=this.#e[this.#e.length-1];s?e.unsubscribe(t,r):e.subscribe(t,r)}static execute(e,...t){ +/*ThouShaltNotCache*/ +e.active=!0,e.deps?this.dispose(e):e.deps=new Set,this.#e.push(e);const s=e.run(...t);return this.#e.pop(),e.active=!1,s}static dispose(e){ +/*ThouShaltNotCache*/ +e.deps.forEach(this.unsubscribe,e)}static unsubscribe(e){ +/*ThouShaltNotCache*/ +e.delete(this)}}class r{static queued=!1;static runId=2;static notify(e,t){ +/*ThouShaltNotCache*/ +e.runId=r.runId,e.subscriber(t),r.queued||(r.queued=!0,queueMicrotask(r.flush))}static flush(){ +/*ThouShaltNotCache*/ +r.queued=!1,r.runId=(r.runId+1)%1e5}}class i{static untracked=!1;static action=!1;static queue=new Set;static meta=new WeakMap;static executor=s;static notifier=r}const o=Symbol.for("kr-observable");globalThis[o]||(globalThis[o]=Object.seal(i));const a=globalThis[o],n=(a.executor,a.queue),c=a.notifier;class h{static meta={key:"",adm:new h("")};owner;deps=new Map;listeners;changes=new Set;current=null;queued=!1;constructor(e){ +/*ThouShaltNotCache*/ +this.owner=e}subscribe(e,t){ +/*ThouShaltNotCache*/ +let s=this.deps.get(e);s||(s=new Set,this.deps.set(e,s)),s.has(t)||s.add(t),t.deps?.has(s)||t.deps?.add(s)}unsubscribe(e,t){ +/*ThouShaltNotCache*/ +this.deps.get(e)?.delete(t)}report(e,t){if( +/*ThouShaltNotCache*/ +this.listeners?.forEach(s=>s(e,t)),this.deps.has(e))if(this.changes.add(e),a.action)n.add(this);else{if(this.queued)return;this.queued=!0,queueMicrotask(this.enqueueBatch)}}enqueueBatch=()=>{ +/*ThouShaltNotCache*/ +this.batch(),this.queued=!1};batch(e=!1){ +/*ThouShaltNotCache*/ +if(0===this.changes.size)return;const t=this.changes;if(t.size>1){const e=new Set;for(const s of this.deps.keys())t.has(s)&&e.add(s);this.changes=e}for(const s of this.changes){this.changes.delete(s),this.current=this.deps.get(s);for(const r of this.current)if(r.runId!==c.runId){if(r.active)return;if(e&&r.computed)return this.changes.add(s);c.notify(r,t)}this.current=null}}static batch(e){ +/*ThouShaltNotCache*/ +e.batch()}}class u{static AdmKey=Symbol.for("adm");static IGNORED=0;static ACCESSOR=1;static SHALLOW=2;static WRITABLE=3;static isPlainObject(e){ +/*ThouShaltNotCache*/ +const t=e?.constructor;return!t||t===Object}static isPrimitive(e){ +/*ThouShaltNotCache*/ +return null===e||"object"!=typeof e&&"function"!=typeof e}static isDeepEqual(e,t){ +/*ThouShaltNotCache*/ +if(null==e||null==t)return Object.is(e,t);const s=e.valueOf(),r=t.valueOf();if("object"==typeof s){if("object"!=typeof r)return!1;const e=Object.keys(s);if(e.length!==Object.keys(r).length)return!1;for(const t of e)if(!u.isDeepEqual(s[t],r[t]))return!1;return!0}return Object.is(e,t)}static getAdm(e){ +/*ThouShaltNotCache*/ +return e[u.AdmKey]}}const p=new Map,d=new TypeError("First argument must be Observable"),m=new Map;function l(e){ +/*ThouShaltNotCache*/ +let t=p.get(e);if(t)return t;const s={run:e,subscriber(){ +/*ThouShaltNotCache*/ +a.executor.execute(this)},debug:!1,runId:1,active:!1,deps:void 0};return t=()=>{ +/*ThouShaltNotCache*/ +p.delete(e),a.executor.dispose(s)},p.set(e,t),a.executor.execute(s),t}class f{enumerable;configurable;set;runId=1;debug=!1;active=!1;deps;#t;#s;#r;#i;#o;changed=!1;computed=!0;name;constructor(e,t,s){ +/*ThouShaltNotCache*/ +this.enumerable=t.enumerable,this.configurable=t.configurable,this.#s=e,this.#r=t,this.#t=s.adm,t.set&&(this.set=e=>{ +/*ThouShaltNotCache*/ +this.#r.set(e);const t=this.#o;this.#o=e,this.#a(t,e)})}subscriber(){ +/*ThouShaltNotCache*/ +this.changed=!0,0!==this.#t.deps.get(this.#s)?.size&&this.compute()}run(){ +/*ThouShaltNotCache*/ +return this.#r.get()}compute(){ +/*ThouShaltNotCache*/ +const e=this.#i;this.#n(),this.#a(e,this.#i)}#a(e,t){ +/*ThouShaltNotCache*/ +u.isDeepEqual(e,t)||this.#t.report(this.#s,t),a.action||this.#t.batch()}#n(){ +/*ThouShaltNotCache*/ +this.#i=a.executor.execute(this)}get=()=>( +/*ThouShaltNotCache*/ +a.action||this.#t.batch(),this.deps?0===this.deps?.size?this.run():(this.changed&&(this.changed=!1,this.#n()),this.#t.current?.has(this)&&this.compute(),this.#i):(this.#n(),this.#i))}const g=a.executor;class y{adm;types={};receiver;factory;constructor(e,t){ +/*ThouShaltNotCache*/ +this.adm=e,this.factory=t}#a(e,t){ +/*ThouShaltNotCache*/ +g.report(this.adm,e,!0),this.adm.report(e,t)}#c(e){ +/*ThouShaltNotCache*/ +this.types[e]!==u.IGNORED&&g.report(this.adm,e),a.action||this.adm.changes.size&&this.adm.changes.has(e)&&this.adm.batch(!0)}get(e,t){ +/*ThouShaltNotCache*/ +return t===u.AdmKey?this.adm:(this.#c(t),e[t])}set(e,t,s){ +/*ThouShaltNotCache*/ +return t in this.types||(this.types[t]=u.WRITABLE,this.#a(t,s)),this.types[t]===u.ACCESSOR?Reflect.set(e,t,s):(e[t]!==s&&this.#a(t,s),u.isPrimitive(s)?e[t]=s:e[t]=this.factory.object(t,s,this),!0)}defineProperty(e,t,s){ +/*ThouShaltNotCache*/ +return Reflect.defineProperty(e,t,this.factory.descriptor(t,s,this))}deleteProperty(e,t){ +/*ThouShaltNotCache*/ +if(!(t in e))return!1;const s=Reflect.deleteProperty(e,t);return this.#a(t,void 0),s}setPrototypeOf(e,t){ +/*ThouShaltNotCache*/ +const s=u.getAdm(t);return s&&Object.assign(s,this.adm),Reflect.setPrototypeOf(e,t)}has(e,t){ +/*ThouShaltNotCache*/ +return this.#c(t),t in e}getOwnPropertyDescriptor(e,t){ +/*ThouShaltNotCache*/ +return this.#c(t),Reflect.getOwnPropertyDescriptor(e,t)}}class b{ctx;constructor(e){ +/*ThouShaltNotCache*/ +this.ctx=e}apply(e,t,s){ +/*ThouShaltNotCache*/ +if(a.action)return e.apply(this.ctx,s);a.action=!0;try{let t=e.apply(this.ctx,s);const r=t instanceof Promise;return r&&(t=t.then(b.resolve,b.reject)),b.flush(),a.action=r,t}catch(e){b.reject(e)}}static flush(){ +/*ThouShaltNotCache*/ +a.queue.forEach(h.batch),a.queue.clear(),a.action=!1}static resolve(e){ +/*ThouShaltNotCache*/ +return b.flush(),e}static reject(e){ +/*ThouShaltNotCache*/ +throw b.flush(),e}}class w extends Set{get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}report(e){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),e}add(e){ +/*ThouShaltNotCache*/ +return this.report(super.add(e))}delete(e){ +/*ThouShaltNotCache*/ +return this.report(super.delete(e))}clear(){ +/*ThouShaltNotCache*/ +return super.clear(),this.report(void 0)}}class S extends Map{static#h(e,t){ +/*ThouShaltNotCache*/ +return null==t?`${e}.${t}`:"object"==typeof t?t:"symbol"==typeof t?`${e}.${t.description}`:`${e}.${t}`}get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}get size(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.size}keys(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.keys()}entries(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.entries()}values(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.values()}forEach(e,t){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.forEach(e,t)}[Symbol.iterator](){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super[Symbol.iterator]()}has(e){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,S.#h(this.meta.key,e)),super.has(e)}get(e){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,S.#h(this.meta.key,e)),super.get(e)}set(e,t){ +/*ThouShaltNotCache*/ +let s=t;this.meta.factory&&(u.isPrimitive(s)||(s=this.meta.factory(this.meta.key,t,this.meta.handler)));const r=super.has(e),i=super.get(e),o=super.set(e,s);return r?i!==s&&(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(S.#h(this.meta.key,e),s)):(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(S.#h(this.meta.key,e),s)),o}delete(e){ +/*ThouShaltNotCache*/ +const t=super.delete(e);return t&&(this.meta.adm.report(S.#h(this.meta.key,e),void 0),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)),t}clear(){ +/*ThouShaltNotCache*/ +if(0===super.size)return;const e=this.meta.key;for(const t of this.keys())this.meta.adm.report(S.#h(e,t),void 0);super.clear(),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)}}class v extends Array{get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}report(e){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),e}prepare(e){ +/*ThouShaltNotCache*/ +const t=this.meta.factory;if(!t)return e;this.meta.adm;const s=this.meta.key,r=this.meta.handler;if(""===s)return e;for(let i=0;ie[t]=u.IGNORED),s?.forEach(t=>e[t]=u.SHALLOW),e}Reflect.has(Array.prototype,"set")||(Array.prototype.set=function(e,t){ +/*ThouShaltNotCache*/ +this[e]=t});class P{static descriptor(e,t,s){ +/*ThouShaltNotCache*/ +return e in s.types||("value"in t&&t.writable?s.types[e]=u.WRITABLE:s.types[e]=u.ACCESSOR),t.get&&(t.get=t.get.bind(s.receiver)),t.set&&(t.set=t.set.bind(s.receiver)),s.types[e]===u.IGNORED||(s.types[e]===u.ACCESSOR?t.get&&(t=new f(e,t,s)):u.isPrimitive(t.value)||(t.value=P.object(e,t.value,s))),t}static object(e,t,s){ +/*ThouShaltNotCache*/ +if(u.getAdm(t))return t;if(s.types[e]===u.IGNORED)return t;if(""===t.meta?.key)return t;if(u.isPlainObject(t))return function(e,t,s){ +/*ThouShaltNotCache*/ +if(u.isPrimitive(e))throw O;if(!u.isPlainObject(e))throw O;if(u.getAdm(e))return e;const r=new h(""),i=new y(r,P),o=new Proxy(e,i);i.receiver=o,k(i.types,t,s);for(const t in e){const s=P.descriptor(t,Object.getOwnPropertyDescriptor(e,t),i);s.writable?e[t]=s.value:Object.defineProperty(e,t,s)}return o}(t);if("function"==typeof t)return new Proxy(t,new b(s.receiver));const r=s.types[e]===u.SHALLOW,i={key:e.toString(),handler:s,adm:s.adm,factory:r?void 0:P.object};if(t instanceof Array){if(!r)for(let r=0;r{ +/*ThouShaltNotCache*/ +t.addStatusUpdate(this,e)})}}class A extends M{name;people=new Map;messages=[];roomUpdates=[];constructor(e){ +/*ThouShaltNotCache*/ +super(),this.name=e}get messageCount(){ +/*ThouShaltNotCache*/ +return this.messages.length}get peopleCount(){ +/*ThouShaltNotCache*/ +return this.people.size}get lastMessage(){ +/*ThouShaltNotCache*/ +return this.messages.at(-1)}get members(){ +/*ThouShaltNotCache*/ +return Array.from(this.people.values())}addPerson(e){ +/*ThouShaltNotCache*/ +this.people.has(e.id)||(this.people.set(e.id,e),e.addRoom(this))}removePerson(e){ +/*ThouShaltNotCache*/ +const t=this.people.get(e);t&&(t.removeRoom(this),this.people.delete(e))}addMessage(e){var t; +/*ThouShaltNotCache*/ +t=()=>{ +/*ThouShaltNotCache*/ +e.author.setLastMessage(e),this.messages.push(e)}, +/*ThouShaltNotCache*/ +a.action=!0,t(),a.action=!1,a.queue.forEach(h.batch),a.queue.clear(),a.notifier.flush()}addStatusUpdate(e,t){ +/*ThouShaltNotCache*/ +this.roomUpdates.push(`${e.name} is now ${t}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(e){ +/*ThouShaltNotCache*/ +this.people.forEach(e=>e.removeRoom(this)),e&&e.removeRoom(this.name)}}class j extends M{static ignore=new Set(["id","author","timestamp"]);static _nextId=0;id;text;author;timestamp;static nextId(){ +/*ThouShaltNotCache*/ +return j._nextId++}constructor(e,t){ +/*ThouShaltNotCache*/ +super(),this.id=j.nextId(),this.text=e,this.author=t,this.timestamp=new Date}updateText(e){ +/*ThouShaltNotCache*/ +this.text=e}}class R extends M{static ignore=new Set(["lastMessage","roomDisposers"]);static roomSubscribeKeys=new Set(["lastMessage"]);lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(e){ +/*ThouShaltNotCache*/ +super(),e.forEach(e=>this.addRoom(e))}addRoom(e){ +/*ThouShaltNotCache*/ +e.lastMessage;const t=function(e,t,s){ +/*ThouShaltNotCache*/ +const r=u.getAdm(e);if(!r)throw d;let i=m.get(t);if(i)return i.adms.has(r)||s.forEach(e=>r.subscribe(e,i.runnable)),i.disposer;const o={subscriber:t,runId:1,active:!1,deps:new Set};s.forEach(e=>r.subscribe(e,o));const n=()=>{ +/*ThouShaltNotCache*/ +m.delete(t),a.executor.dispose(o)};return i={runnable:o,disposer:n,adms:new Set([r])},m.set(t,i),n}(e,()=>{ +/*ThouShaltNotCache*/ +e.lastMessage&&this.updateLastMessage(e.name,e.lastMessage)},R.roomSubscribeKeys);this.roomDisposers.set(e.name,t)}removeRoom(e){ +/*ThouShaltNotCache*/ +this.roomDisposers.has(e)&&(this.roomDisposers.get(e)(),this.roomDisposers.delete(e),this.lastMessages.delete(e))}updateLastMessage(e,t){ +/*ThouShaltNotCache*/ +this.lastMessages.set(e,t)}}function E(e){ +/*ThouShaltNotCache*/ +if(!e)throw new Error("Assertion failure")}function $(){ +/*ThouShaltNotCache*/ +const e=[],t=(...t)=>e.push(t.join(" ")),s=new A("Tech Talk"),r=new A("General Chat"),i=new A("Large Meeting Room"),o=new x(1,"Alice"),a=new x(2,"Bob");s.addPerson(o),s.addPerson(a),r.addPerson(o);const n=[s,r,i],c=new R(n);t("\n--- Setting up Large Meeting Room ---");const h=[];for(let e=3;e<203;e++){const t=new x(e,`Person ${e}`);h.push(t),i.addPerson(t)}t(`[INFO] Added ${i.peopleCount} members to the large room.`),i.addPerson(o),i.addPerson(a),t("[INFO] Added Alice and Bob to the Large Meeting Room."),E(3===o.rooms.size),E(o.rooms.has(s)&&o.rooms.has(r)&&o.rooms.has(i)),E(2===a.rooms.size&&a.rooms.has(s)&&a.rooms.has(i)),t("[PASS] Verified Person.rooms associations with Set.");const u=l(()=>{ +/*ThouShaltNotCache*/ +t("\n--- Global Notifications (Last Messages) ---"),0===c.lastMessages.size?t("No messages yet."):c.lastMessages.forEach((e,s)=>{ +/*ThouShaltNotCache*/ +t(`[${s}] "${e.text}" - ${e.author.name}`)}),t("------------------------------------------")}),p=l(()=>{ +/*ThouShaltNotCache*/ +n.forEach(e=>{ +/*ThouShaltNotCache*/ +e.roomUpdates.length>0&&t(`[${e.name} Update] ${e.roomUpdates[e.roomUpdates.length-1]}`)})});t("\n--- Status Update Scenario ---"),o.setStatus("Away"),E(s.roomUpdates.includes("Alice is now Away")),E(r.roomUpdates.includes("Alice is now Away")),E(i.roomUpdates.includes("Alice is now Away")),t("[PASS] Verified that status updates are sent to all of Alice's rooms."),a.setStatus("Busy"),E(s.roomUpdates.includes("Bob is now Busy")),E(!r.roomUpdates.includes("Bob is now Busy")),E(i.roomUpdates.includes("Bob is now Busy")),t("[PASS] Verified that status updates are only sent to Bob's rooms."),t("\n--- Sending Messages & Verifying Notifications ---");const d=new j("First message to Tech Talk!",o);s.addMessage(d),E(c.lastMessages.get("Tech Talk")===d),t("[PASS] Verified Tech Talk notification.");for(let e=0;e<20;e++){const t=new j(`ping ${e}`,o);r.addMessage(t),E(c.lastMessages.get("General Chat")===t)}t("[PASS] Verified General Chat notification.");for(let e=0;e<=5;e++)for(const e of h){const t=new j(`Hi, I am ${e.name}`,e);i.addMessage(t),E(i.lastMessage==t),E(c.lastMessages.get("Large Meeting Room")===t)}t("[PASS] Verified Large Meeting Room notification.");for(let e=0;e<20;e++){const t=new j(`ping ${e}`,a);s.addMessage(t),E(c.lastMessages.get("Tech Talk")===t)}t("[PASS] Verified Tech Talk notification update.");const m=[];for(let e=0;e<10;e++){const t=`General Chat ${e}`,s=new A(t);m.push(s),c.addRoom(s);for(const e of h.slice(0,10))s.addPerson(e);for(const r of s.members.slice(0,5)){const i=new j(`ping ${e}`,r);s.addMessage(i),E(c.lastMessages.get(t)===i)}}return m.forEach(e=>e.dispose(c)),u(),p(),s.dispose(c),r.dispose(c),i.dispose(c),e}}(),MobXBenchmark=t}(); +//# sourceMappingURL=bundle.es5.min.js.map \ No newline at end of file diff --git a/observable/dist/bundle.es5.min.js.map b/observable/dist/bundle.es5.min.js.map new file mode 100644 index 00000000..c5cee05e --- /dev/null +++ b/observable/dist/bundle.es5.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.es5.min.js","mappings":"YACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECCtGV,EAAwB,SAASC,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GACvD,G,2ECNO,MAAMC,EACTC,SAAgB,GAChB,aAAOC,CAAOC,EAAKC,EAAUC,GAAM;;AAC/B,IAAKC,MAAK,EAAOC,OACb,OACJ,MAAMC,EAAWF,MAAK,EAAOA,MAAK,EAAOC,OAAS,GAC9CF,EACAF,EAAIM,YAAYL,EAAUI,GAG1BL,EAAIO,UAAUN,EAAUI,EAEhC,CACA,cAAOG,CAAQH,KAAaI;;AACxBJ,EAASK,QAAS,EACbL,EAASM,KAIVR,KAAKS,QAAQP,GAHbA,EAASM,KAAO,IAAIE,IAKxBV,MAAK,EAAOW,KAAKT,GACjB,MAAMU,EAASV,EAASW,OAAOP,GAG/B,OAFAN,MAAK,EAAOc,MACZZ,EAASK,QAAS,EACXK,CACX,CACA,cAAOH,CAAQP;;AACXA,EAASM,KAAKO,QAAQf,KAAKG,YAAaD,EAC5C,CACA,kBAAOC,CAAYa;;AACfA,EAAKC,OAAOjB,KAChB,EChCG,MAAMkB,EACTvB,eAAgB,EAChBA,aAAe,EACf,aAAOwB,CAAOjB,EAAUkB;;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pBnB,EAAOhB,EAAcS,aAAaxN,IAAIqP,KAAYH,EACpD,CACF,CAUA,OATAE,EAAUtN,QAAS4J,GAASA,EAAKlK,QAAQuL,IAGzC6B,IACAC,IACAP,EAAS9M,QAAQuL,GACjBwB,EAAY/M,QAAQuL,GACpByB,EAAUhN,QAAQuL,GAEXoB,CACT,C","sources":["webpack://MobXBenchmark/webpack/bootstrap","webpack://MobXBenchmark/webpack/runtime/define property getters","webpack://MobXBenchmark/webpack/runtime/hasOwnProperty shorthand","webpack://MobXBenchmark/webpack/runtime/make namespace object","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Executor.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Notifier.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/global.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Admin.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Utils.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/api.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Computed.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Proxy.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Action.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.set.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.map.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.array.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.js","webpack://MobXBenchmark/./src/Person.mjs","webpack://MobXBenchmark/./src/Room.mjs","webpack://MobXBenchmark/./src/Message.mjs","webpack://MobXBenchmark/./src/Notifications.mjs","webpack://MobXBenchmark/./src/test.mjs"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Executor {\n static #stack = [];\n static report(adm, property, set = false) {\n if (!this.#stack.length)\n return;\n const runnable = this.#stack[this.#stack.length - 1];\n if (set) {\n adm.unsubscribe(property, runnable);\n }\n else {\n adm.subscribe(property, runnable);\n }\n }\n static execute(runnable, ...rest) {\n runnable.active = true;\n if (!runnable.deps) {\n runnable.deps = new Set;\n }\n else {\n this.dispose(runnable);\n }\n this.#stack.push(runnable);\n const result = runnable.run(...rest);\n this.#stack.pop();\n runnable.active = false;\n return result;\n }\n static dispose(runnable) {\n runnable.deps.forEach(this.unsubscribe, runnable);\n }\n static unsubscribe(list) {\n list.delete(this);\n }\n}\n","export class Notifier {\n static queued = false;\n static runId = 2;\n static notify(runnable, changes) {\n runnable.runId = Notifier.runId;\n runnable.subscriber(changes);\n if (Notifier.queued)\n return;\n Notifier.queued = true;\n queueMicrotask(Notifier.flush);\n }\n static flush() {\n Notifier.queued = false;\n Notifier.runId = (Notifier.runId + 1) % 100_000;\n }\n}\n","import { Executor } from './Executor.js';\nimport { Notifier } from './Notifier.js';\nclass GlobalState {\n static untracked = false;\n static action = false;\n static queue = new Set;\n static meta = new WeakMap;\n static executor = Executor;\n static notifier = Notifier;\n}\nconst LibName = Symbol.for('kr-observable');\nif (!globalThis[LibName]) {\n globalThis[LibName] = Object.seal(GlobalState);\n}\nexport const Global = globalThis[LibName];\nexport const executor = Global.executor;\n","import { Global } from './global.js';\nconst queue = Global.queue;\nconst notifier = Global.notifier;\nexport class Admin {\n static meta = { key: '', adm: new Admin('') };\n owner;\n deps = new Map;\n listeners;\n changes = new Set;\n current = null;\n queued = false;\n constructor(owner) {\n this.owner = owner;\n }\n subscribe(property, runnable) {\n let list = this.deps.get(property);\n if (!list) {\n list = new Set;\n this.deps.set(property, list);\n }\n if (!list.has(runnable)) {\n list.add(runnable);\n }\n if (!runnable.deps?.has(list)) {\n runnable.deps?.add(list);\n }\n }\n unsubscribe(property, runnable) {\n this.deps.get(property)?.delete(runnable);\n }\n report(property, value) {\n this.listeners?.forEach(cb => cb(property, value));\n if (!this.deps.has(property))\n return;\n this.changes.add(property);\n if (Global.action) {\n queue.add(this);\n }\n else {\n if (this.queued)\n return;\n this.queued = true;\n queueMicrotask(this.enqueueBatch);\n }\n }\n enqueueBatch = () => {\n this.batch();\n this.queued = false;\n };\n batch(flag = false) {\n if (this.changes.size === 0)\n return;\n const changes = this.changes;\n if (changes.size > 1) {\n const copy = new Set();\n for (const key of this.deps.keys()) {\n if (changes.has(key))\n copy.add(key);\n }\n this.changes = copy;\n }\n for (const change of this.changes) {\n this.changes.delete(change);\n this.current = this.deps.get(change);\n for (const sub of this.current) {\n if (sub.runId !== notifier.runId) {\n if (sub.active) {\n return;\n }\n if (flag && sub.computed) {\n return this.changes.add(change);\n }\n notifier.notify(sub, changes);\n }\n }\n this.current = null;\n }\n }\n static batch(adm) {\n adm.batch();\n }\n}\n","export class Utils {\n static AdmKey = Symbol.for('adm');\n static IGNORED = 0;\n static ACCESSOR = 1;\n static SHALLOW = 2;\n static WRITABLE = 3;\n static isPlainObject(value) {\n const ctor = value?.constructor;\n return !ctor || ctor === Object;\n }\n static isPrimitive(val) {\n return val === null || (typeof val !== 'object' && typeof val !== 'function');\n }\n static isDeepEqual(a, b) {\n if (a == null || b == null)\n return Object.is(a, b);\n const A = a.valueOf();\n const B = b.valueOf();\n if (typeof A === 'object') {\n if (typeof B !== 'object')\n return false;\n const keys = Object.keys(A);\n if (keys.length !== Object.keys(B).length)\n return false;\n for (const key of keys) {\n if (!Utils.isDeepEqual(A[key], B[key]))\n return false;\n }\n return true;\n }\n return Object.is(a, b);\n }\n static getAdm(value) {\n return value[Utils.AdmKey];\n }\n}\n","import { Admin } from './Admin.js';\nimport { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst registry = new Map();\nconst error = new TypeError('First argument must be Observable');\nconst subscribersRegistry = new Map();\nexport function subscribe(target, cb, keys) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n let registered = subscribersRegistry.get(cb);\n if (registered) {\n if (!registered.adms.has(adm)) {\n keys.forEach(key => adm.subscribe(key, registered.runnable));\n }\n return registered.disposer;\n }\n const runnable = { subscriber: cb, runId: 1, active: false, deps: new Set };\n keys.forEach(key => adm.subscribe(key, runnable));\n const disposer = () => {\n subscribersRegistry.delete(cb);\n Global.executor.dispose(runnable);\n };\n registered = { runnable, disposer, adms: new Set([adm]) };\n subscribersRegistry.set(cb, registered);\n return disposer;\n}\nexport function autorun(work) {\n let disposer = registry.get(work);\n if (disposer)\n return disposer;\n const runnable = {\n run: work,\n subscriber() {\n Global.executor.execute(this);\n },\n debug: false,\n runId: 1,\n active: false,\n deps: undefined\n };\n disposer = () => {\n registry.delete(work);\n Global.executor.dispose(runnable);\n };\n registry.set(work, disposer);\n Global.executor.execute(runnable);\n return disposer;\n}\nexport function listen(target, cb) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n if (!adm.listeners)\n adm.listeners = new Set();\n adm.listeners.add(cb);\n return () => void adm.listeners.delete(cb);\n}\nexport function transaction(work) {\n Global.action = true;\n work();\n Global.action = false;\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.notifier.flush();\n}\nexport function untracked(work) {\n Global.untracked = true;\n const result = work();\n Global.untracked = false;\n return result;\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nexport class Computed {\n enumerable;\n configurable;\n set;\n runId = 1;\n debug = false;\n active = false;\n deps;\n #adm;\n #property;\n #descriptor;\n #value;\n #setterValue;\n changed = false;\n computed = true;\n name;\n constructor(property, descriptor, handler) {\n this.enumerable = descriptor.enumerable;\n this.configurable = descriptor.configurable;\n this.#property = property;\n this.#descriptor = descriptor;\n this.#adm = handler.adm;\n if (descriptor.set) {\n this.set = (value) => {\n this.#descriptor.set(value);\n const prevValue = this.#setterValue;\n this.#setterValue = value;\n this.#report(prevValue, value);\n };\n }\n }\n subscriber() {\n this.changed = true;\n if (this.#adm.deps.get(this.#property)?.size === 0) {\n return;\n }\n this.compute();\n }\n run() {\n return this.#descriptor.get();\n }\n compute() {\n const prev = this.#value;\n this.#reader();\n this.#report(prev, this.#value);\n }\n #report(prevValue, newValue) {\n if (!Utils.isDeepEqual(prevValue, newValue)) {\n this.#adm.report(this.#property, newValue);\n }\n if (Global.action)\n return;\n this.#adm.batch();\n }\n #reader() {\n this.#value = Global.executor.execute(this);\n }\n get = () => {\n if (!Global.action) {\n this.#adm.batch();\n }\n if (!this.deps) {\n this.#reader();\n return this.#value;\n }\n if (this.deps?.size === 0) {\n return this.run();\n }\n if (this.changed) {\n this.changed = false;\n this.#reader();\n }\n if (this.#adm.current?.has(this)) {\n this.compute();\n }\n return this.#value;\n };\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst executor = Global.executor;\nexport class ProxyHandler {\n adm;\n types = {};\n receiver;\n factory;\n constructor(adm, factory) {\n this.adm = adm;\n this.factory = factory;\n }\n #report(property, value) {\n executor.report(this.adm, property, true);\n this.adm.report(property, value);\n }\n #batch(property) {\n if (this.types[property] !== Utils.IGNORED) {\n executor.report(this.adm, property);\n }\n if (Global.action)\n return;\n if (!this.adm.changes.size)\n return;\n if (this.adm.changes.has(property)) {\n this.adm.batch(true);\n }\n }\n get(target, property) {\n if (property === Utils.AdmKey)\n return this.adm;\n this.#batch(property);\n return target[property];\n }\n set(target, property, value) {\n if (!(property in this.types)) {\n this.types[property] = Utils.WRITABLE;\n this.#report(property, value);\n }\n if (this.types[property] === Utils.ACCESSOR) {\n return Reflect.set(target, property, value);\n }\n if (target[property] !== value) {\n this.#report(property, value);\n }\n if (Utils.isPrimitive(value)) {\n target[property] = value;\n }\n else {\n target[property] = this.factory.object(property, value, this);\n }\n return true;\n }\n defineProperty(target, property, desc) {\n return Reflect.defineProperty(target, property, this.factory.descriptor(property, desc, this));\n }\n deleteProperty(target, property) {\n if (!(property in target))\n return false;\n const res = Reflect.deleteProperty(target, property);\n this.#report(property, undefined);\n return res;\n }\n setPrototypeOf(target, proto) {\n const adm = Utils.getAdm(proto);\n if (adm)\n Object.assign(adm, this.adm);\n return Reflect.setPrototypeOf(target, proto);\n }\n has(target, property) {\n this.#batch(property);\n return property in target;\n }\n getOwnPropertyDescriptor(target, property) {\n this.#batch(property);\n return Reflect.getOwnPropertyDescriptor(target, property);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ActionHandler {\n ctx;\n constructor(receiver) {\n this.ctx = receiver;\n }\n apply(target, _, args) {\n if (Global.action)\n return target.apply(this.ctx, args);\n Global.action = true;\n try {\n let result = target.apply(this.ctx, args);\n const thenable = result instanceof Promise;\n if (thenable) {\n result = result.then(ActionHandler.resolve, ActionHandler.reject);\n }\n ActionHandler.flush();\n Global.action = thenable;\n return result;\n }\n catch (e) {\n ActionHandler.reject(e);\n }\n }\n static flush() {\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.action = false;\n }\n static resolve(result) {\n ActionHandler.flush();\n return result;\n }\n static reject(error) {\n ActionHandler.flush();\n throw error;\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ObservableSet extends Set {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n add(value) {\n return this.report(super.add(value));\n }\n delete(value) {\n return this.report(super.delete(value));\n }\n clear() {\n super.clear();\n return this.report(undefined);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableMap extends Map {\n static #getKey(metaKey, key) {\n if (key == undefined)\n return `${metaKey}.${key}`;\n if (typeof key === 'object')\n return key;\n if (typeof key === 'symbol')\n return `${metaKey}.${key.description}`;\n return `${metaKey}.${key}`;\n }\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n get size() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.size;\n }\n keys() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.keys();\n }\n entries() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.entries();\n }\n values() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.values();\n }\n forEach(callback, thisArg) {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.forEach(callback, thisArg);\n }\n [Symbol.iterator]() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super[Symbol.iterator]();\n }\n has(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.has(key);\n }\n get(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.get(key);\n }\n set(key, value) {\n let newValue = value;\n if (this.meta.factory) {\n if (!Utils.isPrimitive(newValue)) {\n newValue = this.meta.factory(this.meta.key, value, this.meta.handler);\n }\n }\n const hasKey = super.has(key);\n const prevValue = super.get(key);\n const result = super.set(key, newValue);\n if (!hasKey) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n else if (prevValue !== newValue) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n return result;\n }\n delete(key) {\n const result = super.delete(key);\n if (result) {\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), undefined);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n return result;\n }\n clear() {\n if (super.size === 0)\n return;\n const metaKey = this.meta.key;\n for (const key of this.keys()) {\n this.meta.adm.report(ObservableMap.#getKey(metaKey, key), undefined);\n }\n super.clear();\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableArray extends Array {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n prepare(items) {\n const factory = this.meta.factory;\n if (!factory)\n return items;\n const adm = this.meta.adm;\n const key = this.meta.key;\n const handler = this.meta.handler;\n if (key === '')\n return items;\n for (let i = 0; i < items.length; i++) {\n if (!Utils.isPrimitive(items[i])) {\n items[i] = factory(key, items[i], handler);\n }\n }\n return items;\n }\n push(...items) {\n return this.report(super.push(...this.prepare(items)));\n }\n unshift(...items) {\n return this.report(super.unshift(...this.prepare(items)));\n }\n splice(start, deleteCount, ...items) {\n return this.report(super.splice(start, deleteCount, ...this.prepare(items)));\n }\n copyWithin(target, start, end) {\n return this.report(super.copyWithin(target, start, end));\n }\n pop() {\n return this.report(super.pop());\n }\n reverse() {\n return this.report(super.reverse());\n }\n shift() {\n return this.report(super.shift());\n }\n sort(compareFn) {\n return this.report(super.sort(compareFn));\n }\n set(i, v) {\n return this.report(this[i] = v);\n }\n}\nif (!Reflect.has(Array.prototype, 'set')) {\n Array.prototype.set = function (i, value) {\n this[i] = value;\n };\n}\n","import { Admin } from './Admin.js';\nimport { Computed } from './Computed.js';\nimport { ProxyHandler } from './Proxy.handler.js';\nimport { ActionHandler } from './Action.handler.js';\nimport { ObservableSet } from './Observable.set.js';\nimport { ObservableMap } from './Observable.map.js';\nimport { ObservableArray } from './Observable.array.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nfunction setDefaultTypes(types, ignore, shallow) {\n ignore?.forEach(key => types[key] = Utils.IGNORED);\n shallow?.forEach(key => types[key] = Utils.SHALLOW);\n return types;\n}\nclass Factory {\n static descriptor(property, descriptor, handler) {\n if (!(property in handler.types)) {\n if ('value' in descriptor) {\n if (descriptor.writable) {\n handler.types[property] = Utils.WRITABLE;\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n if (descriptor.get)\n descriptor.get = descriptor.get.bind(handler.receiver);\n if (descriptor.set)\n descriptor.set = descriptor.set.bind(handler.receiver);\n if (handler.types[property] === Utils.IGNORED)\n return descriptor;\n if (handler.types[property] === Utils.ACCESSOR) {\n if (descriptor.get) {\n descriptor = new Computed(property, descriptor, handler);\n }\n }\n else {\n if (!Utils.isPrimitive(descriptor.value)) {\n descriptor.value = Factory.object(property, descriptor.value, handler);\n }\n }\n return descriptor;\n }\n static object(property, value, handler) {\n if (Utils.getAdm(value))\n return value;\n if (handler.types[property] === Utils.IGNORED)\n return value;\n if (value['meta']?.key === '')\n return value;\n if (Utils.isPlainObject(value)) {\n return makeObservable(value);\n }\n if (typeof value === 'function') {\n return new Proxy(value, new ActionHandler(handler.receiver));\n }\n const isShallow = handler.types[property] === Utils.SHALLOW;\n const meta = {\n key: property.toString(),\n handler,\n adm: handler.adm,\n factory: isShallow ? undefined : Factory.object\n };\n if (value instanceof Array) {\n if (!isShallow) {\n for (let i = 0; i < value.length; i++) {\n if (!Utils.isPrimitive(value[i])) {\n value[i] = Factory.object(property, value[i], handler);\n }\n }\n }\n Object.setPrototypeOf(value, ObservableArray.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Map) {\n Object.setPrototypeOf(value, ObservableMap.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Set) {\n Object.setPrototypeOf(value, ObservableSet.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n return value;\n }\n}\nexport class Observable {\n constructor() {\n const ctor = new.target;\n const adm = new Admin(ctor.name);\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(this, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ctor.ignore, ctor.shallow);\n const chain = [];\n let current = ctor.prototype;\n while (current !== Observable.prototype) {\n chain.push(current);\n current = Object.getPrototypeOf(current);\n }\n const skip = new Set(['constructor']);\n for (const proto of chain) {\n for (const key of Reflect.ownKeys(proto)) {\n if (skip.has(key))\n continue;\n skip.add(key);\n const desc = Reflect.getOwnPropertyDescriptor(proto, key);\n Object.defineProperty(this, key, Factory.descriptor(key, desc, handler));\n }\n }\n return proxy;\n }\n}\nconst error = new TypeError('Invalid argument. Only plain objects are allowed');\nexport function makeObservable(value, ignore, shallow) {\n if (Utils.isPrimitive(value))\n throw error;\n if (!Utils.isPlainObject(value))\n throw error;\n if (Utils.getAdm(value))\n return value;\n const adm = new Admin('');\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(value, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ignore, shallow);\n for (const key in value) {\n const descriptor = Factory.descriptor(key, Object.getOwnPropertyDescriptor(value, key), handler);\n if (descriptor.writable) {\n value[key] = descriptor.value;\n }\n else {\n Object.defineProperty(value, key, descriptor);\n }\n }\n return proxy;\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Person extends Observable {\n id;\n name;\n lastMessage = null;\n rooms = new Set();\n status = 'Online';\n \n constructor(id, name) {\n super()\n this.id = id;\n this.name = name;\n }\n\n setName(name) {\n this.name = name;\n }\n\n setLastMessage(message) {\n this.lastMessage = message;\n }\n\n addRoom(room) {\n this.rooms.add(room);\n }\n\n removeRoom(room) {\n this.rooms.delete(room);\n }\n\n setStatus(status) {\n this.status = status;\n this.rooms.forEach(room => {\n room.addStatusUpdate(this, status);\n });\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable, transaction } from \"kr-observable\";\n\nconst MAX_ROOM_UPDATES = 10;\n\nexport class Room extends Observable {\n name;\n people = new Map();\n messages = [];\n roomUpdates = [];\n\n constructor(name) {\n super()\n this.name = name;\n }\n\n get messageCount() {\n return this.messages.length;\n }\n\n get peopleCount() {\n return this.people.size;\n }\n\n get lastMessage() {\n // if (this.messages.length === 0) {\n // return null;\n // }\n return this.messages.at(-1);\n }\n\n get members() {\n return Array.from(this.people.values());\n }\n\n addPerson(person) {\n if (!this.people.has(person.id)) {\n this.people.set(person.id, person);\n person.addRoom(this);\n }\n }\n\n removePerson(personId) {\n const person = this.people.get(personId);\n if (person) {\n person.removeRoom(this);\n this.people.delete(personId);\n }\n }\n\n addMessage(message) {\n transaction(() => {\n message.author.setLastMessage(message);\n this.messages.push(message);\n })\n }\n\n addStatusUpdate(person, status) {\n this.roomUpdates.push(`${person.name} is now ${status}`);\n if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2)\n this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES);\n }\n\n dispose(notifications) {\n this.people.forEach(person => person.removeRoom(this));\n if (notifications) {\n notifications.removeRoom(this.name);\n }\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Message extends Observable {\n static ignore = new Set(['id', 'author', 'timestamp'])\n static _nextId = 0;\n \n id;\n text;\n author; // Person\n timestamp;\n\n static nextId() {\n return Message._nextId++;\n }\n\n constructor(text, author) {\n super();\n this.id = Message.nextId();\n this.text = text;\n this.author = author;\n this.timestamp = new Date();\n }\n\n updateText(text) {\n this.text = text;\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\nimport { Observable, listen, subscribe } from 'kr-observable';\n\nexport class Notifications extends Observable {\n static ignore = new Set(['lastMessage', 'roomDisposers'])\n static roomSubscribeKeys = new Set(['lastMessage'])\n lastMessages = new Map(); // Map\n lastMessage; roomDisposers = new Map(); // Map\n\n constructor(rooms) {\n super()\n rooms.forEach(room => this.addRoom(room));\n }\n\n addRoom(room) {\n // lastMessage is computed and evaluates lazy\n // const disposer = autorun(() => {\n // if (room.lastMessage) {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n // const disposer = listen(room, (k,v) => {\n // if (k && v === 'lastMessage') {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n room.lastMessage\n const disposer = subscribe(room, () => {\n if (room.lastMessage) {\n this.updateLastMessage(room.name, room.lastMessage);\n }\n }, Notifications.roomSubscribeKeys)\n this.roomDisposers.set(room.name, disposer);\n }\n\n removeRoom(roomName) {\n if (this.roomDisposers.has(roomName)) {\n this.roomDisposers.get(roomName)(); // Dispose the reaction\n this.roomDisposers.delete(roomName);\n this.lastMessages.delete(roomName);\n }\n }\n\n updateLastMessage(roomName, message) {\n this.lastMessages.set(roomName, message);\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { autorun, transaction } from \"kr-observable\";\nimport { Person } from \"./Person.mjs\";\nimport { Room } from \"./Room.mjs\";\nimport { Message } from \"./Message.mjs\";\nimport { Notifications } from \"./Notifications.mjs\";\n\nfunction assert(condition) {\n if (!condition) throw new Error(\"Assertion failure\");\n}\n\nexport function runTest() {\n const logs = [];\n const customLog = (...args) => logs.push(args.join(\" \"));\n\n // --- Setup ---\n const techRoom = new Room(\"Tech Talk\");\n const generalRoom = new Room(\"General Chat\");\n const largeRoom = new Room(\"Large Meeting Room\");\n\n const alice = new Person(1, \"Alice\");\n const bob = new Person(2, \"Bob\");\n\n techRoom.addPerson(alice);\n techRoom.addPerson(bob);\n generalRoom.addPerson(alice);\n\n const rooms = [techRoom, generalRoom, largeRoom];\n const notifications = new Notifications(rooms);\n\n // --- Large Room Setup ---\n customLog(\"\\n--- Setting up Large Meeting Room ---\");\n const largeRoomMembers = [];\n for (let i = 3; i < 203; i++) {\n const person = new Person(i, `Person ${i}`);\n largeRoomMembers.push(person);\n largeRoom.addPerson(person);\n }\n customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`);\n\n // Add Alice and Bob to the large room\n largeRoom.addPerson(alice);\n largeRoom.addPerson(bob);\n customLog(\"[INFO] Added Alice and Bob to the Large Meeting Room.\");\n\n // Verify Person.rooms with Set\n assert(alice.rooms.size === 3);\n assert(\n alice.rooms.has(techRoom) &&\n alice.rooms.has(generalRoom) &&\n alice.rooms.has(largeRoom)\n );\n assert(\n bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom)\n );\n customLog(\"[PASS] Verified Person.rooms associations with Set.\");\n\n // --- autorun for global notifications ---\n const notificationsDisposer = autorun(() => {\n customLog(\"\\n--- Global Notifications (Last Messages) ---\");\n if (notifications.lastMessages.size === 0) {\n customLog(\"No messages yet.\");\n } else {\n notifications.lastMessages.forEach((message, roomName) => {\n customLog(`[${roomName}] \"${message.text}\" - ${message.author.name}`);\n });\n }\n customLog(\"------------------------------------------\");\n });\n\n // --- autorun for room updates ---\n const roomUpdatesDisposer = autorun(() => {\n rooms.forEach((room) => {\n if (room.roomUpdates.length > 0) {\n customLog(\n `[${room.name} Update] ${\n room.roomUpdates[room.roomUpdates.length - 1]\n }`\n );\n }\n });\n });\n\n // --- Status Update Scenario ---\n customLog(\"\\n--- Status Update Scenario ---\");\n\n alice.setStatus(\"Away\");\n assert(techRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(generalRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(largeRoom.roomUpdates.includes(\"Alice is now Away\"));\n customLog(\n \"[PASS] Verified that status updates are sent to all of Alice's rooms.\"\n );\n\n bob.setStatus(\"Busy\");\n assert(techRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(!generalRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(largeRoom.roomUpdates.includes(\"Bob is now Busy\"));\n customLog(\n \"[PASS] Verified that status updates are only sent to Bob's rooms.\"\n );\n\n // --- Messaging and Verification ---\n customLog(\"\\n--- Sending Messages & Verifying Notifications ---\");\n\n // Message 1: Tech Room\n const msg1 = new Message(\"First message to Tech Talk!\", alice);\n techRoom.addMessage(msg1);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg1);\n customLog(\"[PASS] Verified Tech Talk notification.\");\n\n // Message 2: General Chat\n for (let i = 0; i < 20; i++) {\n const msg2 = new Message(`ping ${i}`, alice);\n generalRoom.addMessage(msg2);\n // console.log('lastMessages', notifications.lastMessages.get(\"General Chat\").author.lastMessage)\n // console.log('msg2', msg2.author.lastMessage)\n assert(notifications.lastMessages.get(\"General Chat\") === msg2);\n }\n customLog(\"[PASS] Verified General Chat notification.\");\n\n // Message 3: Large Meeting Room\n for (let i = 0; i <= 5; i++) {\n for (const member of largeRoomMembers) {\n const msg = new Message(`Hi, I am ${member.name}`, member);\n largeRoom.addMessage(msg);\n assert(largeRoom.lastMessage == msg);\n assert(notifications.lastMessages.get(\"Large Meeting Room\") === msg);\n }\n }\n customLog(\"[PASS] Verified Large Meeting Room notification.\");\n\n // Message 4: Tech Room again\n for (let i = 0; i < 20; i++) {\n const msg4 = new Message(`ping ${i}`, bob);\n techRoom.addMessage(msg4);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg4);\n }\n customLog(\"[PASS] Verified Tech Talk notification update.\");\n\n const tempRooms = [];\n for (let i = 0; i < 10; i++) {\n const roomId = `General Chat ${i}`;\n const tempRoom = new Room(roomId);\n tempRooms.push(tempRoom);\n notifications.addRoom(tempRoom);\n for (const person of largeRoomMembers.slice(0, 10)) {\n tempRoom.addPerson(person);\n }\n for (const person of tempRoom.members.slice(0, 5)) {\n const msg = new Message(`ping ${i}`, person);\n tempRoom.addMessage(msg);\n assert(notifications.lastMessages.get(roomId) === msg);\n }\n }\n tempRooms.forEach((room) => room.dispose(notifications));\n\n // --- Clean up ---\n notificationsDisposer();\n roomUpdatesDisposer(); // Added disposer for room updates\n techRoom.dispose(notifications);\n generalRoom.dispose(notifications);\n largeRoom.dispose(notifications);\n\n return logs;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Executor","static","report","adm","property","set","this","length","runnable","unsubscribe","subscribe","execute","rest","active","deps","dispose","Set","push","result","run","pop","forEach","list","delete","Notifier","notify","changes","runId","subscriber","queued","queueMicrotask","flush","GlobalState","WeakMap","LibName","for","globalThis","seal","Global","queue","executor","notifier","Admin","owner","Map","listeners","current","constructor","has","add","cb","action","enqueueBatch","batch","flag","size","copy","keys","change","sub","computed","Utils","isPlainObject","ctor","isPrimitive","val","isDeepEqual","a","b","is","A","valueOf","B","getAdm","AdmKey","registry","error","TypeError","subscribersRegistry","autorun","work","disposer","debug","undefined","Computed","configurable","changed","name","descriptor","handler","prevValue","compute","prev","newValue","ProxyHandler","types","receiver","factory","IGNORED","target","WRITABLE","ACCESSOR","Reflect","object","desc","deleteProperty","res","setPrototypeOf","proto","assign","getOwnPropertyDescriptor","ActionHandler","ctx","apply","_","args","thenable","Promise","then","resolve","reject","e","clear","ObservableSet","meta","super","ObservableMap","metaKey","description","entries","values","callback","thisArg","iterator","hasKey","ObservableArray","Array","prepare","items","i","unshift","splice","start","deleteCount","copyWithin","end","reverse","shift","sort","compareFn","v","setDefaultTypes","ignore","shallow","SHALLOW","Factory","writable","bind","proxy","Proxy","makeObservable","isShallow","toString","Observable","chain","getPrototypeOf","skip","ownKeys","Person","id","lastMessage","rooms","status","setName","setLastMessage","message","addRoom","room","removeRoom","setStatus","addStatusUpdate","Room","people","messages","roomUpdates","messageCount","peopleCount","at","members","from","addPerson","person","removePerson","personId","addMessage","author","MAX_ROOM_UPDATES","slice","notifications","Message","text","timestamp","nextId","_nextId","Date","updateText","Notifications","lastMessages","roomDisposers","registered","adms","updateLastMessage","roomSubscribeKeys","roomName","assert","condition","Error","runTest","logs","customLog","join","techRoom","generalRoom","largeRoom","alice","bob","largeRoomMembers","notificationsDisposer","roomUpdatesDisposer","includes","msg1","msg2","member","msg","msg4","tempRooms","roomId","tempRoom"],"sourceRoot":""} \ No newline at end of file diff --git a/observable/dist/bundle.es6.js b/observable/dist/bundle.es6.js new file mode 100644 index 00000000..817bdd5c --- /dev/null +++ b/observable/dist/bundle.es6.js @@ -0,0 +1,230 @@ +(()=>{var __webpack_require__={d:(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},o:(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),r:exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})}},__webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{runTest:()=>runTest});class Executor{static#stack=[];static report(adm,property,set=!1){ +/*ThouShaltNotCache*/ +if(!this.#stack.length)return;const runnable=this.#stack[this.#stack.length-1];set?adm.unsubscribe(property,runnable):adm.subscribe(property,runnable)}static execute(runnable,...rest){ +/*ThouShaltNotCache*/ +runnable.active=!0,runnable.deps?this.dispose(runnable):runnable.deps=new Set,this.#stack.push(runnable);const result=runnable.run(...rest);return this.#stack.pop(),runnable.active=!1,result}static dispose(runnable){ +/*ThouShaltNotCache*/ +runnable.deps.forEach(this.unsubscribe,runnable)}static unsubscribe(list){ +/*ThouShaltNotCache*/ +list.delete(this)}}class Notifier{static queued=!1;static runId=2;static notify(runnable,changes){ +/*ThouShaltNotCache*/ +runnable.runId=Notifier.runId,runnable.subscriber(changes),Notifier.queued||(Notifier.queued=!0,queueMicrotask(Notifier.flush))}static flush(){ +/*ThouShaltNotCache*/ +Notifier.queued=!1,Notifier.runId=(Notifier.runId+1)%1e5}}class GlobalState{static untracked=!1;static action=!1;static queue=new Set;static meta=new WeakMap;static executor=Executor;static notifier=Notifier}const LibName=Symbol.for("kr-observable");globalThis[LibName]||(globalThis[LibName]=Object.seal(GlobalState));const global_Global=globalThis[LibName],queue=(global_Global.executor,global_Global.queue),notifier=global_Global.notifier;class Admin{static meta={key:"",adm:new Admin("")};owner;deps=new Map;listeners;changes=new Set;current=null;queued=!1;constructor(owner){ +/*ThouShaltNotCache*/ +this.owner=owner}subscribe(property,runnable){ +/*ThouShaltNotCache*/ +let list=this.deps.get(property);list||(list=new Set,this.deps.set(property,list)),list.has(runnable)||list.add(runnable),runnable.deps?.has(list)||runnable.deps?.add(list)}unsubscribe(property,runnable){ +/*ThouShaltNotCache*/ +this.deps.get(property)?.delete(runnable)}report(property,value){if( +/*ThouShaltNotCache*/ +this.listeners?.forEach(cb=>cb(property,value)),this.deps.has(property))if(this.changes.add(property),global_Global.action)queue.add(this);else{if(this.queued)return;this.queued=!0,queueMicrotask(this.enqueueBatch)}}enqueueBatch=()=>{ +/*ThouShaltNotCache*/ +this.batch(),this.queued=!1};batch(flag=!1){ +/*ThouShaltNotCache*/ +if(0===this.changes.size)return;const changes=this.changes;if(changes.size>1){const copy=new Set;for(const key of this.deps.keys())changes.has(key)&©.add(key);this.changes=copy}for(const change of this.changes){this.changes.delete(change),this.current=this.deps.get(change);for(const sub of this.current)if(sub.runId!==notifier.runId){if(sub.active)return;if(flag&&sub.computed)return this.changes.add(change);notifier.notify(sub,changes)}this.current=null}}static batch(adm){ +/*ThouShaltNotCache*/ +adm.batch()}}class Utils_Utils{static AdmKey=Symbol.for("adm");static IGNORED=0;static ACCESSOR=1;static SHALLOW=2;static WRITABLE=3;static isPlainObject(value){ +/*ThouShaltNotCache*/ +const ctor=value?.constructor;return!ctor||ctor===Object}static isPrimitive(val){ +/*ThouShaltNotCache*/ +return null===val||"object"!=typeof val&&"function"!=typeof val}static isDeepEqual(a,b){ +/*ThouShaltNotCache*/ +if(null==a||null==b)return Object.is(a,b);const A=a.valueOf(),B=b.valueOf();if("object"==typeof A){if("object"!=typeof B)return!1;const keys=Object.keys(A);if(keys.length!==Object.keys(B).length)return!1;for(const key of keys)if(!Utils_Utils.isDeepEqual(A[key],B[key]))return!1;return!0}return Object.is(a,b)}static getAdm(value){ +/*ThouShaltNotCache*/ +return value[Utils_Utils.AdmKey]}}const registry=new Map,error=new TypeError("First argument must be Observable"),subscribersRegistry=new Map;function autorun(work){ +/*ThouShaltNotCache*/ +let disposer=registry.get(work);if(disposer)return disposer;const runnable={run:work,subscriber(){ +/*ThouShaltNotCache*/ +global_Global.executor.execute(this)},debug:!1,runId:1,active:!1,deps:void 0};return disposer=()=>{ +/*ThouShaltNotCache*/ +registry.delete(work),global_Global.executor.dispose(runnable)},registry.set(work,disposer),global_Global.executor.execute(runnable),disposer}class Computed{enumerable;configurable;set;runId=1;debug=!1;active=!1;deps;#adm;#property;#descriptor;#value;#setterValue;changed=!1;computed=!0;name;constructor(property,descriptor,handler){ +/*ThouShaltNotCache*/ +this.enumerable=descriptor.enumerable,this.configurable=descriptor.configurable,this.#property=property,this.#descriptor=descriptor,this.#adm=handler.adm,descriptor.set&&(this.set=value=>{ +/*ThouShaltNotCache*/ +this.#descriptor.set(value);const prevValue=this.#setterValue;this.#setterValue=value,this.#report(prevValue,value)})}subscriber(){ +/*ThouShaltNotCache*/ +this.changed=!0,0!==this.#adm.deps.get(this.#property)?.size&&this.compute()}run(){ +/*ThouShaltNotCache*/ +return this.#descriptor.get()}compute(){ +/*ThouShaltNotCache*/ +const prev=this.#value;this.#reader(),this.#report(prev,this.#value)}#report(prevValue,newValue){ +/*ThouShaltNotCache*/ +Utils_Utils.isDeepEqual(prevValue,newValue)||this.#adm.report(this.#property,newValue),global_Global.action||this.#adm.batch()}#reader(){ +/*ThouShaltNotCache*/ +this.#value=global_Global.executor.execute(this)}get=()=>( +/*ThouShaltNotCache*/ +global_Global.action||this.#adm.batch(),this.deps?0===this.deps?.size?this.run():(this.changed&&(this.changed=!1,this.#reader()),this.#adm.current?.has(this)&&this.compute(),this.#value):(this.#reader(),this.#value))}const Proxy_handler_executor=global_Global.executor;class ProxyHandler{adm;types={};receiver;factory;constructor(adm,factory){ +/*ThouShaltNotCache*/ +this.adm=adm,this.factory=factory}#report(property,value){ +/*ThouShaltNotCache*/ +Proxy_handler_executor.report(this.adm,property,!0),this.adm.report(property,value)}#batch(property){ +/*ThouShaltNotCache*/ +this.types[property]!==Utils_Utils.IGNORED&&Proxy_handler_executor.report(this.adm,property),global_Global.action||this.adm.changes.size&&this.adm.changes.has(property)&&this.adm.batch(!0)}get(target,property){ +/*ThouShaltNotCache*/ +return property===Utils_Utils.AdmKey?this.adm:(this.#batch(property),target[property])}set(target,property,value){ +/*ThouShaltNotCache*/ +return property in this.types||(this.types[property]=Utils_Utils.WRITABLE,this.#report(property,value)),this.types[property]===Utils_Utils.ACCESSOR?Reflect.set(target,property,value):(target[property]!==value&&this.#report(property,value),Utils_Utils.isPrimitive(value)?target[property]=value:target[property]=this.factory.object(property,value,this),!0)}defineProperty(target,property,desc){ +/*ThouShaltNotCache*/ +return Reflect.defineProperty(target,property,this.factory.descriptor(property,desc,this))}deleteProperty(target,property){ +/*ThouShaltNotCache*/ +if(!(property in target))return!1;const res=Reflect.deleteProperty(target,property);return this.#report(property,void 0),res}setPrototypeOf(target,proto){ +/*ThouShaltNotCache*/ +const adm=Utils_Utils.getAdm(proto);return adm&&Object.assign(adm,this.adm),Reflect.setPrototypeOf(target,proto)}has(target,property){ +/*ThouShaltNotCache*/ +return this.#batch(property),property in target}getOwnPropertyDescriptor(target,property){ +/*ThouShaltNotCache*/ +return this.#batch(property),Reflect.getOwnPropertyDescriptor(target,property)}}class ActionHandler{ctx;constructor(receiver){ +/*ThouShaltNotCache*/ +this.ctx=receiver}apply(target,_,args){ +/*ThouShaltNotCache*/ +if(global_Global.action)return target.apply(this.ctx,args);global_Global.action=!0;try{let result=target.apply(this.ctx,args);const thenable=result instanceof Promise;return thenable&&(result=result.then(ActionHandler.resolve,ActionHandler.reject)),ActionHandler.flush(),global_Global.action=thenable,result}catch(e){ActionHandler.reject(e)}}static flush(){ +/*ThouShaltNotCache*/ +global_Global.queue.forEach(Admin.batch),global_Global.queue.clear(),global_Global.action=!1}static resolve(result){ +/*ThouShaltNotCache*/ +return ActionHandler.flush(),result}static reject(error){ +/*ThouShaltNotCache*/ +throw ActionHandler.flush(),error}}class ObservableSet extends Set{get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}report(result){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),result}add(value){ +/*ThouShaltNotCache*/ +return this.report(super.add(value))}delete(value){ +/*ThouShaltNotCache*/ +return this.report(super.delete(value))}clear(){ +/*ThouShaltNotCache*/ +return super.clear(),this.report(void 0)}}class ObservableMap extends Map{static#getKey(metaKey,key){ +/*ThouShaltNotCache*/ +return null==key?`${metaKey}.${key}`:"object"==typeof key?key:"symbol"==typeof key?`${metaKey}.${key.description}`:`${metaKey}.${key}`}get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}get size(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.size}keys(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.keys()}entries(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.entries()}values(){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.values()}forEach(callback,thisArg){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.forEach(callback,thisArg)}[Symbol.iterator](){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,`${this.meta.key}.entries`),super[Symbol.iterator]()}has(key){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,ObservableMap.#getKey(this.meta.key,key)),super.has(key)}get(key){ +/*ThouShaltNotCache*/ +return global_Global.executor.report(this.meta.adm,ObservableMap.#getKey(this.meta.key,key)),super.get(key)}set(key,value){ +/*ThouShaltNotCache*/ +let newValue=value;this.meta.factory&&(Utils_Utils.isPrimitive(newValue)||(newValue=this.meta.factory(this.meta.key,value,this.meta.handler)));const hasKey=super.has(key),prevValue=super.get(key),result=super.set(key,newValue);return hasKey?prevValue!==newValue&&(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),newValue)):(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),newValue)),result}delete(key){ +/*ThouShaltNotCache*/ +const result=super.delete(key);return result&&(this.meta.adm.report(ObservableMap.#getKey(this.meta.key,key),void 0),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)),result}clear(){ +/*ThouShaltNotCache*/ +if(0===super.size)return;const metaKey=this.meta.key;for(const key of this.keys())this.meta.adm.report(ObservableMap.#getKey(metaKey,key),void 0);super.clear(),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)}}class ObservableArray extends Array{get meta(){ +/*ThouShaltNotCache*/ +return global_Global.meta.get(this)||Admin.meta}report(result){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),result}prepare(items){ +/*ThouShaltNotCache*/ +const factory=this.meta.factory;if(!factory)return items;this.meta.adm;const key=this.meta.key,handler=this.meta.handler;if(""===key)return items;for(let i=0;itypes[key]=Utils_Utils.IGNORED),shallow?.forEach(key=>types[key]=Utils_Utils.SHALLOW),types}Reflect.has(Array.prototype,"set")||(Array.prototype.set=function(i,value){ +/*ThouShaltNotCache*/ +this[i]=value});class Factory{static descriptor(property,descriptor,handler){ +/*ThouShaltNotCache*/ +return property in handler.types||("value"in descriptor&&descriptor.writable?handler.types[property]=Utils_Utils.WRITABLE:handler.types[property]=Utils_Utils.ACCESSOR),descriptor.get&&(descriptor.get=descriptor.get.bind(handler.receiver)),descriptor.set&&(descriptor.set=descriptor.set.bind(handler.receiver)),handler.types[property]===Utils_Utils.IGNORED||(handler.types[property]===Utils_Utils.ACCESSOR?descriptor.get&&(descriptor=new Computed(property,descriptor,handler)):Utils_Utils.isPrimitive(descriptor.value)||(descriptor.value=Factory.object(property,descriptor.value,handler))),descriptor}static object(property,value,handler){ +/*ThouShaltNotCache*/ +if(Utils_Utils.getAdm(value))return value;if(handler.types[property]===Utils_Utils.IGNORED)return value;if(""===value.meta?.key)return value;if(Utils_Utils.isPlainObject(value))return function(value,ignore,shallow){ +/*ThouShaltNotCache*/ +if(Utils_Utils.isPrimitive(value))throw Observable_error;if(!Utils_Utils.isPlainObject(value))throw Observable_error;if(Utils_Utils.getAdm(value))return value;const adm=new Admin(""),handler=new ProxyHandler(adm,Factory),proxy=new Proxy(value,handler);handler.receiver=proxy,setDefaultTypes(handler.types,ignore,shallow);for(const key in value){const descriptor=Factory.descriptor(key,Object.getOwnPropertyDescriptor(value,key),handler);descriptor.writable?value[key]=descriptor.value:Object.defineProperty(value,key,descriptor)}return proxy}(value);if("function"==typeof value)return new Proxy(value,new ActionHandler(handler.receiver));const isShallow=handler.types[property]===Utils_Utils.SHALLOW,meta={key:property.toString(),handler,adm:handler.adm,factory:isShallow?void 0:Factory.object};if(value instanceof Array){if(!isShallow)for(let i=0;i{ +/*ThouShaltNotCache*/ +room.addStatusUpdate(this,status)})}}class Room extends Observable{name;people=new Map;messages=[];roomUpdates=[];constructor(name){ +/*ThouShaltNotCache*/ +super(),this.name=name}get messageCount(){ +/*ThouShaltNotCache*/ +return this.messages.length}get peopleCount(){ +/*ThouShaltNotCache*/ +return this.people.size}get lastMessage(){ +/*ThouShaltNotCache*/ +return this.messages.at(-1)}get members(){ +/*ThouShaltNotCache*/ +return Array.from(this.people.values())}addPerson(person){ +/*ThouShaltNotCache*/ +this.people.has(person.id)||(this.people.set(person.id,person),person.addRoom(this))}removePerson(personId){ +/*ThouShaltNotCache*/ +const person=this.people.get(personId);person&&(person.removeRoom(this),this.people.delete(personId))}addMessage(message){var work; +/*ThouShaltNotCache*/ +work=()=>{ +/*ThouShaltNotCache*/ +message.author.setLastMessage(message),this.messages.push(message)}, +/*ThouShaltNotCache*/ +global_Global.action=!0,work(),global_Global.action=!1,global_Global.queue.forEach(Admin.batch),global_Global.queue.clear(),global_Global.notifier.flush()}addStatusUpdate(person,status){ +/*ThouShaltNotCache*/ +this.roomUpdates.push(`${person.name} is now ${status}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(notifications){ +/*ThouShaltNotCache*/ +this.people.forEach(person=>person.removeRoom(this)),notifications&¬ifications.removeRoom(this.name)}}class Message extends Observable{static ignore=new Set(["id","author","timestamp"]);static _nextId=0;id;text;author;timestamp;static nextId(){ +/*ThouShaltNotCache*/ +return Message._nextId++}constructor(text,author){ +/*ThouShaltNotCache*/ +super(),this.id=Message.nextId(),this.text=text,this.author=author,this.timestamp=new Date}updateText(text){ +/*ThouShaltNotCache*/ +this.text=text}}class Notifications extends Observable{static ignore=new Set(["lastMessage","roomDisposers"]);static roomSubscribeKeys=new Set(["lastMessage"]);lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(rooms){ +/*ThouShaltNotCache*/ +super(),rooms.forEach(room=>this.addRoom(room))}addRoom(room){ +/*ThouShaltNotCache*/ +room.lastMessage;const disposer=function(target,cb,keys){ +/*ThouShaltNotCache*/ +const adm=Utils_Utils.getAdm(target);if(!adm)throw error;let registered=subscribersRegistry.get(cb);if(registered)return registered.adms.has(adm)||keys.forEach(key=>adm.subscribe(key,registered.runnable)),registered.disposer;const runnable={subscriber:cb,runId:1,active:!1,deps:new Set};keys.forEach(key=>adm.subscribe(key,runnable));const disposer=()=>{ +/*ThouShaltNotCache*/ +subscribersRegistry.delete(cb),global_Global.executor.dispose(runnable)};return registered={runnable,disposer,adms:new Set([adm])},subscribersRegistry.set(cb,registered),disposer}(room,()=>{ +/*ThouShaltNotCache*/ +room.lastMessage&&this.updateLastMessage(room.name,room.lastMessage)},Notifications.roomSubscribeKeys);this.roomDisposers.set(room.name,disposer)}removeRoom(roomName){ +/*ThouShaltNotCache*/ +this.roomDisposers.has(roomName)&&(this.roomDisposers.get(roomName)(),this.roomDisposers.delete(roomName),this.lastMessages.delete(roomName))}updateLastMessage(roomName,message){ +/*ThouShaltNotCache*/ +this.lastMessages.set(roomName,message)}}function assert(condition){ +/*ThouShaltNotCache*/ +if(!condition)throw new Error("Assertion failure")}function runTest(){ +/*ThouShaltNotCache*/ +const logs=[],customLog=(...args)=>logs.push(args.join(" ")),techRoom=new Room("Tech Talk"),generalRoom=new Room("General Chat"),largeRoom=new Room("Large Meeting Room"),alice=new Person(1,"Alice"),bob=new Person(2,"Bob");techRoom.addPerson(alice),techRoom.addPerson(bob),generalRoom.addPerson(alice);const rooms=[techRoom,generalRoom,largeRoom],notifications=new Notifications(rooms);customLog("\n--- Setting up Large Meeting Room ---");const largeRoomMembers=[];for(let i=3;i<203;i++){const person=new Person(i,`Person ${i}`);largeRoomMembers.push(person),largeRoom.addPerson(person)}customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`),largeRoom.addPerson(alice),largeRoom.addPerson(bob),customLog("[INFO] Added Alice and Bob to the Large Meeting Room."),assert(3===alice.rooms.size),assert(alice.rooms.has(techRoom)&&alice.rooms.has(generalRoom)&&alice.rooms.has(largeRoom)),assert(2===bob.rooms.size&&bob.rooms.has(techRoom)&&bob.rooms.has(largeRoom)),customLog("[PASS] Verified Person.rooms associations with Set.");const notificationsDisposer=autorun(()=>{ +/*ThouShaltNotCache*/ +customLog("\n--- Global Notifications (Last Messages) ---"),0===notifications.lastMessages.size?customLog("No messages yet."):notifications.lastMessages.forEach((message,roomName)=>{ +/*ThouShaltNotCache*/ +customLog(`[${roomName}] "${message.text}" - ${message.author.name}`)}),customLog("------------------------------------------")}),roomUpdatesDisposer=autorun(()=>{ +/*ThouShaltNotCache*/ +rooms.forEach(room=>{ +/*ThouShaltNotCache*/ +room.roomUpdates.length>0&&customLog(`[${room.name} Update] ${room.roomUpdates[room.roomUpdates.length-1]}`)})});customLog("\n--- Status Update Scenario ---"),alice.setStatus("Away"),assert(techRoom.roomUpdates.includes("Alice is now Away")),assert(generalRoom.roomUpdates.includes("Alice is now Away")),assert(largeRoom.roomUpdates.includes("Alice is now Away")),customLog("[PASS] Verified that status updates are sent to all of Alice's rooms."),bob.setStatus("Busy"),assert(techRoom.roomUpdates.includes("Bob is now Busy")),assert(!generalRoom.roomUpdates.includes("Bob is now Busy")),assert(largeRoom.roomUpdates.includes("Bob is now Busy")),customLog("[PASS] Verified that status updates are only sent to Bob's rooms."),customLog("\n--- Sending Messages & Verifying Notifications ---");const msg1=new Message("First message to Tech Talk!",alice);techRoom.addMessage(msg1),assert(notifications.lastMessages.get("Tech Talk")===msg1),customLog("[PASS] Verified Tech Talk notification.");for(let i=0;i<20;i++){const msg2=new Message(`ping ${i}`,alice);generalRoom.addMessage(msg2),assert(notifications.lastMessages.get("General Chat")===msg2)}customLog("[PASS] Verified General Chat notification.");for(let i=0;i<=5;i++)for(const member of largeRoomMembers){const msg=new Message(`Hi, I am ${member.name}`,member);largeRoom.addMessage(msg),assert(largeRoom.lastMessage==msg),assert(notifications.lastMessages.get("Large Meeting Room")===msg)}customLog("[PASS] Verified Large Meeting Room notification.");for(let i=0;i<20;i++){const msg4=new Message(`ping ${i}`,bob);techRoom.addMessage(msg4),assert(notifications.lastMessages.get("Tech Talk")===msg4)}customLog("[PASS] Verified Tech Talk notification update.");const tempRooms=[];for(let i=0;i<10;i++){const roomId=`General Chat ${i}`,tempRoom=new Room(roomId);tempRooms.push(tempRoom),notifications.addRoom(tempRoom);for(const person of largeRoomMembers.slice(0,10))tempRoom.addPerson(person);for(const person of tempRoom.members.slice(0,5)){const msg=new Message(`ping ${i}`,person);tempRoom.addMessage(msg),assert(notifications.lastMessages.get(roomId)===msg)}}return tempRooms.forEach(room=>room.dispose(notifications)),notificationsDisposer(),roomUpdatesDisposer(),techRoom.dispose(notifications),generalRoom.dispose(notifications),largeRoom.dispose(notifications),logs}})(),MobXBenchmark=__webpack_exports__})(); +//# sourceMappingURL=bundle.es6.js.map \ No newline at end of file diff --git a/observable/dist/bundle.es6.js.map b/observable/dist/bundle.es6.js.map new file mode 100644 index 00000000..320e60db --- /dev/null +++ b/observable/dist/bundle.es6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.es6.js","mappings":"MACA,IAAIA,oBAAsB,CCA1BA,EAAwB,CAACC,QAASC,cACjC,IAAI,IAAIC,OAAOD,WACXF,oBAAoBI,EAAEF,WAAYC,OAASH,oBAAoBI,EAAEH,QAASE,MAC5EE,OAAOC,eAAeL,QAASE,IAAK,CAAEI,YAAY,EAAMC,IAAKN,WAAWC,QCJ3EH,EAAwB,CAACS,IAAKC,OAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,IAAKC,MCClFV,EAAyBC,UACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,QAASa,OA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YAAYiC,OAAOjJ,OAAQiJ,QACnDT,UAAU7B,WAAWuC,KACrBnB,OAAOS,UAAUrD,aAAe+D,KAChCnB,OAAOhB,cAAcS,aAAaxN,IAAI,wBAA0BkP,IAClE,CAEFd,UAAU,oDAGV,IAAK,IAAIhF,EAAI,EAAGA,EAAI,GAAIA,IAAK,CAC3B,MAAM+F,KAAO,IAAInC,QAAQ,QAAQ5D,IAAKsF,KACtCJ,SAAS3B,WAAWwC,MACpBpB,OAAOhB,cAAcS,aAAaxN,IAAI,eAAiBmP,KACzD,CACAf,UAAU,kDAEV,MAAMgB,UAAY,GAClB,IAAK,IAAIhG,EAAI,EAAGA,EAAI,GAAIA,IAAK,CAC3B,MAAMiG,OAAS,gBAAgBjG,IACzBkG,SAAW,IAAIxD,KAAKuD,QAC1BD,UAAU1N,KAAK4N,UACfvC,cAActB,QAAQ6D,UACtB,IAAK,MAAM9C,UAAUmC,iBAAiB7B,MAAM,EAAG,IAC7CwC,SAAS/C,UAAUC,QAErB,IAAK,MAAMA,UAAU8C,SAASjD,QAAQS,MAAM,EAAG,GAAI,CACjD,MAAMoC,IAAM,IAAIlC,QAAQ,QAAQ5D,IAAKoD,QACrC8C,SAAS3C,WAAWuC,KACpBnB,OAAOhB,cAAcS,aAAaxN,IAAIqP,UAAYH,IACpD,CACF,CAUA,OATAE,UAAUtN,QAAS4J,MAASA,KAAKlK,QAAQuL,gBAGzC6B,wBACAC,sBACAP,SAAS9M,QAAQuL,eACjBwB,YAAY/M,QAAQuL,eACpByB,UAAUhN,QAAQuL,eAEXoB,IACT,C","sources":["webpack://MobXBenchmark/webpack/bootstrap","webpack://MobXBenchmark/webpack/runtime/define property getters","webpack://MobXBenchmark/webpack/runtime/hasOwnProperty shorthand","webpack://MobXBenchmark/webpack/runtime/make namespace object","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Executor.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Notifier.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/global.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Admin.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Utils.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/api.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Computed.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Proxy.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Action.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.set.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.map.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.array.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.js","webpack://MobXBenchmark/./src/Person.mjs","webpack://MobXBenchmark/./src/Room.mjs","webpack://MobXBenchmark/./src/Message.mjs","webpack://MobXBenchmark/./src/Notifications.mjs","webpack://MobXBenchmark/./src/test.mjs"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Executor {\n static #stack = [];\n static report(adm, property, set = false) {\n if (!this.#stack.length)\n return;\n const runnable = this.#stack[this.#stack.length - 1];\n if (set) {\n adm.unsubscribe(property, runnable);\n }\n else {\n adm.subscribe(property, runnable);\n }\n }\n static execute(runnable, ...rest) {\n runnable.active = true;\n if (!runnable.deps) {\n runnable.deps = new Set;\n }\n else {\n this.dispose(runnable);\n }\n this.#stack.push(runnable);\n const result = runnable.run(...rest);\n this.#stack.pop();\n runnable.active = false;\n return result;\n }\n static dispose(runnable) {\n runnable.deps.forEach(this.unsubscribe, runnable);\n }\n static unsubscribe(list) {\n list.delete(this);\n }\n}\n","export class Notifier {\n static queued = false;\n static runId = 2;\n static notify(runnable, changes) {\n runnable.runId = Notifier.runId;\n runnable.subscriber(changes);\n if (Notifier.queued)\n return;\n Notifier.queued = true;\n queueMicrotask(Notifier.flush);\n }\n static flush() {\n Notifier.queued = false;\n Notifier.runId = (Notifier.runId + 1) % 100_000;\n }\n}\n","import { Executor } from './Executor.js';\nimport { Notifier } from './Notifier.js';\nclass GlobalState {\n static untracked = false;\n static action = false;\n static queue = new Set;\n static meta = new WeakMap;\n static executor = Executor;\n static notifier = Notifier;\n}\nconst LibName = Symbol.for('kr-observable');\nif (!globalThis[LibName]) {\n globalThis[LibName] = Object.seal(GlobalState);\n}\nexport const Global = globalThis[LibName];\nexport const executor = Global.executor;\n","import { Global } from './global.js';\nconst queue = Global.queue;\nconst notifier = Global.notifier;\nexport class Admin {\n static meta = { key: '', adm: new Admin('') };\n owner;\n deps = new Map;\n listeners;\n changes = new Set;\n current = null;\n queued = false;\n constructor(owner) {\n this.owner = owner;\n }\n subscribe(property, runnable) {\n let list = this.deps.get(property);\n if (!list) {\n list = new Set;\n this.deps.set(property, list);\n }\n if (!list.has(runnable)) {\n list.add(runnable);\n }\n if (!runnable.deps?.has(list)) {\n runnable.deps?.add(list);\n }\n }\n unsubscribe(property, runnable) {\n this.deps.get(property)?.delete(runnable);\n }\n report(property, value) {\n this.listeners?.forEach(cb => cb(property, value));\n if (!this.deps.has(property))\n return;\n this.changes.add(property);\n if (Global.action) {\n queue.add(this);\n }\n else {\n if (this.queued)\n return;\n this.queued = true;\n queueMicrotask(this.enqueueBatch);\n }\n }\n enqueueBatch = () => {\n this.batch();\n this.queued = false;\n };\n batch(flag = false) {\n if (this.changes.size === 0)\n return;\n const changes = this.changes;\n if (changes.size > 1) {\n const copy = new Set();\n for (const key of this.deps.keys()) {\n if (changes.has(key))\n copy.add(key);\n }\n this.changes = copy;\n }\n for (const change of this.changes) {\n this.changes.delete(change);\n this.current = this.deps.get(change);\n for (const sub of this.current) {\n if (sub.runId !== notifier.runId) {\n if (sub.active) {\n return;\n }\n if (flag && sub.computed) {\n return this.changes.add(change);\n }\n notifier.notify(sub, changes);\n }\n }\n this.current = null;\n }\n }\n static batch(adm) {\n adm.batch();\n }\n}\n","export class Utils {\n static AdmKey = Symbol.for('adm');\n static IGNORED = 0;\n static ACCESSOR = 1;\n static SHALLOW = 2;\n static WRITABLE = 3;\n static isPlainObject(value) {\n const ctor = value?.constructor;\n return !ctor || ctor === Object;\n }\n static isPrimitive(val) {\n return val === null || (typeof val !== 'object' && typeof val !== 'function');\n }\n static isDeepEqual(a, b) {\n if (a == null || b == null)\n return Object.is(a, b);\n const A = a.valueOf();\n const B = b.valueOf();\n if (typeof A === 'object') {\n if (typeof B !== 'object')\n return false;\n const keys = Object.keys(A);\n if (keys.length !== Object.keys(B).length)\n return false;\n for (const key of keys) {\n if (!Utils.isDeepEqual(A[key], B[key]))\n return false;\n }\n return true;\n }\n return Object.is(a, b);\n }\n static getAdm(value) {\n return value[Utils.AdmKey];\n }\n}\n","import { Admin } from './Admin.js';\nimport { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst registry = new Map();\nconst error = new TypeError('First argument must be Observable');\nconst subscribersRegistry = new Map();\nexport function subscribe(target, cb, keys) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n let registered = subscribersRegistry.get(cb);\n if (registered) {\n if (!registered.adms.has(adm)) {\n keys.forEach(key => adm.subscribe(key, registered.runnable));\n }\n return registered.disposer;\n }\n const runnable = { subscriber: cb, runId: 1, active: false, deps: new Set };\n keys.forEach(key => adm.subscribe(key, runnable));\n const disposer = () => {\n subscribersRegistry.delete(cb);\n Global.executor.dispose(runnable);\n };\n registered = { runnable, disposer, adms: new Set([adm]) };\n subscribersRegistry.set(cb, registered);\n return disposer;\n}\nexport function autorun(work) {\n let disposer = registry.get(work);\n if (disposer)\n return disposer;\n const runnable = {\n run: work,\n subscriber() {\n Global.executor.execute(this);\n },\n debug: false,\n runId: 1,\n active: false,\n deps: undefined\n };\n disposer = () => {\n registry.delete(work);\n Global.executor.dispose(runnable);\n };\n registry.set(work, disposer);\n Global.executor.execute(runnable);\n return disposer;\n}\nexport function listen(target, cb) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n if (!adm.listeners)\n adm.listeners = new Set();\n adm.listeners.add(cb);\n return () => void adm.listeners.delete(cb);\n}\nexport function transaction(work) {\n Global.action = true;\n work();\n Global.action = false;\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.notifier.flush();\n}\nexport function untracked(work) {\n Global.untracked = true;\n const result = work();\n Global.untracked = false;\n return result;\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nexport class Computed {\n enumerable;\n configurable;\n set;\n runId = 1;\n debug = false;\n active = false;\n deps;\n #adm;\n #property;\n #descriptor;\n #value;\n #setterValue;\n changed = false;\n computed = true;\n name;\n constructor(property, descriptor, handler) {\n this.enumerable = descriptor.enumerable;\n this.configurable = descriptor.configurable;\n this.#property = property;\n this.#descriptor = descriptor;\n this.#adm = handler.adm;\n if (descriptor.set) {\n this.set = (value) => {\n this.#descriptor.set(value);\n const prevValue = this.#setterValue;\n this.#setterValue = value;\n this.#report(prevValue, value);\n };\n }\n }\n subscriber() {\n this.changed = true;\n if (this.#adm.deps.get(this.#property)?.size === 0) {\n return;\n }\n this.compute();\n }\n run() {\n return this.#descriptor.get();\n }\n compute() {\n const prev = this.#value;\n this.#reader();\n this.#report(prev, this.#value);\n }\n #report(prevValue, newValue) {\n if (!Utils.isDeepEqual(prevValue, newValue)) {\n this.#adm.report(this.#property, newValue);\n }\n if (Global.action)\n return;\n this.#adm.batch();\n }\n #reader() {\n this.#value = Global.executor.execute(this);\n }\n get = () => {\n if (!Global.action) {\n this.#adm.batch();\n }\n if (!this.deps) {\n this.#reader();\n return this.#value;\n }\n if (this.deps?.size === 0) {\n return this.run();\n }\n if (this.changed) {\n this.changed = false;\n this.#reader();\n }\n if (this.#adm.current?.has(this)) {\n this.compute();\n }\n return this.#value;\n };\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst executor = Global.executor;\nexport class ProxyHandler {\n adm;\n types = {};\n receiver;\n factory;\n constructor(adm, factory) {\n this.adm = adm;\n this.factory = factory;\n }\n #report(property, value) {\n executor.report(this.adm, property, true);\n this.adm.report(property, value);\n }\n #batch(property) {\n if (this.types[property] !== Utils.IGNORED) {\n executor.report(this.adm, property);\n }\n if (Global.action)\n return;\n if (!this.adm.changes.size)\n return;\n if (this.adm.changes.has(property)) {\n this.adm.batch(true);\n }\n }\n get(target, property) {\n if (property === Utils.AdmKey)\n return this.adm;\n this.#batch(property);\n return target[property];\n }\n set(target, property, value) {\n if (!(property in this.types)) {\n this.types[property] = Utils.WRITABLE;\n this.#report(property, value);\n }\n if (this.types[property] === Utils.ACCESSOR) {\n return Reflect.set(target, property, value);\n }\n if (target[property] !== value) {\n this.#report(property, value);\n }\n if (Utils.isPrimitive(value)) {\n target[property] = value;\n }\n else {\n target[property] = this.factory.object(property, value, this);\n }\n return true;\n }\n defineProperty(target, property, desc) {\n return Reflect.defineProperty(target, property, this.factory.descriptor(property, desc, this));\n }\n deleteProperty(target, property) {\n if (!(property in target))\n return false;\n const res = Reflect.deleteProperty(target, property);\n this.#report(property, undefined);\n return res;\n }\n setPrototypeOf(target, proto) {\n const adm = Utils.getAdm(proto);\n if (adm)\n Object.assign(adm, this.adm);\n return Reflect.setPrototypeOf(target, proto);\n }\n has(target, property) {\n this.#batch(property);\n return property in target;\n }\n getOwnPropertyDescriptor(target, property) {\n this.#batch(property);\n return Reflect.getOwnPropertyDescriptor(target, property);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ActionHandler {\n ctx;\n constructor(receiver) {\n this.ctx = receiver;\n }\n apply(target, _, args) {\n if (Global.action)\n return target.apply(this.ctx, args);\n Global.action = true;\n try {\n let result = target.apply(this.ctx, args);\n const thenable = result instanceof Promise;\n if (thenable) {\n result = result.then(ActionHandler.resolve, ActionHandler.reject);\n }\n ActionHandler.flush();\n Global.action = thenable;\n return result;\n }\n catch (e) {\n ActionHandler.reject(e);\n }\n }\n static flush() {\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.action = false;\n }\n static resolve(result) {\n ActionHandler.flush();\n return result;\n }\n static reject(error) {\n ActionHandler.flush();\n throw error;\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ObservableSet extends Set {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n add(value) {\n return this.report(super.add(value));\n }\n delete(value) {\n return this.report(super.delete(value));\n }\n clear() {\n super.clear();\n return this.report(undefined);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableMap extends Map {\n static #getKey(metaKey, key) {\n if (key == undefined)\n return `${metaKey}.${key}`;\n if (typeof key === 'object')\n return key;\n if (typeof key === 'symbol')\n return `${metaKey}.${key.description}`;\n return `${metaKey}.${key}`;\n }\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n get size() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.size;\n }\n keys() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.keys();\n }\n entries() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.entries();\n }\n values() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.values();\n }\n forEach(callback, thisArg) {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.forEach(callback, thisArg);\n }\n [Symbol.iterator]() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super[Symbol.iterator]();\n }\n has(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.has(key);\n }\n get(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.get(key);\n }\n set(key, value) {\n let newValue = value;\n if (this.meta.factory) {\n if (!Utils.isPrimitive(newValue)) {\n newValue = this.meta.factory(this.meta.key, value, this.meta.handler);\n }\n }\n const hasKey = super.has(key);\n const prevValue = super.get(key);\n const result = super.set(key, newValue);\n if (!hasKey) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n else if (prevValue !== newValue) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n return result;\n }\n delete(key) {\n const result = super.delete(key);\n if (result) {\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), undefined);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n return result;\n }\n clear() {\n if (super.size === 0)\n return;\n const metaKey = this.meta.key;\n for (const key of this.keys()) {\n this.meta.adm.report(ObservableMap.#getKey(metaKey, key), undefined);\n }\n super.clear();\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableArray extends Array {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n prepare(items) {\n const factory = this.meta.factory;\n if (!factory)\n return items;\n const adm = this.meta.adm;\n const key = this.meta.key;\n const handler = this.meta.handler;\n if (key === '')\n return items;\n for (let i = 0; i < items.length; i++) {\n if (!Utils.isPrimitive(items[i])) {\n items[i] = factory(key, items[i], handler);\n }\n }\n return items;\n }\n push(...items) {\n return this.report(super.push(...this.prepare(items)));\n }\n unshift(...items) {\n return this.report(super.unshift(...this.prepare(items)));\n }\n splice(start, deleteCount, ...items) {\n return this.report(super.splice(start, deleteCount, ...this.prepare(items)));\n }\n copyWithin(target, start, end) {\n return this.report(super.copyWithin(target, start, end));\n }\n pop() {\n return this.report(super.pop());\n }\n reverse() {\n return this.report(super.reverse());\n }\n shift() {\n return this.report(super.shift());\n }\n sort(compareFn) {\n return this.report(super.sort(compareFn));\n }\n set(i, v) {\n return this.report(this[i] = v);\n }\n}\nif (!Reflect.has(Array.prototype, 'set')) {\n Array.prototype.set = function (i, value) {\n this[i] = value;\n };\n}\n","import { Admin } from './Admin.js';\nimport { Computed } from './Computed.js';\nimport { ProxyHandler } from './Proxy.handler.js';\nimport { ActionHandler } from './Action.handler.js';\nimport { ObservableSet } from './Observable.set.js';\nimport { ObservableMap } from './Observable.map.js';\nimport { ObservableArray } from './Observable.array.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nfunction setDefaultTypes(types, ignore, shallow) {\n ignore?.forEach(key => types[key] = Utils.IGNORED);\n shallow?.forEach(key => types[key] = Utils.SHALLOW);\n return types;\n}\nclass Factory {\n static descriptor(property, descriptor, handler) {\n if (!(property in handler.types)) {\n if ('value' in descriptor) {\n if (descriptor.writable) {\n handler.types[property] = Utils.WRITABLE;\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n if (descriptor.get)\n descriptor.get = descriptor.get.bind(handler.receiver);\n if (descriptor.set)\n descriptor.set = descriptor.set.bind(handler.receiver);\n if (handler.types[property] === Utils.IGNORED)\n return descriptor;\n if (handler.types[property] === Utils.ACCESSOR) {\n if (descriptor.get) {\n descriptor = new Computed(property, descriptor, handler);\n }\n }\n else {\n if (!Utils.isPrimitive(descriptor.value)) {\n descriptor.value = Factory.object(property, descriptor.value, handler);\n }\n }\n return descriptor;\n }\n static object(property, value, handler) {\n if (Utils.getAdm(value))\n return value;\n if (handler.types[property] === Utils.IGNORED)\n return value;\n if (value['meta']?.key === '')\n return value;\n if (Utils.isPlainObject(value)) {\n return makeObservable(value);\n }\n if (typeof value === 'function') {\n return new Proxy(value, new ActionHandler(handler.receiver));\n }\n const isShallow = handler.types[property] === Utils.SHALLOW;\n const meta = {\n key: property.toString(),\n handler,\n adm: handler.adm,\n factory: isShallow ? undefined : Factory.object\n };\n if (value instanceof Array) {\n if (!isShallow) {\n for (let i = 0; i < value.length; i++) {\n if (!Utils.isPrimitive(value[i])) {\n value[i] = Factory.object(property, value[i], handler);\n }\n }\n }\n Object.setPrototypeOf(value, ObservableArray.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Map) {\n Object.setPrototypeOf(value, ObservableMap.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Set) {\n Object.setPrototypeOf(value, ObservableSet.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n return value;\n }\n}\nexport class Observable {\n constructor() {\n const ctor = new.target;\n const adm = new Admin(ctor.name);\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(this, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ctor.ignore, ctor.shallow);\n const chain = [];\n let current = ctor.prototype;\n while (current !== Observable.prototype) {\n chain.push(current);\n current = Object.getPrototypeOf(current);\n }\n const skip = new Set(['constructor']);\n for (const proto of chain) {\n for (const key of Reflect.ownKeys(proto)) {\n if (skip.has(key))\n continue;\n skip.add(key);\n const desc = Reflect.getOwnPropertyDescriptor(proto, key);\n Object.defineProperty(this, key, Factory.descriptor(key, desc, handler));\n }\n }\n return proxy;\n }\n}\nconst error = new TypeError('Invalid argument. Only plain objects are allowed');\nexport function makeObservable(value, ignore, shallow) {\n if (Utils.isPrimitive(value))\n throw error;\n if (!Utils.isPlainObject(value))\n throw error;\n if (Utils.getAdm(value))\n return value;\n const adm = new Admin('');\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(value, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ignore, shallow);\n for (const key in value) {\n const descriptor = Factory.descriptor(key, Object.getOwnPropertyDescriptor(value, key), handler);\n if (descriptor.writable) {\n value[key] = descriptor.value;\n }\n else {\n Object.defineProperty(value, key, descriptor);\n }\n }\n return proxy;\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Person extends Observable {\n id;\n name;\n lastMessage = null;\n rooms = new Set();\n status = 'Online';\n \n constructor(id, name) {\n super()\n this.id = id;\n this.name = name;\n }\n\n setName(name) {\n this.name = name;\n }\n\n setLastMessage(message) {\n this.lastMessage = message;\n }\n\n addRoom(room) {\n this.rooms.add(room);\n }\n\n removeRoom(room) {\n this.rooms.delete(room);\n }\n\n setStatus(status) {\n this.status = status;\n this.rooms.forEach(room => {\n room.addStatusUpdate(this, status);\n });\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable, transaction } from \"kr-observable\";\n\nconst MAX_ROOM_UPDATES = 10;\n\nexport class Room extends Observable {\n name;\n people = new Map();\n messages = [];\n roomUpdates = [];\n\n constructor(name) {\n super()\n this.name = name;\n }\n\n get messageCount() {\n return this.messages.length;\n }\n\n get peopleCount() {\n return this.people.size;\n }\n\n get lastMessage() {\n // if (this.messages.length === 0) {\n // return null;\n // }\n return this.messages.at(-1);\n }\n\n get members() {\n return Array.from(this.people.values());\n }\n\n addPerson(person) {\n if (!this.people.has(person.id)) {\n this.people.set(person.id, person);\n person.addRoom(this);\n }\n }\n\n removePerson(personId) {\n const person = this.people.get(personId);\n if (person) {\n person.removeRoom(this);\n this.people.delete(personId);\n }\n }\n\n addMessage(message) {\n transaction(() => {\n message.author.setLastMessage(message);\n this.messages.push(message);\n })\n }\n\n addStatusUpdate(person, status) {\n this.roomUpdates.push(`${person.name} is now ${status}`);\n if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2)\n this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES);\n }\n\n dispose(notifications) {\n this.people.forEach(person => person.removeRoom(this));\n if (notifications) {\n notifications.removeRoom(this.name);\n }\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Message extends Observable {\n static ignore = new Set(['id', 'author', 'timestamp'])\n static _nextId = 0;\n \n id;\n text;\n author; // Person\n timestamp;\n\n static nextId() {\n return Message._nextId++;\n }\n\n constructor(text, author) {\n super();\n this.id = Message.nextId();\n this.text = text;\n this.author = author;\n this.timestamp = new Date();\n }\n\n updateText(text) {\n this.text = text;\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\nimport { Observable, listen, subscribe } from 'kr-observable';\n\nexport class Notifications extends Observable {\n static ignore = new Set(['lastMessage', 'roomDisposers'])\n static roomSubscribeKeys = new Set(['lastMessage'])\n lastMessages = new Map(); // Map\n lastMessage; roomDisposers = new Map(); // Map\n\n constructor(rooms) {\n super()\n rooms.forEach(room => this.addRoom(room));\n }\n\n addRoom(room) {\n // lastMessage is computed and evaluates lazy\n // const disposer = autorun(() => {\n // if (room.lastMessage) {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n // const disposer = listen(room, (k,v) => {\n // if (k && v === 'lastMessage') {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n room.lastMessage\n const disposer = subscribe(room, () => {\n if (room.lastMessage) {\n this.updateLastMessage(room.name, room.lastMessage);\n }\n }, Notifications.roomSubscribeKeys)\n this.roomDisposers.set(room.name, disposer);\n }\n\n removeRoom(roomName) {\n if (this.roomDisposers.has(roomName)) {\n this.roomDisposers.get(roomName)(); // Dispose the reaction\n this.roomDisposers.delete(roomName);\n this.lastMessages.delete(roomName);\n }\n }\n\n updateLastMessage(roomName, message) {\n this.lastMessages.set(roomName, message);\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { autorun, transaction } from \"kr-observable\";\nimport { Person } from \"./Person.mjs\";\nimport { Room } from \"./Room.mjs\";\nimport { Message } from \"./Message.mjs\";\nimport { Notifications } from \"./Notifications.mjs\";\n\nfunction assert(condition) {\n if (!condition) throw new Error(\"Assertion failure\");\n}\n\nexport function runTest() {\n const logs = [];\n const customLog = (...args) => logs.push(args.join(\" \"));\n\n // --- Setup ---\n const techRoom = new Room(\"Tech Talk\");\n const generalRoom = new Room(\"General Chat\");\n const largeRoom = new Room(\"Large Meeting Room\");\n\n const alice = new Person(1, \"Alice\");\n const bob = new Person(2, \"Bob\");\n\n techRoom.addPerson(alice);\n techRoom.addPerson(bob);\n generalRoom.addPerson(alice);\n\n const rooms = [techRoom, generalRoom, largeRoom];\n const notifications = new Notifications(rooms);\n\n // --- Large Room Setup ---\n customLog(\"\\n--- Setting up Large Meeting Room ---\");\n const largeRoomMembers = [];\n for (let i = 3; i < 203; i++) {\n const person = new Person(i, `Person ${i}`);\n largeRoomMembers.push(person);\n largeRoom.addPerson(person);\n }\n customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`);\n\n // Add Alice and Bob to the large room\n largeRoom.addPerson(alice);\n largeRoom.addPerson(bob);\n customLog(\"[INFO] Added Alice and Bob to the Large Meeting Room.\");\n\n // Verify Person.rooms with Set\n assert(alice.rooms.size === 3);\n assert(\n alice.rooms.has(techRoom) &&\n alice.rooms.has(generalRoom) &&\n alice.rooms.has(largeRoom)\n );\n assert(\n bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom)\n );\n customLog(\"[PASS] Verified Person.rooms associations with Set.\");\n\n // --- autorun for global notifications ---\n const notificationsDisposer = autorun(() => {\n customLog(\"\\n--- Global Notifications (Last Messages) ---\");\n if (notifications.lastMessages.size === 0) {\n customLog(\"No messages yet.\");\n } else {\n notifications.lastMessages.forEach((message, roomName) => {\n customLog(`[${roomName}] \"${message.text}\" - ${message.author.name}`);\n });\n }\n customLog(\"------------------------------------------\");\n });\n\n // --- autorun for room updates ---\n const roomUpdatesDisposer = autorun(() => {\n rooms.forEach((room) => {\n if (room.roomUpdates.length > 0) {\n customLog(\n `[${room.name} Update] ${\n room.roomUpdates[room.roomUpdates.length - 1]\n }`\n );\n }\n });\n });\n\n // --- Status Update Scenario ---\n customLog(\"\\n--- Status Update Scenario ---\");\n\n alice.setStatus(\"Away\");\n assert(techRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(generalRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(largeRoom.roomUpdates.includes(\"Alice is now Away\"));\n customLog(\n \"[PASS] Verified that status updates are sent to all of Alice's rooms.\"\n );\n\n bob.setStatus(\"Busy\");\n assert(techRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(!generalRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(largeRoom.roomUpdates.includes(\"Bob is now Busy\"));\n customLog(\n \"[PASS] Verified that status updates are only sent to Bob's rooms.\"\n );\n\n // --- Messaging and Verification ---\n customLog(\"\\n--- Sending Messages & Verifying Notifications ---\");\n\n // Message 1: Tech Room\n const msg1 = new Message(\"First message to Tech Talk!\", alice);\n techRoom.addMessage(msg1);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg1);\n customLog(\"[PASS] Verified Tech Talk notification.\");\n\n // Message 2: General Chat\n for (let i = 0; i < 20; i++) {\n const msg2 = new Message(`ping ${i}`, alice);\n generalRoom.addMessage(msg2);\n // console.log('lastMessages', notifications.lastMessages.get(\"General Chat\").author.lastMessage)\n // console.log('msg2', msg2.author.lastMessage)\n assert(notifications.lastMessages.get(\"General Chat\") === msg2);\n }\n customLog(\"[PASS] Verified General Chat notification.\");\n\n // Message 3: Large Meeting Room\n for (let i = 0; i <= 5; i++) {\n for (const member of largeRoomMembers) {\n const msg = new Message(`Hi, I am ${member.name}`, member);\n largeRoom.addMessage(msg);\n assert(largeRoom.lastMessage == msg);\n assert(notifications.lastMessages.get(\"Large Meeting Room\") === msg);\n }\n }\n customLog(\"[PASS] Verified Large Meeting Room notification.\");\n\n // Message 4: Tech Room again\n for (let i = 0; i < 20; i++) {\n const msg4 = new Message(`ping ${i}`, bob);\n techRoom.addMessage(msg4);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg4);\n }\n customLog(\"[PASS] Verified Tech Talk notification update.\");\n\n const tempRooms = [];\n for (let i = 0; i < 10; i++) {\n const roomId = `General Chat ${i}`;\n const tempRoom = new Room(roomId);\n tempRooms.push(tempRoom);\n notifications.addRoom(tempRoom);\n for (const person of largeRoomMembers.slice(0, 10)) {\n tempRoom.addPerson(person);\n }\n for (const person of tempRoom.members.slice(0, 5)) {\n const msg = new Message(`ping ${i}`, person);\n tempRoom.addMessage(msg);\n assert(notifications.lastMessages.get(roomId) === msg);\n }\n }\n tempRooms.forEach((room) => room.dispose(notifications));\n\n // --- Clean up ---\n notificationsDisposer();\n roomUpdatesDisposer(); // Added disposer for room updates\n techRoom.dispose(notifications);\n generalRoom.dispose(notifications);\n largeRoom.dispose(notifications);\n\n return logs;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Executor","static","report","adm","property","set","this","length","runnable","unsubscribe","subscribe","execute","rest","active","deps","dispose","Set","push","result","run","pop","forEach","list","delete","Notifier","notify","changes","runId","subscriber","queued","queueMicrotask","flush","GlobalState","WeakMap","LibName","for","globalThis","seal","Global","queue","executor","notifier","Admin","owner","Map","listeners","current","constructor","has","add","cb","action","enqueueBatch","batch","flag","size","copy","keys","change","sub","computed","Utils","isPlainObject","ctor","isPrimitive","val","isDeepEqual","a","b","is","A","valueOf","B","getAdm","AdmKey","registry","error","TypeError","subscribersRegistry","autorun","work","disposer","debug","undefined","Computed","configurable","changed","name","descriptor","handler","prevValue","compute","prev","newValue","ProxyHandler","types","receiver","factory","IGNORED","target","WRITABLE","ACCESSOR","Reflect","object","desc","deleteProperty","res","setPrototypeOf","proto","assign","getOwnPropertyDescriptor","ActionHandler","ctx","apply","_","args","thenable","Promise","then","resolve","reject","e","clear","ObservableSet","meta","super","ObservableMap","metaKey","description","entries","values","callback","thisArg","iterator","hasKey","ObservableArray","Array","prepare","items","i","unshift","splice","start","deleteCount","copyWithin","end","reverse","shift","sort","compareFn","v","setDefaultTypes","ignore","shallow","SHALLOW","Factory","writable","bind","proxy","Proxy","makeObservable","isShallow","toString","Observable","chain","getPrototypeOf","skip","ownKeys","Person","id","lastMessage","rooms","status","setName","setLastMessage","message","addRoom","room","removeRoom","setStatus","addStatusUpdate","Room","people","messages","roomUpdates","messageCount","peopleCount","at","members","from","addPerson","person","removePerson","personId","addMessage","author","MAX_ROOM_UPDATES","slice","notifications","Message","text","timestamp","nextId","_nextId","Date","updateText","Notifications","lastMessages","roomDisposers","registered","adms","updateLastMessage","roomSubscribeKeys","roomName","assert","condition","Error","runTest","logs","customLog","join","techRoom","generalRoom","largeRoom","alice","bob","largeRoomMembers","notificationsDisposer","roomUpdatesDisposer","includes","msg1","msg2","member","msg","msg4","tempRooms","roomId","tempRoom"],"sourceRoot":""} \ No newline at end of file diff --git a/observable/dist/bundle.es6.min.js b/observable/dist/bundle.es6.min.js new file mode 100644 index 00000000..a93e1299 --- /dev/null +++ b/observable/dist/bundle.es6.min.js @@ -0,0 +1,230 @@ +(()=>{var e={d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{runTest:()=>$});class s{static#e=[];static report(e,t,s=!1){ +/*ThouShaltNotCache*/ +if(!this.#e.length)return;const r=this.#e[this.#e.length-1];s?e.unsubscribe(t,r):e.subscribe(t,r)}static execute(e,...t){ +/*ThouShaltNotCache*/ +e.active=!0,e.deps?this.dispose(e):e.deps=new Set,this.#e.push(e);const s=e.run(...t);return this.#e.pop(),e.active=!1,s}static dispose(e){ +/*ThouShaltNotCache*/ +e.deps.forEach(this.unsubscribe,e)}static unsubscribe(e){ +/*ThouShaltNotCache*/ +e.delete(this)}}class r{static queued=!1;static runId=2;static notify(e,t){ +/*ThouShaltNotCache*/ +e.runId=r.runId,e.subscriber(t),r.queued||(r.queued=!0,queueMicrotask(r.flush))}static flush(){ +/*ThouShaltNotCache*/ +r.queued=!1,r.runId=(r.runId+1)%1e5}}class i{static untracked=!1;static action=!1;static queue=new Set;static meta=new WeakMap;static executor=s;static notifier=r}const o=Symbol.for("kr-observable");globalThis[o]||(globalThis[o]=Object.seal(i));const a=globalThis[o],n=(a.executor,a.queue),c=a.notifier;class h{static meta={key:"",adm:new h("")};owner;deps=new Map;listeners;changes=new Set;current=null;queued=!1;constructor(e){ +/*ThouShaltNotCache*/ +this.owner=e}subscribe(e,t){ +/*ThouShaltNotCache*/ +let s=this.deps.get(e);s||(s=new Set,this.deps.set(e,s)),s.has(t)||s.add(t),t.deps?.has(s)||t.deps?.add(s)}unsubscribe(e,t){ +/*ThouShaltNotCache*/ +this.deps.get(e)?.delete(t)}report(e,t){if( +/*ThouShaltNotCache*/ +this.listeners?.forEach(s=>s(e,t)),this.deps.has(e))if(this.changes.add(e),a.action)n.add(this);else{if(this.queued)return;this.queued=!0,queueMicrotask(this.enqueueBatch)}}enqueueBatch=()=>{ +/*ThouShaltNotCache*/ +this.batch(),this.queued=!1};batch(e=!1){ +/*ThouShaltNotCache*/ +if(0===this.changes.size)return;const t=this.changes;if(t.size>1){const e=new Set;for(const s of this.deps.keys())t.has(s)&&e.add(s);this.changes=e}for(const s of this.changes){this.changes.delete(s),this.current=this.deps.get(s);for(const r of this.current)if(r.runId!==c.runId){if(r.active)return;if(e&&r.computed)return this.changes.add(s);c.notify(r,t)}this.current=null}}static batch(e){ +/*ThouShaltNotCache*/ +e.batch()}}class u{static AdmKey=Symbol.for("adm");static IGNORED=0;static ACCESSOR=1;static SHALLOW=2;static WRITABLE=3;static isPlainObject(e){ +/*ThouShaltNotCache*/ +const t=e?.constructor;return!t||t===Object}static isPrimitive(e){ +/*ThouShaltNotCache*/ +return null===e||"object"!=typeof e&&"function"!=typeof e}static isDeepEqual(e,t){ +/*ThouShaltNotCache*/ +if(null==e||null==t)return Object.is(e,t);const s=e.valueOf(),r=t.valueOf();if("object"==typeof s){if("object"!=typeof r)return!1;const e=Object.keys(s);if(e.length!==Object.keys(r).length)return!1;for(const t of e)if(!u.isDeepEqual(s[t],r[t]))return!1;return!0}return Object.is(e,t)}static getAdm(e){ +/*ThouShaltNotCache*/ +return e[u.AdmKey]}}const p=new Map,d=new TypeError("First argument must be Observable"),m=new Map;function l(e){ +/*ThouShaltNotCache*/ +let t=p.get(e);if(t)return t;const s={run:e,subscriber(){ +/*ThouShaltNotCache*/ +a.executor.execute(this)},debug:!1,runId:1,active:!1,deps:void 0};return t=()=>{ +/*ThouShaltNotCache*/ +p.delete(e),a.executor.dispose(s)},p.set(e,t),a.executor.execute(s),t}class f{enumerable;configurable;set;runId=1;debug=!1;active=!1;deps;#t;#s;#r;#i;#o;changed=!1;computed=!0;name;constructor(e,t,s){ +/*ThouShaltNotCache*/ +this.enumerable=t.enumerable,this.configurable=t.configurable,this.#s=e,this.#r=t,this.#t=s.adm,t.set&&(this.set=e=>{ +/*ThouShaltNotCache*/ +this.#r.set(e);const t=this.#o;this.#o=e,this.#a(t,e)})}subscriber(){ +/*ThouShaltNotCache*/ +this.changed=!0,0!==this.#t.deps.get(this.#s)?.size&&this.compute()}run(){ +/*ThouShaltNotCache*/ +return this.#r.get()}compute(){ +/*ThouShaltNotCache*/ +const e=this.#i;this.#n(),this.#a(e,this.#i)}#a(e,t){ +/*ThouShaltNotCache*/ +u.isDeepEqual(e,t)||this.#t.report(this.#s,t),a.action||this.#t.batch()}#n(){ +/*ThouShaltNotCache*/ +this.#i=a.executor.execute(this)}get=()=>( +/*ThouShaltNotCache*/ +a.action||this.#t.batch(),this.deps?0===this.deps?.size?this.run():(this.changed&&(this.changed=!1,this.#n()),this.#t.current?.has(this)&&this.compute(),this.#i):(this.#n(),this.#i))}const g=a.executor;class y{adm;types={};receiver;factory;constructor(e,t){ +/*ThouShaltNotCache*/ +this.adm=e,this.factory=t}#a(e,t){ +/*ThouShaltNotCache*/ +g.report(this.adm,e,!0),this.adm.report(e,t)}#c(e){ +/*ThouShaltNotCache*/ +this.types[e]!==u.IGNORED&&g.report(this.adm,e),a.action||this.adm.changes.size&&this.adm.changes.has(e)&&this.adm.batch(!0)}get(e,t){ +/*ThouShaltNotCache*/ +return t===u.AdmKey?this.adm:(this.#c(t),e[t])}set(e,t,s){ +/*ThouShaltNotCache*/ +return t in this.types||(this.types[t]=u.WRITABLE,this.#a(t,s)),this.types[t]===u.ACCESSOR?Reflect.set(e,t,s):(e[t]!==s&&this.#a(t,s),u.isPrimitive(s)?e[t]=s:e[t]=this.factory.object(t,s,this),!0)}defineProperty(e,t,s){ +/*ThouShaltNotCache*/ +return Reflect.defineProperty(e,t,this.factory.descriptor(t,s,this))}deleteProperty(e,t){ +/*ThouShaltNotCache*/ +if(!(t in e))return!1;const s=Reflect.deleteProperty(e,t);return this.#a(t,void 0),s}setPrototypeOf(e,t){ +/*ThouShaltNotCache*/ +const s=u.getAdm(t);return s&&Object.assign(s,this.adm),Reflect.setPrototypeOf(e,t)}has(e,t){ +/*ThouShaltNotCache*/ +return this.#c(t),t in e}getOwnPropertyDescriptor(e,t){ +/*ThouShaltNotCache*/ +return this.#c(t),Reflect.getOwnPropertyDescriptor(e,t)}}class b{ctx;constructor(e){ +/*ThouShaltNotCache*/ +this.ctx=e}apply(e,t,s){ +/*ThouShaltNotCache*/ +if(a.action)return e.apply(this.ctx,s);a.action=!0;try{let t=e.apply(this.ctx,s);const r=t instanceof Promise;return r&&(t=t.then(b.resolve,b.reject)),b.flush(),a.action=r,t}catch(e){b.reject(e)}}static flush(){ +/*ThouShaltNotCache*/ +a.queue.forEach(h.batch),a.queue.clear(),a.action=!1}static resolve(e){ +/*ThouShaltNotCache*/ +return b.flush(),e}static reject(e){ +/*ThouShaltNotCache*/ +throw b.flush(),e}}class w extends Set{get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}report(e){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),e}add(e){ +/*ThouShaltNotCache*/ +return this.report(super.add(e))}delete(e){ +/*ThouShaltNotCache*/ +return this.report(super.delete(e))}clear(){ +/*ThouShaltNotCache*/ +return super.clear(),this.report(void 0)}}class S extends Map{static#h(e,t){ +/*ThouShaltNotCache*/ +return null==t?`${e}.${t}`:"object"==typeof t?t:"symbol"==typeof t?`${e}.${t.description}`:`${e}.${t}`}get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}get size(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.size}keys(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.keys`),super.keys()}entries(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.entries()}values(){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.values()}forEach(e,t){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super.forEach(e,t)}[Symbol.iterator](){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,`${this.meta.key}.entries`),super[Symbol.iterator]()}has(e){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,S.#h(this.meta.key,e)),super.has(e)}get(e){ +/*ThouShaltNotCache*/ +return a.executor.report(this.meta.adm,S.#h(this.meta.key,e)),super.get(e)}set(e,t){ +/*ThouShaltNotCache*/ +let s=t;this.meta.factory&&(u.isPrimitive(s)||(s=this.meta.factory(this.meta.key,t,this.meta.handler)));const r=super.has(e),i=super.get(e),o=super.set(e,s);return r?i!==s&&(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(S.#h(this.meta.key,e),s)):(this.meta.adm.report(`${this.meta.key}.entries`,this),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(S.#h(this.meta.key,e),s)),o}delete(e){ +/*ThouShaltNotCache*/ +const t=super.delete(e);return t&&(this.meta.adm.report(S.#h(this.meta.key,e),void 0),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)),t}clear(){ +/*ThouShaltNotCache*/ +if(0===super.size)return;const e=this.meta.key;for(const t of this.keys())this.meta.adm.report(S.#h(e,t),void 0);super.clear(),this.meta.adm.report(`${this.meta.key}.keys`,this),this.meta.adm.report(`${this.meta.key}.entries`,this)}}class v extends Array{get meta(){ +/*ThouShaltNotCache*/ +return a.meta.get(this)||h.meta}report(e){ +/*ThouShaltNotCache*/ +return this.meta.adm.report(this.meta.key,this),e}prepare(e){ +/*ThouShaltNotCache*/ +const t=this.meta.factory;if(!t)return e;this.meta.adm;const s=this.meta.key,r=this.meta.handler;if(""===s)return e;for(let i=0;ie[t]=u.IGNORED),s?.forEach(t=>e[t]=u.SHALLOW),e}Reflect.has(Array.prototype,"set")||(Array.prototype.set=function(e,t){ +/*ThouShaltNotCache*/ +this[e]=t});class P{static descriptor(e,t,s){ +/*ThouShaltNotCache*/ +return e in s.types||("value"in t&&t.writable?s.types[e]=u.WRITABLE:s.types[e]=u.ACCESSOR),t.get&&(t.get=t.get.bind(s.receiver)),t.set&&(t.set=t.set.bind(s.receiver)),s.types[e]===u.IGNORED||(s.types[e]===u.ACCESSOR?t.get&&(t=new f(e,t,s)):u.isPrimitive(t.value)||(t.value=P.object(e,t.value,s))),t}static object(e,t,s){ +/*ThouShaltNotCache*/ +if(u.getAdm(t))return t;if(s.types[e]===u.IGNORED)return t;if(""===t.meta?.key)return t;if(u.isPlainObject(t))return function(e,t,s){ +/*ThouShaltNotCache*/ +if(u.isPrimitive(e))throw O;if(!u.isPlainObject(e))throw O;if(u.getAdm(e))return e;const r=new h(""),i=new y(r,P),o=new Proxy(e,i);i.receiver=o,k(i.types,t,s);for(const t in e){const s=P.descriptor(t,Object.getOwnPropertyDescriptor(e,t),i);s.writable?e[t]=s.value:Object.defineProperty(e,t,s)}return o}(t);if("function"==typeof t)return new Proxy(t,new b(s.receiver));const r=s.types[e]===u.SHALLOW,i={key:e.toString(),handler:s,adm:s.adm,factory:r?void 0:P.object};if(t instanceof Array){if(!r)for(let r=0;r{ +/*ThouShaltNotCache*/ +t.addStatusUpdate(this,e)})}}class A extends M{name;people=new Map;messages=[];roomUpdates=[];constructor(e){ +/*ThouShaltNotCache*/ +super(),this.name=e}get messageCount(){ +/*ThouShaltNotCache*/ +return this.messages.length}get peopleCount(){ +/*ThouShaltNotCache*/ +return this.people.size}get lastMessage(){ +/*ThouShaltNotCache*/ +return this.messages.at(-1)}get members(){ +/*ThouShaltNotCache*/ +return Array.from(this.people.values())}addPerson(e){ +/*ThouShaltNotCache*/ +this.people.has(e.id)||(this.people.set(e.id,e),e.addRoom(this))}removePerson(e){ +/*ThouShaltNotCache*/ +const t=this.people.get(e);t&&(t.removeRoom(this),this.people.delete(e))}addMessage(e){var t; +/*ThouShaltNotCache*/ +t=()=>{ +/*ThouShaltNotCache*/ +e.author.setLastMessage(e),this.messages.push(e)}, +/*ThouShaltNotCache*/ +a.action=!0,t(),a.action=!1,a.queue.forEach(h.batch),a.queue.clear(),a.notifier.flush()}addStatusUpdate(e,t){ +/*ThouShaltNotCache*/ +this.roomUpdates.push(`${e.name} is now ${t}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(e){ +/*ThouShaltNotCache*/ +this.people.forEach(e=>e.removeRoom(this)),e&&e.removeRoom(this.name)}}class j extends M{static ignore=new Set(["id","author","timestamp"]);static _nextId=0;id;text;author;timestamp;static nextId(){ +/*ThouShaltNotCache*/ +return j._nextId++}constructor(e,t){ +/*ThouShaltNotCache*/ +super(),this.id=j.nextId(),this.text=e,this.author=t,this.timestamp=new Date}updateText(e){ +/*ThouShaltNotCache*/ +this.text=e}}class R extends M{static ignore=new Set(["lastMessage","roomDisposers"]);static roomSubscribeKeys=new Set(["lastMessage"]);lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(e){ +/*ThouShaltNotCache*/ +super(),e.forEach(e=>this.addRoom(e))}addRoom(e){ +/*ThouShaltNotCache*/ +e.lastMessage;const t=function(e,t,s){ +/*ThouShaltNotCache*/ +const r=u.getAdm(e);if(!r)throw d;let i=m.get(t);if(i)return i.adms.has(r)||s.forEach(e=>r.subscribe(e,i.runnable)),i.disposer;const o={subscriber:t,runId:1,active:!1,deps:new Set};s.forEach(e=>r.subscribe(e,o));const n=()=>{ +/*ThouShaltNotCache*/ +m.delete(t),a.executor.dispose(o)};return i={runnable:o,disposer:n,adms:new Set([r])},m.set(t,i),n}(e,()=>{ +/*ThouShaltNotCache*/ +e.lastMessage&&this.updateLastMessage(e.name,e.lastMessage)},R.roomSubscribeKeys);this.roomDisposers.set(e.name,t)}removeRoom(e){ +/*ThouShaltNotCache*/ +this.roomDisposers.has(e)&&(this.roomDisposers.get(e)(),this.roomDisposers.delete(e),this.lastMessages.delete(e))}updateLastMessage(e,t){ +/*ThouShaltNotCache*/ +this.lastMessages.set(e,t)}}function E(e){ +/*ThouShaltNotCache*/ +if(!e)throw new Error("Assertion failure")}function $(){ +/*ThouShaltNotCache*/ +const e=[],t=(...t)=>e.push(t.join(" ")),s=new A("Tech Talk"),r=new A("General Chat"),i=new A("Large Meeting Room"),o=new x(1,"Alice"),a=new x(2,"Bob");s.addPerson(o),s.addPerson(a),r.addPerson(o);const n=[s,r,i],c=new R(n);t("\n--- Setting up Large Meeting Room ---");const h=[];for(let e=3;e<203;e++){const t=new x(e,`Person ${e}`);h.push(t),i.addPerson(t)}t(`[INFO] Added ${i.peopleCount} members to the large room.`),i.addPerson(o),i.addPerson(a),t("[INFO] Added Alice and Bob to the Large Meeting Room."),E(3===o.rooms.size),E(o.rooms.has(s)&&o.rooms.has(r)&&o.rooms.has(i)),E(2===a.rooms.size&&a.rooms.has(s)&&a.rooms.has(i)),t("[PASS] Verified Person.rooms associations with Set.");const u=l(()=>{ +/*ThouShaltNotCache*/ +t("\n--- Global Notifications (Last Messages) ---"),0===c.lastMessages.size?t("No messages yet."):c.lastMessages.forEach((e,s)=>{ +/*ThouShaltNotCache*/ +t(`[${s}] "${e.text}" - ${e.author.name}`)}),t("------------------------------------------")}),p=l(()=>{ +/*ThouShaltNotCache*/ +n.forEach(e=>{ +/*ThouShaltNotCache*/ +e.roomUpdates.length>0&&t(`[${e.name} Update] ${e.roomUpdates[e.roomUpdates.length-1]}`)})});t("\n--- Status Update Scenario ---"),o.setStatus("Away"),E(s.roomUpdates.includes("Alice is now Away")),E(r.roomUpdates.includes("Alice is now Away")),E(i.roomUpdates.includes("Alice is now Away")),t("[PASS] Verified that status updates are sent to all of Alice's rooms."),a.setStatus("Busy"),E(s.roomUpdates.includes("Bob is now Busy")),E(!r.roomUpdates.includes("Bob is now Busy")),E(i.roomUpdates.includes("Bob is now Busy")),t("[PASS] Verified that status updates are only sent to Bob's rooms."),t("\n--- Sending Messages & Verifying Notifications ---");const d=new j("First message to Tech Talk!",o);s.addMessage(d),E(c.lastMessages.get("Tech Talk")===d),t("[PASS] Verified Tech Talk notification.");for(let e=0;e<20;e++){const t=new j(`ping ${e}`,o);r.addMessage(t),E(c.lastMessages.get("General Chat")===t)}t("[PASS] Verified General Chat notification.");for(let e=0;e<=5;e++)for(const e of h){const t=new j(`Hi, I am ${e.name}`,e);i.addMessage(t),E(i.lastMessage==t),E(c.lastMessages.get("Large Meeting Room")===t)}t("[PASS] Verified Large Meeting Room notification.");for(let e=0;e<20;e++){const t=new j(`ping ${e}`,a);s.addMessage(t),E(c.lastMessages.get("Tech Talk")===t)}t("[PASS] Verified Tech Talk notification update.");const m=[];for(let e=0;e<10;e++){const t=`General Chat ${e}`,s=new A(t);m.push(s),c.addRoom(s);for(const e of h.slice(0,10))s.addPerson(e);for(const r of s.members.slice(0,5)){const i=new j(`ping ${e}`,r);s.addMessage(i),E(c.lastMessages.get(t)===i)}}return m.forEach(e=>e.dispose(c)),u(),p(),s.dispose(c),r.dispose(c),i.dispose(c),e}})(),MobXBenchmark=t})(); +//# sourceMappingURL=bundle.es6.min.js.map \ No newline at end of file diff --git a/observable/dist/bundle.es6.min.js.map b/observable/dist/bundle.es6.min.js.map new file mode 100644 index 00000000..71ec25f1 --- /dev/null +++ b/observable/dist/bundle.es6.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.es6.min.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAA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["webpack://MobXBenchmark/webpack/bootstrap","webpack://MobXBenchmark/webpack/runtime/define property getters","webpack://MobXBenchmark/webpack/runtime/hasOwnProperty shorthand","webpack://MobXBenchmark/webpack/runtime/make namespace object","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Executor.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Notifier.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/global.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Admin.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Utils.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/api.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Computed.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Proxy.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Action.handler.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.set.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.map.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.array.js","webpack://MobXBenchmark/./node_modules/kr-observable/dist/esm/main/src/Observable.js","webpack://MobXBenchmark/./src/Person.mjs","webpack://MobXBenchmark/./src/Room.mjs","webpack://MobXBenchmark/./src/Message.mjs","webpack://MobXBenchmark/./src/Notifications.mjs","webpack://MobXBenchmark/./src/test.mjs"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Executor {\n static #stack = [];\n static report(adm, property, set = false) {\n if (!this.#stack.length)\n return;\n const runnable = this.#stack[this.#stack.length - 1];\n if (set) {\n adm.unsubscribe(property, runnable);\n }\n else {\n adm.subscribe(property, runnable);\n }\n }\n static execute(runnable, ...rest) {\n runnable.active = true;\n if (!runnable.deps) {\n runnable.deps = new Set;\n }\n else {\n this.dispose(runnable);\n }\n this.#stack.push(runnable);\n const result = runnable.run(...rest);\n this.#stack.pop();\n runnable.active = false;\n return result;\n }\n static dispose(runnable) {\n runnable.deps.forEach(this.unsubscribe, runnable);\n }\n static unsubscribe(list) {\n list.delete(this);\n }\n}\n","export class Notifier {\n static queued = false;\n static runId = 2;\n static notify(runnable, changes) {\n runnable.runId = Notifier.runId;\n runnable.subscriber(changes);\n if (Notifier.queued)\n return;\n Notifier.queued = true;\n queueMicrotask(Notifier.flush);\n }\n static flush() {\n Notifier.queued = false;\n Notifier.runId = (Notifier.runId + 1) % 100_000;\n }\n}\n","import { Executor } from './Executor.js';\nimport { Notifier } from './Notifier.js';\nclass GlobalState {\n static untracked = false;\n static action = false;\n static queue = new Set;\n static meta = new WeakMap;\n static executor = Executor;\n static notifier = Notifier;\n}\nconst LibName = Symbol.for('kr-observable');\nif (!globalThis[LibName]) {\n globalThis[LibName] = Object.seal(GlobalState);\n}\nexport const Global = globalThis[LibName];\nexport const executor = Global.executor;\n","import { Global } from './global.js';\nconst queue = Global.queue;\nconst notifier = Global.notifier;\nexport class Admin {\n static meta = { key: '', adm: new Admin('') };\n owner;\n deps = new Map;\n listeners;\n changes = new Set;\n current = null;\n queued = false;\n constructor(owner) {\n this.owner = owner;\n }\n subscribe(property, runnable) {\n let list = this.deps.get(property);\n if (!list) {\n list = new Set;\n this.deps.set(property, list);\n }\n if (!list.has(runnable)) {\n list.add(runnable);\n }\n if (!runnable.deps?.has(list)) {\n runnable.deps?.add(list);\n }\n }\n unsubscribe(property, runnable) {\n this.deps.get(property)?.delete(runnable);\n }\n report(property, value) {\n this.listeners?.forEach(cb => cb(property, value));\n if (!this.deps.has(property))\n return;\n this.changes.add(property);\n if (Global.action) {\n queue.add(this);\n }\n else {\n if (this.queued)\n return;\n this.queued = true;\n queueMicrotask(this.enqueueBatch);\n }\n }\n enqueueBatch = () => {\n this.batch();\n this.queued = false;\n };\n batch(flag = false) {\n if (this.changes.size === 0)\n return;\n const changes = this.changes;\n if (changes.size > 1) {\n const copy = new Set();\n for (const key of this.deps.keys()) {\n if (changes.has(key))\n copy.add(key);\n }\n this.changes = copy;\n }\n for (const change of this.changes) {\n this.changes.delete(change);\n this.current = this.deps.get(change);\n for (const sub of this.current) {\n if (sub.runId !== notifier.runId) {\n if (sub.active) {\n return;\n }\n if (flag && sub.computed) {\n return this.changes.add(change);\n }\n notifier.notify(sub, changes);\n }\n }\n this.current = null;\n }\n }\n static batch(adm) {\n adm.batch();\n }\n}\n","export class Utils {\n static AdmKey = Symbol.for('adm');\n static IGNORED = 0;\n static ACCESSOR = 1;\n static SHALLOW = 2;\n static WRITABLE = 3;\n static isPlainObject(value) {\n const ctor = value?.constructor;\n return !ctor || ctor === Object;\n }\n static isPrimitive(val) {\n return val === null || (typeof val !== 'object' && typeof val !== 'function');\n }\n static isDeepEqual(a, b) {\n if (a == null || b == null)\n return Object.is(a, b);\n const A = a.valueOf();\n const B = b.valueOf();\n if (typeof A === 'object') {\n if (typeof B !== 'object')\n return false;\n const keys = Object.keys(A);\n if (keys.length !== Object.keys(B).length)\n return false;\n for (const key of keys) {\n if (!Utils.isDeepEqual(A[key], B[key]))\n return false;\n }\n return true;\n }\n return Object.is(a, b);\n }\n static getAdm(value) {\n return value[Utils.AdmKey];\n }\n}\n","import { Admin } from './Admin.js';\nimport { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst registry = new Map();\nconst error = new TypeError('First argument must be Observable');\nconst subscribersRegistry = new Map();\nexport function subscribe(target, cb, keys) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n let registered = subscribersRegistry.get(cb);\n if (registered) {\n if (!registered.adms.has(adm)) {\n keys.forEach(key => adm.subscribe(key, registered.runnable));\n }\n return registered.disposer;\n }\n const runnable = { subscriber: cb, runId: 1, active: false, deps: new Set };\n keys.forEach(key => adm.subscribe(key, runnable));\n const disposer = () => {\n subscribersRegistry.delete(cb);\n Global.executor.dispose(runnable);\n };\n registered = { runnable, disposer, adms: new Set([adm]) };\n subscribersRegistry.set(cb, registered);\n return disposer;\n}\nexport function autorun(work) {\n let disposer = registry.get(work);\n if (disposer)\n return disposer;\n const runnable = {\n run: work,\n subscriber() {\n Global.executor.execute(this);\n },\n debug: false,\n runId: 1,\n active: false,\n deps: undefined\n };\n disposer = () => {\n registry.delete(work);\n Global.executor.dispose(runnable);\n };\n registry.set(work, disposer);\n Global.executor.execute(runnable);\n return disposer;\n}\nexport function listen(target, cb) {\n const adm = Utils.getAdm(target);\n if (!adm)\n throw error;\n if (!adm.listeners)\n adm.listeners = new Set();\n adm.listeners.add(cb);\n return () => void adm.listeners.delete(cb);\n}\nexport function transaction(work) {\n Global.action = true;\n work();\n Global.action = false;\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.notifier.flush();\n}\nexport function untracked(work) {\n Global.untracked = true;\n const result = work();\n Global.untracked = false;\n return result;\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nexport class Computed {\n enumerable;\n configurable;\n set;\n runId = 1;\n debug = false;\n active = false;\n deps;\n #adm;\n #property;\n #descriptor;\n #value;\n #setterValue;\n changed = false;\n computed = true;\n name;\n constructor(property, descriptor, handler) {\n this.enumerable = descriptor.enumerable;\n this.configurable = descriptor.configurable;\n this.#property = property;\n this.#descriptor = descriptor;\n this.#adm = handler.adm;\n if (descriptor.set) {\n this.set = (value) => {\n this.#descriptor.set(value);\n const prevValue = this.#setterValue;\n this.#setterValue = value;\n this.#report(prevValue, value);\n };\n }\n }\n subscriber() {\n this.changed = true;\n if (this.#adm.deps.get(this.#property)?.size === 0) {\n return;\n }\n this.compute();\n }\n run() {\n return this.#descriptor.get();\n }\n compute() {\n const prev = this.#value;\n this.#reader();\n this.#report(prev, this.#value);\n }\n #report(prevValue, newValue) {\n if (!Utils.isDeepEqual(prevValue, newValue)) {\n this.#adm.report(this.#property, newValue);\n }\n if (Global.action)\n return;\n this.#adm.batch();\n }\n #reader() {\n this.#value = Global.executor.execute(this);\n }\n get = () => {\n if (!Global.action) {\n this.#adm.batch();\n }\n if (!this.deps) {\n this.#reader();\n return this.#value;\n }\n if (this.deps?.size === 0) {\n return this.run();\n }\n if (this.changed) {\n this.changed = false;\n this.#reader();\n }\n if (this.#adm.current?.has(this)) {\n this.compute();\n }\n return this.#value;\n };\n}\n","import { Utils } from './Utils.js';\nimport { Global } from './global.js';\nconst executor = Global.executor;\nexport class ProxyHandler {\n adm;\n types = {};\n receiver;\n factory;\n constructor(adm, factory) {\n this.adm = adm;\n this.factory = factory;\n }\n #report(property, value) {\n executor.report(this.adm, property, true);\n this.adm.report(property, value);\n }\n #batch(property) {\n if (this.types[property] !== Utils.IGNORED) {\n executor.report(this.adm, property);\n }\n if (Global.action)\n return;\n if (!this.adm.changes.size)\n return;\n if (this.adm.changes.has(property)) {\n this.adm.batch(true);\n }\n }\n get(target, property) {\n if (property === Utils.AdmKey)\n return this.adm;\n this.#batch(property);\n return target[property];\n }\n set(target, property, value) {\n if (!(property in this.types)) {\n this.types[property] = Utils.WRITABLE;\n this.#report(property, value);\n }\n if (this.types[property] === Utils.ACCESSOR) {\n return Reflect.set(target, property, value);\n }\n if (target[property] !== value) {\n this.#report(property, value);\n }\n if (Utils.isPrimitive(value)) {\n target[property] = value;\n }\n else {\n target[property] = this.factory.object(property, value, this);\n }\n return true;\n }\n defineProperty(target, property, desc) {\n return Reflect.defineProperty(target, property, this.factory.descriptor(property, desc, this));\n }\n deleteProperty(target, property) {\n if (!(property in target))\n return false;\n const res = Reflect.deleteProperty(target, property);\n this.#report(property, undefined);\n return res;\n }\n setPrototypeOf(target, proto) {\n const adm = Utils.getAdm(proto);\n if (adm)\n Object.assign(adm, this.adm);\n return Reflect.setPrototypeOf(target, proto);\n }\n has(target, property) {\n this.#batch(property);\n return property in target;\n }\n getOwnPropertyDescriptor(target, property) {\n this.#batch(property);\n return Reflect.getOwnPropertyDescriptor(target, property);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ActionHandler {\n ctx;\n constructor(receiver) {\n this.ctx = receiver;\n }\n apply(target, _, args) {\n if (Global.action)\n return target.apply(this.ctx, args);\n Global.action = true;\n try {\n let result = target.apply(this.ctx, args);\n const thenable = result instanceof Promise;\n if (thenable) {\n result = result.then(ActionHandler.resolve, ActionHandler.reject);\n }\n ActionHandler.flush();\n Global.action = thenable;\n return result;\n }\n catch (e) {\n ActionHandler.reject(e);\n }\n }\n static flush() {\n Global.queue.forEach(Admin.batch);\n Global.queue.clear();\n Global.action = false;\n }\n static resolve(result) {\n ActionHandler.flush();\n return result;\n }\n static reject(error) {\n ActionHandler.flush();\n throw error;\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nexport class ObservableSet extends Set {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n add(value) {\n return this.report(super.add(value));\n }\n delete(value) {\n return this.report(super.delete(value));\n }\n clear() {\n super.clear();\n return this.report(undefined);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableMap extends Map {\n static #getKey(metaKey, key) {\n if (key == undefined)\n return `${metaKey}.${key}`;\n if (typeof key === 'object')\n return key;\n if (typeof key === 'symbol')\n return `${metaKey}.${key.description}`;\n return `${metaKey}.${key}`;\n }\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n get size() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.size;\n }\n keys() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.keys`);\n return super.keys();\n }\n entries() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.entries();\n }\n values() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.values();\n }\n forEach(callback, thisArg) {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super.forEach(callback, thisArg);\n }\n [Symbol.iterator]() {\n Global.executor.report(this.meta.adm, `${this.meta.key}.entries`);\n return super[Symbol.iterator]();\n }\n has(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.has(key);\n }\n get(key) {\n Global.executor.report(this.meta.adm, ObservableMap.#getKey(this.meta.key, key));\n return super.get(key);\n }\n set(key, value) {\n let newValue = value;\n if (this.meta.factory) {\n if (!Utils.isPrimitive(newValue)) {\n newValue = this.meta.factory(this.meta.key, value, this.meta.handler);\n }\n }\n const hasKey = super.has(key);\n const prevValue = super.get(key);\n const result = super.set(key, newValue);\n if (!hasKey) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n else if (prevValue !== newValue) {\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), newValue);\n }\n return result;\n }\n delete(key) {\n const result = super.delete(key);\n if (result) {\n this.meta.adm.report(ObservableMap.#getKey(this.meta.key, key), undefined);\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n return result;\n }\n clear() {\n if (super.size === 0)\n return;\n const metaKey = this.meta.key;\n for (const key of this.keys()) {\n this.meta.adm.report(ObservableMap.#getKey(metaKey, key), undefined);\n }\n super.clear();\n this.meta.adm.report(`${this.meta.key}.keys`, this);\n this.meta.adm.report(`${this.meta.key}.entries`, this);\n }\n}\n","import { Admin } from './Admin.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nexport class ObservableArray extends Array {\n get meta() {\n return Global.meta.get(this) || Admin.meta;\n }\n report(result) {\n this.meta.adm.report(this.meta.key, this);\n return result;\n }\n prepare(items) {\n const factory = this.meta.factory;\n if (!factory)\n return items;\n const adm = this.meta.adm;\n const key = this.meta.key;\n const handler = this.meta.handler;\n if (key === '')\n return items;\n for (let i = 0; i < items.length; i++) {\n if (!Utils.isPrimitive(items[i])) {\n items[i] = factory(key, items[i], handler);\n }\n }\n return items;\n }\n push(...items) {\n return this.report(super.push(...this.prepare(items)));\n }\n unshift(...items) {\n return this.report(super.unshift(...this.prepare(items)));\n }\n splice(start, deleteCount, ...items) {\n return this.report(super.splice(start, deleteCount, ...this.prepare(items)));\n }\n copyWithin(target, start, end) {\n return this.report(super.copyWithin(target, start, end));\n }\n pop() {\n return this.report(super.pop());\n }\n reverse() {\n return this.report(super.reverse());\n }\n shift() {\n return this.report(super.shift());\n }\n sort(compareFn) {\n return this.report(super.sort(compareFn));\n }\n set(i, v) {\n return this.report(this[i] = v);\n }\n}\nif (!Reflect.has(Array.prototype, 'set')) {\n Array.prototype.set = function (i, value) {\n this[i] = value;\n };\n}\n","import { Admin } from './Admin.js';\nimport { Computed } from './Computed.js';\nimport { ProxyHandler } from './Proxy.handler.js';\nimport { ActionHandler } from './Action.handler.js';\nimport { ObservableSet } from './Observable.set.js';\nimport { ObservableMap } from './Observable.map.js';\nimport { ObservableArray } from './Observable.array.js';\nimport { Global } from './global.js';\nimport { Utils } from './Utils.js';\nfunction setDefaultTypes(types, ignore, shallow) {\n ignore?.forEach(key => types[key] = Utils.IGNORED);\n shallow?.forEach(key => types[key] = Utils.SHALLOW);\n return types;\n}\nclass Factory {\n static descriptor(property, descriptor, handler) {\n if (!(property in handler.types)) {\n if ('value' in descriptor) {\n if (descriptor.writable) {\n handler.types[property] = Utils.WRITABLE;\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n else {\n handler.types[property] = Utils.ACCESSOR;\n }\n }\n if (descriptor.get)\n descriptor.get = descriptor.get.bind(handler.receiver);\n if (descriptor.set)\n descriptor.set = descriptor.set.bind(handler.receiver);\n if (handler.types[property] === Utils.IGNORED)\n return descriptor;\n if (handler.types[property] === Utils.ACCESSOR) {\n if (descriptor.get) {\n descriptor = new Computed(property, descriptor, handler);\n }\n }\n else {\n if (!Utils.isPrimitive(descriptor.value)) {\n descriptor.value = Factory.object(property, descriptor.value, handler);\n }\n }\n return descriptor;\n }\n static object(property, value, handler) {\n if (Utils.getAdm(value))\n return value;\n if (handler.types[property] === Utils.IGNORED)\n return value;\n if (value['meta']?.key === '')\n return value;\n if (Utils.isPlainObject(value)) {\n return makeObservable(value);\n }\n if (typeof value === 'function') {\n return new Proxy(value, new ActionHandler(handler.receiver));\n }\n const isShallow = handler.types[property] === Utils.SHALLOW;\n const meta = {\n key: property.toString(),\n handler,\n adm: handler.adm,\n factory: isShallow ? undefined : Factory.object\n };\n if (value instanceof Array) {\n if (!isShallow) {\n for (let i = 0; i < value.length; i++) {\n if (!Utils.isPrimitive(value[i])) {\n value[i] = Factory.object(property, value[i], handler);\n }\n }\n }\n Object.setPrototypeOf(value, ObservableArray.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Map) {\n Object.setPrototypeOf(value, ObservableMap.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n if (value instanceof Set) {\n Object.setPrototypeOf(value, ObservableSet.prototype);\n Global.meta.set(value, meta);\n return value;\n }\n return value;\n }\n}\nexport class Observable {\n constructor() {\n const ctor = new.target;\n const adm = new Admin(ctor.name);\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(this, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ctor.ignore, ctor.shallow);\n const chain = [];\n let current = ctor.prototype;\n while (current !== Observable.prototype) {\n chain.push(current);\n current = Object.getPrototypeOf(current);\n }\n const skip = new Set(['constructor']);\n for (const proto of chain) {\n for (const key of Reflect.ownKeys(proto)) {\n if (skip.has(key))\n continue;\n skip.add(key);\n const desc = Reflect.getOwnPropertyDescriptor(proto, key);\n Object.defineProperty(this, key, Factory.descriptor(key, desc, handler));\n }\n }\n return proxy;\n }\n}\nconst error = new TypeError('Invalid argument. Only plain objects are allowed');\nexport function makeObservable(value, ignore, shallow) {\n if (Utils.isPrimitive(value))\n throw error;\n if (!Utils.isPlainObject(value))\n throw error;\n if (Utils.getAdm(value))\n return value;\n const adm = new Admin('');\n const handler = new ProxyHandler(adm, Factory);\n const proxy = new Proxy(value, handler);\n handler.receiver = proxy;\n setDefaultTypes(handler.types, ignore, shallow);\n for (const key in value) {\n const descriptor = Factory.descriptor(key, Object.getOwnPropertyDescriptor(value, key), handler);\n if (descriptor.writable) {\n value[key] = descriptor.value;\n }\n else {\n Object.defineProperty(value, key, descriptor);\n }\n }\n return proxy;\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Person extends Observable {\n id;\n name;\n lastMessage = null;\n rooms = new Set();\n status = 'Online';\n \n constructor(id, name) {\n super()\n this.id = id;\n this.name = name;\n }\n\n setName(name) {\n this.name = name;\n }\n\n setLastMessage(message) {\n this.lastMessage = message;\n }\n\n addRoom(room) {\n this.rooms.add(room);\n }\n\n removeRoom(room) {\n this.rooms.delete(room);\n }\n\n setStatus(status) {\n this.status = status;\n this.rooms.forEach(room => {\n room.addStatusUpdate(this, status);\n });\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable, transaction } from \"kr-observable\";\n\nconst MAX_ROOM_UPDATES = 10;\n\nexport class Room extends Observable {\n name;\n people = new Map();\n messages = [];\n roomUpdates = [];\n\n constructor(name) {\n super()\n this.name = name;\n }\n\n get messageCount() {\n return this.messages.length;\n }\n\n get peopleCount() {\n return this.people.size;\n }\n\n get lastMessage() {\n // if (this.messages.length === 0) {\n // return null;\n // }\n return this.messages.at(-1);\n }\n\n get members() {\n return Array.from(this.people.values());\n }\n\n addPerson(person) {\n if (!this.people.has(person.id)) {\n this.people.set(person.id, person);\n person.addRoom(this);\n }\n }\n\n removePerson(personId) {\n const person = this.people.get(personId);\n if (person) {\n person.removeRoom(this);\n this.people.delete(personId);\n }\n }\n\n addMessage(message) {\n transaction(() => {\n message.author.setLastMessage(message);\n this.messages.push(message);\n })\n }\n\n addStatusUpdate(person, status) {\n this.roomUpdates.push(`${person.name} is now ${status}`);\n if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2)\n this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES);\n }\n\n dispose(notifications) {\n this.people.forEach(person => person.removeRoom(this));\n if (notifications) {\n notifications.removeRoom(this.name);\n }\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Observable } from 'kr-observable';\n\nexport class Message extends Observable {\n static ignore = new Set(['id', 'author', 'timestamp'])\n static _nextId = 0;\n \n id;\n text;\n author; // Person\n timestamp;\n\n static nextId() {\n return Message._nextId++;\n }\n\n constructor(text, author) {\n super();\n this.id = Message.nextId();\n this.text = text;\n this.author = author;\n this.timestamp = new Date();\n }\n\n updateText(text) {\n this.text = text;\n }\n}\n","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\nimport { Observable, listen, subscribe } from 'kr-observable';\n\nexport class Notifications extends Observable {\n static ignore = new Set(['lastMessage', 'roomDisposers'])\n static roomSubscribeKeys = new Set(['lastMessage'])\n lastMessages = new Map(); // Map\n lastMessage; roomDisposers = new Map(); // Map\n\n constructor(rooms) {\n super()\n rooms.forEach(room => this.addRoom(room));\n }\n\n addRoom(room) {\n // lastMessage is computed and evaluates lazy\n // const disposer = autorun(() => {\n // if (room.lastMessage) {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n // const disposer = listen(room, (k,v) => {\n // if (k && v === 'lastMessage') {\n // this.updateLastMessage(room.name, room.lastMessage);\n // }\n // })\n room.lastMessage\n const disposer = subscribe(room, () => {\n if (room.lastMessage) {\n this.updateLastMessage(room.name, room.lastMessage);\n }\n }, Notifications.roomSubscribeKeys)\n this.roomDisposers.set(room.name, disposer);\n }\n\n removeRoom(roomName) {\n if (this.roomDisposers.has(roomName)) {\n this.roomDisposers.get(roomName)(); // Dispose the reaction\n this.roomDisposers.delete(roomName);\n this.lastMessages.delete(roomName);\n }\n }\n\n updateLastMessage(roomName, message) {\n this.lastMessages.set(roomName, message);\n }\n}","/*\n * Copyright (C) 2025 Apple Inc. All rights reserved.\n * Copyright 2025 Google LLC\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { autorun, transaction } from \"kr-observable\";\nimport { Person } from \"./Person.mjs\";\nimport { Room } from \"./Room.mjs\";\nimport { Message } from \"./Message.mjs\";\nimport { Notifications } from \"./Notifications.mjs\";\n\nfunction assert(condition) {\n if (!condition) throw new Error(\"Assertion failure\");\n}\n\nexport function runTest() {\n const logs = [];\n const customLog = (...args) => logs.push(args.join(\" \"));\n\n // --- Setup ---\n const techRoom = new Room(\"Tech Talk\");\n const generalRoom = new Room(\"General Chat\");\n const largeRoom = new Room(\"Large Meeting Room\");\n\n const alice = new Person(1, \"Alice\");\n const bob = new Person(2, \"Bob\");\n\n techRoom.addPerson(alice);\n techRoom.addPerson(bob);\n generalRoom.addPerson(alice);\n\n const rooms = [techRoom, generalRoom, largeRoom];\n const notifications = new Notifications(rooms);\n\n // --- Large Room Setup ---\n customLog(\"\\n--- Setting up Large Meeting Room ---\");\n const largeRoomMembers = [];\n for (let i = 3; i < 203; i++) {\n const person = new Person(i, `Person ${i}`);\n largeRoomMembers.push(person);\n largeRoom.addPerson(person);\n }\n customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`);\n\n // Add Alice and Bob to the large room\n largeRoom.addPerson(alice);\n largeRoom.addPerson(bob);\n customLog(\"[INFO] Added Alice and Bob to the Large Meeting Room.\");\n\n // Verify Person.rooms with Set\n assert(alice.rooms.size === 3);\n assert(\n alice.rooms.has(techRoom) &&\n alice.rooms.has(generalRoom) &&\n alice.rooms.has(largeRoom)\n );\n assert(\n bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom)\n );\n customLog(\"[PASS] Verified Person.rooms associations with Set.\");\n\n // --- autorun for global notifications ---\n const notificationsDisposer = autorun(() => {\n customLog(\"\\n--- Global Notifications (Last Messages) ---\");\n if (notifications.lastMessages.size === 0) {\n customLog(\"No messages yet.\");\n } else {\n notifications.lastMessages.forEach((message, roomName) => {\n customLog(`[${roomName}] \"${message.text}\" - ${message.author.name}`);\n });\n }\n customLog(\"------------------------------------------\");\n });\n\n // --- autorun for room updates ---\n const roomUpdatesDisposer = autorun(() => {\n rooms.forEach((room) => {\n if (room.roomUpdates.length > 0) {\n customLog(\n `[${room.name} Update] ${\n room.roomUpdates[room.roomUpdates.length - 1]\n }`\n );\n }\n });\n });\n\n // --- Status Update Scenario ---\n customLog(\"\\n--- Status Update Scenario ---\");\n\n alice.setStatus(\"Away\");\n assert(techRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(generalRoom.roomUpdates.includes(\"Alice is now Away\"));\n assert(largeRoom.roomUpdates.includes(\"Alice is now Away\"));\n customLog(\n \"[PASS] Verified that status updates are sent to all of Alice's rooms.\"\n );\n\n bob.setStatus(\"Busy\");\n assert(techRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(!generalRoom.roomUpdates.includes(\"Bob is now Busy\"));\n assert(largeRoom.roomUpdates.includes(\"Bob is now Busy\"));\n customLog(\n \"[PASS] Verified that status updates are only sent to Bob's rooms.\"\n );\n\n // --- Messaging and Verification ---\n customLog(\"\\n--- Sending Messages & Verifying Notifications ---\");\n\n // Message 1: Tech Room\n const msg1 = new Message(\"First message to Tech Talk!\", alice);\n techRoom.addMessage(msg1);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg1);\n customLog(\"[PASS] Verified Tech Talk notification.\");\n\n // Message 2: General Chat\n for (let i = 0; i < 20; i++) {\n const msg2 = new Message(`ping ${i}`, alice);\n generalRoom.addMessage(msg2);\n // console.log('lastMessages', notifications.lastMessages.get(\"General Chat\").author.lastMessage)\n // console.log('msg2', msg2.author.lastMessage)\n assert(notifications.lastMessages.get(\"General Chat\") === msg2);\n }\n customLog(\"[PASS] Verified General Chat notification.\");\n\n // Message 3: Large Meeting Room\n for (let i = 0; i <= 5; i++) {\n for (const member of largeRoomMembers) {\n const msg = new Message(`Hi, I am ${member.name}`, member);\n largeRoom.addMessage(msg);\n assert(largeRoom.lastMessage == msg);\n assert(notifications.lastMessages.get(\"Large Meeting Room\") === msg);\n }\n }\n customLog(\"[PASS] Verified Large Meeting Room notification.\");\n\n // Message 4: Tech Room again\n for (let i = 0; i < 20; i++) {\n const msg4 = new Message(`ping ${i}`, bob);\n techRoom.addMessage(msg4);\n assert(notifications.lastMessages.get(\"Tech Talk\") === msg4);\n }\n customLog(\"[PASS] Verified Tech Talk notification update.\");\n\n const tempRooms = [];\n for (let i = 0; i < 10; i++) {\n const roomId = `General Chat ${i}`;\n const tempRoom = new Room(roomId);\n tempRooms.push(tempRoom);\n notifications.addRoom(tempRoom);\n for (const person of largeRoomMembers.slice(0, 10)) {\n tempRoom.addPerson(person);\n }\n for (const person of tempRoom.members.slice(0, 5)) {\n const msg = new Message(`ping ${i}`, person);\n tempRoom.addMessage(msg);\n assert(notifications.lastMessages.get(roomId) === msg);\n }\n }\n tempRooms.forEach((room) => room.dispose(notifications));\n\n // --- Clean up ---\n notificationsDisposer();\n roomUpdatesDisposer(); // Added disposer for room updates\n techRoom.dispose(notifications);\n generalRoom.dispose(notifications);\n largeRoom.dispose(notifications);\n\n return logs;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Executor","static","report","adm","property","set","this","length","runnable","unsubscribe","subscribe","execute","rest","active","deps","dispose","Set","push","result","run","pop","forEach","list","delete","Notifier","notify","changes","runId","subscriber","queued","queueMicrotask","flush","GlobalState","WeakMap","LibName","for","globalThis","seal","Global","queue","executor","notifier","Admin","owner","Map","listeners","current","constructor","has","add","cb","action","enqueueBatch","batch","flag","size","copy","keys","change","sub","computed","Utils","isPlainObject","ctor","isPrimitive","val","isDeepEqual","a","b","is","A","valueOf","B","getAdm","AdmKey","registry","error","TypeError","subscribersRegistry","autorun","work","disposer","debug","undefined","Computed","configurable","changed","name","descriptor","handler","prevValue","compute","prev","newValue","ProxyHandler","types","receiver","factory","IGNORED","target","WRITABLE","ACCESSOR","Reflect","object","desc","deleteProperty","res","setPrototypeOf","proto","assign","getOwnPropertyDescriptor","ActionHandler","ctx","apply","_","args","thenable","Promise","then","resolve","reject","e","clear","ObservableSet","meta","super","ObservableMap","metaKey","description","entries","values","callback","thisArg","iterator","hasKey","ObservableArray","Array","prepare","items","i","unshift","splice","start","deleteCount","copyWithin","end","reverse","shift","sort","compareFn","v","setDefaultTypes","ignore","shallow","SHALLOW","Factory","writable","bind","proxy","Proxy","makeObservable","isShallow","toString","Observable","chain","getPrototypeOf","skip","ownKeys","Person","id","lastMessage","rooms","status","setName","setLastMessage","message","addRoom","room","removeRoom","setStatus","addStatusUpdate","Room","people","messages","roomUpdates","messageCount","peopleCount","at","members","from","addPerson","person","removePerson","personId","addMessage","author","MAX_ROOM_UPDATES","slice","notifications","Message","text","timestamp","nextId","_nextId","Date","updateText","Notifications","lastMessages","roomDisposers","registered","adms","updateLastMessage","roomSubscribeKeys","roomName","assert","condition","Error","runTest","logs","customLog","join","techRoom","generalRoom","largeRoom","alice","bob","largeRoomMembers","notificationsDisposer","roomUpdatesDisposer","includes","msg1","msg2","member","msg","msg4","tempRooms","roomId","tempRoom"],"sourceRoot":""} \ No newline at end of file diff --git a/observable/package-lock.json b/observable/package-lock.json new file mode 100644 index 00000000..4d48e2bc --- /dev/null +++ b/observable/package-lock.json @@ -0,0 +1,4980 @@ +{ + "name": "observable", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "observable", + "version": "1.0.0", + "license": "See LICENSE files", + "dependencies": { + "kr-observable": "^3.1.14" + }, + "devDependencies": { + "@babel/core": "^7.28.3", + "babel-loader": "^10.0.0", + "generate-license-file-webpack-plugin": "^4.1.0", + "terser-webpack-plugin": "^5.3.14", + "webpack": "^5.101.3", + "webpack-cli": "^6.0.1" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz", + "integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.3", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.3", + "@babel/types": "^7.28.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.3.tgz", + "integrity": "sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.3.tgz", + "integrity": "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz", + "integrity": "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", + "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", + "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz", + "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@npmcli/agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz", + "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@npmcli/arborist": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.1.6.tgz", + "integrity": "sha512-c5Pr3EG8UP5ollkJy2x+UdEQC5sEHe3H9whYn6hb2HJimAKS4zmoJkx5acCiR/g4P38RnCSMlsYQyyHnKYeLvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^5.0.0", + "@npmcli/metavuln-calculator": "^9.0.2", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^10.0.0", + "bin-links": "^5.0.0", + "cacache": "^20.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^9.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^11.2.1", + "minimatch": "^10.0.3", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^13.0.0", + "npm-pick-manifest": "^11.0.1", + "npm-registry-fetch": "^19.0.0", + "pacote": "^21.0.2", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/arborist/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/arborist/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/fs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz", + "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-7.0.0.tgz", + "integrity": "sha512-vnz7BVGtOctJAIHouCJdvWBhsTVSICMeUgZo2c7XAi5d5Rrl80S1H7oPym7K03cRuinK5Q6s2dw36+PgXQTcMA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^8.0.0", + "ini": "^5.0.0", + "lru-cache": "^11.2.1", + "npm-pick-manifest": "^11.0.1", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/git/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-3.0.0.tgz", + "integrity": "sha512-fkxoPuFGvxyrH+OQzyTkX2LUEamrF4jZSmxjAtPPHHGO0dqsQ8tTKjnIS8SAnPHdk2I03BDtSMR5K/4loKg79Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "npm-bundled": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" + }, + "bin": { + "installed-package-contents": "bin/index.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/map-workspaces": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-5.0.0.tgz", + "integrity": "sha512-+YJN6+BIQEC5QL4EqffJ2I1S9ySspwn7GP7uQINtZhf3uy7P0KnnIg+Ab5WeSUTZYpg+jn3GSfMme2FutB7qEQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/package-json": "^7.0.0", + "glob": "^11.0.3", + "minimatch": "^10.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/metavuln-calculator": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.2.tgz", + "integrity": "sha512-eESzlCRLuD30qYefT2jYZTUepgu9DNJQdXABGGxjkir055x2UtnpNfDZCA6OJxButQNgxNKc9AeTchYxSgbMCw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cacache": "^20.0.0", + "json-parse-even-better-errors": "^4.0.0", + "pacote": "^21.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", + "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/metavuln-calculator/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/name-from-folder": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-3.0.0.tgz", + "integrity": "sha512-61cDL8LUc9y80fXn+lir+iVt8IS0xHqEKwPu/5jCjxQTVoSCmkXvw4vbMrzAMtmghz3/AkiBjhHkDKUH+kf7kA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-4.0.0.tgz", + "integrity": "sha512-+t5DZ6mO/QFh78PByMq1fGSAub/agLJZDRfJRMeOSNCt8s9YVlTjmGpIPwPhvXTGUIJk+WszlT0rQa1W33yzNA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/package-json": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-7.0.1.tgz", + "integrity": "sha512-956YUeI0YITbk2+KnirCkD19HLzES0habV+Els+dyZaVsaM6VGSiNwnRu6t3CZaqDLz4KXy2zx+0N/Zy6YjlAA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^7.0.0", + "glob": "^11.0.3", + "hosted-git-info": "^9.0.0", + "json-parse-even-better-errors": "^4.0.0", + "proc-log": "^5.0.0", + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", + "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/promise-spawn": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.3.tgz", + "integrity": "sha512-Yb00SWaL4F8w+K8YGhQ55+xE4RUNdMHV43WZGsiTM92gS+lC0mGsn7I4hLug7pbao035S6bj3Y3w0cUNGLfmkg==", + "dev": true, + "license": "ISC", + "dependencies": { + "which": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/query": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-4.0.1.tgz", + "integrity": "sha512-4OIPFb4weUUwkDXJf4Hh1inAn8neBGq3xsH4ZsAaN6FK3ldrFkH7jSpCc7N9xesi0Sp+EBXJ9eGMDrEww2Ztqw==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/redact": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-3.2.2.tgz", + "integrity": "sha512-7VmYAmk4csGv08QzrDKScdzn11jHPFGyqJW39FyPgPuAp3zIaUmuCo1yxw9aGs+NEJuTGQ9Gwqpt93vtJubucg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-10.0.0.tgz", + "integrity": "sha512-vaQj4nccJbAslopIvd49pQH2NhUp7G9pY4byUtmwhe37ZZuubGrx0eB9hW2F37uVNRuDDK6byFGXF+7JCuMSZg==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "node-gyp": "^11.0.0", + "proc-log": "^5.0.0", + "which": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@sigstore/bundle": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-4.0.0.tgz", + "integrity": "sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.0.0.tgz", + "integrity": "sha512-NgbJ+aW9gQl/25+GIEGYcCyi8M+ng2/5X04BMuIgoDfgvp18vDcoNHOQjQsG9418HGNYRxG3vfEXaR1ayD37gg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.0.tgz", + "integrity": "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.0.1.tgz", + "integrity": "sha512-KFNGy01gx9Y3IBPG/CergxR9RZpN43N+lt3EozEfeoyqm8vEiLxwRl3ZO5sPx3Obv1ix/p7FWOlPc2Jgwfp9PA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0", + "make-fetch-happen": "^15.0.2", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/sign/node_modules/@npmcli/agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz", + "integrity": "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/sign/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@sigstore/sign/node_modules/make-fetch-happen": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.2.tgz", + "integrity": "sha512-sI1NY4lWlXBAfjmCtVWIIpBypbBdhHtcjnwnv+gtCnsaOffyFil3aidszGC8hgzJe+fT1qix05sWxmD/Bmf/oQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^4.0.0", + "cacache": "^20.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.0.tgz", + "integrity": "sha512-0QFuWDHOQmz7t66gfpfNO6aEjoFrdhkJaej/AOqb4kqWZVbPWFZifXZzkxyQBB1OwTbkhdT3LNpMFxwkTvf+2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0", + "tuf-js": "^4.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-3.0.0.tgz", + "integrity": "sha512-moXtHH33AobOhTZF8xcX1MpOFqdvfCk7v6+teJL8zymBiDXwEsQH6XG9HGx2VIxnJZNm4cNSzflTLDnQLmIdmw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-4.0.0.tgz", + "integrity": "sha512-h5x5ga/hh82COe+GoD4+gKUeV4T3iaYOxqLt41GRKApinPI7DMidhCmNVTjKfhCWFJIGXaFJee07XczdT4jdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-3.0.1.tgz", + "integrity": "sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-3.0.1.tgz", + "integrity": "sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-3.0.1.tgz", + "integrity": "sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/babel-loader": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.0.0.tgz", + "integrity": "sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": "^18.20.0 || ^20.10.0 || >=22.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5.61.0" + } + }, + "node_modules/babel-loader/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bin-links": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-5.0.0.tgz", + "integrity": "sha512-sdleLVfCjBtgO5cNjA2HVRvWBJAHs4zwenaCPMNJAJU0yNxpzj80IpjOIimkpkr+mhlA+how5poQtt53PygbHA==", + "dev": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^7.0.0", + "npm-normalize-package-bin": "^4.0.0", + "proc-log": "^5.0.0", + "read-cmd-shim": "^5.0.0", + "write-file-atomic": "^6.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.25.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz", + "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001733", + "electron-to-chromium": "^1.5.199", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cacache": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.1.tgz", + "integrity": "sha512-+7LYcYGBYoNqTp1Rv7Ny1YjUo5E0/ftkQtraH3vkfAGgVHc+ouWdC8okAwQgQR7EVIdW6JTzTmhKFwzb+4okAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^11.0.3", + "lru-cache": "^11.1.0", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001735", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz", + "integrity": "sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cmd-shim": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-7.0.0.tgz", + "integrity": "sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/common-ancestor-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", + "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", + "dev": true, + "license": "ISC" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.204", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.204.tgz", + "integrity": "sha512-s9VbBXWxfDrl67PlO4avwh0/GU2vcwx8Fph3wlR8LJl7ySGYId59EFE17VWVcuC3sLWNPENm6Z/uGqKbkPCcXA==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/envinfo": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-license-file": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.1.0.tgz", + "integrity": "sha512-g/GGnfquPMFnOiPeBVdjWBp+MwbmPvP/RatL8v97kuQrPYmZWb3Oqmm3PdMQyXWaE2cnjGRXNXB7o0tIV4ZT9A==", + "dev": true, + "license": "ISC", + "dependencies": { + "@commander-js/extra-typings": "^13.1.0", + "@npmcli/arborist": "^9.0.0", + "cli-spinners": "^2.6.0", + "commander": "^13.1.0", + "cosmiconfig": "^9.0.0", + "enquirer": "^2.3.6", + "glob": "^11.0.0", + "json5": "^2.2.3", + "ora": "^5.4.1", + "tslib": "^2.3.0", + "zod": "^3.21.4" + }, + "bin": { + "generate-license-file": "bin/generate-license-file" + } + }, + "node_modules/generate-license-file-webpack-plugin": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/generate-license-file-webpack-plugin/-/generate-license-file-webpack-plugin-4.1.0.tgz", + "integrity": "sha512-p6AjnH8tXS+Ze0XwKJd2jzOLBeEqvKIl14bTmiAehdOEThNnkFwebkoON1ms79jm9st4OWqHfI+Rh6yWFWFXCQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "generate-license-file": "4.1.0", + "tslib": "^2.3.0", + "webpack": "^5.75.0" + } + }, + "node_modules/generate-license-file/node_modules/@commander-js/extra-typings": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-13.1.0.tgz", + "integrity": "sha512-q5P52BYb1hwVWE6dtID7VvuJWrlfbCv4klj7BjUUOqMz4jbSZD4C9fJ9lRjL2jnBGTg+gDDlaXN51rkWcLk4fg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "commander": "~13.1.0" + } + }, + "node_modules/generate-license-file/node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", + "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^11.1.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore-walk": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-8.0.0.tgz", + "integrity": "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minimatch": "^10.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-5.0.0.tgz", + "integrity": "sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ip-address": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-nice": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", + "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", + "dev": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/just-diff": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz", + "integrity": "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==", + "dev": true, + "license": "MIT" + }, + "node_modules/just-diff-apply": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", + "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kr-observable": { + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/kr-observable/-/kr-observable-3.1.14.tgz", + "integrity": "sha512-Kn+Z+xCbwFCxXju+Okm5dxlQKqIf/MGfF3WLjQsokxi3p4BG5Ow17ESJflpMvHALNdLMvc6DRZJnURNG9e4N5w==", + "license": "MIT" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-fetch-happen": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", + "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/make-fetch-happen/node_modules/cacache": { + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", + "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/make-fetch-happen/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/make-fetch-happen/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/make-fetch-happen/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/make-fetch-happen/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz", + "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-gyp": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.5.0.tgz", + "integrity": "sha512-ra7Kvlhxn5V9Slyus0ygMa2h+UqExPqUIkfk7Pc8QTLT956JLSy51uWFwHtIYy0vI8cB4BDhc/S03+880My/LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^14.0.3", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "tar": "^7.4.3", + "tinyglobby": "^0.2.12", + "which": "^5.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-bundled": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-4.0.0.tgz", + "integrity": "sha512-IxaQZDMsqfQ2Lz37VvyyEtKLe8FsRZuysmedy/N06TU1RyVppYKXrO4xIhR0F+7ubIBox6Q7nir6fQI3ej39iA==", + "dev": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-install-checks": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.2.tgz", + "integrity": "sha512-z9HJBCYw9Zr8BqXcllKIs5nI+QggAImbBdHphOzVYrz2CB4iQ6FzWyKmlqDZua+51nAu7FcemlbTc9VgQN5XDQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-install-checks/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", + "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-package-arg": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-13.0.1.tgz", + "integrity": "sha512-6zqls5xFvJbgFjB1B2U6yITtyGBjDBORB7suI4zA4T/sZ1OmkMFlaQSNB/4K0LtXNA1t4OprAFxPisadK5O2ag==", + "dev": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^9.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-package-arg/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-packlist": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-10.0.2.tgz", + "integrity": "sha512-DrIWNiWT0FTdDRjGOYfEEZUNe1IzaSZ+up7qBTKnrQDySpdmuOQvytrqQlpK5QrCA4IThMvL4wTumqaa1ZvVIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^8.0.0", + "proc-log": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-11.0.1.tgz", + "integrity": "sha512-HnU7FYSWbo7dTVHtK0G+BXbZ0aIfxz/aUCVLN0979Ec6rGUX5cJ6RbgVx5fqb5G31ufz+BVFA7y1SkRTPVNoVQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^7.1.0", + "npm-normalize-package-bin": "^4.0.0", + "npm-package-arg": "^13.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-registry-fetch": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-19.0.0.tgz", + "integrity": "sha512-DFxSAemHUwT/POaXAOY4NJmEWBPB0oKbwD6FFDE9hnt1nORkt/FXvgjD4hQjoKoHw9u0Ezws9SPXwV7xE/Gyww==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/redact": "^3.0.0", + "jsonparse": "^1.3.1", + "make-fetch-happen": "^15.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minizlib": "^3.0.1", + "npm-package-arg": "^13.0.0", + "proc-log": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/@npmcli/agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz", + "integrity": "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.2.tgz", + "integrity": "sha512-sI1NY4lWlXBAfjmCtVWIIpBypbBdhHtcjnwnv+gtCnsaOffyFil3aidszGC8hgzJe+fT1qix05sWxmD/Bmf/oQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^4.0.0", + "cacache": "^20.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", + "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/pacote": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.0.3.tgz", + "integrity": "sha512-itdFlanxO0nmQv4ORsvA9K1wv40IPfB9OmWqfaJWvoJ30VKyHsqNgDVeG+TVhI7Gk7XW8slUy7cA9r6dF5qohw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^7.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^10.0.0", + "cacache": "^20.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^13.0.0", + "npm-packlist": "^10.0.1", + "npm-pick-manifest": "^11.0.1", + "npm-registry-fetch": "^19.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^4.0.0", + "ssri": "^12.0.0", + "tar": "^7.4.3" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-conflict-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-4.0.0.tgz", + "integrity": "sha512-37CN2VtcuvKgHUs8+0b1uJeEsbGn61GRHz469C94P5xiOoqpDYJYwjg4RY9Vmz39WyZAVkR5++nbJwLMIgOCnQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^4.0.0", + "just-diff": "^6.0.0", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/parse-conflict-json/node_modules/json-parse-even-better-errors": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", + "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/proc-log": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/proggy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proggy/-/proggy-3.0.0.tgz", + "integrity": "sha512-QE8RApCM3IaRRxVzxrjbgNMpQEX6Wu0p0KBeoSiSEw5/bsGwZHsshF4LCxH2jp/r6BU+bqA3LrMDEYNfJnpD8Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/promise-all-reject-late": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", + "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", + "dev": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/promise-call-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-3.0.2.tgz", + "integrity": "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw==", + "dev": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-cmd-shim": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz", + "integrity": "sha512-SEbJV7tohp3DAAILbEMPXavBjAnMN0tVnh4+9G8ihV4Pq3HYF9h8QNez9zkJ1ILkv9G2BjdzwctznGZXgu/HGw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/schema-utils": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", + "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sigstore": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-4.0.0.tgz", + "integrity": "sha512-Gw/FgHtrLM9WP8P5lLcSGh9OQcrTruWCELAiS48ik1QbL0cH+dfjomiRTUE9zzz+D1N6rOLkwXUvVmXZAsNE0Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0", + "@sigstore/sign": "^4.0.0", + "@sigstore/tuf": "^4.0.0", + "@sigstore/verify": "^3.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/ssri": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz", + "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", + "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/terser": { + "version": "5.43.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", + "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", + "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/treeverse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", + "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tuf-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-4.0.0.tgz", + "integrity": "sha512-Lq7ieeGvXDXwpoSmOSgLWVdsGGV9J4a77oDTAPe/Ltrqnnm/ETaRlBAQTH5JatEh8KXuE6sddf9qAv1Q2282Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tufjs/models": "4.0.0", + "debug": "^4.4.1", + "make-fetch-happen": "^15.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/tuf-js/node_modules/@npmcli/agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz", + "integrity": "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/tuf-js/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/tuf-js/node_modules/make-fetch-happen": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.2.tgz", + "integrity": "sha512-sI1NY4lWlXBAfjmCtVWIIpBypbBdhHtcjnwnv+gtCnsaOffyFil3aidszGC8hgzJe+fT1qix05sWxmD/Bmf/oQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^4.0.0", + "cacache": "^20.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/unique-filename": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", + "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/unique-slug": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz", + "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-6.0.2.tgz", + "integrity": "sha512-IUoow1YUtvoBBC06dXs8bR8B9vuA3aJfmQNKMoaPG/OFsPmoQvw8xh+6Ye25Gx9DQhoEom3Pcu9MKHerm/NpUQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/walk-up-path": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz", + "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/watchpack": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webpack": { + "version": "5.101.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.101.3.tgz", + "integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.3", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.2", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.1", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-6.0.1.tgz", + "integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.6.1", + "@webpack-cli/configtest": "^3.0.1", + "@webpack-cli/info": "^3.0.1", + "@webpack-cli/serve": "^3.0.1", + "colorette": "^2.0.14", + "commander": "^12.1.0", + "cross-spawn": "^7.0.3", + "envinfo": "^7.14.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.82.0" + }, + "peerDependenciesMeta": { + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/write-file-atomic": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-6.0.0.tgz", + "integrity": "sha512-GmqrO8WJ1NuzJ2DrziEI2o57jKAVIQNf8a18W3nCYU3H7PNWqCCVTeH6/NQE93CIllIgQS98rrmVkYgTX9fFJQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/observable/package.json b/observable/package.json new file mode 100644 index 00000000..7d271a23 --- /dev/null +++ b/observable/package.json @@ -0,0 +1,21 @@ +{ + "name": "observable", + "version": "1.0.0", + "scripts": { + "test": "node ./benchmark-node.mjs", + "clean": "rm -rf dist/*", + "build": "webpack" + }, + "license": "See LICENSE files", + "dependencies": { + "kr-observable": "^3.1.14" + }, + "devDependencies": { + "@babel/core": "^7.28.3", + "babel-loader": "^10.0.0", + "generate-license-file-webpack-plugin": "^4.1.0", + "terser-webpack-plugin": "^5.3.14", + "webpack": "^5.101.3", + "webpack-cli": "^6.0.1" + } +} diff --git a/observable/src/Message.mjs b/observable/src/Message.mjs new file mode 100644 index 00000000..c59c51bb --- /dev/null +++ b/observable/src/Message.mjs @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import { Observable } from 'kr-observable'; + +export class Message extends Observable { + static ignore = new Set(['id', 'author', 'timestamp']) + static _nextId = 0; + + id; + text; + author; // Person + timestamp; + + static nextId() { + return Message._nextId++; + } + + constructor(text, author) { + super(); + this.id = Message.nextId(); + this.text = text; + this.author = author; + this.timestamp = new Date(); + } + + updateText(text) { + this.text = text; + } +} diff --git a/observable/src/Notifications.mjs b/observable/src/Notifications.mjs new file mode 100644 index 00000000..0cb7d2e6 --- /dev/null +++ b/observable/src/Notifications.mjs @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ +import { Observable, listen, subscribe } from 'kr-observable'; + +export class Notifications extends Observable { + static ignore = new Set(['lastMessage', 'roomDisposers']) + static roomSubscribeKeys = new Set(['lastMessage']) + + lastMessages = new Map(); // Map + lastMessage; roomDisposers = new Map(); // Map + + constructor(rooms) { + super() + rooms.forEach(room => this.addRoom(room)); + } + + addRoom(room) { + room.lastMessage; // https://observable.ru/concepts/computed.html#restrictions + + const disposer = subscribe(room, () => { + if (room.lastMessage) { + this.updateLastMessage(room.name, room.lastMessage); + } + }, Notifications.roomSubscribeKeys) + this.roomDisposers.set(room.name, disposer); + } + + removeRoom(roomName) { + if (this.roomDisposers.has(roomName)) { + this.roomDisposers.get(roomName)(); // Dispose the reaction + this.roomDisposers.delete(roomName); + this.lastMessages.delete(roomName); + } + } + + updateLastMessage(roomName, message) { + this.lastMessages.set(roomName, message); + } +} \ No newline at end of file diff --git a/observable/src/Person.mjs b/observable/src/Person.mjs new file mode 100644 index 00000000..5320e6b4 --- /dev/null +++ b/observable/src/Person.mjs @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import { Observable } from 'kr-observable'; + +export class Person extends Observable { + id; + name; + lastMessage = null; + rooms = new Set(); + status = 'Online'; + + constructor(id, name) { + super() + this.id = id; + this.name = name; + } + + setName(name) { + this.name = name; + } + + setLastMessage(message) { + this.lastMessage = message; + } + + addRoom(room) { + this.rooms.add(room); + } + + removeRoom(room) { + this.rooms.delete(room); + } + + setStatus(status) { + this.status = status; + this.rooms.forEach(room => { + room.addStatusUpdate(this, status); + }); + } +} diff --git a/observable/src/Room.mjs b/observable/src/Room.mjs new file mode 100644 index 00000000..b404d62e --- /dev/null +++ b/observable/src/Room.mjs @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import { Observable, transaction } from "kr-observable"; + +const MAX_ROOM_UPDATES = 10; + +export class Room extends Observable { + name; + people = new Map(); + messages = []; + roomUpdates = []; + + constructor(name) { + super() + this.name = name; + } + + get messageCount() { + return this.messages.length; + } + + get peopleCount() { + return this.people.size; + } + + get lastMessage() { + // if (this.messages.length === 0) { + // return null; + // } + return this.messages.at(-1); + } + + get members() { + return Array.from(this.people.values()); + } + + addPerson(person) { + if (!this.people.has(person.id)) { + this.people.set(person.id, person); + person.addRoom(this); + } + } + + removePerson(personId) { + const person = this.people.get(personId); + if (person) { + person.removeRoom(this); + this.people.delete(personId); + } + } + + addMessage(message) { + transaction(() => { + message.author.setLastMessage(message); + this.messages.push(message); + }) + } + + addStatusUpdate(person, status) { + this.roomUpdates.push(`${person.name} is now ${status}`); + if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2) + this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES); + } + + dispose(notifications) { + this.people.forEach(person => person.removeRoom(this)); + if (notifications) { + notifications.removeRoom(this.name); + } + } +} \ No newline at end of file diff --git a/observable/src/test.mjs b/observable/src/test.mjs new file mode 100644 index 00000000..45b5b740 --- /dev/null +++ b/observable/src/test.mjs @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import { autorun, transaction } from "kr-observable"; +import { Person } from "./Person.mjs"; +import { Room } from "./Room.mjs"; +import { Message } from "./Message.mjs"; +import { Notifications } from "./Notifications.mjs"; + +function assert(condition) { + if (!condition) throw new Error("Assertion failure"); +} + +export function runTest() { + const logs = []; + const customLog = (...args) => logs.push(args.join(" ")); + + // --- Setup --- + const techRoom = new Room("Tech Talk"); + const generalRoom = new Room("General Chat"); + const largeRoom = new Room("Large Meeting Room"); + + const alice = new Person(1, "Alice"); + const bob = new Person(2, "Bob"); + + techRoom.addPerson(alice); + techRoom.addPerson(bob); + generalRoom.addPerson(alice); + + const rooms = [techRoom, generalRoom, largeRoom]; + const notifications = new Notifications(rooms); + + // --- Large Room Setup --- + customLog("\n--- Setting up Large Meeting Room ---"); + const largeRoomMembers = []; + for (let i = 3; i < 203; i++) { + const person = new Person(i, `Person ${i}`); + largeRoomMembers.push(person); + largeRoom.addPerson(person); + } + customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`); + + // Add Alice and Bob to the large room + largeRoom.addPerson(alice); + largeRoom.addPerson(bob); + customLog("[INFO] Added Alice and Bob to the Large Meeting Room."); + + // Verify Person.rooms with Set + assert(alice.rooms.size === 3); + assert( + alice.rooms.has(techRoom) && + alice.rooms.has(generalRoom) && + alice.rooms.has(largeRoom) + ); + assert( + bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom) + ); + customLog("[PASS] Verified Person.rooms associations with Set."); + + // --- autorun for global notifications --- + const notificationsDisposer = autorun(() => { + customLog("\n--- Global Notifications (Last Messages) ---"); + if (notifications.lastMessages.size === 0) { + customLog("No messages yet."); + } else { + notifications.lastMessages.forEach((message, roomName) => { + customLog(`[${roomName}] "${message.text}" - ${message.author.name}`); + }); + } + customLog("------------------------------------------"); + }); + + // --- autorun for room updates --- + const roomUpdatesDisposer = autorun(() => { + rooms.forEach((room) => { + if (room.roomUpdates.length > 0) { + customLog( + `[${room.name} Update] ${ + room.roomUpdates[room.roomUpdates.length - 1] + }` + ); + } + }); + }); + + // --- Status Update Scenario --- + customLog("\n--- Status Update Scenario ---"); + + alice.setStatus("Away"); + assert(techRoom.roomUpdates.includes("Alice is now Away")); + assert(generalRoom.roomUpdates.includes("Alice is now Away")); + assert(largeRoom.roomUpdates.includes("Alice is now Away")); + customLog( + "[PASS] Verified that status updates are sent to all of Alice's rooms." + ); + + bob.setStatus("Busy"); + assert(techRoom.roomUpdates.includes("Bob is now Busy")); + assert(!generalRoom.roomUpdates.includes("Bob is now Busy")); + assert(largeRoom.roomUpdates.includes("Bob is now Busy")); + customLog( + "[PASS] Verified that status updates are only sent to Bob's rooms." + ); + + // --- Messaging and Verification --- + customLog("\n--- Sending Messages & Verifying Notifications ---"); + + // Message 1: Tech Room + const msg1 = new Message("First message to Tech Talk!", alice); + techRoom.addMessage(msg1); + assert(notifications.lastMessages.get("Tech Talk") === msg1); + customLog("[PASS] Verified Tech Talk notification."); + + // Message 2: General Chat + for (let i = 0; i < 20; i++) { + const msg2 = new Message(`ping ${i}`, alice); + generalRoom.addMessage(msg2); + // console.log('lastMessages', notifications.lastMessages.get("General Chat").author.lastMessage) + // console.log('msg2', msg2.author.lastMessage) + assert(notifications.lastMessages.get("General Chat") === msg2); + } + customLog("[PASS] Verified General Chat notification."); + + // Message 3: Large Meeting Room + for (let i = 0; i <= 5; i++) { + for (const member of largeRoomMembers) { + const msg = new Message(`Hi, I am ${member.name}`, member); + largeRoom.addMessage(msg); + assert(largeRoom.lastMessage == msg); + assert(notifications.lastMessages.get("Large Meeting Room") === msg); + } + } + customLog("[PASS] Verified Large Meeting Room notification."); + + // Message 4: Tech Room again + for (let i = 0; i < 20; i++) { + const msg4 = new Message(`ping ${i}`, bob); + techRoom.addMessage(msg4); + assert(notifications.lastMessages.get("Tech Talk") === msg4); + } + customLog("[PASS] Verified Tech Talk notification update."); + + const tempRooms = []; + for (let i = 0; i < 10; i++) { + const roomId = `General Chat ${i}`; + const tempRoom = new Room(roomId); + tempRooms.push(tempRoom); + notifications.addRoom(tempRoom); + for (const person of largeRoomMembers.slice(0, 10)) { + tempRoom.addPerson(person); + } + for (const person of tempRoom.members.slice(0, 5)) { + const msg = new Message(`ping ${i}`, person); + tempRoom.addMessage(msg); + assert(notifications.lastMessages.get(roomId) === msg); + } + } + tempRooms.forEach((room) => room.dispose(notifications)); + + // --- Clean up --- + notificationsDisposer(); + roomUpdatesDisposer(); // Added disposer for room updates + techRoom.dispose(notifications); + generalRoom.dispose(notifications); + largeRoom.dispose(notifications); + + return logs; +} diff --git a/observable/webpack.config.mjs b/observable/webpack.config.mjs new file mode 100644 index 00000000..79b15251 --- /dev/null +++ b/observable/webpack.config.mjs @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2025 Apple Inc. All rights reserved. + * Copyright 2025 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +import path from "path"; +import { fileURLToPath } from "url"; +import TerserPlugin from "terser-webpack-plugin"; +import { LicenseFilePlugin } from "generate-license-file-webpack-plugin"; + +import CacheBusterCommentPlugin from "../utils/BabelCacheBuster.mjs"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +function config({ filename, minify, target }) { + return { + entry: "./src/test.mjs", + mode: "production", + devtool: "source-map", + target: ["web", target], + output: { + path: path.resolve(__dirname, "dist"), + filename: filename, + library: { + name: "MobXBenchmark", + type: "globalThis", + }, + libraryTarget: "assign", + chunkFormat: "commonjs", + }, + module: { + rules: [ + { + test: /\.m?js$/, + use: { + loader: "babel-loader", + options: { + plugins: [CacheBusterCommentPlugin], + }, + }, + }, + ], + }, + plugins: [new LicenseFilePlugin({ + outputFileName: "LICENSE.txt", + })], + optimization: { + minimizer: [ + new TerserPlugin({ + terserOptions: { + mangle: minify, + format: { + // Keep this comment for cache-busting. + comments: /ThouShaltNotCache/i, + }, + }, + }), + ], + }, + }; +} + +export default [ + config({ filename: "bundle.es6.min.js", minify: true, target: "es6" }), + config({ filename: "bundle.es6.js", minify: false, target: "es6" }), + config({ filename: "bundle.es5.min.js", minify: true, target: "es5" }), + config({ filename: "bundle.es5.js", minify: false, target: "es5" }), +];