uicore-ts 1.0.227 → 1.0.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -276,14 +276,16 @@ if ("allValues" in Object.prototype == NO) {
276
276
  values.push(value);
277
277
  });
278
278
  return values;
279
- }
279
+ },
280
+ enumerable: NO
280
281
  });
281
282
  }
282
283
  if ("allKeys" in Object.prototype == NO) {
283
284
  Object.defineProperty(Object.prototype, "allKeys", {
284
285
  get: function() {
285
286
  return Object.keys(this);
286
- }
287
+ },
288
+ enumerable: NO
287
289
  });
288
290
  }
289
291
  if ("objectByCopyingValuesRecursivelyFromObject" in Object.prototype == NO) {
@@ -324,7 +326,8 @@ if ("capitalizedString" in String.prototype == NO) {
324
326
  Object.defineProperty(Object.prototype, "capitalizedString", {
325
327
  get: function() {
326
328
  return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
327
- }
329
+ },
330
+ enumerable: NO
328
331
  });
329
332
  }
330
333
  if ("numericalValue" in String.prototype == NO) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../scripts/UICoreExtensions.ts"],
4
- "sourcesContent": ["import { UICoreExtensionValueObject } from \"./UICoreExtensionValueObject\"\nimport { UIObject } from \"./UIObject\"\n\n\ndeclare global {\n \n \n interface Array<T> {\n \n removeElementAtIndex(index: number): void;\n \n removeElement(element: T): void;\n \n insertElementAtIndex(index: number, element: T): void;\n \n replaceElementAtIndex(index: number, element: T): void;\n \n \n contains(element: T): boolean;\n \n findAsyncSequential(functionToCall: (value: any) => Promise<boolean>): Promise<any>;\n \n groupedBy(keyFunction: (item: T) => any): { [key: string]: Array<T> } & Object;\n \n copy(): Array<T>;\n \n arrayByRepeating(numberOfRepetitions: number): Array<T>;\n \n arrayByTrimmingToLengthIfLonger(maxLength: number): Array<T>;\n \n anyMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n noneMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n allMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n firstElement: T;\n lastElement: T;\n readonly summedValue: T;\n \n everyElement: UIEveryElementItem<T>;\n \n max(): number;\n \n min(): number;\n \n isEqualToArray(array: Array<T>, keyPath?: string): boolean;\n \n }\n \n \n interface String {\n \n contains(string: string): boolean;\n \n readonly numericalValue: number;\n readonly integerValue: number;\n isAString: boolean;\n \n }\n \n \n interface Number {\n \n isANumber: boolean;\n \n readonly integerValue: number;\n \n }\n \n \n interface Date {\n \n readonly dateString: string;\n \n }\n \n \n interface Object {\n \n forEach(callbackFunction: (value: any, key: string, stopLooping: () => void) => void): void;\n \n readonly allValues: Array<any>;\n readonly allKeys: string[];\n \n }\n \n}\n\nexport {}\n\nconst YES = true\nconst NO = false\n\nif (\"removeElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).removeElementAtIndex = function (this: Array<any>, index: number) {\n \n // @ts-ignore\n if (index >= 0 && index < this.length) {\n this.splice(index, 1)\n }\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// removeElementAtIndex(index: number);\n//\n// }\n\n\nif (\"removeElement\" in Array.prototype == NO) {\n \n (Array.prototype as any).removeElement = function (this: Array<any>, element: any) {\n this.removeElementAtIndex(this.indexOf(element))\n }\n \n}\n\n\n// interface Array<T> {\n//\n// removeElement(element: T);\n//\n// }\n\n\nif (\"insertElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).insertElementAtIndex = function (this: Array<any>, index: number, element: any) {\n \n if (index >= 0 && index <= this.length) {\n this.splice(index, 0, element)\n }\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// insertElementAtIndex(index: number, element: T);\n//\n// }\n\n\nif (\"replaceElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).replaceElementAtIndex = function (this: Array<any>, index: number, element: any) {\n \n this.removeElementAtIndex(index)\n this.insertElementAtIndex(index, element)\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// replaceElementAtIndex(index: number, element: T);\n//\n// }\n\n\nif (\"contains\" in Array.prototype == NO) {\n \n (Array.prototype as any).contains = function (this: Array<any>, element: any) {\n return (this.indexOf(element) != -1)\n }\n \n}\n\nif (\"containsAny\" in Array.prototype == NO) {\n \n (Array.prototype as any).containsAny = function (this: Array<any>, elements: any[]) {\n return this.anyMatch(element => elements.contains(element))\n }\n \n}\n\n\n// interface Array<T> {\n//\n// contains(element: T): boolean;\n//\n// containsAny(element: T[]): boolean;\n//\n// }\n\n\nif (\"anyMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).anyMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n // @ts-ignore\n return (this.findIndex(functionToCall) > -1)\n }\n \n}\n\nif (\"noneMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).noneMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n // @ts-ignore\n return (this.findIndex(functionToCall) == -1)\n }\n \n}\n\nif (\"allMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).allMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n \n function reversedFunction(value: any, index: number, array: any[]) {\n return !functionToCall(value, index, array)\n }\n \n // @ts-ignore\n return (this.findIndex(reversedFunction) == -1)\n \n }\n \n}\n\nif (\"findAsyncSequential\" in Array.prototype == NO) {\n \n (Array.prototype as any).findAsyncSequential = function (\n this: Array<any>,\n functionToCall: (value: any) => Promise<boolean>\n ) {\n \n // https://stackoverflow.com/questions/55601062/using-an-async-function-in-array-find\n async function findAsyncSequential<T>(\n array: T[],\n predicate: (t: T) => Promise<boolean>\n ): Promise<T | undefined> {\n for (const t of array) {\n if (await predicate(t)) {\n return t\n }\n }\n return undefined\n }\n \n return findAsyncSequential(this, functionToCall)\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// anyMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// noneMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// allMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// }\n\n\nif (\"groupedBy\" in Array.prototype == NO) {\n \n Array.prototype.groupedBy = function (this: Array<any>, funcProp) {\n return this.reduce(function (acc, val) {\n (acc[funcProp(val)] = acc[funcProp(val)] || []).push(val)\n return acc\n }, {})\n }\n \n}\n\n\n// interface Array<T> {\n//\n// groupedBy(keyFunction: (item: T) => any): { [key: string]: Array<T> };\n//\n// }\n\n\nif (\"firstElement\" in Array.prototype == NO) {\n Object.defineProperty(Array.prototype, \"firstElement\", {\n get: function firstElement(this: Array<any>) {\n return this[0]\n },\n set: function (this: Array<any>, element: any) {\n if (this.length == 0) {\n this.push(element)\n return\n }\n this[0] = element\n }\n })\n}\n\nif (\"lastElement\" in Array.prototype == NO) {\n Object.defineProperty(Array.prototype, \"lastElement\", {\n get: function lastElement(this: Array<any>) {\n return this[this.length - 1]\n },\n set: function (this: Array<any>, element: any) {\n if (this.length == 0) {\n this.push(element)\n return\n }\n this[this.length - 1] = element\n }\n })\n}\n\nif (\"everyElement\" in Array.prototype == NO) {\n \n Object.defineProperty(Array.prototype, \"everyElement\", {\n \n get: function everyElement(this: Array<any>) {\n \n const valueKeys: string[] = []\n \n const targetFunction = (objects: any) => {\n \n return this.map((element) => {\n \n const thisObject = UIObject.valueForKeyPath(\n valueKeys.arrayByTrimmingToLengthIfLonger(valueKeys.length - 1).join(\".\"),\n element\n ) || element\n \n const elementFunction = (UIObject.valueForKeyPath(valueKeys.join(\".\"), element) as Function).bind(\n thisObject,\n objects\n )\n \n return elementFunction()\n \n })\n \n }\n \n const result: any = new Proxy(\n targetFunction,\n {\n \n get: (target, key: string, _receiver) => {\n \n if (key == \"UI_elementValues\") {\n return this.map(element => UIObject.valueForKeyPath(\n valueKeys.join(\".\"),\n element\n ))\n }\n \n valueKeys.push(key)\n \n return result\n \n },\n set: (target, key: string, value, _receiver) => {\n \n valueKeys.push(key)\n this.forEach(element => UIObject.setValueForKeyPath(valueKeys.join(\".\"), value, element, YES))\n return true\n \n }\n \n }\n )\n \n return result\n \n },\n set: function (this: Array<any>, element: any) {\n for (let i = 0; i < this.length; ++i) {\n this[i] = element\n }\n }\n \n })\n \n}\n\n\nexport type UIEveryElementItem<T> = {\n \n [P in keyof T]: UIEveryElementItem<T[P]>\n \n} & {\n \n UI_elementValues?: T[];\n \n} & T\n\n// interface Array<T> {\n//\n// firstElement: T;\n// lastElement: T;\n//\n// everyElement: UIEveryElementItem<T>;\n//\n// }\n\n\nif (\"copy\" in Array.prototype == NO) {\n \n (Array.prototype as any).copy = function (this: Array<any>) {\n return this.slice(0)\n }\n \n}\n\n\n// interface Array<T> {\n//\n// copy(): Array<T>;\n//\n// }\n\n\nif (\"arrayByRepeating\" in Array.prototype == NO) {\n \n (Array.prototype as any).arrayByRepeating = function (this: Array<any>, numberOfRepetitions: number) {\n const result: any[] = []\n for (let i = 0; i < numberOfRepetitions; i++) {\n this.forEach(element => result.push(element))\n }\n return result\n }\n \n}\n\n\n// interface Array<T> {\n//\n// arrayByRepeating(numberOfRepetitions: number): Array<T>;\n//\n// }\n\n\nif (\"arrayByTrimmingToLengthIfLonger\" in Array.prototype == NO) {\n (Array.prototype as any).arrayByTrimmingToLengthIfLonger = function (this: Array<any>, maxLength: number) {\n const result = []\n for (let i = 0; i < maxLength && i < this.length; i++) {\n result.push(this[i])\n }\n return result\n }\n}\n\n\n// interface Array<T> {\n//\n// arrayByTrimmingToLengthIfLonger(maxLength: number): Array<T>;\n//\n// }\n\n\nif (\"summedValue\" in Array.prototype == NO) {\n \n Object.defineProperty(Array.prototype, \"summedValue\", {\n get: function summedValue(this: Array<any>) {\n return this.reduce(function (a, b) {\n return a + b\n }, 0)\n }\n })\n \n}\n\n\n// interface Array<T> {\n//\n// readonly summedValue: T;\n//\n// max(): number;\n// min(): number;\n//\n//\n// }\n\nArray.prototype.max = function () {\n return Math.max.apply(null, this)\n}\n\nArray.prototype.min = function () {\n return Math.min.apply(null, this)\n}\n\n\n// interface Array<T> {\n//\n// isEqualToArray(array: Array<T>, keyPath?: string): boolean;\n//\n// }\n\n\nif (\"isEqualToArray\" in Array.prototype == NO) {\n \n // attach the .equals method to Array's prototype to call it on any array\n Array.prototype.isEqualToArray = function (array: any[], keyPath?: string) {\n \n // if the other array is a falsy value, return\n if (!array) {\n return false\n }\n \n // compare lengths - can save a lot of time\n if (this.length != array.length) {\n return false\n }\n \n var i = 0\n const l = this.length\n for (; i < l; i++) {\n \n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array && !keyPath) {\n \n // recurse into the nested arrays\n if (!this[i].isEqualToArray(array[i])) {\n return false\n }\n \n }\n else if (keyPath && UIObject.valueForKeyPath(keyPath, this[i]) != UIObject.valueForKeyPath(\n keyPath,\n array[i]\n )) {\n \n return false\n \n }\n else if (this[i] != array[i]) {\n \n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false\n \n }\n \n }\n \n return true\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Array.prototype, \"isEqualToArray\", { enumerable: false })\n \n}\n\n\nif (\"forEach\" in Object.prototype == NO) {\n \n (Object.prototype as any).forEach = function (\n this: Record<string, any>,\n callbackFunction: (\n value: any,\n key: string,\n stopLooping: Function\n ) => void\n ) {\n const keys = Object.keys(this)\n let shouldStopLooping = NO\n \n function stopLooping() {\n shouldStopLooping = YES\n }\n \n keys.anyMatch(key => {\n callbackFunction(this[key], key, stopLooping)\n return shouldStopLooping\n })\n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"forEach\", { enumerable: false })\n \n}\n\n\n// interface Object {\n//\n// forEach(callbackFunction: (value: any, key: string) => void): void;\n//\n// }\n\n\nif (\"allValues\" in Object.prototype == NO) {\n Object.defineProperty(Object.prototype, \"allValues\", {\n get: function (this: Object) {\n const values: any[] = []\n this.forEach((value: any) => {\n values.push(value)\n })\n return values\n }\n })\n}\n\n\n// interface Object {\n//\n// readonly allValues: Array<any>;\n//\n// }\n\n\nif (\"allKeys\" in Object.prototype == NO) {\n Object.defineProperty(Object.prototype, \"allKeys\", {\n get: function (this: Object) {\n return Object.keys(this)\n }\n })\n}\n\n\n// interface Object {\n//\n// readonly allKeys: string[];\n//\n// }\n\n\nif (\"objectByCopyingValuesRecursivelyFromObject\" in Object.prototype == NO) {\n \n (Object.prototype as any).objectByCopyingValuesRecursivelyFromObject = function (this: Object, object: any) {\n \n \n function isAnObject(item: any) {\n return (item && typeof item === \"object\" && !Array.isArray(item))\n }\n \n function mergeRecursively(target: any, source: any) {\n \n const output = Object.assign({}, target)\n \n if (isAnObject(target) && isAnObject(source)) {\n \n Object.keys(source).forEach(function (key) {\n \n if (isAnObject(source[key])) {\n \n // if (!(key in target)) {\n \n // Object.assign(output, { [key]: source[key] });\n \n // }\n // else {\n \n output[key] = mergeRecursively(target[key], source[key])\n \n //}\n \n }\n else {\n \n Object.assign(output, { [key]: source[key] })\n \n }\n \n })\n \n }\n \n return output\n \n }\n \n return mergeRecursively(this, object)\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"objectByCopyingValuesRecursivelyFromObject\", { enumerable: false })\n \n}\n\n\nif (\"asValueObject\" in Object.prototype == NO) {\n \n (Object.prototype as any).asValueObject = function () {\n \n return new UICoreExtensionValueObject(this)\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"asValueObject\", { enumerable: false })\n \n}\n\n\n// interface Object {\n//\n// objectByCopyingValuesRecursivelyFromObject<T>(object: T): this & T;\n//\n// asValueObject(): this;\n//\n// }\n\n// export type Unpacked<T> =\n// T extends (infer U)[]\n// ? U\n// : T extends (...args: any[]) => infer U\n// ? U\n// : T extends Promise<infer U>\n// ? U\n// : T\n//\n// export type UnpackedObject<T> = {\n// [P in keyof T]: Unpacked<T[P]>\n// }\n\n// export function promisedProperties<ObjectType extends Record<string, any>>(object: ObjectType): UnpackedObject<ObjectType> {\n//\n// let promisedProperties: any[] = []\n// const objectKeys = Object.keys(object)\n//\n// objectKeys.forEach((key) => promisedProperties.push(object[key]))\n//\n// // @ts-ignore\n// return Promise.all(promisedProperties)\n// .then((resolvedValues) => {\n// return resolvedValues.reduce((resolvedObject, property, index) => {\n// resolvedObject[objectKeys[index]] = property\n// return resolvedObject\n// }, object)\n// })\n//\n// }\n\n// if (\"promisedProperties\" in Object.prototype == NO) {\n//\n// (Object.prototype as any).promisedProperties = function () {\n//\n// const result = promisedProperties(this);\n//\n// return result\n//\n// }\n//\n// // Hide method from for-in loops\n// Object.defineProperty(Object.prototype, \"promisedProperties\", { enumerable: false });\n//\n// }\n//\n//\n// interface Object {\n//\n// readonly promisedProperties: UnpackedObject<this>;\n//\n// }\n\n\nif (\"contains\" in String.prototype == NO) {\n \n (String.prototype as any).contains = function (this: String, string: string) {\n return (this.indexOf(string) != -1)\n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"contains\", { enumerable: false })\n \n}\n\n\n// interface String {\n//\n// contains(string): boolean;\n//\n// }\n\n\nif (\"capitalizedString\" in String.prototype == NO) {\n Object.defineProperty(Object.prototype, \"capitalizedString\", {\n get: function (this: String) {\n return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase()\n }\n })\n}\n\n\n// interface String {\n//\n// readonly capitalizedString: string;\n//\n// }\n\n\nif (\"numericalValue\" in String.prototype == NO) {\n Object.defineProperty(String.prototype, \"numericalValue\", {\n get: function numericalValue(this: string) {\n return Number(this)\n }\n })\n}\n\nif (\"integerValue\" in String.prototype == NO) {\n Object.defineProperty(String.prototype, \"integerValue\", {\n get: function integerValue(this: string) {\n return Number(this).integerValue\n }\n })\n}\n\n\n// interface String {\n//\n// readonly numericalValue: number;\n//\n// }\n\n\nif (\"isAString\" in String.prototype == NO) {\n \n (String.prototype as any).isAString = YES\n \n}\n\n\n// interface String {\n//\n// isAString: boolean;\n//\n// }\n\n\nif (\"isANumber\" in Number.prototype == NO) {\n \n (Number.prototype as any).isANumber = YES\n \n}\n\n\n// interface Number {\n//\n// isANumber: boolean;\n//\n// }\n\n\nif (\"integerValue\" in Number.prototype == NO) {\n Object.defineProperty(Number.prototype, \"integerValue\", {\n get: function (this: number) {\n return parseInt(\"\" + (Math.round(this) + 0.5))\n }\n })\n}\n\n\n// interface Number {\n//\n// readonly integerValue: number;\n//\n// }\n\n\nif (\"integerValue\" in Boolean.prototype == NO) {\n \n Object.defineProperty(Boolean.prototype, \"integerValue\", {\n get: function (this: boolean) {\n if (this == true) {\n return 1\n }\n return 0\n }\n })\n \n}\n\n\n// interface Boolean {\n//\n// readonly integerValue: number;\n//\n// }\n\n\nif (\"dateString\" in Date.prototype == NO) {\n \n Object.defineProperty(Date.prototype, \"dateString\", {\n get: function dateString(this: Date) {\n return (\"0\" + this.getDate()).slice(-2) + \"-\" + (\"0\" + (this.getMonth() + 1)).slice(-2) + \"-\" +\n this.getFullYear() + \" \" + (\"0\" + this.getHours()).slice(-2) + \":\" +\n (\"0\" + this.getMinutes()).slice(-2)\n }\n })\n \n \n}\n\n\n// interface Date {\n//\n// readonly dateString: string;\n//\n// }\n\n\n\n\n\n\n\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wCAA2C;AAC3C,sBAAyB;AA0FzB,MAAM,MAAM;AACZ,MAAM,KAAK;AAEX,IAAI,0BAA0B,MAAM,aAAa,IAAI;AAEjD,EAAC,MAAM,UAAkB,uBAAuB,SAA4B,OAAe;AAGvF,QAAI,SAAS,KAAK,QAAQ,KAAK,QAAQ;AACnC,WAAK,OAAO,OAAO,CAAC;AAAA,IACxB;AAAA,EAEJ;AAEJ;AAUA,IAAI,mBAAmB,MAAM,aAAa,IAAI;AAE1C,EAAC,MAAM,UAAkB,gBAAgB,SAA4B,SAAc;AAC/E,SAAK,qBAAqB,KAAK,QAAQ,OAAO,CAAC;AAAA,EACnD;AAEJ;AAUA,IAAI,0BAA0B,MAAM,aAAa,IAAI;AAEjD,EAAC,MAAM,UAAkB,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I;AAAA,IACtB;AAAA,EACJ,CAAC;AACL;AAEA,IAAI,kBAAkB,OAAO,aAAa,IAAI;AAC1C,SAAO,eAAe,OAAO,WAAW,gBAAgB;AAAA,IACpD,KAAK,SAAS,eAA2B;AACrC,aAAO,OAAO,IAAI,EAAE;AAAA,IACxB;AAAA,EACJ,CAAC;AACL;AAUA,IAAI,eAAe,OAAO,aAAa,IAAI;AAEvC,EAAC,OAAO,UAAkB,YAAY;AAE1C;AAUA,IAAI,eAAe,OAAO,aAAa,IAAI;AAEvC,EAAC,OAAO,UAAkB,YAAY;AAE1C;AAUA,IAAI,kBAAkB,OAAO,aAAa,IAAI;AAC1C,SAAO,eAAe,OAAO,WAAW,gBAAgB;AAAA,IACpD,KAAK,WAAwB;AACzB,aAAO,SAAS,MAAM,KAAK,MAAM,IAAI,IAAI,IAAI;AAAA,IACjD;AAAA,EACJ,CAAC;AACL;AAUA,IAAI,kBAAkB,QAAQ,aAAa,IAAI;AAE3C,SAAO,eAAe,QAAQ,WAAW,gBAAgB;AAAA,IACrD,KAAK,WAAyB;AAC1B,UAAI,QAAQ,MAAM;AACd,eAAO;AAAA,MACX;AACA,aAAO;AAAA,IACX;AAAA,EACJ,CAAC;AAEL;AAUA,IAAI,gBAAgB,KAAK,aAAa,IAAI;AAEtC,SAAO,eAAe,KAAK,WAAW,cAAc;AAAA,IAChD,KAAK,SAAS,aAAuB;AACjC,cAAQ,MAAM,KAAK,QAAQ,GAAG,MAAM,EAAE,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,MAAM,EAAE,IAAI,MACtF,KAAK,YAAY,IAAI,OAAO,MAAM,KAAK,SAAS,GAAG,MAAM,EAAE,IAAI,OAC9D,MAAM,KAAK,WAAW,GAAG,MAAM,EAAE;AAAA,IAC1C;AAAA,EACJ,CAAC;AAGL;",
4
+ "sourcesContent": ["import { UICoreExtensionValueObject } from \"./UICoreExtensionValueObject\"\nimport { UIObject } from \"./UIObject\"\n\n\ndeclare global {\n \n \n interface Array<T> {\n \n removeElementAtIndex(index: number): void;\n \n removeElement(element: T): void;\n \n insertElementAtIndex(index: number, element: T): void;\n \n replaceElementAtIndex(index: number, element: T): void;\n \n \n contains(element: T): boolean;\n \n findAsyncSequential(functionToCall: (value: any) => Promise<boolean>): Promise<any>;\n \n groupedBy(keyFunction: (item: T) => any): { [key: string]: Array<T> } & Object;\n \n copy(): Array<T>;\n \n arrayByRepeating(numberOfRepetitions: number): Array<T>;\n \n arrayByTrimmingToLengthIfLonger(maxLength: number): Array<T>;\n \n anyMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n noneMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n allMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n \n firstElement: T;\n lastElement: T;\n readonly summedValue: T;\n \n everyElement: UIEveryElementItem<T>;\n \n max(): number;\n \n min(): number;\n \n isEqualToArray(array: Array<T>, keyPath?: string): boolean;\n \n }\n \n \n interface String {\n \n contains(string: string): boolean;\n \n readonly numericalValue: number;\n readonly integerValue: number;\n isAString: boolean;\n \n }\n \n \n interface Number {\n \n isANumber: boolean;\n \n readonly integerValue: number;\n \n }\n \n \n interface Date {\n \n readonly dateString: string;\n \n }\n \n \n interface Object {\n \n forEach(callbackFunction: (value: any, key: string, stopLooping: () => void) => void): void;\n \n readonly allValues: Array<any>;\n readonly allKeys: string[];\n \n }\n \n}\n\nexport {}\n\nconst YES = true\nconst NO = false\n\nif (\"removeElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).removeElementAtIndex = function (this: Array<any>, index: number) {\n \n // @ts-ignore\n if (index >= 0 && index < this.length) {\n this.splice(index, 1)\n }\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// removeElementAtIndex(index: number);\n//\n// }\n\n\nif (\"removeElement\" in Array.prototype == NO) {\n \n (Array.prototype as any).removeElement = function (this: Array<any>, element: any) {\n this.removeElementAtIndex(this.indexOf(element))\n }\n \n}\n\n\n// interface Array<T> {\n//\n// removeElement(element: T);\n//\n// }\n\n\nif (\"insertElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).insertElementAtIndex = function (this: Array<any>, index: number, element: any) {\n \n if (index >= 0 && index <= this.length) {\n this.splice(index, 0, element)\n }\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// insertElementAtIndex(index: number, element: T);\n//\n// }\n\n\nif (\"replaceElementAtIndex\" in Array.prototype == NO) {\n \n (Array.prototype as any).replaceElementAtIndex = function (this: Array<any>, index: number, element: any) {\n \n this.removeElementAtIndex(index)\n this.insertElementAtIndex(index, element)\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// replaceElementAtIndex(index: number, element: T);\n//\n// }\n\n\nif (\"contains\" in Array.prototype == NO) {\n \n (Array.prototype as any).contains = function (this: Array<any>, element: any) {\n return (this.indexOf(element) != -1)\n }\n \n}\n\nif (\"containsAny\" in Array.prototype == NO) {\n \n (Array.prototype as any).containsAny = function (this: Array<any>, elements: any[]) {\n return this.anyMatch(element => elements.contains(element))\n }\n \n}\n\n\n// interface Array<T> {\n//\n// contains(element: T): boolean;\n//\n// containsAny(element: T[]): boolean;\n//\n// }\n\n\nif (\"anyMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).anyMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n // @ts-ignore\n return (this.findIndex(functionToCall) > -1)\n }\n \n}\n\nif (\"noneMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).noneMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n // @ts-ignore\n return (this.findIndex(functionToCall) == -1)\n }\n \n}\n\nif (\"allMatch\" in Array.prototype == NO) {\n \n (Array.prototype as any).allMatch = function (\n this: Array<any>,\n functionToCall: (value: any, index: number, array: any[]) => boolean\n ) {\n \n function reversedFunction(value: any, index: number, array: any[]) {\n return !functionToCall(value, index, array)\n }\n \n // @ts-ignore\n return (this.findIndex(reversedFunction) == -1)\n \n }\n \n}\n\nif (\"findAsyncSequential\" in Array.prototype == NO) {\n \n (Array.prototype as any).findAsyncSequential = function (\n this: Array<any>,\n functionToCall: (value: any) => Promise<boolean>\n ) {\n \n // https://stackoverflow.com/questions/55601062/using-an-async-function-in-array-find\n async function findAsyncSequential<T>(\n array: T[],\n predicate: (t: T) => Promise<boolean>\n ): Promise<T | undefined> {\n for (const t of array) {\n if (await predicate(t)) {\n return t\n }\n }\n return undefined\n }\n \n return findAsyncSequential(this, functionToCall)\n \n }\n \n}\n\n\n// interface Array<T> {\n//\n// anyMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// noneMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// allMatch(predicate: (value: T, index: number, obj: T[]) => boolean): boolean\n//\n// }\n\n\nif (\"groupedBy\" in Array.prototype == NO) {\n \n Array.prototype.groupedBy = function (this: Array<any>, funcProp) {\n return this.reduce(function (acc, val) {\n (acc[funcProp(val)] = acc[funcProp(val)] || []).push(val)\n return acc\n }, {})\n }\n \n}\n\n\n// interface Array<T> {\n//\n// groupedBy(keyFunction: (item: T) => any): { [key: string]: Array<T> };\n//\n// }\n\n\nif (\"firstElement\" in Array.prototype == NO) {\n Object.defineProperty(Array.prototype, \"firstElement\", {\n get: function firstElement(this: Array<any>) {\n return this[0]\n },\n set: function (this: Array<any>, element: any) {\n if (this.length == 0) {\n this.push(element)\n return\n }\n this[0] = element\n }\n })\n}\n\nif (\"lastElement\" in Array.prototype == NO) {\n Object.defineProperty(Array.prototype, \"lastElement\", {\n get: function lastElement(this: Array<any>) {\n return this[this.length - 1]\n },\n set: function (this: Array<any>, element: any) {\n if (this.length == 0) {\n this.push(element)\n return\n }\n this[this.length - 1] = element\n }\n })\n}\n\nif (\"everyElement\" in Array.prototype == NO) {\n \n Object.defineProperty(Array.prototype, \"everyElement\", {\n \n get: function everyElement(this: Array<any>) {\n \n const valueKeys: string[] = []\n \n const targetFunction = (objects: any) => {\n \n return this.map((element) => {\n \n const thisObject = UIObject.valueForKeyPath(\n valueKeys.arrayByTrimmingToLengthIfLonger(valueKeys.length - 1).join(\".\"),\n element\n ) || element\n \n const elementFunction = (UIObject.valueForKeyPath(valueKeys.join(\".\"), element) as Function).bind(\n thisObject,\n objects\n )\n \n return elementFunction()\n \n })\n \n }\n \n const result: any = new Proxy(\n targetFunction,\n {\n \n get: (target, key: string, _receiver) => {\n \n if (key == \"UI_elementValues\") {\n return this.map(element => UIObject.valueForKeyPath(\n valueKeys.join(\".\"),\n element\n ))\n }\n \n valueKeys.push(key)\n \n return result\n \n },\n set: (target, key: string, value, _receiver) => {\n \n valueKeys.push(key)\n this.forEach(element => UIObject.setValueForKeyPath(valueKeys.join(\".\"), value, element, YES))\n return true\n \n }\n \n }\n )\n \n return result\n \n },\n set: function (this: Array<any>, element: any) {\n for (let i = 0; i < this.length; ++i) {\n this[i] = element\n }\n }\n \n })\n \n}\n\n\nexport type UIEveryElementItem<T> = {\n \n [P in keyof T]: UIEveryElementItem<T[P]>\n \n} & {\n \n UI_elementValues?: T[];\n \n} & T\n\n// interface Array<T> {\n//\n// firstElement: T;\n// lastElement: T;\n//\n// everyElement: UIEveryElementItem<T>;\n//\n// }\n\n\nif (\"copy\" in Array.prototype == NO) {\n \n (Array.prototype as any).copy = function (this: Array<any>) {\n return this.slice(0)\n }\n \n}\n\n\n// interface Array<T> {\n//\n// copy(): Array<T>;\n//\n// }\n\n\nif (\"arrayByRepeating\" in Array.prototype == NO) {\n \n (Array.prototype as any).arrayByRepeating = function (this: Array<any>, numberOfRepetitions: number) {\n const result: any[] = []\n for (let i = 0; i < numberOfRepetitions; i++) {\n this.forEach(element => result.push(element))\n }\n return result\n }\n \n}\n\n\n// interface Array<T> {\n//\n// arrayByRepeating(numberOfRepetitions: number): Array<T>;\n//\n// }\n\n\nif (\"arrayByTrimmingToLengthIfLonger\" in Array.prototype == NO) {\n (Array.prototype as any).arrayByTrimmingToLengthIfLonger = function (this: Array<any>, maxLength: number) {\n const result = []\n for (let i = 0; i < maxLength && i < this.length; i++) {\n result.push(this[i])\n }\n return result\n }\n}\n\n\n// interface Array<T> {\n//\n// arrayByTrimmingToLengthIfLonger(maxLength: number): Array<T>;\n//\n// }\n\n\nif (\"summedValue\" in Array.prototype == NO) {\n \n Object.defineProperty(Array.prototype, \"summedValue\", {\n get: function summedValue(this: Array<any>) {\n return this.reduce(function (a, b) {\n return a + b\n }, 0)\n }\n })\n \n}\n\n\n// interface Array<T> {\n//\n// readonly summedValue: T;\n//\n// max(): number;\n// min(): number;\n//\n//\n// }\n\nArray.prototype.max = function () {\n return Math.max.apply(null, this)\n}\n\nArray.prototype.min = function () {\n return Math.min.apply(null, this)\n}\n\n\n// interface Array<T> {\n//\n// isEqualToArray(array: Array<T>, keyPath?: string): boolean;\n//\n// }\n\n\nif (\"isEqualToArray\" in Array.prototype == NO) {\n \n // attach the .equals method to Array's prototype to call it on any array\n Array.prototype.isEqualToArray = function (array: any[], keyPath?: string) {\n \n // if the other array is a falsy value, return\n if (!array) {\n return false\n }\n \n // compare lengths - can save a lot of time\n if (this.length != array.length) {\n return false\n }\n \n var i = 0\n const l = this.length\n for (; i < l; i++) {\n \n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array && !keyPath) {\n \n // recurse into the nested arrays\n if (!this[i].isEqualToArray(array[i])) {\n return false\n }\n \n }\n else if (keyPath && UIObject.valueForKeyPath(keyPath, this[i]) != UIObject.valueForKeyPath(\n keyPath,\n array[i]\n )) {\n \n return false\n \n }\n else if (this[i] != array[i]) {\n \n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false\n \n }\n \n }\n \n return true\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Array.prototype, \"isEqualToArray\", { enumerable: false })\n \n}\n\n\nif (\"forEach\" in Object.prototype == NO) {\n \n (Object.prototype as any).forEach = function (\n this: Record<string, any>,\n callbackFunction: (\n value: any,\n key: string,\n stopLooping: Function\n ) => void\n ) {\n const keys = Object.keys(this)\n let shouldStopLooping = NO\n \n function stopLooping() {\n shouldStopLooping = YES\n }\n \n keys.anyMatch(key => {\n callbackFunction(this[key], key, stopLooping)\n return shouldStopLooping\n })\n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"forEach\", { enumerable: false })\n \n}\n\n\n// interface Object {\n//\n// forEach(callbackFunction: (value: any, key: string) => void): void;\n//\n// }\n\n\nif (\"allValues\" in Object.prototype == NO) {\n Object.defineProperty(Object.prototype, \"allValues\", {\n get: function (this: Object) {\n const values: any[] = []\n this.forEach((value: any) => {\n values.push(value)\n })\n return values\n },\n enumerable: NO\n })\n}\n\n\n// interface Object {\n//\n// readonly allValues: Array<any>;\n//\n// }\n\n\nif (\"allKeys\" in Object.prototype == NO) {\n Object.defineProperty(Object.prototype, \"allKeys\", {\n get: function (this: Object) {\n return Object.keys(this)\n },\n enumerable: NO\n })\n}\n\n\n// interface Object {\n//\n// readonly allKeys: string[];\n//\n// }\n\n\nif (\"objectByCopyingValuesRecursivelyFromObject\" in Object.prototype == NO) {\n \n (Object.prototype as any).objectByCopyingValuesRecursivelyFromObject = function (this: Object, object: any) {\n \n \n function isAnObject(item: any) {\n return (item && typeof item === \"object\" && !Array.isArray(item))\n }\n \n function mergeRecursively(target: any, source: any) {\n \n const output = Object.assign({}, target)\n \n if (isAnObject(target) && isAnObject(source)) {\n \n Object.keys(source).forEach(function (key) {\n \n if (isAnObject(source[key])) {\n \n // if (!(key in target)) {\n \n // Object.assign(output, { [key]: source[key] });\n \n // }\n // else {\n \n output[key] = mergeRecursively(target[key], source[key])\n \n //}\n \n }\n else {\n \n Object.assign(output, { [key]: source[key] })\n \n }\n \n })\n \n }\n \n return output\n \n }\n \n return mergeRecursively(this, object)\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"objectByCopyingValuesRecursivelyFromObject\", { enumerable: false })\n \n}\n\n\nif (\"asValueObject\" in Object.prototype == NO) {\n \n (Object.prototype as any).asValueObject = function () {\n \n return new UICoreExtensionValueObject(this)\n \n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"asValueObject\", { enumerable: false })\n \n}\n\n\n// interface Object {\n//\n// objectByCopyingValuesRecursivelyFromObject<T>(object: T): this & T;\n//\n// asValueObject(): this;\n//\n// }\n\n// export type Unpacked<T> =\n// T extends (infer U)[]\n// ? U\n// : T extends (...args: any[]) => infer U\n// ? U\n// : T extends Promise<infer U>\n// ? U\n// : T\n//\n// export type UnpackedObject<T> = {\n// [P in keyof T]: Unpacked<T[P]>\n// }\n\n// export function promisedProperties<ObjectType extends Record<string, any>>(object: ObjectType): UnpackedObject<ObjectType> {\n//\n// let promisedProperties: any[] = []\n// const objectKeys = Object.keys(object)\n//\n// objectKeys.forEach((key) => promisedProperties.push(object[key]))\n//\n// // @ts-ignore\n// return Promise.all(promisedProperties)\n// .then((resolvedValues) => {\n// return resolvedValues.reduce((resolvedObject, property, index) => {\n// resolvedObject[objectKeys[index]] = property\n// return resolvedObject\n// }, object)\n// })\n//\n// }\n\n// if (\"promisedProperties\" in Object.prototype == NO) {\n//\n// (Object.prototype as any).promisedProperties = function () {\n//\n// const result = promisedProperties(this);\n//\n// return result\n//\n// }\n//\n// // Hide method from for-in loops\n// Object.defineProperty(Object.prototype, \"promisedProperties\", { enumerable: false });\n//\n// }\n//\n//\n// interface Object {\n//\n// readonly promisedProperties: UnpackedObject<this>;\n//\n// }\n\n\nif (\"contains\" in String.prototype == NO) {\n \n (String.prototype as any).contains = function (this: String, string: string) {\n return (this.indexOf(string) != -1)\n }\n \n // Hide method from for-in loops\n Object.defineProperty(Object.prototype, \"contains\", { enumerable: false })\n \n}\n\n\n// interface String {\n//\n// contains(string): boolean;\n//\n// }\n\n\nif (\"capitalizedString\" in String.prototype == NO) {\n Object.defineProperty(Object.prototype, \"capitalizedString\", {\n get: function (this: String) {\n return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase()\n },\n enumerable: NO\n })\n}\n\n\n// interface String {\n//\n// readonly capitalizedString: string;\n//\n// }\n\n\nif (\"numericalValue\" in String.prototype == NO) {\n Object.defineProperty(String.prototype, \"numericalValue\", {\n get: function numericalValue(this: string) {\n return Number(this)\n }\n })\n}\n\nif (\"integerValue\" in String.prototype == NO) {\n Object.defineProperty(String.prototype, \"integerValue\", {\n get: function integerValue(this: string) {\n return Number(this).integerValue\n }\n })\n}\n\n\n// interface String {\n//\n// readonly numericalValue: number;\n//\n// }\n\n\nif (\"isAString\" in String.prototype == NO) {\n \n (String.prototype as any).isAString = YES\n \n}\n\n\n// interface String {\n//\n// isAString: boolean;\n//\n// }\n\n\nif (\"isANumber\" in Number.prototype == NO) {\n \n (Number.prototype as any).isANumber = YES\n \n}\n\n\n// interface Number {\n//\n// isANumber: boolean;\n//\n// }\n\n\nif (\"integerValue\" in Number.prototype == NO) {\n Object.defineProperty(Number.prototype, \"integerValue\", {\n get: function (this: number) {\n return parseInt(\"\" + (Math.round(this) + 0.5))\n }\n })\n}\n\n\n// interface Number {\n//\n// readonly integerValue: number;\n//\n// }\n\n\nif (\"integerValue\" in Boolean.prototype == NO) {\n \n Object.defineProperty(Boolean.prototype, \"integerValue\", {\n get: function (this: boolean) {\n if (this == true) {\n return 1\n }\n return 0\n }\n })\n \n}\n\n\n// interface Boolean {\n//\n// readonly integerValue: number;\n//\n// }\n\n\nif (\"dateString\" in Date.prototype == NO) {\n \n Object.defineProperty(Date.prototype, \"dateString\", {\n get: function dateString(this: Date) {\n return (\"0\" + this.getDate()).slice(-2) + \"-\" + (\"0\" + (this.getMonth() + 1)).slice(-2) + \"-\" +\n this.getFullYear() + \" \" + (\"0\" + this.getHours()).slice(-2) + \":\" +\n (\"0\" + this.getMinutes()).slice(-2)\n }\n })\n \n \n}\n\n\n// interface Date {\n//\n// readonly dateString: string;\n//\n// }\n\n\n\n\n\n\n\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wCAA2C;AAC3C,sBAAyB;AA0F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A,EACJ,CAAC;AAEL;AAUA,IAAI,gBAAgB,KAAK,aAAa,IAAI;AAEtC,SAAO,eAAe,KAAK,WAAW,cAAc;AAAA,IAChD,KAAK,SAAS,aAAuB;AACjC,cAAQ,MAAM,KAAK,QAAQ,GAAG,MAAM,EAAE,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,MAAM,EAAE,IAAI,MACtF,KAAK,YAAY,IAAI,OAAO,MAAM,KAAK,SAAS,GAAG,MAAM,EAAE,IAAI,OAC9D,MAAM,KAAK,WAAW,GAAG,MAAM,EAAE;AAAA,IAC1C;AAAA,EACJ,CAAC;AAGL;",
6
6
  "names": []
7
7
  }
@@ -122,6 +122,9 @@ export declare class UIView extends UIObject {
122
122
  private _isMoving;
123
123
  _isCBEditorTemporaryResizable: boolean;
124
124
  _isCBEditorTemporaryMovable: boolean;
125
+ static _onWindowTouchMove: (event: TouchEvent) => void;
126
+ static _onWindowMouseMove: (event: MouseEvent) => void;
127
+ static _onWindowMouseup: (event: MouseEvent) => void;
125
128
  constructor(elementID?: string, viewHTMLElement?: HTMLElement & LooseObject | null, elementType?: string | null, initViewData?: any);
126
129
  static get nextIndex(): number;
127
130
  static get pageHeight(): number;
@@ -1656,24 +1656,9 @@ const _UIView = class extends import_UIObject.UIObject {
1656
1656
  pauseEvent(event);
1657
1657
  }
1658
1658
  this._hasPointerDragged = import_UIObject.NO;
1659
- const windowMouseMoveFunction = (event2) => {
1660
- onMouseMove(event2);
1661
- };
1662
- const windowMouseUpOrLeaveFunction = (event2) => {
1663
- window.removeEventListener("mousemove", windowMouseMoveFunction);
1664
- window.removeEventListener("mouseup", windowMouseUpOrLeaveFunction, true);
1665
- document.body.removeEventListener("mouseleave", windowMouseUpOrLeaveFunction);
1666
- onmouseup(event2);
1667
- };
1668
- window.addEventListener("mousemove", windowMouseMoveFunction);
1669
- window.addEventListener("mouseup", windowMouseUpOrLeaveFunction, true);
1670
- document.body.addEventListener("mouseleave", windowMouseUpOrLeaveFunction);
1671
- const windowTouchFunction = () => {
1672
- window.removeEventListener("touchmove", onTouchMove, true);
1673
- window.removeEventListener("mouseup", windowTouchFunction, true);
1674
- };
1675
- window.addEventListener("touchmove", onTouchMove, true);
1676
- window.addEventListener("mouseup", windowTouchFunction, true);
1659
+ _UIView._onWindowTouchMove = onTouchMove;
1660
+ _UIView._onWindowMouseup = onmouseup;
1661
+ _UIView._onWindowMouseMove = onMouseMove;
1677
1662
  };
1678
1663
  const onTouchStart = onMouseDown;
1679
1664
  const onmouseup = (event) => __async(this, null, function* () {
@@ -2053,6 +2038,12 @@ let UIView = _UIView;
2053
2038
  UIView._UIViewIndex = -1;
2054
2039
  UIView._viewsToLayout = [];
2055
2040
  UIView._pageScale = 1;
2041
+ UIView._onWindowTouchMove = () => {
2042
+ };
2043
+ UIView._onWindowMouseMove = () => {
2044
+ };
2045
+ UIView._onWindowMouseup = () => {
2046
+ };
2056
2047
  UIView._transformAttribute = ("transform" in document.documentElement.style ? "transform" : void 0) || ("-webkit-transform" in document.documentElement.style ? "-webkit-transform" : "undefined") || ("-moz-transform" in document.documentElement.style ? "-moz-transform" : "undefined") || ("-ms-transform" in document.documentElement.style ? "-ms-transform" : "undefined") || ("-o-transform" in document.documentElement.style ? "-o-transform" : "undefined");
2057
2048
  UIView.constraintAttribute = {
2058
2049
  "left": AutoLayout.Attribute.LEFT,
@@ -2101,6 +2092,24 @@ UIView.broadcastEventName = {
2101
2092
  "AddedToViewTree": "AddedToViewTree",
2102
2093
  "PageDidScroll": "PageDidScroll"
2103
2094
  };
2095
+ const windowMouseMoveFunction = (event) => {
2096
+ UIView._onWindowMouseMove(event);
2097
+ };
2098
+ const windowMouseUpOrLeaveFunction = (event) => {
2099
+ window.removeEventListener("mousemove", windowMouseMoveFunction);
2100
+ window.removeEventListener("mouseup", windowMouseUpOrLeaveFunction, true);
2101
+ document.body.removeEventListener("mouseleave", windowMouseUpOrLeaveFunction);
2102
+ UIView._onWindowMouseup(event);
2103
+ };
2104
+ window.addEventListener("mousemove", windowMouseMoveFunction);
2105
+ window.addEventListener("mouseup", windowMouseUpOrLeaveFunction, true);
2106
+ document.body.addEventListener("mouseleave", windowMouseUpOrLeaveFunction);
2107
+ const windowTouchFunction = () => {
2108
+ window.removeEventListener("touchmove", UIView._onWindowTouchMove, true);
2109
+ window.removeEventListener("mouseup", windowTouchFunction, true);
2110
+ };
2111
+ window.addEventListener("touchmove", UIView._onWindowTouchMove, true);
2112
+ window.addEventListener("mouseup", windowTouchFunction, true);
2104
2113
  // Annotate the CommonJS export names for ESM import in node:
2105
2114
  0 && (module.exports = {
2106
2115
  UIView