diff --git a/dist/PreferenceStorage.cjs b/dist/PreferenceStorage.cjs index e2487e2..7403147 100644 --- a/dist/PreferenceStorage.cjs +++ b/dist/PreferenceStorage.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @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 a=require("./index-9izUO_DB.cjs"),o=require("./constants-BgVe0aC4.cjs"),c=require("./_Uint8Array-Dn54l80h.cjs"),s=require("./isObjectLike-DLI4XyQI.cjs");var i=c.getNative(s.root,"WeakMap"),u=c.overArg(Object.keys,Object),f=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,b=Object.getOwnPropertySymbols,h=b?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,a=null==t?0:t.length,o=0,c=[];++ns))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var l=-1,b=!0,h=r&M?new N:void 0;for(o.set(e,t),o.set(t,e);++le===n[t]))}(a,Object.keys(r)))throw new TypeError(`Preferences requires all those fields: ${a.join(", ")}.`);if(!Object.values(r).every((e=>"boolean"==typeof e)))throw new TypeError("Preferences values must be a boolean.");return await n(this,e,t).call(this,r)}async resetPreferences(){return await n(this,e,t).call(this,null)}}let I;e=new WeakSet,t=async function(e){try{return F(await this.getPreferences(),e)?(console.log("[setPreferences] preferences not updated: ",e),!1):(await this.db.put(o.DB_STORE_NAME,e,"preferences"),console.log("[setPreferences] preferences updated: ",e),e)}catch(t){throw new Error("Something went wrong with indexedDB:",t)}},module.exports=async function(){return I||(I=new G,await I.init()),I}; +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 a=require("./index-9izUO_DB.cjs"),o=require("./constants-C4rB-CcV.cjs"),c=require("./_Uint8Array-Dn54l80h.cjs"),s=require("./isObjectLike-DLI4XyQI.cjs");var i=c.getNative(s.root,"WeakMap"),u=c.overArg(Object.keys,Object),f=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,b=Object.getOwnPropertySymbols,h=b?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,a=null==t?0:t.length,o=0,c=[];++ns))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var l=-1,b=!0,h=r&M?new N:void 0;for(o.set(e,t),o.set(t,e);++le===n[t]))}(a,Object.keys(r)))throw new TypeError(`Preferences requires all those fields: ${a.join(", ")}.`);if(!Object.values(r).every((e=>"boolean"==typeof e)))throw new TypeError("Preferences values must be a boolean.");return await n(this,e,t).call(this,r)}async resetPreferences(){return await n(this,e,t).call(this,null)}}let I;e=new WeakSet,t=async function(e){try{return F(await this.getPreferences(),e)?(console.log("[setPreferences] preferences not updated: ",e),!1):(await this.db.put(o.DB_STORE_NAME,e,"preferences"),console.log("[setPreferences] preferences updated: ",e),e)}catch(t){throw new Error("Something went wrong with indexedDB:",t)}},module.exports=async function(){return I||(I=new G,await I.init()),I}; //# sourceMappingURL=PreferenceStorage.cjs.map diff --git a/dist/PreferenceStorage.js b/dist/PreferenceStorage.js index b10fe2f..8c38607 100644 --- a/dist/PreferenceStorage.js +++ b/dist/PreferenceStorage.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @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 _ce_instances, e_fn; import { o as e } from "./index-CRxQMTzC.js"; -import { E as t, f as r, h as n, i as a, D as o } from "./constants-DMzZzv_T.js"; +import { E as t, f as r, h as n, i as a, D as o } from "./constants-C4fSqP7Z.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 y, h as j, j as g } from "./_Uint8Array-DzlTzPS7.js"; import { r as _, b as m, S as O, i as P } from "./isObjectLike-DmmXH0U-.js"; var E = s(_, "WeakMap"), S = c(Object.keys, Object), D = Object.prototype.hasOwnProperty; diff --git a/dist/VotePayload.cjs b/dist/VotePayload.cjs index c77a031..43d8eab 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/VotePayload.js b/dist/VotePayload.js index 75cf12b..29b2977 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/_Uint8Array-Dn54l80h.cjs b/dist/_Uint8Array-Dn54l80h.cjs index b7f4335..bd6b57e 100644 --- a/dist/_Uint8Array-Dn54l80h.cjs +++ b/dist/_Uint8Array-Dn54l80h.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/_Uint8Array-DzlTzPS7.js b/dist/_Uint8Array-DzlTzPS7.js index 0ac08c1..c6fc2c0 100644 --- a/dist/_Uint8Array-DzlTzPS7.js +++ b/dist/_Uint8Array-DzlTzPS7.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-avis.cjs b/dist/bib-avis.cjs index ae9abdc..4b757a2 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,i,s,n,r,a,o,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-BeuNzWlx.cjs"),y=require("./package-DEzRsZ0U.cjs"),k="avis";async function j(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 q 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 a=new Promise((async(i,n)=>{if(""!==this.textContent.trim())return i({isLocal:!0,message:this.innerHTML.split(//).join("")});const a=new URL(`${t}/${s}`,e),o=await fetch(a,{headers:{Accept:"application/json"},signal:r});if(!o.ok)return n(new Error(o.status));const{message:c}=await o.json();i({isLocal:!1,message:c})}));try{const e=await a;await p(this,i,n).call(this,e)}catch(o){console.error("[#getAvis] An error occured: %o",o)}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.name,1,{upgrade(e){e.objectStoreNames.contains(k)||e.createObjectStore(k)}}));try{const t=await j(e),n=await s.get(k,t);n?n.hidden||(await s.delete(k,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 j(e);await b(this,t).put(k,{...e,hidden:!1},i)}},a=async function(){if(!this.dispatchEvent(new CustomEvent("bib:hide",{bubbles:!0,cancelable:!0})))return;const i=await j(b(this,e));await b(this,t).put(k,{...b(this,e),hidden:!0},i),g(this,e,null),this.requestUpdate()},o=function(){p(this,i,a).call(this)},h(q,"properties",{service:{type:String},contexte:{type:String,default:"site-web"},niveau:{type:String},boutonFermer:{type:Boolean,attribute:"bouton-fermer"},message:{state:!0}}),h(q,"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",q),x.addToGlobalBib("avis",{}),exports.BibAvis=q; +var e,t,i,s,n,r,a,o,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-tXLxIV_m.cjs"),y=require("./package-BelR9Gue.cjs"),k="avis";async function j(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 q 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 a=new Promise((async(i,n)=>{if(""!==this.textContent.trim())return i({isLocal:!0,message:this.innerHTML.split(//).join("")});const a=new URL(`${t}/${s}`,e),o=await fetch(a,{headers:{Accept:"application/json"},signal:r});if(!o.ok)return n(new Error(o.status));const{message:c}=await o.json();i({isLocal:!1,message:c})}));try{const e=await a;await p(this,i,n).call(this,e)}catch(o){console.error("[#getAvis] An error occured: %o",o)}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.name,1,{upgrade(e){e.objectStoreNames.contains(k)||e.createObjectStore(k)}}));try{const t=await j(e),n=await s.get(k,t);n?n.hidden||(await s.delete(k,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 j(e);await b(this,t).put(k,{...e,hidden:!1},i)}},a=async function(){if(!this.dispatchEvent(new CustomEvent("bib:hide",{bubbles:!0,cancelable:!0})))return;const i=await j(b(this,e));await b(this,t).put(k,{...b(this,e),hidden:!0},i),g(this,e,null),this.requestUpdate()},o=function(){p(this,i,a).call(this)},h(q,"properties",{service:{type:String},contexte:{type:String,default:"site-web"},niveau:{type:String},boutonFermer:{type:Boolean,attribute:"bouton-fermer"},message:{state:!0}}),h(q,"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",q),x.addToGlobalBib("avis",{}),exports.BibAvis=q; //# sourceMappingURL=bib-avis.cjs.map diff --git a/dist/bib-avis.js b/dist/bib-avis.js index 056818d..33de303 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -22,8 +22,8 @@ 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-2qdb5tWe.js"; -import { n as c } from "./package-CcUCpIoR.js"; +import { a } from "./bib-iGuYwAse.js"; +import { n as c } from "./package-BUO2f-K0.js"; const l = "avis"; async function d(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 2c0c592..60cffde 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.13.0 + * @version 0.13.1 * @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 1de6cc7..5490b69 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.13.0 + * @version 0.13.1 * @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 24650b1..cc48df9 100644 --- a/dist/bib-consent-consent-dialog.cjs +++ b/dist/bib-consent-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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e=Object.defineProperty,t=(t,o,n)=>((t,o,n)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n)(t,"symbol"!=typeof o?o+"":o,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lit-element-BHNMc-Kg.cjs"),n=require("./ref-mxufyLY8.cjs");require("./bib-consent-dialog.cjs");const i=require("./constants-BgVe0aC4.cjs");function r(e){return Object.keys(i.DEFAULT_PREFERENCES).reduce(((t,o)=>({...t,[o]:e})),{})}class a extends o.s{constructor(){super(),this.open=!1,this.dialogRef=n.e()}setPreferences(e){this.dispatchEvent(new CustomEvent("update",{detail:e}))}show(){this.dialogRef.value&&!this.dialogRef.value.open&&this.dialogRef.value?.show()}close(){this.dialogRef.value&&this.dialogRef.value.open&&this.dialogRef.value?.close()}showPreferences(){this.dispatchEvent(new CustomEvent("show-preferences"))}render(){return o.x`
L’UdeM reconnaît l’importance de respecter la vie privée

L’utilisation de témoins nous permet d’améliorer et de personnaliser votre expérience Web. Certains témoins sont obligatoires pour assurer le fonctionnement et la sécurité du site Web, alors que d’autres enregistrent vos préférences. En acceptant tout, vous consentez à notre utilisation de témoins pour mieux répondre à vos besoins.

Voir notre politique de confidentialité et nos conditions d’utilisation.

