From cf78785f5267f1c60fa01bf754f0292e04e219a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20R=C3=A9millard?= Date: Tue, 27 Aug 2024 11:53:54 -0400 Subject: [PATCH] Build pour v0.19.0 Release-As: 0.19.0 --- dist/ConsentStorage.cjs | 4 +- dist/ConsentStorage.cjs.map | 2 +- dist/ConsentStorage.js | 4 +- dist/ConsentStorage.js.map | 2 +- dist/ConsentTokens.cjs | 4 +- dist/ConsentTokens.js | 4 +- dist/VotePayload.cjs | 2 +- dist/VotePayload.js | 2 +- dist/_Uint8Array-Cf-PTZCw.js | 2 +- dist/_Uint8Array-CtB9L6tP.cjs | 2 +- dist/{bib-BCofrvPu.js => bib-1rVnZJhT.js} | 6 +- ...ib-BCofrvPu.js.map => bib-1rVnZJhT.js.map} | 2 +- dist/{bib-qo8fsCxm.cjs => bib-SERnlaT3.cjs} | 6 +- ...-qo8fsCxm.cjs.map => bib-SERnlaT3.cjs.map} | 2 +- dist/bib-avis.cjs | 4 +- dist/bib-avis.js | 4 +- dist/bib-button-close.cjs | 2 +- dist/bib-button-close.js | 2 +- dist/bib-consent-consent-dialog.cjs | 2 +- dist/bib-consent-consent-dialog.js | 2 +- dist/bib-consent-dialog.cjs | 4 +- dist/bib-consent-dialog.cjs.map | 2 +- dist/bib-consent-dialog.js | 3 +- dist/bib-consent-dialog.js.map | 2 +- dist/bib-consent-preferences-btn.cjs | 2 +- dist/bib-consent-preferences-btn.js | 2 +- ...b-consent-preferences-dialog-DTcmaEoj.cjs} | 6 +- ...nsent-preferences-dialog-DTcmaEoj.cjs.map} | 2 +- ...ib-consent-preferences-dialog-Dlk44SVl.js} | 6 +- ...onsent-preferences-dialog-Dlk44SVl.js.map} | 2 +- dist/bib-consent-preferences-dialog.cjs | 4 +- dist/bib-consent-preferences-dialog.js | 6 +- dist/bib-consent-server.cjs | 4 +- dist/bib-consent-server.js | 6 +- dist/bib-consent.cjs | 8 +-- dist/bib-consent.cjs.map | 2 +- dist/bib-consent.js | 72 +++++++++---------- dist/bib-consent.js.map | 2 +- dist/bib-footer-copyright.cjs | 2 +- dist/bib-footer-copyright.js | 2 +- dist/bib-footer.cjs | 2 +- dist/bib-footer.js | 2 +- dist/bib-gtm.cjs | 4 +- dist/bib-gtm.js | 4 +- dist/bib-retroaction-usager.cjs | 4 +- dist/bib-retroaction-usager.js | 4 +- dist/consent-context.cjs | 4 +- dist/consent-context.js | 4 +- dist/consentClient.cjs | 4 +- dist/consentClient.js | 6 +- dist/constants-BvP9XHhn.cjs | 10 +++ ...uv-.cjs.map => constants-BvP9XHhn.cjs.map} | 2 +- ...ants-B2WJQGFq.js => constants-D0hS4kJm.js} | 31 ++++---- ...JQGFq.js.map => constants-D0hS4kJm.js.map} | 2 +- dist/constants-PQ5SQuv-.cjs | 10 --- dist/constants.cjs | 2 +- dist/constants.js | 2 +- dist/constants2.cjs | 4 +- dist/constants2.js | 4 +- dist/constants3.cjs | 4 +- dist/constants3.js | 13 ++-- dist/directive-Ce1M5_Fy.js | 2 +- dist/directive-DpiRyOsV.cjs | 2 +- dist/index-9izUO_DB.cjs | 2 +- dist/index-CRxQMTzC.js | 2 +- dist/index.cjs | 2 +- dist/index.js | 2 +- dist/isObject-D1wTAyjh.cjs | 2 +- dist/isObject-Dipzh7kZ.js | 2 +- dist/lit-element-BHNMc-Kg.cjs | 2 +- dist/lit-element-Dj1nHH6C.js | 2 +- ...ogger-D5ZRyz6h.cjs => logger-DMvvTbNw.cjs} | 6 +- ...ZRyz6h.cjs.map => logger-DMvvTbNw.cjs.map} | 2 +- ...{logger-CcMMJUPZ.js => logger-EcO8T52u.js} | 6 +- ...CcMMJUPZ.js.map => logger-EcO8T52u.js.map} | 2 +- dist/package-BQN-QfHU.js.map | 1 - dist/package-D1p4nXVA.cjs.map | 1 - ...kage-D1p4nXVA.cjs => package-DEKbT-ok.cjs} | 6 +- dist/package-DEKbT-ok.cjs.map | 1 + ...ackage-BQN-QfHU.js => package-aLA7rD-Y.js} | 6 +- dist/package-aLA7rD-Y.js.map | 1 + dist/ref-B-kqFHPy.js | 2 +- dist/ref-mxufyLY8.cjs | 2 +- dist/task-BYUCPaT1.js | 2 +- dist/task-YmD7yWl1.cjs | 2 +- dist/type-BPiIb9Kq.js | 2 +- dist/type-KOUr406I.cjs | 2 +- dist/udem-urgence.cjs | 2 +- dist/udem-urgence.js | 2 +- dist/unsafe-html-Dku8oD0s.cjs | 2 +- dist/unsafe-html-hzUS4Xy_.js | 2 +- dist/utils.cjs | 4 +- dist/utils.js | 6 +- 93 files changed, 202 insertions(+), 201 deletions(-) rename dist/{bib-BCofrvPu.js => bib-1rVnZJhT.js} (98%) rename dist/{bib-BCofrvPu.js.map => bib-1rVnZJhT.js.map} (99%) rename dist/{bib-qo8fsCxm.cjs => bib-SERnlaT3.cjs} (97%) rename dist/{bib-qo8fsCxm.cjs.map => bib-SERnlaT3.cjs.map} (99%) rename dist/{bib-consent-preferences-dialog-B10xxOhz.cjs => bib-consent-preferences-dialog-DTcmaEoj.cjs} (99%) rename dist/{bib-consent-preferences-dialog-B10xxOhz.cjs.map => bib-consent-preferences-dialog-DTcmaEoj.cjs.map} (99%) rename dist/{bib-consent-preferences-dialog-ByH_MjP-.js => bib-consent-preferences-dialog-Dlk44SVl.js} (99%) rename dist/{bib-consent-preferences-dialog-ByH_MjP-.js.map => bib-consent-preferences-dialog-Dlk44SVl.js.map} (99%) create mode 100644 dist/constants-BvP9XHhn.cjs rename dist/{constants-PQ5SQuv-.cjs.map => constants-BvP9XHhn.cjs.map} (61%) rename dist/{constants-B2WJQGFq.js => constants-D0hS4kJm.js} (96%) rename dist/{constants-B2WJQGFq.js.map => constants-D0hS4kJm.js.map} (59%) delete mode 100644 dist/constants-PQ5SQuv-.cjs rename dist/{logger-D5ZRyz6h.cjs => logger-DMvvTbNw.cjs} (73%) rename dist/{logger-D5ZRyz6h.cjs.map => logger-DMvvTbNw.cjs.map} (92%) rename dist/{logger-CcMMJUPZ.js => logger-EcO8T52u.js} (78%) rename dist/{logger-CcMMJUPZ.js.map => logger-EcO8T52u.js.map} (92%) delete mode 100644 dist/package-BQN-QfHU.js.map delete mode 100644 dist/package-D1p4nXVA.cjs.map rename dist/{package-D1p4nXVA.cjs => package-DEKbT-ok.cjs} (94%) create mode 100644 dist/package-DEKbT-ok.cjs.map rename dist/{package-BQN-QfHU.js => package-aLA7rD-Y.js} (94%) create mode 100644 dist/package-aLA7rD-Y.js.map diff --git a/dist/ConsentStorage.cjs b/dist/ConsentStorage.cjs index 9ada11a..eb45a5c 100644 --- a/dist/ConsentStorage.cjs +++ b/dist/ConsentStorage.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,r=e=>{throw TypeError(e)},n=(e,t,n)=>(((e,t,n)=>{t.has(e)||r("Cannot "+n)})(e,t,"access private method"),n);const o=require("./index-9izUO_DB.cjs"),a=require("./constants-PQ5SQuv-.cjs"),s=require("./ConsentTokens.cjs"),c=require("./_Uint8Array-CtB9L6tP.cjs"),i=require("./isObject-D1wTAyjh.cjs");var u=c.getNative(i.root,"WeakMap"),f=c.overArg(Object.keys,Object),l=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,h=Object.getOwnPropertySymbols,v=h?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,o=null==t?0:t.length,a=0,s=[];++nc))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var l=-1,b=!0,h=r&C?new D:void 0;for(a.set(e,t),a.set(t,e);++l{throw TypeError(e)},n=(e,t,n)=>(((e,t,n)=>{t.has(e)||r("Cannot "+n)})(e,t,"access private method"),n);const o=require("./index-9izUO_DB.cjs"),a=require("./constants-BvP9XHhn.cjs"),s=require("./ConsentTokens.cjs"),c=require("./_Uint8Array-CtB9L6tP.cjs"),i=require("./isObject-D1wTAyjh.cjs");var u=c.getNative(i.root,"WeakMap"),f=c.overArg(Object.keys,Object),l=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,h=Object.getOwnPropertySymbols,v=h?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,o=null==t?0:t.length,a=0,s=[];++nc))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var l=-1,b=!0,h=r&C?new D:void 0;for(a.set(e,t),a.set(t,e);++l [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import { openDB } from 'idb'\nimport { EVENT_NAMES, DEFAULT_PREFERENCES, DB_NAME, DB_VERSION, DB_STORE_NAME } from './constants.js'\nimport { isEqual, isObject } from 'lodash-es'\nimport { ConsentTokens } from './ConsentTokens.js'\n\n\n/**\n * Manages the storage and retrieval of user consent tokens in an IndexedDB database.\n *\n * This class extends the `EventTarget` class and provides methods to add event listeners,\n * dispatch events, initialize the IndexedDB database, retrieve stored consent tokens,\n * and set new consent tokens. It also includes data validation to ensure the consent tokens\n * object has the expected structure and values.\n *\n * The class uses the `idb` library to interact with IndexedDB, and the `lodash-es`\n * library for utility functions.\n */\nclass ConsentStorage extends EventTarget {\n\n constructor() {\n super()\n this.db = null\n }\n\n /*\n * @param {string} type\n * @param {function} listener\n * @return void\n */\n listen(listener) {\n super.addEventListener(EVENT_NAMES.UPDATE, listener)\n }\n\n /*\n * @param {object} dispatchData\n * @return void\n */\n dispatchEvent({ detail }) {\n super.dispatchEvent(\n new CustomEvent(\n EVENT_NAMES.UPDATE,\n { detail }\n )\n )\n }\n\n /**\n * Initializes the IndexedDB database for storing user consent tokens.\n *\n * This method is responsible for creating the IndexedDB database and the object store\n * if it doesn't already exist. It uses the `openDB` function from the `idb` library\n * to interact with IndexedDB.\n *\n * If there is an error while initializing the database, it throws an error with the\n * message \"Something went wrong with indexedDB:\".\n */\n async init() {\n try {\n this.db = await openDB(DB_NAME, DB_VERSION, {\n upgrade(db) {\n // Checks if the object store exists:\n if (!db.objectStoreNames.contains(DB_STORE_NAME)) {\n db.createObjectStore(DB_STORE_NAME)\n }\n }\n })\n\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /**\n * Retrieves the user consent tokens from the IndexedDB database.\n *\n * This method checks if the consent tokens are stored in the database, and if so, returns them.\n * If the consent tokens are not found in the database, it returns `null`.\n *\n * @returns {object|null} The user consent tokens, or `null` if not found.\n */\n async getConsentTokens() {\n\n const tokens = await this.db.get(DB_STORE_NAME, 'tokens')\n\n // Rehydrate the consentTokens object\n return ConsentTokens.from(tokens)\n }\n\n async #doSetConsentTokens(tokens) {\n\n try {\n // Check if there is a change is tokens.\n // If so, save it and dispatch an event\n const oldConsentTokens = await this.getConsentTokens()\n const newConsentTokens = new ConsentTokens(tokens)\n if (!isEqual(oldConsentTokens, newConsentTokens)) {\n await this.db.put(DB_STORE_NAME, newConsentTokens, 'tokens')\n return newConsentTokens\n } else {\n console.log('[setConsentTokens] No change in tokens. oldConsentTokens: ', oldConsentTokens, 'newConsentTokens: ', newConsentTokens)\n }\n\n // No change in tokens, return false\n return false\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /*\n * @param {object} tokens\n * @return void\n */\n async setConsentTokens(tokens) {\n\n //\n // Data validation\n const consentTokens = ConsentTokens.from(tokens)\n return await this.#doSetConsentTokens(consentTokens)\n\n }\n\n /**\n * Resets the user's consent tokens to their default values.\n * @returns {Promise} A promise that resolves when the consent tokens have been reset.\n */\n async resetTokens() {\n return await this.#doSetConsentTokens()\n }\n}\n\nlet consentStorage\n\n/**\n * Gets the singleton instance of the ConsentStorage class, initializing it if necessary.\n * @returns {Promise} The singleton instance of ConsentStorage.\n */\nexport default async function getConsentStorage() {\n if (!consentStorage) {\n consentStorage = new ConsentStorage()\n await consentStorage.init()\n }\n return consentStorage\n}","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n"],"names":["WeakMap","getNative","root","nativeKeys","overArg","Object","keys","hasOwnProperty","prototype","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","getSymbols","object","array","predicate","index","length","resIndex","result","value","symbol","call","getAllKeys","symbolsFunc","isArrayLike","arrayLikeKeys","isPrototype","key","push","isArray","values","offset","DataView","Promise","Set","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","toSource","mapCtorString","Map","promiseCtorString","setCtorString","weakMapCtorString","getTag","baseGetTag","SetCache","this","__data__","MapCache","add","arraySome","ArrayBuffer","resolve","Ctor","constructor","ctorString","set","has","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","other","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","get","othStacked","seen","undefined","arrValue","othValue","compared","othIndex","delete","mapToArray","map","Array","size","forEach","setToArray","symbolProto","Symbol","symbolValueOf","valueOf","argsTag","arrayTag","objectTag","baseIsEqual","isObjectLike","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","isBuffer","Stack","isTypedArray","tag","byteLength","byteOffset","buffer","Uint8Array","eq","name","message","convert","stacked","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","ConsentStorage","EventTarget","super","_z_instances","db","listen","listener","addEventListener","EVENT_NAMES","UPDATE","dispatchEvent","detail","CustomEvent","e","init","openDB","DB_NAME","DB_VERSION","upgrade","objectStoreNames","contains","DB_STORE_NAME","createObjectStore","error","Error","getConsentTokens","tokens","ConsentTokens","from","consentTokens","resetTokens","consentStorage","WeakSet","doSetConsentTokens","oldConsentTokens","newConsentTokens","console","log","put","async"],"mappings":"gTAIA,IAAIA,EAAUC,EAAAA,UAAUC,EAAIA,KAAE,WCD1BC,EAAaC,EAAOA,QAACC,OAAOC,KAAMD,QCIlCE,EAHcF,OAAOG,UAGQD,eCA7BE,EAHcJ,OAAOG,UAGcC,qBAGnCC,EAAmBL,OAAOM,sBAS1BC,EAAcF,EAA+B,SAASG,GAC1C,OAAA,MAAVA,EACK,IAETA,EAASR,OAAOQ,GCdlB,SAAqBC,EAAOC,GAM1B,IAAA,IALIC,GAAS,EACTC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACnCC,EAAW,EACXC,EAAS,KAEJH,EAAQC,GAAQ,CACnBG,IAAAA,EAAQN,EAAME,GDQkCK,ECPtCD,EDQPX,EAAqBa,KAAKT,EAAQQ,KCPvCF,EAAOD,KAAcE,EAExB,CDIqDC,IAAAA,ECH/CF,OAAAA,CACT,CAbA,CDeqBT,EAAiBG,IAGtC,EETA,WACE,MAAO,EACT,ECTA,SAASU,EAAWV,GCGpB,OAA0CW,EDFJZ,EEoBxBC,EDlBUA,EDFAA,ECGlBM,ECkBGM,EAAAA,YAAYZ,GAAUa,EAAAA,cAAcb,GNjB7C,SAAkBA,GAChB,IAAKc,EAAAA,YAAYd,GACf,OAAOV,EAAWU,GAEpB,IAAIM,EAAS,GACb,IAAA,IAASS,KAAOvB,OAAOQ,GACFS,EAAAA,KAAKT,EAAQe,IAAe,eAAPA,GACtCT,EAAOU,KAAKD,GAGTT,OAAAA,CACT,CAXA,CMiBgEN,GDjBvDiB,EAAOA,QAACjB,GAAUM,EER3B,SAAmBL,EAAOiB,GAKxB,IAAA,IAJIf,GACAC,EAAAA,EAASc,EAAOd,OAChBe,EAASlB,EAAMG,SAEVD,EAAQC,GACfH,EAAMkB,EAAShB,GAASe,EAAOf,GAE1BF,O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CD,EACzD,CACF,CAUD,sBAAME,GAEJ,MAAMC,QAAezG,KAAKmF,GAAG3D,IAAI4E,EAAaA,cAAE,UAGzCM,OAAAA,EAAaA,cAACC,KAAKF,EAC3B,CA2BD,uBAAuBA,GAIrB,MAAMG,EAAgBF,EAAAA,cAAcC,KAAKF,GACzC,aAAazG,YAAAA,KAAyB4G,KAAAA,EAEvC,CAMD,iBAAAC,GACe7G,aAAAA,OAAAA,EAAAA,GAAAA,KAAAA,KACd,EAGH,IAAI8G,EAlHJ5B,EAAA,IAAA6B,QAuEQC,EAAAA,eAAoBP,GAKtB,IAAMQ,MAAAA,QAAyBjH,KAAKwG,mBAC9BU,EAAmB,IAAIR,EAAaA,cAACD,GC/DxC3D,OAAAA,EDgEUmE,EAAkBC,IAI7BC,QAAQC,IAAI,6DAA8DH,EAAkB,qBAAsBC,cAH5GlH,KAAKmF,GAAGkC,IAAIjB,EAAAA,cAAec,EAAkB,UAC5CA,EAOV,OAAQZ,GACD,MAAA,IAAIC,MAAM,uCAAwCD,EACzD,CACF,iBA8BYgB,iBAKb,OAJKR,IACHA,EAAiB,IAAI/B,QACf+B,EAAejB,QAEhBiB,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27]} \ No newline at end of file +{"version":3,"file":"ConsentStorage.cjs","sources":["../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_SetCache.js","../node_modules/lodash-es/_arraySome.js","../node_modules/lodash-es/_setCacheAdd.js","../node_modules/lodash-es/_setCacheHas.js","../node_modules/lodash-es/_equalArrays.js","../node_modules/lodash-es/_cacheHas.js","../node_modules/lodash-es/_mapToArray.js","../node_modules/lodash-es/_setToArray.js","../node_modules/lodash-es/_equalByTag.js","../node_modules/lodash-es/_equalObjects.js","../node_modules/lodash-es/_baseIsEqualDeep.js","../node_modules/lodash-es/_baseIsEqual.js","../src/components/bib-consent/ConsentStorage.js","../node_modules/lodash-es/isEqual.js"],"sourcesContent":["import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import { openDB } from 'idb'\nimport { EVENT_NAMES, DB_NAME, DB_VERSION, DB_STORE_NAME } from './constants.js'\nimport { isEqual } from 'lodash-es'\nimport { ConsentTokens } from './ConsentTokens.js'\n\n\n/**\n * Manages the storage and retrieval of user consent tokens in an IndexedDB database.\n *\n * This class extends the `EventTarget` class and provides methods to add event listeners,\n * dispatch events, initialize the IndexedDB database, retrieve stored consent tokens,\n * and set new consent tokens. It also includes data validation to ensure the consent tokens\n * object has the expected structure and values.\n *\n * The class uses the `idb` library to interact with IndexedDB, and the `lodash-es`\n * library for utility functions.\n */\nclass ConsentStorage extends EventTarget {\n\n constructor() {\n super()\n this.db = null\n }\n\n /*\n * @param {string} type\n * @param {function} listener\n * @return void\n */\n listen(listener) {\n super.addEventListener(EVENT_NAMES.UPDATE, listener)\n }\n\n /*\n * @param {object} dispatchData\n * @return void\n */\n dispatchEvent({ detail }) {\n super.dispatchEvent(\n new CustomEvent(\n EVENT_NAMES.UPDATE,\n { detail }\n )\n )\n }\n\n /**\n * Initializes the IndexedDB database for storing user consent tokens.\n *\n * This method is responsible for creating the IndexedDB database and the object store\n * if it doesn't already exist. It uses the `openDB` function from the `idb` library\n * to interact with IndexedDB.\n *\n * If there is an error while initializing the database, it throws an error with the\n * message \"Something went wrong with indexedDB:\".\n */\n async init() {\n try {\n this.db = await openDB(DB_NAME, DB_VERSION, {\n upgrade(db) {\n // Checks if the object store exists:\n if (!db.objectStoreNames.contains(DB_STORE_NAME)) {\n db.createObjectStore(DB_STORE_NAME)\n }\n }\n })\n\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /**\n * Retrieves the user consent tokens from the IndexedDB database.\n *\n * This method checks if the consent tokens are stored in the database, and if so, returns them.\n * If the consent tokens are not found in the database, it returns `null`.\n *\n * @returns {object|null} The user consent tokens, or `null` if not found.\n */\n async getConsentTokens() {\n\n const tokens = await this.db.get(DB_STORE_NAME, 'tokens')\n\n // Rehydrate the consentTokens object\n return ConsentTokens.from(tokens)\n }\n\n async #doSetConsentTokens(tokens) {\n\n try {\n // Check if there is a change is tokens.\n // If so, save it and dispatch an event\n const oldConsentTokens = await this.getConsentTokens()\n const newConsentTokens = new ConsentTokens(tokens)\n if (!isEqual(oldConsentTokens, newConsentTokens)) {\n await this.db.put(DB_STORE_NAME, newConsentTokens, 'tokens')\n return newConsentTokens\n } else {\n console.log('[setConsentTokens] No change in tokens. oldConsentTokens: ', oldConsentTokens, 'newConsentTokens: ', newConsentTokens)\n }\n\n // No change in tokens, return false\n return false\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /*\n * @param {object} tokens\n * @return void\n */\n async setConsentTokens(tokens) {\n\n //\n // Data validation\n const consentTokens = ConsentTokens.from(tokens)\n return await this.#doSetConsentTokens(consentTokens)\n\n }\n\n /**\n * Resets the user's consent tokens to their default values.\n * @returns {Promise} A promise that resolves when the consent tokens have been reset.\n */\n async resetTokens() {\n return await this.#doSetConsentTokens()\n }\n}\n\nlet consentStorage\n\n/**\n * Gets the singleton instance of the ConsentStorage class, initializing it if necessary.\n * @returns {Promise} The singleton instance of ConsentStorage.\n */\nexport default async function getConsentStorage() {\n if (!consentStorage) {\n consentStorage = new ConsentStorage()\n await consentStorage.init()\n }\n return consentStorage\n}","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n"],"names":["WeakMap","getNative","root","nativeKeys","overArg","Object","keys","hasOwnProperty","prototype","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","getSymbols","object","array","predicate","index","length","resIndex","result","value","symbol","call","getAllKeys","symbolsFunc","isArrayLike","arrayLikeKeys","isPrototype","key","push","isArray","values","offset","DataView","Promise","Set","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","toSource","mapCtorString","Map","promiseCtorString","setCtorString","weakMapCtorString","getTag","baseGetTag","SetCache","this","__data__","MapCache","add","arraySome","ArrayBuffer","resolve","Ctor","constructor","ctorString","set","has","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","other","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","get","othStacked","seen","undefined","arrValue","othValue","compared","othIndex","delete","mapToArray","map","Array","size","forEach","setToArray","symbolProto","Symbol","symbolValueOf","valueOf","argsTag","arrayTag","objectTag","baseIsEqual","isObjectLike","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","isBuffer","Stack","isTypedArray","tag","byteLength","byteOffset","buffer","Uint8Array","eq","name","message","convert","stacked","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","ConsentStorage","EventTarget","super","_z_instances","db","listen","listener","addEventListener","EVENT_NAMES","UPDATE","dispatchEvent","detail","CustomEvent","e","init","openDB","DB_NAME","DB_VERSION","upgrade","objectStoreNames","contains","DB_STORE_NAME","createObjectStore","error","Error","getConsentTokens","tokens","ConsentTokens","from","consentTokens","resetTokens","consentStorage","WeakSet","doSetConsentTokens","oldConsentTokens","newConsentTokens","console","log","put","async"],"mappings":"gTAIA,IAAIA,EAAUC,EAAAA,UAAUC,EAAIA,KAAE,WCD1BC,EAAaC,EAAOA,QAACC,OAAOC,KAAMD,QCIlCE,EAHcF,OAAOG,UAGQD,eCA7BE,EAHcJ,OAAOG,UAGcC,qBAGnCC,EAAmBL,OAAOM,sBAS1BC,EAAcF,EAA+B,SAASG,GAC1C,OAAA,MAAVA,EACK,IAETA,EAASR,OAAOQ,GCdlB,SAAqBC,EAAOC,GAM1B,IAAA,IALIC,GAAS,EACTC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACnCC,EAAW,EACXC,EAAS,KAEJH,EAAQC,GAAQ,CACnBG,IAAAA,EAAQN,EAAME,GDQkCK,ECPtCD,EDQPX,EAAqBa,KAAKT,EAAQQ,KCPvCF,EAAOD,KAAcE,EAExB,CDIqDC,IAAAA,ECH/CF,OAAAA,CACT,CAbA,CDeqBT,EAAiBG,IAGtC,EETA,WACE,MAAO,EACT,ECTA,SAASU,EAAWV,GCGpB,OAA0CW,EDFJZ,EEoBxBC,EDlBUA,EDFAA,ECGlBM,ECkBGM,EAAAA,YAAYZ,GAAUa,EAAAA,cAAcb,GNjB7C,SAAkBA,GAChB,IAAKc,EAAAA,YAAYd,GACf,OAAOV,EAAWU,GAEpB,IAAIM,EAAS,GACb,IAAA,IAASS,KAAOvB,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AAEA,IACRD,MAAAA,cACJ,IAAIE,YACFJ,EAAAA,YAAYC,OACZ,CAAEE,OAGPE,IAAA,CAYD,UAAMC,OAEGV,KAAAA,SAAWW,SAAOC,EAAAA,QAASC,EAAAA,WAAY,CAC1C,OAAAC,CAAQd,GAEDA,EAAGe,iBAAiBC,SAASC,EAAaA,gBAC7CjB,EAAGkB,kBAAkBD,gBAExB,GAGJ,OAAQE,GACD,MAAA,IAAIC,MAAM,uCAAwCD,EACzD,CACF,CAUD,sBAAME,GAEJ,MAAMC,QAAezG,KAAKmF,GAAG3D,IAAI4E,EAAaA,cAAE,UAGzCM,OAAAA,EAAaA,cAACC,KAAKF,EAC3B,CA2BD,uBAAuBA,GAIrB,MAAMG,EAAgBF,EAAAA,cAAcC,KAAKF,GACzC,aAAazG,YAAAA,KAAyB4G,KAAAA,EAEvC,CAMD,iBAAAC,GACe7G,aAAAA,OAAAA,EAAAA,GAAAA,KAAAA,KACd,EAGH,IAAI8G,EAlHJ5B,EAAA,IAAA6B,QAuEQC,EAAAA,eAAoBP,GAKtB,IAAMQ,MAAAA,QAAyBjH,KAAKwG,mBAC9BU,EAAmB,IAAIR,EAAaA,cAACD,GC/DxC3D,OAAAA,EDgEUmE,EAAkBC,IAI7BC,QAAQC,IAAI,6DAA8DH,EAAkB,qBAAsBC,cAH5GlH,KAAKmF,GAAGkC,IAAIjB,EAAAA,cAAec,EAAkB,UAC5CA,EAOV,OAAQZ,GACD,MAAA,IAAIC,MAAM,uCAAwCD,EACzD,CACF,iBA8BYgB,iBAKb,OAJKR,IACHA,EAAiB,IAAI/B,QACf+B,EAAejB,QAEhBiB,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27]} \ No newline at end of file diff --git a/dist/ConsentStorage.js b/dist/ConsentStorage.js index 251f4eb..d769adb 100644 --- a/dist/ConsentStorage.js +++ b/dist/ConsentStorage.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -14,7 +14,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var _se_instances, e_fn; import { o as e } from "./index-CRxQMTzC.js"; -import { E as t, f as r, h as n, i as a } from "./constants-B2WJQGFq.js"; +import { E as t, h as r, i as n, j as a } from "./constants-D0hS4kJm.js"; import { ConsentTokens as o } from "./ConsentTokens.js"; import { g as s, o as c, i, a as u, b as f, c as l, t as b, M as h, d as v, e as p, U as d, f as w, S as j, h as y } from "./_Uint8Array-Cf-PTZCw.js"; import { r as g, b as m, S as _, i as k } from "./isObject-Dipzh7kZ.js"; diff --git a/dist/ConsentStorage.js.map b/dist/ConsentStorage.js.map index 2605115..f4744c5 100644 --- a/dist/ConsentStorage.js.map +++ b/dist/ConsentStorage.js.map @@ -1 +1 @@ -{"version":3,"file":"ConsentStorage.js","sources":["../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_SetCache.js","../node_modules/lodash-es/_arraySome.js","../node_modules/lodash-es/_setCacheAdd.js","../node_modules/lodash-es/_setCacheHas.js","../node_modules/lodash-es/_equalArrays.js","../node_modules/lodash-es/_cacheHas.js","../node_modules/lodash-es/_mapToArray.js","../node_modules/lodash-es/_setToArray.js","../node_modules/lodash-es/_equalByTag.js","../node_modules/lodash-es/_equalObjects.js","../node_modules/lodash-es/_baseIsEqualDeep.js","../node_modules/lodash-es/_baseIsEqual.js","../src/components/bib-consent/ConsentStorage.js","../node_modules/lodash-es/isEqual.js"],"sourcesContent":["import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import { openDB } from 'idb'\nimport { EVENT_NAMES, DEFAULT_PREFERENCES, DB_NAME, DB_VERSION, DB_STORE_NAME } from './constants.js'\nimport { isEqual, isObject } from 'lodash-es'\nimport { ConsentTokens } from './ConsentTokens.js'\n\n\n/**\n * Manages the storage and retrieval of user consent tokens in an IndexedDB database.\n *\n * This class extends the `EventTarget` class and provides methods to add event listeners,\n * dispatch events, initialize the IndexedDB database, retrieve stored consent tokens,\n * and set new consent tokens. It also includes data validation to ensure the consent tokens\n * object has the expected structure and values.\n *\n * The class uses the `idb` library to interact with IndexedDB, and the `lodash-es`\n * library for utility functions.\n */\nclass ConsentStorage extends EventTarget {\n\n constructor() {\n super()\n this.db = null\n }\n\n /*\n * @param {string} type\n * @param {function} listener\n * @return void\n */\n listen(listener) {\n super.addEventListener(EVENT_NAMES.UPDATE, listener)\n }\n\n /*\n * @param {object} dispatchData\n * @return void\n */\n dispatchEvent({ detail }) {\n super.dispatchEvent(\n new CustomEvent(\n EVENT_NAMES.UPDATE,\n { detail }\n )\n )\n }\n\n /**\n * Initializes the IndexedDB database for storing user consent tokens.\n *\n * This method is responsible for creating the IndexedDB database and the object store\n * if it doesn't already exist. It uses the `openDB` function from the `idb` library\n * to interact with IndexedDB.\n *\n * If there is an error while initializing the database, it throws an error with the\n * message \"Something went wrong with indexedDB:\".\n */\n async init() {\n try {\n this.db = await openDB(DB_NAME, DB_VERSION, {\n upgrade(db) {\n // Checks if the object store exists:\n if (!db.objectStoreNames.contains(DB_STORE_NAME)) {\n db.createObjectStore(DB_STORE_NAME)\n }\n }\n })\n\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /**\n * Retrieves the user consent tokens from the IndexedDB database.\n *\n * This method checks if the consent tokens are stored in the database, and if so, returns them.\n * If the consent tokens are not found in the database, it returns `null`.\n *\n * @returns {object|null} The user consent tokens, or `null` if not found.\n */\n async getConsentTokens() {\n\n const tokens = await this.db.get(DB_STORE_NAME, 'tokens')\n\n // Rehydrate the consentTokens object\n return ConsentTokens.from(tokens)\n }\n\n async #doSetConsentTokens(tokens) {\n\n try {\n // Check if there is a change is tokens.\n // If so, save it and dispatch an event\n const oldConsentTokens = await this.getConsentTokens()\n const newConsentTokens = new ConsentTokens(tokens)\n if (!isEqual(oldConsentTokens, newConsentTokens)) {\n await this.db.put(DB_STORE_NAME, newConsentTokens, 'tokens')\n return newConsentTokens\n } else {\n console.log('[setConsentTokens] No change in tokens. oldConsentTokens: ', oldConsentTokens, 'newConsentTokens: ', newConsentTokens)\n }\n\n // No change in tokens, return false\n return false\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /*\n * @param {object} tokens\n * @return void\n */\n async setConsentTokens(tokens) {\n\n //\n // Data validation\n const consentTokens = ConsentTokens.from(tokens)\n return await this.#doSetConsentTokens(consentTokens)\n\n }\n\n /**\n * Resets the user's consent tokens to their default values.\n * @returns {Promise} A promise that resolves when the consent tokens have been reset.\n */\n async resetTokens() {\n return await this.#doSetConsentTokens()\n }\n}\n\nlet consentStorage\n\n/**\n * Gets the singleton instance of the ConsentStorage class, initializing it if necessary.\n * @returns {Promise} The singleton instance of ConsentStorage.\n */\nexport default async function getConsentStorage() {\n if (!consentStorage) {\n consentStorage = new ConsentStorage()\n await consentStorage.init()\n }\n return consentStorage\n}","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n"],"names":["WeakMap","getNative","root","nativeKeys","overArg","Object","keys","hasOwnProperty","prototype","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","getSymbols","object","array","predicate","index","length","resIndex","result","value","symbol","call","getAllKeys","keysFunc","symbolsFunc","isArrayLike","arrayLikeKeys","isPrototype","key","push","isArray","values","offset","DataView","Promise","Set","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","toSource","mapCtorString","Map","promiseCtorString","setCtorString","weakMapCtorString","getTag","baseGetTag","SetCache","this","__data__","MapCache","add","arraySome","ArrayBuffer","resolve","Ctor","constructor","undefined","ctorString","set","has","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","other","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","get","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","map","Array","size","forEach","setToArray","symbolProto","Symbol","symbolValueOf","valueOf","argsTag","arrayTag","objectTag","baseIsEqual","isObjectLike","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","isBuffer","Stack","isTypedArray","tag","byteLength","byteOffset","buffer","Uint8Array","eq","name","message","convert","stacked","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","ConsentStorage","EventTarget","super","db","listener","addEventListener","EVENT_NAMES","UPDATE","dispatchEvent","detail","CustomEvent","openDB","DB_NAME","DB_VERSION","objectStoreNames","contains","DB_STORE_NAME","createObjectStore","error","Error","tokens","ConsentTokens","from","consentTokens","resetTokens","doSetConsentTokens","oldConsentTokens","getConsentTokens","newConsentTokens","console","log","put","consentStorage","async","getConsentStorage","init"],"mappings":";;;;;;;;;;;;AAIA,IAAIA,IAAUC,EAAUC,GAAM,SCD1BC,GAAAA,IAAaC,EAAQC,OAAOC,MAAMD,MCIlCE,GAAAA,IAHcF,OAAOG,UAGQD;ACHjC,IAGIE,IAHcJ,OAAOG,UAGcC,sBAGnCC,IAAmBL,OAAOM,uBAS1BC,IAAcF,IAA+B,SAASG;AACxD,SAAc,QAAVA,KACK,CAAA,KAETA,KAASR,OAAOQ,EAAAA,GCdlB,SAAqBC,IAAOC;AAM1B,aALIC,KAAS,IACTC,KAAkB,QAATH,KAAgB,IAAIA,GAAMG,QACnCC,KAAW,GACXC,KAAS,CAAA,GAAA,EAEJH,KAAQC,MAAQ;AACvB,UAAIG,KAAQN,GAAME,EAAAA;ADQkCK,MAAAA,KCPtCD,IDQPX,EAAqBa,KAAKT,IAAQQ,ECPvCF,MAAAA,GAAOD,QAAcE;AAAAA,IAExB;ADI4C,QAASC;ACHtD,WAAOF;AAAAA,EACT,EDEqBT,EAAiBG;AAGtC,IETA,WAAA;AACE,SAAO,CAAA;AACT;ACTA,SAASU,EAAWV,IAClB;AAAA,SCEF,SAAwBA,IAAQW,IAAUC,IACxC;AAAA,QAAIN,KCiBN,SAAcN,IACZ;AAAA,aAAOa,EAAYb,EAAUc,IAAAA,EAAcd,ENjB7C,IAAA,SAAkBA;AAChB,YAAKe,CAAAA,EAAYf,EACf,EAAA,QAAOV,EAAWU,EAEpB;AAAA,YAAIM,KAAS,CAAA;AACb,iBAASU,MAAOxB,OAAOQ,EAAAA,EACjBN,GAAee,KAAKT,IAAQgB,EAAe,KAAA,iBAAPA,MAC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;AAAAA,QAAAA,GAAGW,iBAAiBC,SAASC,MAChCb,GAAGc,kBAAkBD,CAExB;AAAA,MAAA,EAAA,CAAA;AAAA,IAGJ,SAAQE,IAAAA;AACP,YAAM,IAAIC,MAAM,wCAAwCD,EAAAA;AAAAA,IACzD;AAAA,EACF;AAAA,EAUD,yBAEE;AAAA,UAAME,KAAelG,MAAAA,KAAKiF,GAAGxD,IAAIqE,GAAe,QAGhD;AAAA,WAAOK,EAAcC,KAAKF,EAC3B;AAAA,EAAA;AAAA,EA2BD,uBAAuBA,IAAAA;AAIrB,UAAMG,KAAgBF,EAAcC,KAAKF,EAAAA;AACzC,WAAalG,MAAAA,sBAAAA,qBAAAA,WAAyBqG;AAAAA,EAEvC;AAAA,EAMD,MAAMC,cAAAA;AACJ,iBAAatG,sBAAKuG,qBAALvG;AAAAA,EACd;AAGH;AAlHA;OAuEQuG,eAAoBL,IAAAA;AAExB,MAGE;AAAA,UAAMM,WAAyBxG,KAAKyG,iBAAAA,GAC9BC,KAAmB,IAAIP,EAAcD,EAC3C;AAAA,WChEGrD,GDgEU2D,IAAkBE,OAI7BC,QAAQC,IAAI,8DAA8DJ,IAAkB,sBAAsBE,EAI7G,GAAA,UAAA,MAPC1G,KAAKiF,GAAG4B,IAAIf,GAAeY,IAAkB,QAC5CA,GAAAA;AAAAA,EAOV,SAAQV,IAAAA;AACP,UAAM,IAAIC,MAAM,wCAAwCD,EAAAA;AAAAA,EACzD;AACF;AAwBH,IAAIc;AAMWC,eAAeC,KAAAA;AAK5B,SAJKF,OACHA,KAAiB,IAAIhC,MAAAA,MACfgC,GAAeG,KAAAA,IAEhBH;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27]} \ No newline at end of file +{"version":3,"file":"ConsentStorage.js","sources":["../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_SetCache.js","../node_modules/lodash-es/_arraySome.js","../node_modules/lodash-es/_setCacheAdd.js","../node_modules/lodash-es/_setCacheHas.js","../node_modules/lodash-es/_equalArrays.js","../node_modules/lodash-es/_cacheHas.js","../node_modules/lodash-es/_mapToArray.js","../node_modules/lodash-es/_setToArray.js","../node_modules/lodash-es/_equalByTag.js","../node_modules/lodash-es/_equalObjects.js","../node_modules/lodash-es/_baseIsEqualDeep.js","../node_modules/lodash-es/_baseIsEqual.js","../src/components/bib-consent/ConsentStorage.js","../node_modules/lodash-es/isEqual.js"],"sourcesContent":["import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import { openDB } from 'idb'\nimport { EVENT_NAMES, DB_NAME, DB_VERSION, DB_STORE_NAME } from './constants.js'\nimport { isEqual } from 'lodash-es'\nimport { ConsentTokens } from './ConsentTokens.js'\n\n\n/**\n * Manages the storage and retrieval of user consent tokens in an IndexedDB database.\n *\n * This class extends the `EventTarget` class and provides methods to add event listeners,\n * dispatch events, initialize the IndexedDB database, retrieve stored consent tokens,\n * and set new consent tokens. It also includes data validation to ensure the consent tokens\n * object has the expected structure and values.\n *\n * The class uses the `idb` library to interact with IndexedDB, and the `lodash-es`\n * library for utility functions.\n */\nclass ConsentStorage extends EventTarget {\n\n constructor() {\n super()\n this.db = null\n }\n\n /*\n * @param {string} type\n * @param {function} listener\n * @return void\n */\n listen(listener) {\n super.addEventListener(EVENT_NAMES.UPDATE, listener)\n }\n\n /*\n * @param {object} dispatchData\n * @return void\n */\n dispatchEvent({ detail }) {\n super.dispatchEvent(\n new CustomEvent(\n EVENT_NAMES.UPDATE,\n { detail }\n )\n )\n }\n\n /**\n * Initializes the IndexedDB database for storing user consent tokens.\n *\n * This method is responsible for creating the IndexedDB database and the object store\n * if it doesn't already exist. It uses the `openDB` function from the `idb` library\n * to interact with IndexedDB.\n *\n * If there is an error while initializing the database, it throws an error with the\n * message \"Something went wrong with indexedDB:\".\n */\n async init() {\n try {\n this.db = await openDB(DB_NAME, DB_VERSION, {\n upgrade(db) {\n // Checks if the object store exists:\n if (!db.objectStoreNames.contains(DB_STORE_NAME)) {\n db.createObjectStore(DB_STORE_NAME)\n }\n }\n })\n\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /**\n * Retrieves the user consent tokens from the IndexedDB database.\n *\n * This method checks if the consent tokens are stored in the database, and if so, returns them.\n * If the consent tokens are not found in the database, it returns `null`.\n *\n * @returns {object|null} The user consent tokens, or `null` if not found.\n */\n async getConsentTokens() {\n\n const tokens = await this.db.get(DB_STORE_NAME, 'tokens')\n\n // Rehydrate the consentTokens object\n return ConsentTokens.from(tokens)\n }\n\n async #doSetConsentTokens(tokens) {\n\n try {\n // Check if there is a change is tokens.\n // If so, save it and dispatch an event\n const oldConsentTokens = await this.getConsentTokens()\n const newConsentTokens = new ConsentTokens(tokens)\n if (!isEqual(oldConsentTokens, newConsentTokens)) {\n await this.db.put(DB_STORE_NAME, newConsentTokens, 'tokens')\n return newConsentTokens\n } else {\n console.log('[setConsentTokens] No change in tokens. oldConsentTokens: ', oldConsentTokens, 'newConsentTokens: ', newConsentTokens)\n }\n\n // No change in tokens, return false\n return false\n } catch (error) {\n throw new Error('Something went wrong with indexedDB:', error)\n }\n }\n\n /*\n * @param {object} tokens\n * @return void\n */\n async setConsentTokens(tokens) {\n\n //\n // Data validation\n const consentTokens = ConsentTokens.from(tokens)\n return await this.#doSetConsentTokens(consentTokens)\n\n }\n\n /**\n * Resets the user's consent tokens to their default values.\n * @returns {Promise} A promise that resolves when the consent tokens have been reset.\n */\n async resetTokens() {\n return await this.#doSetConsentTokens()\n }\n}\n\nlet consentStorage\n\n/**\n * Gets the singleton instance of the ConsentStorage class, initializing it if necessary.\n * @returns {Promise} The singleton instance of ConsentStorage.\n */\nexport default async function getConsentStorage() {\n if (!consentStorage) {\n consentStorage = new ConsentStorage()\n await consentStorage.init()\n }\n return consentStorage\n}","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n"],"names":["WeakMap","getNative","root","nativeKeys","overArg","Object","keys","hasOwnProperty","prototype","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","getSymbols","object","array","predicate","index","length","resIndex","result","value","symbol","call","getAllKeys","keysFunc","symbolsFunc","isArrayLike","arrayLikeKeys","isPrototype","key","push","isArray","values","offset","DataView","Promise","Set","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","toSource","mapCtorString","Map","promiseCtorString","setCtorString","weakMapCtorString","getTag","baseGetTag","SetCache","this","__data__","MapCache","add","arraySome","ArrayBuffer","resolve","Ctor","constructor","undefined","ctorString","set","has","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","other","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","get","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","map","Array","size","forEach","setToArray","symbolProto","Symbol","symbolValueOf","valueOf","argsTag","arrayTag","objectTag","baseIsEqual","isObjectLike","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","isBuffer","Stack","isTypedArray","tag","byteLength","byteOffset","buffer","Uint8Array","eq","name","message","convert","stacked","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","ConsentStorage","EventTarget","super","db","listener","addEventListener","EVENT_NAMES","UPDATE","dispatchEvent","detail","CustomEvent","openDB","DB_NAME","DB_VERSION","objectStoreNames","contains","DB_STORE_NAME","createObjectStore","error","Error","tokens","ConsentTokens","from","consentTokens","resetTokens","doSetConsentTokens","oldConsentTokens","getConsentTokens","newConsentTokens","console","log","put","consentStorage","async","getConsentStorage","init"],"mappings":";;;;;;;;;;;;AAIA,IAAIA,IAAUC,EAAUC,GAAM,SCD1BC,GAAAA,IAAaC,EAAQC,OAAOC,MAAMD,MCIlCE,GAAAA,IAHcF,OAAOG,UAGQD;ACHjC,IAGIE,IAHcJ,OAAOG,UAGcC,sBAGnCC,IAAmBL,OAAOM,uBAS1BC,IAAcF,IAA+B,SAASG;AACxD,SAAc,QAAVA,KACK,CAAA,KAETA,KAASR,OAAOQ,EAAAA,GCdlB,SAAqBC,IAAOC;AAM1B,aALIC,KAAS,IACTC,KAAkB,QAATH,KAAgB,IAAIA,GAAMG,QACnCC,KAAW,GACXC,KAAS,CAAA,GAAA,EAEJH,KAAQC,MAAQ;AACvB,UAAIG,KAAQN,GAAME,EAAAA;ADQkCK,MAAAA,KCPtCD,IDQPX,EAAqBa,KAAKT,IAAQQ,ECPvCF,MAAAA,GAAOD,QAAc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f,GAAeY,IAAkB,QAC5CA,GAAAA;AAAAA,EAOV,SAAQV,IAAAA;AACP,UAAM,IAAIC,MAAM,wCAAwCD,EAAAA;AAAAA,EACzD;AACF;AAwBH,IAAIc;AAMWC,eAAeC,KAAAA;AAK5B,SAJKF,OACHA,KAAiB,IAAIhC,MAAAA,MACfgC,GAAeG,KAAAA,IAEhBH;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27]} \ No newline at end of file diff --git a/dist/ConsentTokens.cjs b/dist/ConsentTokens.cjs index 85e67a6..d4b83d2 100644 --- a/dist/ConsentTokens.cjs +++ b/dist/ConsentTokens.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,n,s,a=e=>{throw TypeError(e)},i=(e,t,n)=>t.has(e)||a("Cannot "+n),c=(e,t,n)=>(i(e,t,"read from private field"),n?n.call(e):t.get(e)),o=(e,t,n)=>t.has(e)?a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),r=(e,t,n)=>(i(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./constants-PQ5SQuv-.cjs"),h=require("./isObject-D1wTAyjh.cjs");var E="[object Boolean]";function d(e){return!0===e||!1===e||h.isObjectLike(e)&&h.baseGetTag(e)==E}const u=Object.keys(l.DEFAULT_PREFERENCES);function T(e,{key:t,acceptNull:n=!1}={}){if(!d(e)&&!["granted","denied"].includes(e)&&!n&&null===e)throw new TypeError(`Invalid value${t?` for field \`${t}\``:""}: ${e}. Must be either boolean or one of 'granted' or 'denied'.`)}function f(e){if(!u.includes(e)){const t=`Invalid key: ${e}. Must be one of ${u.reduce(((e,t,n)=>n===u.length?`${e} or ${t}`:`${e}, ${t}`))}.`;throw new TypeError(t)}}e=new WeakMap,t=new WeakSet,n=function(t,n,s=!1){f(t),T(n,{key:t,acceptNull:s}),c(this,e)[t]=d(n)?n?"granted":"denied":n},s=function(t,n=!1){T(t,{acceptNull:n}),"string"!=typeof t&&(t=t?"granted":"denied"),Object.keys(c(this,e)).forEach((n=>c(this,e)[n]=t))};let b=class a{constructor(a){o(this,t),o(this,e,{...l.DEFAULT_PREFERENCES}),Object.defineProperties(this,{analytics_consent:{enumerable:!0,get:()=>c(this,e).analytics_consent,set:e=>r(this,t,n).call(this,"analytics_consent",e)},functionality_consent:{enumerable:!0,get:()=>c(this,e).functionality_consent,set:e=>r(this,t,n).call(this,"functionality_consent",e)},ad_consent:{enumerable:!0,get:()=>c(this,e).ad_consent,set:e=>r(this,t,n).call(this,"ad_consent",e)}}),void 0!==a&&(h.isObject(a)?Object.keys(l.DEFAULT_PREFERENCES).forEach((e=>{Reflect.has(a,e)&&r(this,t,n).call(this,e,a[e])})):r(this,t,s).call(this,a))}static from(e){var i;const c=new a;return e&&(h.isObject(e)?Object.keys(e).forEach((s=>{var a;r(a=c,t,n).call(a,s,e[s],!0)})):r(i=c,t,s).call(i,e,!0)),c}isGranted(t){return f(t),c(this,e)[t]===l.CONSENT_STATES.GRANTED}isDenied(t){return f(t),c(this,e)[t]===l.CONSENT_STATES.DENIED}state(){return Object.values(c(this,e)).every((e=>null!==e))?l.CONSENT_STATES.DETERMINATE:l.CONSENT_STATES.INDETERMINATE}setAll(e){h.isObject(e)?Object.entries(e).forEach((([e,s])=>r(this,t,n).call(this,e,s))):r(this,t,s).call(this,e)}resetConsent(){Object.keys(c(this,e)).forEach((t=>c(this,e)[t]=null))}toGTM(t=500){if(this.state()===l.CONSENT_STATES.INDETERMINATE){const t=Object.entries(c(this,e)).filter((e=>null===e[1]));throw new Error(`All tokens must have an explicit value. Undefined token${t.length>1?"s":""}: ${t.map((e=>e[0])).join(", ")}`)}const{analytics_consent:n,ad_consent:s}=c(this,e);return{ad_user_data:s,ad_personalization:s,ad_consent:s,analytics_consent:n,wait_for_update:t}}};exports.ConsentTokens=b; +var e,t,n,s,a=e=>{throw TypeError(e)},i=(e,t,n)=>t.has(e)||a("Cannot "+n),c=(e,t,n)=>(i(e,t,"read from private field"),n?n.call(e):t.get(e)),o=(e,t,n)=>t.has(e)?a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),r=(e,t,n)=>(i(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./constants-BvP9XHhn.cjs"),h=require("./isObject-D1wTAyjh.cjs");var E="[object Boolean]";function d(e){return!0===e||!1===e||h.isObjectLike(e)&&h.baseGetTag(e)==E}const u=Object.keys(l.DEFAULT_PREFERENCES);function T(e,{key:t,acceptNull:n=!1}={}){if(!d(e)&&!["granted","denied"].includes(e)&&!n&&null===e)throw new TypeError(`Invalid value${t?` for field \`${t}\``:""}: ${e}. Must be either boolean or one of 'granted' or 'denied'.`)}function f(e){if(!u.includes(e)){const t=`Invalid key: ${e}. Must be one of ${u.reduce(((e,t,n)=>n===u.length?`${e} or ${t}`:`${e}, ${t}`))}.`;throw new TypeError(t)}}e=new WeakMap,t=new WeakSet,n=function(t,n,s=!1){f(t),T(n,{key:t,acceptNull:s}),c(this,e)[t]=d(n)?n?"granted":"denied":n},s=function(t,n=!1){T(t,{acceptNull:n}),"string"!=typeof t&&(t=t?"granted":"denied"),Object.keys(c(this,e)).forEach((n=>c(this,e)[n]=t))};let b=class a{constructor(a){o(this,t),o(this,e,{...l.DEFAULT_PREFERENCES}),Object.defineProperties(this,{analytics_consent:{enumerable:!0,get:()=>c(this,e).analytics_consent,set:e=>r(this,t,n).call(this,"analytics_consent",e)},functionality_consent:{enumerable:!0,get:()=>c(this,e).functionality_consent,set:e=>r(this,t,n).call(this,"functionality_consent",e)},ad_consent:{enumerable:!0,get:()=>c(this,e).ad_consent,set:e=>r(this,t,n).call(this,"ad_consent",e)}}),void 0!==a&&(h.isObject(a)?Object.keys(l.DEFAULT_PREFERENCES).forEach((e=>{Reflect.has(a,e)&&r(this,t,n).call(this,e,a[e])})):r(this,t,s).call(this,a))}static from(e){var i;const c=new a;return e&&(h.isObject(e)?Object.keys(e).forEach((s=>{var a;r(a=c,t,n).call(a,s,e[s],!0)})):r(i=c,t,s).call(i,e,!0)),c}isGranted(t){return f(t),c(this,e)[t]===l.CONSENT_STATES.GRANTED}isDenied(t){return f(t),c(this,e)[t]===l.CONSENT_STATES.DENIED}state(){return Object.values(c(this,e)).every((e=>null!==e))?l.CONSENT_STATES.DETERMINATE:l.CONSENT_STATES.INDETERMINATE}setAll(e){h.isObject(e)?Object.entries(e).forEach((([e,s])=>r(this,t,n).call(this,e,s))):r(this,t,s).call(this,e)}resetConsent(){Object.keys(c(this,e)).forEach((t=>c(this,e)[t]=null))}toGTM(t=500){if(this.state()===l.CONSENT_STATES.INDETERMINATE){const t=Object.entries(c(this,e)).filter((e=>null===e[1]));throw new Error(`All tokens must have an explicit value. Undefined token${t.length>1?"s":""}: ${t.map((e=>e[0])).join(", ")}`)}const{analytics_consent:n,ad_consent:s}=c(this,e);return{ad_user_data:s,ad_personalization:s,ad_consent:s,analytics_consent:n,wait_for_update:t}}};exports.ConsentTokens=b; //# sourceMappingURL=ConsentTokens.cjs.map diff --git a/dist/ConsentTokens.js b/dist/ConsentTokens.js index e459c07..ee55b2f 100644 --- a/dist/ConsentTokens.js +++ b/dist/ConsentTokens.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -14,7 +14,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var _n, _h_instances, e_fn, t_fn; -import { D as e, C as t } from "./constants-B2WJQGFq.js"; +import { D as e, C as t } from "./constants-D0hS4kJm.js"; import { i as n, b as s, a as o } from "./isObject-Dipzh7kZ.js"; var i = "[object Boolean]"; function a(e2) { diff --git a/dist/VotePayload.cjs b/dist/VotePayload.cjs index fe8b7c6..4967c23 100644 --- a/dist/VotePayload.cjs +++ b/dist/VotePayload.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/VotePayload.js b/dist/VotePayload.js index e0009ea..3b3d0f4 100644 --- a/dist/VotePayload.js +++ b/dist/VotePayload.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/_Uint8Array-Cf-PTZCw.js b/dist/_Uint8Array-Cf-PTZCw.js index 0eecb3f..4c550ca 100644 --- a/dist/_Uint8Array-Cf-PTZCw.js +++ b/dist/_Uint8Array-Cf-PTZCw.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/_Uint8Array-CtB9L6tP.cjs b/dist/_Uint8Array-CtB9L6tP.cjs index 6008b71..3bb6bbe 100644 --- a/dist/_Uint8Array-CtB9L6tP.cjs +++ b/dist/_Uint8Array-CtB9L6tP.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-BCofrvPu.js b/dist/bib-1rVnZJhT.js similarity index 98% rename from dist/bib-BCofrvPu.js rename to dist/bib-1rVnZJhT.js index 391da17..71ac5be 100644 --- a/dist/bib-BCofrvPu.js +++ b/dist/bib-1rVnZJhT.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { p as r } from "./package-BQN-QfHU.js"; +import { p as r } from "./package-aLA7rD-Y.js"; import { a as t, i as n, b as e, r as o } from "./isObject-Dipzh7kZ.js"; import { g as i, e as a, a as u, j as c, i as f, b as s, o as l, U as v, f as p, h as b, c as y, k as d, l as h, S as g } from "./_Uint8Array-Cf-PTZCw.js"; function j(r2) { @@ -158,4 +158,4 @@ function X(n2, e2) { export { X as a }; -//# sourceMappingURL=bib-BCofrvPu.js.map +//# sourceMappingURL=bib-1rVnZJhT.js.map diff --git a/dist/bib-BCofrvPu.js.map b/dist/bib-1rVnZJhT.js.map similarity index 99% rename from dist/bib-BCofrvPu.js.map rename to dist/bib-1rVnZJhT.js.map index 9da2796..7be4766 100644 --- a/dist/bib-BCofrvPu.js.map +++ b/dist/bib-1rVnZJhT.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-BCofrvPu.js","sources":["../node_modules/lodash-es/identity.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/_shortOut.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseSetToString.js","../node_modules/lodash-es/constant.js","../node_modules/lodash-es/_setToString.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_overRest.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/_assignMergeValue.js","../node_modules/lodash-es/_safeGet.js","../node_modules/lodash-es/_baseMerge.js","../node_modules/lodash-es/_createBaseFor.js","../node_modules/lodash-es/_baseMergeDeep.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/isArrayLikeObject.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/toPlainObject.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/merge.js","../node_modules/lodash-es/_createAssigner.js","../node_modules/lodash-es/_baseRest.js","../node_modules/lodash-es/_apply.js","../node_modules/lodash-es/_isIterateeCall.js","../src/utils/bib.js"],"sourcesContent":["/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","import { isObject, merge } from 'lodash-es'\nimport pkg from '../../package.json'\n\nexport function addToGlobalBib(prop, value) {\n const bib = globalThis.bib ?? (globalThis.bib = {})\n if (typeof bib[prop] === 'undefined') {\n if (isObject(value)) {\n bib[prop] = merge({}, bib[prop], value, { version: pkg.version })\n } else {\n bib[prop] = value\n }\n }\n}"],"names":["identity","value","func","count","lastCalled","objectCreate","Object","create","baseCreate","object","proto","isObject","prototype","result","undefined","nativeNow","Date","now","defineProperty","getNative","e","baseSetToString","string","configurable","enumerable","writable","setToString","stamp","remaining","arguments","apply","baseAssignValue","key","hasOwnProperty","assignValue","objValue","call","eq","nativeMax","Math","max","keysIn","isArrayLike","arrayLikeKeys","push","isProto","isPrototype","getPrototype","overArg","getPrototypeOf","objectTag","funcProto","Function","objectProto","funcToString","toString","objectCtorString","freeExports","exports","nodeType","freeModule","module","Buffer","root","assignMergeValue","safeGet","baseMerge","source","srcIndex","customizer","stack","iteratee","keysFunc","index","iterable","props","length","srcValue","Stack","mergeFunc","typedArray","arrayBuffer","buffer","stacked","get","newValue","isCommon","isArr","isArray","isBuff","isBuffer","isTyped","isTypedArray","isObjectLike","array","Array","slice","constructor","byteLength","Uint8Array","set","byteOffset","baseGetTag","Ctor","isArguments","isNew","isFunction","allocUnsafe","assigner","merge","start","transform","args","otherArgs","thisArg","this","baseRest","sources","guard","type","isIndex","addToGlobalBib","prop","bib","globalThis","version","pkg"],"mappings":";;;AAgBA,SAASA,EAASC,IAChB;AAAA,SAAOA;AACT;ACfA,ICakBC,GACZ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,IAAAA;AACnC,QAAM0H,KAAMC,WAAWD,QAAQC,WAAWD,MAAM,CAAA;AAAA,aACrCA,GAAID,EACT/G,MAAAA,EAASV,EACX0H,IAAAA,GAAID,EAAQb,IAAAA,EAAM,CAAE,GAAEc,GAAID,EAAAA,GAAOzH,IAAO,EAAE4H,SAASC,EAAID,QAEvDF,CAAAA,IAAAA,GAAID,EAAQzH,IAAAA;AAGlB;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]} \ No newline at end of file +{"version":3,"file":"bib-1rVnZJhT.js","sources":["../node_modules/lodash-es/identity.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/_shortOut.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseSetToString.js","../node_modules/lodash-es/constant.js","../node_modules/lodash-es/_setToString.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_overRest.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/_assignMergeValue.js","../node_modules/lodash-es/_safeGet.js","../node_modules/lodash-es/_baseMerge.js","../node_modules/lodash-es/_createBaseFor.js","../node_modules/lodash-es/_baseMergeDeep.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/isArrayLikeObject.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/toPlainObject.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/merge.js","../node_modules/lodash-es/_createAssigner.js","../node_modules/lodash-es/_baseRest.js","../node_modules/lodash-es/_apply.js","../node_modules/lodash-es/_isIterateeCall.js","../src/utils/bib.js"],"sourcesContent":["/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","import { isObject, merge } from 'lodash-es'\nimport pkg from '../../package.json'\n\nexport function addToGlobalBib(prop, value) {\n const bib = globalThis.bib ?? (globalThis.bib = {})\n if (typeof bib[prop] === 'undefined') {\n if (isObject(value)) {\n bib[prop] = merge({}, bib[prop], value, { version: pkg.version })\n } else {\n bib[prop] = value\n }\n }\n}"],"names":["identity","value","func","count","lastCalled","objectCreate","Object","create","baseCreate","object","proto","isObject","prototype","result","undefined","nativeNow","Date","now","defineProperty","getNative","e","baseSetToString","string","configurable","enumerable","writable","setToString","stamp","remaining","arguments","apply","baseAssignValue","key","hasOwnProperty","assignValue","objValue","call","eq","nativeMax","Math","max","keysIn","isArrayLike","arrayLikeKeys","push","isProto","isPrototype","getPrototype","overArg","getPrototypeOf","objectTag","funcProto","Function","objectProto","funcToString","toString","objectCtorString","freeExports","exports","nodeType","freeModule","module","Buffer","root","assignMergeValue","safeGet","baseMerge","source","srcIndex","customizer","stack","iteratee","keysFunc","index","iterable","props","length","srcValue","Stack","mergeFunc","typedArray","arrayBuffer","buffer","stacked","get","newValue","isCommon","isArr","isArray","isBuff","isBuffer","isTyped","isTypedArray","isObjectLike","array","Array","slice","constructor","byteLength","Uint8Array","set","byteOffset","baseGetTag","Ctor","isArguments","isNew","isFunction","allocUnsafe","assigner","merge","start","transform","args","otherArgs","thisArg","this","baseRest","sources","guard","type","isIndex","addToGlobalBib","prop","bib","globalThis","version","pkg"],"mappings":";;;AAgBA,SAASA,EAASC,IAChB;AAAA,SAAOA;AACT;ACfA,ICakBC,GACZC,GACAC,GDfFC,IAAeC,OAAOC,QAUtBC,IAAc,2BAChB;AAAA,WAASC,KAAW;AAAA,EAAA;AACpB,SAAO,SAASC,IACd;AAAA,QAAA,CAAKC,EAASD,EAAAA,EACZ,QAAO;AAET,QAAIL,EACF,QAAOA,EAAaK,EAAAA;AAEtBD,IAAAA,GAAOG,YAAYF;AACnB,QAAIG,KAAS,IAAIJ;AAEjB,WADAA,GAAOG,YAAYE,QACZD;AAAAA,EACX;AACA,KCtBIE,IAAYC,KAAKC,KCHjBC,IAAkB,WACpB;AAAA,MAAA;AACE,QAAIhB,KAAOiB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/bib-qo8fsCxm.cjs b/dist/bib-SERnlaT3.cjs similarity index 97% rename from dist/bib-qo8fsCxm.cjs rename to dist/bib-SERnlaT3.cjs index 322032d..e0fbd8e 100644 --- a/dist/bib-qo8fsCxm.cjs +++ b/dist/bib-SERnlaT3.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const r=require("./package-D1p4nXVA.cjs"),t=require("./isObject-D1wTAyjh.cjs"),e=require("./_Uint8Array-CtB9L6tP.cjs");function n(r){return r}var o,i,c,u=Object.create,a=function(){function r(){}return function(e){if(!t.isObject(e))return{};if(u)return u(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),f=Date.now,s=function(){try{var r=e.getNative(Object,"defineProperty");return r({},"",{}),r}catch(S){}}(),l=s?function(r,t){return s(r,"toString",{configurable:!0,enumerable:!1,value:(e=t,function(){return e}),writable:!0});var e}:n,v=(o=l,i=0,c=0,function(){var r=f(),t=16-(r-c);if(c=r,t>0){if(++i>=800)return arguments[0]}else i=0;return o.apply(void 0,arguments)});function b(r,t,e){"__proto__"==t&&s?s(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var p=Object.prototype.hasOwnProperty;function y(r,t,n){var o=r[t];p.call(r,t)&&e.eq(o,n)&&(void 0!==n||t in r)||b(r,t,n)}var d=Math.max,g=Object.prototype.hasOwnProperty;function j(r){return e.isArrayLike(r)?e.arrayLikeKeys(r,!0):function(r){if(!t.isObject(r))return function(r){var t=[];if(null!=r)for(var e in Object(r))t.push(e);return t}(r);var n=e.isPrototype(r),o=[];for(var i in r)("constructor"!=i||!n&&g.call(r,i))&&o.push(i);return o}(r)}var O=e.overArg(Object.getPrototypeOf,Object),h=Function.prototype,A=Object.prototype,w=h.toString,k=A.hasOwnProperty,m=w.call(Object),_="object"==typeof exports&&exports&&!exports.nodeType&&exports,x=_&&"object"==typeof module&&module&&!module.nodeType&&module,L=x&&x.exports===_?t.root.Buffer:void 0;function P(r,t,n){(void 0!==n&&!e.eq(r[t],n)||void 0===n&&!(t in r))&&b(r,t,n)}function T(r,t){if(("constructor"!==t||"function"!=typeof r[t])&&"__proto__"!=t)return r[t]}function q(r,n,o,i,c){r!==n&&function(r,t,e){for(var n=-1,o=Object(r),i=e(r),c=i.length;c--;){var u=i[++n];if(!1===t(o[u],u))break}}(n,(function(u,f){if(c||(c=new e.Stack),t.isObject(u))!function(r,n,o,i,c,u,f){var s,l,v,p,d,g=T(r,o),h=T(n,o),A=f.get(h);if(A)P(r,o,A);else{var _,x=u?u(g,h,o+"",r,n,f):void 0,L=void 0===x;if(L){var q=e.isArray(h),U=!q&&e.isBuffer(h),B=!q&&!U&&e.isTypedArray(h);x=h,q||U||B?e.isArray(g)?x=g:(_=g,t.isObjectLike(_)&&e.isArrayLike(_)?x=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(c=U.length>3&&"function"==typeof c?(i--,c):void 0,u&&function(r,n,o){if(!t.isObject(o))return!1;var i=typeof n;return!!("number"==i?e.isArrayLike(o)&&e.isIndex(n,o.length):"string"==i&&n in o)&&e.eq(o[n],r)}(n[0],n[1],u)&&(c=i<3?void 0:c,i=1),r=Object(r);++o0){if(++i>=800)return arguments[0]}else i=0;return o.apply(void 0,arguments)});function b(r,t,e){"__proto__"==t&&s?s(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var p=Object.prototype.hasOwnProperty;function y(r,t,n){var o=r[t];p.call(r,t)&&e.eq(o,n)&&(void 0!==n||t in r)||b(r,t,n)}var d=Math.max,g=Object.prototype.hasOwnProperty;function j(r){return e.isArrayLike(r)?e.arrayLikeKeys(r,!0):function(r){if(!t.isObject(r))return function(r){var t=[];if(null!=r)for(var e in Object(r))t.push(e);return t}(r);var n=e.isPrototype(r),o=[];for(var i in r)("constructor"!=i||!n&&g.call(r,i))&&o.push(i);return o}(r)}var O=e.overArg(Object.getPrototypeOf,Object),h=Function.prototype,A=Object.prototype,w=h.toString,k=A.hasOwnProperty,m=w.call(Object),_="object"==typeof exports&&exports&&!exports.nodeType&&exports,x=_&&"object"==typeof module&&module&&!module.nodeType&&module,L=x&&x.exports===_?t.root.Buffer:void 0;function P(r,t,n){(void 0!==n&&!e.eq(r[t],n)||void 0===n&&!(t in r))&&b(r,t,n)}function T(r,t){if(("constructor"!==t||"function"!=typeof r[t])&&"__proto__"!=t)return r[t]}function q(r,n,o,i,c){r!==n&&function(r,t,e){for(var n=-1,o=Object(r),i=e(r),c=i.length;c--;){var u=i[++n];if(!1===t(o[u],u))break}}(n,(function(u,f){if(c||(c=new e.Stack),t.isObject(u))!function(r,n,o,i,c,u,f){var s,l,v,p,d,g=T(r,o),h=T(n,o),A=f.get(h);if(A)P(r,o,A);else{var _,x=u?u(g,h,o+"",r,n,f):void 0,L=void 0===x;if(L){var q=e.isArray(h),U=!q&&e.isBuffer(h),B=!q&&!U&&e.isTypedArray(h);x=h,q||U||B?e.isArray(g)?x=g:(_=g,t.isObjectLike(_)&&e.isArrayLike(_)?x=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(c=U.length>3&&"function"==typeof c?(i--,c):void 0,u&&function(r,n,o){if(!t.isObject(o))return!1;var i=typeof n;return!!("number"==i?e.isArrayLike(o)&&e.isIndex(n,o.length):"string"==i&&n in o)&&e.eq(o[n],r)}(n[0],n[1],u)&&(c=i<3?void 0:c,i=1),r=Object(r);++o true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import { isObject, merge } from 'lodash-es'\nimport pkg from '../../package.json'\n\nexport function addToGlobalBib(prop, value) {\n const bib = globalThis.bib ?? (globalThis.bib = {})\n if (typeof bib[prop] === 'undefined') {\n if (isObject(value)) {\n bib[prop] = merge({}, bib[prop], value, { version: pkg.version })\n } else {\n bib[prop] = value\n }\n }\n}"],"names":["identity","value","func","count","lastCalled","objectCreate","Object","create","baseCreate","object","proto","isObject","prototype","result","nativeNow","Date","now","defineProperty","getNative","e","baseSetToString","string","configurable","enumerable","writable","setToString","stamp","remaining","arguments","i","apply","undefined","baseAssignValue","key","hasOwnProperty","assignValue","objValue","call","eq","nativeMax","Math","max","keysIn","isArrayLike","arrayLikeKeys","push","isProto","isPrototype","getPrototype","overArg","getPrototypeOf","funcProto","Function","objectProto","funcToString","toString","objectCtorString","freeExports","exports","nodeType","freeModule","module","Buffer","root","assignMergeValue","safeGet","baseMerge","source","srcIndex","customizer","stack","iteratee","keysFunc","index","iterable","props","length","srcValue","Stack","mergeFunc","typedArray","arrayBuffer","buffer","stacked","get","newValue","isCommon","isArr","isArray","isBuff","isBuffer","isTyped","isTypedArray","isObjectLike","array","Array","slice","constructor","byteLength","Uint8Array","set","byteOffset","baseGetTag","Ctor","isArguments","isNew","isFunction","delete","allocUnsafe","assigner","start","transform","merge","sources","guard","type","isIndex","baseRest","args","otherArgs","thisArg","this","prop","bib","globalThis","version","pkg"],"mappings":"uHAgBA,SAASA,EAASC,GACTA,OAAAA,CACT,CCfA,ICakBC,EACZC,EACAC,EDfFC,EAAeC,OAAOC,OAUtBC,EAAc,WAChB,SAASC,IAAW,CACpB,OAAO,SAASC,GACd,IAAKC,EAAAA,SAASD,SACL,GAELL,GAAAA,EACKA,OAAAA,EAAaK,GAEtBD,EAAOG,UAAYF,EACnB,IAAIG,EAAS,IAAIJ,EACjBA,OAAAA,EAAOG,eAAAA,EACAC,CACX,CACA,CAdkB,GCRdC,EAAYC,KAAKC,ICHjBC,EAAkB,WAElB,IAAA,IAAIf,EAAOgB,EAAAA,UAAUZ,OAAQ,kBAE7B,OADAJ,EAAK,CAAE,EAAE,GAAI,CAAA,GACNA,CACX,OAAWiB,GAAK,CAChB,CANsB,GCUlBC,EAAmBH,EAA4B,SAASf,EAAMmB,GACzDJ,OAAAA,EAAef,EAAM,WAAY,CACtCoB,cAAAA,EACAC,YAAAA,EACAtB,OCGcA,EDHIoB,ECIb,WACEpB,OAAAA,CACX,GDLIuB,UAAY,ICEEvB,IAAAA,CDAlB,EAPwCD,EEDpCyB,GJKcvB,EILSkB,EJMrBjB,EAAQ,EACRC,EAAa,EAEV,WACL,IAAIsB,EAAQZ,IACRa,EApBO,IAoBiBD,EAAQtB,GAEpCA,GAAAA,EAAasB,EACTC,EAAY,GACd,KAAMxB,GAzBI,IA0BR,OAAOyB,UAAU,QA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AK,IACvC,KAAK,EAAUpH,OAAAA,EAAKmC,KAAKmF,EAASF,EAAK,GAAIA,EAAK,IAChD,KAAK,EAAUpH,OAAAA,EAAKmC,KAAKmF,EAASF,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAEpDpH,OAAAA,EAAK4B,MAAM0F,EAASF,EAC7B,CARA,CvBqBiBpH,EAAMuH,KAAMF,EAC7B,GqBnBsDrH,EAAO,4BGVtD,SAAwBwH,EAAMzH,GACnC,MAAM0H,EAAMC,WAAWD,MAAQC,WAAWD,IAAM,CAAA,QACrCA,IAAAA,EAAID,KACT/G,EAAAA,SAASV,GACX0H,EAAID,GAAQV,EAAM,CAAE,EAAEW,EAAID,GAAOzH,EAAO,CAAE4H,QAASC,EAAGA,IAACD,UAEvDF,EAAID,GAAQzH,EAGlB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]} \ No newline at end of file +{"version":3,"file":"bib-SERnlaT3.cjs","sources":["../node_modules/lodash-es/identity.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/_shortOut.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseSetToString.js","../node_modules/lodash-es/constant.js","../node_modules/lodash-es/_setToString.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_overRest.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/_assignMergeValue.js","../node_modules/lodash-es/_safeGet.js","../node_modules/lodash-es/_baseMerge.js","../node_modules/lodash-es/_createBaseFor.js","../node_modules/lodash-es/_baseMergeDeep.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/toPlainObject.js","../node_modules/lodash-es/isArrayLikeObject.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/merge.js","../node_modules/lodash-es/_createAssigner.js","../node_modules/lodash-es/_baseRest.js","../node_modules/lodash-es/_isIterateeCall.js","../node_modules/lodash-es/_apply.js","../src/utils/bib.js"],"sourcesContent":["/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import { isObject, merge } from 'lodash-es'\nimport pkg from '../../package.json'\n\nexport function addToGlobalBib(prop, value) {\n const bib = globalThis.bib ?? (globalThis.bib = {})\n if (typeof bib[prop] === 'undefined') {\n if (isObject(value)) {\n bib[prop] = merge({}, bib[prop], value, { version: pkg.version })\n } else {\n bib[prop] = value\n }\n }\n}"],"names":["identity","value","func","count","lastCalled","objectCreate","Object","create","baseCreate","object","proto","isObject","prototype","result","nativeNow","Date","now","defineProperty","getNative","e","baseSetToString","string","configurable","enumerable","writable","setToString","stamp","remaining","arguments","i","apply","undefined","baseAssignValue","key","hasOwnProperty","assignValue","objValue","call","eq","nativeMax","Math","max","keysIn","isArrayLike","arrayLikeKeys","push","isProto","isPrototype","getPrototype","overArg","getPrototypeOf","funcProto","Function","objectProto","funcToString","toString","objectCtorString","freeExports","exports","nodeType","freeModule","module","Buffer","root","assignMergeValue","safeGet","baseMerge","source","srcIndex","customizer","stack","iteratee","keysFunc","index","iterable","props","length","srcValue","Stack","mergeFunc","typedArray","arrayBuffer","buffer","stacked","get","newValue","isCommon","isArr","isArray","isBuff","isBuffer","isTyped","isTypedArray","isObjectLike","array","Array","slice","constructor","byteLength","Uint8Array","set","byteOffset","baseGetTag","Ctor","isArguments","isNew","isFunction","delete","allocUnsafe","assigner","start","transform","merge","sources","guard","type","isIndex","baseRest","args","otherArgs","thisArg","this","prop","bib","globalThis","version","pkg"],"mappings":"uHAgBA,SAASA,EAASC,GACTA,OAAAA,CACT,CCfA,ICakBC,EACZC,EACAC,EDfFC,EAAeC,OAAOC,OAUtBC,EAAc,WAChB,SAASC,IAAW,CACpB,OAAO,SAASC,GACd,IAAKC,EAAAA,SAASD,SACL,GAELL,GAAAA,EACKA,OAAAA,EAAaK,GA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25,26,27,28,29,30,31,32]} \ No newline at end of file diff --git a/dist/bib-avis.cjs b/dist/bib-avis.cjs index 5da22c3..ac736c4 100644 --- a/dist/bib-avis.cjs +++ b/dist/bib-avis.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,i,s,n,r,o,a,c=Object.defineProperty,l=e=>{throw TypeError(e)},h=(e,t,i)=>((e,t,i)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),d=(e,t,i)=>t.has(e)||l("Cannot "+i),b=(e,t,i)=>(d(e,t,"read from private field"),i?i.call(e):t.get(e)),u=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),g=(e,t,i,s)=>(d(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),p=(e,t,i)=>(d(e,t,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./task-YmD7yWl1.cjs"),w=require("./lit-element-BHNMc-Kg.cjs"),f=require("./unsafe-html-Dku8oD0s.cjs"),v=require("./index-9izUO_DB.cjs"),x=require("./bib-qo8fsCxm.cjs"),y=require("./constants2.cjs");async function k(e){const t=(new TextEncoder).encode(JSON.stringify(e)),i=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(i)).map((e=>e.toString(16).padStart(2,"0"))).join("")}class E extends w.s{constructor(){super(),u(this,i),u(this,e),u(this,t),h(this,"_avisTask",new m.h(this,{task:async([e,t,i],{signal:s})=>{const n=new URL(`${t}/${i}`,e),r=await fetch(n,{headers:{Accept:"application/json"},signal:s});if(!r.ok)throw new Error(r.status);return r.json()},args:()=>[this.service,this.contexte,this.niveau]})),g(this,e,null),this.service="https://avis.bib.umontreal.ca",this.contexte="site-web-dev",this.niveau="important",this.boutonFermer=!1}connectedCallback(){super.connectedCallback(),p(this,i,s).call(this)}_renderBoutonFermer(){return this.boutonFermer?w.x``:null}render(){return b(this,e)?.message?w.x``:null}setMessage(t){g(this,e,"string"==typeof t?{message:t,isLocal:!0}:t)}}e=new WeakMap,t=new WeakMap,i=new WeakSet,s=function(){return new m.h(this,{task:async([e,t,s],{signal:r})=>{const o=new Promise((async(i,n)=>{if(""!==this.textContent.trim())return i({isLocal:!0,message:this.innerHTML.split(//).join("")});const o=new URL(`${t}/${s}`,e),a=await fetch(o,{headers:{Accept:"application/json"},signal:r});if(!a.ok)return n(new Error(a.status));const{message:c}=await a.json();i({isLocal:!1,message:c})}));try{const e=await o;await p(this,i,n).call(this,e)}catch(a){console.error("[#getAvis] An error occured: %o",a)}return data},args:()=>[this.service,this.contexte,this.niveau]})},n=async function(e){if(!e.message)return void this.setMessage(null);if(!("indexedDB"in window))return void this.setMessage(e.message);const s=g(this,t,await v.openDB(y.DB_NAME,y.DB_VERSION,{upgrade(e){e.objectStoreNames.contains(y.DB_STORE_NAME)||e.createObjectStore(y.DB_STORE_NAME)}}));try{const t=await k(e),n=await s.get(y.DB_STORE_NAME,t);n?n.hidden||(await s.delete(y.DB_STORE_NAME,t),p(this,i,r).call(this,n)):p(this,i,r).call(this,e)}catch(n){console.error("Something went wrong with indexedDB: %o",n),this.setMessage(e.message)}},r=async function(e){if(this.dispatchEvent(new CustomEvent("bib:show",{bubbles:!0,cancelable:!0}))&&(this.setMessage(e),b(this,t))){const i=await k(e);await b(this,t).put(y.DB_STORE_NAME,{...e,hidden:!1},i)}},o=async function(){if(!this.dispatchEvent(new CustomEvent("bib:hide",{bubbles:!0,cancelable:!0})))return;const i=await k(b(this,e));await b(this,t).put(y.DB_STORE_NAME,{...b(this,e),hidden:!0},i),g(this,e,null),this.requestUpdate()},a=function(){p(this,i,o).call(this)},h(E,"properties",{service:{type:String},contexte:{type:String,default:"site-web"},niveau:{type:String},boutonFermer:{type:Boolean,attribute:"bouton-fermer"},message:{state:!0}}),h(E,"styles",[w.i`${w.r(':host,*{box-sizing:border-box}:host{display:block;font-size:var(--bib-avis-size, var(--md-sys-typescale-title-medium-size, inherit));background:var(--bib-avis-container-color, var(--md-sys-color-warningContainer, #fffac6))}:host([hidden]){display:none}.inner{display:flex;align-items:center;margin:0 auto;padding:11px 19px;gap:1em}:host(:not([fluide])) .inner{max-width:1220px}.message{flex-grow:1;min-height:24px}.btn-close{display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0px;border:0px;margin:0;cursor:pointer;user-select:none;vertical-align:middle;appearance:none;text-decoration:none;text-align:center;flex:0 0 auto;font-size:1.5rem;font-size:36px;font-weight:700;line-height:1;position:relative;padding:0;border-radius:50%;overflow:visible;color:var(--bib-btn-close-color, rgba(0, 0, 0, .4));transition:color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}.btn-close:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);min-height:44px;min-width:44px;width:100%;height:100%}.btn-close:focus:not([disabled]),.btn-close:focus-visible{outline:var(--md-focus-ring-width, 3px) solid currentColor;outline-offset:3px;border-radius:99999px}.btn-close:focus:not(:focus-visible){outline:0}.btn-close:hover{color:var(--bib-btn-close-hover-color, rgba(0, 0, 0, .8))}.btn-close:hover:after{background-color:#0000000a}.btn-close:after{width:calc(100% + 16px);height:calc(100% + 16px);border-radius:50%;background-color:transparent;transition:background-color .15s cubic-bezier(.4,0,.2,1) 0ms}.btn-close>svg{fill:currentColor}')}`,w.i``]),window.customElements.get("bib-avis")||window.customElements.define("bib-avis",E),x.addToGlobalBib("avis",{}),exports.BibAvis=E; +var e,t,i,s,n,r,o,a,c=Object.defineProperty,l=e=>{throw TypeError(e)},h=(e,t,i)=>((e,t,i)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),d=(e,t,i)=>t.has(e)||l("Cannot "+i),b=(e,t,i)=>(d(e,t,"read from private field"),i?i.call(e):t.get(e)),u=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),g=(e,t,i,s)=>(d(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),p=(e,t,i)=>(d(e,t,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./task-YmD7yWl1.cjs"),w=require("./lit-element-BHNMc-Kg.cjs"),f=require("./unsafe-html-Dku8oD0s.cjs"),v=require("./index-9izUO_DB.cjs"),x=require("./bib-SERnlaT3.cjs"),y=require("./constants2.cjs");async function k(e){const t=(new TextEncoder).encode(JSON.stringify(e)),i=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(i)).map((e=>e.toString(16).padStart(2,"0"))).join("")}class E extends w.s{constructor(){super(),u(this,i),u(this,e),u(this,t),h(this,"_avisTask",new m.h(this,{task:async([e,t,i],{signal:s})=>{const n=new URL(`${t}/${i}`,e),r=await fetch(n,{headers:{Accept:"application/json"},signal:s});if(!r.ok)throw new Error(r.status);return r.json()},args:()=>[this.service,this.contexte,this.niveau]})),g(this,e,null),this.service="https://avis.bib.umontreal.ca",this.contexte="site-web-dev",this.niveau="important",this.boutonFermer=!1}connectedCallback(){super.connectedCallback(),p(this,i,s).call(this)}_renderBoutonFermer(){return this.boutonFermer?w.x``:null}render(){return b(this,e)?.message?w.x``:null}setMessage(t){g(this,e,"string"==typeof t?{message:t,isLocal:!0}:t)}}e=new WeakMap,t=new WeakMap,i=new WeakSet,s=function(){return new m.h(this,{task:async([e,t,s],{signal:r})=>{const o=new Promise((async(i,n)=>{if(""!==this.textContent.trim())return i({isLocal:!0,message:this.innerHTML.split(//).join("")});const o=new URL(`${t}/${s}`,e),a=await fetch(o,{headers:{Accept:"application/json"},signal:r});if(!a.ok)return n(new Error(a.status));const{message:c}=await a.json();i({isLocal:!1,message:c})}));try{const e=await o;await p(this,i,n).call(this,e)}catch(a){console.error("[#getAvis] An error occured: %o",a)}return data},args:()=>[this.service,this.contexte,this.niveau]})},n=async function(e){if(!e.message)return void this.setMessage(null);if(!("indexedDB"in window))return void this.setMessage(e.message);const s=g(this,t,await v.openDB(y.DB_NAME,y.DB_VERSION,{upgrade(e){e.objectStoreNames.contains(y.DB_STORE_NAME)||e.createObjectStore(y.DB_STORE_NAME)}}));try{const t=await k(e),n=await s.get(y.DB_STORE_NAME,t);n?n.hidden||(await s.delete(y.DB_STORE_NAME,t),p(this,i,r).call(this,n)):p(this,i,r).call(this,e)}catch(n){console.error("Something went wrong with indexedDB: %o",n),this.setMessage(e.message)}},r=async function(e){if(this.dispatchEvent(new CustomEvent("bib:show",{bubbles:!0,cancelable:!0}))&&(this.setMessage(e),b(this,t))){const i=await k(e);await b(this,t).put(y.DB_STORE_NAME,{...e,hidden:!1},i)}},o=async function(){if(!this.dispatchEvent(new CustomEvent("bib:hide",{bubbles:!0,cancelable:!0})))return;const i=await k(b(this,e));await b(this,t).put(y.DB_STORE_NAME,{...b(this,e),hidden:!0},i),g(this,e,null),this.requestUpdate()},a=function(){p(this,i,o).call(this)},h(E,"properties",{service:{type:String},contexte:{type:String,default:"site-web"},niveau:{type:String},boutonFermer:{type:Boolean,attribute:"bouton-fermer"},message:{state:!0}}),h(E,"styles",[w.i`${w.r(':host,*{box-sizing:border-box}:host{display:block;font-size:var(--bib-avis-size, var(--md-sys-typescale-title-medium-size, inherit));background:var(--bib-avis-container-color, var(--md-sys-color-warningContainer, #fffac6))}:host([hidden]){display:none}.inner{display:flex;align-items:center;margin:0 auto;padding:11px 19px;gap:1em}:host(:not([fluide])) .inner{max-width:1220px}.message{flex-grow:1;min-height:24px}.btn-close{display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0px;border:0px;margin:0;cursor:pointer;user-select:none;vertical-align:middle;appearance:none;text-decoration:none;text-align:center;flex:0 0 auto;font-size:1.5rem;font-size:36px;font-weight:700;line-height:1;position:relative;padding:0;border-radius:50%;overflow:visible;color:var(--bib-btn-close-color, rgba(0, 0, 0, .4));transition:color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}.btn-close:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);min-height:44px;min-width:44px;width:100%;height:100%}.btn-close:focus:not([disabled]),.btn-close:focus-visible{outline:var(--md-focus-ring-width, 3px) solid currentColor;outline-offset:3px;border-radius:99999px}.btn-close:focus:not(:focus-visible){outline:0}.btn-close:hover{color:var(--bib-btn-close-hover-color, rgba(0, 0, 0, .8))}.btn-close:hover:after{background-color:#0000000a}.btn-close:after{width:calc(100% + 16px);height:calc(100% + 16px);border-radius:50%;background-color:transparent;transition:background-color .15s cubic-bezier(.4,0,.2,1) 0ms}.btn-close>svg{fill:currentColor}')}`,w.i``]),window.customElements.get("bib-avis")||window.customElements.define("bib-avis",E),x.addToGlobalBib("avis",{}),exports.BibAvis=E; //# sourceMappingURL=bib-avis.cjs.map diff --git a/dist/bib-avis.js b/dist/bib-avis.js index 6dd4b2c..8323a04 100644 --- a/dist/bib-avis.js +++ b/dist/bib-avis.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -22,7 +22,7 @@ import { h as e } from "./task-BYUCPaT1.js"; import { s as t, i as s, r as i, x as n } from "./lit-element-Dj1nHH6C.js"; import { o } from "./unsafe-html-hzUS4Xy_.js"; import { o as r } from "./index-CRxQMTzC.js"; -import { a } from "./bib-BCofrvPu.js"; +import { a } from "./bib-1rVnZJhT.js"; import { DB_STORE_NAME as c, DB_VERSION as l, DB_NAME as d } from "./constants2.js"; async function h(e2) { const t2 = new TextEncoder().encode(JSON.stringify(e2)), s2 = await crypto.subtle.digest("SHA-256", t2); diff --git a/dist/bib-button-close.cjs b/dist/bib-button-close.cjs index d7e4932..bdce213 100644 --- a/dist/bib-button-close.cjs +++ b/dist/bib-button-close.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-button-close.js b/dist/bib-button-close.js index ccdae83..d8b239d 100644 --- a/dist/bib-button-close.js +++ b/dist/bib-button-close.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-consent-dialog.cjs b/dist/bib-consent-consent-dialog.cjs index 0138b04..0ece3f9 100644 --- a/dist/bib-consent-consent-dialog.cjs +++ b/dist/bib-consent-consent-dialog.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-consent-dialog.js b/dist/bib-consent-consent-dialog.js index c0eb805..621c97b 100644 --- a/dist/bib-consent-consent-dialog.js +++ b/dist/bib-consent-consent-dialog.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-dialog.cjs b/dist/bib-consent-dialog.cjs index 03692ee..9e735f7 100644 --- a/dist/bib-consent-dialog.cjs +++ b/dist/bib-consent-dialog.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var o,e,r,t=Object.defineProperty,n=o=>{throw TypeError(o)},s=(o,e,r)=>((o,e,r)=>e in o?t(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r)(o,"symbol"!=typeof e?e+"":e,r),i=(o,e,r)=>(((o,e,r)=>{e.has(o)||n("Cannot "+r)})(o,e,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./lit-element-BHNMc-Kg.cjs"),c=require("./ref-mxufyLY8.cjs");require("./type-KOUr406I.cjs");class d extends a.s{constructor(){var e,r,t;super(),e=this,(r=o).has(e)?n("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),this.open=!1,this.showClose=this.showClose||!1,this._dialogRef=c.e()}connectedCallback(){super.connectedCallback(),this._dialogRef.value?.addEventListener("close",(()=>this.close()))}show(){i(this,o,r).call(this)}showModal(){i(this,o,r).call(this,"modal")}close(o=!0){this.open=!1,this._dialogRef.value&&this._dialogRef.value.open&&this._dialogRef.value?.close(),o&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){return a.x`${i(this,o,e).call(this)}
`}}o=new WeakSet,e=function(){return this.showClose?a.x``:a.T},r=function(o=""){this._dialogRef.value&&!this._dialogRef.value.open&&("modal"===o?this._dialogRef.value?.showModal():this._dialogRef.value?.show(),this.open=!0)},s(d,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,reflect:!0},showClose:{type:Boolean,reflect:!0,attribute:"show-close"}}),s(d,"styles",[a.i`${a.r("@layer reset{:host,*{box-sizing:border-box}:host{-webkit-font-smoothing:antialiased}}:host{--md-sys-color-primary: rgb(64 95 144);--md-sys-color-surface-tint: rgb(64 95 144);--md-sys-color-on-primary: rgb(255 255 255);--md-sys-color-primary-container: rgb(214 227 255);--md-sys-color-on-primary-container: rgb(0 27 61);--md-sys-color-secondary: rgb(85 95 113);--md-sys-color-on-secondary: rgb(255 255 255);--md-sys-color-secondary-container: rgb(218 226 249);--md-sys-color-on-secondary-container: rgb(18 28 43);--md-sys-color-tertiary: rgb(144 74 69);--md-sys-color-on-tertiary: rgb(255 255 255);--md-sys-color-tertiary-container: rgb(255 218 214);--md-sys-color-on-tertiary-container: rgb(59 9 8);--md-sys-color-error: rgb(144 74 67);--md-sys-color-on-error: rgb(255 255 255);--md-sys-color-error-container: rgb(255 218 214);--md-sys-color-on-error-container: rgb(59 9 7);--md-sys-color-background: rgb(249 249 255);--md-sys-color-on-background: rgb(25 28 32);--md-sys-color-surface: rgb(249 249 255);--md-sys-color-on-surface: rgb(25 28 32);--md-sys-color-surface-variant: rgb(224 226 236);--md-sys-color-on-surface-variant: rgb(68 71 78);--md-sys-color-outline: rgb(116 119 127);--md-sys-color-outline-variant: rgb(196 198 207);--md-sys-color-shadow: rgb(0 0 0);--md-sys-color-scrim: rgb(0 0 0);--md-sys-color-inverse-surface: rgb(46 48 54);--md-sys-color-inverse-on-surface: rgb(240 240 247);--md-sys-color-inverse-primary: rgb(169 199 255);--md-sys-color-primary-fixed: rgb(214 227 255);--md-sys-color-on-primary-fixed: rgb(0 27 61);--md-sys-color-primary-fixed-dim: rgb(169 199 255);--md-sys-color-on-primary-fixed-variant: rgb(39 71 119);--md-sys-color-secondary-fixed: rgb(218 226 249);--md-sys-color-on-secondary-fixed: rgb(18 28 43);--md-sys-color-secondary-fixed-dim: rgb(189 199 220);--md-sys-color-on-secondary-fixed-variant: rgb(62 71 88);--md-sys-color-tertiary-fixed: rgb(255 218 214);--md-sys-color-on-tertiary-fixed: rgb(59 9 8);--md-sys-color-tertiary-fixed-dim: rgb(255 179 173);--md-sys-color-on-tertiary-fixed-variant: rgb(115 51 47);--md-sys-color-surface-dim: rgb(217 217 224);--md-sys-color-surface-bright: rgb(249 249 255);--md-sys-color-surface-container-lowest: rgb(255 255 255);--md-sys-color-surface-container-low: rgb(243 243 250);--md-sys-color-surface-container: rgb(237 237 244);--md-sys-color-surface-container-high: rgb(231 232 238);--md-sys-color-surface-container-highest: rgb(226 226 233);--md-extended-color-warning-color: rgb(100 97 22);--md-extended-color-warning-on-color: rgb(255 255 255);--md-extended-color-warning-color-container: rgb(236 230 141);--md-extended-color-warning-on-color-container: rgb(30 28 0)}@layer reset,theme,component,states;@layer reset{button{border:unset;padding:0;background:none;font:inherit;border:none}button::-moz-focus-inner{border:none}button:focus{outline:none}button:not(:disabled),button [type=button]:not(:disabled),button [type=reset]:not(:disabled),button [type=submit]:not(:disabled),button [role=button]:not(:disabled){cursor:pointer}button:disabled{pointer-events:none}}@layer reset{dialog{margin:0;padding:0;border:unset;color:inherit;background-color:#fff;inset-block:0;max-width:unset;max-height:unset}}@layer component{:host{--_consent-dialog-height: 450px;--_consent-dialog-max-height: 80%;--_consent-dialog-height-sm: auto;--_consent-content-height: 100%;--_consent-text-size: 14.62px;--_consent-text-line-height: 17.5px;--_consent-title-text-size: 18px;--_consent-title-text-line-height: 20px;font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height)}:host(.preferences-dialog){--_consent-dialog-height: 80%;--_consent-dialog-height-sm: 450px;--_consent-content-height: auto}.btn-close{position:absolute;right:15px;top:15px;z-index:10}.dialog{border-top:10px solid #0b113a;top:auto;bottom:0;color:#0b113a;background:#e5f0f8;height:var(--_consent-dialog-height);max-height:var(--_consent-dialog-max-height);text-align:left;overflow:hidden;position:fixed;width:100%;padding-top:50px;padding-bottom:10px;z-index:10000}@media screen and (min-width: 640px){.dialog{height:var(--_consent-dialog-height-sm)}}.dialog::backdrop{background-color:#00000080}.dialog-container{display:flex;height:100%;justify-content:center;overflow-y:auto}.dialog-container::-webkit-scrollbar{width:11px}.dialog-container::-webkit-scrollbar-track{border-radius:9999em}.dialog-container::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:9999em;transition:background-color 5.2s linear,height .2s ease-in-out;height:6px}.dialog-container::-webkit-scrollbar-thumb:hover{background-color:#999}.content-container{height:var(--_consent-content-height);margin:0 auto;max-width:1200px;padding:0 35px 15px;z-index:0}@media screen and (min-width: 640px){.content-container{height:auto;padding:0 50px 20px}}}")}`]),window.customElements.get("bib-consent-dialog")||window.customElements.define("bib-consent-dialog",d),exports.BibConsentDialog=d; +var o,e,r,t=Object.defineProperty,n=o=>{throw TypeError(o)},s=(o,e,r)=>((o,e,r)=>e in o?t(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r)(o,"symbol"!=typeof e?e+"":e,r),i=(o,e,r)=>(((o,e,r)=>{e.has(o)||n("Cannot "+r)})(o,e,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./lit-element-BHNMc-Kg.cjs"),d=require("./ref-mxufyLY8.cjs");class c extends a.s{constructor(){var e,r,t;super(),e=this,(r=o).has(e)?n("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),this.open=!1,this.showClose=this.showClose||!1,this._dialogRef=d.e()}connectedCallback(){super.connectedCallback(),this._dialogRef.value?.addEventListener("close",(()=>this.close()))}show(){i(this,o,r).call(this)}showModal(){i(this,o,r).call(this,"modal")}close(o=!0){this.open=!1,this._dialogRef.value&&this._dialogRef.value.open&&this._dialogRef.value?.close(),o&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){return a.x`${i(this,o,e).call(this)}
`}}o=new WeakSet,e=function(){return this.showClose?a.x``:a.T},r=function(o=""){this._dialogRef.value&&!this._dialogRef.value.open&&("modal"===o?this._dialogRef.value?.showModal():this._dialogRef.value?.show(),this.open=!0)},s(c,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,reflect:!0},showClose:{type:Boolean,reflect:!0,attribute:"show-close"}}),s(c,"styles",[a.i`${a.r("@layer reset{:host,*{box-sizing:border-box}:host{-webkit-font-smoothing:antialiased}}:host{--md-sys-color-primary: rgb(64 95 144);--md-sys-color-surface-tint: rgb(64 95 144);--md-sys-color-on-primary: rgb(255 255 255);--md-sys-color-primary-container: rgb(214 227 255);--md-sys-color-on-primary-container: rgb(0 27 61);--md-sys-color-secondary: rgb(85 95 113);--md-sys-color-on-secondary: rgb(255 255 255);--md-sys-color-secondary-container: rgb(218 226 249);--md-sys-color-on-secondary-container: rgb(18 28 43);--md-sys-color-tertiary: rgb(144 74 69);--md-sys-color-on-tertiary: rgb(255 255 255);--md-sys-color-tertiary-container: rgb(255 218 214);--md-sys-color-on-tertiary-container: rgb(59 9 8);--md-sys-color-error: rgb(144 74 67);--md-sys-color-on-error: rgb(255 255 255);--md-sys-color-error-container: rgb(255 218 214);--md-sys-color-on-error-container: rgb(59 9 7);--md-sys-color-background: rgb(249 249 255);--md-sys-color-on-background: rgb(25 28 32);--md-sys-color-surface: rgb(249 249 255);--md-sys-color-on-surface: rgb(25 28 32);--md-sys-color-surface-variant: rgb(224 226 236);--md-sys-color-on-surface-variant: rgb(68 71 78);--md-sys-color-outline: rgb(116 119 127);--md-sys-color-outline-variant: rgb(196 198 207);--md-sys-color-shadow: rgb(0 0 0);--md-sys-color-scrim: rgb(0 0 0);--md-sys-color-inverse-surface: rgb(46 48 54);--md-sys-color-inverse-on-surface: rgb(240 240 247);--md-sys-color-inverse-primary: rgb(169 199 255);--md-sys-color-primary-fixed: rgb(214 227 255);--md-sys-color-on-primary-fixed: rgb(0 27 61);--md-sys-color-primary-fixed-dim: rgb(169 199 255);--md-sys-color-on-primary-fixed-variant: rgb(39 71 119);--md-sys-color-secondary-fixed: rgb(218 226 249);--md-sys-color-on-secondary-fixed: rgb(18 28 43);--md-sys-color-secondary-fixed-dim: rgb(189 199 220);--md-sys-color-on-secondary-fixed-variant: rgb(62 71 88);--md-sys-color-tertiary-fixed: rgb(255 218 214);--md-sys-color-on-tertiary-fixed: rgb(59 9 8);--md-sys-color-tertiary-fixed-dim: rgb(255 179 173);--md-sys-color-on-tertiary-fixed-variant: rgb(115 51 47);--md-sys-color-surface-dim: rgb(217 217 224);--md-sys-color-surface-bright: rgb(249 249 255);--md-sys-color-surface-container-lowest: rgb(255 255 255);--md-sys-color-surface-container-low: rgb(243 243 250);--md-sys-color-surface-container: rgb(237 237 244);--md-sys-color-surface-container-high: rgb(231 232 238);--md-sys-color-surface-container-highest: rgb(226 226 233);--md-extended-color-warning-color: rgb(100 97 22);--md-extended-color-warning-on-color: rgb(255 255 255);--md-extended-color-warning-color-container: rgb(236 230 141);--md-extended-color-warning-on-color-container: rgb(30 28 0)}@layer reset,theme,component,states;@layer reset{button{border:unset;padding:0;background:none;font:inherit;border:none}button::-moz-focus-inner{border:none}button:focus{outline:none}button:not(:disabled),button [type=button]:not(:disabled),button [type=reset]:not(:disabled),button [type=submit]:not(:disabled),button [role=button]:not(:disabled){cursor:pointer}button:disabled{pointer-events:none}}@layer reset{dialog{margin:0;padding:0;border:unset;color:inherit;background-color:#fff;inset-block:0;max-width:unset;max-height:unset}}@layer component{:host{--_consent-dialog-height: 450px;--_consent-dialog-max-height: 80%;--_consent-dialog-height-sm: auto;--_consent-content-height: 100%;--_consent-text-size: 14.62px;--_consent-text-line-height: 17.5px;--_consent-title-text-size: 18px;--_consent-title-text-line-height: 20px;font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height)}:host(.preferences-dialog){--_consent-dialog-height: 80%;--_consent-dialog-height-sm: 450px;--_consent-content-height: auto}.btn-close{position:absolute;right:15px;top:15px;z-index:10}.dialog{border-top:10px solid #0b113a;top:auto;bottom:0;color:#0b113a;background:#e5f0f8;height:var(--_consent-dialog-height);max-height:var(--_consent-dialog-max-height);text-align:left;overflow:hidden;position:fixed;width:100%;padding-top:50px;padding-bottom:10px;z-index:10000}@media screen and (min-width: 640px){.dialog{height:var(--_consent-dialog-height-sm)}}.dialog::backdrop{background-color:#00000080}.dialog-container{display:flex;height:100%;justify-content:center;overflow-y:auto}.dialog-container::-webkit-scrollbar{width:11px}.dialog-container::-webkit-scrollbar-track{border-radius:9999em}.dialog-container::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:9999em;transition:background-color 5.2s linear,height .2s ease-in-out;height:6px}.dialog-container::-webkit-scrollbar-thumb:hover{background-color:#999}.content-container{height:var(--_consent-content-height);margin:0 auto;max-width:1200px;padding:0 35px 15px;z-index:0}@media screen and (min-width: 640px){.content-container{height:auto;padding:0 50px 20px}}}")}`]),window.customElements.get("bib-consent-dialog")||window.customElements.define("bib-consent-dialog",c),exports.BibConsentDialog=c; //# sourceMappingURL=bib-consent-dialog.cjs.map diff --git a/dist/bib-consent-dialog.cjs.map b/dist/bib-consent-dialog.cjs.map index efe1fa8..b3c223b 100644 --- a/dist/bib-consent-dialog.cjs.map +++ b/dist/bib-consent-dialog.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-dialog.cjs","sources":["../src/components/bib-consent/bib-consent-dialog.js"],"sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { DEFAULT_PREFERENCES } from './constants.js'\nimport styles from './bib-consent-dialog.scss?inline'\n\n/**\n * A custom dialog element that can be shown or hidden, with an optional close button.\n * \n * The dialog can be shown either as a modal or non-modal dialog. It dispatches a 'close' event when closed.\n * \n * @property {boolean} debug - Indicates whether the dialog is in debug mode.\n * @property {boolean} open - Indicates whether the dialog is currently open.\n * @property {boolean} showClose - Indicates whether a close button should be displayed.\n */\nexport class BibConsentDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n showClose: {\n type: Boolean,\n reflect: true,\n attribute: 'show-close'\n }\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n /**\n * Initializes the `BibConsentDialog` component.\n * \n * This constructor sets the initial state of the component, including whether the dialog is open and whether a close button should be displayed.\n * \n * The `_dialogRef` property is a reference to the dialog element, which is used to control the dialog's visibility and behavior.\n */\n constructor() {\n super()\n this.open = false\n this.showClose = this.showClose || false\n this._dialogRef = createRef()\n }\n\n /**\n * Adds an event listener to the dialog element to listen for the 'close' event, and calls the `close()` method when the dialog is closed.\n * \n * This method is called when the component is connected to the DOM, and sets up the necessary event listener to handle the dialog's closing.\n */\n connectedCallback() {\n super.connectedCallback()\n\n this._dialogRef.value?.addEventListener('close', () => this.close())\n }\n\n #showCloseButton() {\n return this.showClose ? html`\n this.close()}\" class=\"btn-close\">\n ` : nothing\n }\n\n #show(mode = '') {\n if (this._dialogRef.value && !this._dialogRef.value.open) {\n mode === 'modal' ? this._dialogRef.value?.showModal() : this._dialogRef.value?.show()\n this.open = true\n }\n }\n\n /**\n * Shows the dialog.\n * \n * This method sets the `open` property to `true` and calls the `show()` method on the dialog element to display it.\n */\n show() {\n this.#show()\n }\n\n /**\n * Shows the dialog in modal mode.\n * \n * This method sets the `open` property to `true` and calls the `showModal()` method on the dialog element to display it in modal mode.\n */\n showModal() {\n this.#show('modal')\n }\n\n /**\n * Closes the dialog and optionally dispatches a 'close' event.\n * \n * This method sets the `open` property to `false` and calls the `close()` method on the dialog element to hide it. If the `emit` parameter is `true`, it also dispatches a 'close' event that bubbles up and is composed.\n * \n * @param {boolean} [emit=true] - Whether to dispatch a 'close' event.\n */\n close(emit = true) {\n this.open = false\n if (this._dialogRef.value && this._dialogRef.value.open) {\n this._dialogRef.value?.close()\n }\n emit && this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }))\n }\n\n render() {\n return html`\n \n ${this.#showCloseButton()}\n
\n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-dialog')) {\n window.customElements.define('bib-consent-dialog', BibConsentDialog)\n}"],"names":["BibConsentDialog","LitElement","constructor","this","_r_instances","open","showClose","_dialogRef","createRef","connectedCallback","value","addEventListener","close","show","showModal","emit","dispatchEvent","CustomEvent","bubbles","composed","render","html","ref","n","WeakSet","o_fn","showCloseButton","nothing","T","e_fn","mode","static","debug","type","Boolean","reflect","attribute","css","unsafeCSS","window","customElements","get","define"],"mappings":"4bAcO,MAAMA,UAAyBC,EAAAA,EA4BpC,WAAAC,uBA5BKC,QAAAC,0GA8BEC,KAAAA,MAAAA,EACLF,KAAKG,UAAYH,KAAKG,YAAa,EACnCH,KAAKI,WAAaC,KACnB,CAOD,iBAAAC,GACQA,MAAAA,oBAENN,KAAKI,WAAWG,OAAOC,iBAAiB,SAAS,IAAMR,KAAKS,SAC7D,CAoBD,IAAAC,GACEV,EAAAA,KAAKU,EAALV,GAAAA,KAAAA,KACD,CAOD,SAAAW,GACEX,EAAAA,UAAAA,KAAWA,KAAA,QACZ,CASD,KAAAS,CAAMG,MACCV,KAAAA,QACDF,KAAKI,WAAWG,OAASP,KAAKI,WAAWG,MAAML,MACjDF,KAAKI,WAAWG,OAAOE,QAEzBG,GAAQZ,KAAKa,cAAc,IAAIC,YAAY,QAAS,CAAEC,WAAeC,UAAAA,IACtE,CAED,MAAAC,GACSC,OAAAA,GACoBC,0BAAAA,EAAGC,EAACpB,KAAKI,eAC9BJ,YAAAA,KAQPA,sGAAA,EAvGIC,EAAA,IAAAoB,QA8CLC,EAAAC,WACSvB,OAAAA,KAAKG,UAAYe,EAAAA,CAAAA,6BACQ,IAAMlB,KAAKS,iDACnCe,EAAOC,CAChB,EAEDC,EAAAhB,SAAMiB,EAAO,IACFvB,KAAAA,WAAWG,QAAUP,KAAKI,WAAWG,MAAML,OACzC,UAATyB,EAAmB3B,KAAKI,WAAWG,OAAOI,YAAcX,KAAKI,WAAWG,OAAOG,OAC/EV,KAAKE,MAAAA,EAER,EAxDD0B,EADW/B,EACX+B,aAAoB,CAClBC,MAAO,CACLC,KAAMC,QACNC,YAEF9B,KAAM,CACJ4B,KAAMC,QACNC,YAEF7B,UAAW,CACT2B,KAAMC,QACNC,WACAC,UAAW,gBAIfL,EAjBW/B,EAiBK,SAAA,CACdqC,EAAAA,IAAMC,EAAAA,ssJAwFLC,OAAOC,eAAeC,IAAI,uBAC7BF,OAAOC,eAAeE,OAAO,qBAAsB1C"} \ No newline at end of file +{"version":3,"file":"bib-consent-dialog.cjs","sources":["../src/components/bib-consent/bib-consent-dialog.js"],"sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport styles from './bib-consent-dialog.scss?inline'\n\n/**\n * A custom dialog element that can be shown or hidden, with an optional close button.\n * \n * The dialog can be shown either as a modal or non-modal dialog. It dispatches a 'close' event when closed.\n * \n * @property {boolean} debug - Indicates whether the dialog is in debug mode.\n * @property {boolean} open - Indicates whether the dialog is currently open.\n * @property {boolean} showClose - Indicates whether a close button should be displayed.\n */\nexport class BibConsentDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n showClose: {\n type: Boolean,\n reflect: true,\n attribute: 'show-close'\n }\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n /**\n * Initializes the `BibConsentDialog` component.\n * \n * This constructor sets the initial state of the component, including whether the dialog is open and whether a close button should be displayed.\n * \n * The `_dialogRef` property is a reference to the dialog element, which is used to control the dialog's visibility and behavior.\n */\n constructor() {\n super()\n this.open = false\n this.showClose = this.showClose || false\n this._dialogRef = createRef()\n }\n\n /**\n * Adds an event listener to the dialog element to listen for the 'close' event, and calls the `close()` method when the dialog is closed.\n * \n * This method is called when the component is connected to the DOM, and sets up the necessary event listener to handle the dialog's closing.\n */\n connectedCallback() {\n super.connectedCallback()\n\n this._dialogRef.value?.addEventListener('close', () => this.close())\n }\n\n #showCloseButton() {\n return this.showClose ? html`\n this.close()}\" class=\"btn-close\">\n ` : nothing\n }\n\n #show(mode = '') {\n if (this._dialogRef.value && !this._dialogRef.value.open) {\n mode === 'modal' ? this._dialogRef.value?.showModal() : this._dialogRef.value?.show()\n this.open = true\n }\n }\n\n /**\n * Shows the dialog.\n * \n * This method sets the `open` property to `true` and calls the `show()` method on the dialog element to display it.\n */\n show() {\n this.#show()\n }\n\n /**\n * Shows the dialog in modal mode.\n * \n * This method sets the `open` property to `true` and calls the `showModal()` method on the dialog element to display it in modal mode.\n */\n showModal() {\n this.#show('modal')\n }\n\n /**\n * Closes the dialog and optionally dispatches a 'close' event.\n * \n * This method sets the `open` property to `false` and calls the `close()` method on the dialog element to hide it. If the `emit` parameter is `true`, it also dispatches a 'close' event that bubbles up and is composed.\n * \n * @param {boolean} [emit=true] - Whether to dispatch a 'close' event.\n */\n close(emit = true) {\n this.open = false\n if (this._dialogRef.value && this._dialogRef.value.open) {\n this._dialogRef.value?.close()\n }\n emit && this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }))\n }\n\n render() {\n return html`\n \n ${this.#showCloseButton()}\n
\n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-dialog')) {\n window.customElements.define('bib-consent-dialog', BibConsentDialog)\n}"],"names":["BibConsentDialog","LitElement","constructor","this","_r_instances","open","showClose","_dialogRef","createRef","connectedCallback","value","addEventListener","close","show","showModal","emit","dispatchEvent","CustomEvent","bubbles","composed","render","html","ref","n","WeakSet","o_fn","showCloseButton","nothing","T","e_fn","mode","static","debug","type","Boolean","reflect","attribute","css","unsafeCSS","window","customElements","get","define"],"mappings":"6ZAaO,MAAMA,UAAyBC,EAAAA,EA4BpC,WAAAC,aAEEC,UA9BGA,QAAAC,0GA8BEC,KAAAA,QACLF,KAAKG,UAAYH,KAAKG,YAAAA,EACtBH,KAAKI,WAAaC,KACnB,CAOD,iBAAAC,GACQA,MAAAA,oBAENN,KAAKI,WAAWG,OAAOC,iBAAiB,SAAS,IAAMR,KAAKS,SAC7D,CAoBD,IAAAC,GACEV,EAAAA,OAAAA,GAAAA,KAAAA,KACD,CAOD,SAAAW,GACEX,EAAAA,KAAAA,KAAAA,KAAWA,KAAA,QACZ,CASD,KAAAS,CAAMG,GAAAA,GACCV,KAAAA,MAAAA,EACDF,KAAKI,WAAWG,OAASP,KAAKI,WAAWG,MAAML,MACjDF,KAAKI,WAAWG,OAAOE,QAEzBG,GAAQZ,KAAKa,cAAc,IAAIC,YAAY,QAAS,CAAEC,SAAAA,EAAeC,UAAU,IAChF,CAED,MAAAC,GACSC,OAAAA,GACoBC,0BAAAA,EAAGC,EAACpB,KAAKI,eAC9BJ,YAAAA,KAQPA,sGAAA,EAvGIC,EAAA,IAAAoB,QA8CLC,EAAAC,WACSvB,OAAAA,KAAKG,UAAYe,EAAAA,CAAAA,6BACQ,IAAMlB,KAAKS,iDACnCe,EAAOC,CAChB,EAEDC,EAAAhB,SAAMiB,EAAO,IACFvB,KAAAA,WAAWG,QAAUP,KAAKI,WAAWG,MAAML,OACzC,UAATyB,EAAmB3B,KAAKI,WAAWG,OAAOI,YAAcX,KAAKI,WAAWG,OAAOG,OAC/EV,KAAKE,MAAO,EAEf,EAxDD0B,EADW/B,eACS,CAClBgC,MAAO,CACLC,KAAMC,QACNC,SAAS,GAEX9B,KAAM,CACJ4B,KAAMC,QACNC,SAAS,GAEX7B,UAAW,CACT2B,KAAMC,QACNC,SAAS,EACTC,UAAW,gBAIfL,EAjBW/B,EAiBX+B,SAAgB,CACdM,EAAAA,IAAMC,EAAAA,ssJAwFLC,OAAOC,eAAeC,IAAI,uBAC7BF,OAAOC,eAAeE,OAAO,qBAAsB1C"} \ No newline at end of file diff --git a/dist/bib-consent-dialog.js b/dist/bib-consent-dialog.js index 3f02b67..5989333 100644 --- a/dist/bib-consent-dialog.js +++ b/dist/bib-consent-dialog.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -18,7 +18,6 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce var _a_instances, o_fn, e_fn; import { s as o, i as e, r, x as t, T as s } from "./lit-element-Dj1nHH6C.js"; import { e as n, n as i } from "./ref-B-kqFHPy.js"; -import "./type-BPiIb9Kq.js"; class a extends o { constructor() { super(); diff --git a/dist/bib-consent-dialog.js.map b/dist/bib-consent-dialog.js.map index 447f6ba..e357f09 100644 --- a/dist/bib-consent-dialog.js.map +++ b/dist/bib-consent-dialog.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-dialog.js","sources":["../src/components/bib-consent/bib-consent-dialog.js"],"sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { DEFAULT_PREFERENCES } from './constants.js'\nimport styles from './bib-consent-dialog.scss?inline'\n\n/**\n * A custom dialog element that can be shown or hidden, with an optional close button.\n * \n * The dialog can be shown either as a modal or non-modal dialog. It dispatches a 'close' event when closed.\n * \n * @property {boolean} debug - Indicates whether the dialog is in debug mode.\n * @property {boolean} open - Indicates whether the dialog is currently open.\n * @property {boolean} showClose - Indicates whether a close button should be displayed.\n */\nexport class BibConsentDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n showClose: {\n type: Boolean,\n reflect: true,\n attribute: 'show-close'\n }\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n /**\n * Initializes the `BibConsentDialog` component.\n * \n * This constructor sets the initial state of the component, including whether the dialog is open and whether a close button should be displayed.\n * \n * The `_dialogRef` property is a reference to the dialog element, which is used to control the dialog's visibility and behavior.\n */\n constructor() {\n super()\n this.open = false\n this.showClose = this.showClose || false\n this._dialogRef = createRef()\n }\n\n /**\n * Adds an event listener to the dialog element to listen for the 'close' event, and calls the `close()` method when the dialog is closed.\n * \n * This method is called when the component is connected to the DOM, and sets up the necessary event listener to handle the dialog's closing.\n */\n connectedCallback() {\n super.connectedCallback()\n\n this._dialogRef.value?.addEventListener('close', () => this.close())\n }\n\n #showCloseButton() {\n return this.showClose ? html`\n this.close()}\" class=\"btn-close\">\n ` : nothing\n }\n\n #show(mode = '') {\n if (this._dialogRef.value && !this._dialogRef.value.open) {\n mode === 'modal' ? this._dialogRef.value?.showModal() : this._dialogRef.value?.show()\n this.open = true\n }\n }\n\n /**\n * Shows the dialog.\n * \n * This method sets the `open` property to `true` and calls the `show()` method on the dialog element to display it.\n */\n show() {\n this.#show()\n }\n\n /**\n * Shows the dialog in modal mode.\n * \n * This method sets the `open` property to `true` and calls the `showModal()` method on the dialog element to display it in modal mode.\n */\n showModal() {\n this.#show('modal')\n }\n\n /**\n * Closes the dialog and optionally dispatches a 'close' event.\n * \n * This method sets the `open` property to `false` and calls the `close()` method on the dialog element to hide it. If the `emit` parameter is `true`, it also dispatches a 'close' event that bubbles up and is composed.\n * \n * @param {boolean} [emit=true] - Whether to dispatch a 'close' event.\n */\n close(emit = true) {\n this.open = false\n if (this._dialogRef.value && this._dialogRef.value.open) {\n this._dialogRef.value?.close()\n }\n emit && this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }))\n }\n\n render() {\n return html`\n \n ${this.#showCloseButton()}\n
\n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-dialog')) {\n window.customElements.define('bib-consent-dialog', BibConsentDialog)\n}"],"names":["BibConsentDialog","LitElement","static","constructor","super","this","open","showClose","_dialogRef","createRef","connectedCallback","value","addEventListener","close","emit","dispatchEvent","CustomEvent","bubbles","composed","html","ref","showCloseButton","window","nothing","show","mode","showModal","debug","type","Boolean","reflect","attribute","css","unsafeCSS","customElements","get","define"],"mappings":";;;;;;;;;;;;;AAcO,MAAMA,UAAyBC,EACpCC;AAAAA,EA2BA,cAAAC;AACEC;AA7BG;AA8BHC,SAAKC,OAAAA,OACLD,KAAKE,YAAYF,KAAKE,aAAAA,OACtBF,KAAKG,aAAaC,EACnB;AAAA,EAAA;AAAA,EAOD,oBACEL;AAAAA,UAAMM,qBAENL,KAAKG,WAAWG,OAAOC,iBAAiB,SAAS,MAAMP,KAAKQ,MAC7D,CAAA;AAAA,EAAA;AAAA,EAoBD,OACER;AAAAA,0BAAAA,oBAAAA;AAAAA,EACD;AAAA,EAOD,YACEA;AAAAA,0BAAAA,oBAAAA,WAAW;AAAA,EACZ;AAAA,EASD,MAAMS,WACJT;AAAAA,SAAKC,cACDD,KAAKG,WAAWG,SAASN,KAAKG,WAAWG,MAAML,QACjDD,KAAKG,WAAWG,OAAOE,MAAAA,GAEzBC,MAAQT,KAAKU,cAAc,IAAIC,YAAY,SAAS,EAAEC,SAAAA,MAAeC,UAAU,KAAA,CAAA,CAAA;AAAA,EAChF;AAAA,EAED;AACE,WAAOC,2BACoBC,EAAIf,KAAKG,eAC9BH,sBAAKgB,oBAALhB,UAAKgB;AAAAA,EAQZ;AAGEC;AA1GE;AA8CL,OAAAD,WACE;AAAA,SAAOhB,KAAKE,YAAYY,8BACQ,MAAMd,KAAKQ,MACnCU,CAAAA,4CAAAA;AACT;AAED,OAAAC,SAAMC,KAAO,IAAA;AACPpB,OAAKG,WAAWG,SAAAA,CAAUN,KAAKG,WAAWG,MAAML,SACzC,YAATmB,KAAmBpB,KAAKG,WAAWG,OAAOe,UAAAA,IAAcrB,KAAKG,WAAWG,OAAOa,QAC/EnB,KAAKC,OAAAA;AAER;AAxDDJ,cADWF,GACXE,cAAoB,EAClByB,OAAO,EACLC,MAAMC,SACNC,SAAAA,KAEFxB,GAAAA,MAAM,EACJsB,MAAMC,SACNC,SAAS,KAAA,GAEXvB,WAAW,EACTqB,MAAMC,SACNC,SAAAA,MACAC,WAAW,aAAA,EAAA;AAIf7B,cAjBWF,aAiBK,CACdgC,IAAMC;AAwFLX,OAAOY,eAAeC,IAAI,oBAAA,KAC7Bb,OAAOY,eAAeE,OAAO,sBAAsBpC;"} \ No newline at end of file +{"version":3,"file":"bib-consent-dialog.js","sources":["../src/components/bib-consent/bib-consent-dialog.js"],"sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport styles from './bib-consent-dialog.scss?inline'\n\n/**\n * A custom dialog element that can be shown or hidden, with an optional close button.\n * \n * The dialog can be shown either as a modal or non-modal dialog. It dispatches a 'close' event when closed.\n * \n * @property {boolean} debug - Indicates whether the dialog is in debug mode.\n * @property {boolean} open - Indicates whether the dialog is currently open.\n * @property {boolean} showClose - Indicates whether a close button should be displayed.\n */\nexport class BibConsentDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n showClose: {\n type: Boolean,\n reflect: true,\n attribute: 'show-close'\n }\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n /**\n * Initializes the `BibConsentDialog` component.\n * \n * This constructor sets the initial state of the component, including whether the dialog is open and whether a close button should be displayed.\n * \n * The `_dialogRef` property is a reference to the dialog element, which is used to control the dialog's visibility and behavior.\n */\n constructor() {\n super()\n this.open = false\n this.showClose = this.showClose || false\n this._dialogRef = createRef()\n }\n\n /**\n * Adds an event listener to the dialog element to listen for the 'close' event, and calls the `close()` method when the dialog is closed.\n * \n * This method is called when the component is connected to the DOM, and sets up the necessary event listener to handle the dialog's closing.\n */\n connectedCallback() {\n super.connectedCallback()\n\n this._dialogRef.value?.addEventListener('close', () => this.close())\n }\n\n #showCloseButton() {\n return this.showClose ? html`\n this.close()}\" class=\"btn-close\">\n ` : nothing\n }\n\n #show(mode = '') {\n if (this._dialogRef.value && !this._dialogRef.value.open) {\n mode === 'modal' ? this._dialogRef.value?.showModal() : this._dialogRef.value?.show()\n this.open = true\n }\n }\n\n /**\n * Shows the dialog.\n * \n * This method sets the `open` property to `true` and calls the `show()` method on the dialog element to display it.\n */\n show() {\n this.#show()\n }\n\n /**\n * Shows the dialog in modal mode.\n * \n * This method sets the `open` property to `true` and calls the `showModal()` method on the dialog element to display it in modal mode.\n */\n showModal() {\n this.#show('modal')\n }\n\n /**\n * Closes the dialog and optionally dispatches a 'close' event.\n * \n * This method sets the `open` property to `false` and calls the `close()` method on the dialog element to hide it. If the `emit` parameter is `true`, it also dispatches a 'close' event that bubbles up and is composed.\n * \n * @param {boolean} [emit=true] - Whether to dispatch a 'close' event.\n */\n close(emit = true) {\n this.open = false\n if (this._dialogRef.value && this._dialogRef.value.open) {\n this._dialogRef.value?.close()\n }\n emit && this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }))\n }\n\n render() {\n return html`\n \n ${this.#showCloseButton()}\n
\n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-dialog')) {\n window.customElements.define('bib-consent-dialog', BibConsentDialog)\n}"],"names":["BibConsentDialog","LitElement","super","this","open","showClose","_dialogRef","createRef","connectedCallback","value","addEventListener","close","show","emit","dispatchEvent","CustomEvent","bubbles","composed","render","html","ref","showCloseButton","window","nothing","mode","showModal","static","debug","type","Boolean","reflect","attribute","css","unsafeCSS","customElements","get","define"],"mappings":";;;;;;;;;;;;AAaO,MAAMA,UAAyBC;EA4BpC,cACEC;AAAAA,UAAAA;AA7BG;AA8BHC,SAAKC,OAAO,OACZD,KAAKE,YAAYF,KAAKE,aAAa,OACnCF,KAAKG,aAAaC;EACnB;AAAA,EAOD;AACEL,UAAMM,kBAAAA,GAENL,KAAKG,WAAWG,OAAOC,iBAAiB,SAAS,MAAMP,KAAKQ,MAAAA,CAAAA;AAAAA,EAC7D;AAAA,EAoBD;AACER,0BAAKS,oBAALT;AAAAA,EACD;AAAA,EAOD;AACEA,0BAAKS,oBAALT,WAAW;AAAA,EACZ;AAAA,EASD,MAAMU,KAAAA;AACJV,SAAKC,OAAAA,OACDD,KAAKG,WAAWG,SAASN,KAAKG,WAAWG,MAAML,QACjDD,KAAKG,WAAWG,OAAOE,MAEzBE,GAAAA,MAAQV,KAAKW,cAAc,IAAIC,YAAY,SAAS,EAAEC,SAAS,MAAMC,eACtE,CAAA,CAAA;AAAA,EAAA;AAAA,EAED,SAAAC;AACE,WAAOC,2BACoBC,EAAIjB,KAAKG,eAC9BH,sBAAKkB,oBAALlB,UAAKkB;AAAAA,EAQZ;AAGEC;AA1GE;AA8CL,OAAAD;AACE,SAAOlB,KAAKE,YAAYc,8BACQ,MAAMhB,KAAKQ,mDACnCY;AACT;AAED,OAAAX,SAAMY,KAAO,IACPrB;AAAAA,OAAKG,WAAWG,SAAUN,CAAAA,KAAKG,WAAWG,MAAML,SACzC,YAAToB,KAAmBrB,KAAKG,WAAWG,OAAOgB,UAActB,IAAAA,KAAKG,WAAWG,OAAOG,KAAAA,GAC/ET,KAAKC,OAAO;AAEf;AAxDDsB,cADW1B,GACS,cAAA,EAClB2B,OAAO,EACLC,MAAMC,SACNC,SAAS,KAAA,GAEX1B,MAAM,EACJwB,MAAMC,SACNC,SAAAA,KAEFzB,GAAAA,WAAW,EACTuB,MAAMC,SACNC,SAAS,MACTC,WAAW,aAIfL,EAAAA;AAAAA,cAjBW1B,GAiBX0B,UAAgB,CACdM,IAAMC,gsJAUR,CAAA,EAAA;AA8EGX,OAAOY,eAAeC,IAAI,oBAAA,KAC7Bb,OAAOY,eAAeE,OAAO,sBAAsBpC;"} \ No newline at end of file diff --git a/dist/bib-consent-preferences-btn.cjs b/dist/bib-consent-preferences-btn.cjs index 8202f78..e3ac171 100644 --- a/dist/bib-consent-preferences-btn.cjs +++ b/dist/bib-consent-preferences-btn.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-preferences-btn.js b/dist/bib-consent-preferences-btn.js index 7573ec9..441d1c2 100644 --- a/dist/bib-consent-preferences-btn.js +++ b/dist/bib-consent-preferences-btn.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-preferences-dialog-B10xxOhz.cjs b/dist/bib-consent-preferences-dialog-DTcmaEoj.cjs similarity index 99% rename from dist/bib-consent-preferences-dialog-B10xxOhz.cjs rename to dist/bib-consent-preferences-dialog-DTcmaEoj.cjs index b526457..1a562db 100644 --- a/dist/bib-consent-preferences-dialog-B10xxOhz.cjs +++ b/dist/bib-consent-preferences-dialog-DTcmaEoj.cjs @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,i,s,n,o,a,r=Object.defineProperty,c=e=>{throw TypeError(e)},l=(e,t,i)=>((e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),d=(e,t,i)=>t.has(e)||c("Cannot "+i),p=(e,t,i)=>(d(e,t,"read from private field"),i?i.call(e):t.get(e)),u=(e,t,i)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),h=(e,t,i)=>(d(e,t,"access private method"),i);const m=require("./lit-element-BHNMc-Kg.cjs"),g=require("./ref-mxufyLY8.cjs"),b=require("./consent-context.cjs"),v=require("./ConsentTokens.cjs"),f=require("./constants-PQ5SQuv-.cjs"); +var e,t,i,s,n,o,a,r=Object.defineProperty,c=e=>{throw TypeError(e)},l=(e,t,i)=>((e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),d=(e,t,i)=>t.has(e)||c("Cannot "+i),p=(e,t,i)=>(d(e,t,"read from private field"),i?i.call(e):t.get(e)),u=(e,t,i)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),h=(e,t,i)=>(d(e,t,"access private method"),i);const m=require("./lit-element-BHNMc-Kg.cjs"),g=require("./ref-mxufyLY8.cjs"),b=require("./consent-context.cjs"),v=require("./ConsentTokens.cjs"),f=require("./constants-BvP9XHhn.cjs"); /** * @license * Copyright 2021 Google LLC @@ -17,4 +17,4 @@ var e,t,i,s,n,o,a,r=Object.defineProperty,c=e=>{throw TypeError(e)},l=(e,t,i)=>( * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class w{constructor(e,t,i,s){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,void 0!==t.context){const e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=i,this.subscribe=s??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new x(this.context,this.t,this.subscribe))}}const y="checked",k="disabled",_=class s extends HTMLElement{constructor(){super(),l(this,"toggle",(()=>{this.disabled||(this.checked=!this.checked)})),u(this,e,(e=>{switch(e.key){case" ":case"Enter":e.preventDefault(),this.toggle()}})),u(this,t,((e=!1)=>{var t;this.setAttribute("aria-checked",this.checked.toString()),e&&this.dispatchEvent((t=this.checked,new CustomEvent("toggle-switch:change",{detail:{checked:t}})))})),u(this,i,(()=>{const e=this.shadowRoot??this.attachShadow({mode:"open"}),t=document.createElement("style");t.innerHTML=s.css;const i=document.createElement("template");return i.innerHTML=s.html,e.appendChild(t),e.appendChild(i.content),e})),p(this,i).call(this)}static get observedAttributes(){return[y]}get checked(){return this.hasAttribute(y)}set checked(e){this.toggleAttribute(y,e)}get disabled(){return this.hasAttribute(k)}set disabled(e){this.toggleAttribute(k,e)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","switch"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),p(this,t).call(this,!1),this.addEventListener("click",this.toggle),this.addEventListener("keydown",p(this,e))}disconnectedCallback(){this.removeEventListener("click",this.toggle),this.removeEventListener("keydown",p(this,e))}attributeChangedCallback(e){e===y&&p(this,t).call(this,!0)}};e=new WeakMap,t=new WeakMap,i=new WeakMap,l(_,"defaultElementName","toggle-switch"),l(_,"html",'\n \n \n \n '),l(_,"css",'\n :host {\n display: inline-block;\n width: 2em;\n height: 1em;\n cursor: pointer;\n }\n\n span {\n box-sizing: border-box;\n display: inline-block;\n line-height: 1;\n }\n\n [part="track"] {\n width: 100%;\n height: 100%;\n background-color: #dddddd;\n text-align: left;\n transition: all 0.256s;\n }\n\n [part="slider"] {\n width: 50%;\n height: 100%;\n background-color: #777777;\n transition: all 0.256s;\n vertical-align: text-top;\n }\n\n :host([checked]) [part="slider"] {\n transform: translateX(100%);\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: 0.5;\n }\n '),l(_,"formAssociated",!0);let z=_;window.customElements.get(z.defaultElementName)||window.customElements.define(z.defaultElementName,z);class E extends m.s{constructor(){var e,t,i,o;super(),u(this,n),l(this,"_consentConsumer"),u(this,s),this.open=!1,this._dialogRef=g.e(),e=this,t=s,i=new v.ConsentTokens(!1),d(e,t,"write to private field"),o?o.call(e,i):t.set(e,i),this._consentConsumer=new w(this,{context:b.consentContext,subscribe:!0,callback:e=>{try{const t=v.ConsentTokens.from(e);if(t.state()===f.CONSENT_STATES.INDETERMINATE)return void p(this,s).setAll(!1);p(this,s).setAll(t)}catch(t){throw console.error("[BibConsentPreferencesDialog] error: ",t),t}}})}async savePreferences(e){try{void 0!==e&&p(this,s).setAll(e),this.dispatchEvent(new CustomEvent("update",{detail:p(this,s)}))}catch(t){throw console.error("[savePreferences] error: ",t),t}}show(){const e=this._consentConsumer.value?.state()===f.CONSENT_STATES.DETERMINATE&&this._consentConsumer.value;console.log("tokens",e),p(this,s).setAll(e),this._dialogRef.value?.showModal()}close(e=!0){this._dialogRef.value?.close(e)}render(){return m.x`
Personnaliser les témoins

Les témoins (aussi appelés « cookies ») sont de petits fichiers textes qui sont téléchargés lorsque vous consultez certaines pages d’un site et qui sont enregistrés dans la mémoire de l’appareil que vous utilisez. Ils permettent d’enregistrer certaines informations (type de navigateur, langue, pays, adresse IP, identifiant, etc.) afin d’être récupérées par le serveur lors de visites subséquentes. Ils sont utilisés pour mettre à jour et optimiser nos plateformes en fonction de l’utilisation que vous en faites et de vos besoins.

L’UdeM collecte des données sur les plateformes, afin d’analyser leur utilisation et d’améliorer l’expérience des visiteurs.

L’UdeM utilise également les services de Google Analytics, afin d'analyser le trafic Web et de recueillir des données de navigation à des fins statistiques et d’amélioration des Plateformes.

Parce que nous respectons votre droit à la vie privée, nous vous donnons la possibilité de ne pas autoriser certains types de témoins. Cliquez sur les différentes catégories pour obtenir plus de détails sur chacune d’entre elles et modifier les paramètres par défaut. Toutefois, si vous désactivez certains types de témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

Témoins nécessaires + -
Toujours activés

Ces témoins sont essentiels au bon fonctionnement et à la sécurité de nos sites Web et services en ligne. Ils ne peuvent pas être désactivés. Ils nous permettent notamment de sécuriser votre connexion en recueillant vos informations d’identification, personnaliser votre interface (ex. : choix de langue) et conserver vos préférences.

Les renseignements suivants sont notamment recueillis :

  • le type et la version du navigateur;
  • le type et la version du système d’exploitation;
  • le type et le modèle d’appareil (téléphone, tablette ou ordinateur);
  • la résolution de l’écran de l’appareil que vous utilisez;
  • la langue utilisée par le navigateur.
Témoins de performance
+ -

Ces témoins sont utilisés pour analyser la navigation sur nos sites (provenance des visiteurs, fréquence des visites, pages plus ou moins visitées, etc.) dans le but d’en améliorer le fonctionnement et d’offrir une meilleure expérience utilisateurs aux visiteurs. Toutes les informations collectées par ces témoins sont agrégées et donc anonymisées.

Témoins de fonctionnalité + -

Ces témoins permettent d’améliorer les fonctionnalités et la personnalisation de nos sites. Par exemple, ils rendent possible l’utilisation de vidéos et de services de messagerie instantanée ou encore le partage de contenus de nos sites sur des plateformes de médias sociaux. Si vous désactivez ces témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

Témoins publicitaires+-

Ces témoins peuvent être activés sur nos sites web pour établir des profils sur vos intérêts. Ils nous aident à vous proposer des publicités et des contenus personnalisés. Si vous désactivez ces témoins, des publicités et des contenus moins ciblées sur vos intérêts vous seront proposés.

Vous pouvez modifier en tout temps vos préférences en sélectionnant les paramètres appropriés dans votre navigateur pour accepter ou refuser les témoins.

`}}s=new WeakMap,n=new WeakSet,o=function(e){e.composedPath().some((e=>e.matches?.("toggle-switch.switch")))&&e.preventDefault()},a=function(e){const{target:t,detail:i}=e,{checked:n}=i,o=t.getAttribute("name");p(this,s)[o]=n},l(E,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,state:!0}}),l(E,"styles",[m.i`${m.r("@layer reset{:host,*{box-sizing:border-box}:host{-webkit-font-smoothing:antialiased}}@layer theme{a{text-decoration:underline;text-underline-offset:2px;color:inherit}}@layer component{p{font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height)}.title{font-size:var(--_consent-title-text-size);line-height:var(--_consent-title-text-line-height);padding-bottom:12.5px}.learn-more-container{margin:20px 0 0}@media screen and (min-width: 640px){.learn-more-container{margin:14px 0 0;padding-bottom:5px}}p{font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height);padding-bottom:20px}@media screen and (min-width: 640px){p{padding-bottom:5px}}.actions-container{display:flex;justify-content:center;margin:0 auto;flex-direction:column}@media screen and (min-width: 640px){.actions-container{flex-direction:row;justify-content:normal;margin:0}}@media screen and (min-width: 640px){.confirm-selection{margin-left:0}}.update-information{margin-top:20px}details>summary{list-style:none}details>summary::-webkit-details-marker{display:none}.toggle-container{display:inline-block;position:absolute;right:15px;top:15px}.toggle-container.label{color:#0b113a;font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height);right:10px;text-align:right;text-wrap:wrap;top:4px;white-space:normal;width:70px}@media screen and (min-width: 480px){.toggle-container.label{right:15px;top:15px;width:auto}}.toggle-container:focus{box-shadow:0 0 0 var(--toggle-ring-width, 3px) var(--toggle-ring-color, rgba(16, 185, 129, .188));outline:none}.toggle{align-items:center;border:var(--toggle-border, .125rem) solid;border-radius:999px;box-sizing:content-box;cursor:pointer;display:flex;font-size:var(--toggle-font-size, .75rem);height:var(--toggle-height, 1.25rem);line-height:1;position:relative;transition:all .3s;width:var(--toggle-width, 3rem)}.toggle-on{background:var(--toggle-bg-on, #52b782);border-color:var(--toggle-border-on, #52b782);color:var(--toggle-text-on, #fff);justify-content:flex-start}.toggle-off{background:var(--toggle-bg-off, #e5e7eb);border-color:var(--toggle-border-off, #e5e7eb);color:var(--toggle-text-off, #374151);justify-content:flex-end}.toggle-on-disabled{background:var(--toggle-bg-on-disabled, #d1d5db);border-color:var(--toggle-border-on-disabled, #d1d5db);color:var(--toggle-text-on-disabled, #9ca3af);cursor:not-allowed;justify-content:flex-start}.toggle-off-disabled{background:var(--toggle-bg-off-disabled, #e5e7eb);border-color:var(--toggle-border-off-disabled, #e5e7eb);color:var(--toggle-text-off-disabled, #9ca3af);cursor:not-allowed;justify-content:flex-end}.toggle-handle{background:var(--toggle-handle-enabled, #fff);border-radius:50%;display:inline-block;height:var(--toggle-height, 1.25rem);position:absolute;top:0;transition-duration:var(--toggle-duration, .15s);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--toggle-height, 1.25rem)}.toggle-handle-on{left:100%;transform:translate(-100%)}.toggle-handle-off{left:0}.toggle-handle-on-disabled{background:var(--toggle-handle-disabled, #f3f4f6);left:100%;transform:translate(-100%)}.toggle-handle-off-disabled{background:var(--toggle-handle-disabled, #f3f4f6);left:0}.toggle-label{box-sizing:border-box;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:calc(var(--toggle-width, 3.25rem) - var(--toggle-height, 1.25rem))}}@layer component{sp-switch{--mod-switch-height: 40px;--highcontrast-switch-background-color: silver;--mod-switch-control-height: 18px}}.btn--outlined,.btn--filled{font-size:var(--_consent-text-size);line-height:var(--_consent-text-line-height);display:flex;justify-content:center;font-weight:500;margin:7.5px auto 0;padding:5px 15px;width:200px}@media screen and (min-width: 640px){.btn--outlined,.btn--filled{float:left;margin:7.5px 0 0 7.5px;width:auto}}.btn--outlined span,.btn--filled span{color:#0057ac;padding-left:6.25px}@layer component{.btn--filled{background-color:#0b113a;color:#fff}.btn--outlined{background-color:transparent;border:1px solid #0057ac;color:#0b113a}@media screen and (min-width: 640px){.btn--outlined{margin-left:0}}}@layer component{.accordion-container{margin:0 auto;width:100%}.accordion-container .close{color:#0057ac;font-size:22.5px;font-weight:400;line-height:27px;opacity:1;padding-right:8.75px}.accordion-container .open{color:#0057ac;font-size:39px;font-weight:300;line-height:20px;opacity:1;padding-right:8.75px}.accordion-container .list-title{padding-top:10px}.accordion-container ul li{font-size:var(--_consent-text-size);list-style-type:disc;margin:10px 0 0 15px}.accordion-container ul li::marker{color:#0057ac}.accordion-list{width:100%}.accordion-list .accordion-item{margin:0 0 -1px;--content-height: 0px;overflow:hidden;transition:height .3s ease-in-out;border:1px solid #9e9e9e}.accordion-list .accordion-item>.accordion-item__summary{padding:12px 60px 12px 12px;cursor:pointer;display:flex;font-weight:700;line-height:24px;transition:color .3s ease-in-out;position:relative}.accordion-list .accordion-item>.accordion-item__summary .accordion-item__summary-title{order:2;padding-top:2px}.accordion-list .accordion-item.accordion-item--open>.accordion-item__summary .accordion-item__summary-icon span.close,.accordion-list .accordion-item>.accordion-item__summary .accordion-item__summary-icon span.open{display:none}.accordion-list .accordion-item.accordion-item--open>.accordion-item__summary .accordion-item__summary-icon span.open{display:block}.accordion-list .accordion-item>.accordion-item__summary>.accordion-item__summary-icon{transition:transform .3s ease-in-out}.accordion-list .accordion-item>.accordion-item__summary>.accordion-item__summary-icon span{text-shadow:none}.accordion-list .accordion-item--open{height:calc(var(--summary-height) + var(--content-height) + 51px)}.accordion-list .accordion-item--disabled>.accordion-item__summary{cursor:default}.accordion-list .accordion-item>.accordion-item__content{border-top:none;padding:0;margin:0 25px 0 35px}}.switch{--switch-handle-color: #fff;--switch-handle-shape: 9999px;--switch-track-color: #9397b0;--switch-track-shape: 9999px;--switch-selected-handle-color: #fff;--switch-selected-track-color: #10b981;font-size:1.2em;height:1.2em}.switch::part(slider){border-radius:var(--switch-track-shape);background-color:var(--switch-handle-color);box-shadow:.0625em .0625em .125em #00000040;transition:all .3s cubic-bezier(.175,.885,.32,1.275)}.switch[checked]::part(slider){background-color:var(--switch-selected-handle-color);transition:all .3s cubic-bezier(.175,.885,.32,1.275)}.switch::part(track){padding:.125em;border-radius:var(--switch-handle-shape);background-color:var(--switch-track-color)}.switch[checked]::part(track){background-color:var(--switch-selected-track-color)}@layer reset,theme,component,states;@layer reset{button{border:unset;padding:0;background:none;font:inherit;border:none}button::-moz-focus-inner{border:none}button:focus{outline:none}button:not(:disabled),button [type=button]:not(:disabled),button [type=reset]:not(:disabled),button [type=submit]:not(:disabled),button [role=button]:not(:disabled){cursor:pointer}button:disabled{pointer-events:none}}@layer reset{dialog{margin:0;padding:0;border:unset;color:inherit;background-color:#fff;inset-block:0;max-width:unset;max-height:unset}}@layer reset{details summary{cursor:pointer}details summary>*{display:inline}}@layer reset{p{margin:0}}@layer component{.dialog-container--preferences{position:fixed;bottom:0;height:400px;display:block;width:100%}.personalized-cookies-description p{padding:0 15px 20px 0}.btn-consent{width:100%}@media screen and (min-width: 640px){.btn-consent{width:auto}}.actions-container{margin-top:20px}}")}`]),window.customElements.get("bib-consent-preferences-dialog")||window.customElements.define("bib-consent-preferences-dialog",E),exports.BibConsentPreferencesDialog=E,exports.s=x,exports.s$1=w; -//# sourceMappingURL=bib-consent-preferences-dialog-B10xxOhz.cjs.map +//# sourceMappingURL=bib-consent-preferences-dialog-DTcmaEoj.cjs.map diff --git a/dist/bib-consent-preferences-dialog-B10xxOhz.cjs.map b/dist/bib-consent-preferences-dialog-DTcmaEoj.cjs.map similarity index 99% rename from dist/bib-consent-preferences-dialog-B10xxOhz.cjs.map rename to dist/bib-consent-preferences-dialog-DTcmaEoj.cjs.map index a94877c..cd0d5ad 100644 --- a/dist/bib-consent-preferences-dialog-B10xxOhz.cjs.map +++ b/dist/bib-consent-preferences-dialog-DTcmaEoj.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-preferences-dialog-B10xxOhz.cjs","sources":["../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@auroratide/toggle-switch/lib/events.js","../node_modules/@auroratide/toggle-switch/lib/toggle-switch.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../src/components/bib-consent/bib-consent-preferences-dialog.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.callback=t,this.subscribe=e??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","export const CHANGED = 'toggle-switch:change';\nexport const changeEvent = (checked) => new CustomEvent(CHANGED, {\n detail: { checked }\n});\n","import { changeEvent } from './events.js';\nconst CHECKED_ATTR = 'checked';\nconst DISABLED_ATTR = 'disabled';\nexport class ToggleSwitchElement extends HTMLElement {\n static defaultElementName = 'toggle-switch';\n static html = `\n \n \n \n `;\n static css = `\n :host {\n display: inline-block;\n width: 2em;\n height: 1em;\n cursor: pointer;\n }\n\n span {\n box-sizing: border-box;\n display: inline-block;\n line-height: 1;\n }\n\n [part=\"track\"] {\n width: 100%;\n height: 100%;\n background-color: #dddddd;\n text-align: left;\n transition: all 0.256s;\n }\n\n [part=\"slider\"] {\n width: 50%;\n height: 100%;\n background-color: #777777;\n transition: all 0.256s;\n vertical-align: text-top;\n }\n\n :host([checked]) [part=\"slider\"] {\n transform: translateX(100%);\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: 0.5;\n }\n `;\n static formAssociated = true;\n static get observedAttributes() {\n return [CHECKED_ATTR];\n }\n constructor() {\n super();\n this.#createRoot();\n }\n get checked() { return this.hasAttribute(CHECKED_ATTR); }\n set checked(value) { this.toggleAttribute(CHECKED_ATTR, value); }\n get disabled() { return this.hasAttribute(DISABLED_ATTR); }\n set disabled(value) { this.toggleAttribute(DISABLED_ATTR, value); }\n toggle = () => {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n };\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'switch');\n }\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n this.#updateChecked(false);\n this.addEventListener('click', this.toggle);\n this.addEventListener('keydown', this.#onKeyDown);\n }\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n this.removeEventListener('keydown', this.#onKeyDown);\n }\n attributeChangedCallback(name) {\n if (name === CHECKED_ATTR) {\n this.#updateChecked(true);\n }\n }\n #onKeyDown = (e) => {\n switch (e.key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.toggle();\n break;\n default:\n break;\n }\n };\n #updateChecked = (dispatch = false) => {\n this.setAttribute('aria-checked', this.checked.toString());\n if (dispatch)\n this.dispatchEvent(changeEvent(this.checked));\n };\n #createRoot = () => {\n const root = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n const style = document.createElement('style');\n style.innerHTML = ToggleSwitchElement.css;\n const template = document.createElement('template');\n template.innerHTML = ToggleSwitchElement.html;\n root.appendChild(style);\n root.appendChild(template.content);\n return root;\n };\n}\n","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport { DEFAULT_PREFERENCES, CONSENT_STATES } from './constants.js'\nimport styles from './bib-consent-preferences-dialog.scss?inline'\n\n/**\n * Generates an object with the default consent preferences, where each key is set to the provided boolean value.\n *\n * @param {boolean} value - The boolean value to set for each consent preference.\n * @returns {Object} An object with the default consent preferences, where each key is set to the provided value.\n */\nfunction getConsentValues(value) {\n return Object.keys(DEFAULT_PREFERENCES).reduce((obj, key) => ({ ...obj, [key]: value }), {})\n}\n\nexport class BibConsentPreferencesDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n state: true\n },\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n _consentConsumer\n #toggleChoices\n\n /**\n * Constructs a new `BibConsentPreferencesDialog` instance.\n *\n * This constructor initializes the component's state, creates a reference to the dialog element, and subscribes to the consent context to retrieve the user's consent preferences.\n *\n * The `open` property is initially set to `false`, and the `#toggleChoices` property is initialized based on the consent context value. If the consent context value is `null`, `#toggleChoices` is set to the default consent preferences.\n */\n constructor() {\n super()\n this.open = false\n this._dialogRef = createRef()\n this.#toggleChoices = new ConsentTokens(false)\n this._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: tokens => {\n try {\n\n const consentTokens = ConsentTokens.from(tokens)\n\n if (consentTokens.state() === CONSENT_STATES.INDETERMINATE) {\n this.#toggleChoices.setAll(false)\n return\n }\n\n this.#toggleChoices.setAll(consentTokens)\n } catch (error) {\n console.error('[BibConsentPreferencesDialog] error: ', error)\n throw error\n }\n }\n })\n }\n\n /**\n * Saves the user's consent preferences.\n *\n * @param {boolean|Object} preference - The consent preferences to save. If a boolean is provided, it will be used to generate a full set of consent values. If an object is provided, it will be used directly as the consent preferences.\n * @returns {void}\n * @throws {Error} If there is an error saving the preferences.\n */\n async savePreferences(preference) {\n try {\n if (typeof preference !== 'undefined') {\n this.#toggleChoices.setAll(preference)\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: this.#toggleChoices }))\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Shows the consent preferences dialog.\n *\n * This method retrieves the user's consent preferences from the consent context and initializes the `#toggleChoices` property with the values. It then shows the dialog modal.\n *\n * @returns {void}\n */\n show() {\n const tokens = this._consentConsumer.value?.state() === CONSENT_STATES.DETERMINATE ? this._consentConsumer.value : false\n\n console.log('tokens', tokens)\n\n this.#toggleChoices.setAll(tokens)\n\n this._dialogRef.value?.showModal()\n }\n\n /**\n * Closes the dialog and optionally emits an event.\n *\n * @param {boolean} [emit=true] - Whether to emit the 'close' event when the dialog is closed.\n * @returns {void}\n */\n close(emit = true) {\n this._dialogRef.value?.close(emit)\n }\n\n #onDetailsClick(event) {\n // Prevent the
element to open if user clics on the toggle button\n if (event.composedPath().some(node => node.matches?.('toggle-switch.switch'))) {\n event.preventDefault()\n }\n }\n\n #onToggleSwitchChange(event) {\n const { target, detail } = event\n const { checked } = detail\n const name = target.getAttribute('name')\n this.#toggleChoices[name] = checked\n }\n\n render() {\n\n return html`\n \n
\n
Personnaliser les témoins
\n
\n

Les témoins (aussi appelés « cookies ») sont de petits fichiers textes qui sont téléchargés lorsque vous consultez certaines pages d’un site et qui sont enregistrés dans la mémoire de l’appareil que vous utilisez. Ils permettent d’enregistrer certaines informations (type de navigateur, langue, pays, adresse IP, identifiant, etc.) afin d’être récupérées par le serveur lors de visites subséquentes. Ils sont utilisés pour mettre à jour et optimiser nos plateformes en fonction de l’utilisation que vous en faites et de vos besoins.

\n

L’UdeM collecte des données sur les plateformes, afin d’analyser leur utilisation et d’améliorer l’expérience des visiteurs.

\n

L’UdeM utilise également les services de Google Analytics, afin d'analyser le trafic Web et de recueillir des données de navigation à des fins statistiques et d’amélioration des Plateformes.

\n

Parce que nous respectons votre droit à la vie privée, nous vous donnons la possibilité de ne pas autoriser certains types de témoins. Cliquez sur les différentes catégories pour obtenir plus de détails sur chacune d’entre elles et modifier les paramètres par défaut. Toutefois, si vous désactivez certains types de témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n
\n \n Témoins nécessaires\n \n +\n -\n
Toujours activés
\n
\n
\n
\n

Ces témoins sont essentiels au bon fonctionnement et à la sécurité de nos sites Web et services en ligne. Ils ne peuvent pas être désactivés. Ils nous permettent notamment de sécuriser votre connexion en recueillant vos informations d’identification, personnaliser votre interface (ex. : choix de langue) et conserver vos préférences.

\n

Les renseignements suivants sont notamment recueillis :

\n
    \n
  • le type et la version du navigateur;
  • \n
  • le type et la version du système d’exploitation;
  • \n
  • le type et le modèle d’appareil (téléphone, tablette ou ordinateur);
  • \n
  • la résolution de l’écran de l’appareil que vous utilisez;
  • \n
  • la langue utilisée par le navigateur.
  • \n
\n
\n
\n\n
\n \n
Témoins de performance
\n
\n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins sont utilisés pour analyser la navigation sur nos sites (provenance des visiteurs, fréquence des visites, pages plus ou moins visitées, etc.) dans le but d’en améliorer le fonctionnement et d’offrir une meilleure expérience utilisateurs aux visiteurs. Toutes les informations collectées par ces témoins sont agrégées et donc anonymisées.

\n
\n
\n\n
\n \n Témoins de fonctionnalité\n \n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins permettent d’améliorer les fonctionnalités et la personnalisation de nos sites. Par exemple, ils rendent possible l’utilisation de vidéos et de services de messagerie instantanée ou encore le partage de contenus de nos sites sur des plateformes de médias sociaux. Si vous désactivez ces témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n Témoins publicitaires+-\n
\n \n
\n
\n
\n

Ces témoins peuvent être activés sur nos sites web pour établir des profils sur vos intérêts. Ils nous aident à vous proposer des publicités et des contenus personnalisés. Si vous désactivez ces témoins, des publicités et des contenus moins ciblées sur vos intérêts vous seront proposés.

\n
\n
\n
\n

Vous pouvez modifier en tout temps vos préférences en sélectionnant les paramètres appropriés dans votre navigateur pour accepter ou refuser les témoins.

\n
\n \n \n \n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-preferences-dialog')) {\n window.customElements.define('bib-consent-preferences-dialog', BibConsentPreferencesDialog)\n}"],"names":["Event","constructor","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","hostConnected","dispatchRequest","hostDisconnected","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","toggle","disabled","checked","onKeyDown","key","preventDefault","__privateAdd","_t","dispatch","setAttribute","toString","CustomEvent","detail","createRoot","root","shadowRoot","attachShadow","mode","style","document","createElement","innerHTML","css","template","html","appendChild","content","observedAttributes","hasAttribute","toggleAttribute","connectedCallback","addEventListener","disconnectedCallback","removeEventListener","attributeChangedCallback","name","updateChecked","static","_l","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_d_instances","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ConsentTokens","ContextConsumer","consentContext","tokens","consentTokens","from","state","CONSENT_STATES","INDETERMINATE","setAll","error","console","savePreferences","preference","show","DETERMINATE","log","showModal","close","emit","render","ref","handleEvent","onDetailsClick","capture","analytics_consent","functionality_consent","ad_consent","o_fn","WeakSet","n_fn","event","composedPath","some","node","matches","onToggleSwitchChange","target","getAttribute","debug","type","Boolean","reflect","unsafeCSS"],"mappings":";;;;;SAKA,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XrB,EAZWO,WAYK,CACdtB,EAAAA,IAAMyE,EAAAA,smPA+LLxD,OAAOC,eAAeC,IAAI,mCAC7BF,OAAOC,eAAeG,OAAO,iCAAkCC","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file +{"version":3,"file":"bib-consent-preferences-dialog-DTcmaEoj.cjs","sources":["../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@auroratide/toggle-switch/lib/events.js","../node_modules/@auroratide/toggle-switch/lib/toggle-switch.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../src/components/bib-consent/bib-consent-preferences-dialog.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.callback=t,this.subscribe=e??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","export const CHANGED = 'toggle-switch:change';\nexport const changeEvent = (checked) => new CustomEvent(CHANGED, {\n detail: { checked }\n});\n","import { changeEvent } from './events.js';\nconst CHECKED_ATTR = 'checked';\nconst DISABLED_ATTR = 'disabled';\nexport class ToggleSwitchElement extends HTMLElement {\n static defaultElementName = 'toggle-switch';\n static html = `\n \n \n \n `;\n static css = `\n :host {\n display: inline-block;\n width: 2em;\n height: 1em;\n cursor: pointer;\n }\n\n span {\n box-sizing: border-box;\n display: inline-block;\n line-height: 1;\n }\n\n [part=\"track\"] {\n width: 100%;\n height: 100%;\n background-color: #dddddd;\n text-align: left;\n transition: all 0.256s;\n }\n\n [part=\"slider\"] {\n width: 50%;\n height: 100%;\n background-color: #777777;\n transition: all 0.256s;\n vertical-align: text-top;\n }\n\n :host([checked]) [part=\"slider\"] {\n transform: translateX(100%);\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: 0.5;\n }\n `;\n static formAssociated = true;\n static get observedAttributes() {\n return [CHECKED_ATTR];\n }\n constructor() {\n super();\n this.#createRoot();\n }\n get checked() { return this.hasAttribute(CHECKED_ATTR); }\n set checked(value) { this.toggleAttribute(CHECKED_ATTR, value); }\n get disabled() { return this.hasAttribute(DISABLED_ATTR); }\n set disabled(value) { this.toggleAttribute(DISABLED_ATTR, value); }\n toggle = () => {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n };\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'switch');\n }\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n this.#updateChecked(false);\n this.addEventListener('click', this.toggle);\n this.addEventListener('keydown', this.#onKeyDown);\n }\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n this.removeEventListener('keydown', this.#onKeyDown);\n }\n attributeChangedCallback(name) {\n if (name === CHECKED_ATTR) {\n this.#updateChecked(true);\n }\n }\n #onKeyDown = (e) => {\n switch (e.key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.toggle();\n break;\n default:\n break;\n }\n };\n #updateChecked = (dispatch = false) => {\n this.setAttribute('aria-checked', this.checked.toString());\n if (dispatch)\n this.dispatchEvent(changeEvent(this.checked));\n };\n #createRoot = () => {\n const root = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n const style = document.createElement('style');\n style.innerHTML = ToggleSwitchElement.css;\n const template = document.createElement('template');\n template.innerHTML = ToggleSwitchElement.html;\n root.appendChild(style);\n root.appendChild(template.content);\n return root;\n };\n}\n","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport { DEFAULT_PREFERENCES, CONSENT_STATES } from './constants.js'\nimport styles from './bib-consent-preferences-dialog.scss?inline'\n\n/**\n * Generates an object with the default consent preferences, where each key is set to the provided boolean value.\n *\n * @param {boolean} value - The boolean value to set for each consent preference.\n * @returns {Object} An object with the default consent preferences, where each key is set to the provided value.\n */\nfunction getConsentValues(value) {\n return Object.keys(DEFAULT_PREFERENCES).reduce((obj, key) => ({ ...obj, [key]: value }), {})\n}\n\nexport class BibConsentPreferencesDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n state: true\n },\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n _consentConsumer\n #toggleChoices\n\n /**\n * Constructs a new `BibConsentPreferencesDialog` instance.\n *\n * This constructor initializes the component's state, creates a reference to the dialog element, and subscribes to the consent context to retrieve the user's consent preferences.\n *\n * The `open` property is initially set to `false`, and the `#toggleChoices` property is initialized based on the consent context value. If the consent context value is `null`, `#toggleChoices` is set to the default consent preferences.\n */\n constructor() {\n super()\n this.open = false\n this._dialogRef = createRef()\n this.#toggleChoices = new ConsentTokens(false)\n this._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: tokens => {\n try {\n\n const consentTokens = ConsentTokens.from(tokens)\n\n if (consentTokens.state() === CONSENT_STATES.INDETERMINATE) {\n this.#toggleChoices.setAll(false)\n return\n }\n\n this.#toggleChoices.setAll(consentTokens)\n } catch (error) {\n console.error('[BibConsentPreferencesDialog] error: ', error)\n throw error\n }\n }\n })\n }\n\n /**\n * Saves the user's consent preferences.\n *\n * @param {boolean|Object} preference - The consent preferences to save. If a boolean is provided, it will be used to generate a full set of consent values. If an object is provided, it will be used directly as the consent preferences.\n * @returns {void}\n * @throws {Error} If there is an error saving the preferences.\n */\n async savePreferences(preference) {\n try {\n if (typeof preference !== 'undefined') {\n this.#toggleChoices.setAll(preference)\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: this.#toggleChoices }))\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Shows the consent preferences dialog.\n *\n * This method retrieves the user's consent preferences from the consent context and initializes the `#toggleChoices` property with the values. It then shows the dialog modal.\n *\n * @returns {void}\n */\n show() {\n const tokens = this._consentConsumer.value?.state() === CONSENT_STATES.DETERMINATE ? this._consentConsumer.value : false\n\n console.log('tokens', tokens)\n\n this.#toggleChoices.setAll(tokens)\n\n this._dialogRef.value?.showModal()\n }\n\n /**\n * Closes the dialog and optionally emits an event.\n *\n * @param {boolean} [emit=true] - Whether to emit the 'close' event when the dialog is closed.\n * @returns {void}\n */\n close(emit = true) {\n this._dialogRef.value?.close(emit)\n }\n\n #onDetailsClick(event) {\n // Prevent the
element to open if user clics on the toggle button\n if (event.composedPath().some(node => node.matches?.('toggle-switch.switch'))) {\n event.preventDefault()\n }\n }\n\n #onToggleSwitchChange(event) {\n const { target, detail } = event\n const { checked } = detail\n const name = target.getAttribute('name')\n this.#toggleChoices[name] = checked\n }\n\n render() {\n\n return html`\n \n
\n
Personnaliser les témoins
\n
\n

Les témoins (aussi appelés « cookies ») sont de petits fichiers textes qui sont téléchargés lorsque vous consultez certaines pages d’un site et qui sont enregistrés dans la mémoire de l’appareil que vous utilisez. Ils permettent d’enregistrer certaines informations (type de navigateur, langue, pays, adresse IP, identifiant, etc.) afin d’être récupérées par le serveur lors de visites subséquentes. Ils sont utilisés pour mettre à jour et optimiser nos plateformes en fonction de l’utilisation que vous en faites et de vos besoins.

\n

L’UdeM collecte des données sur les plateformes, afin d’analyser leur utilisation et d’améliorer l’expérience des visiteurs.

\n

L’UdeM utilise également les services de Google Analytics, afin d'analyser le trafic Web et de recueillir des données de navigation à des fins statistiques et d’amélioration des Plateformes.

\n

Parce que nous respectons votre droit à la vie privée, nous vous donnons la possibilité de ne pas autoriser certains types de témoins. Cliquez sur les différentes catégories pour obtenir plus de détails sur chacune d’entre elles et modifier les paramètres par défaut. Toutefois, si vous désactivez certains types de témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n
\n \n Témoins nécessaires\n \n +\n -\n
Toujours activés
\n
\n
\n
\n

Ces témoins sont essentiels au bon fonctionnement et à la sécurité de nos sites Web et services en ligne. Ils ne peuvent pas être désactivés. Ils nous permettent notamment de sécuriser votre connexion en recueillant vos informations d’identification, personnaliser votre interface (ex. : choix de langue) et conserver vos préférences.

\n

Les renseignements suivants sont notamment recueillis :

\n
    \n
  • le type et la version du navigateur;
  • \n
  • le type et la version du système d’exploitation;
  • \n
  • le type et le modèle d’appareil (téléphone, tablette ou ordinateur);
  • \n
  • la résolution de l’écran de l’appareil que vous utilisez;
  • \n
  • la langue utilisée par le navigateur.
  • \n
\n
\n
\n\n
\n \n
Témoins de performance
\n
\n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins sont utilisés pour analyser la navigation sur nos sites (provenance des visiteurs, fréquence des visites, pages plus ou moins visitées, etc.) dans le but d’en améliorer le fonctionnement et d’offrir une meilleure expérience utilisateurs aux visiteurs. Toutes les informations collectées par ces témoins sont agrégées et donc anonymisées.

\n
\n
\n\n
\n \n Témoins de fonctionnalité\n \n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins permettent d’améliorer les fonctionnalités et la personnalisation de nos sites. Par exemple, ils rendent possible l’utilisation de vidéos et de services de messagerie instantanée ou encore le partage de contenus de nos sites sur des plateformes de médias sociaux. Si vous désactivez ces témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n Témoins publicitaires+-\n
\n \n
\n
\n
\n

Ces témoins peuvent être activés sur nos sites web pour établir des profils sur vos intérêts. Ils nous aident à vous proposer des publicités et des contenus personnalisés. Si vous désactivez ces témoins, des publicités et des contenus moins ciblées sur vos intérêts vous seront proposés.

\n
\n
\n
\n

Vous pouvez modifier en tout temps vos préférences en sélectionnant les paramètres appropriés dans votre navigateur pour accepter ou refuser les témoins.

\n
\n \n \n \n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-preferences-dialog')) {\n window.customElements.define('bib-consent-preferences-dialog', BibConsentPreferencesDialog)\n}"],"names":["Event","constructor","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","hostConnected","dispatchRequest","hostDisconnected","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","toggle","disabled","checked","onKeyDown","key","preventDefault","__privateAdd","_t","dispatch","setAttribute","toString","CustomEvent","detail","createRoot","root","shadowRoot","attachShadow","mode","style","document","createElement","innerHTML","css","template","html","appendChild","content","observedAttributes","hasAttribute","toggleAttribute","connectedCallback","addEventListener","disconnectedCallback","removeEventListener","attributeChangedCallback","name","updateChecked","static","_l","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_d_instances","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ConsentTokens","ContextConsumer","consentContext","tokens","consentTokens","from","state","CONSENT_STATES","INDETERMINATE","setAll","error","console","savePreferences","preference","show","DETERMINATE","log","showModal","close","emit","render","ref","handleEvent","onDetailsClick","capture","analytics_consent","functionality_consent","ad_consent","o_fn","WeakSet","n_fn","event","composedPath","some","node","matches","onToggleSwitchChange","target","getAttribute","debug","type","Boolean","reflect","unsafeCSS"],"mappings":";;;;;SAKA,cAAgBA,MAAM,WAAAC,CAAYC,EAAEC,EAAEC,GAAGC,MAAM,kBAAkB,CAACC,SAAAA,EAAWC,UAAS,IAAKC,KAAKC,QAAQP,EAAEM,KAAKE,SAASP,EAAEK,KAAKG,UAAUP,IAAAA,CAAK;;;;;GCA3I,MAAMF,EAAE,WAAAD,CAAYE,EAAED,EAAEU,EAAEC,GAAG,GAAGL,KAAKG,WAAU,EAAGH,KAAKM,UAAAA,EAAYN,KAAKO,WAAAA,EAAaP,KAAKL,EAAE,CAACA,EAAED,KAAKM,KAAKQ,cAAcR,KAAKQ,cAAcd,IAAIM,KAAKM,UAAS,EAAGN,KAAKQ,eAAeR,KAAKG,WAAWH,KAAKQ,eAAeR,KAAKO,MAAMZ,EAAEK,KAAKS,KAAKC,gBAAgBV,KAAKM,WAAWN,KAAKG,YAAYH,KAAKM,UAAS,EAAGN,KAAKE,UAAUF,KAAKE,SAASP,EAAED,IAAIM,KAAKQ,YAAYd,CAAAA,EAAGM,KAAKS,KAAKd,OAAE,IAASD,EAAEO,QAAQ,CAAC,MAAMN,EAAED,EAAOO,KAAAA,QAAQN,EAAEM,QAAQD,KAAKE,SAASP,EAAEO,SAASF,KAAKG,UAAUR,EAAEQ,YAAW,CAAE,WAAWF,QAAQP,EAAEM,KAAKE,SAASE,EAAEJ,KAAKG,UAAUE,IAAAA,EAAWI,KAAAA,KAAKE,cAAcX,KAAK,CAAC,aAAAY,GAAgBZ,KAAKa,iBAAiB,CAAC,gBAAAC,GAAmBd,KAAKQ,cAAcR,KAAKQ,cAAcR,KAAKQ,iBAAAA,EAAmB,CAAC,eAAAK,GAAuBJ,KAAAA,KAAKM,cAAc,IAAIpB,EAAEK,KAAKC,QAAQD,K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AAOC,aAAa,QAC5B1C,EAAAA,KAAAA,GAAeb,GAAQjC,CAC7B,EA7GDmC,EADWO,EACS,aAAA,CAClB+C,MAAO,CACLC,KAAMC,QACNC,SAAAA,GAEF7C,KAAM,CACJ2C,KAAMC,QACNnC,OAAO,KAIXrB,EAZWO,WAYK,CACdtB,EAAAA,IAAMyE,EAAAA,smPA+LLxD,OAAOC,eAAeC,IAAI,mCAC7BF,OAAOC,eAAeG,OAAO,iCAAkCC","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file diff --git a/dist/bib-consent-preferences-dialog-ByH_MjP-.js b/dist/bib-consent-preferences-dialog-Dlk44SVl.js similarity index 99% rename from dist/bib-consent-preferences-dialog-ByH_MjP-.js rename to dist/bib-consent-preferences-dialog-Dlk44SVl.js index 2f6b7f4..825b6da 100644 --- a/dist/bib-consent-preferences-dialog-ByH_MjP-.js +++ b/dist/bib-consent-preferences-dialog-Dlk44SVl.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -22,7 +22,7 @@ import { s as e, i as t, r as i, x as s } from "./lit-element-Dj1nHH6C.js"; import { e as o, n } from "./ref-B-kqFHPy.js"; import { consentContext as a } from "./consent-context.js"; import { ConsentTokens as r } from "./ConsentTokens.js"; -import { C as c } from "./constants-B2WJQGFq.js"; +import { C as c } from "./constants-D0hS4kJm.js"; /** * @license * Copyright 2021 Google LLC @@ -169,4 +169,4 @@ export { d as a, l as s }; -//# sourceMappingURL=bib-consent-preferences-dialog-ByH_MjP-.js.map +//# sourceMappingURL=bib-consent-preferences-dialog-Dlk44SVl.js.map diff --git a/dist/bib-consent-preferences-dialog-ByH_MjP-.js.map b/dist/bib-consent-preferences-dialog-Dlk44SVl.js.map similarity index 99% rename from dist/bib-consent-preferences-dialog-ByH_MjP-.js.map rename to dist/bib-consent-preferences-dialog-Dlk44SVl.js.map index 1a66c2b..d253102 100644 --- a/dist/bib-consent-preferences-dialog-ByH_MjP-.js.map +++ b/dist/bib-consent-preferences-dialog-Dlk44SVl.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-preferences-dialog-ByH_MjP-.js","sources":["../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@auroratide/toggle-switch/lib/events.js","../node_modules/@auroratide/toggle-switch/lib/toggle-switch.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../src/components/bib-consent/bib-consent-preferences-dialog.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.callback=t,this.subscribe=e??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","export const CHANGED = 'toggle-switch:change';\nexport const changeEvent = (checked) => new CustomEvent(CHANGED, {\n detail: { checked }\n});\n","import { changeEvent } from './events.js';\nconst CHECKED_ATTR = 'checked';\nconst DISABLED_ATTR = 'disabled';\nexport class ToggleSwitchElement extends HTMLElement {\n static defaultElementName = 'toggle-switch';\n static html = `\n \n \n \n `;\n static css = `\n :host {\n display: inline-block;\n width: 2em;\n height: 1em;\n cursor: pointer;\n }\n\n span {\n box-sizing: border-box;\n display: inline-block;\n line-height: 1;\n }\n\n [part=\"track\"] {\n width: 100%;\n height: 100%;\n background-color: #dddddd;\n text-align: left;\n transition: all 0.256s;\n }\n\n [part=\"slider\"] {\n width: 50%;\n height: 100%;\n background-color: #777777;\n transition: all 0.256s;\n vertical-align: text-top;\n }\n\n :host([checked]) [part=\"slider\"] {\n transform: translateX(100%);\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: 0.5;\n }\n `;\n static formAssociated = true;\n static get observedAttributes() {\n return [CHECKED_ATTR];\n }\n constructor() {\n super();\n this.#createRoot();\n }\n get checked() { return this.hasAttribute(CHECKED_ATTR); }\n set checked(value) { this.toggleAttribute(CHECKED_ATTR, value); }\n get disabled() { return this.hasAttribute(DISABLED_ATTR); }\n set disabled(value) { this.toggleAttribute(DISABLED_ATTR, value); }\n toggle = () => {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n };\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'switch');\n }\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n this.#updateChecked(false);\n this.addEventListener('click', this.toggle);\n this.addEventListener('keydown', this.#onKeyDown);\n }\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n this.removeEventListener('keydown', this.#onKeyDown);\n }\n attributeChangedCallback(name) {\n if (name === CHECKED_ATTR) {\n this.#updateChecked(true);\n }\n }\n #onKeyDown = (e) => {\n switch (e.key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.toggle();\n break;\n default:\n break;\n }\n };\n #updateChecked = (dispatch = false) => {\n this.setAttribute('aria-checked', this.checked.toString());\n if (dispatch)\n this.dispatchEvent(changeEvent(this.checked));\n };\n #createRoot = () => {\n const root = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n const style = document.createElement('style');\n style.innerHTML = ToggleSwitchElement.css;\n const template = document.createElement('template');\n template.innerHTML = ToggleSwitchElement.html;\n root.appendChild(style);\n root.appendChild(template.content);\n return root;\n };\n}\n","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport { DEFAULT_PREFERENCES, CONSENT_STATES } from './constants.js'\nimport styles from './bib-consent-preferences-dialog.scss?inline'\n\n/**\n * Generates an object with the default consent preferences, where each key is set to the provided boolean value.\n *\n * @param {boolean} value - The boolean value to set for each consent preference.\n * @returns {Object} An object with the default consent preferences, where each key is set to the provided value.\n */\nfunction getConsentValues(value) {\n return Object.keys(DEFAULT_PREFERENCES).reduce((obj, key) => ({ ...obj, [key]: value }), {})\n}\n\nexport class BibConsentPreferencesDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n state: true\n },\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n _consentConsumer\n #toggleChoices\n\n /**\n * Constructs a new `BibConsentPreferencesDialog` instance.\n *\n * This constructor initializes the component's state, creates a reference to the dialog element, and subscribes to the consent context to retrieve the user's consent preferences.\n *\n * The `open` property is initially set to `false`, and the `#toggleChoices` property is initialized based on the consent context value. If the consent context value is `null`, `#toggleChoices` is set to the default consent preferences.\n */\n constructor() {\n super()\n this.open = false\n this._dialogRef = createRef()\n this.#toggleChoices = new ConsentTokens(false)\n this._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: tokens => {\n try {\n\n const consentTokens = ConsentTokens.from(tokens)\n\n if (consentTokens.state() === CONSENT_STATES.INDETERMINATE) {\n this.#toggleChoices.setAll(false)\n return\n }\n\n this.#toggleChoices.setAll(consentTokens)\n } catch (error) {\n console.error('[BibConsentPreferencesDialog] error: ', error)\n throw error\n }\n }\n })\n }\n\n /**\n * Saves the user's consent preferences.\n *\n * @param {boolean|Object} preference - The consent preferences to save. If a boolean is provided, it will be used to generate a full set of consent values. If an object is provided, it will be used directly as the consent preferences.\n * @returns {void}\n * @throws {Error} If there is an error saving the preferences.\n */\n async savePreferences(preference) {\n try {\n if (typeof preference !== 'undefined') {\n this.#toggleChoices.setAll(preference)\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: this.#toggleChoices }))\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Shows the consent preferences dialog.\n *\n * This method retrieves the user's consent preferences from the consent context and initializes the `#toggleChoices` property with the values. It then shows the dialog modal.\n *\n * @returns {void}\n */\n show() {\n const tokens = this._consentConsumer.value?.state() === CONSENT_STATES.DETERMINATE ? this._consentConsumer.value : false\n\n console.log('tokens', tokens)\n\n this.#toggleChoices.setAll(tokens)\n\n this._dialogRef.value?.showModal()\n }\n\n /**\n * Closes the dialog and optionally emits an event.\n *\n * @param {boolean} [emit=true] - Whether to emit the 'close' event when the dialog is closed.\n * @returns {void}\n */\n close(emit = true) {\n this._dialogRef.value?.close(emit)\n }\n\n #onDetailsClick(event) {\n // Prevent the
element to open if user clics on the toggle button\n if (event.composedPath().some(node => node.matches?.('toggle-switch.switch'))) {\n event.preventDefault()\n }\n }\n\n #onToggleSwitchChange(event) {\n const { target, detail } = event\n const { checked } = detail\n const name = target.getAttribute('name')\n this.#toggleChoices[name] = checked\n }\n\n render() {\n\n return html`\n \n
\n
Personnaliser les témoins
\n
\n

Les témoins (aussi appelés « cookies ») sont de petits fichiers textes qui sont téléchargés lorsque vous consultez certaines pages d’un site et qui sont enregistrés dans la mémoire de l’appareil que vous utilisez. Ils permettent d’enregistrer certaines informations (type de navigateur, langue, pays, adresse IP, identifiant, etc.) afin d’être récupérées par le serveur lors de visites subséquentes. Ils sont utilisés pour mettre à jour et optimiser nos plateformes en fonction de l’utilisation que vous en faites et de vos besoins.

\n

L’UdeM collecte des données sur les plateformes, afin d’analyser leur utilisation et d’améliorer l’expérience des visiteurs.

\n

L’UdeM utilise également les services de Google Analytics, afin d'analyser le trafic Web et de recueillir des données de navigation à des fins statistiques et d’amélioration des Plateformes.

\n

Parce que nous respectons votre droit à la vie privée, nous vous donnons la possibilité de ne pas autoriser certains types de témoins. Cliquez sur les différentes catégories pour obtenir plus de détails sur chacune d’entre elles et modifier les paramètres par défaut. Toutefois, si vous désactivez certains types de témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n
\n \n Témoins nécessaires\n \n +\n -\n
Toujours activés
\n
\n
\n
\n

Ces témoins sont essentiels au bon fonctionnement et à la sécurité de nos sites Web et services en ligne. Ils ne peuvent pas être désactivés. Ils nous permettent notamment de sécuriser votre connexion en recueillant vos informations d’identification, personnaliser votre interface (ex. : choix de langue) et conserver vos préférences.

\n

Les renseignements suivants sont notamment recueillis :

\n
    \n
  • le type et la version du navigateur;
  • \n
  • le type et la version du système d’exploitation;
  • \n
  • le type et le modèle d’appareil (téléphone, tablette ou ordinateur);
  • \n
  • la résolution de l’écran de l’appareil que vous utilisez;
  • \n
  • la langue utilisée par le navigateur.
  • \n
\n
\n
\n\n
\n \n
Témoins de performance
\n
\n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins sont utilisés pour analyser la navigation sur nos sites (provenance des visiteurs, fréquence des visites, pages plus ou moins visitées, etc.) dans le but d’en améliorer le fonctionnement et d’offrir une meilleure expérience utilisateurs aux visiteurs. Toutes les informations collectées par ces témoins sont agrégées et donc anonymisées.

\n
\n
\n\n
\n \n Témoins de fonctionnalité\n \n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins permettent d’améliorer les fonctionnalités et la personnalisation de nos sites. Par exemple, ils rendent possible l’utilisation de vidéos et de services de messagerie instantanée ou encore le partage de contenus de nos sites sur des plateformes de médias sociaux. Si vous désactivez ces témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n Témoins publicitaires+-\n
\n \n
\n
\n
\n

Ces témoins peuvent être activés sur nos sites web pour établir des profils sur vos intérêts. Ils nous aident à vous proposer des publicités et des contenus personnalisés. Si vous désactivez ces témoins, des publicités et des contenus moins ciblées sur vos intérêts vous seront proposés.

\n
\n
\n
\n

Vous pouvez modifier en tout temps vos préférences en sélectionnant les paramètres appropriés dans votre navigateur pour accepter ou refuser les témoins.

\n
\n \n \n \n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-preferences-dialog')) {\n window.customElements.define('bib-consent-preferences-dialog', BibConsentPreferencesDialog)\n}"],"names":["Event","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","hostConnected","dispatchRequest","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","static","toggle","disabled","checked","onKeyDown","key","preventDefault","updateChecked","dispatch","setAttribute","toString","CustomEvent","detail","createRoot","root","shadowRoot","attachShadow","mode","style","document","createElement","innerHTML","css","template","html","appendChild","content","hasAttribute","toggleAttribute","addEventListener","disconnectedCallback","removeEventListener","name","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ConsentTokens","ContextConsumer","consentContext","tokens","consentTokens","from","state","CONSENT_STATES","INDETERMINATE","setAll","error","console","savePreferences","preference","show","DETERMINATE","log","showModal","emit","close","ref","handleEvent","onDetailsClick","capture","analytics_consent","functionality_consent","ad_consent","onToggleSwitchChange","event","composedPath","some","node","matches","target","getAtt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ByF,qBAA+DzF,4BAAAA,sBAAAA,mBAQxH,kjBAAA,EAAEqF,aAAarF,sBAAAA,qBAAsBuF,SAAAA,sTAGwB,cAAnCvF,mBAAAA,IAAoB0F,UAAAA,4BAAoD1F,sBAAK2F,mBAAAA,ypBAU7F,MAAM3F,KAAK4E,6GACX,MAAM5E,KAAK4E,gBAAgB,KAAA,CAAA,6EAC3B,MAAM5E,KAAK4E,gBAAgB,IAAA,CAAA;AAAA,EAO1F;;AAxLDhB;AAjBK;AAkGL,OAAA0B,SAAgBM,IAEVA;AAAAA,EAAAA,GAAMC,aAAeC,EAAAA,KAAKC,CAAAA,OAAQA,GAAKC,UAAU,sBACnDJ,CAAAA,KAAAA,GAAMnE,eAET;AAAA;AAED,OAAAkE,SAAsBC;AACpB,QAAMK,EAAAA,QAAEA,IAAMlE,QAAEA,OAAW6D,IACrBtE,EAAAA,SAAEA,GAAYS,IAAAA,IACdoB,KAAO8C,GAAOC,aAAa,MACjClG;AAAAA,qBAAAA,IAAoBmD,EAAAA,IAAQ7B;AAC7B;AA7GDH,cADWsC,GACS,cAAA,EAClB0C,OAAO,EACLC,MAAMC,SACNC,SAAAA,KAEFzC,GAAAA,MAAM,EACJuC,MAAMC,SACN/B,OAAAA;AAIJnD,cAZWsC,GAYK,UAAA,CACdhB,IAAM8D,gmPAGR5C,CAAAA,EAAAA;AA4LGP,OAAOC,eAAeC,IAAI,gCAAA,KAC7BF,OAAOC,eAAeG,OAAO,kCAAkCC,CAAAA;","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file +{"version":3,"file":"bib-consent-preferences-dialog-Dlk44SVl.js","sources":["../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@auroratide/toggle-switch/lib/events.js","../node_modules/@auroratide/toggle-switch/lib/toggle-switch.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../src/components/bib-consent/bib-consent-preferences-dialog.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.callback=t,this.subscribe=e??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","export const CHANGED = 'toggle-switch:change';\nexport const changeEvent = (checked) => new CustomEvent(CHANGED, {\n detail: { checked }\n});\n","import { changeEvent } from './events.js';\nconst CHECKED_ATTR = 'checked';\nconst DISABLED_ATTR = 'disabled';\nexport class ToggleSwitchElement extends HTMLElement {\n static defaultElementName = 'toggle-switch';\n static html = `\n \n \n \n `;\n static css = `\n :host {\n display: inline-block;\n width: 2em;\n height: 1em;\n cursor: pointer;\n }\n\n span {\n box-sizing: border-box;\n display: inline-block;\n line-height: 1;\n }\n\n [part=\"track\"] {\n width: 100%;\n height: 100%;\n background-color: #dddddd;\n text-align: left;\n transition: all 0.256s;\n }\n\n [part=\"slider\"] {\n width: 50%;\n height: 100%;\n background-color: #777777;\n transition: all 0.256s;\n vertical-align: text-top;\n }\n\n :host([checked]) [part=\"slider\"] {\n transform: translateX(100%);\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: 0.5;\n }\n `;\n static formAssociated = true;\n static get observedAttributes() {\n return [CHECKED_ATTR];\n }\n constructor() {\n super();\n this.#createRoot();\n }\n get checked() { return this.hasAttribute(CHECKED_ATTR); }\n set checked(value) { this.toggleAttribute(CHECKED_ATTR, value); }\n get disabled() { return this.hasAttribute(DISABLED_ATTR); }\n set disabled(value) { this.toggleAttribute(DISABLED_ATTR, value); }\n toggle = () => {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n };\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'switch');\n }\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n this.#updateChecked(false);\n this.addEventListener('click', this.toggle);\n this.addEventListener('keydown', this.#onKeyDown);\n }\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n this.removeEventListener('keydown', this.#onKeyDown);\n }\n attributeChangedCallback(name) {\n if (name === CHECKED_ATTR) {\n this.#updateChecked(true);\n }\n }\n #onKeyDown = (e) => {\n switch (e.key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.toggle();\n break;\n default:\n break;\n }\n };\n #updateChecked = (dispatch = false) => {\n this.setAttribute('aria-checked', this.checked.toString());\n if (dispatch)\n this.dispatchEvent(changeEvent(this.checked));\n };\n #createRoot = () => {\n const root = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n const style = document.createElement('style');\n style.innerHTML = ToggleSwitchElement.css;\n const template = document.createElement('template');\n template.innerHTML = ToggleSwitchElement.html;\n root.appendChild(style);\n root.appendChild(template.content);\n return root;\n };\n}\n","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport { DEFAULT_PREFERENCES, CONSENT_STATES } from './constants.js'\nimport styles from './bib-consent-preferences-dialog.scss?inline'\n\n/**\n * Generates an object with the default consent preferences, where each key is set to the provided boolean value.\n *\n * @param {boolean} value - The boolean value to set for each consent preference.\n * @returns {Object} An object with the default consent preferences, where each key is set to the provided value.\n */\nfunction getConsentValues(value) {\n return Object.keys(DEFAULT_PREFERENCES).reduce((obj, key) => ({ ...obj, [key]: value }), {})\n}\n\nexport class BibConsentPreferencesDialog extends LitElement {\n static properties = {\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n state: true\n },\n }\n\n static styles = [\n css`${unsafeCSS(styles)}`\n ]\n\n _consentConsumer\n #toggleChoices\n\n /**\n * Constructs a new `BibConsentPreferencesDialog` instance.\n *\n * This constructor initializes the component's state, creates a reference to the dialog element, and subscribes to the consent context to retrieve the user's consent preferences.\n *\n * The `open` property is initially set to `false`, and the `#toggleChoices` property is initialized based on the consent context value. If the consent context value is `null`, `#toggleChoices` is set to the default consent preferences.\n */\n constructor() {\n super()\n this.open = false\n this._dialogRef = createRef()\n this.#toggleChoices = new ConsentTokens(false)\n this._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: tokens => {\n try {\n\n const consentTokens = ConsentTokens.from(tokens)\n\n if (consentTokens.state() === CONSENT_STATES.INDETERMINATE) {\n this.#toggleChoices.setAll(false)\n return\n }\n\n this.#toggleChoices.setAll(consentTokens)\n } catch (error) {\n console.error('[BibConsentPreferencesDialog] error: ', error)\n throw error\n }\n }\n })\n }\n\n /**\n * Saves the user's consent preferences.\n *\n * @param {boolean|Object} preference - The consent preferences to save. If a boolean is provided, it will be used to generate a full set of consent values. If an object is provided, it will be used directly as the consent preferences.\n * @returns {void}\n * @throws {Error} If there is an error saving the preferences.\n */\n async savePreferences(preference) {\n try {\n if (typeof preference !== 'undefined') {\n this.#toggleChoices.setAll(preference)\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: this.#toggleChoices }))\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Shows the consent preferences dialog.\n *\n * This method retrieves the user's consent preferences from the consent context and initializes the `#toggleChoices` property with the values. It then shows the dialog modal.\n *\n * @returns {void}\n */\n show() {\n const tokens = this._consentConsumer.value?.state() === CONSENT_STATES.DETERMINATE ? this._consentConsumer.value : false\n\n console.log('tokens', tokens)\n\n this.#toggleChoices.setAll(tokens)\n\n this._dialogRef.value?.showModal()\n }\n\n /**\n * Closes the dialog and optionally emits an event.\n *\n * @param {boolean} [emit=true] - Whether to emit the 'close' event when the dialog is closed.\n * @returns {void}\n */\n close(emit = true) {\n this._dialogRef.value?.close(emit)\n }\n\n #onDetailsClick(event) {\n // Prevent the
element to open if user clics on the toggle button\n if (event.composedPath().some(node => node.matches?.('toggle-switch.switch'))) {\n event.preventDefault()\n }\n }\n\n #onToggleSwitchChange(event) {\n const { target, detail } = event\n const { checked } = detail\n const name = target.getAttribute('name')\n this.#toggleChoices[name] = checked\n }\n\n render() {\n\n return html`\n \n
\n
Personnaliser les témoins
\n
\n

Les témoins (aussi appelés « cookies ») sont de petits fichiers textes qui sont téléchargés lorsque vous consultez certaines pages d’un site et qui sont enregistrés dans la mémoire de l’appareil que vous utilisez. Ils permettent d’enregistrer certaines informations (type de navigateur, langue, pays, adresse IP, identifiant, etc.) afin d’être récupérées par le serveur lors de visites subséquentes. Ils sont utilisés pour mettre à jour et optimiser nos plateformes en fonction de l’utilisation que vous en faites et de vos besoins.

\n

L’UdeM collecte des données sur les plateformes, afin d’analyser leur utilisation et d’améliorer l’expérience des visiteurs.

\n

L’UdeM utilise également les services de Google Analytics, afin d'analyser le trafic Web et de recueillir des données de navigation à des fins statistiques et d’amélioration des Plateformes.

\n

Parce que nous respectons votre droit à la vie privée, nous vous donnons la possibilité de ne pas autoriser certains types de témoins. Cliquez sur les différentes catégories pour obtenir plus de détails sur chacune d’entre elles et modifier les paramètres par défaut. Toutefois, si vous désactivez certains types de témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n
\n \n Témoins nécessaires\n \n +\n -\n
Toujours activés
\n
\n
\n
\n

Ces témoins sont essentiels au bon fonctionnement et à la sécurité de nos sites Web et services en ligne. Ils ne peuvent pas être désactivés. Ils nous permettent notamment de sécuriser votre connexion en recueillant vos informations d’identification, personnaliser votre interface (ex. : choix de langue) et conserver vos préférences.

\n

Les renseignements suivants sont notamment recueillis :

\n
    \n
  • le type et la version du navigateur;
  • \n
  • le type et la version du système d’exploitation;
  • \n
  • le type et le modèle d’appareil (téléphone, tablette ou ordinateur);
  • \n
  • la résolution de l’écran de l’appareil que vous utilisez;
  • \n
  • la langue utilisée par le navigateur.
  • \n
\n
\n
\n\n
\n \n
Témoins de performance
\n
\n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins sont utilisés pour analyser la navigation sur nos sites (provenance des visiteurs, fréquence des visites, pages plus ou moins visitées, etc.) dans le but d’en améliorer le fonctionnement et d’offrir une meilleure expérience utilisateurs aux visiteurs. Toutes les informations collectées par ces témoins sont agrégées et donc anonymisées.

\n
\n
\n\n
\n \n Témoins de fonctionnalité\n \n +\n -\n
\n \n
\n
\n
\n
\n

Ces témoins permettent d’améliorer les fonctionnalités et la personnalisation de nos sites. Par exemple, ils rendent possible l’utilisation de vidéos et de services de messagerie instantanée ou encore le partage de contenus de nos sites sur des plateformes de médias sociaux. Si vous désactivez ces témoins, votre expérience de navigation et les services que nous sommes en mesure de vous offrir peuvent être impactés.

\n
\n
\n
\n Témoins publicitaires+-\n
\n \n
\n
\n
\n

Ces témoins peuvent être activés sur nos sites web pour établir des profils sur vos intérêts. Ils nous aident à vous proposer des publicités et des contenus personnalisés. Si vous désactivez ces témoins, des publicités et des contenus moins ciblées sur vos intérêts vous seront proposés.

\n
\n
\n
\n

Vous pouvez modifier en tout temps vos préférences en sélectionnant les paramètres appropriés dans votre navigateur pour accepter ou refuser les témoins.

\n
\n \n \n \n
\n \n
\n
\n
\n `\n }\n}\n\nif (!window.customElements.get('bib-consent-preferences-dialog')) {\n window.customElements.define('bib-consent-preferences-dialog', BibConsentPreferencesDialog)\n}"],"names":["Event","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","hostConnected","dispatchRequest","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","static","toggle","disabled","checked","onKeyDown","key","preventDefault","updateChecked","dispatch","setAttribute","toString","CustomEvent","detail","createRoot","root","shadowRoot","attachShadow","mode","style","document","createElement","innerHTML","css","template","html","appendChild","content","hasAttribute","toggleAttribute","addEventListener","disconnectedCallback","removeEventListener","name","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ConsentTokens","ContextConsumer","consentContext","tokens","consentTokens","from","state","CONSENT_STATES","INDETERMINATE","setAll","error","console","savePreferences","preference","show","DETERMINATE","log","showModal","emit","close","ref","handleEvent","onDetailsClick","capture","analytics_consent","functionality_consent","ad_consent","onToggleSwitchChange","event","composedPath","some","node","matches","target","getAttribute","debug","type","Boolean","reflect","unsafeCSS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;QAKA,cAAgBA,MAAAA;AAAAA,EAAM,YAAYC,IAAEC,IAAEC,IAAAA;AAAGC,UAAM,mBAAkB,EAACC,SAAAA,MAAWC,UAAS,KAAA,CAAA,GAAKC,KAAKC,UAAQP,IAAEM,KAAKE,WAASP,IAAEK,KAAKG,YAAUP,MAAAA;AAAAA,EAAK;AAAA;;;;;;ACA3I,MAAMF,EAAE;AAAA,EAAA,YAAYC,IAAED,IAAEU,IAAEC,IAAAA;AAAG,QAAGL,KAAKG,YAAU,OAAGH,KAAKM,WAA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A,GAAKC,UAAU,sBACnDJ,CAAAA,KAAAA,GAAMnE,eAET;AAAA;AAED,OAAAkE,SAAsBC;AACpB,QAAMK,EAAAA,QAAEA,IAAMlE,QAAEA,OAAW6D,IACrBtE,EAAAA,SAAEA,GAAYS,IAAAA,IACdoB,KAAO8C,GAAOC,aAAa,MACjClG;AAAAA,qBAAAA,IAAoBmD,EAAAA,IAAQ7B;AAC7B;AA7GDH,cADWsC,GACS,cAAA,EAClB0C,OAAO,EACLC,MAAMC,SACNC,SAAAA,KAEFzC,GAAAA,MAAM,EACJuC,MAAMC,SACN/B,OAAAA;AAIJnD,cAZWsC,GAYK,UAAA,CACdhB,IAAM8D,gmPAGR5C,CAAAA,EAAAA;AA4LGP,OAAOC,eAAeC,IAAI,gCAAA,KAC7BF,OAAOC,eAAeG,OAAO,kCAAkCC,CAAAA;","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file diff --git a/dist/bib-consent-preferences-dialog.cjs b/dist/bib-consent-preferences-dialog.cjs index 6e36854..1a99e60 100644 --- a/dist/bib-consent-preferences-dialog.cjs +++ b/dist/bib-consent-preferences-dialog.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./lit-element-BHNMc-Kg.cjs");const e=require("./bib-consent-preferences-dialog-B10xxOhz.cjs");require("./ref-mxufyLY8.cjs"),require("./consent-context.cjs"),require("./ConsentTokens.cjs"),require("./constants-PQ5SQuv-.cjs"),exports.BibConsentPreferencesDialog=e.BibConsentPreferencesDialog; +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./lit-element-BHNMc-Kg.cjs");const e=require("./bib-consent-preferences-dialog-DTcmaEoj.cjs");require("./ref-mxufyLY8.cjs"),require("./consent-context.cjs"),require("./ConsentTokens.cjs"),require("./constants-BvP9XHhn.cjs"),exports.BibConsentPreferencesDialog=e.BibConsentPreferencesDialog; //# sourceMappingURL=bib-consent-preferences-dialog.cjs.map diff --git a/dist/bib-consent-preferences-dialog.js b/dist/bib-consent-preferences-dialog.js index f821ee5..f0f2926 100644 --- a/dist/bib-consent-preferences-dialog.js +++ b/dist/bib-consent-preferences-dialog.js @@ -1,17 +1,17 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ import "./lit-element-Dj1nHH6C.js"; -import { B } from "./bib-consent-preferences-dialog-ByH_MjP-.js"; +import { B } from "./bib-consent-preferences-dialog-Dlk44SVl.js"; import "./ref-B-kqFHPy.js"; import "./consent-context.js"; import "./ConsentTokens.js"; -import "./constants-B2WJQGFq.js"; +import "./constants-D0hS4kJm.js"; export { B as BibConsentPreferencesDialog }; diff --git a/dist/bib-consent-server.cjs b/dist/bib-consent-server.cjs index da860b0..5dd1b2f 100644 --- a/dist/bib-consent-server.cjs +++ b/dist/bib-consent-server.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,o=Object.defineProperty,n=e=>{throw TypeError(e)},s=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i=(e,t,o)=>t.has(e)||n("Cannot "+o),r=(e,t,o)=>(i(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?n("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./lit-element-BHNMc-Kg.cjs"),c=require("./constants-PQ5SQuv-.cjs"),g=require("./ref-mxufyLY8.cjs"),d=require("./logger-D5ZRyz6h.cjs"),h=require("./ConsentStorage.cjs");class p extends l.s{constructor(){super(),a(this,e),a(this,t,d.loggerFactory("consent-server")),this.connected=!1,this.debug=this.debug||!1,this.loggerRef=g.e(),this.allowedOrigins=this.allowedOrigins||[],this.init()}async init(){var t,o,n,s;this.log("Initializing BibConsentServer..."),t=this,o=e,n=await h(),i(t,o,"write to private field"),s?s.call(t,n):o.set(t,n),this.log("Connected to storage."),r(this,e).listen((e=>{this.log("Storage updated with data",e.detail)})),this.log("Start listening for storage updates..."),this.startListening()}log(...e){if(this.hasAttribute("debug")){const o=e.map((e=>"string"==typeof e?e.replace(/<\/?[^>]+(>|$)/g,""):e));r(this,t).call(this,...o);const n=e.map((e=>"string"==typeof e?e:`${JSON.stringify(e)}`)).join(" ");if(this.loggerRef.value){const e=this.loggerRef.value;e.innerHTML+=`${""===e.innerHTML?"":"
"}${n}`,e.scrollTop=e.scrollHeight}}}async startListening(){const{listenMessage:t}=await c.startListening({eventFilter:e=>{const{origin:t}=e;return this.allowedOrigins.length>0&&this.allowedOrigins.some((e=>c.patternMatchesOrigin(e,t)))}});this.connected=!0,this.log("Connected:",`${this.connected}`),this.log("Listening for postMessage events..."),t((async(t,o,n)=>{let s;switch(t){case"setConsentTokens":s=await r(this,e).setConsentTokens(o);break;case"getConsentTokens":s=await r(this,e).getConsentTokens();break;case"resetTokens":s=await r(this,e).resetTokens();break;case"ping":s="pong";break;default:throw this.log(`Unknown method: ${t}. Payload:`,o),new Error(`Unknown method: ${t}`)}o?this.log(`Method ${t} called with payload:`,o,"response:",s):this.log(`Method ${t} called.`,"response:",s),n(s)}))}render(){return l.x`

I am bib-consent-server

`}}e=new WeakMap,t=new WeakMap,s(p,"properties",{connected:{type:Boolean},debug:{type:Boolean,reflect:!0},allowedOrigins:{type:String,attribute:"allowed-origins",converter:{fromAttribute:e=>e.split(/\s+/).map((e=>e.trim())),toAttribute:e=>e.join(" ")}}}),s(p,"styles",[l.i`${l.r(":host{display:none}:host([debug]){display:block;height:100vh}body{margin:0}h1{text-align:center;padding:.25em 0;margin:0;font:unset;font-variant:all-small-caps;background-color:#e5e5e5}.log-container{padding:0;font-size:13px;border:1px solid silver}.log{box-sizing:border-box;-webkit-text-size-adjust:100%;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace!important;font-size:small;margin:0;padding:.35rem;width:100%;background-color:unset;border:none;tab-size:8;outline:none;overflow-y:auto;height:100px;line-height:20px;overflow-wrap:normal;overscroll-behavior-x:none;z-index:1}.log code{font-size:13px}.log .function,.log .method{color:#881280}.log .property{color:#994500}.log .value{color:#1a1aa6}")}`]),window.customElements.get("bib-consent-server")||window.customElements.define("bib-consent-server",p),exports.BibConsentServer=p; +var e,t,o=Object.defineProperty,n=e=>{throw TypeError(e)},s=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i=(e,t,o)=>t.has(e)||n("Cannot "+o),r=(e,t,o)=>(i(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?n("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./lit-element-BHNMc-Kg.cjs"),c=require("./constants-BvP9XHhn.cjs"),g=require("./ref-mxufyLY8.cjs"),d=require("./logger-DMvvTbNw.cjs"),h=require("./ConsentStorage.cjs");class p extends l.s{constructor(){super(),a(this,e),a(this,t,d.loggerFactory("consent-server")),this.connected=!1,this.debug=this.debug||!1,this.loggerRef=g.e(),this.allowedOrigins=this.allowedOrigins||[],this.init()}async init(){var t,o,n,s;this.log("Initializing BibConsentServer..."),t=this,o=e,n=await h(),i(t,o,"write to private field"),s?s.call(t,n):o.set(t,n),this.log("Connected to storage."),r(this,e).listen((e=>{this.log("Storage updated with data",e.detail)})),this.log("Start listening for storage updates..."),this.startListening()}log(...e){if(this.hasAttribute("debug")){const o=e.map((e=>"string"==typeof e?e.replace(/<\/?[^>]+(>|$)/g,""):e));r(this,t).call(this,...o);const n=e.map((e=>"string"==typeof e?e:`${JSON.stringify(e)}`)).join(" ");if(this.loggerRef.value){const e=this.loggerRef.value;e.innerHTML+=`${""===e.innerHTML?"":"
"}${n}`,e.scrollTop=e.scrollHeight}}}async startListening(){const{listenMessage:t}=await c.startListening({eventFilter:e=>{const{origin:t}=e;return this.allowedOrigins.length>0&&this.allowedOrigins.some((e=>c.patternMatchesOrigin(e,t)))}});this.connected=!0,this.log("Connected:",`${this.connected}`),this.log("Listening for postMessage events..."),t((async(t,o,n)=>{let s;switch(t){case"setConsentTokens":s=await r(this,e).setConsentTokens(o);break;case"getConsentTokens":s=await r(this,e).getConsentTokens();break;case"resetTokens":s=await r(this,e).resetTokens();break;case"ping":s="pong";break;default:throw this.log(`Unknown method: ${t}. Payload:`,o),new Error(`Unknown method: ${t}`)}o?this.log(`Method ${t} called with payload:`,o,"response:",s):this.log(`Method ${t} called.`,"response:",s),n(s)}))}render(){return l.x`

I am bib-consent-server

`}}e=new WeakMap,t=new WeakMap,s(p,"properties",{connected:{type:Boolean},debug:{type:Boolean,reflect:!0},allowedOrigins:{type:String,attribute:"allowed-origins",converter:{fromAttribute:e=>e.split(/\s+/).map((e=>e.trim())),toAttribute:e=>e.join(" ")}}}),s(p,"styles",[l.i`${l.r(":host{display:none}:host([debug]){display:block;height:100vh}body{margin:0}h1{text-align:center;padding:.25em 0;margin:0;font:unset;font-variant:all-small-caps;background-color:#e5e5e5}.log-container{padding:0;font-size:13px;border:1px solid silver}.log{box-sizing:border-box;-webkit-text-size-adjust:100%;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace!important;font-size:small;margin:0;padding:.35rem;width:100%;background-color:unset;border:none;tab-size:8;outline:none;overflow-y:auto;height:100px;line-height:20px;overflow-wrap:normal;overscroll-behavior-x:none;z-index:1}.log code{font-size:13px}.log .function,.log .method{color:#881280}.log .property{color:#994500}.log .value{color:#1a1aa6}")}`]),window.customElements.get("bib-consent-server")||window.customElements.define("bib-consent-server",p),exports.BibConsentServer=p; //# sourceMappingURL=bib-consent-server.cjs.map diff --git a/dist/bib-consent-server.js b/dist/bib-consent-server.js index 36e6a08..a5a644d 100644 --- a/dist/bib-consent-server.js +++ b/dist/bib-consent-server.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -18,9 +18,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var _e, _o; import { s as e, i as o, r as t, x as s } from "./lit-element-Dj1nHH6C.js"; -import { d as n, p as i } from "./constants-B2WJQGFq.js"; +import { d as n, p as i } from "./constants-D0hS4kJm.js"; import { e as r, n as a } from "./ref-B-kqFHPy.js"; -import { l } from "./logger-CcMMJUPZ.js"; +import { l } from "./logger-EcO8T52u.js"; import g from "./ConsentStorage.js"; class c extends e { constructor() { diff --git a/dist/bib-consent.cjs b/dist/bib-consent.cjs index 68412d3..e518908 100644 --- a/dist/bib-consent.cjs +++ b/dist/bib-consent.cjs @@ -1,20 +1,20 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,s,n,i,o,r,c,a,h,l,u,d,p=Object.defineProperty,b=e=>{throw TypeError(e)},v=(e,t,s)=>((e,t,s)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),E=(e,t,s)=>t.has(e)||b("Cannot "+s),f=(e,t,s)=>(E(e,t,"read from private field"),s?s.call(e):t.get(e)),g=(e,t,s)=>t.has(e)?b("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),T=(e,t,s,n)=>(E(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),w=(e,t,s)=>(E(e,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./lit-element-BHNMc-Kg.cjs"),C=require("./ref-mxufyLY8.cjs"),k=require("./bib-consent-preferences-dialog-B10xxOhz.cjs"),x=require("./logger-D5ZRyz6h.cjs"),q=require("./bib-qo8fsCxm.cjs");require("./bib-button-close.cjs"),require("./bib-consent-consent-dialog.cjs");const y=require("./consentClient.cjs"),S=require("./consent-context.cjs"),R=require("./constants-PQ5SQuv-.cjs"),D=require("./ConsentTokens.cjs"); +var e,t,s,n,i,o,r,c,a,h,l,u,d,p=Object.defineProperty,b=e=>{throw TypeError(e)},v=(e,t,s)=>((e,t,s)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),E=(e,t,s)=>t.has(e)||b("Cannot "+s),g=(e,t,s)=>(E(e,t,"read from private field"),s?s.call(e):t.get(e)),T=(e,t,s)=>t.has(e)?b("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),f=(e,t,s,n)=>(E(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),w=(e,t,s)=>(E(e,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./lit-element-BHNMc-Kg.cjs"),C=require("./ref-mxufyLY8.cjs"),k=require("./bib-consent-preferences-dialog-DTcmaEoj.cjs"),x=require("./logger-DMvvTbNw.cjs"),q=require("./bib-SERnlaT3.cjs"),y=require("./ConsentTokens.cjs"),R=require("./consentClient.cjs"),S=require("./consent-context.cjs");require("./bib-button-close.cjs"),require("./bib-consent-consent-dialog.cjs");const D=require("./constants-BvP9XHhn.cjs"); /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class M{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){const s=t||!Object.is(e,this.o);this.o=e,s&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:t}]of this.subscriptions)e(this.o,t)},void 0!==e&&(this.value=e)}addCallback(e,t,s){if(!s)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}} + */class _{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){const s=t||!Object.is(e,this.o);this.o=e,s&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:t}]of this.subscriptions)e(this.o,t)},void 0!==e&&(this.value=e)}addCallback(e,t,s){if(!s)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class _ extends Event{constructor(e){super("context-provider",{bubbles:!0,composed:!0}),this.context=e}}class j extends M{constructor(e,t,s){super(void 0!==t.context?t.initialValue:s),this.onContextRequest=e=>{const t=e.composedPath()[0];e.context===this.context&&t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{const t=e.composedPath()[0];if(e.context!==this.context||t===this.host)return;const s=new Set;for(const[n,{consumerHost:i}]of this.subscriptions)s.has(n)||(s.add(n),i.dispatchEvent(new k.s(this.context,n,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new _(this.context))}}const N=x.loggerFactory("bib-consent","#cd5300");class P extends m.s{constructor(){super(),g(this,r),v(this,"_consentClient"),g(this,e),g(this,t),g(this,s),g(this,n,R.CONSENT_STATES.INDETERMINATE),g(this,i),g(this,o),this.open=!1,this.currentDialog=null,T(this,i,C.e()),T(this,o,C.e()),T(this,t,new j(this,{context:S.consentContext,initialValue:new D.ConsentTokens})),T(this,s,new k.s$1(this,{context:S.consentContext,callback:this.savePreferences}))}get state(){return f(this,n)}get consentTokens(){return f(this,s).value}async connectedCallback(){super.connectedCallback(),this.debug=this.debug||!1,this.serverUrl=this.serverUrl||"https://bib.umontreal.ca/consent/server",this.serverRequestTimeout=this.serverRequestTimeout||R.SERVER_REQUEST_DEFAULT_TIMEOUT,this._consentClient=await y({host:this,serverUrl:this.serverUrl,serverRequestTimeout:this.serverRequestTimeout,reflectEvents:!0}),this._consentClient.addEventListener(R.EVENT_NAMES.READY,(e=>{const{detail:t}=e;w(this,r,a).call(this,R.EVENT_NAMES.READY,"event: ",e),t.state()===R.CONSENT_STATES.DETERMINATE?w(this,r,c).call(this,t):w(this,r,l).call(this,"consent")}))}close(){w(this,r,h).call(this)}show(){w(this,r,l).call(this,"consent")}showPreferences(){w(this,r,l).call(this,"preferences")}async getTokens(){return T(this,e,await this._consentClient.getConsentTokens()),f(this,e)}async saveTokens(e){w(this,r,a).call(this,"[save] tokens: ",e);const t=D.ConsentTokens.from(e);try{return await this._consentClient.setConsentTokens(t),w(this,r,c).call(this,t),!0}catch(s){throw console.error("[savePreferences] error: ",s),s}}async resetTokens(){return T(this,e,await this._consentClient.resetTokens()),f(this,e)}render(){return m.x``}}e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,c=function(e){f(this,t).setValue(e),T(this,n,f(this,t).value.state())},a=function(){this.debug&&N(...arguments)},h=function(e=!0){this.open=!1,this.currentDialog?.close(e),this.currentDialog=null},l=function(e="consent"){if("string"!=typeof e&&!["consent","preferences"].includes(e))throw new TypeError("The panel argument must be a string of either values 'consent' or 'preferences'. ",e);this.open=!0,this.currentDialog&&(w(this,r,a).call(this,"[#show] this.currentDialog",this.currentDialog),this.currentDialog.close()),w(this,r,a).call(this,"[show]",f(this,i).value),w(this,r,a).call(this,"[show]",f(this,o).value),this.currentDialog="consent"===e?f(this,i).value:f(this,o).value,this.currentDialog.show()},u=async function(e){w(this,r,a).call(this,"[#handleUpdateEvent]",e);const t=await this.saveTokens(e.detail);w(this,r,a).call(this,"[#handleUpdateEvent] success: ",t),t&&(this.dispatchEvent(new CustomEvent(R.EVENT_NAMES.UPDATE,{detail:this.consentTokens})),w(this,r,h).call(this))},d=function(e){e.stopPropagation(),w(this,r,h).call(this,!1)},v(P,"properties",{serverUrl:{type:String,attribute:"server-url",reflect:!0},serverRequestTimeout:{type:Number,attribute:"server-request-timeout",reflect:!0},[R.SERVER_MODE.LOCAL]:{type:Boolean},state:{type:String},debug:{type:Boolean,reflect:!0},open:{type:Boolean,reflect:!0}}),window.customElements.get("bib-consent")||window.customElements.define("bib-consent",P),q.addToGlobalBib("consent",{}),exports.BibConsent=P; + */class M extends Event{constructor(e){super("context-provider",{bubbles:!0,composed:!0}),this.context=e}}class j extends _{constructor(e,t,s){super(void 0!==t.context?t.initialValue:s),this.onContextRequest=e=>{const t=e.composedPath()[0];e.context===this.context&&t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{const t=e.composedPath()[0];if(e.context!==this.context||t===this.host)return;const s=new Set;for(const[n,{consumerHost:i}]of this.subscriptions)s.has(n)||(s.add(n),i.dispatchEvent(new k.s(this.context,n,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new M(this.context))}}const N=x.loggerFactory("bib-consent","#cd5300");class A extends m.s{constructor(){super(),T(this,r),v(this,"_consentClient"),T(this,e),T(this,t),T(this,s),T(this,n,D.CONSENT_STATES.INDETERMINATE),T(this,i),T(this,o),this.open=!1,this.currentDialog=null,f(this,i,C.e()),f(this,o,C.e()),f(this,t,new j(this,{context:S.consentContext,initialValue:new y.ConsentTokens})),f(this,s,new k.s$1(this,{context:S.consentContext,callback:this.savePreferences}))}get state(){return g(this,n)}get consentTokens(){return g(this,s).value}async connectedCallback(){super.connectedCallback(),this.debug=this.debug||!1,this.serverUrl=this.serverUrl||D.SERVER_DEFAULT_URL,this.serverRequestTimeout=this.serverRequestTimeout||D.SERVER_REQUEST_DEFAULT_TIMEOUT,this._consentClient=await R({host:this,serverUrl:this.serverUrl,serverRequestTimeout:this.serverRequestTimeout,reflectEvents:!0}),this._consentClient.addEventListener(D.EVENT_NAMES.READY,(e=>{const{detail:t}=e;w(this,r,a).call(this,D.EVENT_NAMES.READY,"event: ",e),t.state()===D.CONSENT_STATES.DETERMINATE?w(this,r,c).call(this,t):w(this,r,l).call(this,"consent")}))}close(){w(this,r,h).call(this)}show(){w(this,r,l).call(this,"consent")}showPreferences(){w(this,r,l).call(this,"preferences")}async getTokens(){return f(this,e,await this._consentClient.getConsentTokens()),g(this,e)}async saveTokens(e){w(this,r,a).call(this,"[save] tokens: ",e);const t=y.ConsentTokens.from(e);try{return await this._consentClient.setConsentTokens(t),w(this,r,c).call(this,t),!0}catch(s){throw console.error("[savePreferences] error: ",s),s}}async resetTokens(){return f(this,e,await this._consentClient.resetTokens()),g(this,e)}render(){return m.x``}}e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,c=function(e){g(this,t).setValue(e),f(this,n,g(this,t).value.state())},a=function(){this.debug&&N(...arguments)},h=function(e=!0){this.open=!1,this.currentDialog?.close(e),this.currentDialog=null},l=function(e="consent"){if("string"!=typeof e&&!["consent","preferences"].includes(e))throw new TypeError("The panel argument must be a string of either values 'consent' or 'preferences'. ",e);this.open=!0,this.currentDialog&&(w(this,r,a).call(this,"[#show] this.currentDialog",this.currentDialog),this.currentDialog.close()),w(this,r,a).call(this,"[show]",g(this,i).value),w(this,r,a).call(this,"[show]",g(this,o).value),this.currentDialog="consent"===e?g(this,i).value:g(this,o).value,this.currentDialog.show()},u=async function(e){w(this,r,a).call(this,"[#handleUpdateEvent]",e);const t=await this.saveTokens(e.detail);w(this,r,a).call(this,"[#handleUpdateEvent] success: ",t),t&&(this.dispatchEvent(new CustomEvent(D.EVENT_NAMES.UPDATE,{detail:this.consentTokens})),w(this,r,h).call(this))},d=function(e){e.stopPropagation(),w(this,r,h).call(this,!1)},v(A,"properties",{serverUrl:{type:String,attribute:"server-url"},serverRequestTimeout:{type:Number,attribute:"server-request-timeout"},[D.SERVER_MODE.LOCAL]:{type:Boolean},state:{type:String},debug:{type:Boolean,reflect:!0},open:{type:Boolean,reflect:!0}}),window.customElements.get("bib-consent")||window.customElements.define("bib-consent",A),q.addToGlobalBib("consent",{}),exports.BibConsent=A; //# sourceMappingURL=bib-consent.cjs.map diff --git a/dist/bib-consent.cjs.map b/dist/bib-consent.cjs.map index 5addf9c..864f21e 100644 --- a/dist/bib-consent.cjs.map +++ b/dist/bib-consent.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent.cjs","sources":["../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../src/components/bib-consent/bib-consent.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{const s=t.composedPath()[0];t.context===this.context&&s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{const e=s.composedPath()[0];if(s.context!==this.context||e===this.host)return;const i=new Set;for(const[s,{consumerHost:e}]of this.subscriptions)i.has(s)||(i.add(s),e.dispatchEvent(new t(this.context,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import { html, LitElement } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { ContextProvider, ContextConsumer } from '@lit/context'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport { addToGlobalBib } from '@/utils/bib.js'\nimport '../bib-button/bib-button-close.js'\nimport './bib-consent-consent-dialog.js'\nimport './bib-consent-preferences-dialog.js'\nimport createConsentClient from './consentClient.js'\nimport { consentContext } from './consent-context.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT, CONSENT_STATES } from './constants.js'\nimport { ConsentTokens } from './ConsentTokens.js'\n\nconst debug = loggerFactory('bib-consent', '#cd5300')\n\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\nexport class BibConsent extends LitElement {\n static properties = {\n serverUrl: {\n type: String,\n attribute: 'server-url',\n reflect: true\n },\n serverRequestTimeout: {\n type: Number,\n attribute: 'server-request-timeout',\n reflect: true\n },\n [SERVER_MODE.LOCAL]: {\n type: Boolean\n },\n state: {\n type: String\n },\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n }\n\n _consentClient\n #consentTokens\n #consentProvider\n #consentConsumer\n #state = CONSENT_STATES.INDETERMINATE\n #consentDialogRef\n #preferencesDialogRef\n\n /**\n * Initializes the `BibConsent` component, setting up the necessary state and references.\n * \n * The constructor performs the following tasks:\n * - Calls the parent class constructor (`super()`)\n * - Initializes the `open` property to `false`, indicating that no dialog is currently open\n * - Sets the `currentDialog` property to `null`, as no dialog is currently open\n * - Creates references to the consent dialog and preferences dialog using `createRef()`\n * - Creates a `ContextProvider` instance for the consent context, with the component instance as the host and an initial value of `null`\n * - Creates a `ContextConsumer` instance for the consent context, with the component instance as the host and the `savePreferences` method as the callback\n */\n constructor() {\n super()\n this.open = false\n this.currentDialog = null\n this.#consentDialogRef = createRef()\n this.#preferencesDialogRef = createRef()\n this.#consentProvider = new ContextProvider(this, { context: consentContext, initialValue: new ConsentTokens() })\n this.#consentConsumer = new ContextConsumer(this, { context: consentContext, callback: this.savePreferences })\n }\n\n /**\n * Gets the current state of the BibConsent component.\n * The state is determined by the user's input. Initially `indeterminate`, it turns `determinate` when the user has indicated their consent preferences.\n * @readonly\n * @returns {import('./constants.js').consentStateTypes} The current state of the BibConsent component, which can be one of the following values:\n * - `indeterminate`: The user has not yet indicated their consent preferences.\n * - `determinate`: The user has made their consent preferences.\n */\n get state() {\n return this.#state\n }\n\n /**\n * Gets the user's consent tokens.\n * @readonly\n * @returns {import('./ConsentTokens.js').ConsentTokens} The user's consent tokens.\n */\n get consentTokens() {\n return this.#consentConsumer.value\n }\n\n /**\n * Initializes the `BibConsent` component, sets up the necessary state and references, and handles events related to the consent client.\n * \n * The `connectedCallback` method performs the following tasks:\n * - Calls the parent class's `connectedCallback` method\n * - Sets the `debug` property to `false` if it is not already defined\n * - Sets the `serverUrl` property to `'https://bib.umontreal.ca/consent/server'` if it is not already defined\n * - Sets the `serverRequestTimeout` property to `SERVER_REQUEST_DEFAULT_TIMEOUT` if it is not already defined\n * - Creates a `ConsentClient` instance and assigns it to the `_consentClient` property\n * - Adds event listeners for the `EVENT_NAMES.READY` and `EVENT_NAMES.UPDATE` events on the `_consentClient` instance\n * - Adds an event listener for the `context-request` event on the component's shadow root, which responds with the current tokens\n */\n async connectedCallback() {\n super.connectedCallback()\n\n this.debug = this.debug || false\n this.serverUrl = this.serverUrl || 'https://bib.umontreal.ca/consent/server'\n this.serverRequestTimeout = this.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n this._consentClient = await createConsentClient({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true })\n\n this._consentClient.addEventListener(EVENT_NAMES.READY, event => {\n const { detail } = event\n\n this.#debug(EVENT_NAMES.READY, 'event: ', event)\n\n if (detail.state() === CONSENT_STATES.DETERMINATE) {\n this.#setValue(detail)\n } else {\n this.#show('consent')\n }\n })\n }\n\n #setValue(value) {\n this.#consentProvider.setValue(value)\n this.#state = this.#consentProvider.value.state()\n }\n\n #debug() {\n if (this.debug) {\n debug(...arguments)\n }\n }\n\n #close(emit = true) {\n this.open = false\n this.currentDialog?.close(emit)\n this.currentDialog = null\n }\n\n /**\n * Closes the current dialog, if any, and sets the `open` property to `false`.\n */\n close() {\n this.#close()\n }\n\n #show(panel = 'consent') {\n\n if (typeof panel !== 'string' && !['consent', 'preferences'].includes(panel)) {\n throw new TypeError(`The panel argument must be a string of either values 'consent' or 'preferences'. `, panel)\n }\n\n this.open = true\n\n if (this.currentDialog) {\n this.#debug('[#show] this.currentDialog', this.currentDialog)\n this.currentDialog.close()\n }\n\n this.#debug('[show]', this.#consentDialogRef.value)\n this.#debug('[show]', this.#preferencesDialogRef.value)\n this.currentDialog = panel === 'consent' ? this.#consentDialogRef.value : this.#preferencesDialogRef.value\n this.currentDialog.show()\n }\n\n /**\n * Shows the consent dialog.\n */\n show() {\n this.#show('consent')\n }\n\n /**\n * Shows the preferences dialog.\n */\n showPreferences() {\n this.#show('preferences')\n }\n\n /**\n * Retrieves the user's consent tokens from the server.\n *\n * @returns {Promise} - A promise that resolves to the user's consent tokens.\n */\n async getTokens() {\n this.#consentTokens = await this._consentClient.getConsentTokens()\n return this.#consentTokens\n }\n\n /**\n * Saves the user's consent tokens to the server.\n *\n * @param {Object} preferences - The user's consent preferences.\n * @returns {Promise} - A promise that resolves to `true` if the preferences were saved successfully, or `false` if there was an error.\n */\n\n async saveTokens(tokens) {\n this.#debug('[save] tokens: ', tokens)\n const consentTokens = ConsentTokens.from(tokens)\n try {\n await this._consentClient.setConsentTokens(consentTokens)\n this.#setValue(consentTokens)\n return true\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Resets the user's consent preferences to their default values.\n *\n * @returns {Promise} - A promise that resolves to the user's reset consent preferences.\n */\n async resetTokens() {\n this.#consentTokens = await this._consentClient.resetTokens()\n return this.#consentTokens\n }\n\n async #handleUpdateEvent(event) {\n this.#debug('[#handleUpdateEvent]', event)\n const success = await this.saveTokens(event.detail)\n this.#debug('[#handleUpdateEvent] success: ', success)\n if (!success) {\n // TODO: show error message\n return\n }\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: this.consentTokens }))\n this.#close()\n }\n\n #handleCloseEvent(event) {\n event.stopPropagation()\n this.#close(false)\n }\n\n render() {\n return html`\n this.#show('preferences')}\" ${ref(this.#consentDialogRef)} @close=\"${this.#handleCloseEvent}\">\n \n `\n }\n}\n\nif (!window.customElements.get('bib-consent')) {\n window.customElements.define('bib-consent', BibConsent)\n}\n\naddToGlobalBib('consent', {})"],"names":["s","this","o","value","setValue","t","i","Object","is","updateObservers","constructor","subscriptions","Map","disposer","addCallback","has","set","delete","consumerHost","h","get","clearCallbacks","clear","e","Event","super","bubbles","composed","context","initialValue","onContextRequest","composedPath","host","stopPropagation","callback","subscribe","onProviderRequest","Set","add","dispatchEvent","attachListeners","addController","addEventListener","hostConnected","debug","loggerFactory","BibConsent","LitElement","__privateAdd","_p_instances","_consentClient","consentTokens","consentProvider","consentConsumer","state","CONSENT_STATES","INDETERMINATE","consentDialogRef","preferencesDialogRef","open","currentDialog","createRef","ContextProvider","consentContext","ConsentTokens","ContextConsumer","s$1","savePreferences","connectedCallback","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","createConsentClient","reflectEvents","EVENT_NAMES","READY","event","detail","DETERMINATE","show","close","showPreferences","getTokens","getConsentTokens","saveTokens","tokens","from","setConsentTokens","error","console","resetTokens","render","html","x","ref","handleCloseEvent","handleUpdateEvent","u_fn","WeakSet","c_fn","r_fn","arguments","h_fn","emit","a_fn","panel","includes","TypeError","success","CustomEvent","UPDATE","static","type","String","attribute","reflect","Number","SERVER_MODE","LOCAL","Boolean","window","customElements","define","addToGlobalBib"],"mappings":";;;;;GAKA,MAAMA,EAAE,YAAY,OAAOC,KAAKC,CAAC,CAAC,SAAIC,CAAMH,GAAGC,KAAKG,SAASJ,EAAE,CAAC,QAAAI,CAASJ,EAAEK,GAAAA,GAAM,MAAMC,EAAED,IAAIE,OAAOC,GAAGR,EAAEC,KAAKC,GAAGD,KAAKC,EAAEF,EAAEM,GAAGL,KAAKQ,iBAAiB,CAAC,WAAAC,CAAYV,GAAGC,KAAKU,cAAc,IAAIC,IAAIX,KAAKQ,gBAAgB,KAAK,IAAA,MAAUT,GAAGa,SAASR,MAAMJ,KAAKU,cAAcX,EAAEC,KAAKC,EAAEG,EAAE,OAAA,IAAWL,IAAIC,KAAKE,MAAMH,EAAE,CAAC,WAAAc,CAAYd,EAAEK,EAAEC,GAAG,IAAIA,EAAE,YAAYN,EAAEC,KAAKE,OAAYQ,KAAAA,cAAcI,IAAIf,IAAIC,KAAKU,cAAcK,IAAIhB,EAAE,CAACa,SAAS,KAAUF,KAAAA,cAAcM,OAAOjB,EAAAA,EAAIkB,aAAab,IAAI,MAAMQ,SAASM,GAAGlB,KAAKU,cAAcS,IAAIpB,GAAGA,EAAEC,KAAKE,MAAMgB,EAAE,CAAC,cAAAE,GAAiBpB,KAAKU,cAAcW,OAAO;;;;;GCAxjB,MAAMC,UAAUC,MAAM,WAAAd,CAAYL,GAAS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AO,CACL0D,KAAMC,QAERrE,MAAO,CACLoE,KAAMO,QACNJ,SAAS,GAEXxD,KAAM,CACJqD,KAAMO,QACNJ,SAAAA,KAiNDK,OAAOC,eAAerG,IAAI,gBAC7BoG,OAAOC,eAAeC,OAAO,cAAe5E,GAG9C6E,EAAcA,eAAC,UAAW,CAAE","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bib-consent.cjs","sources":["../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../src/components/bib-consent/bib-consent.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{const s=t.composedPath()[0];t.context===this.context&&s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{const e=s.composedPath()[0];if(s.context!==this.context||e===this.host)return;const i=new Set;for(const[s,{consumerHost:e}]of this.subscriptions)i.has(s)||(i.add(s),e.dispatchEvent(new t(this.context,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import { html, LitElement } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { ContextProvider, ContextConsumer } from '@lit/context'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport { addToGlobalBib } from '@/utils/bib.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport createConsentClient from './consentClient.js'\nimport { consentContext } from './consent-context.js'\nimport '../bib-button/bib-button-close.js'\nimport './bib-consent-consent-dialog.js'\nimport './bib-consent-preferences-dialog.js'\nimport { CONSENT_STATES, EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT, SERVER_DEFAULT_URL } from './constants.js'\n\nconst debug = loggerFactory('bib-consent', '#cd5300')\n\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\nexport class BibConsent extends LitElement {\n static properties = {\n serverUrl: {\n type: String,\n attribute: 'server-url'\n },\n serverRequestTimeout: {\n type: Number,\n attribute: 'server-request-timeout'\n },\n [SERVER_MODE.LOCAL]: {\n type: Boolean\n },\n state: {\n type: String\n },\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n }\n\n _consentClient\n #consentTokens\n #consentProvider\n #consentConsumer\n #state = CONSENT_STATES.INDETERMINATE\n #consentDialogRef\n #preferencesDialogRef\n\n /**\n * Initializes the `BibConsent` component, setting up the necessary state and references.\n * \n * The constructor performs the following tasks:\n * - Calls the parent class constructor (`super()`)\n * - Initializes the `open` property to `false`, indicating that no dialog is currently open\n * - Sets the `currentDialog` property to `null`, as no dialog is currently open\n * - Creates references to the consent dialog and preferences dialog using `createRef()`\n * - Creates a `ContextProvider` instance for the consent context, with the component instance as the host and an initial value of `null`\n * - Creates a `ContextConsumer` instance for the consent context, with the component instance as the host and the `savePreferences` method as the callback\n */\n constructor() {\n super()\n this.open = false\n this.currentDialog = null\n this.#consentDialogRef = createRef()\n this.#preferencesDialogRef = createRef()\n this.#consentProvider = new ContextProvider(this, { context: consentContext, initialValue: new ConsentTokens() })\n this.#consentConsumer = new ContextConsumer(this, { context: consentContext, callback: this.savePreferences })\n }\n\n /**\n * Gets the current state of the BibConsent component.\n * The state is determined by the user's input. Initially `indeterminate`, it turns `determinate` when the user has indicated their consent preferences.\n * @readonly\n * @returns {import('./constants.js').consentStateTypes} The current state of the BibConsent component, which can be one of the following values:\n * - `indeterminate`: The user has not yet indicated their consent preferences.\n * - `determinate`: The user has made their consent preferences.\n */\n get state() {\n return this.#state\n }\n\n /**\n * Gets the user's consent tokens.\n * @readonly\n * @returns {import('./ConsentTokens.js').ConsentTokens} The user's consent tokens.\n */\n get consentTokens() {\n return this.#consentConsumer.value\n }\n\n /**\n * Initializes the `BibConsent` component, sets up the necessary state and references, and handles events related to the consent client.\n * \n * The `connectedCallback` method performs the following tasks:\n * - Calls the parent class's `connectedCallback` method\n * - Sets the `debug` property to `false` if it is not already defined\n * - Sets the `serverUrl` property to `'https://bib.umontreal.ca/consent/server'` if it is not already defined\n * - Sets the `serverRequestTimeout` property to `SERVER_REQUEST_DEFAULT_TIMEOUT` if it is not already defined\n * - Creates a `ConsentClient` instance and assigns it to the `_consentClient` property\n * - Adds event listeners for the `EVENT_NAMES.READY` and `EVENT_NAMES.UPDATE` events on the `_consentClient` instance\n * - Adds an event listener for the `context-request` event on the component's shadow root, which responds with the current tokens\n */\n async connectedCallback() {\n super.connectedCallback()\n\n this.debug = this.debug || false\n this.serverUrl = this.serverUrl || SERVER_DEFAULT_URL\n this.serverRequestTimeout = this.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n this._consentClient = await createConsentClient({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true })\n\n this._consentClient.addEventListener(EVENT_NAMES.READY, event => {\n const { detail } = event\n\n this.#debug(EVENT_NAMES.READY, 'event: ', event)\n\n if (detail.state() === CONSENT_STATES.DETERMINATE) {\n this.#setValue(detail)\n } else {\n this.#show('consent')\n }\n })\n }\n\n #setValue(value) {\n this.#consentProvider.setValue(value)\n this.#state = this.#consentProvider.value.state()\n }\n\n #debug() {\n if (this.debug) {\n debug(...arguments)\n }\n }\n\n #close(emit = true) {\n this.open = false\n this.currentDialog?.close(emit)\n this.currentDialog = null\n }\n\n /**\n * Closes the current dialog, if any, and sets the `open` property to `false`.\n */\n close() {\n this.#close()\n }\n\n #show(panel = 'consent') {\n\n if (typeof panel !== 'string' && !['consent', 'preferences'].includes(panel)) {\n throw new TypeError(`The panel argument must be a string of either values 'consent' or 'preferences'. `, panel)\n }\n\n this.open = true\n\n if (this.currentDialog) {\n this.#debug('[#show] this.currentDialog', this.currentDialog)\n this.currentDialog.close()\n }\n\n this.#debug('[show]', this.#consentDialogRef.value)\n this.#debug('[show]', this.#preferencesDialogRef.value)\n this.currentDialog = panel === 'consent' ? this.#consentDialogRef.value : this.#preferencesDialogRef.value\n this.currentDialog.show()\n }\n\n /**\n * Shows the consent dialog.\n */\n show() {\n this.#show('consent')\n }\n\n /**\n * Shows the preferences dialog.\n */\n showPreferences() {\n this.#show('preferences')\n }\n\n /**\n * Retrieves the user's consent tokens from the server.\n *\n * @returns {Promise} - A promise that resolves to the user's consent tokens.\n */\n async getTokens() {\n this.#consentTokens = await this._consentClient.getConsentTokens()\n return this.#consentTokens\n }\n\n /**\n * Saves the user's consent tokens to the server.\n *\n * @param {Object} preferences - The user's consent preferences.\n * @returns {Promise} - A promise that resolves to `true` if the preferences were saved successfully, or `false` if there was an error.\n */\n\n async saveTokens(tokens) {\n this.#debug('[save] tokens: ', tokens)\n const consentTokens = ConsentTokens.from(tokens)\n try {\n await this._consentClient.setConsentTokens(consentTokens)\n this.#setValue(consentTokens)\n return true\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Resets the user's consent preferences to their default values.\n *\n * @returns {Promise} - A promise that resolves to the user's reset consent preferences.\n */\n async resetTokens() {\n this.#consentTokens = await this._consentClient.resetTokens()\n return this.#consentTokens\n }\n\n async #handleUpdateEvent(event) {\n this.#debug('[#handleUpdateEvent]', event)\n const success = await this.saveTokens(event.detail)\n this.#debug('[#handleUpdateEvent] success: ', success)\n if (!success) {\n // TODO: show error message\n return\n }\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: this.consentTokens }))\n this.#close()\n }\n\n #handleCloseEvent(event) {\n event.stopPropagation()\n this.#close(false)\n }\n\n render() {\n return html`\n this.#show('preferences')}\" ${ref(this.#consentDialogRef)} @close=\"${this.#handleCloseEvent}\">\n \n `\n }\n}\n\nif (!window.customElements.get('bib-consent')) {\n window.customElements.define('bib-consent', BibConsent)\n}\n\naddToGlobalBib('consent', {})"],"names":["s","this","o","value","setValue","t","i","Object","is","updateObservers","constructor","subscriptions","Map","disposer","addCallback","has","set","delete","consumerHost","h","get","clearCallbacks","clear","e","Event","super","bubbles","composed","context","initialValue","onContextRequest","composedPath","host","stopPropagation","callback","subscribe","onProviderRequest","Set","add","dispatchEvent","attachListeners","addController","addEventListener","hostConnected","debug","loggerFactory","BibConsent","LitElement","__privateAdd","_p_instances","_consentClient","consentTokens","consentProvider","consentConsumer","state","CONSENT_STATES","INDETERMINATE","consentDialogRef","preferencesDialogRef","open","currentDialog","createRef","ContextProvider","consentContext","ConsentTokens","ContextConsumer","s$1","savePreferences","connectedCallback","serverUrl","SERVER_DEFAULT_URL","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","createConsentClient","reflectEvents","EVENT_NAMES","READY","event","detail","DETERMINATE","close","show","showPreferences","getTokens","getConsentTokens","tokens","from","setConsentTokens","error","console","resetTokens","render","html","x","ref","handleCloseEvent","handleUpdateEvent","u_fn","WeakSet","c_fn","r_fn","arguments","h_fn","emit","a_fn","panel","includes","TypeError","success","saveTokens","CustomEvent","UPDATE","static","type","String","attribute","Number","SERVER_MODE","LOCAL","Boolean","reflect","window","customElements","define","addToGlobalBib"],"mappings":";;;;;GAKA,MAAMA,EAAE,YAAY,OAAOC,KAAKC,CAAC,CAAC,SAAIC,CAAMH,GAAGC,KAAKG,SAASJ,EAAE,CAAC,QAAAI,CAASJ,EAAEK,GAAAA,GAAM,MAAMC,EAAED,IAAIE,OAAOC,GAAGR,EA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D,GAAsBvD,MACrGF,KAAK2D,cAAcqB,MACpB,IAwDKe,eAAmBnB,GAClBjC,EAAAA,KAAAA,EAAAA,GAAL3C,UAAY,uBAAwB4E,GACpC,MAAM+B,QAAgB3G,KAAK4G,WAAWhC,EAAMC,QAC5C7E,EAAAA,KAAAA,EAAAA,GAAAA,UAAY,iCAAkC2G,GACzCA,IAIL3G,KAAKsC,cAAc,IAAIuE,YAAYnC,EAAWA,YAACoC,OAAQ,CAAEjC,OAAQ7E,KAAKkD,iBACtElD,OAAAA,EAAAA,GAAAA,KAAAA,MACD,EAEDgG,EAAAF,SAAkBlB,GAChBA,EAAM5C,kBACNhC,EAAAA,KAAK+E,KAAL/E,KAAK+E,MAAAA,EACN,EA5NDgC,EADWlE,eACS,CAClBuB,UAAW,CACT4C,KAAMC,OACNC,UAAW,cAEb5C,qBAAsB,CACpB0C,KAAMG,OACND,UAAW,0BAEb,CAACE,EAAAA,YAAYC,OAAQ,CACnBL,KAAMM,SAERjE,MAAO,CACL2D,KAAMC,QAERtE,MAAO,CACLqE,KAAMM,QACNC,SAAAA,GAEF7D,KAAM,CACJsD,KAAMM,QACNC,SAAAA,KAiNDC,OAAOC,eAAetG,IAAI,gBAC7BqG,OAAOC,eAAeC,OAAO,cAAe7E,GAG9C8E,EAAcA,eAAC,UAAW,CAAE","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/bib-consent.js b/dist/bib-consent.js index aa07323..886553c 100644 --- a/dist/bib-consent.js +++ b/dist/bib-consent.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -17,24 +17,24 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); -var _e, _t, _s, _n, _o, _i, _w_instances, c_fn, r_fn, h_fn, a_fn, l_fn, u_fn; +var _e, _t, _s, _n, _o, _i, _E_instances, c_fn, r_fn, h_fn, a_fn, l_fn, u_fn; import { s as e, x as t } from "./lit-element-Dj1nHH6C.js"; import { e as s, n } from "./ref-B-kqFHPy.js"; -import { s as o, a as i } from "./bib-consent-preferences-dialog-ByH_MjP-.js"; -import { l as r } from "./logger-CcMMJUPZ.js"; -import { a as c } from "./bib-BCofrvPu.js"; +import { s as o, a as i } from "./bib-consent-preferences-dialog-Dlk44SVl.js"; +import { l as r } from "./logger-EcO8T52u.js"; +import { a as c } from "./bib-1rVnZJhT.js"; +import { ConsentTokens as a } from "./ConsentTokens.js"; +import h from "./consentClient.js"; +import { consentContext as l } from "./consent-context.js"; import "./bib-button-close.js"; import "./bib-consent-consent-dialog.js"; -import a from "./consentClient.js"; -import { consentContext as h } from "./consent-context.js"; -import { S as l, C as u, b as d, E as p } from "./constants-B2WJQGFq.js"; -import { ConsentTokens as b } from "./ConsentTokens.js"; +import { S as u, C as d, f as p, b, E as v } from "./constants-D0hS4kJm.js"; /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class v { +class g { get value() { return this.o; } @@ -67,12 +67,12 @@ class v { * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class g extends Event { +class f extends Event { constructor(e2) { super("context-provider", { bubbles: true, composed: true }), this.context = e2; } } -class f extends v { +class m extends g { constructor(e2, t2, s2) { super(void 0 !== t2.context ? t2.initialValue : s2), this.onContextRequest = (e3) => { const t3 = e3.composedPath()[0]; @@ -89,22 +89,22 @@ class f extends v { this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest); } hostConnected() { - this.host.dispatchEvent(new g(this.context)); + this.host.dispatchEvent(new f(this.context)); } } -const m = r("bib-consent", "#cd5300"); -class w extends e { +const w = r("bib-consent", "#cd5300"); +class E extends e { constructor() { super(); - __privateAdd(this, _w_instances); + __privateAdd(this, _E_instances); __publicField(this, "_consentClient"); __privateAdd(this, _e); __privateAdd(this, _t); __privateAdd(this, _s); - __privateAdd(this, _n, u.INDETERMINATE); + __privateAdd(this, _n, d.INDETERMINATE); __privateAdd(this, _o); __privateAdd(this, _i); - this.open = false, this.currentDialog = null, __privateSet(this, _o, s()), __privateSet(this, _i, s()), __privateSet(this, _t, new f(this, { context: h, initialValue: new b() })), __privateSet(this, _s, new i(this, { context: h, callback: this.savePreferences })); + this.open = false, this.currentDialog = null, __privateSet(this, _o, s()), __privateSet(this, _i, s()), __privateSet(this, _t, new m(this, { context: l, initialValue: new a() })), __privateSet(this, _s, new i(this, { context: l, callback: this.savePreferences })); } get state() { return __privateGet(this, _n); @@ -113,28 +113,28 @@ class w extends e { return __privateGet(this, _s).value; } async connectedCallback() { - super.connectedCallback(), this.debug = this.debug || false, this.serverUrl = this.serverUrl || "https://bib.umontreal.ca/consent/server", this.serverRequestTimeout = this.serverRequestTimeout || d, this._consentClient = await a({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true }), this._consentClient.addEventListener(p.READY, (e2) => { + super.connectedCallback(), this.debug = this.debug || false, this.serverUrl = this.serverUrl || p, this.serverRequestTimeout = this.serverRequestTimeout || b, this._consentClient = await h({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true }), this._consentClient.addEventListener(v.READY, (e2) => { const { detail: t2 } = e2; - __privateMethod(this, _w_instances, r_fn).call(this, p.READY, "event: ", e2), t2.state() === u.DETERMINATE ? __privateMethod(this, _w_instances, c_fn).call(this, t2) : __privateMethod(this, _w_instances, a_fn).call(this, "consent"); + __privateMethod(this, _E_instances, r_fn).call(this, v.READY, "event: ", e2), t2.state() === d.DETERMINATE ? __privateMethod(this, _E_instances, c_fn).call(this, t2) : __privateMethod(this, _E_instances, a_fn).call(this, "consent"); }); } close() { - __privateMethod(this, _w_instances, h_fn).call(this); + __privateMethod(this, _E_instances, h_fn).call(this); } show() { - __privateMethod(this, _w_instances, a_fn).call(this, "consent"); + __privateMethod(this, _E_instances, a_fn).call(this, "consent"); } showPreferences() { - __privateMethod(this, _w_instances, a_fn).call(this, "preferences"); + __privateMethod(this, _E_instances, a_fn).call(this, "preferences"); } async getTokens() { return __privateSet(this, _e, await this._consentClient.getConsentTokens()), __privateGet(this, _e); } async saveTokens(e2) { - __privateMethod(this, _w_instances, r_fn).call(this, "[save] tokens: ", e2); - const t2 = b.from(e2); + __privateMethod(this, _E_instances, r_fn).call(this, "[save] tokens: ", e2); + const t2 = a.from(e2); try { - return await this._consentClient.setConsentTokens(t2), __privateMethod(this, _w_instances, c_fn).call(this, t2), true; + return await this._consentClient.setConsentTokens(t2), __privateMethod(this, _E_instances, c_fn).call(this, t2), true; } catch (e3) { throw console.error("[savePreferences] error: ", e3), e3; } @@ -143,7 +143,7 @@ class w extends e { return __privateSet(this, _e, await this._consentClient.resetTokens()), __privateGet(this, _e); } render() { - return t``; + return t``; } } _e = new WeakMap(); @@ -152,31 +152,31 @@ _s = new WeakMap(); _n = new WeakMap(); _o = new WeakMap(); _i = new WeakMap(); -_w_instances = new WeakSet(); +_E_instances = new WeakSet(); c_fn = function(e2) { __privateGet(this, _t).setValue(e2), __privateSet(this, _n, __privateGet(this, _t).value.state()); }; r_fn = function() { - this.debug && m(...arguments); + this.debug && w(...arguments); }; h_fn = function(e2 = true) { this.open = false, this.currentDialog?.close(e2), this.currentDialog = null; }; a_fn = function(e2 = "consent") { if ("string" != typeof e2 && !["consent", "preferences"].includes(e2)) throw new TypeError("The panel argument must be a string of either values 'consent' or 'preferences'. ", e2); - this.open = true, this.currentDialog && (__privateMethod(this, _w_instances, r_fn).call(this, "[#show] this.currentDialog", this.currentDialog), this.currentDialog.close()), __privateMethod(this, _w_instances, r_fn).call(this, "[show]", __privateGet(this, _o).value), __privateMethod(this, _w_instances, r_fn).call(this, "[show]", __privateGet(this, _i).value), this.currentDialog = "consent" === e2 ? __privateGet(this, _o).value : __privateGet(this, _i).value, this.currentDialog.show(); + this.open = true, this.currentDialog && (__privateMethod(this, _E_instances, r_fn).call(this, "[#show] this.currentDialog", this.currentDialog), this.currentDialog.close()), __privateMethod(this, _E_instances, r_fn).call(this, "[show]", __privateGet(this, _o).value), __privateMethod(this, _E_instances, r_fn).call(this, "[show]", __privateGet(this, _i).value), this.currentDialog = "consent" === e2 ? __privateGet(this, _o).value : __privateGet(this, _i).value, this.currentDialog.show(); }; l_fn = async function(e2) { - __privateMethod(this, _w_instances, r_fn).call(this, "[#handleUpdateEvent]", e2); + __privateMethod(this, _E_instances, r_fn).call(this, "[#handleUpdateEvent]", e2); const t2 = await this.saveTokens(e2.detail); - __privateMethod(this, _w_instances, r_fn).call(this, "[#handleUpdateEvent] success: ", t2), t2 && (this.dispatchEvent(new CustomEvent(p.UPDATE, { detail: this.consentTokens })), __privateMethod(this, _w_instances, h_fn).call(this)); + __privateMethod(this, _E_instances, r_fn).call(this, "[#handleUpdateEvent] success: ", t2), t2 && (this.dispatchEvent(new CustomEvent(v.UPDATE, { detail: this.consentTokens })), __privateMethod(this, _E_instances, h_fn).call(this)); }; u_fn = function(e2) { - e2.stopPropagation(), __privateMethod(this, _w_instances, h_fn).call(this, false); + e2.stopPropagation(), __privateMethod(this, _E_instances, h_fn).call(this, false); }; -__publicField(w, "properties", { serverUrl: { type: String, attribute: "server-url", reflect: true }, serverRequestTimeout: { type: Number, attribute: "server-request-timeout", reflect: true }, [l.LOCAL]: { type: Boolean }, state: { type: String }, debug: { type: Boolean, reflect: true }, open: { type: Boolean, reflect: true } }); -window.customElements.get("bib-consent") || window.customElements.define("bib-consent", w), c("consent", {}); +__publicField(E, "properties", { serverUrl: { type: String, attribute: "server-url" }, serverRequestTimeout: { type: Number, attribute: "server-request-timeout" }, [u.LOCAL]: { type: Boolean }, state: { type: String }, debug: { type: Boolean, reflect: true }, open: { type: Boolean, reflect: true } }); +window.customElements.get("bib-consent") || window.customElements.define("bib-consent", E), c("consent", {}); export { - w as BibConsent + E as BibConsent }; //# sourceMappingURL=bib-consent.js.map diff --git a/dist/bib-consent.js.map b/dist/bib-consent.js.map index 636fa69..d2534c9 100644 --- a/dist/bib-consent.js.map +++ b/dist/bib-consent.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent.js","sources":["../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../src/components/bib-consent/bib-consent.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{const s=t.composedPath()[0];t.context===this.context&&s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{const e=s.composedPath()[0];if(s.context!==this.context||e===this.host)return;const i=new Set;for(const[s,{consumerHost:e}]of this.subscriptions)i.has(s)||(i.add(s),e.dispatchEvent(new t(this.context,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import { html, LitElement } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { ContextProvider, ContextConsumer } from '@lit/context'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport { addToGlobalBib } from '@/utils/bib.js'\nimport '../bib-button/bib-button-close.js'\nimport './bib-consent-consent-dialog.js'\nimport './bib-consent-preferences-dialog.js'\nimport createConsentClient from './consentClient.js'\nimport { consentContext } from './consent-context.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT, CONSENT_STATES } from './constants.js'\nimport { ConsentTokens } from './ConsentTokens.js'\n\nconst debug = loggerFactory('bib-consent', '#cd5300')\n\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\nexport class BibConsent extends LitElement {\n static properties = {\n serverUrl: {\n type: String,\n attribute: 'server-url',\n reflect: true\n },\n serverRequestTimeout: {\n type: Number,\n attribute: 'server-request-timeout',\n reflect: true\n },\n [SERVER_MODE.LOCAL]: {\n type: Boolean\n },\n state: {\n type: String\n },\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n }\n\n _consentClient\n #consentTokens\n #consentProvider\n #consentConsumer\n #state = CONSENT_STATES.INDETERMINATE\n #consentDialogRef\n #preferencesDialogRef\n\n /**\n * Initializes the `BibConsent` component, setting up the necessary state and references.\n * \n * The constructor performs the following tasks:\n * - Calls the parent class constructor (`super()`)\n * - Initializes the `open` property to `false`, indicating that no dialog is currently open\n * - Sets the `currentDialog` property to `null`, as no dialog is currently open\n * - Creates references to the consent dialog and preferences dialog using `createRef()`\n * - Creates a `ContextProvider` instance for the consent context, with the component instance as the host and an initial value of `null`\n * - Creates a `ContextConsumer` instance for the consent context, with the component instance as the host and the `savePreferences` method as the callback\n */\n constructor() {\n super()\n this.open = false\n this.currentDialog = null\n this.#consentDialogRef = createRef()\n this.#preferencesDialogRef = createRef()\n this.#consentProvider = new ContextProvider(this, { context: consentContext, initialValue: new ConsentTokens() })\n this.#consentConsumer = new ContextConsumer(this, { context: consentContext, callback: this.savePreferences })\n }\n\n /**\n * Gets the current state of the BibConsent component.\n * The state is determined by the user's input. Initially `indeterminate`, it turns `determinate` when the user has indicated their consent preferences.\n * @readonly\n * @returns {import('./constants.js').consentStateTypes} The current state of the BibConsent component, which can be one of the following values:\n * - `indeterminate`: The user has not yet indicated their consent preferences.\n * - `determinate`: The user has made their consent preferences.\n */\n get state() {\n return this.#state\n }\n\n /**\n * Gets the user's consent tokens.\n * @readonly\n * @returns {import('./ConsentTokens.js').ConsentTokens} The user's consent tokens.\n */\n get consentTokens() {\n return this.#consentConsumer.value\n }\n\n /**\n * Initializes the `BibConsent` component, sets up the necessary state and references, and handles events related to the consent client.\n * \n * The `connectedCallback` method performs the following tasks:\n * - Calls the parent class's `connectedCallback` method\n * - Sets the `debug` property to `false` if it is not already defined\n * - Sets the `serverUrl` property to `'https://bib.umontreal.ca/consent/server'` if it is not already defined\n * - Sets the `serverRequestTimeout` property to `SERVER_REQUEST_DEFAULT_TIMEOUT` if it is not already defined\n * - Creates a `ConsentClient` instance and assigns it to the `_consentClient` property\n * - Adds event listeners for the `EVENT_NAMES.READY` and `EVENT_NAMES.UPDATE` events on the `_consentClient` instance\n * - Adds an event listener for the `context-request` event on the component's shadow root, which responds with the current tokens\n */\n async connectedCallback() {\n super.connectedCallback()\n\n this.debug = this.debug || false\n this.serverUrl = this.serverUrl || 'https://bib.umontreal.ca/consent/server'\n this.serverRequestTimeout = this.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n this._consentClient = await createConsentClient({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true })\n\n this._consentClient.addEventListener(EVENT_NAMES.READY, event => {\n const { detail } = event\n\n this.#debug(EVENT_NAMES.READY, 'event: ', event)\n\n if (detail.state() === CONSENT_STATES.DETERMINATE) {\n this.#setValue(detail)\n } else {\n this.#show('consent')\n }\n })\n }\n\n #setValue(value) {\n this.#consentProvider.setValue(value)\n this.#state = this.#consentProvider.value.state()\n }\n\n #debug() {\n if (this.debug) {\n debug(...arguments)\n }\n }\n\n #close(emit = true) {\n this.open = false\n this.currentDialog?.close(emit)\n this.currentDialog = null\n }\n\n /**\n * Closes the current dialog, if any, and sets the `open` property to `false`.\n */\n close() {\n this.#close()\n }\n\n #show(panel = 'consent') {\n\n if (typeof panel !== 'string' && !['consent', 'preferences'].includes(panel)) {\n throw new TypeError(`The panel argument must be a string of either values 'consent' or 'preferences'. `, panel)\n }\n\n this.open = true\n\n if (this.currentDialog) {\n this.#debug('[#show] this.currentDialog', this.currentDialog)\n this.currentDialog.close()\n }\n\n this.#debug('[show]', this.#consentDialogRef.value)\n this.#debug('[show]', this.#preferencesDialogRef.value)\n this.currentDialog = panel === 'consent' ? this.#consentDialogRef.value : this.#preferencesDialogRef.value\n this.currentDialog.show()\n }\n\n /**\n * Shows the consent dialog.\n */\n show() {\n this.#show('consent')\n }\n\n /**\n * Shows the preferences dialog.\n */\n showPreferences() {\n this.#show('preferences')\n }\n\n /**\n * Retrieves the user's consent tokens from the server.\n *\n * @returns {Promise} - A promise that resolves to the user's consent tokens.\n */\n async getTokens() {\n this.#consentTokens = await this._consentClient.getConsentTokens()\n return this.#consentTokens\n }\n\n /**\n * Saves the user's consent tokens to the server.\n *\n * @param {Object} preferences - The user's consent preferences.\n * @returns {Promise} - A promise that resolves to `true` if the preferences were saved successfully, or `false` if there was an error.\n */\n\n async saveTokens(tokens) {\n this.#debug('[save] tokens: ', tokens)\n const consentTokens = ConsentTokens.from(tokens)\n try {\n await this._consentClient.setConsentTokens(consentTokens)\n this.#setValue(consentTokens)\n return true\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Resets the user's consent preferences to their default values.\n *\n * @returns {Promise} - A promise that resolves to the user's reset consent preferences.\n */\n async resetTokens() {\n this.#consentTokens = await this._consentClient.resetTokens()\n return this.#consentTokens\n }\n\n async #handleUpdateEvent(event) {\n this.#debug('[#handleUpdateEvent]', event)\n const success = await this.saveTokens(event.detail)\n this.#debug('[#handleUpdateEvent] success: ', success)\n if (!success) {\n // TODO: show error message\n return\n }\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: this.consentTokens }))\n this.#close()\n }\n\n #handleCloseEvent(event) {\n event.stopPropagation()\n this.#close(false)\n }\n\n render() {\n return html`\n this.#show('preferences')}\" ${ref(this.#consentDialogRef)} @close=\"${this.#handleCloseEvent}\">\n \n `\n }\n}\n\nif (!window.customElements.get('bib-consent')) {\n window.customElements.define('bib-consent', BibConsent)\n}\n\naddToGlobalBib('consent', {})"],"names":["s","this","o","value","setValue","t","i","Object","is","updateObservers","subscriptions","Map","disposer","has","set","delete","consumerHost","h","get","clearCallbacks","clear","e","Event","super","bubbles","composed","context","initialValue","onContextRequest","composedPath","host","stopPropagation","addCallback","callback","subscribe","onProviderRequest","Set","add","dispatchEvent","attachListeners","addController","addEventListener","debug","loggerFactory","BibConsent","LitElement","_consentClient","consentTokens","consentProvider","consentConsumer","state","CONSENT_STATES","INDETERMINATE","consentDialogRef","preferencesDialogRef","open","currentDialog","createRef","ContextProvider","consentContext","ConsentTokens","ContextConsumer","savePreferences","connectedCallback","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","createConsentClient","reflectEvents","EVENT_NAMES","READY","event","detail","DETERMINATE","show","close","getConsentTokens","tokens","from","setConsentTokens","error","console","resetTokens","html","handleUpdateEvent","ref","arguments","emit","panel","includes","TypeError","success","saveTokens","CustomEvent","UPDATE","handleCloseEvent","static","type","String","attribute","reflect","Number","SERVER_MODE","LOCAL","Boolean","window","customElements","define","addToGlobalBib"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAMA,EAAAA;AAAAA,EAAE,YAAY;AAAA,WAAOC,KAAKC;AAAAA,EAAC;AAAA,EAAC,IAAIC,MAAMH,IAAGC;AAAAA,SAAKG,SAASJ,EAAE;AAAA,EAAA;AAAA,EAAC,SAASA,IAAEK,KAAAA;AAAM,UAAMC,KAAED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OC,eAAeC,OAAO,eAAe/D,CAAAA,GAG9CgE,EAAe,WAAW,CAAE;","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bib-consent.js","sources":["../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../src/components/bib-consent/bib-consent.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{const s=t.composedPath()[0];t.context===this.context&&s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{const e=s.composedPath()[0];if(s.context!==this.context||e===this.host)return;const i=new Set;for(const[s,{consumerHost:e}]of this.subscriptions)i.has(s)||(i.add(s),e.dispatchEvent(new t(this.context,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import { html, LitElement } from 'lit'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { ContextProvider, ContextConsumer } from '@lit/context'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport { addToGlobalBib } from '@/utils/bib.js'\nimport { ConsentTokens } from './ConsentTokens.js'\nimport createConsentClient from './consentClient.js'\nimport { consentContext } from './consent-context.js'\nimport '../bib-button/bib-button-close.js'\nimport './bib-consent-consent-dialog.js'\nimport './bib-consent-preferences-dialog.js'\nimport { CONSENT_STATES, EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT, SERVER_DEFAULT_URL } from './constants.js'\n\nconst debug = loggerFactory('bib-consent', '#cd5300')\n\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\n/**\n * The `BibConsent` class is a custom web component that provides a user interface for managing consent preferences.\n *\n * It includes the following functionality:\n * - Fetching and displaying the user's consent preferences from a server\n * - Allowing the user to update their consent preferences\n * - Saving the updated consent preferences to the server\n * - Providing a consent dialog and a preferences dialog for the user to interact with\n *\n * The component can be configured with the following properties:\n * - `serverUrl`: the URL of the server where the consent preferences are stored\n * - `serverRequestTimeout`: the timeout for requests to the server\n * - `[SERVER_MODE.LOCAL]`: a boolean indicating whether the component is running in local mode\n * - `debug`: a boolean indicating whether debug logging should be enabled\n * - `open`: a boolean indicating whether the consent dialog or preferences dialog is currently open\n *\n * The component uses the `@lit/context` library to manage the consent preferences as a shared context, and the `createConsentClient` function to interact with the server.\n */\nexport class BibConsent extends LitElement {\n static properties = {\n serverUrl: {\n type: String,\n attribute: 'server-url'\n },\n serverRequestTimeout: {\n type: Number,\n attribute: 'server-request-timeout'\n },\n [SERVER_MODE.LOCAL]: {\n type: Boolean\n },\n state: {\n type: String\n },\n debug: {\n type: Boolean,\n reflect: true\n },\n open: {\n type: Boolean,\n reflect: true\n },\n }\n\n _consentClient\n #consentTokens\n #consentProvider\n #consentConsumer\n #state = CONSENT_STATES.INDETERMINATE\n #consentDialogRef\n #preferencesDialogRef\n\n /**\n * Initializes the `BibConsent` component, setting up the necessary state and references.\n * \n * The constructor performs the following tasks:\n * - Calls the parent class constructor (`super()`)\n * - Initializes the `open` property to `false`, indicating that no dialog is currently open\n * - Sets the `currentDialog` property to `null`, as no dialog is currently open\n * - Creates references to the consent dialog and preferences dialog using `createRef()`\n * - Creates a `ContextProvider` instance for the consent context, with the component instance as the host and an initial value of `null`\n * - Creates a `ContextConsumer` instance for the consent context, with the component instance as the host and the `savePreferences` method as the callback\n */\n constructor() {\n super()\n this.open = false\n this.currentDialog = null\n this.#consentDialogRef = createRef()\n this.#preferencesDialogRef = createRef()\n this.#consentProvider = new ContextProvider(this, { context: consentContext, initialValue: new ConsentTokens() })\n this.#consentConsumer = new ContextConsumer(this, { context: consentContext, callback: this.savePreferences })\n }\n\n /**\n * Gets the current state of the BibConsent component.\n * The state is determined by the user's input. Initially `indeterminate`, it turns `determinate` when the user has indicated their consent preferences.\n * @readonly\n * @returns {import('./constants.js').consentStateTypes} The current state of the BibConsent component, which can be one of the following values:\n * - `indeterminate`: The user has not yet indicated their consent preferences.\n * - `determinate`: The user has made their consent preferences.\n */\n get state() {\n return this.#state\n }\n\n /**\n * Gets the user's consent tokens.\n * @readonly\n * @returns {import('./ConsentTokens.js').ConsentTokens} The user's consent tokens.\n */\n get consentTokens() {\n return this.#consentConsumer.value\n }\n\n /**\n * Initializes the `BibConsent` component, sets up the necessary state and references, and handles events related to the consent client.\n * \n * The `connectedCallback` method performs the following tasks:\n * - Calls the parent class's `connectedCallback` method\n * - Sets the `debug` property to `false` if it is not already defined\n * - Sets the `serverUrl` property to `'https://bib.umontreal.ca/consent/server'` if it is not already defined\n * - Sets the `serverRequestTimeout` property to `SERVER_REQUEST_DEFAULT_TIMEOUT` if it is not already defined\n * - Creates a `ConsentClient` instance and assigns it to the `_consentClient` property\n * - Adds event listeners for the `EVENT_NAMES.READY` and `EVENT_NAMES.UPDATE` events on the `_consentClient` instance\n * - Adds an event listener for the `context-request` event on the component's shadow root, which responds with the current tokens\n */\n async connectedCallback() {\n super.connectedCallback()\n\n this.debug = this.debug || false\n this.serverUrl = this.serverUrl || SERVER_DEFAULT_URL\n this.serverRequestTimeout = this.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n this._consentClient = await createConsentClient({ host: this, serverUrl: this.serverUrl, serverRequestTimeout: this.serverRequestTimeout, reflectEvents: true })\n\n this._consentClient.addEventListener(EVENT_NAMES.READY, event => {\n const { detail } = event\n\n this.#debug(EVENT_NAMES.READY, 'event: ', event)\n\n if (detail.state() === CONSENT_STATES.DETERMINATE) {\n this.#setValue(detail)\n } else {\n this.#show('consent')\n }\n })\n }\n\n #setValue(value) {\n this.#consentProvider.setValue(value)\n this.#state = this.#consentProvider.value.state()\n }\n\n #debug() {\n if (this.debug) {\n debug(...arguments)\n }\n }\n\n #close(emit = true) {\n this.open = false\n this.currentDialog?.close(emit)\n this.currentDialog = null\n }\n\n /**\n * Closes the current dialog, if any, and sets the `open` property to `false`.\n */\n close() {\n this.#close()\n }\n\n #show(panel = 'consent') {\n\n if (typeof panel !== 'string' && !['consent', 'preferences'].includes(panel)) {\n throw new TypeError(`The panel argument must be a string of either values 'consent' or 'preferences'. `, panel)\n }\n\n this.open = true\n\n if (this.currentDialog) {\n this.#debug('[#show] this.currentDialog', this.currentDialog)\n this.currentDialog.close()\n }\n\n this.#debug('[show]', this.#consentDialogRef.value)\n this.#debug('[show]', this.#preferencesDialogRef.value)\n this.currentDialog = panel === 'consent' ? this.#consentDialogRef.value : this.#preferencesDialogRef.value\n this.currentDialog.show()\n }\n\n /**\n * Shows the consent dialog.\n */\n show() {\n this.#show('consent')\n }\n\n /**\n * Shows the preferences dialog.\n */\n showPreferences() {\n this.#show('preferences')\n }\n\n /**\n * Retrieves the user's consent tokens from the server.\n *\n * @returns {Promise} - A promise that resolves to the user's consent tokens.\n */\n async getTokens() {\n this.#consentTokens = await this._consentClient.getConsentTokens()\n return this.#consentTokens\n }\n\n /**\n * Saves the user's consent tokens to the server.\n *\n * @param {Object} preferences - The user's consent preferences.\n * @returns {Promise} - A promise that resolves to `true` if the preferences were saved successfully, or `false` if there was an error.\n */\n\n async saveTokens(tokens) {\n this.#debug('[save] tokens: ', tokens)\n const consentTokens = ConsentTokens.from(tokens)\n try {\n await this._consentClient.setConsentTokens(consentTokens)\n this.#setValue(consentTokens)\n return true\n } catch (error) {\n console.error('[savePreferences] error: ', error)\n throw error\n }\n }\n\n /**\n * Resets the user's consent preferences to their default values.\n *\n * @returns {Promise} - A promise that resolves to the user's reset consent preferences.\n */\n async resetTokens() {\n this.#consentTokens = await this._consentClient.resetTokens()\n return this.#consentTokens\n }\n\n async #handleUpdateEvent(event) {\n this.#debug('[#handleUpdateEvent]', event)\n const success = await this.saveTokens(event.detail)\n this.#debug('[#handleUpdateEvent] success: ', success)\n if (!success) {\n // TODO: show error message\n return\n }\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: this.consentTokens }))\n this.#close()\n }\n\n #handleCloseEvent(event) {\n event.stopPropagation()\n this.#close(false)\n }\n\n render() {\n return html`\n this.#show('preferences')}\" ${ref(this.#consentDialogRef)} @close=\"${this.#handleCloseEvent}\">\n \n `\n }\n}\n\nif (!window.customElements.get('bib-consent')) {\n window.customElements.define('bib-consent', BibConsent)\n}\n\naddToGlobalBib('consent', {})"],"names":["s","this","o","value","setValue","t","i","Object","is","updateObservers","subscriptions","Map","disposer","has","set","delete","consumerHost","h","get","clearCallbacks","clear","e","Event","super","bubbles","composed","context","initialValue","onContextRequest","composedPath","host","stopPropagation","addCallback","callback","subscribe","onProviderRequest","Set","add","dispatchEvent","attachListeners","addController","addEventListener","hostConnected","debug","loggerFactory","BibConsent","LitElement","static","_consentClient","consentTokens","consentProvider","consentConsumer","state","CONSENT_STATES","INDETERMINATE","consentDialogRef","preferencesDialogRef","open","currentDialog","createRef","ContextProvider","consentContext","ConsentTokens","ContextConsumer","savePreferences","connectedCallback","serverUrl","SERVER_DEFAULT_URL","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","createConsentClient","reflectEvents","EVENT_NAMES","READY","event","detail","DETERMINATE","showPreferences","show","getTokens","getConsentTokens","saveTokens","tokens","from","setConsentTokens","error","console","resetTokens","html","handleUpdateEvent","ref","arguments","close","emit","panel","includes","TypeError","success","CustomEvent","UPDATE","handleCloseEvent","type","String","attribute","Number","SERVER_MODE","LOCAL","Boolean","reflect","window","customElements","define","addToGlobalBib"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAMA,EAAAA;AAAAA,EAAE,YAAY;AAAA,WAAOC,KAAKC;AAAAA,EAAC;AAAA,EAAC,IAAIC,MAAMH,IAAGC;AAAAA,SAAKG,SAASJ,EAAE;AAAA,EAAA;AAAA,EAAC,SAASA,IAAEK,KAAAA;AAAM,UAAMC,KAAED,MAAIE,CAAAA,OAAOC,GAAGR,IAAEC,KAAKC,CAAGD;AAAAA,SAAKC,IAAEF,IAAEM,MAAGL,KAAKQ;EAAiB;AAAA,EAAC,YAAYT,IAAAA;AAAGC,SAAKS,gBAAc,oBAAIC,O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C/CzD,KAAKyD,cAAckC,MAGrB3F,IAAAA,sBAAAA,oBAAAA,WAAY,UAAUA,mBAAKsD,IAAkBpD,QAC7CF,sBAAAA,oBAAAA,WAAY,UAAUA,mBAAKuD,IAAsBrD,QACjDF,KAAKyD,gBAA0B,cAAVoC,KAAsB7F,mBAAKsD,IAAkBpD,QAAQF,mBAAAA,IAA2BE,OACrGF,KAAKyD,cAAcoB,KAAAA;AACpB;AAwDD,OAAMW,eAAmBf,IAAAA;AACvBzE,wBAAK0C,oBAAL1C,WAAY,wBAAwByE;AACpC,QAAMuB,KAAgBhG,MAAAA,KAAKgF,WAAWP,GAAMC,MAC5C1E;AAAAA,wBAAAA,oBAAAA,WAAY,kCAAkCgG,KACzCA,OAILhG,KAAKqC,cAAc,IAAI4D,YAAY1B,EAAY2B,QAAQ,EAAExB,QAAQ1E,KAAKgD,cACtEhD,CAAAA,CAAAA,GAAAA,sBAAAA,oBAAAA;AACD;AAED,OAAAmG,SAAkB1B,IAAAA;AAChBA,EAAAA,GAAM3C,gBAAAA,GACN9B,sBAAK2F,oBAAL3F,WAAK2F;AACN;AA5ND7C,cADWF,GACXE,cAAoB,EAClBmB,WAAW,EACTmC,MAAMC,QACNC,WAAW,aAEbnC,GAAAA,sBAAsB,EACpBiC,MAAMG,QACND,WAAW,4BAEb,CAACE,EAAYC,KAAQ,GAAA,EACnBL,MAAMM,QAAAA,GAERvD,OAAO,EACLiD,MAAMC,OAAAA,GAER3D,OAAO,EACL0D,MAAMM,SACNC,SAAS,KAAA,GAEXnD,MAAM,EACJ4C,MAAMM,SACNC,SAAAA,KAIJ5D,EAAAA;AA6MG6D,OAAOC,eAAe5F,IAAI,aAC7B2F,KAAAA,OAAOC,eAAeC,OAAO,eAAelE,CAAAA,GAG9CmE,EAAe,WAAW,CAAE;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/bib-footer-copyright.cjs b/dist/bib-footer-copyright.cjs index ecba06c..df7a0f5 100644 --- a/dist/bib-footer-copyright.cjs +++ b/dist/bib-footer-copyright.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-footer-copyright.js b/dist/bib-footer-copyright.js index b43eda9..699914f 100644 --- a/dist/bib-footer-copyright.js +++ b/dist/bib-footer-copyright.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-footer.cjs b/dist/bib-footer.cjs index beedc55..e4b0186 100644 --- a/dist/bib-footer.cjs +++ b/dist/bib-footer.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-footer.js b/dist/bib-footer.js index be5f2ce..5309a6a 100644 --- a/dist/bib-footer.js +++ b/dist/bib-footer.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-gtm.cjs b/dist/bib-gtm.cjs index 58ec107..4de7abc 100644 --- a/dist/bib-gtm.cjs +++ b/dist/bib-gtm.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,n=Object.defineProperty,o=e=>{throw TypeError(e)},s=(e,t,o)=>((e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o),a=(e,t,n)=>(((e,t,n)=>{t.has(e)||o("Cannot "+n)})(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./lit-element-BHNMc-Kg.cjs"),r=require("./bib-qo8fsCxm.cjs"),c=require("./ConsentTokens.cjs"),d=require("./constants.cjs");class l extends i.s{constructor(){var n,s,i;super(),n=this,(s=e).has(n)?o("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),this.hidden=!0,this.containerId=d.GTM_CONTAINER_ID,a(this,e,t).call(this)}}e=new WeakSet,t=function(){const e=this.containerId;setTimeout((()=>{const t=document.querySelector("bib-consent");if(t){let n=function(t){const n=t.detail;if(null!==n){!function(e){const t="bib-GTM-script";if(!document.querySelector(`script#${t}`)){var n=document.createElement("script");n.id=t,n.async=!0,n.src=`https://www.googletagmanager.com/gtm.js?id=${e}`;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(n,o)}}(e);const{analytics_consent:t,ad_consent:o}=n;s("consent","update",{ad_user_data:o,ad_personalization:o,ad_storage:o,analytics_storage:t})}};const o=globalThis.dataLayer=globalThis.dataLayer||[],s=globalThis.gtag=globalThis.gtag||function(){o.push(arguments)},a=new c.ConsentTokens(!1);s("consent","default",a.toGTM()),o.push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t.addEventListener("bib:consent:ready",n),t.addEventListener("bib:consent:update",n)}else console.warn("No bib-consent element found")}))},s(l,"properties",{containerId:{type:String,attribute:"container-id"},hidden:{type:Boolean}}),s(l,"styles",[i.i`${i.r("@layer component{:host(hidden){display:none}}")}`]),window.customElements.get("bib-gtm")||window.customElements.define("bib-gtm",l),r.addToGlobalBib("gtm",{}),exports.BibGtm=l; +var e,t,n=Object.defineProperty,o=e=>{throw TypeError(e)},s=(e,t,o)=>((e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o),a=(e,t,n)=>(((e,t,n)=>{t.has(e)||o("Cannot "+n)})(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./lit-element-BHNMc-Kg.cjs"),r=require("./bib-SERnlaT3.cjs"),c=require("./ConsentTokens.cjs"),d=require("./constants.cjs");class l extends i.s{constructor(){var n,s,i;super(),n=this,(s=e).has(n)?o("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),this.hidden=!0,this.containerId=d.GTM_CONTAINER_ID,a(this,e,t).call(this)}}e=new WeakSet,t=function(){const e=this.containerId;setTimeout((()=>{const t=document.querySelector("bib-consent");if(t){let n=function(t){const n=t.detail;if(null!==n){!function(e){const t="bib-GTM-script";if(!document.querySelector(`script#${t}`)){var n=document.createElement("script");n.id=t,n.async=!0,n.src=`https://www.googletagmanager.com/gtm.js?id=${e}`;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(n,o)}}(e);const{analytics_consent:t,ad_consent:o}=n;s("consent","update",{ad_user_data:o,ad_personalization:o,ad_storage:o,analytics_storage:t})}};const o=globalThis.dataLayer=globalThis.dataLayer||[],s=globalThis.gtag=globalThis.gtag||function(){o.push(arguments)},a=new c.ConsentTokens(!1);s("consent","default",a.toGTM()),o.push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t.addEventListener("bib:consent:ready",n),t.addEventListener("bib:consent:update",n)}else console.warn("No bib-consent element found")}))},s(l,"properties",{containerId:{type:String,attribute:"container-id"},hidden:{type:Boolean}}),s(l,"styles",[i.i`${i.r("@layer component{:host(hidden){display:none}}")}`]),window.customElements.get("bib-gtm")||window.customElements.define("bib-gtm",l),r.addToGlobalBib("gtm",{}),exports.BibGtm=l; //# sourceMappingURL=bib-gtm.cjs.map diff --git a/dist/bib-gtm.js b/dist/bib-gtm.js index 896b5f1..9755bac 100644 --- a/dist/bib-gtm.js +++ b/dist/bib-gtm.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -17,7 +17,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var _a_instances, t_fn; import { s as t, i as e, r as n } from "./lit-element-Dj1nHH6C.js"; -import { a as s } from "./bib-BCofrvPu.js"; +import { a as s } from "./bib-1rVnZJhT.js"; import { ConsentTokens as o } from "./ConsentTokens.js"; import { GTM_CONTAINER_ID as i } from "./constants.js"; class a extends t { diff --git a/dist/bib-retroaction-usager.cjs b/dist/bib-retroaction-usager.cjs index f5366f9..81453cb 100644 --- a/dist/bib-retroaction-usager.cjs +++ b/dist/bib-retroaction-usager.cjs @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,r,o,a,i,n,s=Object.defineProperty,l=e=>{throw TypeError(e)},c=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),d=(e,t,r)=>t.has(e)||l("Cannot "+r),h=(e,t,r)=>(d(e,t,"read from private field"),r?r.call(e):t.get(e)),u=(e,t,r)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),p=(e,t,r)=>(d(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./lit-element-BHNMc-Kg.cjs"),m=require("./unsafe-html-Dku8oD0s.cjs"),b=require("./directive-DpiRyOsV.cjs"),f=require("./VotePayload.cjs"),g=require("./bib-qo8fsCxm.cjs");function y(e,t,r,o){var a,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}"function"==typeof SuppressedError&&SuppressedError; +var e,t,r,o,a,i,n,s=Object.defineProperty,l=e=>{throw TypeError(e)},c=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),d=(e,t,r)=>t.has(e)||l("Cannot "+r),h=(e,t,r)=>(d(e,t,"read from private field"),r?r.call(e):t.get(e)),u=(e,t,r)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),p=(e,t,r)=>(d(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./lit-element-BHNMc-Kg.cjs"),m=require("./unsafe-html-Dku8oD0s.cjs"),b=require("./directive-DpiRyOsV.cjs"),f=require("./VotePayload.cjs"),g=require("./bib-SERnlaT3.cjs");function y(e,t,r,o){var a,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}"function"==typeof SuppressedError&&SuppressedError; /** * @license * Copyright 2017 Google LLC diff --git a/dist/bib-retroaction-usager.js b/dist/bib-retroaction-usager.js index 4f11c97..95cd3e0 100644 --- a/dist/bib-retroaction-usager.js +++ b/dist/bib-retroaction-usager.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -22,7 +22,7 @@ import { u as e, f as t, s as r, x as o, i as a, w as i, T as n, r as s } from " import { o as l } from "./unsafe-html-hzUS4Xy_.js"; import { e as c, i as d, t as h } from "./directive-Ce1M5_Fy.js"; import { VoteData as u } from "./VotePayload.js"; -import { a as p } from "./bib-BCofrvPu.js"; +import { a as p } from "./bib-1rVnZJhT.js"; function v(e2, t2, r2, o2) { var a2, i2 = arguments.length, n2 = i2 < 3 ? t2 : null === o2 ? o2 = Object.getOwnPropertyDescriptor(t2, r2) : o2; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(e2, t2, r2, o2); diff --git a/dist/consent-context.cjs b/dist/consent-context.cjs index d71cccb..bdd318a 100644 --- a/dist/consent-context.cjs +++ b/dist/consent-context.cjs @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-PQ5SQuv-.cjs"),t=Symbol(e.getKeyName("consent-context")); +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-BvP9XHhn.cjs"),t=Symbol(e.getKeyName("consent-context")); /** * @license * Copyright 2021 Google LLC diff --git a/dist/consent-context.js b/dist/consent-context.js index 50fe039..6780f94 100644 --- a/dist/consent-context.js +++ b/dist/consent-context.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { e as o } from "./constants-B2WJQGFq.js"; +import { e as o } from "./constants-D0hS4kJm.js"; /** * @license * Copyright 2021 Google LLC diff --git a/dist/consentClient.cjs b/dist/consentClient.cjs index 5c9f74f..7a66799 100644 --- a/dist/consentClient.cjs +++ b/dist/consentClient.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,s,r,n=Object.defineProperty,o=e=>{throw TypeError(e)},i=(e,t,s)=>((e,t,s)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),a=(e,t,s)=>t.has(e)||o("Cannot "+s),h=(e,t,s)=>(a(e,t,"read from private field"),s?s.call(e):t.get(e)),d=(e,t,s)=>t.has(e)?o("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),E=(e,t,s,r)=>(a(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const c=require("./constants-PQ5SQuv-.cjs"),v=require("./logger-D5ZRyz6h.cjs"),l=require("./ConsentStorage.cjs"),g=require("./ConsentTokens.cjs");class u extends EventTarget{constructor(){super(),d(this,s),i(this,"_server"),i(this,"_storage"),d(this,e,!1),d(this,t),this.readyState="initial",this.hosts=[]}addHost({host:e,reflectEvents:t}){this.hosts.push({host:e,reflectEvents:t})}debug(){h(this,e)&&h(this,t).call(this,...arguments)}dispatchEvent(e){super.dispatchEvent(e),this.hosts.forEach((({host:t,reflectEvents:s})=>s&&t.dispatchEvent?.(e)))}addEventListener(e,t,n){if(e===c.EVENT_NAMES.READY&&"ready"===this.readyState)return this.debug("Firing ready event immediately since readyState is already ready"),void(o=this,i=s,h=r,a(o,i,"access private method"),h).call(this,t);var o,i,h;super.addEventListener(e,t,n)}async init({host:s,serverMode:r,serverUrl:n,serverRequestTimeout:o=c.SERVER_REQUEST_DEFAULT_TIMEOUT,reflectEvents:i=!0}){let a;if(this.serverRequestTimeout=o,s&&this.addHost({host:s,reflectEvents:i}),this.readyState="connecting",r&&r===c.SERVER_MODE.LOCAL||void 0===n||!c.stringIsUrl(n)?this.serverMode=c.SERVER_MODE.LOCAL:(this.serverUrl=new URL(n,location),s.debug&&this.serverUrl.searchParams.set("debug",""),this.serverMode=await c.getServerMode(this)),E(this,e,!!s.debug),h(this,e)&&E(this,t,v.loggerFactory("consentClient","purple")),this.debug("init",`server mode: ${this.serverMode}`),this.serverMode===c.SERVER_MODE.REMOTE){const e=c.getIframeServer(document.body,this.serverUrl.href);try{this._server=await c.callServer(e),this._server.listenMessage(((e,t)=>{this.debug("[remote] server.listenMessage method: ",e,"data: ",t);const s=g.ConsentTokens.from(t),r=new CustomEvent(c.EVENT_NAMES.UPDATE,{detail:s});this.dispatchEvent(r)}))}catch(d){throw console.error("[callServer] error: ",d),d}a=g.ConsentTokens.from(await this._server.postMessage("getConsentTokens")),this.debug("[remote] Got response from server: ",a)}else this._storage=await l(),a=await this._storage.getConsentTokens(),this.debug("[local] Got response from storage: ",a);this.debug("[local] consentTokens: ",a),void 0!==a&&(this.readyState="ready",this.debug("dispatchEvent",c.EVENT_NAMES.READY,a),this.dispatchEvent(new CustomEvent(c.EVENT_NAMES.READY,{detail:a})))}async getConsentTokens(){try{return this.serverMode===c.SERVER_MODE.LOCAL?await this._storage.getConsentTokens():g.ConsentTokens.from(await this._server.postMessage("getConsentTokens"))}catch(e){throw console.error("[#getConsentTokens]",e),e}}async setConsentTokens(e){try{let t;const s=g.ConsentTokens.from(e);if(t=this.serverMode===c.SERVER_MODE.LOCAL?await this._storage.setConsentTokens(s):await this._server.postMessage("setConsentTokens",s),t)return this.dispatchEvent(new CustomEvent(c.EVENT_NAMES.UPDATE,{detail:t})),t}catch(t){throw console.error("[#setConsentTokens]",t),t}}async resetTokens(){try{if(this.serverMode===c.SERVER_MODE.LOCAL)return await this._storage.resetTokens();await this._server.postMessage("resetTokens")}catch(e){throw console.error("[#resetTokens]",e),e}}}let T;e=new WeakMap,t=new WeakMap,s=new WeakSet,r=async function(e){const t=await this.getConsentTokens(),s=new CustomEvent(c.EVENT_NAMES.READY,{detail:t});this.debug("Firing ready event with preferences: ",t),e(s)},module.exports=async function(e){return T?(T.addHost(e),T):(T=new u,await T.init(e),T)}; +var e,t,s,r,n=Object.defineProperty,o=e=>{throw TypeError(e)},i=(e,t,s)=>((e,t,s)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),a=(e,t,s)=>t.has(e)||o("Cannot "+s),h=(e,t,s)=>(a(e,t,"read from private field"),s?s.call(e):t.get(e)),d=(e,t,s)=>t.has(e)?o("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),E=(e,t,s,r)=>(a(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const c=require("./constants-BvP9XHhn.cjs"),v=require("./logger-DMvvTbNw.cjs"),l=require("./ConsentStorage.cjs"),g=require("./ConsentTokens.cjs");class u extends EventTarget{constructor(){super(),d(this,s),i(this,"_server"),i(this,"_storage"),d(this,e,!1),d(this,t),this.readyState="initial",this.hosts=[]}addHost({host:e,reflectEvents:t}){this.hosts.push({host:e,reflectEvents:t})}debug(){h(this,e)&&h(this,t).call(this,...arguments)}dispatchEvent(e){super.dispatchEvent(e),this.hosts.forEach((({host:t,reflectEvents:s})=>s&&t.dispatchEvent?.(e)))}addEventListener(e,t,n){if(e===c.EVENT_NAMES.READY&&"ready"===this.readyState)return this.debug("Firing ready event immediately since readyState is already ready"),void(o=this,i=s,h=r,a(o,i,"access private method"),h).call(this,t);var o,i,h;super.addEventListener(e,t,n)}async init({host:s,serverMode:r,serverUrl:n,serverRequestTimeout:o=c.SERVER_REQUEST_DEFAULT_TIMEOUT,reflectEvents:i=!0}){let a;if(this.serverRequestTimeout=o,s&&this.addHost({host:s,reflectEvents:i}),this.readyState="connecting",r&&r===c.SERVER_MODE.LOCAL||void 0===n||!c.stringIsUrl(n)?this.serverMode=c.SERVER_MODE.LOCAL:(this.serverUrl=new URL(n,location),s.debug&&this.serverUrl.searchParams.set("debug",""),this.serverMode=await c.getServerMode(this)),E(this,e,!!s.debug),h(this,e)&&E(this,t,v.loggerFactory("consentClient","purple")),this.debug("init",`server mode: ${this.serverMode}`),this.serverMode===c.SERVER_MODE.REMOTE){const e=c.getIframeServer(document.body,this.serverUrl.href);try{this._server=await c.callServer(e),this._server.listenMessage(((e,t)=>{this.debug("[remote] server.listenMessage method: ",e,"data: ",t);const s=g.ConsentTokens.from(t),r=new CustomEvent(c.EVENT_NAMES.UPDATE,{detail:s});this.dispatchEvent(r)}))}catch(d){throw console.error("[callServer] error: ",d),d}a=g.ConsentTokens.from(await this._server.postMessage("getConsentTokens")),this.debug("[remote] Got response from server: ",a)}else this._storage=await l(),a=await this._storage.getConsentTokens(),this.debug("[local] Got response from storage: ",a);this.debug("[local] consentTokens: ",a),void 0!==a&&(this.readyState="ready",this.debug("dispatchEvent",c.EVENT_NAMES.READY,a),this.dispatchEvent(new CustomEvent(c.EVENT_NAMES.READY,{detail:a})))}async getConsentTokens(){try{return this.serverMode===c.SERVER_MODE.LOCAL?await this._storage.getConsentTokens():g.ConsentTokens.from(await this._server.postMessage("getConsentTokens"))}catch(e){throw console.error("[#getConsentTokens]",e),e}}async setConsentTokens(e){try{let t;const s=g.ConsentTokens.from(e);if(t=this.serverMode===c.SERVER_MODE.LOCAL?await this._storage.setConsentTokens(s):await this._server.postMessage("setConsentTokens",s),t)return this.dispatchEvent(new CustomEvent(c.EVENT_NAMES.UPDATE,{detail:t})),t}catch(t){throw console.error("[#setConsentTokens]",t),t}}async resetTokens(){try{if(this.serverMode===c.SERVER_MODE.LOCAL)return await this._storage.resetTokens();await this._server.postMessage("resetTokens")}catch(e){throw console.error("[#resetTokens]",e),e}}}let T;e=new WeakMap,t=new WeakMap,s=new WeakSet,r=async function(e){const t=await this.getConsentTokens(),s=new CustomEvent(c.EVENT_NAMES.READY,{detail:t});this.debug("Firing ready event with preferences: ",t),e(s)},module.exports=async function(e){return T?(T.addHost(e),T):(T=new u,await T.init(e),T)}; //# sourceMappingURL=consentClient.cjs.map diff --git a/dist/consentClient.js b/dist/consentClient.js index 21a4d31..b77e786 100644 --- a/dist/consentClient.js +++ b/dist/consentClient.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -18,8 +18,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var _e, _t, _c_instances, s_fn; -import { E as e, S as t, s, g as r, a as o, c as n, b as i } from "./constants-B2WJQGFq.js"; -import { l as a } from "./logger-CcMMJUPZ.js"; +import { E as e, S as t, s, g as r, a as o, c as n, b as i } from "./constants-D0hS4kJm.js"; +import { l as a } from "./logger-EcO8T52u.js"; import h from "./ConsentStorage.js"; import { ConsentTokens as d } from "./ConsentTokens.js"; class c extends EventTarget { diff --git a/dist/constants-BvP9XHhn.cjs b/dist/constants-BvP9XHhn.cjs new file mode 100644 index 0000000..b147c97 --- /dev/null +++ b/dist/constants-BvP9XHhn.cjs @@ -0,0 +1,10 @@ +/** + * Librairie du system desing des Bibliothèques de l'Université de Montréal + * @module @bibudem/ui + * @version 0.19.0 + * @author Christian Rémillard + * @license ISC + * @see https://github.com/bibudem/ui + */ +const e=require("./package-DEKbT-ok.cjs"),t=require("./type-KOUr406I.cjs");function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="client_response",i="server_response",a={server:{receive:s,post:i},client:{receive:i,post:s}},c=["hand-shake","wave-hand",s,i],l=r((function e(t,r,s){var i=this;o(this,e),n(this,"receiveMessage",(function(e,t,n){if(e===a[i.type].receive){if(t&&i.messageResponse[t]){var r=i.messageResponse[t];delete i.messageResponse[t],r(n)}}else i.listener?i.listener(e,n,(function(e){i.messageProxy.request(a[i.type].post,t,e)})):console.warn("no message listener: ",e,n)})),n(this,"doPost",(function(e,t,n){var r=e.resolve,o=e.reject,s=e.eventId;i.messageResponse[s]=r;try{i.messageProxy.request(t,s,n)}catch(a){throw delete i.messageResponse[s],o(),a}})),n(this,"listenMessage",(function(e){i.listener=e})),n(this,"postMessage",(function(e,t){return c.indexOf(e)>=0?Promise.reject(new Error("".concat(e," is a protected key-method."))):new Promise((function(n,r){if(i.destroyed)r(new Error("message-channel had been destroyed!"));else{var o=null,s=Math.random().toString().substr(3,10);i.doPost({resolve:function(e){clearTimeout(o),n(e)},reject:r,eventId:s},e,t),o=setTimeout((function(){i.messageResponse&&delete i.messageResponse[s],r(new Error("postMessage timeout"))}),i.timeout||2e4)}}))})),n(this,"destroy",(function(){i.destroyed=!0,i.unListen&&(i.unListen(),i.unListen=null),i.listener=null,i.messageResponse=null,i.messageProxy&&(i.messageProxy.destroy(),i.messageProxy=null)})),this.type=t,this.messageProxy=r,this.listener=null,this.messageResponse={},this.timeout=s,this.unListen=this.messageProxy.listen(this.receiveMessage)})),u="postmessage-promise_client",d="postmessage-promise_server",f="identity_key",p={server:{key:d,accept:u},client:{key:u,accept:d}},v=r((function e(t,r,s){var i=this;o(this,e),n(this,"listen",(function(e){var t=i,n=function(n){if(("*"===t.origin||n.origin===t.origin)&&n.source===t.source&&n.data&&n.data[f]===p[t.type].accept&&n.data.channelId===t.channelId&&t.eventFilter(n)&&n.data.method){var r=n.data,o=r.eventId,s=r.method,i=r.payload;e(s,o,i)}};return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}})),n(this,"request",(function(e,t,r){i.source&&!i.source.closed?i.source.postMessage(n(n(n(n(n({},f,p[i.type].key),"channelId",i.channelId),"eventId",t),"method",e),"payload",r),i.origin):console.error("source closed.")})),n(this,"destroy",(function(){i.type="",i.origin="",i.source=null,i.channelId="",i.eventFilter=null})),this.type=t;var a=r.origin,c=r.source,l=r.channelId;this.origin=a,this.source=c,this.channelId=l,this.eventFilter=s}));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t4?t.protocol:window.location.protocol,r=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||"".concat(n,"//").concat(r)}var E={resolveOrigin:b,getIframeServer:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=void 0!==e?e:document.body,s=b(t),i=document.createElement("iframe");return i.name=n||"",i.classList.add.apply(i.classList,r),o.appendChild(i),i.src=t,{server:i.contentWindow||i.contentDocument.parentWindow,origin:s,frame:i}},getOpenedServer:function(e){for(var t,n=b(e),r=arguments.length,o=new Array(r>1?r-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("serverObject is null");var n=e.server,r=e.origin,o=t.eventFilter,s=void 0===o?function(){return!0}:o,i=t.timeout,a=void 0===i?2e4:i,c=t.clientInfo,u=void 0===c?{}:c,d=t.onDestroy,f=Math.random().toString().substr(3,10),p={source:n,origin:r,channelId:f};return new Promise((function(e,t){if(n&&!n.closed){var r=new v("client",p,s);(o=p,i=r,c=a,f=u,new Promise((function(e,t){var n=o.source,r=o.origin,s=o.channelId,a=Number(Math.random().toString().substr(3,10)),l=null,u=new Date,d=null;d=i.listen((function(t,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("hand-shake"===t){var u=c||{},p=u.SYN,v=u.ACK,h=u.seqnumber,m=u.acknumber;1===p&&1===v&&m===a+1&&(clearInterval(l),d&&d(),i.request("hand-shake","hand-shake-event",{clientInfo:f,ACK:1,seqnumber:a+1,acknumber:h+1}),e({server:n,origin:r,channelId:s,serverInfo:c.serverInfo,clientInfo:f}))}})),l=setInterval((function(){if(!n||n.closed)throw clearInterval(l),d&&d(),t(new Error("server closed.")),new Error("server closed.");if(c&&new Date-u>c)throw clearInterval(l),d&&d(),t(new Error("connect timeout.")),new Error("connect timeout.");i.request("hand-shake","hand-shake-event",{clientInfo:f,SYN:1,ACK:0,seqnumber:a})}),100)}))).then((function(t){(function(e,t,n){var r=e.server,o=e.serverInfo,s=void 0===o?{}:o,i=e.channelId,a=new l("client",t,n),c=function(){a&&(a.destroy(),a=null),e.destroy&&e.destroy()},u=null;return u=setInterval((function(){r&&!r.closed||(console.info("server closed."),clearInterval(u),c())}),2e3),{run:function(e){e({channelId:i,serverInfo:s,postMessage:function(){var e;return a?(e=a).postMessage.apply(e,arguments):Promise.reject()},listenMessage:function(){var e;a&&(e=a).listenMessage.apply(e,arguments)},destroy:c})}}})(m(m({},t),{},{destroy:function(){r=null,d&&d(t.serverInfo,t)}}),r,a).run(e)})).catch((function(e){t(e)}))}else t(new Error("server closed"));var o,i,c,f}))},exports.createPrefixedEventName=j,exports.getIframeServer=function(e,t){const n=void 0!==e?e:document.body,r=E.resolveOrigin(t),o=M("iframe");let s;return document.querySelector(`#${o}`)?s=document.querySelector(`#${o}`):(s=document.createElement("iframe"),s.id=o,function(e,t){const n=(e="string"==typeof e?new URL(e,location):e).searchParams.get("debug");return null!==n&&(""===n||O(n))}(t)?s.style.cssText="width: 100%; height: 100%; border: 0;":(s.ariaHidden=!0,s.tabIndex=-1,s.hidden=!0,s.style.setProperty("display","none")),n.appendChild(s),s.src=t),{server:s.contentWindow||s.contentDocument.parentWindow,origin:r,iframe:s}},exports.getKeyName=M,exports.getServerMode=async function(e){const t=e.serverUrl,n=e.serverRequestTimeout||500;if(!t)return k.LOCAL;const r=new AbortController;let o,s;try{if(s=setTimeout((()=>{console.warn(`Request timed out after ${n}ms. Aborting request...`),r.abort()}),n),o=await fetch(t,{signal:r.signal}),o.ok)return k.REMOTE}catch(i){if(console.error(i),r.signal.aborted)throw new Error(`Unable to locate server page. The request timed out after ${n}ms. url: ${t.href}`);throw new Error(`Unable to locate server page : ${t.href}.`,i)}finally{clearTimeout(s)}throw new Error(`Unable to locate server page. The request failed with status code ${o.status}. url: ${t.href}`)},exports.patternMatchesOrigin=function(e,t){const n=e.replace(/[.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/[*]/g,".*");return new RegExp(`^${n}$`,"u").test(t)},exports.startListening=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventFilter,r=void 0===t?function(){return!0}:t,o=e.timeout,s=void 0===o?2e4:o,i=e.serverInfo,a=void 0===i?{}:i,c=e.onDestroy;return new Promise((function(e){var t,o;(t=r,o=a,new Promise((function(e){var r="syn",s=Number(Math.random().toString().substr(3,10)),i=-1,a=null,c=5;window.addEventListener("message",(function l(u){if(u.data&&"postmessage-promise_client"===u.data[w]&&u.data.channelId&&u.data.method&&"hand-shake"===u.data.method&&t(u)){var d=u.data.payload||{},f=d.SYN,p=d.ACK,v=d.seqnumber,h=d.acknumber;if(1===f&&0===p){if("syn"!==r)return;i=v,r="ack";var m=function(){if(!u.source||u.source.closed)return console.info("client closed and reset to listening."),r="syn",clearTimeout(a),a=null,c=5,s=Number(Math.random().toString().substr(3,10)),i=-1,!1;try{u.source.postMessage(n(n(n(n({},w,"postmessage-promise_server"),"channelId",u.data.channelId),"method","hand-shake"),"payload",{serverInfo:o,acknumber:v+1,SYN:1,ACK:1,seqnumber:s}),u.origin)}catch(e){return console.error(e),!0}return!0};if(!m())return;a||(a=setTimeout((function e(){c>0?"ack"===r&&(c-=1,m()&&(a=setTimeout(e,1e3))):(console.info("server three-way hand shake timeout and reset to listening."),r="syn",clearTimeout(a),a=null,c=5,s=Number(Math.random().toString().substr(3,10)),i=-1)}),1e3))}else if("ack"===r&&1===p&&v===i+1&&h===s+1){r="finish",clearTimeout(a),a=null,window.removeEventListener("message",l);var g=u.data.payload,y=void 0===g?{}:g;e({client:u.source,origin:u.origin,channelId:u.data.channelId,serverInfo:o,clientInfo:y.clientInfo})}}}))}))).then((function(t){(function(e,t,n){var r=e.origin,o=e.client,s=e.channelId,i=e.clientInfo,a=void 0===i?{}:i,c=new v("server",{origin:r,source:o,channelId:s},t),u=new l("server",c,n),d=function(){u&&(u.destroy(),u=null),c=null,e.destroy&&e.destroy()},f=null;return f=setInterval((function(){o&&!o.closed||(console.info("client closed."),clearInterval(f),d())}),2e3),{run:function(e){e({channelId:s,clientInfo:a,postMessage:function(){var e;return u?(e=u).postMessage.apply(e,arguments):Promise.reject()},listenMessage:function(){var e;u&&(e=u).listenMessage.apply(e,arguments)},destroy:d})}}})(y(y({},t),{},{destroy:function(){c&&c(t.clientInfo,t)}}),r,s).run(e)}))}))},exports.stringIsUrl=function(e){try{return new URL(e,location),!0}catch{return!1}}; +//# sourceMappingURL=constants-BvP9XHhn.cjs.map diff --git a/dist/constants-PQ5SQuv-.cjs.map b/dist/constants-BvP9XHhn.cjs.map similarity index 61% rename from dist/constants-PQ5SQuv-.cjs.map rename to dist/constants-BvP9XHhn.cjs.map index d773cc8..1b58f28 100644 --- a/dist/constants-PQ5SQuv-.cjs.map +++ b/dist/constants-BvP9XHhn.cjs.map @@ -1 +1 @@ -{"version":3,"file":"constants-PQ5SQuv-.cjs","sources":["../node_modules/postmessage-promise/build/postmessage-promise.esm.js","../node_modules/boolify-string/node_modules/type-detect/index.js","../node_modules/boolify-string/lib/boolify-string.js","../src/components/bib-consent/utils.js","../src/components/bib-consent/constants.js","../src/utils/url.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-lonely-if */\nvar CLIENT_RESPONSE = 'client_response';\nvar SERVER_RESPONSE = 'server_response';\nvar responseMap = {\n server: {\n receive: CLIENT_RESPONSE,\n post: SERVER_RESPONSE\n },\n client: {\n receive: SERVER_RESPONSE,\n post: CLIENT_RESPONSE\n }\n};\nvar KEY_METHODS = ['hand-shake', 'wave-hand', CLIENT_RESPONSE, SERVER_RESPONSE];\n/**\n * message channel\n * type: 'server' | 'client'\n */\nvar MessageChannel = /*#__PURE__*/_createClass(function MessageChannel(type, messageProxy, timeout) {\n var _this = this;\n _classCallCheck(this, MessageChannel);\n _defineProperty(this, \"receiveMessage\", function (method, eventId, payload) {\n if (method === responseMap[_this.type].receive) {\n if (eventId && _this.messageResponse[eventId]) {\n var response = _this.messageResponse[eventId];\n delete _this.messageResponse[eventId];\n response(payload);\n }\n } else {\n // server postMessage and response\n if (_this.listener) {\n var _response = function _response(pload) {\n _this.messageProxy.request(responseMap[_this.type].post, eventId, pload);\n };\n _this.listener(method, payload, _response);\n } else {\n console.warn('no message listener: ', method, payload);\n }\n }\n });\n _defineProperty(this, \"doPost\", function (_ref, method, payload) {\n var resolve = _ref.resolve,\n reject = _ref.reject,\n eventId = _ref.eventId;\n _this.messageResponse[eventId] = resolve;\n try {\n _this.messageProxy.request(method, eventId, payload);\n } catch (e) {\n delete _this.messageResponse[eventId];\n reject();\n throw e;\n }\n });\n _defineProperty(this, \"listenMessage\", function (listener) {\n _this.listener = listener;\n });\n _defineProperty(this, \"postMessage\", function (method, payload) {\n if (KEY_METHODS.indexOf(method) >= 0) {\n return Promise.reject(new Error(\"\".concat(method, \" is a protected key-method.\")));\n }\n return new Promise(function (resolve, reject) {\n if (_this.destroyed) {\n reject(new Error('message-channel had been destroyed!'));\n return;\n }\n var ctimer = null;\n var reswrap = function reswrap(value) {\n clearTimeout(ctimer);\n resolve(value);\n };\n var eventId = Math.random().toString().substr(3, 10);\n _this.doPost({\n resolve: reswrap,\n reject: reject,\n eventId: eventId\n }, method, payload);\n ctimer = setTimeout(function () {\n if (_this.messageResponse) {\n delete _this.messageResponse[eventId];\n }\n reject(new Error('postMessage timeout'));\n }, _this.timeout || 20 * 1000);\n });\n });\n _defineProperty(this, \"destroy\", function () {\n _this.destroyed = true;\n if (_this.unListen) {\n _this.unListen();\n _this.unListen = null;\n }\n _this.listener = null;\n _this.messageResponse = null;\n if (_this.messageProxy) {\n _this.messageProxy.destroy();\n _this.messageProxy = null;\n }\n });\n this.type = type;\n this.messageProxy = messageProxy;\n this.listener = null;\n this.messageResponse = {};\n this.timeout = timeout;\n this.unListen = this.messageProxy.listen(this.receiveMessage);\n});\n\n/* eslint-disable no-underscore-dangle */\nvar CLIENT_KEY$1 = 'postmessage-promise_client';\nvar SERVER_KEY = 'postmessage-promise_server';\nvar IDENTITY_KEY$1 = 'identity_key';\nvar identityMap = {\n server: {\n key: SERVER_KEY,\n accept: CLIENT_KEY$1\n },\n client: {\n key: CLIENT_KEY$1,\n accept: SERVER_KEY\n }\n};\nvar MessageProxy = /*#__PURE__*/_createClass(function MessageProxy(type, sourceInfo, eventFilter) {\n var _this2 = this;\n _classCallCheck(this, MessageProxy);\n _defineProperty(this, \"listen\", function (fn) {\n var _this = _this2;\n var listener = function listener(event) {\n if (_this.origin !== '*' && event.origin !== _this.origin || event.source !== _this.source || !event.data || event.data[IDENTITY_KEY$1] !== identityMap[_this.type].accept || event.data.channelId !== _this.channelId || !_this.eventFilter(event) || !event.data.method) {\n return;\n }\n var _event$data = event.data,\n eventId = _event$data.eventId,\n method = _event$data.method,\n payload = _event$data.payload;\n fn(method, eventId, payload);\n };\n window.addEventListener('message', listener);\n return function unListen() {\n window.removeEventListener('message', listener);\n };\n });\n _defineProperty(this, \"request\", function (method, eventId, payload) {\n if (!_this2.source || _this2.source.closed) {\n console.error('source closed.');\n return;\n }\n _this2.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY$1, identityMap[_this2.type].key), \"channelId\", _this2.channelId), \"eventId\", eventId), \"method\", method), \"payload\", payload), _this2.origin);\n });\n _defineProperty(this, \"destroy\", function () {\n _this2.type = '';\n _this2.origin = '';\n _this2.source = null;\n _this2.channelId = '';\n _this2.eventFilter = null;\n });\n this.type = type;\n var origin = sourceInfo.origin,\n source = sourceInfo.source,\n channelId = sourceInfo.channelId;\n this.origin = origin;\n this.source = source;\n this.channelId = channelId;\n this.eventFilter = eventFilter;\n});\n\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction connectServer(sourceInfo, clientProxy, timeout, clientInfo) {\n return new Promise(function (resolve, reject) {\n var server = sourceInfo.source,\n origin = sourceInfo.origin,\n channelId = sourceInfo.channelId;\n var SYN = 1;\n var ACK = 0;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var timer = null;\n var startTime = new Date();\n var unListen = null;\n function handShake(method, eventId) {\n var payload = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (method === 'hand-shake') {\n // 判断状态\n var _ref = payload || {},\n sSYN = _ref.SYN,\n sACK = _ref.ACK,\n sSeq = _ref.seqnumber,\n acknumber = _ref.acknumber;\n // console.log('client hand shake', payload);\n if (sSYN === 1 && sACK === 1 && acknumber === seqnumber + 1) {\n // this is server acknowledgement\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n ACK: 1,\n seqnumber: seqnumber + 1,\n acknumber: sSeq + 1\n });\n resolve({\n server: server,\n origin: origin,\n channelId: channelId,\n serverInfo: payload.serverInfo,\n clientInfo: clientInfo\n });\n }\n }\n }\n unListen = clientProxy.listen(handShake);\n var tryConnect = function tryConnect() {\n if (!server || server.closed) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('server closed.'));\n throw new Error('server closed.');\n }\n if (timeout) {\n var endTime = new Date();\n var usedTime = endTime - startTime;\n if (usedTime > timeout) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('connect timeout.'));\n throw new Error('connect timeout.');\n }\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n });\n };\n timer = setInterval(tryConnect, 100);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel$1(serverProps, clientProxy, timeout) {\n var server = serverProps.server,\n _serverProps$serverIn = serverProps.serverInfo,\n serverInfo = _serverProps$serverIn === void 0 ? {} : _serverProps$serverIn,\n channelId = serverProps.channelId;\n var messageChannel = new MessageChannel('client', clientProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n if (serverProps.destroy) {\n serverProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!server || server.closed) {\n console.info('server closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n serverInfo: serverInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * connect with server and create message channel\n * @param {*} serverObject\n * @param {*} options : { eventFilter, timeout } filter post messages\n */\nfunction callServer(serverObject) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!serverObject) throw new Error('serverObject is null');\n var server = serverObject.server,\n origin = serverObject.origin;\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$clientInfo = options.clientInfo,\n clientInfo = _options$clientInfo === void 0 ? {} : _options$clientInfo,\n onDestroy = options.onDestroy;\n var channelId = Math.random().toString().substr(3, 10);\n var sourceInfo = {\n source: server,\n origin: origin,\n channelId: channelId\n };\n return new Promise(function (resolve, reject) {\n if (!server || server.closed) {\n reject(new Error('server closed'));\n return;\n }\n var clientProxy = new MessageProxy('client', sourceInfo, eventFilter);\n connectServer(sourceInfo, clientProxy, timeout, clientInfo).then(function (sProps) {\n var serverProps = _objectSpread$1(_objectSpread$1({}, sProps), {}, {\n destroy: function destroy() {\n clientProxy = null;\n if (onDestroy) {\n onDestroy(sProps.serverInfo, sProps);\n }\n }\n });\n createChannel$1(serverProps, clientProxy, timeout).run(resolve);\n })[\"catch\"](function (e) {\n reject(e);\n });\n });\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar CLIENT_KEY = 'postmessage-promise_client';\nvar IDENTITY_KEY = 'identity_key';\nvar TCP_TIMEOUT_INIT = 1000; // RFC6298 2.1 initial RTO value\nvar TCP_SYNACK_RETRIES = 5;\nfunction connectClient(eventFilter, serverInfo) {\n return new Promise(function (resolve) {\n var waitingType = 'syn'; // ack // finish\n var SYN = 1;\n var ACK = 1;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var cSeqnumber = -1;\n var timer = null;\n var retries = TCP_SYNACK_RETRIES;\n function handShake(event) {\n if (!event.data || event.data[IDENTITY_KEY] !== CLIENT_KEY || !event.data.channelId || !event.data.method || event.data.method !== 'hand-shake' || !eventFilter(event)) {\n return;\n }\n // 判断状态\n var _ref = event.data.payload || {},\n cSYN = _ref.SYN,\n cACK = _ref.ACK,\n cSeq = _ref.seqnumber,\n cAcknumber = _ref.acknumber;\n // console.log('server hand shake', event.data, waitingType, retries);\n if (cSYN === 1 && cACK === 0) {\n if (waitingType !== 'syn') {\n return; // this is a syn timeout request\n }\n cSeqnumber = cSeq;\n // client synchronous\n waitingType = 'ack';\n var fn = function fn() {\n if (!event.source || event.source.closed) {\n console.info('client closed and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n return false;\n }\n try {\n event.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY, 'postmessage-promise_server'), \"channelId\", event.data.channelId), \"method\", 'hand-shake'), \"payload\", {\n serverInfo: serverInfo,\n acknumber: cSeq + 1,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n }), event.origin);\n } catch (e) {\n console.error(e);\n return true;\n }\n return true;\n };\n var tryAck = fn();\n if (!tryAck) return;\n var retryFn = function retryFn() {\n if (retries > 0) {\n // waitingType = 'syn';\n if (waitingType === 'ack') {\n // eslint-disable-next-line operator-assignment\n retries = retries - 1;\n if (fn()) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n }\n } else {\n // reset to a new listening\n console.info('server three-way hand shake timeout and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n }\n };\n // TCP_TIMEOUT_INIT: waiting for the third hand shake until timeout.\n if (!timer) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n } else if (waitingType === 'ack') {\n if (cACK === 1 && cSeq === cSeqnumber + 1 && cAcknumber === seqnumber + 1) {\n // waiting for the third hand shake.\n waitingType = 'finish';\n clearTimeout(timer);\n timer = null;\n // client acknowledgement\n window.removeEventListener('message', handShake);\n var _event$data$payload = event.data.payload,\n payload = _event$data$payload === void 0 ? {} : _event$data$payload;\n resolve({\n client: event.source,\n origin: event.origin,\n channelId: event.data.channelId,\n serverInfo: serverInfo,\n clientInfo: payload.clientInfo\n });\n }\n } else ;\n }\n window.addEventListener('message', handShake);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel(clientProps, eventFilter, timeout) {\n var origin = clientProps.origin,\n client = clientProps.client,\n channelId = clientProps.channelId,\n _clientProps$clientIn = clientProps.clientInfo,\n clientInfo = _clientProps$clientIn === void 0 ? {} : _clientProps$clientIn;\n var sourceInfo = {\n origin: origin,\n source: client,\n channelId: channelId\n };\n var serverProxy = new MessageProxy('server', sourceInfo, eventFilter);\n var messageChannel = new MessageChannel('server', serverProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n serverProxy = null;\n if (clientProps.destroy) {\n clientProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!client || client.closed) {\n console.info('client closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n clientInfo: clientInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * start a server listening, each server listening can only connect with one client.\n * @param {*} options: { eventFilter, timeout } filter post messages\n */\nfunction startListening() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$serverInfo = options.serverInfo,\n serverInfo = _options$serverInfo === void 0 ? {} : _options$serverInfo,\n onDestroy = options.onDestroy;\n return new Promise(function (resolve) {\n connectClient(eventFilter, serverInfo).then(function (cProps) {\n var clientProps = _objectSpread(_objectSpread({}, cProps), {}, {\n destroy: function destroy() {\n if (onDestroy) {\n onDestroy(cProps.clientInfo, cProps);\n }\n }\n });\n createChannel(clientProps, eventFilter, timeout).run(resolve);\n });\n });\n}\n\n/**\n * Takes a URL and returns the origin. from dollarshaveclub/postmate\n * @param {String} url The full URL being requested\n * @return {String} The URLs origin\n */\nfunction resolveOrigin(url) {\n var a = document.createElement('a');\n a.href = url;\n var protocol = a.protocol.length > 4 ? a.protocol : window.location.protocol;\n // eslint-disable-next-line no-nested-ternary\n var host = a.host.length ? a.port === '80' || a.port === '443' ? a.hostname : a.host : window.location.host;\n return a.origin || \"\".concat(protocol, \"//\").concat(host);\n}\nfunction getIframeServer(container, targetUrl, name) {\n var classListArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var root = typeof container !== 'undefined' ? container : document.body;\n var origin = resolveOrigin(targetUrl);\n var frame = document.createElement('iframe');\n frame.name = name || '';\n // eslint-disable-next-line prefer-spread\n frame.classList.add.apply(frame.classList, classListArray);\n root.appendChild(frame);\n frame.src = targetUrl;\n var iframeWindow = frame.contentWindow || frame.contentDocument.parentWindow;\n return {\n server: iframeWindow,\n origin: origin,\n frame: frame\n // destroy: () => { if (frame) { frame.parentNode.removeChild(frame); } }\n };\n}\nfunction getOpenedServer(targetUrl) {\n var _window;\n // window.opener.origin inaccessible when cross-origin\n var origin = resolveOrigin(targetUrl);\n for (var _len = arguments.length, opts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n opts[_key - 1] = arguments[_key];\n }\n var openedWindow = (_window = window).open.apply(_window, [targetUrl].concat(opts));\n return {\n server: openedWindow,\n origin: origin\n // destroy: () => { if (openedWindow && openedWindow.close) { openedWindow.close(); } },\n };\n}\nvar utils = {\n resolveOrigin: resolveOrigin,\n getIframeServer: getIframeServer,\n getOpenedServer: getOpenedServer\n};\n\nvar index = {\n callServer: callServer,\n startListening: startListening,\n utils: utils\n};\n\nexport { callServer, index as default, startListening, utils };\n","module.exports = require('./lib/type');\n","/*\n * boolify-string\n * https://github.com/sanemat/node-boolify-string\n *\n * Copyright (c) 2014 sanemat\n * Licensed under the MIT license.\n */\n\n'use strict';\nvar type = require('type-detect');\n\nmodule.exports = function(obj){\n if (type(obj) !== 'string') {\n return !!obj;\n }\n var value = obj.toLowerCase();\n var bool;\n switch (value){\n case 'false':\n case '0':\n case 'undefined':\n case 'null':\n case '':\n case 'n':\n case 'no':\n case 'off':\n bool = false;\n break;\n default:\n bool = true;\n break;\n }\n return bool;\n};\n","import { utils as postmessageUtils } from 'postmessage-promise'\nimport { hasBooleanParam } from '@/utils/url.js'\nimport { PREFIX, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Creates a prefixed event name for the BIB consent module.\n * @param {string} prefix - The prefix to use for the event name.\n * @returns {function(string): string} - A function that takes an event name and returns the prefixed event name.\n */\nexport function createPrefixedEventName(prefix) {\n return function (eventName) {\n return `bib:${prefix}:${eventName}`\n }\n}\n\n/**\n * Creates a prefixed key name for the BIB consent module.\n * @param {string} key - The key to be prefixed.\n * @returns {string} - The prefixed key name.\n */\nexport function getKeyName(key) {\n return `${PREFIX}-${key}`\n}\n\n/**\n * Gets an iframe server for a given target URL.\n * @param {HTMLElement} [container=document.body] - The container element for the iframe.\n * @param {string} targetUrl - The target URL for the iframe.\n * @returns {object} - An object containing the iframe server, origin, and the iframe element.\n */\nexport function getIframeServer(\n container,\n targetUrl,\n) {\n const root = typeof container !== 'undefined' ? container : document.body\n const origin = postmessageUtils.resolveOrigin(targetUrl)\n const iframeId = getKeyName('iframe')\n let iframe\n if (document.querySelector(`#${iframeId}`)) {\n iframe = document.querySelector(`#${iframeId}`)\n } else {\n iframe = document.createElement('iframe')\n iframe.id = iframeId\n\n const isDebugOn = hasBooleanParam(targetUrl, 'debug')\n\n if (!isDebugOn) {\n iframe.ariaHidden = true\n iframe.tabIndex = -1\n iframe.hidden = true\n iframe.style.setProperty('display', 'none')\n } else {\n iframe.style.cssText = 'width: 100%; height: 100%; border: 0;'\n }\n\n root.appendChild(iframe)\n iframe.src = targetUrl\n }\n\n const iframeWindow = iframe.contentWindow || iframe.contentDocument.parentWindow\n\n return {\n server: iframeWindow,\n origin,\n iframe,\n }\n}\n\n/**\n * Checks the server mode for a given client.\n * \n * If the client has no server URL, the function returns `SERVER_MODE.LOCAL`.\n * Otherwise, it checks if the server page exists by making a fetch request to the server URL.\n * If the request is successful (response.ok), the function returns `SERVER_MODE.REMOTE`.\n * If the request times out or fails, the function throws an error with the appropriate message.\n *\n * @param {object} client - The client object containing the server URL.\n * @param {number} [timeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout in milliseconds for the server request.\n * @returns {string} - The server mode, either `SERVER_MODE.LOCAL` or `SERVER_MODE.REMOTE`.\n * @throws {Error} - If the server page cannot be located or the request fails.\n */\nexport async function getServerMode(client) {\n\n const serverUrl = client.serverUrl\n const timeout = client.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n\n if (!serverUrl) {\n return SERVER_MODE.LOCAL\n }\n\n // Check if server page exists\n const controller = new AbortController()\n let response\n let timeoutHandle\n\n try {\n timeoutHandle = setTimeout(() => {\n console.warn(`Request timed out after ${timeout}ms. Aborting request...`)\n controller.abort()\n }, timeout)\n response = await fetch(serverUrl, { signal: controller.signal })\n\n if (response.ok) {\n return SERVER_MODE.REMOTE\n }\n } catch (error) {\n console.error(error)\n\n if (controller.signal.aborted) {\n throw new Error(`Unable to locate server page. The request timed out after ${timeout}ms. url: ${serverUrl.href}`)\n }\n\n throw new Error(`Unable to locate server page : ${serverUrl.href}.`, error)\n } finally {\n clearTimeout(timeoutHandle)\n }\n\n throw new Error(`Unable to locate server page. The request failed with status code ${response.status}. url: ${serverUrl.href}`)\n}","import { name as PKG_NAME } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${PKG_NAME}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\n\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\n\n/**\n * @typedef {('analytics_consent'|'functionality_consent'|'ad_consent')} consentTypes\n */\n\n/**\n * @typedef {('granted' | 'denied')} ConsentValues\n */\n\n/**\n * @type {object} Tokens\n * @property {string} analytics_consent\n * @property {string} functionality_consent\n * @property {string} ad_consent\n */\nexport const DEFAULT_PREFERENCES = {\n analytics_consent: null,\n functionality_consent: null,\n ad_consent: null\n}\n\n/**\n * @typedef {('determinate'|'indeterminate')} consentStateTypes\n */\n\nexport const CONSENT_STATES = {\n INDETERMINATE: 'indeterminate',\n DETERMINATE: 'determinate'\n}","import boolifyString from 'boolify-string'\n\nexport function hasBooleanParam(url, param) {\n url = typeof url === 'string' ? new URL(url, location) : url\n\n const booleanString = url.searchParams.get(param)\n\n if (booleanString === null) {\n return false\n }\n\n if (booleanString === '') {\n return true\n }\n\n return boolifyString(booleanString)\n}\n\nexport function stringIsUrl(string) {\n try {\n new URL(string, location)\n return true\n } catch {\n return false\n }\n}\n\n// This is a modified version of https://www.npmjs.com/package/escape-string-regexp\nexport function patternMatchesOrigin(pattern, origin) {\n\n const escapedPattern = pattern\n .replace(/[.]/g, '\\\\$&')\n .replace(/-/g, '\\\\x2d')\n .replace(/[*]/g, '.*')\n\n return new RegExp(`^${escapedPattern}$`, 'u').test(origin)\n}"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","CLIENT_RESPONSE","SERVER_RESPONSE","responseMap","server","receive","post","client","KEY_METHODS","MessageChannel","type","messageProxy","timeout","_this","this","method","eventId","payload","messageResponse","response","listener","pload","request","console","warn","_ref","resolve","reject","e","indexOf","Promise","Error","concat","destroyed","ctimer","Math","random","toString","substr","doPost","setTimeout","unListen","destroy","listen","receiveMessage","CLIENT_KEY$1","SERVER_KEY","IDENTITY_KEY$1","identityMap","accept","MessageProxy","sourceInfo","eventFilter","_this2","fn","event","origin","source","data","channelId","_event$data","window","addEventListener","removeEventListener","closed","postMessage","error","ownKeys$1","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread$1","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","ownKeys","_objectSpread","IDENTITY_KEY","resolveOrigin","url","a","document","createElement","href","protocol","location","host","port","hostname","utils","getIframeServer","container","targetUrl","name","classListArray","undefined","root","body","frame","classList","add","appendChild","src","contentWindow","contentDocument","parentWindow","getOpenedServer","_window","_len","opts","Array","_key","open","require$$0","typeExports","bool","toLowerCase","createPrefixedEventName","prefix","eventName","getKeyName","PREFIX","DB_NAME","PKG_NAME","EVENT_NAMES","READY","UPDATE","SERVER_MODE","LOCAL","REMOTE","INDETERMINATE","DETERMINATE","analytics_consent","functionality_consent","ad_consent","serverObject","options","_options$eventFilter","_options$timeout","_options$clientInfo","clientInfo","onDestroy","clientProxy","seqnumber","Number","timer","startTime","Date","sSYN","SYN","sACK","ACK","sSeq","acknumber","clearInterval","serverInfo","setInterval","then","sProps","serverProps","_serverProps$serverIn","messageChannel","watcher","info","run","_messageChannel","listenMessage","_messageChannel2","catch","postmessageUtils","iframeId","iframe","querySelector","id","param","booleanString","URL","searchParams","get","boolifyString","style","cssText","ariaHidden","tabIndex","hidden","setProperty","s","async","serverUrl","serverRequestTimeout","controller","AbortController","timeoutHandle","abort","fetch","signal","ok","aborted","clearTimeout","status","pattern","escapedPattern","replace","RegExp","test","_options$serverInfo","waitingType","cSeqnumber","retries","handShake","cSYN","cACK","cSeq","cAcknumber","retryFn","_event$data$payload","cProps","clientProps","_clientProps$clientIn","serverProxy","string"],"mappings":"2EAAA,SAASA,EAAgBC,EAAKC,EAAKC,GAC7BD,OAAAA,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAAA,EACAC,cAAAA,EACAC,UAAAA,IAGFP,EAAIC,GAAOC,EAENF,CACT,CAWA,SAASQ,EAAaC,EAAaC,EAAYC,GAG7CR,OAAAA,OAAOC,eAAeK,EAAa,YAAa,CAC9CF,UAAU,IAELE,CACT,CAEA,SAASG,EAAgBC,EAAUJ,GACjC,KAAMI,aAAoBJ,GAClB,MAAA,IAAIK,UAAU,oCAExB,CAGA,IAAIC,EAAkB,kBAClBC,EAAkB,kBACl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BvP9XHhn.cjs","sources":["../node_modules/postmessage-promise/build/postmessage-promise.esm.js","../node_modules/boolify-string/node_modules/type-detect/index.js","../node_modules/boolify-string/lib/boolify-string.js","../src/components/bib-consent/utils.js","../src/components/bib-consent/constants.js","../src/utils/url.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-lonely-if */\nvar CLIENT_RESPONSE = 'client_response';\nvar SERVER_RESPONSE = 'server_response';\nvar responseMap = {\n server: {\n receive: CLIENT_RESPONSE,\n post: SERVER_RESPONSE\n },\n client: {\n receive: SERVER_RESPONSE,\n post: CLIENT_RESPONSE\n }\n};\nvar KEY_METHODS = ['hand-shake', 'wave-hand', CLIENT_RESPONSE, SERVER_RESPONSE];\n/**\n * message channel\n * type: 'server' | 'client'\n */\nvar MessageChannel = /*#__PURE__*/_createClass(function MessageChannel(type, messageProxy, timeout) {\n var _this = this;\n _classCallCheck(this, MessageChannel);\n _defineProperty(this, \"receiveMessage\", function (method, eventId, payload) {\n if (method === responseMap[_this.type].receive) {\n if (eventId && _this.messageResponse[eventId]) {\n var response = _this.messageResponse[eventId];\n delete _this.messageResponse[eventId];\n response(payload);\n }\n } else {\n // server postMessage and response\n if (_this.listener) {\n var _response = function _response(pload) {\n _this.messageProxy.request(responseMap[_this.type].post, eventId, pload);\n };\n _this.listener(method, payload, _response);\n } else {\n console.warn('no message listener: ', method, payload);\n }\n }\n });\n _defineProperty(this, \"doPost\", function (_ref, method, payload) {\n var resolve = _ref.resolve,\n reject = _ref.reject,\n eventId = _ref.eventId;\n _this.messageResponse[eventId] = resolve;\n try {\n _this.messageProxy.request(method, eventId, payload);\n } catch (e) {\n delete _this.messageResponse[eventId];\n reject();\n throw e;\n }\n });\n _defineProperty(this, \"listenMessage\", function (listener) {\n _this.listener = listener;\n });\n _defineProperty(this, \"postMessage\", function (method, payload) {\n if (KEY_METHODS.indexOf(method) >= 0) {\n return Promise.reject(new Error(\"\".concat(method, \" is a protected key-method.\")));\n }\n return new Promise(function (resolve, reject) {\n if (_this.destroyed) {\n reject(new Error('message-channel had been destroyed!'));\n return;\n }\n var ctimer = null;\n var reswrap = function reswrap(value) {\n clearTimeout(ctimer);\n resolve(value);\n };\n var eventId = Math.random().toString().substr(3, 10);\n _this.doPost({\n resolve: reswrap,\n reject: reject,\n eventId: eventId\n }, method, payload);\n ctimer = setTimeout(function () {\n if (_this.messageResponse) {\n delete _this.messageResponse[eventId];\n }\n reject(new Error('postMessage timeout'));\n }, _this.timeout || 20 * 1000);\n });\n });\n _defineProperty(this, \"destroy\", function () {\n _this.destroyed = true;\n if (_this.unListen) {\n _this.unListen();\n _this.unListen = null;\n }\n _this.listener = null;\n _this.messageResponse = null;\n if (_this.messageProxy) {\n _this.messageProxy.destroy();\n _this.messageProxy = null;\n }\n });\n this.type = type;\n this.messageProxy = messageProxy;\n this.listener = null;\n this.messageResponse = {};\n this.timeout = timeout;\n this.unListen = this.messageProxy.listen(this.receiveMessage);\n});\n\n/* eslint-disable no-underscore-dangle */\nvar CLIENT_KEY$1 = 'postmessage-promise_client';\nvar SERVER_KEY = 'postmessage-promise_server';\nvar IDENTITY_KEY$1 = 'identity_key';\nvar identityMap = {\n server: {\n key: SERVER_KEY,\n accept: CLIENT_KEY$1\n },\n client: {\n key: CLIENT_KEY$1,\n accept: SERVER_KEY\n }\n};\nvar MessageProxy = /*#__PURE__*/_createClass(function MessageProxy(type, sourceInfo, eventFilter) {\n var _this2 = this;\n _classCallCheck(this, MessageProxy);\n _defineProperty(this, \"listen\", function (fn) {\n var _this = _this2;\n var listener = function listener(event) {\n if (_this.origin !== '*' && event.origin !== _this.origin || event.source !== _this.source || !event.data || event.data[IDENTITY_KEY$1] !== identityMap[_this.type].accept || event.data.channelId !== _this.channelId || !_this.eventFilter(event) || !event.data.method) {\n return;\n }\n var _event$data = event.data,\n eventId = _event$data.eventId,\n method = _event$data.method,\n payload = _event$data.payload;\n fn(method, eventId, payload);\n };\n window.addEventListener('message', listener);\n return function unListen() {\n window.removeEventListener('message', listener);\n };\n });\n _defineProperty(this, \"request\", function (method, eventId, payload) {\n if (!_this2.source || _this2.source.closed) {\n console.error('source closed.');\n return;\n }\n _this2.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY$1, identityMap[_this2.type].key), \"channelId\", _this2.channelId), \"eventId\", eventId), \"method\", method), \"payload\", payload), _this2.origin);\n });\n _defineProperty(this, \"destroy\", function () {\n _this2.type = '';\n _this2.origin = '';\n _this2.source = null;\n _this2.channelId = '';\n _this2.eventFilter = null;\n });\n this.type = type;\n var origin = sourceInfo.origin,\n source = sourceInfo.source,\n channelId = sourceInfo.channelId;\n this.origin = origin;\n this.source = source;\n this.channelId = channelId;\n this.eventFilter = eventFilter;\n});\n\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction connectServer(sourceInfo, clientProxy, timeout, clientInfo) {\n return new Promise(function (resolve, reject) {\n var server = sourceInfo.source,\n origin = sourceInfo.origin,\n channelId = sourceInfo.channelId;\n var SYN = 1;\n var ACK = 0;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var timer = null;\n var startTime = new Date();\n var unListen = null;\n function handShake(method, eventId) {\n var payload = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (method === 'hand-shake') {\n // 判断状态\n var _ref = payload || {},\n sSYN = _ref.SYN,\n sACK = _ref.ACK,\n sSeq = _ref.seqnumber,\n acknumber = _ref.acknumber;\n // console.log('client hand shake', payload);\n if (sSYN === 1 && sACK === 1 && acknumber === seqnumber + 1) {\n // this is server acknowledgement\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n ACK: 1,\n seqnumber: seqnumber + 1,\n acknumber: sSeq + 1\n });\n resolve({\n server: server,\n origin: origin,\n channelId: channelId,\n serverInfo: payload.serverInfo,\n clientInfo: clientInfo\n });\n }\n }\n }\n unListen = clientProxy.listen(handShake);\n var tryConnect = function tryConnect() {\n if (!server || server.closed) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('server closed.'));\n throw new Error('server closed.');\n }\n if (timeout) {\n var endTime = new Date();\n var usedTime = endTime - startTime;\n if (usedTime > timeout) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('connect timeout.'));\n throw new Error('connect timeout.');\n }\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n });\n };\n timer = setInterval(tryConnect, 100);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel$1(serverProps, clientProxy, timeout) {\n var server = serverProps.server,\n _serverProps$serverIn = serverProps.serverInfo,\n serverInfo = _serverProps$serverIn === void 0 ? {} : _serverProps$serverIn,\n channelId = serverProps.channelId;\n var messageChannel = new MessageChannel('client', clientProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n if (serverProps.destroy) {\n serverProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!server || server.closed) {\n console.info('server closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n serverInfo: serverInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * connect with server and create message channel\n * @param {*} serverObject\n * @param {*} options : { eventFilter, timeout } filter post messages\n */\nfunction callServer(serverObject) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!serverObject) throw new Error('serverObject is null');\n var server = serverObject.server,\n origin = serverObject.origin;\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$clientInfo = options.clientInfo,\n clientInfo = _options$clientInfo === void 0 ? {} : _options$clientInfo,\n onDestroy = options.onDestroy;\n var channelId = Math.random().toString().substr(3, 10);\n var sourceInfo = {\n source: server,\n origin: origin,\n channelId: channelId\n };\n return new Promise(function (resolve, reject) {\n if (!server || server.closed) {\n reject(new Error('server closed'));\n return;\n }\n var clientProxy = new MessageProxy('client', sourceInfo, eventFilter);\n connectServer(sourceInfo, clientProxy, timeout, clientInfo).then(function (sProps) {\n var serverProps = _objectSpread$1(_objectSpread$1({}, sProps), {}, {\n destroy: function destroy() {\n clientProxy = null;\n if (onDestroy) {\n onDestroy(sProps.serverInfo, sProps);\n }\n }\n });\n createChannel$1(serverProps, clientProxy, timeout).run(resolve);\n })[\"catch\"](function (e) {\n reject(e);\n });\n });\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar CLIENT_KEY = 'postmessage-promise_client';\nvar IDENTITY_KEY = 'identity_key';\nvar TCP_TIMEOUT_INIT = 1000; // RFC6298 2.1 initial RTO value\nvar TCP_SYNACK_RETRIES = 5;\nfunction connectClient(eventFilter, serverInfo) {\n return new Promise(function (resolve) {\n var waitingType = 'syn'; // ack // finish\n var SYN = 1;\n var ACK = 1;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var cSeqnumber = -1;\n var timer = null;\n var retries = TCP_SYNACK_RETRIES;\n function handShake(event) {\n if (!event.data || event.data[IDENTITY_KEY] !== CLIENT_KEY || !event.data.channelId || !event.data.method || event.data.method !== 'hand-shake' || !eventFilter(event)) {\n return;\n }\n // 判断状态\n var _ref = event.data.payload || {},\n cSYN = _ref.SYN,\n cACK = _ref.ACK,\n cSeq = _ref.seqnumber,\n cAcknumber = _ref.acknumber;\n // console.log('server hand shake', event.data, waitingType, retries);\n if (cSYN === 1 && cACK === 0) {\n if (waitingType !== 'syn') {\n return; // this is a syn timeout request\n }\n cSeqnumber = cSeq;\n // client synchronous\n waitingType = 'ack';\n var fn = function fn() {\n if (!event.source || event.source.closed) {\n console.info('client closed and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n return false;\n }\n try {\n event.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY, 'postmessage-promise_server'), \"channelId\", event.data.channelId), \"method\", 'hand-shake'), \"payload\", {\n serverInfo: serverInfo,\n acknumber: cSeq + 1,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n }), event.origin);\n } catch (e) {\n console.error(e);\n return true;\n }\n return true;\n };\n var tryAck = fn();\n if (!tryAck) return;\n var retryFn = function retryFn() {\n if (retries > 0) {\n // waitingType = 'syn';\n if (waitingType === 'ack') {\n // eslint-disable-next-line operator-assignment\n retries = retries - 1;\n if (fn()) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n }\n } else {\n // reset to a new listening\n console.info('server three-way hand shake timeout and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n }\n };\n // TCP_TIMEOUT_INIT: waiting for the third hand shake until timeout.\n if (!timer) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n } else if (waitingType === 'ack') {\n if (cACK === 1 && cSeq === cSeqnumber + 1 && cAcknumber === seqnumber + 1) {\n // waiting for the third hand shake.\n waitingType = 'finish';\n clearTimeout(timer);\n timer = null;\n // client acknowledgement\n window.removeEventListener('message', handShake);\n var _event$data$payload = event.data.payload,\n payload = _event$data$payload === void 0 ? {} : _event$data$payload;\n resolve({\n client: event.source,\n origin: event.origin,\n channelId: event.data.channelId,\n serverInfo: serverInfo,\n clientInfo: payload.clientInfo\n });\n }\n } else ;\n }\n window.addEventListener('message', handShake);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel(clientProps, eventFilter, timeout) {\n var origin = clientProps.origin,\n client = clientProps.client,\n channelId = clientProps.channelId,\n _clientProps$clientIn = clientProps.clientInfo,\n clientInfo = _clientProps$clientIn === void 0 ? {} : _clientProps$clientIn;\n var sourceInfo = {\n origin: origin,\n source: client,\n channelId: channelId\n };\n var serverProxy = new MessageProxy('server', sourceInfo, eventFilter);\n var messageChannel = new MessageChannel('server', serverProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n serverProxy = null;\n if (clientProps.destroy) {\n clientProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!client || client.closed) {\n console.info('client closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n clientInfo: clientInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * start a server listening, each server listening can only connect with one client.\n * @param {*} options: { eventFilter, timeout } filter post messages\n */\nfunction startListening() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$serverInfo = options.serverInfo,\n serverInfo = _options$serverInfo === void 0 ? {} : _options$serverInfo,\n onDestroy = options.onDestroy;\n return new Promise(function (resolve) {\n connectClient(eventFilter, serverInfo).then(function (cProps) {\n var clientProps = _objectSpread(_objectSpread({}, cProps), {}, {\n destroy: function destroy() {\n if (onDestroy) {\n onDestroy(cProps.clientInfo, cProps);\n }\n }\n });\n createChannel(clientProps, eventFilter, timeout).run(resolve);\n });\n });\n}\n\n/**\n * Takes a URL and returns the origin. from dollarshaveclub/postmate\n * @param {String} url The full URL being requested\n * @return {String} The URLs origin\n */\nfunction resolveOrigin(url) {\n var a = document.createElement('a');\n a.href = url;\n var protocol = a.protocol.length > 4 ? a.protocol : window.location.protocol;\n // eslint-disable-next-line no-nested-ternary\n var host = a.host.length ? a.port === '80' || a.port === '443' ? a.hostname : a.host : window.location.host;\n return a.origin || \"\".concat(protocol, \"//\").concat(host);\n}\nfunction getIframeServer(container, targetUrl, name) {\n var classListArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var root = typeof container !== 'undefined' ? container : document.body;\n var origin = resolveOrigin(targetUrl);\n var frame = document.createElement('iframe');\n frame.name = name || '';\n // eslint-disable-next-line prefer-spread\n frame.classList.add.apply(frame.classList, classListArray);\n root.appendChild(frame);\n frame.src = targetUrl;\n var iframeWindow = frame.contentWindow || frame.contentDocument.parentWindow;\n return {\n server: iframeWindow,\n origin: origin,\n frame: frame\n // destroy: () => { if (frame) { frame.parentNode.removeChild(frame); } }\n };\n}\nfunction getOpenedServer(targetUrl) {\n var _window;\n // window.opener.origin inaccessible when cross-origin\n var origin = resolveOrigin(targetUrl);\n for (var _len = arguments.length, opts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n opts[_key - 1] = arguments[_key];\n }\n var openedWindow = (_window = window).open.apply(_window, [targetUrl].concat(opts));\n return {\n server: openedWindow,\n origin: origin\n // destroy: () => { if (openedWindow && openedWindow.close) { openedWindow.close(); } },\n };\n}\nvar utils = {\n resolveOrigin: resolveOrigin,\n getIframeServer: getIframeServer,\n getOpenedServer: getOpenedServer\n};\n\nvar index = {\n callServer: callServer,\n startListening: startListening,\n utils: utils\n};\n\nexport { callServer, index as default, startListening, utils };\n","module.exports = require('./lib/type');\n","/*\n * boolify-string\n * https://github.com/sanemat/node-boolify-string\n *\n * Copyright (c) 2014 sanemat\n * Licensed under the MIT license.\n */\n\n'use strict';\nvar type = require('type-detect');\n\nmodule.exports = function(obj){\n if (type(obj) !== 'string') {\n return !!obj;\n }\n var value = obj.toLowerCase();\n var bool;\n switch (value){\n case 'false':\n case '0':\n case 'undefined':\n case 'null':\n case '':\n case 'n':\n case 'no':\n case 'off':\n bool = false;\n break;\n default:\n bool = true;\n break;\n }\n return bool;\n};\n","import { utils as postmessageUtils } from 'postmessage-promise'\nimport { hasBooleanParam } from '@/utils/url.js'\nimport { PREFIX, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Creates a prefixed event name for the BIB consent module.\n * @param {string} prefix - The prefix to use for the event name.\n * @returns {function(string): string} - A function that takes an event name and returns the prefixed event name.\n */\nexport function createPrefixedEventName(prefix) {\n return function (eventName) {\n return `bib:${prefix}:${eventName}`\n }\n}\n\n/**\n * Creates a prefixed key name for the BIB consent module.\n * @param {string} key - The key to be prefixed.\n * @returns {string} - The prefixed key name.\n */\nexport function getKeyName(key) {\n return `${PREFIX}-${key}`\n}\n\n/**\n * Gets an iframe server for a given target URL.\n * @param {HTMLElement} [container=document.body] - The container element for the iframe.\n * @param {string} targetUrl - The target URL for the iframe.\n * @returns {object} - An object containing the iframe server, origin, and the iframe element.\n */\nexport function getIframeServer(\n container,\n targetUrl,\n) {\n const root = typeof container !== 'undefined' ? container : document.body\n const origin = postmessageUtils.resolveOrigin(targetUrl)\n const iframeId = getKeyName('iframe')\n let iframe\n if (document.querySelector(`#${iframeId}`)) {\n iframe = document.querySelector(`#${iframeId}`)\n } else {\n iframe = document.createElement('iframe')\n iframe.id = iframeId\n\n const isDebugOn = hasBooleanParam(targetUrl, 'debug')\n\n if (!isDebugOn) {\n iframe.ariaHidden = true\n iframe.tabIndex = -1\n iframe.hidden = true\n iframe.style.setProperty('display', 'none')\n } else {\n iframe.style.cssText = 'width: 100%; height: 100%; border: 0;'\n }\n\n root.appendChild(iframe)\n iframe.src = targetUrl\n }\n\n const iframeWindow = iframe.contentWindow || iframe.contentDocument.parentWindow\n\n return {\n server: iframeWindow,\n origin,\n iframe,\n }\n}\n\n/**\n * Checks the server mode for a given client.\n * \n * If the client has no server URL, the function returns `SERVER_MODE.LOCAL`.\n * Otherwise, it checks if the server page exists by making a fetch request to the server URL.\n * If the request is successful (response.ok), the function returns `SERVER_MODE.REMOTE`.\n * If the request times out or fails, the function throws an error with the appropriate message.\n *\n * @param {object} client - The client object containing the server URL.\n * @param {number} [timeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout in milliseconds for the server request.\n * @returns {string} - The server mode, either `SERVER_MODE.LOCAL` or `SERVER_MODE.REMOTE`.\n * @throws {Error} - If the server page cannot be located or the request fails.\n */\nexport async function getServerMode(client) {\n\n const serverUrl = client.serverUrl\n const timeout = client.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n\n if (!serverUrl) {\n return SERVER_MODE.LOCAL\n }\n\n // Check if server page exists\n const controller = new AbortController()\n let response\n let timeoutHandle\n\n try {\n timeoutHandle = setTimeout(() => {\n console.warn(`Request timed out after ${timeout}ms. Aborting request...`)\n controller.abort()\n }, timeout)\n response = await fetch(serverUrl, { signal: controller.signal })\n\n if (response.ok) {\n return SERVER_MODE.REMOTE\n }\n } catch (error) {\n console.error(error)\n\n if (controller.signal.aborted) {\n throw new Error(`Unable to locate server page. The request timed out after ${timeout}ms. url: ${serverUrl.href}`)\n }\n\n throw new Error(`Unable to locate server page : ${serverUrl.href}.`, error)\n } finally {\n clearTimeout(timeoutHandle)\n }\n\n throw new Error(`Unable to locate server page. The request failed with status code ${response.status}. url: ${serverUrl.href}`)\n}","import { name as PKG_NAME } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${PKG_NAME}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\n\nexport const PREFIX = 'bib-consent'\n\nexport const SERVER_DEFAULT_URL = 'https://bib.umontreal.ca/consent/server'\n\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\n\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\n\n/**\n * @typedef {('analytics_consent'|'functionality_consent'|'ad_consent')} consentTypes\n */\n\n/**\n * @typedef {('granted' | 'denied')} ConsentValues\n */\n\n/**\n * @type {object} Tokens\n * @property {string} analytics_consent\n * @property {string} functionality_consent\n * @property {string} ad_consent\n */\nexport const DEFAULT_PREFERENCES = {\n analytics_consent: null,\n functionality_consent: null,\n ad_consent: null\n}\n\n/**\n * @typedef {('determinate'|'indeterminate')} consentStateTypes\n */\n\nexport const CONSENT_STATES = {\n INDETERMINATE: 'indeterminate',\n DETERMINATE: 'determinate'\n}","import boolifyString from 'boolify-string'\n\nexport function hasBooleanParam(url, param) {\n url = typeof url === 'string' ? new URL(url, location) : url\n\n const booleanString = url.searchParams.get(param)\n\n if (booleanString === null) {\n return false\n }\n\n if (booleanString === '') {\n return true\n }\n\n return boolifyString(booleanString)\n}\n\nexport function stringIsUrl(string) {\n try {\n new URL(string, location)\n return true\n } catch {\n return false\n }\n}\n\n// This is a modified version of https://www.npmjs.com/package/escape-string-regexp\nexport function patternMatchesOrigin(pattern, origin) {\n\n const escapedPattern = pattern\n .replace(/[.]/g, '\\\\$&')\n .replace(/-/g, '\\\\x2d')\n .replace(/[*]/g, '.*')\n\n return new RegExp(`^${escapedPattern}$`, 'u').test(origin)\n}"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","CLIENT_RESPONSE","SERVER_RESPONSE","responseMap","server","receive","post","client","KEY_METHODS","MessageChannel","type","messageProxy","timeout","_this","this","method","eventId","payload","messageResponse","response","listener","pload","request","console","warn","_ref","resolve","reject","e","indexOf","Promise","Error","concat","destroyed","ctimer","Math","random","toString","substr","doPost","setTimeout","unListen","destroy","listen","receiveMessage","CLIENT_KEY$1","SERVER_KEY","IDENTITY_KEY$1","identityMap","accept","MessageProxy","sourceInfo","eventFilter","_this2","fn","event","origin","source","data","channelId","_event$data","window","addEventListener","removeEventListener","closed","postMessage","error","ownKeys$1","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread$1","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","ownKeys","_objectSpread","IDENTITY_KEY","resolveOrigin","url","a","document","createElement","href","protocol","location","host","port","hostname","utils","getIframeServer","container","targetUrl","name","classListArray","root","body","frame","classList","add","appendChild","src","contentWindow","contentDocument","parentWindow","getOpenedServer","_window","_len","opts","Array","_key","open","require$$0","typeExports","bool","toLowerCase","createPrefixedEventName","prefix","eventName","getKeyName","PREFIX","DB_NAME","PKG_NAME","EVENT_NAMES","READY","UPDATE","SERVER_MODE","LOCAL","REMOTE","INDETERMINATE","DETERMINATE","analytics_consent","functionality_consent","ad_consent","serverObject","options","undefined","_options$eventFilter","_options$timeout","_options$clientInfo","clientInfo","onDestroy","clientProxy","seqnumber","Number","timer","startTime","Date","sSYN","SYN","sACK","ACK","sSeq","acknumber","clearInterval","serverInfo","setInterval","then","sProps","serverProps","_serverProps$serverIn","messageChannel","watcher","info","run","_messageChannel","listenMessage","_messageChannel2","catch","postmessageUtils","iframeId","iframe","querySelector","id","param","booleanString","URL","searchParams","get","boolifyString","style","cssText","ariaHidden","tabIndex","hidden","setProperty","s","async","serverUrl","serverRequestTimeout","controller","AbortController","timeoutHandle","abort","fetch","signal","ok","aborted","clearTimeout","status","pattern","escapedPattern","replace","RegExp","test","_options$serverInfo","waitingType","cSeqnumber","retries","handShake","cSYN","cACK","cSeq","cAcknumber","retryFn","_event$data$payload","cProps","clientProps","_clientProps$clientIn","serverProxy","string"],"mappings":"2EAAA,SAASA,EAAgBC,EAAKC,EAAKC,GAC7BD,OAAAA,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAAA,EACAC,cAAAA,EACAC,UAAAA,IAGFP,EAAIC,GAAOC,EAENF,CACT,CAWA,SAASQ,EAAaC,EAAaC,EAAYC,GAG7CR,OAAAA,OAAOC,eAAeK,EAAa,YAAa,CAC9CF,UAAU,IAELE,CACT,CAEA,SAASG,EAAgBC,EAAUJ,GACjC,KAAMI,aAAoBJ,GAClB,MAAA,IAAIK,UAAU,oCAExB,CAGA,IAAIC,EAAkB,kBAClBC,EAAkB,kBAClBC,EAAc,CAChBC,OAAQ,CACNC,QAASJ,EACTK,KAAMJ,GAERK,OAAQ,CACNF,QAASH,EACTI,KAAML,IAGNO,EAAc,CAAC,aAAc,YAAaP,EAAiBC,GAK3DO,EAA8Bf,GAAa,SAASe,EAAeC,EAAMC,EAAcC,GACzF,IAAIC,EAAQC,KACIA,EAAAA,KAAML,GACtBxB,EAAgB6B,KAAM,kBAAkB,SAAUC,EAAQC,EAASC,GACjE,GAAIF,IAAWZ,EAAYU,EAAMH,MAAML,SACrC,GAAIW,GAAWH,EAAMK,gBAAgBF,GAAU,CACzCG,IAAAA,EAAWN,EAAMK,gBAAgBF,UAC9BH,EAAMK,gBAAgBF,GAC7BG,EAASF,EACV,OAGGJ,EAAMO,SAIRP,EAAMO,SAASL,EAAQE,GAHP,SAAmBI,GACjCR,EAAMF,aAAaW,QAAQnB,EAAYU,EAAMH,MAAMJ,KAAMU,EAASK,EAC5E,IAGQE,QAAQC,KAAK,wBAAyBT,EAAQE,EAGtD,IACEhC,EAAgB6B,KAAM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AAalJ,GAChBA,EAAQ,CACNiC,UAAWA,EACXyF,WAAYA,EACZnF,YAAa,WAEL4G,IAAAA,EADFJ,OAAAA,GAEMI,EAAkBJ,GAAgBxG,YAAYW,MAAMiG,EAAiB/F,WAExEhD,QAAQH,QAChB,EACDmJ,cAAe,WAEPC,IAAAA,EADFN,IAEDM,EAAmBN,GAAgBK,cAAclG,MAAMmG,EAAkBjG,UAE7E,EACDpC,QAASA,GAEZ,EAEL,EAvDA,CA0EwB0C,EAAcA,EAAc,CAAA,EAAI4I,GAAS,GAAI,CAC7DtL,QAAS,WACH2G,GACFA,EAAU2E,EAAO5E,WAAY4E,EAEhC,IAEwB5K,EAAaxC,GAASgK,IAAIlJ,EAC3D,GACA,GACA,sBK5iBO,SAAqB0M,GAGxB,IAAA,OADA,IAAI5C,IAAI4C,EAAQvI,WAAAA,CAEpB,CACI,MAAA,OAAA,CACD,CACH","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/dist/constants-B2WJQGFq.js b/dist/constants-D0hS4kJm.js similarity index 96% rename from dist/constants-B2WJQGFq.js rename to dist/constants-D0hS4kJm.js index 37f9473..4b40ebe 100644 --- a/dist/constants-B2WJQGFq.js +++ b/dist/constants-D0hS4kJm.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { n as e } from "./package-BQN-QfHU.js"; +import { n as e } from "./package-aLA7rD-Y.js"; import { t as n } from "./type-BPiIb9Kq.js"; function t(e4, n2, t2) { return n2 in e4 ? Object.defineProperty(e4, n2, { value: t2, enumerable: true, configurable: true, writable: true }) : e4[n2] = t2, e4; @@ -286,14 +286,14 @@ function S(e4, n2) { }(n2) ? s2.style.cssText = "width: 100%; height: 100%; border: 0;" : (s2.ariaHidden = true, s2.tabIndex = -1, s2.hidden = true, s2.style.setProperty("display", "none")), t2.appendChild(s2), s2.src = n2), { server: s2.contentWindow || s2.contentDocument.parentWindow, origin: r2, iframe: s2 }; } async function q(e4) { - const n2 = e4.serverUrl, t2 = e4.serverRequestTimeout || U; - if (!n2) return N.LOCAL; + const n2 = e4.serverUrl, t2 = e4.serverRequestTimeout || F; + if (!n2) return U.LOCAL; const r2 = new AbortController(); let o2, s2; try { if (s2 = setTimeout(() => { console.warn(`Request timed out after ${t2}ms. Aborting request...`), r2.abort(); - }, t2), o2 = await fetch(n2, { signal: r2.signal }), o2.ok) return N.REMOTE; + }, t2), o2 = await fetch(n2, { signal: r2.signal }), o2.ok) return U.REMOTE; } catch (e5) { if (console.error(e5), r2.signal.aborted) throw new Error(`Unable to locate server page. The request timed out after ${t2}ms. url: ${n2.href}`); throw new Error(`Unable to locate server page : ${n2.href}.`, e5); @@ -302,24 +302,25 @@ async function q(e4) { } throw new Error(`Unable to locate server page. The request failed with status code ${o2.status}. url: ${n2.href}`); } -const L = D("consent"), $ = `${e}/consent`, A = 1, x = "consent", C = { READY: L("ready"), UPDATE: L("update") }, _ = "bib-consent", N = { LOCAL: "local", REMOTE: "remote" }, U = 500, F = { analytics_consent: null, functionality_consent: null, ad_consent: null }, K = { INDETERMINATE: "indeterminate", DETERMINATE: "determinate" }; +const L = D("consent"), $ = `${e}/consent`, A = 1, x = "consent", C = { READY: L("ready"), UPDATE: L("update") }, _ = "bib-consent", N = "https://bib.umontreal.ca/consent/server", U = { LOCAL: "local", REMOTE: "remote" }, F = 500, K = { analytics_consent: null, functionality_consent: null, ad_consent: null }, Y = { INDETERMINATE: "indeterminate", DETERMINATE: "determinate" }; export { - K as C, - F as D, + Y as C, + K as D, C as E, _ as P, - N as S, + U as S, S as a, - U as b, + F as b, g as c, I as d, R as e, - $ as f, + N as f, q as g, - A as h, - x as i, - D as j, + $ as h, + A as i, + x as j, + D as k, T as p, M as s }; -//# sourceMappingURL=constants-B2WJQGFq.js.map +//# sourceMappingURL=constants-D0hS4kJm.js.map diff --git a/dist/constants-B2WJQGFq.js.map b/dist/constants-D0hS4kJm.js.map similarity index 59% rename from dist/constants-B2WJQGFq.js.map rename to dist/constants-D0hS4kJm.js.map index add2a90..f181a3c 100644 --- a/dist/constants-B2WJQGFq.js.map +++ b/dist/constants-D0hS4kJm.js.map @@ -1 +1 @@ -{"version":3,"file":"constants-B2WJQGFq.js","sources":["../node_modules/postmessage-promise/build/postmessage-promise.esm.js","../node_modules/boolify-string/node_modules/type-detect/index.js","../node_modules/boolify-string/lib/boolify-string.js","../src/utils/url.js","../src/components/bib-consent/utils.js","../src/components/bib-consent/constants.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-lonely-if */\nvar CLIENT_RESPONSE = 'client_response';\nvar SERVER_RESPONSE = 'server_response';\nvar responseMap = {\n server: {\n receive: CLIENT_RESPONSE,\n post: SERVER_RESPONSE\n },\n client: {\n receive: SERVER_RESPONSE,\n post: CLIENT_RESPONSE\n }\n};\nvar KEY_METHODS = ['hand-shake', 'wave-hand', CLIENT_RESPONSE, SERVER_RESPONSE];\n/**\n * message channel\n * type: 'server' | 'client'\n */\nvar MessageChannel = /*#__PURE__*/_createClass(function MessageChannel(type, messageProxy, timeout) {\n var _this = this;\n _classCallCheck(this, MessageChannel);\n _defineProperty(this, \"receiveMessage\", function (method, eventId, payload) {\n if (method === responseMap[_this.type].receive) {\n if (eventId && _this.messageResponse[eventId]) {\n var response = _this.messageResponse[eventId];\n delete _this.messageResponse[eventId];\n response(payload);\n }\n } else {\n // server postMessage and response\n if (_this.listener) {\n var _response = function _response(pload) {\n _this.messageProxy.request(responseMap[_this.type].post, eventId, pload);\n };\n _this.listener(method, payload, _response);\n } else {\n console.warn('no message listener: ', method, payload);\n }\n }\n });\n _defineProperty(this, \"doPost\", function (_ref, method, payload) {\n var resolve = _ref.resolve,\n reject = _ref.reject,\n eventId = _ref.eventId;\n _this.messageResponse[eventId] = resolve;\n try {\n _this.messageProxy.request(method, eventId, payload);\n } catch (e) {\n delete _this.messageResponse[eventId];\n reject();\n throw e;\n }\n });\n _defineProperty(this, \"listenMessage\", function (listener) {\n _this.listener = listener;\n });\n _defineProperty(this, \"postMessage\", function (method, payload) {\n if (KEY_METHODS.indexOf(method) >= 0) {\n return Promise.reject(new Error(\"\".concat(method, \" is a protected key-method.\")));\n }\n return new Promise(function (resolve, reject) {\n if (_this.destroyed) {\n reject(new Error('message-channel had been destroyed!'));\n return;\n }\n var ctimer = null;\n var reswrap = function reswrap(value) {\n clearTimeout(ctimer);\n resolve(value);\n };\n var eventId = Math.random().toString().substr(3, 10);\n _this.doPost({\n resolve: reswrap,\n reject: reject,\n eventId: eventId\n }, method, payload);\n ctimer = setTimeout(function () {\n if (_this.messageResponse) {\n delete _this.messageResponse[eventId];\n }\n reject(new Error('postMessage timeout'));\n }, _this.timeout || 20 * 1000);\n });\n });\n _defineProperty(this, \"destroy\", function () {\n _this.destroyed = true;\n if (_this.unListen) {\n _this.unListen();\n _this.unListen = null;\n }\n _this.listener = null;\n _this.messageResponse = null;\n if (_this.messageProxy) {\n _this.messageProxy.destroy();\n _this.messageProxy = null;\n }\n });\n this.type = type;\n this.messageProxy = messageProxy;\n this.listener = null;\n this.messageResponse = {};\n this.timeout = timeout;\n this.unListen = this.messageProxy.listen(this.receiveMessage);\n});\n\n/* eslint-disable no-underscore-dangle */\nvar CLIENT_KEY$1 = 'postmessage-promise_client';\nvar SERVER_KEY = 'postmessage-promise_server';\nvar IDENTITY_KEY$1 = 'identity_key';\nvar identityMap = {\n server: {\n key: SERVER_KEY,\n accept: CLIENT_KEY$1\n },\n client: {\n key: CLIENT_KEY$1,\n accept: SERVER_KEY\n }\n};\nvar MessageProxy = /*#__PURE__*/_createClass(function MessageProxy(type, sourceInfo, eventFilter) {\n var _this2 = this;\n _classCallCheck(this, MessageProxy);\n _defineProperty(this, \"listen\", function (fn) {\n var _this = _this2;\n var listener = function listener(event) {\n if (_this.origin !== '*' && event.origin !== _this.origin || event.source !== _this.source || !event.data || event.data[IDENTITY_KEY$1] !== identityMap[_this.type].accept || event.data.channelId !== _this.channelId || !_this.eventFilter(event) || !event.data.method) {\n return;\n }\n var _event$data = event.data,\n eventId = _event$data.eventId,\n method = _event$data.method,\n payload = _event$data.payload;\n fn(method, eventId, payload);\n };\n window.addEventListener('message', listener);\n return function unListen() {\n window.removeEventListener('message', listener);\n };\n });\n _defineProperty(this, \"request\", function (method, eventId, payload) {\n if (!_this2.source || _this2.source.closed) {\n console.error('source closed.');\n return;\n }\n _this2.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY$1, identityMap[_this2.type].key), \"channelId\", _this2.channelId), \"eventId\", eventId), \"method\", method), \"payload\", payload), _this2.origin);\n });\n _defineProperty(this, \"destroy\", function () {\n _this2.type = '';\n _this2.origin = '';\n _this2.source = null;\n _this2.channelId = '';\n _this2.eventFilter = null;\n });\n this.type = type;\n var origin = sourceInfo.origin,\n source = sourceInfo.source,\n channelId = sourceInfo.channelId;\n this.origin = origin;\n this.source = source;\n this.channelId = channelId;\n this.eventFilter = eventFilter;\n});\n\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction connectServer(sourceInfo, clientProxy, timeout, clientInfo) {\n return new Promise(function (resolve, reject) {\n var server = sourceInfo.source,\n origin = sourceInfo.origin,\n channelId = sourceInfo.channelId;\n var SYN = 1;\n var ACK = 0;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var timer = null;\n var startTime = new Date();\n var unListen = null;\n function handShake(method, eventId) {\n var payload = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (method === 'hand-shake') {\n // 判断状态\n var _ref = payload || {},\n sSYN = _ref.SYN,\n sACK = _ref.ACK,\n sSeq = _ref.seqnumber,\n acknumber = _ref.acknumber;\n // console.log('client hand shake', payload);\n if (sSYN === 1 && sACK === 1 && acknumber === seqnumber + 1) {\n // this is server acknowledgement\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n ACK: 1,\n seqnumber: seqnumber + 1,\n acknumber: sSeq + 1\n });\n resolve({\n server: server,\n origin: origin,\n channelId: channelId,\n serverInfo: payload.serverInfo,\n clientInfo: clientInfo\n });\n }\n }\n }\n unListen = clientProxy.listen(handShake);\n var tryConnect = function tryConnect() {\n if (!server || server.closed) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('server closed.'));\n throw new Error('server closed.');\n }\n if (timeout) {\n var endTime = new Date();\n var usedTime = endTime - startTime;\n if (usedTime > timeout) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('connect timeout.'));\n throw new Error('connect timeout.');\n }\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n });\n };\n timer = setInterval(tryConnect, 100);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel$1(serverProps, clientProxy, timeout) {\n var server = serverProps.server,\n _serverProps$serverIn = serverProps.serverInfo,\n serverInfo = _serverProps$serverIn === void 0 ? {} : _serverProps$serverIn,\n channelId = serverProps.channelId;\n var messageChannel = new MessageChannel('client', clientProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n if (serverProps.destroy) {\n serverProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!server || server.closed) {\n console.info('server closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n serverInfo: serverInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * connect with server and create message channel\n * @param {*} serverObject\n * @param {*} options : { eventFilter, timeout } filter post messages\n */\nfunction callServer(serverObject) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!serverObject) throw new Error('serverObject is null');\n var server = serverObject.server,\n origin = serverObject.origin;\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$clientInfo = options.clientInfo,\n clientInfo = _options$clientInfo === void 0 ? {} : _options$clientInfo,\n onDestroy = options.onDestroy;\n var channelId = Math.random().toString().substr(3, 10);\n var sourceInfo = {\n source: server,\n origin: origin,\n channelId: channelId\n };\n return new Promise(function (resolve, reject) {\n if (!server || server.closed) {\n reject(new Error('server closed'));\n return;\n }\n var clientProxy = new MessageProxy('client', sourceInfo, eventFilter);\n connectServer(sourceInfo, clientProxy, timeout, clientInfo).then(function (sProps) {\n var serverProps = _objectSpread$1(_objectSpread$1({}, sProps), {}, {\n destroy: function destroy() {\n clientProxy = null;\n if (onDestroy) {\n onDestroy(sProps.serverInfo, sProps);\n }\n }\n });\n createChannel$1(serverProps, clientProxy, timeout).run(resolve);\n })[\"catch\"](function (e) {\n reject(e);\n });\n });\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar CLIENT_KEY = 'postmessage-promise_client';\nvar IDENTITY_KEY = 'identity_key';\nvar TCP_TIMEOUT_INIT = 1000; // RFC6298 2.1 initial RTO value\nvar TCP_SYNACK_RETRIES = 5;\nfunction connectClient(eventFilter, serverInfo) {\n return new Promise(function (resolve) {\n var waitingType = 'syn'; // ack // finish\n var SYN = 1;\n var ACK = 1;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var cSeqnumber = -1;\n var timer = null;\n var retries = TCP_SYNACK_RETRIES;\n function handShake(event) {\n if (!event.data || event.data[IDENTITY_KEY] !== CLIENT_KEY || !event.data.channelId || !event.data.method || event.data.method !== 'hand-shake' || !eventFilter(event)) {\n return;\n }\n // 判断状态\n var _ref = event.data.payload || {},\n cSYN = _ref.SYN,\n cACK = _ref.ACK,\n cSeq = _ref.seqnumber,\n cAcknumber = _ref.acknumber;\n // console.log('server hand shake', event.data, waitingType, retries);\n if (cSYN === 1 && cACK === 0) {\n if (waitingType !== 'syn') {\n return; // this is a syn timeout request\n }\n cSeqnumber = cSeq;\n // client synchronous\n waitingType = 'ack';\n var fn = function fn() {\n if (!event.source || event.source.closed) {\n console.info('client closed and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n return false;\n }\n try {\n event.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY, 'postmessage-promise_server'), \"channelId\", event.data.channelId), \"method\", 'hand-shake'), \"payload\", {\n serverInfo: serverInfo,\n acknumber: cSeq + 1,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n }), event.origin);\n } catch (e) {\n console.error(e);\n return true;\n }\n return true;\n };\n var tryAck = fn();\n if (!tryAck) return;\n var retryFn = function retryFn() {\n if (retries > 0) {\n // waitingType = 'syn';\n if (waitingType === 'ack') {\n // eslint-disable-next-line operator-assignment\n retries = retries - 1;\n if (fn()) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n }\n } else {\n // reset to a new listening\n console.info('server three-way hand shake timeout and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n }\n };\n // TCP_TIMEOUT_INIT: waiting for the third hand shake until timeout.\n if (!timer) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n } else if (waitingType === 'ack') {\n if (cACK === 1 && cSeq === cSeqnumber + 1 && cAcknumber === seqnumber + 1) {\n // waiting for the third hand shake.\n waitingType = 'finish';\n clearTimeout(timer);\n timer = null;\n // client acknowledgement\n window.removeEventListener('message', handShake);\n var _event$data$payload = event.data.payload,\n payload = _event$data$payload === void 0 ? {} : _event$data$payload;\n resolve({\n client: event.source,\n origin: event.origin,\n channelId: event.data.channelId,\n serverInfo: serverInfo,\n clientInfo: payload.clientInfo\n });\n }\n } else ;\n }\n window.addEventListener('message', handShake);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel(clientProps, eventFilter, timeout) {\n var origin = clientProps.origin,\n client = clientProps.client,\n channelId = clientProps.channelId,\n _clientProps$clientIn = clientProps.clientInfo,\n clientInfo = _clientProps$clientIn === void 0 ? {} : _clientProps$clientIn;\n var sourceInfo = {\n origin: origin,\n source: client,\n channelId: channelId\n };\n var serverProxy = new MessageProxy('server', sourceInfo, eventFilter);\n var messageChannel = new MessageChannel('server', serverProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n serverProxy = null;\n if (clientProps.destroy) {\n clientProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!client || client.closed) {\n console.info('client closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n clientInfo: clientInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * start a server listening, each server listening can only connect with one client.\n * @param {*} options: { eventFilter, timeout } filter post messages\n */\nfunction startListening() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$serverInfo = options.serverInfo,\n serverInfo = _options$serverInfo === void 0 ? {} : _options$serverInfo,\n onDestroy = options.onDestroy;\n return new Promise(function (resolve) {\n connectClient(eventFilter, serverInfo).then(function (cProps) {\n var clientProps = _objectSpread(_objectSpread({}, cProps), {}, {\n destroy: function destroy() {\n if (onDestroy) {\n onDestroy(cProps.clientInfo, cProps);\n }\n }\n });\n createChannel(clientProps, eventFilter, timeout).run(resolve);\n });\n });\n}\n\n/**\n * Takes a URL and returns the origin. from dollarshaveclub/postmate\n * @param {String} url The full URL being requested\n * @return {String} The URLs origin\n */\nfunction resolveOrigin(url) {\n var a = document.createElement('a');\n a.href = url;\n var protocol = a.protocol.length > 4 ? a.protocol : window.location.protocol;\n // eslint-disable-next-line no-nested-ternary\n var host = a.host.length ? a.port === '80' || a.port === '443' ? a.hostname : a.host : window.location.host;\n return a.origin || \"\".concat(protocol, \"//\").concat(host);\n}\nfunction getIframeServer(container, targetUrl, name) {\n var classListArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var root = typeof container !== 'undefined' ? container : document.body;\n var origin = resolveOrigin(targetUrl);\n var frame = document.createElement('iframe');\n frame.name = name || '';\n // eslint-disable-next-line prefer-spread\n frame.classList.add.apply(frame.classList, classListArray);\n root.appendChild(frame);\n frame.src = targetUrl;\n var iframeWindow = frame.contentWindow || frame.contentDocument.parentWindow;\n return {\n server: iframeWindow,\n origin: origin,\n frame: frame\n // destroy: () => { if (frame) { frame.parentNode.removeChild(frame); } }\n };\n}\nfunction getOpenedServer(targetUrl) {\n var _window;\n // window.opener.origin inaccessible when cross-origin\n var origin = resolveOrigin(targetUrl);\n for (var _len = arguments.length, opts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n opts[_key - 1] = arguments[_key];\n }\n var openedWindow = (_window = window).open.apply(_window, [targetUrl].concat(opts));\n return {\n server: openedWindow,\n origin: origin\n // destroy: () => { if (openedWindow && openedWindow.close) { openedWindow.close(); } },\n };\n}\nvar utils = {\n resolveOrigin: resolveOrigin,\n getIframeServer: getIframeServer,\n getOpenedServer: getOpenedServer\n};\n\nvar index = {\n callServer: callServer,\n startListening: startListening,\n utils: utils\n};\n\nexport { callServer, index as default, startListening, utils };\n","module.exports = require('./lib/type');\n","/*\n * boolify-string\n * https://github.com/sanemat/node-boolify-string\n *\n * Copyright (c) 2014 sanemat\n * Licensed under the MIT license.\n */\n\n'use strict';\nvar type = require('type-detect');\n\nmodule.exports = function(obj){\n if (type(obj) !== 'string') {\n return !!obj;\n }\n var value = obj.toLowerCase();\n var bool;\n switch (value){\n case 'false':\n case '0':\n case 'undefined':\n case 'null':\n case '':\n case 'n':\n case 'no':\n case 'off':\n bool = false;\n break;\n default:\n bool = true;\n break;\n }\n return bool;\n};\n","import boolifyString from 'boolify-string'\n\nexport function hasBooleanParam(url, param) {\n url = typeof url === 'string' ? new URL(url, location) : url\n\n const booleanString = url.searchParams.get(param)\n\n if (booleanString === null) {\n return false\n }\n\n if (booleanString === '') {\n return true\n }\n\n return boolifyString(booleanString)\n}\n\nexport function stringIsUrl(string) {\n try {\n new URL(string, location)\n return true\n } catch {\n return false\n }\n}\n\n// This is a modified version of https://www.npmjs.com/package/escape-string-regexp\nexport function patternMatchesOrigin(pattern, origin) {\n\n const escapedPattern = pattern\n .replace(/[.]/g, '\\\\$&')\n .replace(/-/g, '\\\\x2d')\n .replace(/[*]/g, '.*')\n\n return new RegExp(`^${escapedPattern}$`, 'u').test(origin)\n}","import { utils as postmessageUtils } from 'postmessage-promise'\nimport { hasBooleanParam } from '@/utils/url.js'\nimport { PREFIX, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Creates a prefixed event name for the BIB consent module.\n * @param {string} prefix - The prefix to use for the event name.\n * @returns {function(string): string} - A function that takes an event name and returns the prefixed event name.\n */\nexport function createPrefixedEventName(prefix) {\n return function (eventName) {\n return `bib:${prefix}:${eventName}`\n }\n}\n\n/**\n * Creates a prefixed key name for the BIB consent module.\n * @param {string} key - The key to be prefixed.\n * @returns {string} - The prefixed key name.\n */\nexport function getKeyName(key) {\n return `${PREFIX}-${key}`\n}\n\n/**\n * Gets an iframe server for a given target URL.\n * @param {HTMLElement} [container=document.body] - The container element for the iframe.\n * @param {string} targetUrl - The target URL for the iframe.\n * @returns {object} - An object containing the iframe server, origin, and the iframe element.\n */\nexport function getIframeServer(\n container,\n targetUrl,\n) {\n const root = typeof container !== 'undefined' ? container : document.body\n const origin = postmessageUtils.resolveOrigin(targetUrl)\n const iframeId = getKeyName('iframe')\n let iframe\n if (document.querySelector(`#${iframeId}`)) {\n iframe = document.querySelector(`#${iframeId}`)\n } else {\n iframe = document.createElement('iframe')\n iframe.id = iframeId\n\n const isDebugOn = hasBooleanParam(targetUrl, 'debug')\n\n if (!isDebugOn) {\n iframe.ariaHidden = true\n iframe.tabIndex = -1\n iframe.hidden = true\n iframe.style.setProperty('display', 'none')\n } else {\n iframe.style.cssText = 'width: 100%; height: 100%; border: 0;'\n }\n\n root.appendChild(iframe)\n iframe.src = targetUrl\n }\n\n const iframeWindow = iframe.contentWindow || iframe.contentDocument.parentWindow\n\n return {\n server: iframeWindow,\n origin,\n iframe,\n }\n}\n\n/**\n * Checks the server mode for a given client.\n * \n * If the client has no server URL, the function returns `SERVER_MODE.LOCAL`.\n * Otherwise, it checks if the server page exists by making a fetch request to the server URL.\n * If the request is successful (response.ok), the function returns `SERVER_MODE.REMOTE`.\n * If the request times out or fails, the function throws an error with the appropriate message.\n *\n * @param {object} client - The client object containing the server URL.\n * @param {number} [timeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout in milliseconds for the server request.\n * @returns {string} - The server mode, either `SERVER_MODE.LOCAL` or `SERVER_MODE.REMOTE`.\n * @throws {Error} - If the server page cannot be located or the request fails.\n */\nexport async function getServerMode(client) {\n\n const serverUrl = client.serverUrl\n const timeout = client.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n\n if (!serverUrl) {\n return SERVER_MODE.LOCAL\n }\n\n // Check if server page exists\n const controller = new AbortController()\n let response\n let timeoutHandle\n\n try {\n timeoutHandle = setTimeout(() => {\n console.warn(`Request timed out after ${timeout}ms. Aborting request...`)\n controller.abort()\n }, timeout)\n response = await fetch(serverUrl, { signal: controller.signal })\n\n if (response.ok) {\n return SERVER_MODE.REMOTE\n }\n } catch (error) {\n console.error(error)\n\n if (controller.signal.aborted) {\n throw new Error(`Unable to locate server page. The request timed out after ${timeout}ms. url: ${serverUrl.href}`)\n }\n\n throw new Error(`Unable to locate server page : ${serverUrl.href}.`, error)\n } finally {\n clearTimeout(timeoutHandle)\n }\n\n throw new Error(`Unable to locate server page. The request failed with status code ${response.status}. url: ${serverUrl.href}`)\n}","import { name as PKG_NAME } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${PKG_NAME}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\n\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\n\n/**\n * @typedef {('analytics_consent'|'functionality_consent'|'ad_consent')} consentTypes\n */\n\n/**\n * @typedef {('granted' | 'denied')} ConsentValues\n */\n\n/**\n * @type {object} Tokens\n * @property {string} analytics_consent\n * @property {string} functionality_consent\n * @property {string} ad_consent\n */\nexport const DEFAULT_PREFERENCES = {\n analytics_consent: null,\n functionality_consent: null,\n ad_consent: null\n}\n\n/**\n * @typedef {('determinate'|'indeterminate')} consentStateTypes\n */\n\nexport const CONSENT_STATES = {\n INDETERMINATE: 'indeterminate',\n DETERMINATE: 'determinate'\n}"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","CLIENT_RESPONSE","SERVER_RESPONSE","responseMap","server","receive","post","client","KEY_METHODS","MessageChannel","type","messageProxy","timeout","_this","this","method","eventId","payload","messageResponse","response","listener","pload","request","console","warn","_ref","resolve","reject","e","indexOf","Promise","Error","concat","destroyed","ctimer","Math","random","toString","substr","doPost","clearTimeout","setTimeout","unListen","destroy","listen","receiveMessage","CLIENT_KEY$1","SERVER_KEY","IDENTITY_KEY$1","identityMap","accept","MessageProxy","sourceInfo","eventFilter","_this2","fn","event","origin","source","data","channelId","_event$data","window","addEventListener","removeEventListener","closed","postMessage","error","ownKeys$1","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread$1","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","callServer","serverObject","options","undefined","_options$eventFilter","_options$timeout","_options$clientInfo","clientInfo","onDestroy","clientProxy","seqnumber","Number","timer","startTime","Date","sSYN","SYN","sACK","ACK","sSeq","acknumber","clearInterval","serverInfo","setInterval","then","sProps","serverProps","_serverProps$serverIn","messageChannel","watcher","info","run","_messageChannel","listenMessage","_messageChannel2","ownKeys","_objectSpread","IDENTITY_KEY","startListening","_options$serverInfo","waitingType","cSeqnumber","retries","handShake","cSYN","cACK","cSeq","cAcknumber","retryFn","_event$data$payload","cProps","clientProps","_clientProps$clientIn","serverProxy","resolveOrigin","url","a","document","createElement","href","protocol","location","host","port","hostname","utils","getIframeServer","container","targetUrl","name","classListArray","root","body","frame","classList","add","appendChild","src","contentWindow","contentDocument","parentWindow","getOpenedServer","_window","_len","opts","Array","_key","open","require$$0","bool","toLowerCase","stringIsUrl","string","URL","patternMatchesOrigin","pattern","escapedPattern","replace","RegExp","test","createPrefixedEventName","prefix","eventName","getKeyName","PREFIX","postmessageUtils","iframeId","iframe","querySelector","id","param","booleanString","searchParams","get","boolifyString","style","cssText","ariaHidden","tabIndex","hidden","setProperty","async","getServerMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","SERVER_MODE","LOCAL","controller","AbortController","timeoutHandle","abort","fetch","signal","ok","REMOTE","aborted","status","DB_NAME","PKG_NAME","DB_VERSION","DB_STORE_NAME","EVENT_NAMES","READY","UPDATE","DEFAULT_PREFERENCES","analytics_consent","functionality_consent","ad_consent","CONSENT_STATES","INDETERMINATE","DETERMINATE"],"mappings":";;AAAA,SAASA,EAAgBC,IAAKC,IAAKC,IAAAA;AAWjC,SAVID,MAAOD,KACTG,OAAOC,eAAeJ,IAAKC,IAAK,EAC9BC,OAAOA,IACPG,YAAY,MACZC,cAAc,MACdC,UAAU,KAAA,CAAA,IAGZP,GAAIC,EAAAA,IAAOC,IAENF;AACT;AAWA,SAASQ,EAAaC,IAAaC,IAAYC,IAM7C;AAAA,SAHAR,OAAOC,eAAeK,IAAa,aAAa,EAC9CF,UAAAA,MAEKE,CAAAA,GAAAA;AACT;AAEA,SAASG,EAAgBC,IAAUJ,IACjC;AAAA,MAAA,EAAMI,cAAoBJ,IACxB,OAAM,IAAIK,UAAU,mCAAA;AAExB;AAGA,IAAIC,IAAkB,mBAClBC,IAAkB,mBAClBC,IAAc,EAChBC,QAAQ,EACNC,SAASJ,GACTK,MAAMJ,EAERK,GAAAA,QAAQ,EACNF,SAASH,GACTI,MAAML,EAGNO,EAAAA,GAAAA,IAAc,CAAC,cAAc,aAAaP,GAAiBC,CAK3DO,GAAAA,IAA8Bf,EAAa,SAASe,GAAeC,IAAMC,IAAcC,IAAAA;AACzF,MAAIC,KAAQC;AACZhB,IAAgBgB,MAAML,EAAAA,GACtBxB,EAAgB6B,MAAM,kBAAkB,SAAUC,IAAQC,IAASC,IAAAA;AACjE,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,EACzE;AAAA,EAAA,UAAY;AACR3B,iBAAa8K,EACd;AAAA,EAAA;AAED,QAAM,IAAIvL,MAAM,qEAAqEZ,GAAS0M,MAAgBd,UAAAA,GAAUhE,IAC1H,EAAA;AAAA;ACnHA,MAAM2C,IAAYF,EAAwB,SAAA,GAE7BsC,IAAU,GAAGC,CACbC,YAAAA,IAAa,GACbC,IAAgB,WAEhBC,IAAc,EACzBC,OAAOzC,EAAU,OAAA,GACjB0C,QAAQ1C,EAAU,QAEPE,EAAAA,GAAAA,IAAS,eAETsB,IAAc,EACzBC,OAAO,SACPQ,QAAQ,SAAA,GAEGV,IAAiC,KAgBjCoB,IAAsB,EACjCC,mBAAmB,MACnBC,uBAAuB,MACvBC,YAAY,KAAA,GAODC,IAAiB,EAC5BC,eAAe,iBACfC,aAAa,cAAA;","x_google_ignoreList":[0,1,2]} \ No newline at end of file +{"version":3,"file":"constants-D0hS4kJm.js","sources":["../node_modules/postmessage-promise/build/postmessage-promise.esm.js","../node_modules/boolify-string/node_modules/type-detect/index.js","../node_modules/boolify-string/lib/boolify-string.js","../src/utils/url.js","../src/components/bib-consent/utils.js","../src/components/bib-consent/constants.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-lonely-if */\nvar CLIENT_RESPONSE = 'client_response';\nvar SERVER_RESPONSE = 'server_response';\nvar responseMap = {\n server: {\n receive: CLIENT_RESPONSE,\n post: SERVER_RESPONSE\n },\n client: {\n receive: SERVER_RESPONSE,\n post: CLIENT_RESPONSE\n }\n};\nvar KEY_METHODS = ['hand-shake', 'wave-hand', CLIENT_RESPONSE, SERVER_RESPONSE];\n/**\n * message channel\n * type: 'server' | 'client'\n */\nvar MessageChannel = /*#__PURE__*/_createClass(function MessageChannel(type, messageProxy, timeout) {\n var _this = this;\n _classCallCheck(this, MessageChannel);\n _defineProperty(this, \"receiveMessage\", function (method, eventId, payload) {\n if (method === responseMap[_this.type].receive) {\n if (eventId && _this.messageResponse[eventId]) {\n var response = _this.messageResponse[eventId];\n delete _this.messageResponse[eventId];\n response(payload);\n }\n } else {\n // server postMessage and response\n if (_this.listener) {\n var _response = function _response(pload) {\n _this.messageProxy.request(responseMap[_this.type].post, eventId, pload);\n };\n _this.listener(method, payload, _response);\n } else {\n console.warn('no message listener: ', method, payload);\n }\n }\n });\n _defineProperty(this, \"doPost\", function (_ref, method, payload) {\n var resolve = _ref.resolve,\n reject = _ref.reject,\n eventId = _ref.eventId;\n _this.messageResponse[eventId] = resolve;\n try {\n _this.messageProxy.request(method, eventId, payload);\n } catch (e) {\n delete _this.messageResponse[eventId];\n reject();\n throw e;\n }\n });\n _defineProperty(this, \"listenMessage\", function (listener) {\n _this.listener = listener;\n });\n _defineProperty(this, \"postMessage\", function (method, payload) {\n if (KEY_METHODS.indexOf(method) >= 0) {\n return Promise.reject(new Error(\"\".concat(method, \" is a protected key-method.\")));\n }\n return new Promise(function (resolve, reject) {\n if (_this.destroyed) {\n reject(new Error('message-channel had been destroyed!'));\n return;\n }\n var ctimer = null;\n var reswrap = function reswrap(value) {\n clearTimeout(ctimer);\n resolve(value);\n };\n var eventId = Math.random().toString().substr(3, 10);\n _this.doPost({\n resolve: reswrap,\n reject: reject,\n eventId: eventId\n }, method, payload);\n ctimer = setTimeout(function () {\n if (_this.messageResponse) {\n delete _this.messageResponse[eventId];\n }\n reject(new Error('postMessage timeout'));\n }, _this.timeout || 20 * 1000);\n });\n });\n _defineProperty(this, \"destroy\", function () {\n _this.destroyed = true;\n if (_this.unListen) {\n _this.unListen();\n _this.unListen = null;\n }\n _this.listener = null;\n _this.messageResponse = null;\n if (_this.messageProxy) {\n _this.messageProxy.destroy();\n _this.messageProxy = null;\n }\n });\n this.type = type;\n this.messageProxy = messageProxy;\n this.listener = null;\n this.messageResponse = {};\n this.timeout = timeout;\n this.unListen = this.messageProxy.listen(this.receiveMessage);\n});\n\n/* eslint-disable no-underscore-dangle */\nvar CLIENT_KEY$1 = 'postmessage-promise_client';\nvar SERVER_KEY = 'postmessage-promise_server';\nvar IDENTITY_KEY$1 = 'identity_key';\nvar identityMap = {\n server: {\n key: SERVER_KEY,\n accept: CLIENT_KEY$1\n },\n client: {\n key: CLIENT_KEY$1,\n accept: SERVER_KEY\n }\n};\nvar MessageProxy = /*#__PURE__*/_createClass(function MessageProxy(type, sourceInfo, eventFilter) {\n var _this2 = this;\n _classCallCheck(this, MessageProxy);\n _defineProperty(this, \"listen\", function (fn) {\n var _this = _this2;\n var listener = function listener(event) {\n if (_this.origin !== '*' && event.origin !== _this.origin || event.source !== _this.source || !event.data || event.data[IDENTITY_KEY$1] !== identityMap[_this.type].accept || event.data.channelId !== _this.channelId || !_this.eventFilter(event) || !event.data.method) {\n return;\n }\n var _event$data = event.data,\n eventId = _event$data.eventId,\n method = _event$data.method,\n payload = _event$data.payload;\n fn(method, eventId, payload);\n };\n window.addEventListener('message', listener);\n return function unListen() {\n window.removeEventListener('message', listener);\n };\n });\n _defineProperty(this, \"request\", function (method, eventId, payload) {\n if (!_this2.source || _this2.source.closed) {\n console.error('source closed.');\n return;\n }\n _this2.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY$1, identityMap[_this2.type].key), \"channelId\", _this2.channelId), \"eventId\", eventId), \"method\", method), \"payload\", payload), _this2.origin);\n });\n _defineProperty(this, \"destroy\", function () {\n _this2.type = '';\n _this2.origin = '';\n _this2.source = null;\n _this2.channelId = '';\n _this2.eventFilter = null;\n });\n this.type = type;\n var origin = sourceInfo.origin,\n source = sourceInfo.source,\n channelId = sourceInfo.channelId;\n this.origin = origin;\n this.source = source;\n this.channelId = channelId;\n this.eventFilter = eventFilter;\n});\n\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction connectServer(sourceInfo, clientProxy, timeout, clientInfo) {\n return new Promise(function (resolve, reject) {\n var server = sourceInfo.source,\n origin = sourceInfo.origin,\n channelId = sourceInfo.channelId;\n var SYN = 1;\n var ACK = 0;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var timer = null;\n var startTime = new Date();\n var unListen = null;\n function handShake(method, eventId) {\n var payload = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (method === 'hand-shake') {\n // 判断状态\n var _ref = payload || {},\n sSYN = _ref.SYN,\n sACK = _ref.ACK,\n sSeq = _ref.seqnumber,\n acknumber = _ref.acknumber;\n // console.log('client hand shake', payload);\n if (sSYN === 1 && sACK === 1 && acknumber === seqnumber + 1) {\n // this is server acknowledgement\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n ACK: 1,\n seqnumber: seqnumber + 1,\n acknumber: sSeq + 1\n });\n resolve({\n server: server,\n origin: origin,\n channelId: channelId,\n serverInfo: payload.serverInfo,\n clientInfo: clientInfo\n });\n }\n }\n }\n unListen = clientProxy.listen(handShake);\n var tryConnect = function tryConnect() {\n if (!server || server.closed) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('server closed.'));\n throw new Error('server closed.');\n }\n if (timeout) {\n var endTime = new Date();\n var usedTime = endTime - startTime;\n if (usedTime > timeout) {\n clearInterval(timer);\n if (unListen) {\n unListen();\n }\n reject(new Error('connect timeout.'));\n throw new Error('connect timeout.');\n }\n }\n clientProxy.request('hand-shake', 'hand-shake-event', {\n clientInfo: clientInfo,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n });\n };\n timer = setInterval(tryConnect, 100);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel$1(serverProps, clientProxy, timeout) {\n var server = serverProps.server,\n _serverProps$serverIn = serverProps.serverInfo,\n serverInfo = _serverProps$serverIn === void 0 ? {} : _serverProps$serverIn,\n channelId = serverProps.channelId;\n var messageChannel = new MessageChannel('client', clientProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n if (serverProps.destroy) {\n serverProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!server || server.closed) {\n console.info('server closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n serverInfo: serverInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * connect with server and create message channel\n * @param {*} serverObject\n * @param {*} options : { eventFilter, timeout } filter post messages\n */\nfunction callServer(serverObject) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!serverObject) throw new Error('serverObject is null');\n var server = serverObject.server,\n origin = serverObject.origin;\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$clientInfo = options.clientInfo,\n clientInfo = _options$clientInfo === void 0 ? {} : _options$clientInfo,\n onDestroy = options.onDestroy;\n var channelId = Math.random().toString().substr(3, 10);\n var sourceInfo = {\n source: server,\n origin: origin,\n channelId: channelId\n };\n return new Promise(function (resolve, reject) {\n if (!server || server.closed) {\n reject(new Error('server closed'));\n return;\n }\n var clientProxy = new MessageProxy('client', sourceInfo, eventFilter);\n connectServer(sourceInfo, clientProxy, timeout, clientInfo).then(function (sProps) {\n var serverProps = _objectSpread$1(_objectSpread$1({}, sProps), {}, {\n destroy: function destroy() {\n clientProxy = null;\n if (onDestroy) {\n onDestroy(sProps.serverInfo, sProps);\n }\n }\n });\n createChannel$1(serverProps, clientProxy, timeout).run(resolve);\n })[\"catch\"](function (e) {\n reject(e);\n });\n });\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar CLIENT_KEY = 'postmessage-promise_client';\nvar IDENTITY_KEY = 'identity_key';\nvar TCP_TIMEOUT_INIT = 1000; // RFC6298 2.1 initial RTO value\nvar TCP_SYNACK_RETRIES = 5;\nfunction connectClient(eventFilter, serverInfo) {\n return new Promise(function (resolve) {\n var waitingType = 'syn'; // ack // finish\n var SYN = 1;\n var ACK = 1;\n var seqnumber = Number(Math.random().toString().substr(3, 10));\n var cSeqnumber = -1;\n var timer = null;\n var retries = TCP_SYNACK_RETRIES;\n function handShake(event) {\n if (!event.data || event.data[IDENTITY_KEY] !== CLIENT_KEY || !event.data.channelId || !event.data.method || event.data.method !== 'hand-shake' || !eventFilter(event)) {\n return;\n }\n // 判断状态\n var _ref = event.data.payload || {},\n cSYN = _ref.SYN,\n cACK = _ref.ACK,\n cSeq = _ref.seqnumber,\n cAcknumber = _ref.acknumber;\n // console.log('server hand shake', event.data, waitingType, retries);\n if (cSYN === 1 && cACK === 0) {\n if (waitingType !== 'syn') {\n return; // this is a syn timeout request\n }\n cSeqnumber = cSeq;\n // client synchronous\n waitingType = 'ack';\n var fn = function fn() {\n if (!event.source || event.source.closed) {\n console.info('client closed and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n return false;\n }\n try {\n event.source.postMessage(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IDENTITY_KEY, 'postmessage-promise_server'), \"channelId\", event.data.channelId), \"method\", 'hand-shake'), \"payload\", {\n serverInfo: serverInfo,\n acknumber: cSeq + 1,\n SYN: SYN,\n ACK: ACK,\n seqnumber: seqnumber\n }), event.origin);\n } catch (e) {\n console.error(e);\n return true;\n }\n return true;\n };\n var tryAck = fn();\n if (!tryAck) return;\n var retryFn = function retryFn() {\n if (retries > 0) {\n // waitingType = 'syn';\n if (waitingType === 'ack') {\n // eslint-disable-next-line operator-assignment\n retries = retries - 1;\n if (fn()) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n }\n } else {\n // reset to a new listening\n console.info('server three-way hand shake timeout and reset to listening.');\n waitingType = 'syn';\n clearTimeout(timer);\n timer = null;\n retries = TCP_SYNACK_RETRIES;\n seqnumber = Number(Math.random().toString().substr(3, 10));\n cSeqnumber = -1;\n }\n };\n // TCP_TIMEOUT_INIT: waiting for the third hand shake until timeout.\n if (!timer) {\n timer = setTimeout(retryFn, TCP_TIMEOUT_INIT);\n }\n } else if (waitingType === 'ack') {\n if (cACK === 1 && cSeq === cSeqnumber + 1 && cAcknumber === seqnumber + 1) {\n // waiting for the third hand shake.\n waitingType = 'finish';\n clearTimeout(timer);\n timer = null;\n // client acknowledgement\n window.removeEventListener('message', handShake);\n var _event$data$payload = event.data.payload,\n payload = _event$data$payload === void 0 ? {} : _event$data$payload;\n resolve({\n client: event.source,\n origin: event.origin,\n channelId: event.data.channelId,\n serverInfo: serverInfo,\n clientInfo: payload.clientInfo\n });\n }\n } else ;\n }\n window.addEventListener('message', handShake);\n });\n}\n/**\n * create a message channel based on the channelId.\n * @param {*} clientInfo\n */\nfunction createChannel(clientProps, eventFilter, timeout) {\n var origin = clientProps.origin,\n client = clientProps.client,\n channelId = clientProps.channelId,\n _clientProps$clientIn = clientProps.clientInfo,\n clientInfo = _clientProps$clientIn === void 0 ? {} : _clientProps$clientIn;\n var sourceInfo = {\n origin: origin,\n source: client,\n channelId: channelId\n };\n var serverProxy = new MessageProxy('server', sourceInfo, eventFilter);\n var messageChannel = new MessageChannel('server', serverProxy, timeout);\n var destroy = function destroy() {\n if (messageChannel) {\n messageChannel.destroy();\n messageChannel = null;\n }\n serverProxy = null;\n if (clientProps.destroy) {\n clientProps.destroy();\n }\n };\n // daemon\n var watcher = null;\n function watch() {\n if (!client || client.closed) {\n console.info('client closed.');\n clearInterval(watcher);\n destroy();\n }\n }\n watcher = setInterval(watch, 2000);\n return {\n run: function run(resolve) {\n resolve({\n channelId: channelId,\n clientInfo: clientInfo,\n postMessage: function postMessage() {\n if (messageChannel) {\n var _messageChannel;\n return (_messageChannel = messageChannel).postMessage.apply(_messageChannel, arguments);\n }\n return Promise.reject();\n },\n listenMessage: function listenMessage() {\n if (messageChannel) {\n var _messageChannel2;\n (_messageChannel2 = messageChannel).listenMessage.apply(_messageChannel2, arguments);\n }\n },\n destroy: destroy\n });\n }\n };\n}\n\n/**\n * start a server listening, each server listening can only connect with one client.\n * @param {*} options: { eventFilter, timeout } filter post messages\n */\nfunction startListening() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$eventFilter = options.eventFilter,\n eventFilter = _options$eventFilter === void 0 ? function () {\n return true;\n } : _options$eventFilter,\n _options$timeout = options.timeout,\n timeout = _options$timeout === void 0 ? 20 * 1000 : _options$timeout,\n _options$serverInfo = options.serverInfo,\n serverInfo = _options$serverInfo === void 0 ? {} : _options$serverInfo,\n onDestroy = options.onDestroy;\n return new Promise(function (resolve) {\n connectClient(eventFilter, serverInfo).then(function (cProps) {\n var clientProps = _objectSpread(_objectSpread({}, cProps), {}, {\n destroy: function destroy() {\n if (onDestroy) {\n onDestroy(cProps.clientInfo, cProps);\n }\n }\n });\n createChannel(clientProps, eventFilter, timeout).run(resolve);\n });\n });\n}\n\n/**\n * Takes a URL and returns the origin. from dollarshaveclub/postmate\n * @param {String} url The full URL being requested\n * @return {String} The URLs origin\n */\nfunction resolveOrigin(url) {\n var a = document.createElement('a');\n a.href = url;\n var protocol = a.protocol.length > 4 ? a.protocol : window.location.protocol;\n // eslint-disable-next-line no-nested-ternary\n var host = a.host.length ? a.port === '80' || a.port === '443' ? a.hostname : a.host : window.location.host;\n return a.origin || \"\".concat(protocol, \"//\").concat(host);\n}\nfunction getIframeServer(container, targetUrl, name) {\n var classListArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var root = typeof container !== 'undefined' ? container : document.body;\n var origin = resolveOrigin(targetUrl);\n var frame = document.createElement('iframe');\n frame.name = name || '';\n // eslint-disable-next-line prefer-spread\n frame.classList.add.apply(frame.classList, classListArray);\n root.appendChild(frame);\n frame.src = targetUrl;\n var iframeWindow = frame.contentWindow || frame.contentDocument.parentWindow;\n return {\n server: iframeWindow,\n origin: origin,\n frame: frame\n // destroy: () => { if (frame) { frame.parentNode.removeChild(frame); } }\n };\n}\nfunction getOpenedServer(targetUrl) {\n var _window;\n // window.opener.origin inaccessible when cross-origin\n var origin = resolveOrigin(targetUrl);\n for (var _len = arguments.length, opts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n opts[_key - 1] = arguments[_key];\n }\n var openedWindow = (_window = window).open.apply(_window, [targetUrl].concat(opts));\n return {\n server: openedWindow,\n origin: origin\n // destroy: () => { if (openedWindow && openedWindow.close) { openedWindow.close(); } },\n };\n}\nvar utils = {\n resolveOrigin: resolveOrigin,\n getIframeServer: getIframeServer,\n getOpenedServer: getOpenedServer\n};\n\nvar index = {\n callServer: callServer,\n startListening: startListening,\n utils: utils\n};\n\nexport { callServer, index as default, startListening, utils };\n","module.exports = require('./lib/type');\n","/*\n * boolify-string\n * https://github.com/sanemat/node-boolify-string\n *\n * Copyright (c) 2014 sanemat\n * Licensed under the MIT license.\n */\n\n'use strict';\nvar type = require('type-detect');\n\nmodule.exports = function(obj){\n if (type(obj) !== 'string') {\n return !!obj;\n }\n var value = obj.toLowerCase();\n var bool;\n switch (value){\n case 'false':\n case '0':\n case 'undefined':\n case 'null':\n case '':\n case 'n':\n case 'no':\n case 'off':\n bool = false;\n break;\n default:\n bool = true;\n break;\n }\n return bool;\n};\n","import boolifyString from 'boolify-string'\n\nexport function hasBooleanParam(url, param) {\n url = typeof url === 'string' ? new URL(url, location) : url\n\n const booleanString = url.searchParams.get(param)\n\n if (booleanString === null) {\n return false\n }\n\n if (booleanString === '') {\n return true\n }\n\n return boolifyString(booleanString)\n}\n\nexport function stringIsUrl(string) {\n try {\n new URL(string, location)\n return true\n } catch {\n return false\n }\n}\n\n// This is a modified version of https://www.npmjs.com/package/escape-string-regexp\nexport function patternMatchesOrigin(pattern, origin) {\n\n const escapedPattern = pattern\n .replace(/[.]/g, '\\\\$&')\n .replace(/-/g, '\\\\x2d')\n .replace(/[*]/g, '.*')\n\n return new RegExp(`^${escapedPattern}$`, 'u').test(origin)\n}","import { utils as postmessageUtils } from 'postmessage-promise'\nimport { hasBooleanParam } from '@/utils/url.js'\nimport { PREFIX, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Creates a prefixed event name for the BIB consent module.\n * @param {string} prefix - The prefix to use for the event name.\n * @returns {function(string): string} - A function that takes an event name and returns the prefixed event name.\n */\nexport function createPrefixedEventName(prefix) {\n return function (eventName) {\n return `bib:${prefix}:${eventName}`\n }\n}\n\n/**\n * Creates a prefixed key name for the BIB consent module.\n * @param {string} key - The key to be prefixed.\n * @returns {string} - The prefixed key name.\n */\nexport function getKeyName(key) {\n return `${PREFIX}-${key}`\n}\n\n/**\n * Gets an iframe server for a given target URL.\n * @param {HTMLElement} [container=document.body] - The container element for the iframe.\n * @param {string} targetUrl - The target URL for the iframe.\n * @returns {object} - An object containing the iframe server, origin, and the iframe element.\n */\nexport function getIframeServer(\n container,\n targetUrl,\n) {\n const root = typeof container !== 'undefined' ? container : document.body\n const origin = postmessageUtils.resolveOrigin(targetUrl)\n const iframeId = getKeyName('iframe')\n let iframe\n if (document.querySelector(`#${iframeId}`)) {\n iframe = document.querySelector(`#${iframeId}`)\n } else {\n iframe = document.createElement('iframe')\n iframe.id = iframeId\n\n const isDebugOn = hasBooleanParam(targetUrl, 'debug')\n\n if (!isDebugOn) {\n iframe.ariaHidden = true\n iframe.tabIndex = -1\n iframe.hidden = true\n iframe.style.setProperty('display', 'none')\n } else {\n iframe.style.cssText = 'width: 100%; height: 100%; border: 0;'\n }\n\n root.appendChild(iframe)\n iframe.src = targetUrl\n }\n\n const iframeWindow = iframe.contentWindow || iframe.contentDocument.parentWindow\n\n return {\n server: iframeWindow,\n origin,\n iframe,\n }\n}\n\n/**\n * Checks the server mode for a given client.\n * \n * If the client has no server URL, the function returns `SERVER_MODE.LOCAL`.\n * Otherwise, it checks if the server page exists by making a fetch request to the server URL.\n * If the request is successful (response.ok), the function returns `SERVER_MODE.REMOTE`.\n * If the request times out or fails, the function throws an error with the appropriate message.\n *\n * @param {object} client - The client object containing the server URL.\n * @param {number} [timeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout in milliseconds for the server request.\n * @returns {string} - The server mode, either `SERVER_MODE.LOCAL` or `SERVER_MODE.REMOTE`.\n * @throws {Error} - If the server page cannot be located or the request fails.\n */\nexport async function getServerMode(client) {\n\n const serverUrl = client.serverUrl\n const timeout = client.serverRequestTimeout || SERVER_REQUEST_DEFAULT_TIMEOUT\n\n if (!serverUrl) {\n return SERVER_MODE.LOCAL\n }\n\n // Check if server page exists\n const controller = new AbortController()\n let response\n let timeoutHandle\n\n try {\n timeoutHandle = setTimeout(() => {\n console.warn(`Request timed out after ${timeout}ms. Aborting request...`)\n controller.abort()\n }, timeout)\n response = await fetch(serverUrl, { signal: controller.signal })\n\n if (response.ok) {\n return SERVER_MODE.REMOTE\n }\n } catch (error) {\n console.error(error)\n\n if (controller.signal.aborted) {\n throw new Error(`Unable to locate server page. The request timed out after ${timeout}ms. url: ${serverUrl.href}`)\n }\n\n throw new Error(`Unable to locate server page : ${serverUrl.href}.`, error)\n } finally {\n clearTimeout(timeoutHandle)\n }\n\n throw new Error(`Unable to locate server page. The request failed with status code ${response.status}. url: ${serverUrl.href}`)\n}","import { name as PKG_NAME } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${PKG_NAME}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\n\nexport const PREFIX = 'bib-consent'\n\nexport const SERVER_DEFAULT_URL = 'https://bib.umontreal.ca/consent/server'\n\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\n\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\n\n/**\n * @typedef {('analytics_consent'|'functionality_consent'|'ad_consent')} consentTypes\n */\n\n/**\n * @typedef {('granted' | 'denied')} ConsentValues\n */\n\n/**\n * @type {object} Tokens\n * @property {string} analytics_consent\n * @property {string} functionality_consent\n * @property {string} ad_consent\n */\nexport const DEFAULT_PREFERENCES = {\n analytics_consent: null,\n functionality_consent: null,\n ad_consent: null\n}\n\n/**\n * @typedef {('determinate'|'indeterminate')} consentStateTypes\n */\n\nexport const CONSENT_STATES = {\n INDETERMINATE: 'indeterminate',\n DETERMINATE: 'determinate'\n}"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","CLIENT_RESPONSE","SERVER_RESPONSE","responseMap","server","receive","post","client","KEY_METHODS","MessageChannel","type","messageProxy","timeout","_this","this","method","eventId","payload","messageResponse","response","listener","pload","request","console","warn","_ref","resolve","reject","e","indexOf","Promise","Error","concat","destroyed","ctimer","Math","random","toString","substr","doPost","clearTimeout","setTimeout","unListen","destroy","listen","receiveMessage","CLIENT_KEY$1","SERVER_KEY","IDENTITY_KEY$1","identityMap","accept","MessageProxy","sourceInfo","eventFilter","_this2","fn","event","origin","source","data","channelId","_event$data","window","addEventListener","removeEventListener","closed","postMessage","error","ownKeys$1","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread$1","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","callServer","serverObject","options","undefined","_options$eventFilter","_options$timeout","_options$clientInfo","clientInfo","onDestroy","clientProxy","seqnumber","Number","timer","startTime","Date","sSYN","SYN","sACK","ACK","sSeq","acknumber","clearInterval","serverInfo","setInterval","then","sProps","serverProps","_serverProps$serverIn","messageChannel","watcher","info","run","_messageChannel","listenMessage","_messageChannel2","ownKeys","_objectSpread","IDENTITY_KEY","startListening","_options$serverInfo","waitingType","cSeqnumber","retries","handShake","cSYN","cACK","cSeq","cAcknumber","retryFn","_event$data$payload","cProps","clientProps","_clientProps$clientIn","serverProxy","resolveOrigin","url","a","document","createElement","href","protocol","location","host","port","hostname","utils","getIframeServer","container","targetUrl","name","classListArray","root","body","frame","classList","add","appendChild","src","contentWindow","contentDocument","parentWindow","getOpenedServer","_window","_len","opts","Array","_key","open","require$$0","bool","toLowerCase","stringIsUrl","string","URL","patternMatchesOrigin","pattern","escapedPattern","replace","RegExp","test","createPrefixedEventName","prefix","eventName","getKeyName","PREFIX","postmessageUtils","iframeId","iframe","querySelector","id","param","booleanString","searchParams","get","boolifyString","style","cssText","ariaHidden","tabIndex","hidden","setProperty","async","getServerMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","SERVER_MODE","LOCAL","controller","AbortController","timeoutHandle","abort","fetch","signal","ok","REMOTE","aborted","status","DB_NAME","PKG_NAME","DB_VERSION","DB_STORE_NAME","EVENT_NAMES","READY","UPDATE","SERVER_DEFAULT_URL","DEFAULT_PREFERENCES","analytics_consent","functionality_consent","ad_consent","CONSENT_STATES","INDETERMINATE","DETERMINATE"],"mappings":";;AAAA,SAASA,EAAgBC,IAAKC,IAAKC,IAAAA;AAWjC,SAVID,MAAOD,KACTG,OAAOC,eAAeJ,IAAKC,IAAK,EAC9BC,OAAOA,IACPG,YAAY,MACZC,cAAc,MACdC,UAAU,KAAA,CAAA,IAGZP,GAAIC,EAAAA,IAAOC,IAENF;AACT;AAWA,SAASQ,EAAaC,IAAaC,IAAYC,IAM7C;AAAA,SAHAR,OAAOC,eAAeK,IAAa,aAAa,EAC9CF,UAAAA,MAEKE,CAAAA,GAAAA;AACT;AAEA,SAASG,EAAgBC,IAAUJ,IACjC;A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ACzBlB,cAAQC,KAAK,2BAA2BZ,EAAAA,yBAAAA,GACxCwM,GAAWG,MAAAA;AAAAA,IAAO,GACjB3M,EAAAA,GACHO,KAAiBqM,MAAAA,MAAMT,IAAW,EAAEU,QAAQL,GAAWK,OAEnDtM,CAAAA,GAAAA,GAASuM,GACX,QAAOR,EAAYS;AAAAA,EAEtB,SAAQxJ,IAAAA;AAGP,QAFA5C,QAAQ4C,MAAMA,EAAAA,GAEViJ,GAAWK,OAAOG,QACpB,OAAM,IAAI7L,MAAM,6DAA6DnB,EAAAA,YAAmBmM,GAAUhE,IAAAA,EAAAA;AAG5G,UAAM,IAAIhH,MAAM,kCAAkCgL,GAAUhE,IAAAA,KAAS5E,EACzE;AAAA,EAAA,UAAY;AACR3B,iBAAa8K,EACd;AAAA,EAAA;AAED,QAAM,IAAIvL,MAAM,qEAAqEZ,GAAS0M,MAAgBd,UAAAA,GAAUhE,IAC1H,EAAA;AAAA;ACnHA,MAAM2C,IAAYF,EAAwB,SAAA,GAE7BsC,IAAU,GAAGC,CACbC,YAAAA,IAAa,GACbC,IAAgB,WAEhBC,IAAc,EACzBC,OAAOzC,EAAU,OAAA,GACjB0C,QAAQ1C,EAAU,QAGPE,EAAAA,GAAAA,IAAS,eAETyC,IAAqB,2CAErBnB,IAAc,EACzBC,OAAO,SACPQ,QAAQ,SAAA,GAGGV,IAAiC,KAgBjCqB,IAAsB,EACjCC,mBAAmB,MACnBC,uBAAuB,MACvBC,YAAY,KAAA,GAODC,IAAiB,EAC5BC,eAAe,iBACfC,aAAa;","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/dist/constants-PQ5SQuv-.cjs b/dist/constants-PQ5SQuv-.cjs deleted file mode 100644 index 869be3d..0000000 --- a/dist/constants-PQ5SQuv-.cjs +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Librairie du system desing des Bibliothèques de l'Université de Montréal - * @module @bibudem/ui - * @version 0.18.1 - * @author Christian Rémillard - * @license ISC - * @see https://github.com/bibudem/ui - */ -const e=require("./package-D1p4nXVA.cjs"),t=require("./type-KOUr406I.cjs");function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="client_response",i="server_response",a={server:{receive:s,post:i},client:{receive:i,post:s}},c=["hand-shake","wave-hand",s,i],l=r((function e(t,r,s){var i=this;o(this,e),n(this,"receiveMessage",(function(e,t,n){if(e===a[i.type].receive){if(t&&i.messageResponse[t]){var r=i.messageResponse[t];delete i.messageResponse[t],r(n)}}else i.listener?i.listener(e,n,(function(e){i.messageProxy.request(a[i.type].post,t,e)})):console.warn("no message listener: ",e,n)})),n(this,"doPost",(function(e,t,n){var r=e.resolve,o=e.reject,s=e.eventId;i.messageResponse[s]=r;try{i.messageProxy.request(t,s,n)}catch(a){throw delete i.messageResponse[s],o(),a}})),n(this,"listenMessage",(function(e){i.listener=e})),n(this,"postMessage",(function(e,t){return c.indexOf(e)>=0?Promise.reject(new Error("".concat(e," is a protected key-method."))):new Promise((function(n,r){if(i.destroyed)r(new Error("message-channel had been destroyed!"));else{var o=null,s=Math.random().toString().substr(3,10);i.doPost({resolve:function(e){clearTimeout(o),n(e)},reject:r,eventId:s},e,t),o=setTimeout((function(){i.messageResponse&&delete i.messageResponse[s],r(new Error("postMessage timeout"))}),i.timeout||2e4)}}))})),n(this,"destroy",(function(){i.destroyed=!0,i.unListen&&(i.unListen(),i.unListen=null),i.listener=null,i.messageResponse=null,i.messageProxy&&(i.messageProxy.destroy(),i.messageProxy=null)})),this.type=t,this.messageProxy=r,this.listener=null,this.messageResponse={},this.timeout=s,this.unListen=this.messageProxy.listen(this.receiveMessage)})),u="postmessage-promise_client",d="postmessage-promise_server",f="identity_key",p={server:{key:d,accept:u},client:{key:u,accept:d}},v=r((function e(t,r,s){var i=this;o(this,e),n(this,"listen",(function(e){var t=i,n=function(n){if(("*"===t.origin||n.origin===t.origin)&&n.source===t.source&&n.data&&n.data[f]===p[t.type].accept&&n.data.channelId===t.channelId&&t.eventFilter(n)&&n.data.method){var r=n.data,o=r.eventId,s=r.method,i=r.payload;e(s,o,i)}};return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}})),n(this,"request",(function(e,t,r){i.source&&!i.source.closed?i.source.postMessage(n(n(n(n(n({},f,p[i.type].key),"channelId",i.channelId),"eventId",t),"method",e),"payload",r),i.origin):console.error("source closed.")})),n(this,"destroy",(function(){i.type="",i.origin="",i.source=null,i.channelId="",i.eventFilter=null})),this.type=t;var a=r.origin,c=r.source,l=r.channelId;this.origin=a,this.source=c,this.channelId=l,this.eventFilter=s}));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t4?t.protocol:window.location.protocol,r=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||"".concat(n,"//").concat(r)}var E={resolveOrigin:b,getIframeServer:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=void 0!==e?e:document.body,s=b(t),i=document.createElement("iframe");return i.name=n||"",i.classList.add.apply(i.classList,r),o.appendChild(i),i.src=t,{server:i.contentWindow||i.contentDocument.parentWindow,origin:s,frame:i}},getOpenedServer:function(e){for(var t,n=b(e),r=arguments.length,o=new Array(r>1?r-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("serverObject is null");var n=e.server,r=e.origin,o=t.eventFilter,s=void 0===o?function(){return!0}:o,i=t.timeout,a=void 0===i?2e4:i,c=t.clientInfo,u=void 0===c?{}:c,d=t.onDestroy,f=Math.random().toString().substr(3,10),p={source:n,origin:r,channelId:f};return new Promise((function(e,t){if(n&&!n.closed){var r=new v("client",p,s);(o=p,i=r,c=a,f=u,new Promise((function(e,t){var n=o.source,r=o.origin,s=o.channelId,a=Number(Math.random().toString().substr(3,10)),l=null,u=new Date,d=null;d=i.listen((function(t,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("hand-shake"===t){var u=c||{},p=u.SYN,v=u.ACK,h=u.seqnumber,m=u.acknumber;1===p&&1===v&&m===a+1&&(clearInterval(l),d&&d(),i.request("hand-shake","hand-shake-event",{clientInfo:f,ACK:1,seqnumber:a+1,acknumber:h+1}),e({server:n,origin:r,channelId:s,serverInfo:c.serverInfo,clientInfo:f}))}})),l=setInterval((function(){if(!n||n.closed)throw clearInterval(l),d&&d(),t(new Error("server closed.")),new Error("server closed.");if(c&&new Date-u>c)throw clearInterval(l),d&&d(),t(new Error("connect timeout.")),new Error("connect timeout.");i.request("hand-shake","hand-shake-event",{clientInfo:f,SYN:1,ACK:0,seqnumber:a})}),100)}))).then((function(t){(function(e,t,n){var r=e.server,o=e.serverInfo,s=void 0===o?{}:o,i=e.channelId,a=new l("client",t,n),c=function(){a&&(a.destroy(),a=null),e.destroy&&e.destroy()},u=null;return u=setInterval((function(){r&&!r.closed||(console.info("server closed."),clearInterval(u),c())}),2e3),{run:function(e){e({channelId:i,serverInfo:s,postMessage:function(){var e;return a?(e=a).postMessage.apply(e,arguments):Promise.reject()},listenMessage:function(){var e;a&&(e=a).listenMessage.apply(e,arguments)},destroy:c})}}})(m(m({},t),{},{destroy:function(){r=null,d&&d(t.serverInfo,t)}}),r,a).run(e)})).catch((function(e){t(e)}))}else t(new Error("server closed"));var o,i,c,f}))},exports.createPrefixedEventName=j,exports.getIframeServer=function(e,t){const n=void 0!==e?e:document.body,r=E.resolveOrigin(t),o=M("iframe");let s;return document.querySelector(`#${o}`)?s=document.querySelector(`#${o}`):(s=document.createElement("iframe"),s.id=o,function(e,t){const n=(e="string"==typeof e?new URL(e,location):e).searchParams.get("debug");return null!==n&&(""===n||O(n))}(t)?s.style.cssText="width: 100%; height: 100%; border: 0;":(s.ariaHidden=!0,s.tabIndex=-1,s.hidden=!0,s.style.setProperty("display","none")),n.appendChild(s),s.src=t),{server:s.contentWindow||s.contentDocument.parentWindow,origin:r,iframe:s}},exports.getKeyName=M,exports.getServerMode=async function(e){const t=e.serverUrl,n=e.serverRequestTimeout||500;if(!t)return k.LOCAL;const r=new AbortController;let o,s;try{if(s=setTimeout((()=>{console.warn(`Request timed out after ${n}ms. Aborting request...`),r.abort()}),n),o=await fetch(t,{signal:r.signal}),o.ok)return k.REMOTE}catch(i){if(console.error(i),r.signal.aborted)throw new Error(`Unable to locate server page. The request timed out after ${n}ms. url: ${t.href}`);throw new Error(`Unable to locate server page : ${t.href}.`,i)}finally{clearTimeout(s)}throw new Error(`Unable to locate server page. The request failed with status code ${o.status}. url: ${t.href}`)},exports.patternMatchesOrigin=function(e,t){const n=e.replace(/[.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/[*]/g,".*");return new RegExp(`^${n}$`,"u").test(t)},exports.startListening=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventFilter,r=void 0===t?function(){return!0}:t,o=e.timeout,s=void 0===o?2e4:o,i=e.serverInfo,a=void 0===i?{}:i,c=e.onDestroy;return new Promise((function(e){var t,o;(t=r,o=a,new Promise((function(e){var r="syn",s=Number(Math.random().toString().substr(3,10)),i=-1,a=null,c=5;window.addEventListener("message",(function l(u){if(u.data&&"postmessage-promise_client"===u.data[w]&&u.data.channelId&&u.data.method&&"hand-shake"===u.data.method&&t(u)){var d=u.data.payload||{},f=d.SYN,p=d.ACK,v=d.seqnumber,h=d.acknumber;if(1===f&&0===p){if("syn"!==r)return;i=v,r="ack";var m=function(){if(!u.source||u.source.closed)return console.info("client closed and reset to listening."),r="syn",clearTimeout(a),a=null,c=5,s=Number(Math.random().toString().substr(3,10)),i=-1,!1;try{u.source.postMessage(n(n(n(n({},w,"postmessage-promise_server"),"channelId",u.data.channelId),"method","hand-shake"),"payload",{serverInfo:o,acknumber:v+1,SYN:1,ACK:1,seqnumber:s}),u.origin)}catch(e){return console.error(e),!0}return!0};if(!m())return;a||(a=setTimeout((function e(){c>0?"ack"===r&&(c-=1,m()&&(a=setTimeout(e,1e3))):(console.info("server three-way hand shake timeout and reset to listening."),r="syn",clearTimeout(a),a=null,c=5,s=Number(Math.random().toString().substr(3,10)),i=-1)}),1e3))}else if("ack"===r&&1===p&&v===i+1&&h===s+1){r="finish",clearTimeout(a),a=null,window.removeEventListener("message",l);var g=u.data.payload,y=void 0===g?{}:g;e({client:u.source,origin:u.origin,channelId:u.data.channelId,serverInfo:o,clientInfo:y.clientInfo})}}}))}))).then((function(t){(function(e,t,n){var r=e.origin,o=e.client,s=e.channelId,i=e.clientInfo,a=void 0===i?{}:i,c=new v("server",{origin:r,source:o,channelId:s},t),u=new l("server",c,n),d=function(){u&&(u.destroy(),u=null),c=null,e.destroy&&e.destroy()},f=null;return f=setInterval((function(){o&&!o.closed||(console.info("client closed."),clearInterval(f),d())}),2e3),{run:function(e){e({channelId:s,clientInfo:a,postMessage:function(){var e;return u?(e=u).postMessage.apply(e,arguments):Promise.reject()},listenMessage:function(){var e;u&&(e=u).listenMessage.apply(e,arguments)},destroy:d})}}})(y(y({},t),{},{destroy:function(){c&&c(t.clientInfo,t)}}),r,s).run(e)}))}))},exports.stringIsUrl=function(e){try{return new URL(e,location),!0}catch{return!1}}; -//# sourceMappingURL=constants-PQ5SQuv-.cjs.map diff --git a/dist/constants.cjs b/dist/constants.cjs index 67396ac..976abb5 100644 --- a/dist/constants.cjs +++ b/dist/constants.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/constants.js b/dist/constants.js index 9a6edfa..0ad3c04 100644 --- a/dist/constants.js +++ b/dist/constants.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/constants2.cjs b/dist/constants2.cjs index 577c080..f9d9c16 100644 --- a/dist/constants2.cjs +++ b/dist/constants2.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=`${require("./package-D1p4nXVA.cjs").name}/avis`;exports.DB_NAME=e,exports.DB_STORE_NAME="avis",exports.DB_VERSION=1; +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=`${require("./package-DEKbT-ok.cjs").name}/avis`;exports.DB_NAME=e,exports.DB_STORE_NAME="avis",exports.DB_VERSION=1; //# sourceMappingURL=constants2.cjs.map diff --git a/dist/constants2.js b/dist/constants2.js index 6200318..26644f8 100644 --- a/dist/constants2.js +++ b/dist/constants2.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { n as a } from "./package-BQN-QfHU.js"; +import { n as a } from "./package-aLA7rD-Y.js"; const s = `${a}/avis`, o = 1, i = "avis"; export { s as DB_NAME, diff --git a/dist/constants3.cjs b/dist/constants3.cjs index 163c3a0..efb90cd 100644 --- a/dist/constants3.cjs +++ b/dist/constants3.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./package-D1p4nXVA.cjs");const E=require("./constants-PQ5SQuv-.cjs");exports.CONSENT_STATES=E.CONSENT_STATES,exports.DB_NAME=E.DB_NAME,exports.DB_STORE_NAME=E.DB_STORE_NAME,exports.DB_VERSION=E.DB_VERSION,exports.DEFAULT_PREFERENCES=E.DEFAULT_PREFERENCES,exports.EVENT_NAMES=E.EVENT_NAMES,exports.PREFIX=E.PREFIX,exports.SERVER_MODE=E.SERVER_MODE,exports.SERVER_REQUEST_DEFAULT_TIMEOUT=E.SERVER_REQUEST_DEFAULT_TIMEOUT; +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./package-DEKbT-ok.cjs");const E=require("./constants-BvP9XHhn.cjs");exports.CONSENT_STATES=E.CONSENT_STATES,exports.DB_NAME=E.DB_NAME,exports.DB_STORE_NAME=E.DB_STORE_NAME,exports.DB_VERSION=E.DB_VERSION,exports.DEFAULT_PREFERENCES=E.DEFAULT_PREFERENCES,exports.EVENT_NAMES=E.EVENT_NAMES,exports.PREFIX=E.PREFIX,exports.SERVER_DEFAULT_URL=E.SERVER_DEFAULT_URL,exports.SERVER_MODE=E.SERVER_MODE,exports.SERVER_REQUEST_DEFAULT_TIMEOUT=E.SERVER_REQUEST_DEFAULT_TIMEOUT; //# sourceMappingURL=constants3.cjs.map diff --git a/dist/constants3.js b/dist/constants3.js index 8b27252..69c0648 100644 --- a/dist/constants3.js +++ b/dist/constants3.js @@ -1,21 +1,22 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import "./package-BQN-QfHU.js"; -import { C, f, i, h, D, E, P, S, b } from "./constants-B2WJQGFq.js"; +import "./package-aLA7rD-Y.js"; +import { C, h, j, i, D, E, P, f, S, b } from "./constants-D0hS4kJm.js"; export { C as CONSENT_STATES, - f as DB_NAME, - i as DB_STORE_NAME, - h as DB_VERSION, + h as DB_NAME, + j as DB_STORE_NAME, + i as DB_VERSION, D as DEFAULT_PREFERENCES, E as EVENT_NAMES, P as PREFIX, + f as SERVER_DEFAULT_URL, S as SERVER_MODE, b as SERVER_REQUEST_DEFAULT_TIMEOUT }; diff --git a/dist/directive-Ce1M5_Fy.js b/dist/directive-Ce1M5_Fy.js index f3b6581..1b976f1 100644 --- a/dist/directive-Ce1M5_Fy.js +++ b/dist/directive-Ce1M5_Fy.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/directive-DpiRyOsV.cjs b/dist/directive-DpiRyOsV.cjs index 885a103..8ad130e 100644 --- a/dist/directive-DpiRyOsV.cjs +++ b/dist/directive-DpiRyOsV.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index-9izUO_DB.cjs b/dist/index-9izUO_DB.cjs index 9837e06..1529832 100644 --- a/dist/index-9izUO_DB.cjs +++ b/dist/index-9izUO_DB.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index-CRxQMTzC.js b/dist/index-CRxQMTzC.js index ce1eb86..f9cfe67 100644 --- a/dist/index-CRxQMTzC.js +++ b/dist/index-CRxQMTzC.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index.cjs b/dist/index.cjs index 8fb9e00..d730497 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index.js b/dist/index.js index f3bb14b..80a08e0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/isObject-D1wTAyjh.cjs b/dist/isObject-D1wTAyjh.cjs index 39ab956..5de730b 100644 --- a/dist/isObject-D1wTAyjh.cjs +++ b/dist/isObject-D1wTAyjh.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/isObject-Dipzh7kZ.js b/dist/isObject-Dipzh7kZ.js index 1258218..7450746 100644 --- a/dist/isObject-Dipzh7kZ.js +++ b/dist/isObject-Dipzh7kZ.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/lit-element-BHNMc-Kg.cjs b/dist/lit-element-BHNMc-Kg.cjs index 3c91d8f..01ac391 100644 --- a/dist/lit-element-BHNMc-Kg.cjs +++ b/dist/lit-element-BHNMc-Kg.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/lit-element-Dj1nHH6C.js b/dist/lit-element-Dj1nHH6C.js index 8bacb60..8ced64e 100644 --- a/dist/lit-element-Dj1nHH6C.js +++ b/dist/lit-element-Dj1nHH6C.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/logger-D5ZRyz6h.cjs b/dist/logger-DMvvTbNw.cjs similarity index 73% rename from dist/logger-D5ZRyz6h.cjs rename to dist/logger-DMvvTbNw.cjs index 45ecc80..34e9753 100644 --- a/dist/logger-D5ZRyz6h.cjs +++ b/dist/logger-DMvvTbNw.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const o=require("./package-D1p4nXVA.cjs");exports.loggerFactory=function(e=o.name,n="green"){return Function.prototype.bind.call(console.log,console,`%c[${e}]`,`color: ${n}; font-weight: bold;`)}; -//# sourceMappingURL=logger-D5ZRyz6h.cjs.map +const o=require("./package-DEKbT-ok.cjs");exports.loggerFactory=function(e=o.name,n="green"){return Function.prototype.bind.call(console.log,console,`%c[${e}]`,`color: ${n}; font-weight: bold;`)}; +//# sourceMappingURL=logger-DMvvTbNw.cjs.map diff --git a/dist/logger-D5ZRyz6h.cjs.map b/dist/logger-DMvvTbNw.cjs.map similarity index 92% rename from dist/logger-D5ZRyz6h.cjs.map rename to dist/logger-DMvvTbNw.cjs.map index 56059d8..b2a5b62 100644 --- a/dist/logger-D5ZRyz6h.cjs.map +++ b/dist/logger-DMvvTbNw.cjs.map @@ -1 +1 @@ -{"version":3,"file":"logger-D5ZRyz6h.cjs","sources":["../src/utils/logger.js"],"sourcesContent":["import { name } from '../../package.json'\n\n/**\n * Creates a logger function with a prefix.\n *\n * @param {string} [prefix=name] - The prefix to use for the logger. Defaults to the name from the package.json file.\n * @returns {Function} - A logger function that logs messages with the specified prefix.\n */\nexport function loggerFactory(prefix = name, color = 'green') {\n\n return Function.prototype.bind.call(console.log, console, `%c[${prefix}]`, `color: ${color}; font-weight: bold;`)\n}"],"names":["prefix","name","color","Function","prototype","bind","call","console","log"],"mappings":"gEAQO,SAAuBA,EAASC,OAAMC,EAAQ,SAEnD,OAAOC,SAASC,UAAUC,KAAKC,KAAKC,QAAQC,IAAKD,QAAS,MAAMP,KAAW,UAAUE,wBACvF"} \ No newline at end of file +{"version":3,"file":"logger-DMvvTbNw.cjs","sources":["../src/utils/logger.js"],"sourcesContent":["import { name } from '../../package.json'\n\n/**\n * Creates a logger function with a prefix.\n *\n * @param {string} [prefix=name] - The prefix to use for the logger. Defaults to the name from the package.json file.\n * @returns {Function} - A logger function that logs messages with the specified prefix.\n */\nexport function loggerFactory(prefix = name, color = 'green') {\n\n return Function.prototype.bind.call(console.log, console, `%c[${prefix}]`, `color: ${color}; font-weight: bold;`)\n}"],"names":["prefix","name","color","Function","prototype","bind","call","console","log"],"mappings":"gEAQO,SAAuBA,EAASC,OAAMC,EAAQ,SAEnD,OAAOC,SAASC,UAAUC,KAAKC,KAAKC,QAAQC,IAAKD,QAAS,MAAMP,KAAW,UAAUE,wBACvF"} \ No newline at end of file diff --git a/dist/logger-CcMMJUPZ.js b/dist/logger-EcO8T52u.js similarity index 78% rename from dist/logger-CcMMJUPZ.js rename to dist/logger-EcO8T52u.js index 3b22ecf..c3a7c9d 100644 --- a/dist/logger-CcMMJUPZ.js +++ b/dist/logger-EcO8T52u.js @@ -1,16 +1,16 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { n as o } from "./package-BQN-QfHU.js"; +import { n as o } from "./package-aLA7rD-Y.js"; function n(n2 = o, e = "green") { return Function.prototype.bind.call(console.log, console, `%c[${n2}]`, `color: ${e}; font-weight: bold;`); } export { n as l }; -//# sourceMappingURL=logger-CcMMJUPZ.js.map +//# sourceMappingURL=logger-EcO8T52u.js.map diff --git a/dist/logger-CcMMJUPZ.js.map b/dist/logger-EcO8T52u.js.map similarity index 92% rename from dist/logger-CcMMJUPZ.js.map rename to dist/logger-EcO8T52u.js.map index c058763..75d1cf3 100644 --- a/dist/logger-CcMMJUPZ.js.map +++ b/dist/logger-EcO8T52u.js.map @@ -1 +1 @@ -{"version":3,"file":"logger-CcMMJUPZ.js","sources":["../src/utils/logger.js"],"sourcesContent":["import { name } from '../../package.json'\n\n/**\n * Creates a logger function with a prefix.\n *\n * @param {string} [prefix=name] - The prefix to use for the logger. Defaults to the name from the package.json file.\n * @returns {Function} - A logger function that logs messages with the specified prefix.\n */\nexport function loggerFactory(prefix = name, color = 'green') {\n\n return Function.prototype.bind.call(console.log, console, `%c[${prefix}]`, `color: ${color}; font-weight: bold;`)\n}"],"names":["loggerFactory","prefix","name","color","Function","prototype","bind","call","console","log"],"mappings":";AAQO,SAASA,EAAcC,KAASC,GAAMC,IAAQ;AAEnD,SAAOC,SAASC,UAAUC,KAAKC,KAAKC,QAAQC,KAAKD,SAAS,MAAMP,EAAW,KAAA,UAAUE;AACvF;"} \ No newline at end of file +{"version":3,"file":"logger-EcO8T52u.js","sources":["../src/utils/logger.js"],"sourcesContent":["import { name } from '../../package.json'\n\n/**\n * Creates a logger function with a prefix.\n *\n * @param {string} [prefix=name] - The prefix to use for the logger. Defaults to the name from the package.json file.\n * @returns {Function} - A logger function that logs messages with the specified prefix.\n */\nexport function loggerFactory(prefix = name, color = 'green') {\n\n return Function.prototype.bind.call(console.log, console, `%c[${prefix}]`, `color: ${color}; font-weight: bold;`)\n}"],"names":["loggerFactory","prefix","name","color","Function","prototype","bind","call","console","log"],"mappings":";AAQO,SAASA,EAAcC,KAASC,GAAMC,IAAQ;AAEnD,SAAOC,SAASC,UAAUC,KAAKC,KAAKC,QAAQC,KAAKD,SAAS,MAAMP,EAAW,KAAA,UAAUE;AACvF;"} \ No newline at end of file diff --git a/dist/package-BQN-QfHU.js.map b/dist/package-BQN-QfHU.js.map deleted file mode 100644 index d228185..0000000 --- a/dist/package-BQN-QfHU.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package-BQN-QfHU.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/dist/package-D1p4nXVA.cjs.map b/dist/package-D1p4nXVA.cjs.map deleted file mode 100644 index 0760234..0000000 --- a/dist/package-D1p4nXVA.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package-D1p4nXVA.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/package-D1p4nXVA.cjs b/dist/package-DEKbT-ok.cjs similarity index 94% rename from dist/package-D1p4nXVA.cjs rename to dist/package-DEKbT-ok.cjs index 6bc4e33..e289bc2 100644 --- a/dist/package-D1p4nXVA.cjs +++ b/dist/package-DEKbT-ok.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const o="@bibudem/ui",e={name:o,version:"0.18.1",description:"Librairie du system desing des Bibliothèques de l'Université de Montréal",author:"Christian Rémillard ",homepage:"https://github.com/bibudem/ui",keywords:["system design"],license:"ISC",repository:{type:"git",url:"https://github.com/bibudem/ui.git"},type:"module",module:"src/index.js",main:"dist/index.js",scripts:{storybook:"storybook dev -p 6006 --no-open","storybook-docs":"storybook dev --docs",build:"cross-env NODE_ENV=production vite build","build:watch":"cross-env NODE_ENV=production vite build --watch","build-storybook":"storybook build --output-dir build-storybook",chromatic:"npx chromatic",dev:"storybook dev -p 6006 --no-open",version:"npm run build",preview:"npm-run-all set-env:production --parallel preview:*","preview:build":"vite build --watch","preview:serve":"vite preview --no-open","set-env:production":"cross-env NODE_ENV=production"},dependencies:{"@auroratide/toggle-switch":"^0.2.3","@lit/context":"^1.1.2","@material/web":"^1.4.1","@whitespace/storybook-addon-html":"^6.1.1","boolify-string":"^2.0.2",express:"^4.19.2",idb:"^8.0.0","lodash-es":"^4.17.21","postmessage-promise":"^3.2.1"},devDependencies:{"@babel/plugin-proposal-decorators":"^7.24.1","@chromatic-com/storybook":"^1.4.0","@lit/task":"^1.0.0","@ljcl/storybook-addon-cssprops":"^4.0.0","@rollup/plugin-terser":"^0.4.4","@storybook/addon-a11y":"^8.2.4","@storybook/addon-essentials":"^8.2.4","@storybook/addon-links":"^8.2.4","@storybook/addon-mdx-gfm":"^8.2.4","@storybook/blocks":"^8.2.4","@storybook/test":"^8.2.4","@storybook/web-components":"^8.2.4","@storybook/web-components-vite":"^8.2.4",chromatic:"^11.3.0","cross-env":"^7.0.3","cross-var":"^1.1.0",glob:"^10.3.12",lit:"^3.1.3","npm-run-all":"^4.1.5","rollup-plugin-minify-html-literals-v3":"^1.3.4",sass:"^1.75.0",storybook:"^8.2.4","vite-plugin-banner":"^0.7.1"}};exports.name=o,exports.pkg=e; -//# sourceMappingURL=package-D1p4nXVA.cjs.map +const o="@bibudem/ui",e={name:o,version:"0.19.0",description:"Librairie du system desing des Bibliothèques de l'Université de Montréal",author:"Christian Rémillard ",homepage:"https://github.com/bibudem/ui",keywords:["system design"],license:"ISC",repository:{type:"git",url:"https://github.com/bibudem/ui.git"},type:"module",module:"src/index.js",main:"dist/index.js",scripts:{storybook:"storybook dev -p 6006 --no-open","storybook-docs":"storybook dev --docs",build:"cross-env NODE_ENV=production vite build","build:watch":"cross-env NODE_ENV=production vite build --watch","build-storybook":"storybook build --output-dir build-storybook",chromatic:"npx chromatic",dev:"storybook dev -p 6006 --no-open",version:"npm run build",preview:"npm-run-all set-env:production --parallel preview:*","preview:build":"vite build --watch","preview:serve":"vite preview --no-open","set-env:production":"cross-env NODE_ENV=production"},dependencies:{"@auroratide/toggle-switch":"^0.2.3","@lit/context":"^1.1.2","@material/web":"^1.4.1","@whitespace/storybook-addon-html":"^6.1.1","boolify-string":"^2.0.2",express:"^4.19.2",idb:"^8.0.0","lodash-es":"^4.17.21","postmessage-promise":"^3.2.1"},devDependencies:{"@babel/plugin-proposal-decorators":"^7.24.1","@chromatic-com/storybook":"^1.4.0","@lit/task":"^1.0.0","@ljcl/storybook-addon-cssprops":"^4.0.0","@rollup/plugin-terser":"^0.4.4","@storybook/addon-a11y":"^8.2.4","@storybook/addon-essentials":"^8.2.4","@storybook/addon-links":"^8.2.4","@storybook/addon-mdx-gfm":"^8.2.4","@storybook/blocks":"^8.2.4","@storybook/test":"^8.2.4","@storybook/web-components":"^8.2.4","@storybook/web-components-vite":"^8.2.4",chromatic:"^11.3.0","cross-env":"^7.0.3","cross-var":"^1.1.0",glob:"^10.3.12",lit:"^3.1.3","npm-run-all":"^4.1.5","rollup-plugin-minify-html-literals-v3":"^1.3.4",sass:"^1.75.0",storybook:"^8.2.4","vite-plugin-banner":"^0.7.1"}};exports.name=o,exports.pkg=e; +//# sourceMappingURL=package-DEKbT-ok.cjs.map diff --git a/dist/package-DEKbT-ok.cjs.map b/dist/package-DEKbT-ok.cjs.map new file mode 100644 index 0000000..8498471 --- /dev/null +++ b/dist/package-DEKbT-ok.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"package-DEKbT-ok.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/package-BQN-QfHU.js b/dist/package-aLA7rD-Y.js similarity index 94% rename from dist/package-BQN-QfHU.js rename to dist/package-aLA7rD-Y.js index 5a236c7..07e9fe1 100644 --- a/dist/package-BQN-QfHU.js +++ b/dist/package-aLA7rD-Y.js @@ -1,14 +1,14 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const o = "@bibudem/ui", e = { name: o, version: "0.18.1", description: "Librairie du system desing des Bibliothèques de l'Université de Montréal", author: "Christian Rémillard ", homepage: "https://github.com/bibudem/ui", keywords: ["system design"], license: "ISC", repository: { type: "git", url: "https://github.com/bibudem/ui.git" }, type: "module", module: "src/index.js", main: "dist/index.js", scripts: { storybook: "storybook dev -p 6006 --no-open", "storybook-docs": "storybook dev --docs", build: "cross-env NODE_ENV=production vite build", "build:watch": "cross-env NODE_ENV=production vite build --watch", "build-storybook": "storybook build --output-dir build-storybook", chromatic: "npx chromatic", dev: "storybook dev -p 6006 --no-open", version: "npm run build", preview: "npm-run-all set-env:production --parallel preview:*", "preview:build": "vite build --watch", "preview:serve": "vite preview --no-open", "set-env:production": "cross-env NODE_ENV=production" }, dependencies: { "@auroratide/toggle-switch": "^0.2.3", "@lit/context": "^1.1.2", "@material/web": "^1.4.1", "@whitespace/storybook-addon-html": "^6.1.1", "boolify-string": "^2.0.2", express: "^4.19.2", idb: "^8.0.0", "lodash-es": "^4.17.21", "postmessage-promise": "^3.2.1" }, devDependencies: { "@babel/plugin-proposal-decorators": "^7.24.1", "@chromatic-com/storybook": "^1.4.0", "@lit/task": "^1.0.0", "@ljcl/storybook-addon-cssprops": "^4.0.0", "@rollup/plugin-terser": "^0.4.4", "@storybook/addon-a11y": "^8.2.4", "@storybook/addon-essentials": "^8.2.4", "@storybook/addon-links": "^8.2.4", "@storybook/addon-mdx-gfm": "^8.2.4", "@storybook/blocks": "^8.2.4", "@storybook/test": "^8.2.4", "@storybook/web-components": "^8.2.4", "@storybook/web-components-vite": "^8.2.4", chromatic: "^11.3.0", "cross-env": "^7.0.3", "cross-var": "^1.1.0", glob: "^10.3.12", lit: "^3.1.3", "npm-run-all": "^4.1.5", "rollup-plugin-minify-html-literals-v3": "^1.3.4", sass: "^1.75.0", storybook: "^8.2.4", "vite-plugin-banner": "^0.7.1" } }; +const o = "@bibudem/ui", e = { name: o, version: "0.19.0", description: "Librairie du system desing des Bibliothèques de l'Université de Montréal", author: "Christian Rémillard ", homepage: "https://github.com/bibudem/ui", keywords: ["system design"], license: "ISC", repository: { type: "git", url: "https://github.com/bibudem/ui.git" }, type: "module", module: "src/index.js", main: "dist/index.js", scripts: { storybook: "storybook dev -p 6006 --no-open", "storybook-docs": "storybook dev --docs", build: "cross-env NODE_ENV=production vite build", "build:watch": "cross-env NODE_ENV=production vite build --watch", "build-storybook": "storybook build --output-dir build-storybook", chromatic: "npx chromatic", dev: "storybook dev -p 6006 --no-open", version: "npm run build", preview: "npm-run-all set-env:production --parallel preview:*", "preview:build": "vite build --watch", "preview:serve": "vite preview --no-open", "set-env:production": "cross-env NODE_ENV=production" }, dependencies: { "@auroratide/toggle-switch": "^0.2.3", "@lit/context": "^1.1.2", "@material/web": "^1.4.1", "@whitespace/storybook-addon-html": "^6.1.1", "boolify-string": "^2.0.2", express: "^4.19.2", idb: "^8.0.0", "lodash-es": "^4.17.21", "postmessage-promise": "^3.2.1" }, devDependencies: { "@babel/plugin-proposal-decorators": "^7.24.1", "@chromatic-com/storybook": "^1.4.0", "@lit/task": "^1.0.0", "@ljcl/storybook-addon-cssprops": "^4.0.0", "@rollup/plugin-terser": "^0.4.4", "@storybook/addon-a11y": "^8.2.4", "@storybook/addon-essentials": "^8.2.4", "@storybook/addon-links": "^8.2.4", "@storybook/addon-mdx-gfm": "^8.2.4", "@storybook/blocks": "^8.2.4", "@storybook/test": "^8.2.4", "@storybook/web-components": "^8.2.4", "@storybook/web-components-vite": "^8.2.4", chromatic: "^11.3.0", "cross-env": "^7.0.3", "cross-var": "^1.1.0", glob: "^10.3.12", lit: "^3.1.3", "npm-run-all": "^4.1.5", "rollup-plugin-minify-html-literals-v3": "^1.3.4", sass: "^1.75.0", storybook: "^8.2.4", "vite-plugin-banner": "^0.7.1" } }; export { o as n, e as p }; -//# sourceMappingURL=package-BQN-QfHU.js.map +//# sourceMappingURL=package-aLA7rD-Y.js.map diff --git a/dist/package-aLA7rD-Y.js.map b/dist/package-aLA7rD-Y.js.map new file mode 100644 index 0000000..43d9889 --- /dev/null +++ b/dist/package-aLA7rD-Y.js.map @@ -0,0 +1 @@ +{"version":3,"file":"package-aLA7rD-Y.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/dist/ref-B-kqFHPy.js b/dist/ref-B-kqFHPy.js index f60de98..0df886d 100644 --- a/dist/ref-B-kqFHPy.js +++ b/dist/ref-B-kqFHPy.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/ref-mxufyLY8.cjs b/dist/ref-mxufyLY8.cjs index 6a760bb..79bd73e 100644 --- a/dist/ref-mxufyLY8.cjs +++ b/dist/ref-mxufyLY8.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/task-BYUCPaT1.js b/dist/task-BYUCPaT1.js index 502b29f..fd335e7 100644 --- a/dist/task-BYUCPaT1.js +++ b/dist/task-BYUCPaT1.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/task-YmD7yWl1.cjs b/dist/task-YmD7yWl1.cjs index daa1be0..9bc6d96 100644 --- a/dist/task-YmD7yWl1.cjs +++ b/dist/task-YmD7yWl1.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/type-BPiIb9Kq.js b/dist/type-BPiIb9Kq.js index 1f7003e..39a3343 100644 --- a/dist/type-BPiIb9Kq.js +++ b/dist/type-BPiIb9Kq.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/type-KOUr406I.cjs b/dist/type-KOUr406I.cjs index 5cf4e1e..dbc5b10 100644 --- a/dist/type-KOUr406I.cjs +++ b/dist/type-KOUr406I.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/udem-urgence.cjs b/dist/udem-urgence.cjs index 4e75cef..2a9dd82 100644 --- a/dist/udem-urgence.cjs +++ b/dist/udem-urgence.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/udem-urgence.js b/dist/udem-urgence.js index 73394d4..e392637 100644 --- a/dist/udem-urgence.js +++ b/dist/udem-urgence.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/unsafe-html-Dku8oD0s.cjs b/dist/unsafe-html-Dku8oD0s.cjs index 2870a04..71d9e16 100644 --- a/dist/unsafe-html-Dku8oD0s.cjs +++ b/dist/unsafe-html-Dku8oD0s.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/unsafe-html-hzUS4Xy_.js b/dist/unsafe-html-hzUS4Xy_.js index e00101a..7a7b5b3 100644 --- a/dist/unsafe-html-hzUS4Xy_.js +++ b/dist/unsafe-html-hzUS4Xy_.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/utils.cjs b/dist/utils.cjs index 67802f9..c3479dd 100644 --- a/dist/utils.cjs +++ b/dist/utils.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-PQ5SQuv-.cjs");exports.createPrefixedEventName=e.createPrefixedEventName,exports.getIframeServer=e.getIframeServer,exports.getKeyName=e.getKeyName,exports.getServerMode=e.getServerMode; +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-BvP9XHhn.cjs");exports.createPrefixedEventName=e.createPrefixedEventName,exports.getIframeServer=e.getIframeServer,exports.getKeyName=e.getKeyName,exports.getServerMode=e.getServerMode; //# sourceMappingURL=utils.cjs.map diff --git a/dist/utils.js b/dist/utils.js index 30e2b3b..eead231 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,14 +1,14 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.18.1 + * @version 0.19.0 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { j, a, e, g } from "./constants-B2WJQGFq.js"; +import { k, a, e, g } from "./constants-D0hS4kJm.js"; export { - j as createPrefixedEventName, + k as createPrefixedEventName, a as getIframeServer, e as getKeyName, g as getServerMode