`}}t(a,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,state:!0}}),t(a,"styles",[o.i`${o.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 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{p{margin:0}}")}`]),window.customElements.get("bib-consent-consent-dialog")||window.customElements.define("bib-consent-consent-dialog",a),exports.BibConsentConsentDialog=a; +var e=Object.defineProperty,t=(t,o,n)=>((t,o,n)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n)(t,"symbol"!=typeof o?o+"":o,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lit-element-BHNMc-Kg.cjs"),n=require("./ref-mxufyLY8.cjs");require("./bib-consent-dialog.cjs");const i=require("./constants-C4rB-CcV.cjs");function r(e){return Object.keys(i.DEFAULT_PREFERENCES).reduce(((t,o)=>({...t,[o]:e})),{})}class a extends o.s{constructor(){super(),this.open=!1,this.dialogRef=n.e()}setPreferences(e){this.dispatchEvent(new CustomEvent("update",{detail:e}))}show(){this.dialogRef.value&&!this.dialogRef.value.open&&this.dialogRef.value?.show()}close(){this.dialogRef.value&&this.dialogRef.value.open&&this.dialogRef.value?.close()}showPreferences(){this.dispatchEvent(new CustomEvent("show-preferences"))}render(){return o.x`
L’UdeM reconnaît l’importance de respecter la vie privée

L’utilisation de témoins nous permet d’améliorer et de personnaliser votre expérience Web. Certains témoins sont obligatoires pour assurer le fonctionnement et la sécurité du site Web, alors que d’autres enregistrent vos préférences. En acceptant tout, vous consentez à notre utilisation de témoins pour mieux répondre à vos besoins.

Voir notre politique de confidentialité et nos conditions d’utilisation.

`}}t(a,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,state:!0}}),t(a,"styles",[o.i`${o.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 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{p{margin:0}}")}`]),window.customElements.get("bib-consent-consent-dialog")||window.customElements.define("bib-consent-consent-dialog",a),exports.BibConsentConsentDialog=a; //# sourceMappingURL=bib-consent-consent-dialog.cjs.map diff --git a/dist/bib-consent-consent-dialog.js b/dist/bib-consent-consent-dialog.js index eedb505..a63048a 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -12,7 +12,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy import { s as e, i as t, r as o, x as n } from "./lit-element-Dj1nHH6C.js"; import { e as i, n as r } from "./ref-B-kqFHPy.js"; import "./bib-consent-dialog.js"; -import { D as a } from "./constants-DMzZzv_T.js"; +import { D as a } from "./constants-C4fSqP7Z.js"; function l(e2) { return Object.keys(a).reduce((t2, o2) => ({ ...t2, [o2]: e2 }), {}); } diff --git a/dist/bib-consent-dialog.cjs b/dist/bib-consent-dialog.cjs index 12534a7..aea7cf2 100644 --- a/dist/bib-consent-dialog.cjs +++ b/dist/bib-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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-dialog.js b/dist/bib-consent-dialog.js index aa74aec..e4e4cf0 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs b/dist/bib-consent-preferences-dialog-Co9EjXFl.cjs similarity index 99% rename from dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs rename to dist/bib-consent-preferences-dialog-Co9EjXFl.cjs index a911475..2d1bd64 100644 --- a/dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs +++ b/dist/bib-consent-preferences-dialog-Co9EjXFl.cjs @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @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,s)=>(d(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),m=(e,t,i)=>(d(e,t,"access private method"),i);const g=require("./lit-element-BHNMc-Kg.cjs"),b=require("./ref-mxufyLY8.cjs"),v=require("./consent-context.cjs"),f=require("./constants-BgVe0aC4.cjs"),x=require("./isObjectLike-DLI4XyQI.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,s)=>(d(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),m=(e,t,i)=>(d(e,t,"access private method"),i);const g=require("./lit-element-BHNMc-Kg.cjs"),b=require("./ref-mxufyLY8.cjs"),v=require("./consent-context.cjs"),f=require("./constants-C4rB-CcV.cjs"),x=require("./isObjectLike-DLI4XyQI.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 y{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 w(this.context,this.t,this.subscribe))}}const k="checked",_="disabled",z=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[k]}get checked(){return this.hasAttribute(k)}set checked(e){this.toggleAttribute(k,e)}get disabled(){return this.hasAttribute(_)}set disabled(e){this.toggleAttribute(_,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===k&&p(this,t).call(this,!0)}};e=new WeakMap,t=new WeakMap,i=new WeakMap,l(z,"defaultElementName","toggle-switch"),l(z,"html",'\n \n \n \n '),l(z,"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(z,"formAssociated",!0);let C=z;function E(e){return Object.keys(f.DEFAULT_PREFERENCES).reduce(((t,i)=>({...t,[i]:e})),{})}window.customElements.get(C.defaultElementName)||window.customElements.define(C.defaultElementName,C);class q extends g.s{constructor(){super(),u(this,n),l(this,"_consentConsumer"),u(this,s,E(!1)),this.open=!1,this._dialogRef=b.e(),this._consentConsumer=new y(this,{context:v.consentContext,subscribe:!0,callback:e=>{console.log("callback: ",e),h(this,s,null===e?E(!1):e)}})}async savePreferences(e){try{let i;i=!0===(t=e)||!1===t||x.isObjectLike(t)&&"[object Boolean]"==x.baseGetTag(t)?E(e):p(this,s),this.dispatchEvent(new CustomEvent("update",{detail:i}))}catch(i){throw console.error("[savePreferences] error: ",i),i}var t}show(){console.log("[show] this._consentConsumer.value: ",this._consentConsumer.value),h(this,s,this._consentConsumer.value?{...this._consentConsumer.value}:E(!1)),this._dialogRef.value?.showModal()}close(e=!0){this._dialogRef.value?.close(e)}render(){return g.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){console.log("[#onToggleSwitchChange] event: ",e);const{target:t,detail:i}=e,{checked:n}=i,o=t.getAttribute("name");p(this,s)[o]=n},l(q,"properties",{debug:{type:Boolean,reflect:!0},open:{type:Boolean,state:!0}}),l(q,"styles",[g.i`${g.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",q),exports.BibConsentPreferencesDialog=q,exports.s=w,exports.s$1=y; -//# sourceMappingURL=bib-consent-preferences-dialog-bk5eYaQ1.cjs.map +//# sourceMappingURL=bib-consent-preferences-dialog-Co9EjXFl.cjs.map diff --git a/dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs.map b/dist/bib-consent-preferences-dialog-Co9EjXFl.cjs.map similarity index 99% rename from dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs.map rename to dist/bib-consent-preferences-dialog-Co9EjXFl.cjs.map index 8730e2b..d618586 100644 --- a/dist/bib-consent-preferences-dialog-bk5eYaQ1.cjs.map +++ b/dist/bib-consent-preferences-dialog-Co9EjXFl.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-preferences-dialog-bk5eYaQ1.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","../src/components/bib-consent/bib-consent-preferences-dialog.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../node_modules/lodash-es/isBoolean.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 { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer, ContextProvider } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { isBoolean } from 'lodash-es'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { DEFAULT_PREFERENCES } 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 = getConsentValues(false)\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._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: value => {\n console.log('callback: ', value)\n this.#toggleChoices = value === null ? getConsentValues(false) : value\n // this.requestUpdate()\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 let preferences\n\n if (isBoolean(preference)) {\n preferences = getConsentValues(preference)\n } else {\n preferences = this.#toggleChoices\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: preferences }))\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 console.log('[show] this._consentConsumer.value: ', this._consentConsumer.value)\n this.#toggleChoices = this._consentConsumer.value ? { ...this._consentConsumer.value } : getConsentValues(false)\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 console.log('[#onToggleSwitchChange] event: ', 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}","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\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","hasAttribute","toggleAttribute","connectedCallback","updateChecked","addEventListener","disconnectedCallback","removeEventListener","attributeChangedCallback","name","static","_l","getConsentValues","Object","keys","DEFAULT_PREFERENCES","reduce","obj","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_u_instances","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ContextConsumer","consentContext","log","savePreferences","preference","preferences","isObjectLike","baseGetTag","error","console","show","showModal","close","emit","render","ref","handleEvent","capture","performanceCookies","onToggleSwitchChange","functionalityCookies","onDetailsClick","adsCookies","WeakSet","o_fn","event","composedPath","some","node","matches","n_fn","target","getAttribute","debug","type","Boolean","reflect","state","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,aAAaH,KAAKM,UAAS,EAAGN,KAAKO,WAAM,EAAOP,KAAKL,EAAE,CAACA,EAAED,KAAKM,KAAKQ,cAAcR,KAAKQ,cAAcd,IAAIM,KAAKM,YAAYN,KAAKQ,eAAeR,KAAKG,WAAWH,KAAKQ,eAAeR,KAAKO,MAAMZ,EAAEK,KAAKS,KAAKC,gBAAgBV,KAAKM,WAAWN,KAAKG,YAAYH,KAAKM,YAAYN,KAAKE,UAAUF,KAAKE,SAASP,EAAED,IAAIM,KAAKQ,YAAYd,CAAAA,EAAGM,KAAKS,KAAKd,WAAWD,EAAEO,QAAQ,CAAC,MAAMN,EAAED,EAAOO,KAAAA,QAAQN,EAAEM,QAAQD,KAAKE,SAASP,EAA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B9F,EAAAA,KAAKyE,GAAe0B,sCAAsCnG,EAAKgG,KAAAA,EAAAA,2pBAU/E,IAAMhG,KAAKgF,6GACX,IAAMhF,KAAKgF,iBAAgB,+EAC3B,IAAMhF,KAAKgF,iBAAAA,uTAO1E,EA7KDP,EAAAA,IAAAA,QAjBKF,EAAA,IAAA6B,QAsFLC,EAAAH,SAAgBI,GAEVA,EAAMC,eAAeC,MAAKC,GAAQA,EAAKC,UAAU,2BACnDJ,EAAM7E,gBAET,EAEDkF,EAAAX,SAAsBM,GACZvB,QAAAA,IAAI,kCAAmCuB,GAC/C,MAAMM,OAAEA,EAAM5E,OAAEA,GAAWsE,GACrBhF,QAAEA,GAAYU,EACduB,EAAOqD,EAAOC,aAAa,QACjC7G,EAAAA,KAAAA,GAAoBuD,GAAQjC,CAC7B,EAlGDkC,EADWa,EACS,aAAA,CAClByC,MAAO,CACLC,KAAMC,QACNC,SAAS,GAEXvC,KAAM,CACJqC,KAAMC,QACNE,OAAAA,KAIJ1D,EAZWa,EAYK,SAAA,CACd3B,EAAAA,IAAMyE,EAAAA,smPAoLLnD,OAAOC,eAAeC,IAAI,mCAC7BF,OAAOC,eAAeG,OAAO,iCAAkCC","x_google_ignoreList":[0,1,2,3,5,6]} \ No newline at end of file +{"version":3,"file":"bib-consent-preferences-dialog-Co9EjXFl.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","../src/components/bib-consent/bib-consent-preferences-dialog.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../node_modules/lodash-es/isBoolean.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 { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer, ContextProvider } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { isBoolean } from 'lodash-es'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { DEFAULT_PREFERENCES } 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 = getConsentValues(false)\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._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: value => {\n console.log('callback: ', value)\n this.#toggleChoices = value === null ? getConsentValues(false) : value\n // this.requestUpdate()\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 let preferences\n\n if (isBoolean(preference)) {\n preferences = getConsentValues(preference)\n } else {\n preferences = this.#toggleChoices\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: preferences }))\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 console.log('[show] this._consentConsumer.value: ', this._consentConsumer.value)\n this.#toggleChoices = this._consentConsumer.value ? { ...this._consentConsumer.value } : getConsentValues(false)\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 console.log('[#onToggleSwitchChange] event: ', 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}","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\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","hasAttribute","toggleAttribute","connectedCallback","updateChecked","addEventListener","disconnectedCallback","removeEventListener","attributeChangedCallback","name","static","_l","getConsentValues","Object","keys","DEFAULT_PREFERENCES","reduce","obj","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_u_instances","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ContextConsumer","consentContext","log","savePreferences","preference","preferences","isObjectLike","baseGetTag","error","console","show","showModal","close","emit","render","ref","handleEvent","capture","performanceCookies","onToggleSwitchChange","functionalityCookies","onDetailsClick","adsCookies","WeakSet","o_fn","event","composedPath","some","node","matches","n_fn","target","getAttribute","debug","type","Boolean","reflect","state","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,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eAAeC,IAAI,mCAC7BF,OAAOC,eAAeG,OAAO,iCAAkCC","x_google_ignoreList":[0,1,2,3,5,6]} \ No newline at end of file diff --git a/dist/bib-consent-preferences-dialog-Cad7T2xM.js b/dist/bib-consent-preferences-dialog-D3EK7EBO.js similarity index 99% rename from dist/bib-consent-preferences-dialog-Cad7T2xM.js rename to dist/bib-consent-preferences-dialog-D3EK7EBO.js index 89f1cc8..74399c3 100644 --- a/dist/bib-consent-preferences-dialog-Cad7T2xM.js +++ b/dist/bib-consent-preferences-dialog-D3EK7EBO.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -21,7 +21,7 @@ var _i, _t, _e, _s, _b_instances, o_fn, n_fn; 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 { D as r } from "./constants-DMzZzv_T.js"; +import { D as r } from "./constants-C4fSqP7Z.js"; import { i as c, b as l } from "./isObjectLike-DmmXH0U-.js"; /** * @license @@ -168,4 +168,4 @@ export { p as a, d as s }; -//# sourceMappingURL=bib-consent-preferences-dialog-Cad7T2xM.js.map +//# sourceMappingURL=bib-consent-preferences-dialog-D3EK7EBO.js.map diff --git a/dist/bib-consent-preferences-dialog-Cad7T2xM.js.map b/dist/bib-consent-preferences-dialog-D3EK7EBO.js.map similarity index 99% rename from dist/bib-consent-preferences-dialog-Cad7T2xM.js.map rename to dist/bib-consent-preferences-dialog-D3EK7EBO.js.map index 4cf2984..7533655 100644 --- a/dist/bib-consent-preferences-dialog-Cad7T2xM.js.map +++ b/dist/bib-consent-preferences-dialog-D3EK7EBO.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-consent-preferences-dialog-Cad7T2xM.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","../src/components/bib-consent/bib-consent-preferences-dialog.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../node_modules/lodash-es/isBoolean.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 { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer, ContextProvider } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { isBoolean } from 'lodash-es'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { DEFAULT_PREFERENCES } 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 = getConsentValues(false)\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._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: value => {\n console.log('callback: ', value)\n this.#toggleChoices = value === null ? getConsentValues(false) : value\n // this.requestUpdate()\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 let preferences\n\n if (isBoolean(preference)) {\n preferences = getConsentValues(preference)\n } else {\n preferences = this.#toggleChoices\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: preferences }))\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 console.log('[show] this._consentConsumer.value: ', this._consentConsumer.value)\n this.#toggleChoices = this._consentConsumer.value ? { ...this._consentConsumer.value } : getConsentValues(false)\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 console.log('[#onToggleSwitchChange] event: ', 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}","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\n"],"names":["Event","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","dispatchRequest","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","constructor","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","removeEventListener","name","static","getConsentValues","Object","keys","DEFAULT_PREFERENCES","reduce","obj","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ContextConsumer","consentContext","console","log","preference","preferences","isObjectLike","baseGetTag","error","showModal","emit","close","ref","handleEvent","onDetailsClick","capture","performanceCookies","onToggleSwitchChange","functionalityCookies","adsCookies","savePreferences","event","composedPath","some","node","matches","target","getAttribute","debug","type","Boolean","reflect","state","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,WAAAA,OAAYN,KAAKO,QAAAA,QAAaP,KAAKL,IAAE,CAACA,IAAED,OAAAA;AAAKM,WAAKQ,gBAAcR,KAAKQ,gBAAcd,OAAIM,KAAKM,WAAS,OAAGN,KAAKQ,YAAAA,IAAeR,KAAKG,aAAWH,KAAKQ,YAAeR,IAAAA,KAAKO,QAAMZ,IAAEK,KAAKS,KAAKC,iBAAgBV,KAAKM,YAAAA,CAAWN,KAAKG,cAAYH,KAAKM,WAAAA,MAAYN,KAAKE,YAAUF,KAAKE,SAASP,IAAED,EAAAA,IAAIM,KAAKQ,cAAYd;AAAAA,OAAGM,KAAKS,OAAKd,IAAAA,WAAWD,GAAEO,SAAQ;AAAC,YAAMN,KAAED;AAAEM,WAAKC,UAAQN,GAAEM,SAAQD,KAAKE,WAASP,GAAEO,UAASF,KAAKG,YAAUR,GAAEQ,aAAAA;AAAAA,IAAa,MAAMH,MAAKC,UAAQP,IAAEM,KAAKE,WAASE,IAAEJ,KAAKG,YAAUE,MAAAA;AAAML,SAAKS,KAAKE,cAAcX;EAAK;AAAA,EAAC,gBAAgBA;AAAAA,SAAKY;EAAiB;AAAA,EAAC,mBAAmBZ;AAAAA,SAAKQ,gBAAcR,KAAKQ,YAAAA,GAAcR,KAAKQ,cAAAA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qF,kBAAAA,4BAA8CrF,sBAAKsF,mBAAAA,4eASzG,EAAEJ,aAAalF,sBAAAA,qBAAsBoF,SAAAA,sUAODpF,mBAAKiE,IAAesB,oBAAgDvF,4BAAAA,sBAAAA,mBAQxG,kjBAAA,EAAEkF,aAAalF,sBAAAA,qBAAsBoF,SAAS,KAAA,CAAA,gTAGpBpF,mBAAKiE,IAAeuB,sCAAsCxF,sBAAKsF,mBAAAA,ypBAU/E,MAAMtF,KAAKyF,6GACX,MAAMzF,KAAKyF,gBAAgB,KAAA,CAAA,6EAC3B,MAAMzF,KAAKyF,gBAAgB,IAAA,CAAA;AAAA,EAO1F;;AA7KDxB;AAjBK;AAsFL,OAAAkB,SAAgBO,IAEVA;AAAAA,EAAAA,GAAMC,aAAeC,EAAAA,KAAKC,CAAAA,OAAQA,GAAKC,UAAU,sBACnDJ,CAAAA,KAAAA,GAAMlE,eAET;AAAA;AAED,OAAA8D,SAAsBI;AACpBnB,UAAQC,IAAI,mCAAmCkB,EAAAA;AAC/C,UAAMK,QAAEA,IAAMjE,QAAEA,GAAAA,IAAW4D,MACrBrE,SAAEA,GAAAA,IAAYS,IACdmB,KAAO8C,GAAOC,aAAa,MACjChG;AAAAA,qBAAAA,IAAoBiD,EAAQ5B,IAAAA;AAC7B;AAlGD6B,cADWY,iBACS,EAClBmC,OAAO,EACLC,MAAMC,SACNC,SAAS,KAAA,GAEXlC,MAAM,EACJgC,MAAMC,SACNE,OAAAA,KAIJnD,EAAAA;AAAAA,cAZWY,GAYXZ,UAAgB,CACdV,IAAM8D;AAoLL7C,OAAOC,eAAeC,IAAI,gCAAA,KAC7BF,OAAOC,eAAeG,OAAO,kCAAkCC,CAAAA;","x_google_ignoreList":[0,1,2,3,5,6]} \ No newline at end of file +{"version":3,"file":"bib-consent-preferences-dialog-D3EK7EBO.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","../src/components/bib-consent/bib-consent-preferences-dialog.js","../node_modules/@auroratide/toggle-switch/lib/define.js","../node_modules/lodash-es/isBoolean.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 { css, html, LitElement, unsafeCSS } from 'lit'\nimport { ContextConsumer, ContextProvider } from '@lit/context'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { isBoolean } from 'lodash-es'\nimport '@auroratide/toggle-switch/lib/define.js'\nimport { consentContext } from './consent-context.js'\nimport { DEFAULT_PREFERENCES } 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 = getConsentValues(false)\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._consentConsumer = new ContextConsumer(this, {\n context: consentContext, subscribe: true, callback: value => {\n console.log('callback: ', value)\n this.#toggleChoices = value === null ? getConsentValues(false) : value\n // this.requestUpdate()\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 let preferences\n\n if (isBoolean(preference)) {\n preferences = getConsentValues(preference)\n } else {\n preferences = this.#toggleChoices\n }\n\n this.dispatchEvent(new CustomEvent('update', { detail: preferences }))\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 console.log('[show] this._consentConsumer.value: ', this._consentConsumer.value)\n this.#toggleChoices = this._consentConsumer.value ? { ...this._consentConsumer.value } : getConsentValues(false)\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 console.log('[#onToggleSwitchChange] event: ', 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}","import { ToggleSwitchElement } from './toggle-switch.js';\nif (!window.customElements.get(ToggleSwitchElement.defaultElementName)) {\n window.customElements.define(ToggleSwitchElement.defaultElementName, ToggleSwitchElement);\n}\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\n"],"names":["Event","s","t","e","super","bubbles","composed","this","context","callback","subscribe","i","h","provided","value","unsubscribe","host","requestUpdate","addController","dispatchRequest","dispatchEvent","CHECKED_ATTR","DISABLED_ATTR","ToggleSwitchElement","HTMLElement","constructor","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","removeEventListener","name","static","getConsentValues","Object","keys","DEFAULT_PREFERENCES","reduce","obj","window","customElements","get","defaultElementName","define","BibConsentPreferencesDialog","LitElement","_consentConsumer","toggleChoices","open","_dialogRef","createRef","ContextConsumer","consentContext","console","log","preference","preferences","isObjectLike","baseGetTag","error","showModal","emit","close","ref","handleEvent","onDetailsClick","capture","performanceCookies","onToggleSwitchChange","functionalityCookies","adsCookies","savePreferences","event","composedPath","some","node","matches","target","getAtt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,aAAalF,sBAAAA,qBAAsBoF,SAAAA,sUAODpF,mBAAKiE,IAAesB,oBAAgDvF,4BAAAA,sBAAAA,mBAQxG,kjBAAA,EAAEkF,aAAalF,sBAAAA,qBAAsBoF,SAAS,KAAA,CAAA,gTAGpBpF,mBAAKiE,IAAeuB,sCAAsCxF,sBAAKsF,mBAAAA,ypBAU/E,MAAMtF,KAAKyF,6GACX,MAAMzF,KAAKyF,gBAAgB,KAAA,CAAA,6EAC3B,MAAMzF,KAAKyF,gBAAgB,IAAA,CAAA;AAAA,EAO1F;;AA7KDxB;AAjBK;AAsFL,OAAAkB,SAAgBO,IAEVA;AAAAA,EAAAA,GAAMC,aAAeC,EAAAA,KAAKC,CAAAA,OAAQA,GAAKC,UAAU,sBACnDJ,CAAAA,KAAAA,GAAMlE,eAET;AAAA;AAED,OAAA8D,SAAsBI;AACpBnB,UAAQC,IAAI,mCAAmCkB,EAAAA;AAC/C,UAAMK,QAAEA,IAAMjE,QAAEA,GAAAA,IAAW4D,MACrBrE,SAAEA,GAAAA,IAAYS,IACdmB,KAAO8C,GAAOC,aAAa,MACjChG;AAAAA,qBAAAA,IAAoBiD,EAAQ5B,IAAAA;AAC7B;AAlGD6B,cADWY,iBACS,EAClBmC,OAAO,EACLC,MAAMC,SACNC,SAAS,KAAA,GAEXlC,MAAM,EACJgC,MAAMC,SACNE,OAAAA,KAIJnD,EAAAA;AAAAA,cAZWY,GAYXZ,UAAgB,CACdV,IAAM8D;AAoLL7C,OAAOC,eAAeC,IAAI,gCAAA,KAC7BF,OAAOC,eAAeG,OAAO,kCAAkCC,CAAAA;","x_google_ignoreList":[0,1,2,3,5,6]} \ No newline at end of file diff --git a/dist/bib-consent-preferences-dialog.cjs b/dist/bib-consent-preferences-dialog.cjs index f977eb3..fe7a4d5 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.13.0 + * @version 0.13.1 * @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-bk5eYaQ1.cjs");require("./ref-mxufyLY8.cjs"),require("./consent-context.cjs"),require("./constants-BgVe0aC4.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-Co9EjXFl.cjs");require("./ref-mxufyLY8.cjs"),require("./consent-context.cjs"),require("./constants-C4rB-CcV.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 db68e6d..a5dc630 100644 --- a/dist/bib-consent-preferences-dialog.js +++ b/dist/bib-consent-preferences-dialog.js @@ -1,16 +1,16 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ import "./lit-element-Dj1nHH6C.js"; -import { B } from "./bib-consent-preferences-dialog-Cad7T2xM.js"; +import { B } from "./bib-consent-preferences-dialog-D3EK7EBO.js"; import "./ref-B-kqFHPy.js"; import "./consent-context.js"; -import "./constants-DMzZzv_T.js"; +import "./constants-C4fSqP7Z.js"; export { B as BibConsentPreferencesDialog }; diff --git a/dist/bib-consent-server.cjs b/dist/bib-consent-server.cjs index ae7388d..f9a0ca1 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,i=Object.defineProperty,s=e=>{throw TypeError(e)},n=(e,t,s)=>((e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),r=(e,t,i)=>t.has(e)||s("Cannot "+i),o=(e,t,i)=>(r(e,t,"read from private field"),i?i.call(e):t.get(e)),a=(e,t,i)=>t.has(e)?s("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./lit-element-BHNMc-Kg.cjs"),g=require("./constants-BgVe0aC4.cjs"),c=require("./ref-mxufyLY8.cjs"),h=require("./logger-Bm71IG_Q.cjs"),d=require("./PreferenceStorage.cjs");class p extends l.s{constructor(){super(),a(this,e),a(this,t,h.loggerFactory("consent-server")),this.connected=!1,this.debug=this.debug||!1,this.loggerRef=c.e(),this.allowedOrigins=this.allowedOrigins||[],this.init()}async init(){var t,i,s,n;this.log("Initializing BibConsentServer..."),t=this,i=e,s=await d(),r(t,i,"write to private field"),n?n.call(t,s):i.set(t,s),this.log("Connected to storage."),o(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")){o(this,t).call(this,...e);const i=e.map((e=>"string"==typeof e?e:JSON.stringify(e))).join(" ");this.loggerRef.value&&(this.loggerRef.value.value+=`${""===this.loggerRef.value.value?"":"\r"}${i}`)}}async startListening(){this.log("startListening()");const{listenMessage:t}=await g.startListening({eventFilter:e=>{const{origin:t}=e;return this.allowedOrigins.length>0&&this.allowedOrigins.some((e=>g.patternMatchesOrigin(e,t)))}});this.log("Listening for postMessage events..."),this.connected=!0,this.log("connected:",this.connected),t((async(t,i,s)=>{let n;switch(t){case"setPreferences":n=await o(this,e).setPreferences(i);break;case"getPreferences":n=await o(this,e).getPreferences();break;case"resetPreferences":n=await o(this,e).resetPreferences();break;case"ping":n="pong";break;default:throw this.log(`Unknown method: ${t}. Payload:`,i),new Error(`Unknown method: ${t}`)}i?this.log(`Method \`${t}\` called with payload:`,i,"response:",n):this.log(`Method \`${t}\` called.`,"response:",n),s(n)}))}render(){return l.x`

I am bib-consent-server

`}}e=new WeakMap,t=new WeakMap,n(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(" ")}}}),n(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:.25rem .25rem 0;font-size:small;border:1px solid silver}.log{-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:.25rem 0 0;resize:none;width:100%;background-color:unset;box-sizing:border-box;border:none;tab-size:8;outline:none;height:100px;line-height:20px;overflow-wrap:normal;overscroll-behavior-x:none;white-space:pre;z-index:1}")}`]),window.customElements.get("bib-consent-server")||window.customElements.define("bib-consent-server",p),exports.BibConsentServer=p; +var e,t,i=Object.defineProperty,s=e=>{throw TypeError(e)},n=(e,t,s)=>((e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),r=(e,t,i)=>t.has(e)||s("Cannot "+i),o=(e,t,i)=>(r(e,t,"read from private field"),i?i.call(e):t.get(e)),a=(e,t,i)=>t.has(e)?s("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./lit-element-BHNMc-Kg.cjs"),g=require("./constants-C4rB-CcV.cjs"),c=require("./ref-mxufyLY8.cjs"),h=require("./logger-CPFgczHL.cjs"),d=require("./PreferenceStorage.cjs");class p extends l.s{constructor(){super(),a(this,e),a(this,t,h.loggerFactory("consent-server")),this.connected=!1,this.debug=this.debug||!1,this.loggerRef=c.e(),this.allowedOrigins=this.allowedOrigins||[],this.init()}async init(){var t,i,s,n;this.log("Initializing BibConsentServer..."),t=this,i=e,s=await d(),r(t,i,"write to private field"),n?n.call(t,s):i.set(t,s),this.log("Connected to storage."),o(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")){o(this,t).call(this,...e);const i=e.map((e=>"string"==typeof e?e:JSON.stringify(e))).join(" ");this.loggerRef.value&&(this.loggerRef.value.value+=`${""===this.loggerRef.value.value?"":"\r"}${i}`)}}async startListening(){this.log("startListening()");const{listenMessage:t}=await g.startListening({eventFilter:e=>{const{origin:t}=e;return this.allowedOrigins.length>0&&this.allowedOrigins.some((e=>g.patternMatchesOrigin(e,t)))}});this.log("Listening for postMessage events..."),this.connected=!0,this.log("connected:",this.connected),t((async(t,i,s)=>{let n;switch(t){case"setPreferences":n=await o(this,e).setPreferences(i);break;case"getPreferences":n=await o(this,e).getPreferences();break;case"resetPreferences":n=await o(this,e).resetPreferences();break;case"ping":n="pong";break;default:throw this.log(`Unknown method: ${t}. Payload:`,i),new Error(`Unknown method: ${t}`)}i?this.log(`Method \`${t}\` called with payload:`,i,"response:",n):this.log(`Method \`${t}\` called.`,"response:",n),s(n)}))}render(){return l.x`

I am bib-consent-server

`}}e=new WeakMap,t=new WeakMap,n(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(" ")}}}),n(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:.25rem .25rem 0;font-size:small;border:1px solid silver}.log{-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:.25rem 0 0;resize:none;width:100%;background-color:unset;box-sizing:border-box;border:none;tab-size:8;outline:none;height:100px;line-height:20px;overflow-wrap:normal;overscroll-behavior-x:none;white-space:pre;z-index:1}")}`]),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 7c4afa0..f541283 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.13.0 + * @version 0.13.1 * @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, _t; import { s as e, i as t, r as s, x as o } from "./lit-element-Dj1nHH6C.js"; -import { d as i, p as n } from "./constants-DMzZzv_T.js"; +import { d as i, p as n } from "./constants-C4fSqP7Z.js"; import { e as r, n as a } from "./ref-B-kqFHPy.js"; -import { l } from "./logger-DG93hjV0.js"; +import { l } from "./logger-BEdk5hAI.js"; import g from "./PreferenceStorage.js"; class c extends e { constructor() { diff --git a/dist/bib-consent.cjs b/dist/bib-consent.cjs index 0307555..bb3c20a 100644 --- a/dist/bib-consent.cjs +++ b/dist/bib-consent.cjs @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,s,i,n,r,o,c,a,h,l,u=Object.defineProperty,p=e=>{throw TypeError(e)},d=(e,t,s)=>((e,t,s)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),b=(e,t,s)=>t.has(e)||p("Cannot "+s),f=(e,t,s)=>(b(e,t,"read from private field"),s?s.call(e):t.get(e)),v=(e,t,s)=>t.has(e)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),g=(e,t,s,i)=>(b(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),w=(e,t,s)=>(b(e,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./lit-element-BHNMc-Kg.cjs"),m=require("./ref-mxufyLY8.cjs"),x=require("./bib-consent-preferences-dialog-bk5eYaQ1.cjs"),C=require("./logger-Bm71IG_Q.cjs"),P=require("./bib-BeuNzWlx.cjs");require("./bib-button-close.cjs"),require("./bib-consent-consent-dialog.cjs");const q=require("./preferencesClient.cjs"),y=require("./consent-context.cjs"),T=require("./constants-BgVe0aC4.cjs"); +var e,t,s,i,n,r,o,c,a,h,l,u=Object.defineProperty,p=e=>{throw TypeError(e)},d=(e,t,s)=>((e,t,s)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),b=(e,t,s)=>t.has(e)||p("Cannot "+s),f=(e,t,s)=>(b(e,t,"read from private field"),s?s.call(e):t.get(e)),v=(e,t,s)=>t.has(e)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),g=(e,t,s,i)=>(b(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),w=(e,t,s)=>(b(e,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./lit-element-BHNMc-Kg.cjs"),m=require("./ref-mxufyLY8.cjs"),x=require("./bib-consent-preferences-dialog-Co9EjXFl.cjs"),C=require("./logger-CPFgczHL.cjs"),P=require("./bib-tXLxIV_m.cjs");require("./bib-button-close.cjs"),require("./bib-consent-consent-dialog.cjs");const q=require("./preferencesClient.cjs"),y=require("./consent-context.cjs"),T=require("./constants-C4rB-CcV.cjs"); /** * @license * Copyright 2021 Google LLC diff --git a/dist/bib-consent.js b/dist/bib-consent.js index fa88e23..8c56270 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui @@ -20,14 +20,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce var _e, _t, _s, _n, _r, _g_instances, o_fn, c_fn, i_fn, a_fn, h_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 r, a as o } from "./bib-consent-preferences-dialog-Cad7T2xM.js"; -import { l as i } from "./logger-DG93hjV0.js"; -import { a as c } from "./bib-2qdb5tWe.js"; +import { s as r, a as o } from "./bib-consent-preferences-dialog-D3EK7EBO.js"; +import { l as i } from "./logger-BEdk5hAI.js"; +import { a as c } from "./bib-iGuYwAse.js"; import "./bib-button-close.js"; import "./bib-consent-consent-dialog.js"; import a from "./preferencesClient.js"; import { consentContext as h } from "./consent-context.js"; -import { S as l, b as u, E as p } from "./constants-DMzZzv_T.js"; +import { S as l, b as u, E as p } from "./constants-C4fSqP7Z.js"; /** * @license * Copyright 2021 Google LLC diff --git a/dist/bib-footer-copyright.cjs b/dist/bib-footer-copyright.cjs index 427c655..8f7ff23 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.13.0 + * @version 0.13.1 * @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 002ffa7..563562f 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.13.0 + * @version 0.13.1 * @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 b219d99..ead1999 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.13.0 + * @version 0.13.1 * @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 3dc0369..6955a2e 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/bib-2qdb5tWe.js b/dist/bib-iGuYwAse.js similarity index 98% rename from dist/bib-2qdb5tWe.js rename to dist/bib-iGuYwAse.js index 02aff8a..9a96700 100644 --- a/dist/bib-2qdb5tWe.js +++ b/dist/bib-iGuYwAse.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { p as r } from "./package-CcUCpIoR.js"; +import { p as r } from "./package-BUO2f-K0.js"; import { j as t, g as n, e, a as o, k as i, i as a, b as u, o as c, U as f, f as s, h as l, c as v, l as p, m as b, S as y } from "./_Uint8Array-DzlTzPS7.js"; import { i as d, b as h, r as g } from "./isObjectLike-DmmXH0U-.js"; function j(r2) { @@ -158,4 +158,4 @@ function X(n2, e2) { export { X as a }; -//# sourceMappingURL=bib-2qdb5tWe.js.map +//# sourceMappingURL=bib-iGuYwAse.js.map diff --git a/dist/bib-2qdb5tWe.js.map b/dist/bib-iGuYwAse.js.map similarity index 99% rename from dist/bib-2qdb5tWe.js.map rename to dist/bib-iGuYwAse.js.map index 6cc73ca..54fd5d1 100644 --- a/dist/bib-2qdb5tWe.js.map +++ b/dist/bib-iGuYwAse.js.map @@ -1 +1 @@ -{"version":3,"file":"bib-2qdb5tWe.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,EAAUb,QAAQ,gBAE7B;AAAA,WADAJ,GAAK,CAAE,GAAE,IAAI,CAAA,CAAA,GACNA;AAAAA,EACX,SAAWkB,IAAAA;AAAAA,EAAK;AAChB,ECIIC,GAAA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AA;AAWtC,OATAuD,KAAcuC,EAAShC,SAAS,KAA0B,cAAA,OAAdP,MACvCO,MAAUP,MACXvD,QAEAwG,MGNR,SAAwBrH,IAAOwE,IAAOhE,IACpC;AAAA,QAAA,CAAKE,EAASF,EAAAA,EACZ,QAAO;AAET,QAAI8G,KAAAA,OAAc9C;AAClB,WAAA,CAAA,EAAY,YAAR8C,KACK7E,EAAYjC,EAAAA,KAAW+G,EAAQ/C,IAAOhE,GAAOmE,MAAAA,IACrC,YAAR2C,MAAoB9C,MAAShE,OAE7B4B,EAAG5B,GAAOgE,EAAQxE,GAAAA,EAAAA;AAAAA,EAG7B,EHNgCoH,GAAQ,CAAA,GAAIA,GAAQ,CAAIC,GAAAA,EAAAA,MAClDjD,KAAaO,KAAS,IAAI9D,SAAYuD,IACtCO,KAAS,IAEXnE,KAASH,OAAOG,EAAAA,GAAAA,EACPgE,KAAQG,MAAQ;AACvB,QAAIT,KAASkD,GAAQ5C,EACjBN;AAAAA,IAAAA,MACFyC,EAASnG,IAAQ0D,IAAQM,EAAAA;AAAAA,EAE5B;AACD,SAAOhE;AACX,CAAA;AI9BO,SAASgH,EAAeC,IAAMzH,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-iGuYwAse.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,EAAUb,QAAQ,gBAE7B;AAAA,WADAJ,GAAK,CAAE,GAAE,IAAI,CAAA,CAAA,GACNA;AAAAA,EACX,SAAWkB,IAAAA;AAAAA,EAAK;AAChB,ECIIC,GAAAA,IAAmBH,IAA4B,SAAShB,IAAMoB,IAAAA;AAChE,SAAOJ,EAAehB,IAAM,YAAY,EACtCqB,cAAAA,MACAC,YAAAA,OACAvB,QCGcA,KDHIqB,ICIb,WACL;AAAA,WAAOrB;AAAAA,EACX,IDLIwB,UAAY,KAAA,CAAA;ACEhB,MAAkBxB;ADAlB,IAPwCD,GEDpC0B,KJKcxB,IILSmB,GJMrBlB,IAAQ,GACRC,IAAa,GAEV,WACL;AAAA,MAAIuB,KAAQZ,EAAAA,GACRa,KApBO,MAoBiBD,KAAQvB;AAGpC,MADAA,IAAauB,IACTC,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AAAA;AAAAA,EAG7B,EHNgCoH,GAAQ,CAAA,GAAIA,GAAQ,CAAIC,GAAAA,EAAAA,MAClDjD,KAAaO,KAAS,IAAI9D,SAAYuD,IACtCO,KAAS,IAEXnE,KAASH,OAAOG,EAAAA,GAAAA,EACPgE,KAAQG,MAAQ;AACvB,QAAIT,KAASkD,GAAQ5C,EACjBN;AAAAA,IAAAA,MACFyC,EAASnG,IAAQ0D,IAAQM,EAAAA;AAAAA,EAE5B;AACD,SAAOhE;AACX,CAAA;AI9BO,SAASgH,EAAeC,IAAMzH,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 diff --git a/dist/bib-retroaction-usager.cjs b/dist/bib-retroaction-usager.cjs index c154cfb..a6098b3 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.13.0 + * @version 0.13.1 * @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-BeuNzWlx.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-tXLxIV_m.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 1d9fe57..c22cde4 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.13.0 + * @version 0.13.1 * @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-2qdb5tWe.js"; +import { a as p } from "./bib-iGuYwAse.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/bib-BeuNzWlx.cjs b/dist/bib-tXLxIV_m.cjs similarity index 97% rename from dist/bib-BeuNzWlx.cjs rename to dist/bib-tXLxIV_m.cjs index b33900e..8d67f48 100644 --- a/dist/bib-BeuNzWlx.cjs +++ b/dist/bib-tXLxIV_m.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const r=require("./package-DEzRsZ0U.cjs"),t=require("./_Uint8Array-Dn54l80h.cjs"),e=require("./isObjectLike-DLI4XyQI.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=t.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 p(r,t,e){"__proto__"==t&&s?s(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var b=Object.prototype.hasOwnProperty;function y(r,e,n){var o=r[e];b.call(r,e)&&t.eq(o,n)&&(void 0!==n||e in r)||p(r,e,n)}var d=Math.max,g=Object.prototype.hasOwnProperty;function j(r){return t.isArrayLike(r)?t.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 e=t.isPrototype(r),n=[];for(var o in r)("constructor"!=o||!e&&g.call(r,o))&&n.push(o);return n}(r)}var O=t.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===_?e.root.Buffer:void 0;function P(r,e,n){(void 0!==n&&!t.eq(r[e],n)||void 0===n&&!(e in r))&&p(r,e,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 t.Stack),t.isObject(u))!function(r,n,o,i,c,u,f){var s,l,v,b,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=t.isArray(h),U=!q&&t.isBuffer(h),B=!q&&!U&&t.isTypedArray(h);x=h,q||U||B?t.isArray(g)?x=g:(_=g,e.isObjectLike(_)&&t.isArrayLike(_)?x=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e1?e[o-1]:void 0,c=o>2?e[2]:void 0;for(i=U.length>3&&"function"==typeof i?(o--,i):void 0,c&&function(r,e,n){if(!t.isObject(n))return!1;var o=typeof e;return!!("number"==o?t.isArrayLike(n)&&t.isIndex(e,n.length):"string"==o&&e in n)&&t.eq(n[e],r)}(e[0],e[1],c)&&(i=o<3?void 0:i,o=1),r=Object(r);++n0){if(++i>=800)return arguments[0]}else i=0;return o.apply(void 0,arguments)});function p(r,t,e){"__proto__"==t&&s?s(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var b=Object.prototype.hasOwnProperty;function y(r,e,n){var o=r[e];b.call(r,e)&&t.eq(o,n)&&(void 0!==n||e in r)||p(r,e,n)}var d=Math.max,g=Object.prototype.hasOwnProperty;function j(r){return t.isArrayLike(r)?t.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 e=t.isPrototype(r),n=[];for(var o in r)("constructor"!=o||!e&&g.call(r,o))&&n.push(o);return n}(r)}var O=t.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===_?e.root.Buffer:void 0;function P(r,e,n){(void 0!==n&&!t.eq(r[e],n)||void 0===n&&!(e in r))&&p(r,e,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 t.Stack),t.isObject(u))!function(r,n,o,i,c,u,f){var s,l,v,b,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=t.isArray(h),U=!q&&t.isBuffer(h),B=!q&&!U&&t.isTypedArray(h);x=h,q||U||B?t.isArray(g)?x=g:(_=g,e.isObjectLike(_)&&t.isArrayLike(_)?x=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e1?e[o-1]:void 0,c=o>2?e[2]:void 0;for(i=U.length>3&&"function"==typeof i?(o--,i):void 0,c&&function(r,e,n){if(!t.isObject(n))return!1;var o=typeof e;return!!("number"==o?t.isArrayLike(n)&&t.isIndex(e,n.length):"string"==o&&e in n)&&t.eq(n[e],r)}(e[0],e[1],c)&&(i=o<3?void 0:i,o=1),r=Object(r);++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":"2HAgBA,SAASA,EAASC,GACTA,OAAAA,CACT,CCfA,ICakBC,EACZC,EACAC,EDfFC,EAAeC,OAAOC,OAUtBC,EAAc,WAChB,SAASC,IAAW,CACpB,OAAO,SA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_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-tXLxIV_m.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":"2HAgBA,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,EAA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B,GuBpBjC,SAAe5F,EAAMsH,EAASF,GAC5B,OAAQA,EAAK1C,QACX,KAAK,EAAU1E,OAAAA,EAAKmC,KAAKmF,GACzB,KAAK,EAAG,OAAOtH,EAAKmC,KAAKmF,EAASF,EAAK,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 diff --git a/dist/consent-context.cjs b/dist/consent-context.cjs index fc424c2..8e37817 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-BgVe0aC4.cjs"),t=Symbol(e.getKeyName("consent-context")); +Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-C4rB-CcV.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 d80c3a8..32d3134 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { e as o } from "./constants-DMzZzv_T.js"; +import { e as o } from "./constants-C4fSqP7Z.js"; /** * @license * Copyright 2021 Google LLC diff --git a/dist/constants-DMzZzv_T.js b/dist/constants-C4fSqP7Z.js similarity index 99% rename from dist/constants-DMzZzv_T.js rename to dist/constants-C4fSqP7Z.js index d1d968b..84fcc12 100644 --- a/dist/constants-DMzZzv_T.js +++ b/dist/constants-C4fSqP7Z.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { n as e } from "./package-CcUCpIoR.js"; +import { n as e } from "./package-BUO2f-K0.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; @@ -321,4 +321,4 @@ export { S as p, M as s }; -//# sourceMappingURL=constants-DMzZzv_T.js.map +//# sourceMappingURL=constants-C4fSqP7Z.js.map diff --git a/dist/constants-DMzZzv_T.js.map b/dist/constants-C4fSqP7Z.js.map similarity index 99% rename from dist/constants-DMzZzv_T.js.map rename to dist/constants-C4fSqP7Z.js.map index 668ccc9..af7d4b1 100644 --- a/dist/constants-DMzZzv_T.js.map +++ b/dist/constants-C4fSqP7Z.js.map @@ -1 +1 @@ -{"version":3,"file":"constants-DMzZzv_T.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 } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${name}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n CONSENT: eventName('consent'),\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\nexport const DEFAULT_PREFERENCES = {\n performanceCookies: null,\n functionalityCookies: null,\n adsCookies: null\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","DB_VERSION","DB_STORE_NAME","EVENT_NAMES","CONSENT","READY","UPDATE","DEFAULT_PREFERENCES","performanceCookies","functionalityCookies","adsCookies"],"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,IA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wBAAwBC;AAE/C,MAAA,CAAKF,GACH,QAAOG,EAAYC;AAIrB,QAAMC,KAAa,IAAIC;AACvB,MAAIlM,IACAmM;AAEJ,MAAA;AAOE,QANAA,KAAgB7K,WAAW,MAAA;AACzBlB,cAAQC,KAAK,2BAA2BZ,EAAAA,yBAAAA,GACxCwM,GAAWG,MAAAA;AAAAA,IAAO,GACjB3M,EAAAA,GACHO,KAAiBqM,MAAAA,MAAMT,IAAW,EAAEU,QAAQL,GAAWK,OAAAA,CAAAA,GAEnDtM,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,EAAAA;AAAAA,EACd;AAED,QAAM,IAAIvL,MAAM,qEAAqEZ,GAAS0M,MAAgBd,UAAAA,GAAUhE,IAC1H,EAAA;AAAA;ACnHA,MAAM2C,IAAYF,EAAwB,SAAA,GAE7BsC,IAAU,GAAGrE,CACbsE,YAAAA,IAAa,GACbC,IAAgB,WAEhBC,IAAc,EACzBC,SAASxC,EAAU,SAAA,GACnByC,OAAOzC,EAAU,OACjB0C,GAAAA,QAAQ1C,EAAU,QAEPE,EAAAA,GAAAA,IAAS,eACTsB,IAAc,EACzBC,OAAO,SACPQ,QAAQ,SAEGV,GAAAA,IAAiC,KACjCoB,IAAsB,EACjCC,oBAAoB,MACpBC,sBAAsB,MACtBC,YAAY;","x_google_ignoreList":[0,1,2]} \ No newline at end of file +{"version":3,"file":"constants-C4fSqP7Z.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 } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${name}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n CONSENT: eventName('consent'),\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\nexport const DEFAULT_PREFERENCES = {\n performanceCookies: null,\n functionalityCookies: null,\n adsCookies: null\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","DB_VERSION","DB_STORE_NAME","EVENT_NAMES","CONSENT","READY","UPDATE","DEFAULT_PREFERENCES","performanceCookies","functionalityCookies","adsCookies"],"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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QAAMwM,KAAYxM,GAAOwM,WACnBnM,KAAUL,GAAOyM,wBAAwBC;AAE/C,MAAA,CAAKF,GACH,QAAOG,EAAYC;AAIrB,QAAMC,KAAa,IAAIC;AACvB,MAAIlM,IACAmM;AAEJ,MAAA;AAOE,QANAA,KAAgB7K,WAAW,MAAA;AACzBlB,cAAQC,KAAK,2BAA2BZ,EAAAA,yBAAAA,GACxCwM,GAAWG,MAAAA;AAAAA,IAAO,GACjB3M,EAAAA,GACHO,KAAiBqM,MAAAA,MAAMT,IAAW,EAAEU,QAAQL,GAAWK,OAAAA,CAAAA,GAEnDtM,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,EAAAA;AAAAA,EACd;AAED,QAAM,IAAIvL,MAAM,qEAAqEZ,GAAS0M,MAAgBd,UAAAA,GAAUhE,IAC1H,EAAA;AAAA;ACnHA,MAAM2C,IAAYF,EAAwB,SAAA,GAE7BsC,IAAU,GAAGrE,CACbsE,YAAAA,IAAa,GACbC,IAAgB,WAEhBC,IAAc,EACzBC,SAASxC,EAAU,SAAA,GACnByC,OAAOzC,EAAU,OACjB0C,GAAAA,QAAQ1C,EAAU,QAEPE,EAAAA,GAAAA,IAAS,eACTsB,IAAc,EACzBC,OAAO,SACPQ,QAAQ,SAEGV,GAAAA,IAAiC,KACjCoB,IAAsB,EACjCC,oBAAoB,MACpBC,sBAAsB,MACtBC,YAAY;","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/dist/constants-BgVe0aC4.cjs b/dist/constants-C4rB-CcV.cjs similarity index 98% rename from dist/constants-BgVe0aC4.cjs rename to dist/constants-C4rB-CcV.cjs index 9a33ca7..0cf5b00 100644 --- a/dist/constants-BgVe0aC4.cjs +++ b/dist/constants-C4rB-CcV.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const e=require("./package-DEzRsZ0U.cjs"),n=require("./type-KOUr406I.cjs");function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n,t){return Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,n){if(!(e instanceof n))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(n,r,s){var i=this;o(this,e),t(this,"receiveMessage",(function(e,n,t){if(e===a[i.type].receive){if(n&&i.messageResponse[n]){var r=i.messageResponse[n];delete i.messageResponse[n],r(t)}}else i.listener?i.listener(e,t,(function(e){i.messageProxy.request(a[i.type].post,n,e)})):console.warn("no message listener: ",e,t)})),t(this,"doPost",(function(e,n,t){var r=e.resolve,o=e.reject,s=e.eventId;i.messageResponse[s]=r;try{i.messageProxy.request(n,s,t)}catch(a){throw delete i.messageResponse[s],o(),a}})),t(this,"listenMessage",(function(e){i.listener=e})),t(this,"postMessage",(function(e,n){return c.indexOf(e)>=0?Promise.reject(new Error("".concat(e," is a protected key-method."))):new Promise((function(t,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),t(e)},reject:r,eventId:s},e,n),o=setTimeout((function(){i.messageResponse&&delete i.messageResponse[s],r(new Error("postMessage timeout"))}),i.timeout||2e4)}}))})),t(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=n,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(n,r,s){var i=this;o(this,e),t(this,"listen",(function(e){var n=i,t=function(t){if(("*"===n.origin||t.origin===n.origin)&&t.source===n.source&&t.data&&t.data[f]===p[n.type].accept&&t.data.channelId===n.channelId&&n.eventFilter(t)&&t.data.method){var r=t.data,o=r.eventId,s=r.method,i=r.payload;e(s,o,i)}};return window.addEventListener("message",t),function(){window.removeEventListener("message",t)}})),t(this,"request",(function(e,n,r){i.source&&!i.source.closed?i.source.postMessage(t(t(t(t(t({},f,p[i.type].key),"channelId",i.channelId),"eventId",n),"method",e),"payload",r),i.origin):console.error("source closed.")})),t(this,"destroy",(function(){i.type="",i.origin="",i.source=null,i.channelId="",i.eventFilter=null})),this.type=n;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,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(e){for(var n=1;n4?n.protocol:window.location.protocol,r=n.host.length?"80"===n.port||"443"===n.port?n.hostname:n.host:window.location.host;return n.origin||"".concat(t,"//").concat(r)}var E={resolveOrigin:b,getIframeServer:function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=void 0!==e?e:document.body,s=b(n),i=document.createElement("iframe");return i.name=t||"",i.classList.add.apply(i.classList,r),o.appendChild(i),i.src=n,{server:i.contentWindow||i.contentDocument.parentWindow,origin:s,frame:i}},getOpenedServer:function(e){for(var n,t=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 t=e.server,r=e.origin,o=n.eventFilter,s=void 0===o?function(){return!0}:o,i=n.timeout,a=void 0===i?2e4:i,c=n.clientInfo,u=void 0===c?{}:c,d=n.onDestroy,f=Math.random().toString().substr(3,10),p={source:t,origin:r,channelId:f};return new Promise((function(e,n){if(t&&!t.closed){var r=new v("client",p,s);(o=p,i=r,c=a,f=u,new Promise((function(e,n){var t=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(n,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("hand-shake"===n){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:t,origin:r,channelId:s,serverInfo:c.serverInfo,clientInfo:f}))}})),l=setInterval((function(){if(!t||t.closed)throw clearInterval(l),d&&d(),n(new Error("server closed.")),new Error("server closed.");if(c&&new Date-u>c)throw clearInterval(l),d&&d(),n(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(n){(function(e,n,t){var r=e.server,o=e.serverInfo,s=void 0===o?{}:o,i=e.channelId,a=new l("client",n,t),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({},n),{},{destroy:function(){r=null,d&&d(n.serverInfo,n)}}),r,a).run(e)})).catch((function(e){n(e)}))}else n(new Error("server closed"));var o,i,c,f}))},exports.createPrefixedEventName=j,exports.getIframeServer=function(e,n){const t=void 0!==e?e:document.body,r=E.resolveOrigin(n),o=M("iframe");let s;return document.querySelector(`#${o}`)?s=document.querySelector(`#${o}`):(s=document.createElement("iframe"),s.id=o,function(e,n){const t=(e="string"==typeof e?new URL(e,location):e).searchParams.get("debug");return null!==t&&(""===t||O(t))}(n)?s.style.cssText="width: 100%; height: 100%; border: 0;":(s.ariaHidden=!0,s.tabIndex=-1,s.hidden=!0,s.style.setProperty("display","none")),t.appendChild(s),s.src=n),{server:s.contentWindow||s.contentDocument.parentWindow,origin:r,iframe:s}},exports.getKeyName=M,exports.getServerMode=async function(e){const n=e.serverUrl,t=e.serverRequestTimeout||500;if(!n)return T.LOCAL;const r=new AbortController;let o,s;try{if(s=setTimeout((()=>{console.warn(`Request timed out after ${t}ms. Aborting request...`),r.abort()}),t),o=await fetch(n,{signal:r.signal}),o.ok)return T.REMOTE}catch(i){if(console.error(i),r.signal.aborted)throw new Error(`Unable to locate server page. The request timed out after ${t}ms. url: ${n.href}`);throw new Error(`Unable to locate server page : ${n.href}.`,i)}finally{clearTimeout(s)}throw new Error(`Unable to locate server page. The request failed with status code ${o.status}. url: ${n.href}`)},exports.patternMatchesOrigin=function(e,n){const t=e.replace(/[.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/[*]/g,".*");return new RegExp(`^${t}$`,"u").test(n)},exports.startListening=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.eventFilter,r=void 0===n?function(){return!0}:n,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 n,o;(n=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&&n(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(t(t(t(t({},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(n){(function(e,n,t){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},n),u=new l("server",c,t),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({},n),{},{destroy:function(){c&&c(n.clientInfo,n)}}),r,s).run(e)}))}))},exports.stringIsUrl=function(e){try{return new URL(e,location),!0}catch{return!1}}; -//# sourceMappingURL=constants-BgVe0aC4.cjs.map +const e=require("./package-BelR9Gue.cjs"),n=require("./type-KOUr406I.cjs");function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n,t){return Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,n){if(!(e instanceof n))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(n,r,s){var i=this;o(this,e),t(this,"receiveMessage",(function(e,n,t){if(e===a[i.type].receive){if(n&&i.messageResponse[n]){var r=i.messageResponse[n];delete i.messageResponse[n],r(t)}}else i.listener?i.listener(e,t,(function(e){i.messageProxy.request(a[i.type].post,n,e)})):console.warn("no message listener: ",e,t)})),t(this,"doPost",(function(e,n,t){var r=e.resolve,o=e.reject,s=e.eventId;i.messageResponse[s]=r;try{i.messageProxy.request(n,s,t)}catch(a){throw delete i.messageResponse[s],o(),a}})),t(this,"listenMessage",(function(e){i.listener=e})),t(this,"postMessage",(function(e,n){return c.indexOf(e)>=0?Promise.reject(new Error("".concat(e," is a protected key-method."))):new Promise((function(t,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),t(e)},reject:r,eventId:s},e,n),o=setTimeout((function(){i.messageResponse&&delete i.messageResponse[s],r(new Error("postMessage timeout"))}),i.timeout||2e4)}}))})),t(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=n,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(n,r,s){var i=this;o(this,e),t(this,"listen",(function(e){var n=i,t=function(t){if(("*"===n.origin||t.origin===n.origin)&&t.source===n.source&&t.data&&t.data[f]===p[n.type].accept&&t.data.channelId===n.channelId&&n.eventFilter(t)&&t.data.method){var r=t.data,o=r.eventId,s=r.method,i=r.payload;e(s,o,i)}};return window.addEventListener("message",t),function(){window.removeEventListener("message",t)}})),t(this,"request",(function(e,n,r){i.source&&!i.source.closed?i.source.postMessage(t(t(t(t(t({},f,p[i.type].key),"channelId",i.channelId),"eventId",n),"method",e),"payload",r),i.origin):console.error("source closed.")})),t(this,"destroy",(function(){i.type="",i.origin="",i.source=null,i.channelId="",i.eventFilter=null})),this.type=n;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,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(e){for(var n=1;n4?n.protocol:window.location.protocol,r=n.host.length?"80"===n.port||"443"===n.port?n.hostname:n.host:window.location.host;return n.origin||"".concat(t,"//").concat(r)}var E={resolveOrigin:b,getIframeServer:function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=void 0!==e?e:document.body,s=b(n),i=document.createElement("iframe");return i.name=t||"",i.classList.add.apply(i.classList,r),o.appendChild(i),i.src=n,{server:i.contentWindow||i.contentDocument.parentWindow,origin:s,frame:i}},getOpenedServer:function(e){for(var n,t=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 t=e.server,r=e.origin,o=n.eventFilter,s=void 0===o?function(){return!0}:o,i=n.timeout,a=void 0===i?2e4:i,c=n.clientInfo,u=void 0===c?{}:c,d=n.onDestroy,f=Math.random().toString().substr(3,10),p={source:t,origin:r,channelId:f};return new Promise((function(e,n){if(t&&!t.closed){var r=new v("client",p,s);(o=p,i=r,c=a,f=u,new Promise((function(e,n){var t=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(n,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("hand-shake"===n){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:t,origin:r,channelId:s,serverInfo:c.serverInfo,clientInfo:f}))}})),l=setInterval((function(){if(!t||t.closed)throw clearInterval(l),d&&d(),n(new Error("server closed.")),new Error("server closed.");if(c&&new Date-u>c)throw clearInterval(l),d&&d(),n(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(n){(function(e,n,t){var r=e.server,o=e.serverInfo,s=void 0===o?{}:o,i=e.channelId,a=new l("client",n,t),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({},n),{},{destroy:function(){r=null,d&&d(n.serverInfo,n)}}),r,a).run(e)})).catch((function(e){n(e)}))}else n(new Error("server closed"));var o,i,c,f}))},exports.createPrefixedEventName=j,exports.getIframeServer=function(e,n){const t=void 0!==e?e:document.body,r=E.resolveOrigin(n),o=M("iframe");let s;return document.querySelector(`#${o}`)?s=document.querySelector(`#${o}`):(s=document.createElement("iframe"),s.id=o,function(e,n){const t=(e="string"==typeof e?new URL(e,location):e).searchParams.get("debug");return null!==t&&(""===t||O(t))}(n)?s.style.cssText="width: 100%; height: 100%; border: 0;":(s.ariaHidden=!0,s.tabIndex=-1,s.hidden=!0,s.style.setProperty("display","none")),t.appendChild(s),s.src=n),{server:s.contentWindow||s.contentDocument.parentWindow,origin:r,iframe:s}},exports.getKeyName=M,exports.getServerMode=async function(e){const n=e.serverUrl,t=e.serverRequestTimeout||500;if(!n)return T.LOCAL;const r=new AbortController;let o,s;try{if(s=setTimeout((()=>{console.warn(`Request timed out after ${t}ms. Aborting request...`),r.abort()}),t),o=await fetch(n,{signal:r.signal}),o.ok)return T.REMOTE}catch(i){if(console.error(i),r.signal.aborted)throw new Error(`Unable to locate server page. The request timed out after ${t}ms. url: ${n.href}`);throw new Error(`Unable to locate server page : ${n.href}.`,i)}finally{clearTimeout(s)}throw new Error(`Unable to locate server page. The request failed with status code ${o.status}. url: ${n.href}`)},exports.patternMatchesOrigin=function(e,n){const t=e.replace(/[.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/[*]/g,".*");return new RegExp(`^${t}$`,"u").test(n)},exports.startListening=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.eventFilter,r=void 0===n?function(){return!0}:n,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 n,o;(n=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&&n(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(t(t(t(t({},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(n){(function(e,n,t){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},n),u=new l("server",c,t),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({},n),{},{destroy:function(){c&&c(n.clientInfo,n)}}),r,s).run(e)}))}))},exports.stringIsUrl=function(e){try{return new URL(e,location),!0}catch{return!1}}; +//# sourceMappingURL=constants-C4rB-CcV.cjs.map diff --git a/dist/constants-BgVe0aC4.cjs.map b/dist/constants-C4rB-CcV.cjs.map similarity index 99% rename from dist/constants-BgVe0aC4.cjs.map rename to dist/constants-C4rB-CcV.cjs.map index f1bc13e..f1c7a7c 100644 --- a/dist/constants-BgVe0aC4.cjs.map +++ b/dist/constants-C4rB-CcV.cjs.map @@ -1 +1 @@ -{"version":3,"file":"constants-BgVe0aC4.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 } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${name}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n CONSENT: eventName('consent'),\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\nexport const DEFAULT_PREFERENCES = {\n performanceCookies: null,\n functionalityCookies: null,\n adsCookies: null\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","EVENT_NAMES","CONSENT","READY","UPDATE","SERVER_MODE","LOCAL","REMOTE","performanceCookies","functionalityCookies","adsCookies","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","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,CAChB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A+E2CiB,MAAK,SAAU0D,IAzE1D,SAAuBC,EAAa1K,EAAaxC,GAC/C,IAAI4C,EAASsK,EAAYtK,OACvBjD,EAASuN,EAAYvN,OACrBoD,EAAYmK,EAAYnK,UACxBoK,EAAwBD,EAAY5E,WACpCA,OAAAA,IAAa6E,EAAmC,CAAA,EAAKA,EAMnDC,EAAc,IAAI9K,EAAa,SALlB,CACfM,OAAQA,EACRC,OAAQlD,EACRoD,UAAWA,GAE4CP,GACrDmH,EAAiB,IAAI9J,EAAe,SAAUuN,EAAapN,GAC3D8B,EAAU,WACR6H,IACFA,EAAe7H,UACf6H,EAAiB,MAEnByD,EAAc,KACVF,EAAYpL,SACdoL,EAAYpL,SAElB,EAEM8H,EAAU,KAQdA,OAAAA,EAAUN,aAPV,WACO3J,IAAUA,EAAOyD,SACpBzC,QAAQkJ,KAAK,kBACbT,cAAcQ,GACd9H,IAEH,GAC4B,KACtB,CACLgI,IAAK,SAAahJ,GAChBA,EAAQ,CACNiC,UAAWA,EACXuF,WAAYA,EACZjF,YAAa,WAEL0G,IAAAA,EADFJ,OAAAA,GAEMI,EAAkBJ,GAAgBtG,YAAYW,MAAM+F,EAAiB7F,WAExEhD,QAAQH,QAChB,EACDiJ,cAAe,WAEPC,IAAAA,EADFN,IAEDM,EAAmBN,GAAgBK,cAAchG,MAAMiG,EAAkB/F,UAE7E,EACDpC,QAASA,GAEZ,EAEL,EAvDA,CA0EwB0C,EAAcA,EAAc,CAAA,EAAIyI,GAAS,GAAI,CAC7DnL,QAAS,WACHyG,GACFA,EAAU0E,EAAO3E,WAAY2E,EAEhC,IAEwBzK,EAAaxC,GAAS8J,IAAIhJ,EAC3D,GACA,GACA,sBK5iBO,SAAqBuM,GAGxB,IAAA,OADA,IAAI3C,IAAI2C,EAAQpI,WAAAA,CAEpB,CACI,MAAA,OAAA,CACD,CACH","x_google_ignoreList":[0,1,2]} \ No newline at end of file +{"version":3,"file":"constants-C4rB-CcV.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 } from '../../../package.json'\nimport { createPrefixedEventName } from './utils.js'\n\nconst eventName = createPrefixedEventName('consent')\n\nexport const DB_NAME = `${name}/consent`\nexport const DB_VERSION = 1\nexport const DB_STORE_NAME = 'consent'\n\nexport const EVENT_NAMES = {\n CONSENT: eventName('consent'),\n READY: eventName('ready'),\n UPDATE: eventName('update'),\n}\nexport const PREFIX = 'bib-consent'\nexport const SERVER_MODE = {\n LOCAL: 'local',\n REMOTE: 'remote'\n}\nexport const SERVER_REQUEST_DEFAULT_TIMEOUT = 500\nexport const DEFAULT_PREFERENCES = {\n performanceCookies: null,\n functionalityCookies: null,\n adsCookies: null\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","EVENT_NAMES","CONSENT","READY","UPDATE","SERVER_MODE","LOCAL","REMOTE","performanceCookies","functionalityCookies","adsCookies","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","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,G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EAC3D,GACA,GACA,sBK5iBO,SAAqBuM,GAGxB,IAAA,OADA,IAAI3C,IAAI2C,EAAQpI,WAAAA,CAEpB,CACI,MAAA,OAAA,CACD,CACH","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/dist/constants.cjs b/dist/constants.cjs index 33883a1..be5648f 100644 --- a/dist/constants.cjs +++ b/dist/constants.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./package-DEzRsZ0U.cjs");const E=require("./constants-BgVe0aC4.cjs");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-BelR9Gue.cjs");const E=require("./constants-C4rB-CcV.cjs");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; //# sourceMappingURL=constants.cjs.map diff --git a/dist/constants.js b/dist/constants.js index 8df096f..1ad17f8 100644 --- a/dist/constants.js +++ b/dist/constants.js @@ -1,13 +1,13 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import "./package-CcUCpIoR.js"; -import { f, i, h, D, E, P, S, b } from "./constants-DMzZzv_T.js"; +import "./package-BUO2f-K0.js"; +import { f, i, h, D, E, P, S, b } from "./constants-C4fSqP7Z.js"; export { f as DB_NAME, i as DB_STORE_NAME, diff --git a/dist/directive-Ce1M5_Fy.js b/dist/directive-Ce1M5_Fy.js index 6061256..13346fa 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.13.0 + * @version 0.13.1 * @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 75f7d2c..e9f1160 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.13.0 + * @version 0.13.1 * @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 28894d7..b0d7c71 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.13.0 + * @version 0.13.1 * @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 2c0018a..81c9162 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index.cjs b/dist/index.cjs index e91daac..b488344 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/index.js b/dist/index.js index f0821d3..323eb14 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/isObjectLike-DLI4XyQI.cjs b/dist/isObjectLike-DLI4XyQI.cjs index 65469c4..15b9192 100644 --- a/dist/isObjectLike-DLI4XyQI.cjs +++ b/dist/isObjectLike-DLI4XyQI.cjs @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/isObjectLike-DmmXH0U-.js b/dist/isObjectLike-DmmXH0U-.js index 0f47e24..9b1f6b7 100644 --- a/dist/isObjectLike-DmmXH0U-.js +++ b/dist/isObjectLike-DmmXH0U-.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @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 fccf66a..5b7292f 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.13.0 + * @version 0.13.1 * @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 1686799..089fd2a 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/logger-DG93hjV0.js b/dist/logger-BEdk5hAI.js similarity index 55% rename from dist/logger-DG93hjV0.js rename to dist/logger-BEdk5hAI.js index bb2a14a..ca0db66 100644 --- a/dist/logger-DG93hjV0.js +++ b/dist/logger-BEdk5hAI.js @@ -1,18 +1,16 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { n as o } from "./package-CcUCpIoR.js"; +import { n as o } from "./package-BUO2f-K0.js"; function n(n2 = o, e = "green") { - return function() { - console.log.apply(console, [`%c[${n2}]`, `color: ${e}; font-weight: bold;`, ...arguments]); - }; + return Function.prototype.bind.call(console.log, console, `%c[${n2}]`, `color: ${e}; font-weight: bold;`); } export { n as l }; -//# sourceMappingURL=logger-DG93hjV0.js.map +//# sourceMappingURL=logger-BEdk5hAI.js.map diff --git a/dist/logger-BEdk5hAI.js.map b/dist/logger-BEdk5hAI.js.map new file mode 100644 index 0000000..9a0a8d1 --- /dev/null +++ b/dist/logger-BEdk5hAI.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logger-BEdk5hAI.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/logger-Bm71IG_Q.cjs b/dist/logger-Bm71IG_Q.cjs deleted file mode 100644 index 78f9a85..0000000 --- a/dist/logger-Bm71IG_Q.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.13.0 - * @author Christian Rémillard - * @license ISC - * @see https://github.com/bibudem/ui - */ -const o=require("./package-DEzRsZ0U.cjs");exports.loggerFactory=function(e=o.name,n="green"){return function(){console.log.apply(console,[`%c[${e}]`,`color: ${n}; font-weight: bold;`,...arguments])}}; -//# sourceMappingURL=logger-Bm71IG_Q.cjs.map diff --git a/dist/logger-Bm71IG_Q.cjs.map b/dist/logger-Bm71IG_Q.cjs.map deleted file mode 100644 index 8b10686..0000000 --- a/dist/logger-Bm71IG_Q.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger-Bm71IG_Q.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 logger() {\n console.log.apply(console, [`%c[${prefix}]`, `color: ${color}; font-weight: bold;`, ...arguments])\n }\n}"],"names":["prefix","name","color","console","log","apply","arguments"],"mappings":"gEAQO,SAAuBA,EAASC,OAAMC,EAAQ,SAEnD,OAAO,WACLC,QAAQC,IAAIC,MAAMF,QAAS,CAAC,MAAMH,KAAW,UAAUE,2BAAgCI,WACxF,CACH"} \ No newline at end of file diff --git a/dist/logger-CPFgczHL.cjs b/dist/logger-CPFgczHL.cjs new file mode 100644 index 0000000..d66efac --- /dev/null +++ b/dist/logger-CPFgczHL.cjs @@ -0,0 +1,10 @@ +/** + * Librairie du system desing des Bibliothèques de l'Université de Montréal + * @module @bibudem/ui + * @version 0.13.1 + * @author Christian Rémillard + * @license ISC + * @see https://github.com/bibudem/ui + */ +const o=require("./package-BelR9Gue.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-CPFgczHL.cjs.map diff --git a/dist/logger-CPFgczHL.cjs.map b/dist/logger-CPFgczHL.cjs.map new file mode 100644 index 0000000..03e108f --- /dev/null +++ b/dist/logger-CPFgczHL.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"logger-CPFgczHL.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-DG93hjV0.js.map b/dist/logger-DG93hjV0.js.map deleted file mode 100644 index 598943d..0000000 --- a/dist/logger-DG93hjV0.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger-DG93hjV0.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 logger() {\n console.log.apply(console, [`%c[${prefix}]`, `color: ${color}; font-weight: bold;`, ...arguments])\n }\n}"],"names":["loggerFactory","prefix","name","color","console","log","apply","arguments"],"mappings":";AAQO,SAASA,EAAcC,KAASC,GAAMC,IAAQ,SAAA;AAEnD,SAAO,WACLC;AAAAA,YAAQC,IAAIC,MAAMF,SAAS,CAAC,MAAMH,EAAAA,KAAW,UAAUE,CAAgCI,wBAAAA,GAAAA,SAAAA,CAAAA;AAAAA,EACxF;AACH;"} \ No newline at end of file diff --git a/dist/package-CcUCpIoR.js b/dist/package-BUO2f-K0.js similarity index 94% rename from dist/package-CcUCpIoR.js rename to dist/package-BUO2f-K0.js index 0e48c63..6e9d8f1 100644 --- a/dist/package-CcUCpIoR.js +++ b/dist/package-BUO2f-K0.js @@ -1,14 +1,14 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const o = "@bibudem/ui", e = { name: o, version: "0.13.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: { test: 'echo "Error: no test specified" && exit 1', 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", 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.13.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: { test: 'echo "Error: no test specified" && exit 1', 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", 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-CcUCpIoR.js.map +//# sourceMappingURL=package-BUO2f-K0.js.map diff --git a/dist/package-BUO2f-K0.js.map b/dist/package-BUO2f-K0.js.map new file mode 100644 index 0000000..0fc374c --- /dev/null +++ b/dist/package-BUO2f-K0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"package-BUO2f-K0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/dist/package-DEzRsZ0U.cjs b/dist/package-BelR9Gue.cjs similarity index 94% rename from dist/package-DEzRsZ0U.cjs rename to dist/package-BelR9Gue.cjs index 8b09018..75005d7 100644 --- a/dist/package-DEzRsZ0U.cjs +++ b/dist/package-BelR9Gue.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -const o="@bibudem/ui",e={name:o,version:"0.13.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:{test:'echo "Error: no test specified" && exit 1',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",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-DEzRsZ0U.cjs.map +const o="@bibudem/ui",e={name:o,version:"0.13.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:{test:'echo "Error: no test specified" && exit 1',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",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-BelR9Gue.cjs.map diff --git a/dist/package-BelR9Gue.cjs.map b/dist/package-BelR9Gue.cjs.map new file mode 100644 index 0000000..949a68b --- /dev/null +++ b/dist/package-BelR9Gue.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"package-BelR9Gue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/package-CcUCpIoR.js.map b/dist/package-CcUCpIoR.js.map deleted file mode 100644 index be79666..0000000 --- a/dist/package-CcUCpIoR.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package-CcUCpIoR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/dist/package-DEzRsZ0U.cjs.map b/dist/package-DEzRsZ0U.cjs.map deleted file mode 100644 index a7d7cc4..0000000 --- a/dist/package-DEzRsZ0U.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package-DEzRsZ0U.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/preferencesClient.cjs b/dist/preferencesClient.cjs index de90edf..662960b 100644 --- a/dist/preferencesClient.cjs +++ b/dist/preferencesClient.cjs @@ -1,10 +1,10 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -var e,t,s,r,i,a=Object.defineProperty,n=e=>{throw TypeError(e)},o=(e,t,s)=>((e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),h=(e,t,s)=>t.has(e)||n("Cannot "+s),c=(e,t,s)=>(h(e,t,"read from private field"),s?s.call(e):t.get(e)),l=(e,t,s)=>t.has(e)?n("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),E=(e,t,s,r)=>(h(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const d=require("./constants-BgVe0aC4.cjs"),v=require("./logger-Bm71IG_Q.cjs"),f=require("./PreferenceStorage.cjs");class g extends EventTarget{constructor(){super(),l(this,r),o(this,"_server"),o(this,"_storage"),l(this,e),l(this,t,!1),l(this,s),this.readyState="initial",this.hosts=[]}addHost({host:e,reflectEvents:t}){this.hosts.push({host:e,reflectEvents:t})}debug(){c(this,t)&&c(this,s).call(this,...arguments)}dispatchEvent(e){super.dispatchEvent(e),this.hosts.forEach((({host:t,reflectEvents:s})=>s&&t.dispatchEvent?.(e)))}addEventListener(e,t,a){if(e===d.EVENT_NAMES.READY&&"ready"===this.readyState)return c(this,s).call(this,"Firing ready event immediately since readyState is already ready"),void(n=this,o=r,l=i,h(n,o,"access private method"),l).call(this,t);var n,o,l;super.addEventListener(e,t,a)}async init({host:r,serverMode:i,serverUrl:a,serverRequestTimeout:n=d.SERVER_REQUEST_DEFAULT_TIMEOUT,reflectEvents:o=!0}){let h;if(this.serverRequestTimeout=n,r&&this.addHost({host:r,reflectEvents:o}),this.readyState="connecting",i&&i===d.SERVER_MODE.LOCAL||void 0===a||!d.stringIsUrl(a)?this.serverMode=d.SERVER_MODE.LOCAL:(this.serverUrl=new URL(a,location),r.debug&&this.serverUrl.searchParams.set("debug",""),this.serverMode=await d.getServerMode(this)),E(this,t,Reflect.has(r,"debug")),c(this,t)&&E(this,s,v.loggerFactory("preferencesClient","purple")),this.debug("init",`server mode: ${this.serverMode}`),this.serverMode===d.SERVER_MODE.REMOTE){const e=d.getIframeServer(document.body,this.serverUrl.href);c(this,s).call(this,"[remote] callServer serverObject: ",e);try{this._server=await d.callServer(e),this._server.listenMessage(((e,t)=>{c(this,s).call(this,"[remote] server.listenMessage method: ",e,"detail: ",t);const r=new CustomEvent(d.EVENT_NAMES.UPDATE,{detail:t});this.dispatchEvent(r)}))}catch(l){throw console.error("[callServer] error: ",l),l}h=await this._server.postMessage("getPreferences"),c(this,s).call(this,"[remote] Got response from server: ",h)}else this._storage=new f,await this._storage.init(),h=await this._storage.getPreferences(),c(this,s).call(this,"[local] Got response from storage: ",h);c(this,s).call(this,"[local] preferences: ",h),void 0!==h&&(this.readyState="ready",E(this,e,h),c(this,s).call(this,"dispatchEvent",d.EVENT_NAMES.READY,h),this.dispatchEvent(new CustomEvent(d.EVENT_NAMES.READY,{detail:h})))}async getPreferences(){try{return this.serverMode===d.SERVER_MODE.LOCAL?await this._storage.getPreferences():await this._server.postMessage("getPreferences")}catch(e){throw console.error("[#getPreferences]",e),e}}async setPreferences(e){try{let t;if(void 0===e&&(e=null),t=this.serverMode===d.SERVER_MODE.LOCAL?await this._storage.setPreferences(e):await this._server.postMessage("setPreferences",e),t)return this.dispatchEvent(new CustomEvent(d.EVENT_NAMES.UPDATE,{detail:t})),t}catch(t){throw console.error("[#setPreferences]",t),t}}async resetPreferences(){try{if(this.serverMode===d.SERVER_MODE.LOCAL)return await this._storage.resetPreferences();await this._server.postMessage("resetPreferences")}catch(e){throw console.error("[#resetPreferences]",e),e}}}let u;e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakSet,i=async function(e){const t=await this.getPreferences(),r=new CustomEvent(d.EVENT_NAMES.READY,{detail:t});c(this,s).call(this,"Firing ready event with preferences: ",t),e(r)},module.exports=async function(e){return u?(u.addHost(e),u):(u=new g,await u.init(e),u)}; +var e,t,s,r,i,a=Object.defineProperty,n=e=>{throw TypeError(e)},o=(e,t,s)=>((e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),h=(e,t,s)=>t.has(e)||n("Cannot "+s),c=(e,t,s)=>(h(e,t,"read from private field"),s?s.call(e):t.get(e)),d=(e,t,s)=>t.has(e)?n("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),E=(e,t,s,r)=>(h(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const l=require("./constants-C4rB-CcV.cjs"),v=require("./logger-CPFgczHL.cjs"),g=require("./PreferenceStorage.cjs");class u extends EventTarget{constructor(){super(),d(this,r),o(this,"_server"),o(this,"_storage"),d(this,e),d(this,t,!1),d(this,s),this.readyState="initial",this.hosts=[]}addHost({host:e,reflectEvents:t}){this.hosts.push({host:e,reflectEvents:t})}debug(){c(this,t)&&c(this,s).call(this,...arguments)}dispatchEvent(e){super.dispatchEvent(e),this.hosts.forEach((({host:t,reflectEvents:s})=>s&&t.dispatchEvent?.(e)))}addEventListener(e,t,s){if(e===l.EVENT_NAMES.READY&&"ready"===this.readyState)return this.debug("Firing ready event immediately since readyState is already ready"),void(a=this,n=r,o=i,h(a,n,"access private method"),o).call(this,t);var a,n,o;super.addEventListener(e,t,s)}async init({host:r,serverMode:i,serverUrl:a,serverRequestTimeout:n=l.SERVER_REQUEST_DEFAULT_TIMEOUT,reflectEvents:o=!0}){let h;if(this.serverRequestTimeout=n,r&&this.addHost({host:r,reflectEvents:o}),this.readyState="connecting",i&&i===l.SERVER_MODE.LOCAL||void 0===a||!l.stringIsUrl(a)?this.serverMode=l.SERVER_MODE.LOCAL:(this.serverUrl=new URL(a,location),r.debug&&this.serverUrl.searchParams.set("debug",""),this.serverMode=await l.getServerMode(this)),E(this,t,!!r.debug),c(this,t)&&E(this,s,v.loggerFactory("preferencesClient","purple")),this.debug("init",`server mode: ${this.serverMode}`),this.serverMode===l.SERVER_MODE.REMOTE){const e=l.getIframeServer(document.body,this.serverUrl.href);this.debug("[remote] callServer serverObject: ",e);try{this._server=await l.callServer(e),this._server.listenMessage(((e,t)=>{this.debug("[remote] server.listenMessage method: ",e,"detail: ",t);const s=new CustomEvent(l.EVENT_NAMES.UPDATE,{detail:t});this.dispatchEvent(s)}))}catch(d){throw console.error("[callServer] error: ",d),d}h=await this._server.postMessage("getPreferences"),this.debug("[remote] Got response from server: ",h)}else this._storage=new g,await this._storage.init(),h=await this._storage.getPreferences(),this.debug("[local] Got response from storage: ",h);this.debug("[local] preferences: ",h),void 0!==h&&(this.readyState="ready",E(this,e,h),this.debug("dispatchEvent",l.EVENT_NAMES.READY,h),this.dispatchEvent(new CustomEvent(l.EVENT_NAMES.READY,{detail:h})))}async getPreferences(){try{return this.serverMode===l.SERVER_MODE.LOCAL?await this._storage.getPreferences():await this._server.postMessage("getPreferences")}catch(e){throw console.error("[#getPreferences]",e),e}}async setPreferences(e){try{let t;if(void 0===e&&(e=null),t=this.serverMode===l.SERVER_MODE.LOCAL?await this._storage.setPreferences(e):await this._server.postMessage("setPreferences",e),t)return this.dispatchEvent(new CustomEvent(l.EVENT_NAMES.UPDATE,{detail:t})),t}catch(t){throw console.error("[#setPreferences]",t),t}}async resetPreferences(){try{if(this.serverMode===l.SERVER_MODE.LOCAL)return await this._storage.resetPreferences();await this._server.postMessage("resetPreferences")}catch(e){throw console.error("[#resetPreferences]",e),e}}}let f;e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakSet,i=async function(e){const t=await this.getPreferences(),s=new CustomEvent(l.EVENT_NAMES.READY,{detail:t});this.debug("Firing ready event with preferences: ",t),e(s)},module.exports=async function(e){return f?(f.addHost(e),f):(f=new u,await f.init(e),f)}; //# sourceMappingURL=preferencesClient.cjs.map diff --git a/dist/preferencesClient.cjs.map b/dist/preferencesClient.cjs.map index beea6fd..b75713b 100644 --- a/dist/preferencesClient.cjs.map +++ b/dist/preferencesClient.cjs.map @@ -1 +1 @@ -{"version":3,"file":"preferencesClient.cjs","sources":["../src/components/bib-consent/preferencesClient.js"],"sourcesContent":["import { callServer } from 'postmessage-promise'\nimport { stringIsUrl } from '@/utils/url.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport PreferenceStorage from './PreferenceStorage.js'\nimport { getIframeServer, getServerMode } from './utils.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Represents a client for managing user preferences, with the ability to interact with a remote server or local storage.\n *\n * The `PreferencesClient` class extends the `EventTarget` class, allowing it to dispatch events related to preference updates.\n *\n * Key features:\n * - Initialization with options for server mode (local or remote), server URL, and event reflection.\n * - Ability to add hosts that will receive preference update events.\n * - Debugging functionality with configurable debug mode.\n * - Methods to set, get, and reset user preferences, with different behavior based on server mode.\n *\n * @property {string} readyState - The current state of the PreferencesClient instance. Can be 'initial', 'connecting' or 'ready'.\n */\nclass PreferencesClient extends EventTarget {\n _server\n _storage\n #preferences\n #debugIsOn = false\n #debug\n\n constructor() {\n super()\n this.readyState = 'initial'\n this.hosts = []\n }\n\n addHost({ host, reflectEvents }) {\n this.hosts.push({ host, reflectEvents })\n }\n\n debug() {\n if (this.#debugIsOn) {\n this.#debug(...arguments)\n }\n }\n\n dispatchEvent(event) {\n super.dispatchEvent(event)\n this.hosts.forEach(({ host, reflectEvents }) => reflectEvents && host.dispatchEvent?.(event))\n }\n\n /**\n * Adds an event listener to the PreferencesClient instance.\n *\n * If the event type is `EVENT_NAMES.READY` and the `readyState` is already `'ready'`, the listener function is called immediately with the current preferences object as the event detail.\n *\n * Otherwise, the event listener is added using the standard `addEventListener` method.\n *\n * @param {string} type - The type of event to listen for.\n * @param {EventListener} listener - The function to call when the event is dispatched.\n * @param {EventListenerOptions} [options] - Options for the event listener.\n */\n addEventListener(type, listener, options) {\n if (type === EVENT_NAMES.READY && this.readyState === 'ready') {\n this.#debug('Firing ready event immediately since readyState is already ready')\n this.#fireReadyListener(listener)\n return\n }\n\n super.addEventListener(type, listener, options)\n }\n\n async #fireReadyListener(listener) {\n const preferences = await this.getPreferences()\n const readyEvent = new CustomEvent(EVENT_NAMES.READY, { detail: preferences })\n this.#debug('Firing ready event with preferences: ', preferences)\n listener(readyEvent)\n }\n\n /**\n * Initializes the PreferencesClient instance with the provided options.\n *\n * @param {Object} options - The initialization options.\n * @param {Object} [options.host] - The host object that will receive preference update events.\n * @param {string} [options.serverMode] - The server mode, either 'LOCAL' or 'REMOTE'.\n * @param {string} [options.serverUrl] - The URL of the remote server.\n * @param {number} [options.serverRequestTimeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout for server requests in milliseconds.\n * @param {boolean} [options.reflectEvents=true] - Whether to reflect preference update events to the host.\n * @returns {Promise} - A promise that resolves when initialization is complete.\n *\n * @event EVENT_NAMES.READY - Dispatched when the initial preferences data is available. The event detail contains the preferences object.\n * @event EVENT_NAMES.UPDATE - Dispatched when the preferences are updated. The event detail contains the updated preferences object.\n */\n\n async init({ host, serverMode, serverUrl, serverRequestTimeout = SERVER_REQUEST_DEFAULT_TIMEOUT, reflectEvents = true }) {\n this.serverRequestTimeout = serverRequestTimeout\n\n if (host) {\n this.addHost({ host, reflectEvents })\n }\n\n this.readyState = 'connecting'\n\n if (\n (\n serverMode && serverMode === SERVER_MODE.LOCAL\n )\n ||\n typeof serverUrl === 'undefined'\n ||\n !stringIsUrl(serverUrl)\n ) {\n this.serverMode = SERVER_MODE.LOCAL\n } else {\n this.serverUrl = new URL(serverUrl, location)\n\n if (host.debug) {\n this.serverUrl.searchParams.set('debug', '')\n }\n\n this.serverMode = await getServerMode(this)\n\n }\n\n this.#debugIsOn = Reflect.has(host, 'debug')\n\n if (this.#debugIsOn) {\n this.#debug = loggerFactory('preferencesClient', 'purple')\n }\n\n this.debug('init', `server mode: ${this.serverMode}`)\n\n let preferences\n\n if (this.serverMode === SERVER_MODE.REMOTE) {\n const serverObject = getIframeServer(document.body, this.serverUrl.href)\n\n this.#debug('[remote] callServer serverObject: ', serverObject)\n\n try {\n this._server = await callServer(serverObject)\n\n this._server.listenMessage((method, detail) => {\n this.#debug('[remote] server.listenMessage method: ', method, 'detail: ', detail)\n const event = new CustomEvent(EVENT_NAMES.UPDATE, { detail })\n this.dispatchEvent(event)\n })\n } catch (error) {\n console.error('[callServer] error: ', error)\n throw error\n }\n\n preferences = await this._server.postMessage('getPreferences')\n this.#debug('[remote] Got response from server: ', preferences)\n\n } else {\n this._storage = new PreferenceStorage()\n\n await this._storage.init()\n\n preferences = await this._storage.getPreferences()\n this.#debug('[local] Got response from storage: ', preferences)\n }\n\n this.#debug('[local] preferences: ', preferences)\n\n if (preferences !== undefined) {\n\n // Dispatch initial data with the ready state.\n this.readyState = 'ready'\n this.#preferences = preferences\n\n this.#debug('dispatchEvent', EVENT_NAMES.READY, preferences)\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.READY, { detail: preferences }))\n }\n }\n\n /**\n * Gets the user's preferences from either the local storage or the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves with the user's preferences, or rejects with an error if the operation fails.\n */\n async getPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.getPreferences()\n } else {\n return await this._server.postMessage('getPreferences')\n }\n } catch (error) {\n console.error('[#getPreferences]', error)\n throw error\n }\n }\n\n /**\n * Sets the user's preferences in either the local storage or the remote server, depending on the configured server mode.\n *\n * @param {Object|null} preferences - The preferences object to be set. If null, it will reset the user's preferences.\n * @returns {Promise} - A promise that resolves when the preferences have been set or reset, or rejects with an error if the operation fails.\n */\n async setPreferences(preferences) {\n try {\n let response\n\n // When there is no preferences object, this is a reset of the user's preferences, so set it to null.\n if (typeof preferences === 'undefined') {\n preferences = null\n }\n\n if (this.serverMode === SERVER_MODE.LOCAL) {\n response = await this._storage.setPreferences(preferences)\n } else {\n response = await this._server.postMessage('setPreferences', preferences)\n }\n\n if (response) {\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: response }))\n return response\n }\n } catch (error) {\n console.error('[#setPreferences]', error)\n throw error\n }\n }\n\n /**\n * Resets the user's preferences by clearing the stored preferences data, either in the local storage or on the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves when the preferences have been reset, or rejects with an error if the reset operation fails.\n */\n async resetPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.resetPreferences()\n } else {\n await this._server.postMessage('resetPreferences')\n }\n } catch (error) {\n console.error('[#resetPreferences]', error)\n throw error\n }\n }\n}\n\nlet preferencesClient\n\n/**\n * Creates a new PreferencesClient instance and initializes it with the provided options.\n *\n * If a PreferencesClient instance already exists, it will add the provided host to the existing instance and return it.\n *\n * @param {Object} options - The options to initialize the PreferencesClient with.\n * @returns {Promise} - A Promise that resolves to the PreferencesClient instance.\n */\nexport default async function createPreferencesClient(options) {\n if (preferencesClient) {\n preferencesClient.addHost(options)\n\n return preferencesClient\n }\n\n preferencesClient = new PreferencesClient()\n await preferencesClient.init(options)\n\n return preferencesClient\n}"],"names":["PreferencesClient","EventTarget","constructor","super","__privateAdd","this","_r_instances","_server","_storage","preferences","debugIsOn","debug","readyState","hosts","addHost","host","reflectEvents","push","arguments","dispatchEvent","event","forEach","addEventListener","type","listener","options","EVENT_NAMES","READY","fireReadyListener","init","serverMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","SERVER_MODE","LOCAL","stringIsUrl","URL","location","searchParams","set","getServerMode","Reflect","has","loggerFactory","REMOTE","serverObject","getIframeServer","document","body","href","callServer","listenMessage","method","detail","CustomEvent","UPDATE","error","console","postMessage","PreferenceStorage","getPreferences","undefined","response","setPreferences","resetPreferences","preferencesClient","WeakSet","readyEvent","async"],"mappings":"ulBAoBA,MAAMA,UAA0BC,YAO9B,WAAAC,GACEC,QARJC,EAAAC,KAAAC,GACEC,EAAAA,KAAAA,WACAC,EAAAA,KAAAA,YACAC,EAAAA,KAAAA,GACAC,EAAAA,KAAAA,GAAAA,GACAC,EAAAA,KAAAA,GAIEN,KAAKO,WAAa,UAClBP,KAAKQ,MAAQ,EACd,CAED,OAAAC,EAAQC,KAAEA,EAAIC,cAAEA,IACdX,KAAKQ,MAAMI,KAAK,CAAEF,KAAAA,EAAMC,iBACzB,CAED,KAAAL,GACMN,EAAAA,KAAAA,IACFA,EAAAA,KAAAA,GAAAA,KAAAA,QAAea,UAElB,CAED,aAAAC,CAAcC,GACZjB,MAAMgB,cAAcC,GACpBf,KAAKQ,MAAMQ,SAAQ,EAAGN,OAAMC,cAAoBA,KAAAA,GAAiBD,EAAKI,gBAAgBC,IACvF,CAaD,gBAAAE,CAAiBC,EAAMC,EAAUC,GAC/B,GAAIF,IAASG,EAAAA,YAAYC,OAA6B,UAApBtB,KAAKO,WACrCP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BA,GAC/BA,CACP,CACF,EAGH,IAAIS,EA3NFzD,EAAAA,IAAAA,QACAC,EAAAA,IAAAA,QACAC,EAAAA,IAAAA,QALFL,EAAA,IAAA6D,QAiDQvC,EAAAA,eAAmBJ,GACvB,MAAMf,QAAoBJ,KAAKwD,iBACzBO,EAAa,IAAIb,YAAY7B,EAAAA,YAAYC,MAAO,CAAE2B,OAAQ7C,IAChEJ,EAAAA,QAAAA,KAAAA,KAAY,wCAAyCI,GACrDe,EAAS4C,EACV,iBAkLYC,eAAuC5C,GACpD,OAAIyC,GACFA,EAAkBpD,QAAQW,GAEnByC,IAGTA,EAAoB,IAAIlE,QAClBkE,EAAkBrC,KAAKJ,GAEtByC,EACT"} \ No newline at end of file +{"version":3,"file":"preferencesClient.cjs","sources":["../src/components/bib-consent/preferencesClient.js"],"sourcesContent":["import { callServer } from 'postmessage-promise'\nimport { stringIsUrl } from '@/utils/url.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport PreferenceStorage from './PreferenceStorage.js'\nimport { getIframeServer, getServerMode } from './utils.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Represents a client for managing user preferences, with the ability to interact with a remote server or local storage.\n *\n * The `PreferencesClient` class extends the `EventTarget` class, allowing it to dispatch events related to preference updates.\n *\n * Key features:\n * - Initialization with options for server mode (local or remote), server URL, and event reflection.\n * - Ability to add hosts that will receive preference update events.\n * - Debugging functionality with configurable debug mode.\n * - Methods to set, get, and reset user preferences, with different behavior based on server mode.\n *\n * @property {string} readyState - The current state of the PreferencesClient instance. Can be 'initial', 'connecting' or 'ready'.\n */\nclass PreferencesClient extends EventTarget {\n _server\n _storage\n #preferences\n #debugIsOn = false\n #debug\n\n constructor() {\n super()\n this.readyState = 'initial'\n this.hosts = []\n }\n\n addHost({ host, reflectEvents }) {\n this.hosts.push({ host, reflectEvents })\n }\n\n debug() {\n if (this.#debugIsOn) {\n this.#debug(...arguments)\n }\n }\n\n dispatchEvent(event) {\n super.dispatchEvent(event)\n this.hosts.forEach(({ host, reflectEvents }) => reflectEvents && host.dispatchEvent?.(event))\n }\n\n /**\n * Adds an event listener to the PreferencesClient instance.\n *\n * If the event type is `EVENT_NAMES.READY` and the `readyState` is already `'ready'`, the listener function is called immediately with the current preferences object as the event detail.\n *\n * Otherwise, the event listener is added using the standard `addEventListener` method.\n *\n * @param {string} type - The type of event to listen for.\n * @param {EventListener} listener - The function to call when the event is dispatched.\n * @param {EventListenerOptions} [options] - Options for the event listener.\n */\n addEventListener(type, listener, options) {\n if (type === EVENT_NAMES.READY && this.readyState === 'ready') {\n this.debug('Firing ready event immediately since readyState is already ready')\n this.#fireReadyListener(listener)\n return\n }\n\n super.addEventListener(type, listener, options)\n }\n\n async #fireReadyListener(listener) {\n const preferences = await this.getPreferences()\n const readyEvent = new CustomEvent(EVENT_NAMES.READY, { detail: preferences })\n this.debug('Firing ready event with preferences: ', preferences)\n listener(readyEvent)\n }\n\n /**\n * Initializes the PreferencesClient instance with the provided options.\n *\n * @param {Object} options - The initialization options.\n * @param {Object} [options.host] - The host object that will receive preference update events.\n * @param {string} [options.serverMode] - The server mode, either 'LOCAL' or 'REMOTE'.\n * @param {string} [options.serverUrl] - The URL of the remote server.\n * @param {number} [options.serverRequestTimeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout for server requests in milliseconds.\n * @param {boolean} [options.reflectEvents=true] - Whether to reflect preference update events to the host.\n * @returns {Promise} - A promise that resolves when initialization is complete.\n *\n * @event EVENT_NAMES.READY - Dispatched when the initial preferences data is available. The event detail contains the preferences object.\n * @event EVENT_NAMES.UPDATE - Dispatched when the preferences are updated. The event detail contains the updated preferences object.\n */\n\n async init({ host, serverMode, serverUrl, serverRequestTimeout = SERVER_REQUEST_DEFAULT_TIMEOUT, reflectEvents = true }) {\n this.serverRequestTimeout = serverRequestTimeout\n\n if (host) {\n this.addHost({ host, reflectEvents })\n }\n\n this.readyState = 'connecting'\n\n if (\n (\n serverMode && serverMode === SERVER_MODE.LOCAL\n )\n ||\n typeof serverUrl === 'undefined'\n ||\n !stringIsUrl(serverUrl)\n ) {\n this.serverMode = SERVER_MODE.LOCAL\n } else {\n this.serverUrl = new URL(serverUrl, location)\n\n if (host.debug) {\n this.serverUrl.searchParams.set('debug', '')\n }\n\n this.serverMode = await getServerMode(this)\n\n }\n\n this.#debugIsOn = !!host.debug\n\n if (this.#debugIsOn) {\n this.#debug = loggerFactory('preferencesClient', 'purple')\n }\n\n this.debug('init', `server mode: ${this.serverMode}`)\n\n let preferences\n\n if (this.serverMode === SERVER_MODE.REMOTE) {\n const serverObject = getIframeServer(document.body, this.serverUrl.href)\n\n this.debug('[remote] callServer serverObject: ', serverObject)\n\n try {\n this._server = await callServer(serverObject)\n\n this._server.listenMessage((method, detail) => {\n this.debug('[remote] server.listenMessage method: ', method, 'detail: ', detail)\n const event = new CustomEvent(EVENT_NAMES.UPDATE, { detail })\n this.dispatchEvent(event)\n })\n } catch (error) {\n console.error('[callServer] error: ', error)\n throw error\n }\n\n preferences = await this._server.postMessage('getPreferences')\n this.debug('[remote] Got response from server: ', preferences)\n\n } else {\n this._storage = new PreferenceStorage()\n\n await this._storage.init()\n\n preferences = await this._storage.getPreferences()\n this.debug('[local] Got response from storage: ', preferences)\n }\n\n this.debug('[local] preferences: ', preferences)\n\n if (preferences !== undefined) {\n\n // Dispatch initial data with the ready state.\n this.readyState = 'ready'\n this.#preferences = preferences\n\n this.debug('dispatchEvent', EVENT_NAMES.READY, preferences)\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.READY, { detail: preferences }))\n }\n }\n\n /**\n * Gets the user's preferences from either the local storage or the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves with the user's preferences, or rejects with an error if the operation fails.\n */\n async getPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.getPreferences()\n } else {\n return await this._server.postMessage('getPreferences')\n }\n } catch (error) {\n console.error('[#getPreferences]', error)\n throw error\n }\n }\n\n /**\n * Sets the user's preferences in either the local storage or the remote server, depending on the configured server mode.\n *\n * @param {Object|null} preferences - The preferences object to be set. If null, it will reset the user's preferences.\n * @returns {Promise} - A promise that resolves when the preferences have been set or reset, or rejects with an error if the operation fails.\n */\n async setPreferences(preferences) {\n try {\n let response\n\n // When there is no preferences object, this is a reset of the user's preferences, so set it to null.\n if (typeof preferences === 'undefined') {\n preferences = null\n }\n\n if (this.serverMode === SERVER_MODE.LOCAL) {\n response = await this._storage.setPreferences(preferences)\n } else {\n response = await this._server.postMessage('setPreferences', preferences)\n }\n\n if (response) {\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: response }))\n return response\n }\n } catch (error) {\n console.error('[#setPreferences]', error)\n throw error\n }\n }\n\n /**\n * Resets the user's preferences by clearing the stored preferences data, either in the local storage or on the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves when the preferences have been reset, or rejects with an error if the reset operation fails.\n */\n async resetPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.resetPreferences()\n } else {\n await this._server.postMessage('resetPreferences')\n }\n } catch (error) {\n console.error('[#resetPreferences]', error)\n throw error\n }\n }\n}\n\nlet preferencesClient\n\n/**\n * Creates a new PreferencesClient instance and initializes it with the provided options.\n *\n * If a PreferencesClient instance already exists, it will add the provided host to the existing instance and return it.\n *\n * @param {Object} options - The options to initialize the PreferencesClient with.\n * @returns {Promise} - A Promise that resolves to the PreferencesClient instance.\n */\nexport default async function createPreferencesClient(options) {\n if (preferencesClient) {\n preferencesClient.addHost(options)\n\n return preferencesClient\n }\n\n preferencesClient = new PreferencesClient()\n await preferencesClient.init(options)\n\n return preferencesClient\n}"],"names":["PreferencesClient","EventTarget","constructor","super","__privateAdd","this","_r_instances","_server","_storage","preferences","debugIsOn","debug","readyState","hosts","addHost","host","reflectEvents","push","t","arguments","dispatchEvent","event","forEach","addEventListener","type","listener","options","EVENT_NAMES","READY","init","serverMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","SERVER_MODE","LOCAL","stringIsUrl","URL","location","searchParams","set","getServerMode","loggerFactory","REMOTE","serverObject","getIframeServer","document","body","href","callServer","listenMessage","method","detail","CustomEvent","UPDATE","error","console","postMessage","PreferenceStorage","getPreferences","setPreferences","response","resetPreferences","preferencesClient","WeakSet","r_fn","fireReadyListener","readyEvent","async"],"mappings":"ulBAoBA,MAAMA,UAA0BC,YAO9B,WAAAC,GACEC,QARJC,EAAAC,KAAAC,GACEC,EAAAA,KAAAA,WACAC,EAAAA,KAAAA,YACAC,EAAAA,KAAAA,GACAC,EAAAA,KAAAA,GAAAA,GACAC,EAAAA,KAAAA,GAIEN,KAAKO,WAAa,UAClBP,KAAKQ,MAAQ,EACd,CAED,OAAAC,EAAQC,KAAEA,EAAIC,cAAEA,IACdX,KAAKQ,MAAMI,KAAK,CAAEF,OAAMC,cACzBE,GAAA,CAED,KAAAP,GACMN,EAAAA,KAAKK,IACPL,EAAAA,QAAAA,KAAAA,QAAec,UAElB,CAED,aAAAC,CAAcC,GACZlB,MAAMiB,cAAcC,GACpBhB,KAAKQ,MAAMS,SAAQ,EAAGP,KAAMC,EAAAA,cAAAA,KAAoBA,GAAiBD,EAAKK,gBAAgBC,IACvF,CAaD,gBAAAE,CAAiBC,EAAMC,EAAUC,GAC/B,GAAIF,IAASG,EAAAA,YAAYC,OAA6B,UAApBvB,KAAKO,WACrCP,OAAAA,KAAKM,MAAM,2EACXN,OAAAA,wCAAAA,KAAwBoB,KAAAA,aAIpBF,MAAAA,iBAAiBC,EAAMC,EAAUC,EACxC,CAwBD,UAAAG,EAAWd,KAAEA,EAAIe,WAAEA,EAAUC,UAAEA,EAASC,qBAAEA,EAAuBC,EAA8BA,+BAAAjB,cAAEA,GAAgB,IAsC3GP,IAAAA,EAEJ,GAvCAJ,KAAK2B,qBAAuBA,EAExBjB,GACFV,KAAKS,QAAQ,CAAEC,KAAAA,EAAMC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C,EACT"} \ No newline at end of file diff --git a/dist/preferencesClient.js b/dist/preferencesClient.js index f1adcc9..14906fa 100644 --- a/dist/preferencesClient.js +++ b/dist/preferencesClient.js @@ -1,7 +1,7 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @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, _s, _d_instances, r_fn; -import { E as e, S as t, s, g as r, a as i, c as a, b as n } from "./constants-DMzZzv_T.js"; -import { l as o } from "./logger-DG93hjV0.js"; +import { E as e, S as t, s, g as r, a as i, c as a, b as n } from "./constants-C4fSqP7Z.js"; +import { l as o } from "./logger-BEdk5hAI.js"; import h from "./PreferenceStorage.js"; class d extends EventTarget { constructor() { @@ -42,26 +42,26 @@ class d extends EventTarget { super.dispatchEvent(e2), this.hosts.forEach(({ host: t2, reflectEvents: s2 }) => s2 && t2.dispatchEvent?.(e2)); } addEventListener(t2, s2, r2) { - if (t2 === e.READY && "ready" === this.readyState) return __privateGet(this, _s).call(this, "Firing ready event immediately since readyState is already ready"), void __privateMethod(this, _d_instances, r_fn).call(this, s2); + if (t2 === e.READY && "ready" === this.readyState) return this.debug("Firing ready event immediately since readyState is already ready"), void __privateMethod(this, _d_instances, r_fn).call(this, s2); super.addEventListener(t2, s2, r2); } async init({ host: d2, serverMode: c2, serverUrl: v2, serverRequestTimeout: g = n, reflectEvents: l = true }) { let u; - if (this.serverRequestTimeout = g, d2 && this.addHost({ host: d2, reflectEvents: l }), this.readyState = "connecting", c2 && c2 === t.LOCAL || void 0 === v2 || !s(v2) ? this.serverMode = t.LOCAL : (this.serverUrl = new URL(v2, location), d2.debug && this.serverUrl.searchParams.set("debug", ""), this.serverMode = await r(this)), __privateSet(this, _t, Reflect.has(d2, "debug")), __privateGet(this, _t) && __privateSet(this, _s, o("preferencesClient", "purple")), this.debug("init", `server mode: ${this.serverMode}`), this.serverMode === t.REMOTE) { + if (this.serverRequestTimeout = g, d2 && this.addHost({ host: d2, reflectEvents: l }), this.readyState = "connecting", c2 && c2 === t.LOCAL || void 0 === v2 || !s(v2) ? this.serverMode = t.LOCAL : (this.serverUrl = new URL(v2, location), d2.debug && this.serverUrl.searchParams.set("debug", ""), this.serverMode = await r(this)), __privateSet(this, _t, !!d2.debug), __privateGet(this, _t) && __privateSet(this, _s, o("preferencesClient", "purple")), this.debug("init", `server mode: ${this.serverMode}`), this.serverMode === t.REMOTE) { const t2 = i(document.body, this.serverUrl.href); - __privateGet(this, _s).call(this, "[remote] callServer serverObject: ", t2); + this.debug("[remote] callServer serverObject: ", t2); try { this._server = await a(t2), this._server.listenMessage((t3, s2) => { - __privateGet(this, _s).call(this, "[remote] server.listenMessage method: ", t3, "detail: ", s2); + this.debug("[remote] server.listenMessage method: ", t3, "detail: ", s2); const r2 = new CustomEvent(e.UPDATE, { detail: s2 }); this.dispatchEvent(r2); }); } catch (e2) { throw console.error("[callServer] error: ", e2), e2; } - u = await this._server.postMessage("getPreferences"), __privateGet(this, _s).call(this, "[remote] Got response from server: ", u); - } else this._storage = new h(), await this._storage.init(), u = await this._storage.getPreferences(), __privateGet(this, _s).call(this, "[local] Got response from storage: ", u); - __privateGet(this, _s).call(this, "[local] preferences: ", u), void 0 !== u && (this.readyState = "ready", __privateSet(this, _e, u), __privateGet(this, _s).call(this, "dispatchEvent", e.READY, u), this.dispatchEvent(new CustomEvent(e.READY, { detail: u }))); + u = await this._server.postMessage("getPreferences"), this.debug("[remote] Got response from server: ", u); + } else this._storage = new h(), await this._storage.init(), u = await this._storage.getPreferences(), this.debug("[local] Got response from storage: ", u); + this.debug("[local] preferences: ", u), void 0 !== u && (this.readyState = "ready", __privateSet(this, _e, u), this.debug("dispatchEvent", e.READY, u), this.dispatchEvent(new CustomEvent(e.READY, { detail: u }))); } async getPreferences() { try { @@ -93,7 +93,7 @@ _s = new WeakMap(); _d_instances = new WeakSet(); r_fn = async function(t2) { const s2 = await this.getPreferences(), r2 = new CustomEvent(e.READY, { detail: s2 }); - __privateGet(this, _s).call(this, "Firing ready event with preferences: ", s2), t2(r2); + this.debug("Firing ready event with preferences: ", s2), t2(r2); }; let c; async function v(e2) { diff --git a/dist/preferencesClient.js.map b/dist/preferencesClient.js.map index 965070f..7ee4b09 100644 --- a/dist/preferencesClient.js.map +++ b/dist/preferencesClient.js.map @@ -1 +1 @@ -{"version":3,"file":"preferencesClient.js","sources":["../src/components/bib-consent/preferencesClient.js"],"sourcesContent":["import { callServer } from 'postmessage-promise'\nimport { stringIsUrl } from '@/utils/url.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport PreferenceStorage from './PreferenceStorage.js'\nimport { getIframeServer, getServerMode } from './utils.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Represents a client for managing user preferences, with the ability to interact with a remote server or local storage.\n *\n * The `PreferencesClient` class extends the `EventTarget` class, allowing it to dispatch events related to preference updates.\n *\n * Key features:\n * - Initialization with options for server mode (local or remote), server URL, and event reflection.\n * - Ability to add hosts that will receive preference update events.\n * - Debugging functionality with configurable debug mode.\n * - Methods to set, get, and reset user preferences, with different behavior based on server mode.\n *\n * @property {string} readyState - The current state of the PreferencesClient instance. Can be 'initial', 'connecting' or 'ready'.\n */\nclass PreferencesClient extends EventTarget {\n _server\n _storage\n #preferences\n #debugIsOn = false\n #debug\n\n constructor() {\n super()\n this.readyState = 'initial'\n this.hosts = []\n }\n\n addHost({ host, reflectEvents }) {\n this.hosts.push({ host, reflectEvents })\n }\n\n debug() {\n if (this.#debugIsOn) {\n this.#debug(...arguments)\n }\n }\n\n dispatchEvent(event) {\n super.dispatchEvent(event)\n this.hosts.forEach(({ host, reflectEvents }) => reflectEvents && host.dispatchEvent?.(event))\n }\n\n /**\n * Adds an event listener to the PreferencesClient instance.\n *\n * If the event type is `EVENT_NAMES.READY` and the `readyState` is already `'ready'`, the listener function is called immediately with the current preferences object as the event detail.\n *\n * Otherwise, the event listener is added using the standard `addEventListener` method.\n *\n * @param {string} type - The type of event to listen for.\n * @param {EventListener} listener - The function to call when the event is dispatched.\n * @param {EventListenerOptions} [options] - Options for the event listener.\n */\n addEventListener(type, listener, options) {\n if (type === EVENT_NAMES.READY && this.readyState === 'ready') {\n this.#debug('Firing ready event immediately since readyState is already ready')\n this.#fireReadyListener(listener)\n return\n }\n\n super.addEventListener(type, listener, options)\n }\n\n async #fireReadyListener(listener) {\n const preferences = await this.getPreferences()\n const readyEvent = new CustomEvent(EVENT_NAMES.READY, { detail: preferences })\n this.#debug('Firing ready event with preferences: ', preferences)\n listener(readyEvent)\n }\n\n /**\n * Initializes the PreferencesClient instance with the provided options.\n *\n * @param {Object} options - The initialization options.\n * @param {Object} [options.host] - The host object that will receive preference update events.\n * @param {string} [options.serverMode] - The server mode, either 'LOCAL' or 'REMOTE'.\n * @param {string} [options.serverUrl] - The URL of the remote server.\n * @param {number} [options.serverRequestTimeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout for server requests in milliseconds.\n * @param {boolean} [options.reflectEvents=true] - Whether to reflect preference update events to the host.\n * @returns {Promise} - A promise that resolves when initialization is complete.\n *\n * @event EVENT_NAMES.READY - Dispatched when the initial preferences data is available. The event detail contains the preferences object.\n * @event EVENT_NAMES.UPDATE - Dispatched when the preferences are updated. The event detail contains the updated preferences object.\n */\n\n async init({ host, serverMode, serverUrl, serverRequestTimeout = SERVER_REQUEST_DEFAULT_TIMEOUT, reflectEvents = true }) {\n this.serverRequestTimeout = serverRequestTimeout\n\n if (host) {\n this.addHost({ host, reflectEvents })\n }\n\n this.readyState = 'connecting'\n\n if (\n (\n serverMode && serverMode === SERVER_MODE.LOCAL\n )\n ||\n typeof serverUrl === 'undefined'\n ||\n !stringIsUrl(serverUrl)\n ) {\n this.serverMode = SERVER_MODE.LOCAL\n } else {\n this.serverUrl = new URL(serverUrl, location)\n\n if (host.debug) {\n this.serverUrl.searchParams.set('debug', '')\n }\n\n this.serverMode = await getServerMode(this)\n\n }\n\n this.#debugIsOn = Reflect.has(host, 'debug')\n\n if (this.#debugIsOn) {\n this.#debug = loggerFactory('preferencesClient', 'purple')\n }\n\n this.debug('init', `server mode: ${this.serverMode}`)\n\n let preferences\n\n if (this.serverMode === SERVER_MODE.REMOTE) {\n const serverObject = getIframeServer(document.body, this.serverUrl.href)\n\n this.#debug('[remote] callServer serverObject: ', serverObject)\n\n try {\n this._server = await callServer(serverObject)\n\n this._server.listenMessage((method, detail) => {\n this.#debug('[remote] server.listenMessage method: ', method, 'detail: ', detail)\n const event = new CustomEvent(EVENT_NAMES.UPDATE, { detail })\n this.dispatchEvent(event)\n })\n } catch (error) {\n console.error('[callServer] error: ', error)\n throw error\n }\n\n preferences = await this._server.postMessage('getPreferences')\n this.#debug('[remote] Got response from server: ', preferences)\n\n } else {\n this._storage = new PreferenceStorage()\n\n await this._storage.init()\n\n preferences = await this._storage.getPreferences()\n this.#debug('[local] Got response from storage: ', preferences)\n }\n\n this.#debug('[local] preferences: ', preferences)\n\n if (preferences !== undefined) {\n\n // Dispatch initial data with the ready state.\n this.readyState = 'ready'\n this.#preferences = preferences\n\n this.#debug('dispatchEvent', EVENT_NAMES.READY, preferences)\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.READY, { detail: preferences }))\n }\n }\n\n /**\n * Gets the user's preferences from either the local storage or the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves with the user's preferences, or rejects with an error if the operation fails.\n */\n async getPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.getPreferences()\n } else {\n return await this._server.postMessage('getPreferences')\n }\n } catch (error) {\n console.error('[#getPreferences]', error)\n throw error\n }\n }\n\n /**\n * Sets the user's preferences in either the local storage or the remote server, depending on the configured server mode.\n *\n * @param {Object|null} preferences - The preferences object to be set. If null, it will reset the user's preferences.\n * @returns {Promise} - A promise that resolves when the preferences have been set or reset, or rejects with an error if the operation fails.\n */\n async setPreferences(preferences) {\n try {\n let response\n\n // When there is no preferences object, this is a reset of the user's preferences, so set it to null.\n if (typeof preferences === 'undefined') {\n preferences = null\n }\n\n if (this.serverMode === SERVER_MODE.LOCAL) {\n response = await this._storage.setPreferences(preferences)\n } else {\n response = await this._server.postMessage('setPreferences', preferences)\n }\n\n if (response) {\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: response }))\n return response\n }\n } catch (error) {\n console.error('[#setPreferences]', error)\n throw error\n }\n }\n\n /**\n * Resets the user's preferences by clearing the stored preferences data, either in the local storage or on the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves when the preferences have been reset, or rejects with an error if the reset operation fails.\n */\n async resetPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.resetPreferences()\n } else {\n await this._server.postMessage('resetPreferences')\n }\n } catch (error) {\n console.error('[#resetPreferences]', error)\n throw error\n }\n }\n}\n\nlet preferencesClient\n\n/**\n * Creates a new PreferencesClient instance and initializes it with the provided options.\n *\n * If a PreferencesClient instance already exists, it will add the provided host to the existing instance and return it.\n *\n * @param {Object} options - The options to initialize the PreferencesClient with.\n * @returns {Promise} - A Promise that resolves to the PreferencesClient instance.\n */\nexport default async function createPreferencesClient(options) {\n if (preferencesClient) {\n preferencesClient.addHost(options)\n\n return preferencesClient\n }\n\n preferencesClient = new PreferencesClient()\n await preferencesClient.init(options)\n\n return preferencesClient\n}"],"names":["PreferencesClient","EventTarget","constructor","super","this","_server","_storage","preferences","debugIsOn","debug","readyState","hosts","host","reflectEvents","push","arguments","event","dispatchEvent","forEach","type","listener","options","EVENT_NAMES","READY","fireReadyListener","addEventListener","init","serverMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","addHost","SERVER_MODE","LOCAL","stringIsUrl","URL","location","searchParams","set","getServerMode","Reflect","has","loggerFactory","REMOTE","serverObject","getIframeServer","document","body","href","callServer","listenMessage","method","detail","CustomEvent","UPDATE","error","console","postMessage","PreferenceStorage","getPreferences","undefined","response","setPreferences","resetPreferences","readyEvent","preferencesClient","async","createPreferencesClient"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAMA,UAA0BC,YAAAA;AAAAA,EAO9B,cAAAC;AACEC,UACAC;AATJ;AACEC;AACAC;AACAC;AACAC;AACAC;AAIEL,SAAKM,aAAa,WAClBN,KAAKO,QAAQ,CACd;AAAA,EAAA;AAAA,EAED,QAAQC,EAAAA,MAAEA,IAAIC,eAAEA,GACdT,GAAAA;AAAAA,SAAKO,MAAMG,KAAK,EAAEF,MAAMC,IAAAA,eAAAA,GAAAA,CAAAA;AAAAA,EACzB;AAAA,EAED;AACMT,uBAAKI,OACPJ,mBAAKK,IAALL,WAAKK,GAAUM;AAAAA,EAElB;AAAA,EAED,cAAcC,IAAAA;AACZb,UAAMc,cAAcD,EAAAA,GACpBZ,KAAKO,MAAMO,QAAQ,CAAGN,EAAAA,MAAAA,IAAMC,eAAoBA,GAAAA,MAAAA,MAAiBD,GAAKK,gBAAgBD,EAAAA,CAAAA;AAAAA,EACvF;AAAA,EAaD,iBAAiBG,IAAMC,IAAUC,IAAAA;AAC/B,QAAIF,OAASG,EAAYC,SAA6B,YAApBnB,KAAKM,WAGrC,QAFAN,mBAAKK,IAALL,WAAY,0EACZA,sBAAKoB,oBAALpB,WAAwBgB;AAI1BjB,UAAMsB,iBAAiBN,IAAMC,IAAUC,EACxC;AAAA,EAAA;AAAA,EAwBD,MAAMK,KAAAA,EAAKd,MAAEA,IAAIe,YAAEA,IAAUC,WAAEA,IAASC,sBAAEA,IAAuBC,GAA8BjB,eAAEA,IAAAA,KAsC/F,GAAA;AAAA,QAAIN;AAEJ,QAvCAH,KAAKyB,uBAAuBA,GA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;;AAxNDhD;AACAC;AACAC;AALF;AAiDQe,OAAAA,eAAmBJ,IACvB;AAAA,QAAMb,WAAoBH,KAAKuD,eAAAA,GACzBK,KAAa,IAAIX,YAAY/B,EAAYC,OAAO,EAAE6B,QAAQ7C;AAChEH,qBAAKK,IAALL,WAAY,yCAAyCG,KACrDa,GAAS4C,EACV;AAAA;AAwKH,IAAIC;AAUWC,eAAeC,EAAwB9C,IACpD;AAAA,SAAI4C,KACFA,EAAkBlC,QAAQV,EAEnB4C,GAAAA,MAGTA,IAAoB,IAAIjE,WAClBiE,EAAkBvC,KAAKL,EAEtB4C,GAAAA;AACT;"} \ No newline at end of file +{"version":3,"file":"preferencesClient.js","sources":["../src/components/bib-consent/preferencesClient.js"],"sourcesContent":["import { callServer } from 'postmessage-promise'\nimport { stringIsUrl } from '@/utils/url.js'\nimport { loggerFactory } from '@/utils/logger.js'\nimport PreferenceStorage from './PreferenceStorage.js'\nimport { getIframeServer, getServerMode } from './utils.js'\nimport { EVENT_NAMES, SERVER_MODE, SERVER_REQUEST_DEFAULT_TIMEOUT } from './constants.js'\n\n/**\n * Represents a client for managing user preferences, with the ability to interact with a remote server or local storage.\n *\n * The `PreferencesClient` class extends the `EventTarget` class, allowing it to dispatch events related to preference updates.\n *\n * Key features:\n * - Initialization with options for server mode (local or remote), server URL, and event reflection.\n * - Ability to add hosts that will receive preference update events.\n * - Debugging functionality with configurable debug mode.\n * - Methods to set, get, and reset user preferences, with different behavior based on server mode.\n *\n * @property {string} readyState - The current state of the PreferencesClient instance. Can be 'initial', 'connecting' or 'ready'.\n */\nclass PreferencesClient extends EventTarget {\n _server\n _storage\n #preferences\n #debugIsOn = false\n #debug\n\n constructor() {\n super()\n this.readyState = 'initial'\n this.hosts = []\n }\n\n addHost({ host, reflectEvents }) {\n this.hosts.push({ host, reflectEvents })\n }\n\n debug() {\n if (this.#debugIsOn) {\n this.#debug(...arguments)\n }\n }\n\n dispatchEvent(event) {\n super.dispatchEvent(event)\n this.hosts.forEach(({ host, reflectEvents }) => reflectEvents && host.dispatchEvent?.(event))\n }\n\n /**\n * Adds an event listener to the PreferencesClient instance.\n *\n * If the event type is `EVENT_NAMES.READY` and the `readyState` is already `'ready'`, the listener function is called immediately with the current preferences object as the event detail.\n *\n * Otherwise, the event listener is added using the standard `addEventListener` method.\n *\n * @param {string} type - The type of event to listen for.\n * @param {EventListener} listener - The function to call when the event is dispatched.\n * @param {EventListenerOptions} [options] - Options for the event listener.\n */\n addEventListener(type, listener, options) {\n if (type === EVENT_NAMES.READY && this.readyState === 'ready') {\n this.debug('Firing ready event immediately since readyState is already ready')\n this.#fireReadyListener(listener)\n return\n }\n\n super.addEventListener(type, listener, options)\n }\n\n async #fireReadyListener(listener) {\n const preferences = await this.getPreferences()\n const readyEvent = new CustomEvent(EVENT_NAMES.READY, { detail: preferences })\n this.debug('Firing ready event with preferences: ', preferences)\n listener(readyEvent)\n }\n\n /**\n * Initializes the PreferencesClient instance with the provided options.\n *\n * @param {Object} options - The initialization options.\n * @param {Object} [options.host] - The host object that will receive preference update events.\n * @param {string} [options.serverMode] - The server mode, either 'LOCAL' or 'REMOTE'.\n * @param {string} [options.serverUrl] - The URL of the remote server.\n * @param {number} [options.serverRequestTimeout=SERVER_REQUEST_DEFAULT_TIMEOUT] - The timeout for server requests in milliseconds.\n * @param {boolean} [options.reflectEvents=true] - Whether to reflect preference update events to the host.\n * @returns {Promise} - A promise that resolves when initialization is complete.\n *\n * @event EVENT_NAMES.READY - Dispatched when the initial preferences data is available. The event detail contains the preferences object.\n * @event EVENT_NAMES.UPDATE - Dispatched when the preferences are updated. The event detail contains the updated preferences object.\n */\n\n async init({ host, serverMode, serverUrl, serverRequestTimeout = SERVER_REQUEST_DEFAULT_TIMEOUT, reflectEvents = true }) {\n this.serverRequestTimeout = serverRequestTimeout\n\n if (host) {\n this.addHost({ host, reflectEvents })\n }\n\n this.readyState = 'connecting'\n\n if (\n (\n serverMode && serverMode === SERVER_MODE.LOCAL\n )\n ||\n typeof serverUrl === 'undefined'\n ||\n !stringIsUrl(serverUrl)\n ) {\n this.serverMode = SERVER_MODE.LOCAL\n } else {\n this.serverUrl = new URL(serverUrl, location)\n\n if (host.debug) {\n this.serverUrl.searchParams.set('debug', '')\n }\n\n this.serverMode = await getServerMode(this)\n\n }\n\n this.#debugIsOn = !!host.debug\n\n if (this.#debugIsOn) {\n this.#debug = loggerFactory('preferencesClient', 'purple')\n }\n\n this.debug('init', `server mode: ${this.serverMode}`)\n\n let preferences\n\n if (this.serverMode === SERVER_MODE.REMOTE) {\n const serverObject = getIframeServer(document.body, this.serverUrl.href)\n\n this.debug('[remote] callServer serverObject: ', serverObject)\n\n try {\n this._server = await callServer(serverObject)\n\n this._server.listenMessage((method, detail) => {\n this.debug('[remote] server.listenMessage method: ', method, 'detail: ', detail)\n const event = new CustomEvent(EVENT_NAMES.UPDATE, { detail })\n this.dispatchEvent(event)\n })\n } catch (error) {\n console.error('[callServer] error: ', error)\n throw error\n }\n\n preferences = await this._server.postMessage('getPreferences')\n this.debug('[remote] Got response from server: ', preferences)\n\n } else {\n this._storage = new PreferenceStorage()\n\n await this._storage.init()\n\n preferences = await this._storage.getPreferences()\n this.debug('[local] Got response from storage: ', preferences)\n }\n\n this.debug('[local] preferences: ', preferences)\n\n if (preferences !== undefined) {\n\n // Dispatch initial data with the ready state.\n this.readyState = 'ready'\n this.#preferences = preferences\n\n this.debug('dispatchEvent', EVENT_NAMES.READY, preferences)\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.READY, { detail: preferences }))\n }\n }\n\n /**\n * Gets the user's preferences from either the local storage or the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves with the user's preferences, or rejects with an error if the operation fails.\n */\n async getPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.getPreferences()\n } else {\n return await this._server.postMessage('getPreferences')\n }\n } catch (error) {\n console.error('[#getPreferences]', error)\n throw error\n }\n }\n\n /**\n * Sets the user's preferences in either the local storage or the remote server, depending on the configured server mode.\n *\n * @param {Object|null} preferences - The preferences object to be set. If null, it will reset the user's preferences.\n * @returns {Promise} - A promise that resolves when the preferences have been set or reset, or rejects with an error if the operation fails.\n */\n async setPreferences(preferences) {\n try {\n let response\n\n // When there is no preferences object, this is a reset of the user's preferences, so set it to null.\n if (typeof preferences === 'undefined') {\n preferences = null\n }\n\n if (this.serverMode === SERVER_MODE.LOCAL) {\n response = await this._storage.setPreferences(preferences)\n } else {\n response = await this._server.postMessage('setPreferences', preferences)\n }\n\n if (response) {\n this.dispatchEvent(new CustomEvent(EVENT_NAMES.UPDATE, { detail: response }))\n return response\n }\n } catch (error) {\n console.error('[#setPreferences]', error)\n throw error\n }\n }\n\n /**\n * Resets the user's preferences by clearing the stored preferences data, either in the local storage or on the remote server, depending on the configured server mode.\n *\n * @returns {Promise} - A promise that resolves when the preferences have been reset, or rejects with an error if the reset operation fails.\n */\n async resetPreferences() {\n try {\n if (this.serverMode === SERVER_MODE.LOCAL) {\n return await this._storage.resetPreferences()\n } else {\n await this._server.postMessage('resetPreferences')\n }\n } catch (error) {\n console.error('[#resetPreferences]', error)\n throw error\n }\n }\n}\n\nlet preferencesClient\n\n/**\n * Creates a new PreferencesClient instance and initializes it with the provided options.\n *\n * If a PreferencesClient instance already exists, it will add the provided host to the existing instance and return it.\n *\n * @param {Object} options - The options to initialize the PreferencesClient with.\n * @returns {Promise} - A Promise that resolves to the PreferencesClient instance.\n */\nexport default async function createPreferencesClient(options) {\n if (preferencesClient) {\n preferencesClient.addHost(options)\n\n return preferencesClient\n }\n\n preferencesClient = new PreferencesClient()\n await preferencesClient.init(options)\n\n return preferencesClient\n}"],"names":["PreferencesClient","EventTarget","constructor","super","this","_server","_storage","preferences","debugIsOn","debug","readyState","hosts","host","reflectEvents","push","t","arguments","event","dispatchEvent","forEach","type","listener","options","EVENT_NAMES","READY","addEventListener","serverMode","serverUrl","serverRequestTimeout","SERVER_REQUEST_DEFAULT_TIMEOUT","addHost","SERVER_MODE","LOCAL","stringIsUrl","URL","location","searchParams","set","getServerMode","loggerFactory","REMOTE","serverObject","getIframeServer","document","body","href","callServer","listenMessage","method","detail","CustomEvent","UPDATE","error","console","postMessage","PreferenceStorage","init","getPreferences","setPreferences","response","resetPreferences","fireReadyListener","readyEvent","preferencesClient","async","createPreferencesClient"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAMA,UAA0BC,YAAAA;AAAAA,EAO9B,cAAAC;AACEC,UACAC;AATJ;AACEC;AACAC;AACAC;AACAC;AACAC;AAIEL,SAAKM,aAAa,WAClBN,KAAKO,QAAQ,CACd;AAAA,EAAA;AAAA,EAED,QAAQC,EAAAA,MAAEA,IAAIC,eAAEA,GACdT,GAAAA;AAAAA,SAAKO,MAAMG,KAAK,EAAEF,UAAMC,eACzBE,GAAA,CAAA;AAAA,EAAA;AAAA,EAED,QACMX;AAAAA,uBAAAA,OACFA,mBAAAA,IAAAA,WAAeY,GAAAA;AAAAA,EAElB;AAAA,EAED,cAAcC;AACZd,UAAMe,cAAcD,KACpBb,KAAKO,MAAMQ,QAAQ,CAAA,EAAGP,MAAMC,IAAAA,eAAAA,GAAAA,MAAoBA,MAAiBD,GAAKM,gBAAgBD;EACvF;AAAA,EAaD,iBAAiBG,IAAMC,IAAUC,IAC/B;AAAA,QAAIF,OAASG,EAAYC,SAA6B,YAApBpB,KAAKM,WAGrC,QAFAN,KAAKK,MAAM,kEACXL,GAAAA,KAAAA,sBAAAA,oBAAAA,WAAwBiB;AAI1BlB,UAAMsB,iBAAiBL,IAAMC,IAAUC,EAAAA;AAAAA,EACxC;AAAA,EAwBD,MAAA,OAAWV,MAAEA,IAAIc,YAAEA,IAAUC,WAAEA,IAASC,sBAAEA,IAAuBC,GAA8BhB,eAAEA,IAAgB,KAAA,GAAA;AAsC/G,QAAIN;AAEJ,QAvCAH,KAAKwB,uBAAuBA,GAExBhB,MACFR,KAAK0B,QAAQ,EAAElB,MAAAA,IAAMC,eAGvBT,EAAAA,CAAAA,GAAAA,K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AO,EAAEyB,QAAQ1C,GAChEH,CAAAA;AAAAA,OAAKK,MAAM,yCAAyCF,EAAAA,GACpDc,GAASyC,EAAAA;AACV;AAwKH,IAAIC;AAUWC,eAAeC,EAAwB3C,IACpD;AAAA,SAAIyC,KACFA,EAAkBjC,QAAQR,EAEnByC,GAAAA,MAGTA,IAAoB,IAAI/D,WAClB+D,EAAkBP,KAAKlC,EAEtByC,GAAAA;AACT;"} \ No newline at end of file diff --git a/dist/ref-B-kqFHPy.js b/dist/ref-B-kqFHPy.js index 0ace9ee..e955af3 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.13.0 + * @version 0.13.1 * @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 4b70b5d..e36714e 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.13.0 + * @version 0.13.1 * @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 f4e9844..8803119 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.13.0 + * @version 0.13.1 * @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 56b7b05..d893dea 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.13.0 + * @version 0.13.1 * @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 d385151..c69fa7f 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.13.0 + * @version 0.13.1 * @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 bad288c..5681b84 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.13.0 + * @version 0.13.1 * @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 408f81c..34912db 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.13.0 + * @version 0.13.1 * @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 f9d39ea..2a400cc 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.13.0 + * @version 0.13.1 * @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 0246731..74e7200 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.13.0 + * @version 0.13.1 * @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 155b42b..54c8da0 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui diff --git a/dist/utils.cjs b/dist/utils.cjs index 5fa2aa2..4fb5211 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.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants-BgVe0aC4.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-C4rB-CcV.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 0285df3..9557ca2 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,12 +1,12 @@ /** * Librairie du system desing des Bibliothèques de l'Université de Montréal * @module @bibudem/ui - * @version 0.13.0 + * @version 0.13.1 * @author Christian Rémillard * @license ISC * @see https://github.com/bibudem/ui */ -import { j, a, e, g } from "./constants-DMzZzv_T.js"; +import { j, a, e, g } from "./constants-C4fSqP7Z.js"; export { j as createPrefixedEventName, a as getIframeServer,