diff --git a/build/2.1.0/client/corvee.js b/build/2.1.0/client/corvee.js index 924fb4f..7adfbb3 100644 --- a/build/2.1.0/client/corvee.js +++ b/build/2.1.0/client/corvee.js @@ -89,4 +89,4 @@ object-assign * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */function Lr(t,o){if(function(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}(t)&&o in Rr){var e=t.document.createElement("div"),r=Rr[o],i=r.standard,n=r.prefixed;return i in e.style?i:n}return o}var qr=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return Or(o,t),o.attachTo=function(t){return new o(t)},o.prototype.initialSyncWithDOM=function(){var t=this,o=this.root.parentElement;this.anchorElement=o&&o.classList.contains(_r.ANCHOR)?o:null,this.root.classList.contains(_r.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(o){t.foundation.handleKeydown(o)},this.handleBodyClick=function(o){t.foundation.handleBodyClick(o)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen($r.OPENED_EVENT,this.registerBodyClickListener),this.listen($r.CLOSED_EVENT,this.deregisterBodyClickListener)},o.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten($r.OPENED_EVENT,this.registerBodyClickListener),this.unlisten($r.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},o.prototype.isOpen=function(){return this.foundation.isOpen()},o.prototype.open=function(){this.foundation.open()},o.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(o.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!1,configurable:!0}),o.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},o.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},o.prototype.setFixedPosition=function(t){t?this.root.classList.add(_r.FIXED):this.root.classList.remove(_r.FIXED),this.foundation.setFixedPosition(t)},o.prototype.setAbsolutePosition=function(t,o){this.foundation.setAbsolutePosition(t,o),this.setIsHoisted(!0)},o.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},o.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},o.prototype.getDefaultFoundation=function(){var t=this,o={addClass:function(o){return t.root.classList.add(o)},removeClass:function(o){return t.root.classList.remove(o)},hasClass:function(o){return t.root.classList.contains(o)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(Nr.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(Nr.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(Nr.strings.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Nr.strings.OPENING_EVENT,{})},isElementInContainer:function(o){return t.root.contains(o)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(o){var e=Lr(window,"transform")+"-origin";t.root.style.setProperty(e,o)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(o){var e=t.root;e.style.left="left"in o?o.left+"px":"",e.style.right="right"in o?o.right+"px":"",e.style.top="top"in o?o.top+"px":"",e.style.bottom="bottom"in o?o.bottom+"px":""},setMaxHeight:function(o){t.root.style.maxHeight=o}};return new Nr(o)},o}(Ar); -/*! js-cookie v3.0.1 | MIT */function Ur(t){for(var o=1;o(iframe)",IMG:"image",FORM:"formulaire",LINK:"feuille de style",SCRIPT:"script"}},Pr={currentJob:"2023-05-10",harvestDate:"2023-05-10",harvestDateFormated:"10 mai 2023",deadline:"2023-08-31",deadlineFormated:"31 août 2023",sections:[{sections:[{key:"tous",title:"Tous les liens (attention: très longue page)",urls:[""]}]},{title:"Portails disciplinaires",sections:[{key:"amenagement",title:"Aménagement",urls:["https://bib.umontreal.ca/amenagement"]},{key:"anthropologie-demographie-sociologie",title:"Anthropologie, démographie, sociologie",urls:["https://bib.umontreal.ca/anthropologie-demographie-sociologie"]},{key:"art-cinema-musique",title:"Art, cinéma, musique",urls:["https://bib.umontreal.ca/art-cinema-musique"]},{key:"communication-sciences-information",title:"Communication, sciences de l'information",urls:["https://bib.umontreal.ca/communication-sciences-information"]},{key:"criminologie-psychologie-travail-social",title:"Criminologie, psychologie, travail social",urls:["https://bib.umontreal.ca/criminologie-psychologie-travail-social"]},{key:"droit",title:"Droit",urls:["https://bib.umontreal.ca/droit"]},{key:"economie-politique-relations-industrielles",title:"Économie, politique, relations industrielles",urls:["https://bib.umontreal.ca/economie-politique-relations-industrielles"]},{key:"education-psychoeducation",title:"Éducation, psychoéducation",urls:["https://bib.umontreal.ca/education-psychoeducation"]},{key:"etudes-religieuses-histoire-philosophie",title:"Études religieuses, histoire, philosophie",urls:["https://bib.umontreal.ca/etudes-religieuses-histoire-philosophie"]},{key:"informatique-mathematique-sciences-nature",title:"Informatique, mathématiques, sciences de la nature",urls:["https://bib.umontreal.ca/informatique-mathematique-sciences-nature"]},{key:"langues-litteratures",title:"Langues et littératures",urls:["https://bib.umontreal.ca/langues-litteratures"]},{key:"sciences-sante",title:"Sciences de la santé",urls:["https://bib.umontreal.ca/sciences-sante"]},{key:"multidisciplinaire",title:"Multidisciplinaire",urls:["https://bib.umontreal.ca/multidisciplinaire"]}]},{title:"Autres sections du site",sections:[{key:"chercher",title:"Chercher de l'information",urls:["https://bib.umontreal.ca/chercher","https://bib.umontreal.ca/guides","https://bib.umontreal.ca/emprunter"]},{key:"utiliser",title:"Utiliser l'information",urls:["https://bib.umontreal.ca/citer","https://bib.umontreal.ca/evaluer-analyser-rediger","https://bib.umontreal.ca/gerer-diffuser","https://bib.umontreal.ca/formations"]},{key:"travailler",title:"Travailler en bibliothèque",urls:["https://bib.umontreal.ca/travailler"]},{key:"a-propos",title:"À propos",urls:["https://bib.umontreal.ca/les-bibliotheques-udem","https://bib.umontreal.ca/faire-un-don","https://bib.umontreal.ca/communications","https://bib.umontreal.ca/services","https://bib.umontreal.ca/collections","https://bib.umontreal.ca/sondage-et-enquetes"]},{key:"soutien-enseignement",title:"Soutien à l'enseignement",urls:["https://bib.umontreal.ca/soutien-enseignement"]},{key:"soutien-recherche",title:"Soutien à la recherche",urls:["https://bib.umontreal.ca/soutien-recherche","https://bib.umontreal.ca/recherche-documentaire-subventions-et-laboratoires"]},{key:"nous-joindre",title:"Nous joindre",urls:["https://bib.umontreal.ca/nous-joindre"]},{key:"www",title:"Pages sur www.bib.umontreal.ca",urls:["https://www.bib.umontreal.ca"]}]}]};class Br extends EventTarget{#i;constructor(t){super(),this.#i=window.parent===window?null:window.parent,Object.defineProperty(this,"host",{value:this.#i?"slave":"master",enumerable:!0}),this._cookieName=t.name,this._cookieAttributes=t.options;const o=new Date(Pr.deadline);o>Date.now()&&(this._cookieAttributes.expires=o),this._cookie=Fr.withAttributes(this._cookieAttributes),"slave"===this.host&&window.addEventListener("message",(t=>{if(t.data?.cv&&t.data.event?.endsWith(".user-config")){const o=t.data.event.split(".")[0],e=t.data;this.#s(o,e.data,!1)}}))}#s(t,o,e=!0){if(this.dispatchEvent(new CustomEvent(t,{detail:o})),"master"===this.host&&e)for(let e=0;e{await this.getJobs(),this.menu=new qr(this.renderRoot.querySelector(".mdc-menu-surface")),this.renderRoot.querySelector(".cv-dropdown-toggle").addEventListener("click",this.show.bind(this))}))}connectedCallback(){super.connectedCallback(),this.renderRoot.addEventListener("click",this._select.bind(this)),this.renderRoot.addEventListener("keyup",this._select.bind(this))}disconnectedCallback(){}hide(){this.menu.isOpen()&&this.menu.close()}show(){this.menu.isOpen()||this.menu.root.classList.contains("mdc-menu-surface--animating-closed")||this.menu.open()}_select(t){const o=t.composedPath()[0];if("menuitem"!==o.getAttribute("role"))return;if("true"===o.getAttribute("aria-current"))return;const e=" "===t.key||t.key===Ee;return"click"===t.type||e?(t.stopPropagation(),this.setJob(o.dataset.value),void(e&&this.hide())):void 0}async getJobs(){return new Promise(((t,o)=>fetch(`${Ye}/api/jobs`,{headers:{"Content-Type":"application/json"}}).then((async e=>{if(e.ok){const o=await e.json();return this.jobs=o.jobs,this.defaultJob=o.default,t()}o(e)})).catch((t=>{o(t)}))))}setJob(t){this.currentJob=t,Hr.set({currentJob:t}),this.dispatchEvent(new CustomEvent("change",{detail:t}))}_setActiveIcon(){return R`Sélectionné`}_getCurrentJob(){return Jr.format(new Date(this.currentJob??this.defaultJob))}render(){return R`
`}}function Vr(){setTimeout((function(){document.activeElement instanceof HTMLIFrameElement&&document.activeElement.parentElement.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}),0)}window.customElements.define("cv-job-list",Gr);class Zr extends ot{#o;static properties={open:{type:Boolean,attribute:!0,reflect:!0},totalErrors:{type:Number,state:!0}};static styles=c`${n(':host{--cv-error:#cc3241;--cv-warning:#fad209;--cv-success:#6fa738;--cv-accent:#cc3241;--cv-body-color:#333;--cv-body-font-family:var(--cv-font-sans-serif);--cv-code-font:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--cv-body-font-size:16px;--cv-gray-200:#eee;--cv-link-color:#3166b3;--cv-link-hover-color:#3166b3;--cv-code-color:unset;--cv-space-width:0.2473958333333333em;--cv-color-neutral-muted:#ebedf0;--cv-muted-color:#82878f;--cv-backdrop-color:rgba(0,0,0,.32);--cv-radius-inline:0.3333em;--cv-radius-block:16px;--cv-radius-round:50vw;--cv-speed-duration-short:100ms;--cv-speed-duration-medium-in:250ms;--cv-speed-duration-medium-out:200ms;--cv-speed-duration-large-in:300ms;--cv-speed-duration-large-out:250ms;--cv-shadow-2:0 0.35rem 0.8rem rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.2);--cv-navbar-height:60px;color:var(--cv-body-color);font-family:var(--cv-body-font-family);font-size:var(--cv-body-font-size)}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}dt{font-weight:700}dd{margin-bottom:0;margin-left:0}a{color:var(--cv-link-color);text-decoration:underline}a:hover{color:var(--cv-link-hover-color)}a:has(code){text-decoration-color:rgba(65,80,88,.5)}a:has(code):active,a:has(code):hover{text-decoration-color:rgba(0,101,153,.5)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}label{cursor:pointer}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,select{text-transform:none}[role=button],select{cursor:pointer}select{word-wrap:normal;background-color:transparent;border:1px solid #a5a5b1;border-radius:.25em}select:disabled{opacity:1}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{border-style:none;padding:0}code{background-color:#eff0f1;border-radius:6px;color:var(--cv-body-color);font-family:var(--cv-code-font);font-size:.85em;padding:.2em .4em}[hidden]{display:none!important}.cv-url{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word;word-break:break-all}.cv-hide{display:none!important}.console-btn-close{-webkit-box-shadow:var(--cv-widget-state-color,hsla(0,0%,100%,0)) 0 0 0 var(--cv-widget-state-border-width,3px)!important;box-shadow:var(--cv-widget-state-color,hsla(0,0%,100%,0)) 0 0 0 var(--cv-widget-state-border-width,3px)!important}.console-btn-close,.console-btn-close:hover{-webkit-transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out,-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out}.console-btn-close:hover{-webkit-box-shadow:var(--cv-widget-state-hover-color,#e8edeb) 0 0 0 3px!important;box-shadow:var(--cv-widget-state-hover-color,#e8edeb) 0 0 0 3px!important}.console-btn-close:active{-webkit-box-shadow:var(--cv-widget-state-active-color,#c5c9c8) 0 0 0 3px!important;box-shadow:var(--cv-widget-state-active-color,#c5c9c8) 0 0 0 3px!important;-webkit-transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out,-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out}.cv-i{-ms-flex-negative:0;display:inline-block;flex-shrink:0;font-size:.9em;overflow:visible;vertical-align:-.125em}.btn-close:focus{-webkit-box-shadow:none;box-shadow:none}.btn-close:focus-visible{outline:2px auto;outline-offset:-2px}:host{--cv-body-font-size:15px;--cv-console-height:var(--cv-navbar-height);--cv-console-box-shadow:var(--cv-shadow-2);--cv-console-bg-color:#fff;--_console-open:-1;--_console-box-shadow:0;left:0;line-height:normal;padding-bottom:0;-webkit-transition:padding-bottom var(--cv-speed-duration-large-in);transition:padding-bottom var(--cv-speed-duration-large-in);width:100%}:host([open]){--_console-box-shadow:var(--cv-console-box-shadow);--_console-open:0;padding-bottom:var(--cv-console-height)}.console-outer{background-color:var(--cv-console-bg-color);border-bottom:1px solid #e0e0e0;-webkit-box-shadow:var(--_console-box-shadow);box-shadow:var(--_console-box-shadow);height:var(--cv-console-height);position:fixed;top:calc(var(--cv-console-height)*var(--_console-open));-webkit-transition-duration:var(--cv-speed-duration-large-in);transition-duration:var(--cv-speed-duration-large-in);-webkit-transition-property:top;transition-property:top;width:100%;z-index:16001}a:link{text-decoration:underline}a:hover{text-decoration:none}.console-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;left:50%;margin:0 0 0 -599px;padding:1em 0;position:absolute;width:1198px}.console-title .h1{color:#bc520b;font-size:2em!important;font-weight:200}.console-title .h1 a{color:inherit;text-decoration:none}.console-total-errors{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding-left:1em}.console-total-errors strong{font-size:1.75em;font-weight:400}.console-content-right{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex}.console-date{display:inline-block}.console-date:after{content:"|";margin-right:1.145em}.console-btn-close{background-color:transparent;border:0;border-radius:var(--cv-radius-round);height:2em;margin-left:1em;opacity:.6;padding:0;position:relative;-webkit-transition:all var(--cv-speed-duration-short) ease-in-out;transition:all var(--cv-speed-duration-short) ease-in-out;width:2em}.console-btn-close:hover{opacity:1}.cv-i-close-l{height:2em;width:2em}')}`;constructor(){super(),this.#o=er.totalErrors,er.addEventListener("total-errors",(t=>{this.totalErrors=t.detail.totalErrors}))}set totalErrors(t){const o=this.#o;this.#o=t,this.requestUpdate("totalErrors",o)}get totalErrors(){return R`${this.#o>0?this.#o:"Aucun"} signalement${this.#o>1?"s":""} dans cette page`}async connectedCallback(){super.connectedCallback(),window.addEventListener("blur",Vr),this.role="complementary",this.open=!1}deconnectedCallback(){window.removeEventListener("blur",Vr)}show(){this.open=!0}#d(t=!0){this.open=!1,t&&this.dispatchEvent(new Event("close"))}close(){this.#d(!1)}render(){return R`
${this.totalErrors}
Liens vérifiés le38 octembre 3017Liste de tous les liens brisés
`}}function Kr(t,o){return new Promise(((e,r)=>{let i=[window.parent];"slaves"===t&&(i=window.frames);for(var n=0;n{"currentJob"===t.detail.prop&&this._loadData().then((()=>{this._buildReportWidgets()})).catch((t=>{}))})),"master"===this.role&&this.console.addEventListener("close",(()=>{this.stop(!0)}))}#v(t){"master"===this.role&&this.slaves.forEach((o=>o.postMessage(t,"*")))}start(t=!1){const o=this.role,e=this;function r(){return this.fontsStylesheet.disabled=!1,"master"===e.role&&(Hr.set({isActive:!0}),document.body.prepend(e.console),setTimeout((()=>{e.console.show()}))),e._loadData().then((()=>e._buildReportWidgets())).catch((t=>{}))}t?"master"===o?r.call(this).then((()=>{Kr("slaves",{action:"start"})})):Kr("master",{action:"start"}).then((()=>{r.call(this)})):r.call(this)}async stop(t=!1){return new Promise(((o,e)=>{Hr.set({isActive:!1}),this._killWidgets(),"master"===this.role?(this.console.open&&this.console.close(),this.console.addEventListener("transitionend",(()=>{this.console.remove(),o()}),{once:!0})):o(),t&&Kr("master"===this.role?"slaves":this.role,{action:"stop"})})).then((()=>{this.fontsStylesheet.disabled=!0}))}_killWidgets(){for(;this.reportWidgets.length>0;)this.reportWidgets.pop().dispose()}async _loadFonts(){const{default:t}=await import(`${Ye}/2.1.0/client/fonts.js`);this.fontsStylesheet.replace(t)}async _loadData(){const t=Hr.get("currentJob");return new Promise((async(o,e)=>{const r=new URL(`${Ye}/api/links`);var i;r.searchParams.set("parent",(i=window.location,(i=new URL(i)).hash="",i.pathname=i.pathname.replace(/(index|default)\.html?$/,""),i.searchParams.forEach(((t,o)=>{o.startsWith("utm_")&&i.searchParams.delete(o)})),i.href)),t&&r.searchParams.set("job",t),fetch(r).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{this.data=t,o()})).catch((t=>{e(t)}))}))}_buildReportWidgets(){this._killWidgets(),this.data.total>0&&this.data.reports.forEach((t=>{const o=t.url.split("\\").join("\\\\").split('"').join('\\"'),e=Array.from(document.querySelectorAll('a[href="'+o+'"]:not([data-cv-report-widget]), img[src="'+o+'"]:not([data-cv-report-widget])')).filter((o=>{let e=o.innerText.replace(/\n/g,"").trim();return"A"===o.nodeName?(""===e&&o.querySelectorAll(":scope > img[alt]").length>0&&(e=o.querySelector("img[alt]").getAttribute("alt").trim()),e===(()=>{const o=document.createElement("div");return o.innerHTML=t.text.replace(/\n/g,""),o.innerText.trim()})()):"IMG"===o.nodeName&&(!o.alt||o.alt.replace(/\n/,"").trim()===t.text.replace(/\n/g,"").trim())}))[0];e&&this.reportWidgets.push(new xr(e,t))}))}};globalThis.corvee=globalThis.corvee||{},globalThis.corvee.client=Qr,globalThis.corvee.start=function(){Qr.start()},globalThis.corvee.stop=async function(){await Qr.stop()};export{Qr as corveeApp}; +/*! js-cookie v3.0.1 | MIT */function Ur(t){for(var o=1;o(iframe)",IMG:"image",FORM:"formulaire",LINK:"feuille de style",SCRIPT:"script"}},Pr={currentJob:"2023-05-10",harvestDate:"2023-05-10",harvestDateFormated:"10 mai 2023",deadline:"2023-08-31",deadlineFormated:"31 août 2023",sections:[{sections:[{key:"tous",title:"Tous les liens (attention: très longue page)",urls:[""]}]},{title:"Portails disciplinaires",sections:[{key:"amenagement",title:"Aménagement",urls:["https://bib.umontreal.ca/amenagement"]},{key:"anthropologie-demographie-sociologie",title:"Anthropologie, démographie, sociologie",urls:["https://bib.umontreal.ca/anthropologie-demographie-sociologie"]},{key:"art-cinema-musique",title:"Art, cinéma, musique",urls:["https://bib.umontreal.ca/art-cinema-musique"]},{key:"communication-sciences-information",title:"Communication, sciences de l'information",urls:["https://bib.umontreal.ca/communication-sciences-information"]},{key:"criminologie-psychologie-travail-social",title:"Criminologie, psychologie, travail social",urls:["https://bib.umontreal.ca/criminologie-psychologie-travail-social"]},{key:"droit",title:"Droit",urls:["https://bib.umontreal.ca/droit"]},{key:"economie-politique-relations-industrielles",title:"Économie, politique, relations industrielles",urls:["https://bib.umontreal.ca/economie-politique-relations-industrielles"]},{key:"education-psychoeducation",title:"Éducation, psychoéducation",urls:["https://bib.umontreal.ca/education-psychoeducation"]},{key:"etudes-religieuses-histoire-philosophie",title:"Études religieuses, histoire, philosophie",urls:["https://bib.umontreal.ca/etudes-religieuses-histoire-philosophie"]},{key:"informatique-mathematique-sciences-nature",title:"Informatique, mathématiques, sciences de la nature",urls:["https://bib.umontreal.ca/informatique-mathematique-sciences-nature"]},{key:"langues-litteratures",title:"Langues et littératures",urls:["https://bib.umontreal.ca/langues-litteratures"]},{key:"sciences-sante",title:"Sciences de la santé",urls:["https://bib.umontreal.ca/sciences-sante"]},{key:"multidisciplinaire",title:"Multidisciplinaire",urls:["https://bib.umontreal.ca/multidisciplinaire"]}]},{title:"Autres sections du site",sections:[{key:"chercher",title:"Chercher de l'information",urls:["https://bib.umontreal.ca/chercher","https://bib.umontreal.ca/guides","https://bib.umontreal.ca/emprunter"]},{key:"utiliser",title:"Utiliser l'information",urls:["https://bib.umontreal.ca/citer","https://bib.umontreal.ca/evaluer-analyser-rediger","https://bib.umontreal.ca/gerer-diffuser","https://bib.umontreal.ca/formations"]},{key:"travailler",title:"Travailler en bibliothèque",urls:["https://bib.umontreal.ca/travailler"]},{key:"a-propos",title:"À propos",urls:["https://bib.umontreal.ca/les-bibliotheques-udem","https://bib.umontreal.ca/faire-un-don","https://bib.umontreal.ca/communications","https://bib.umontreal.ca/services","https://bib.umontreal.ca/collections","https://bib.umontreal.ca/sondage-et-enquetes"]},{key:"soutien-enseignement",title:"Soutien à l'enseignement",urls:["https://bib.umontreal.ca/soutien-enseignement"]},{key:"soutien-recherche",title:"Soutien à la recherche",urls:["https://bib.umontreal.ca/soutien-recherche","https://bib.umontreal.ca/recherche-documentaire-subventions-et-laboratoires"]},{key:"nous-joindre",title:"Nous joindre",urls:["https://bib.umontreal.ca/nous-joindre"]},{key:"www",title:"Pages sur www.bib.umontreal.ca",urls:["https://www.bib.umontreal.ca"]}]}]};class Br extends EventTarget{#i;constructor(t){super(),this.#i=window.parent===window?null:window.parent,Object.defineProperty(this,"host",{value:this.#i?"slave":"master",enumerable:!0}),this._cookieName=t.name,this._cookieAttributes=t.options;const o=new Date(Pr.deadline);o>Date.now()&&(this._cookieAttributes.expires=o),this._cookie=Fr.withAttributes(this._cookieAttributes),"slave"===this.host&&window.addEventListener("message",(t=>{if(t.data?.cv&&t.data.event?.endsWith(".user-config")){const o=t.data.event.split(".")[0],e=t.data;this.#s(o,e.data,!1)}}))}#s(t,o,e=!0){if(this.dispatchEvent(new CustomEvent(t,{detail:o})),"master"===this.host&&e)for(let e=0;e{await this.getJobs(),this.menu=new qr(this.renderRoot.querySelector(".mdc-menu-surface")),this.renderRoot.querySelector(".cv-dropdown-toggle").addEventListener("click",this.show.bind(this))}))}connectedCallback(){super.connectedCallback(),this.renderRoot.addEventListener("click",this._select.bind(this)),this.renderRoot.addEventListener("keyup",this._select.bind(this))}disconnectedCallback(){}hide(){this.menu.isOpen()&&this.menu.close()}show(){this.menu.isOpen()||this.menu.root.classList.contains("mdc-menu-surface--animating-closed")||this.menu.open()}_select(t){const o=t.composedPath()[0];if("menuitem"!==o.getAttribute("role"))return;if("true"===o.getAttribute("aria-current"))return;const e=" "===t.key||t.key===Ee;return"click"===t.type||e?(t.stopPropagation(),this.setJob(o.dataset.value),void(e&&this.hide())):void 0}async getJobs(){return new Promise(((t,o)=>fetch(`${Ye}/api/jobs`,{headers:{"Content-Type":"application/json"}}).then((async e=>{if(e.ok){const o=await e.json();return this.jobs=o.jobs,this.defaultJob=o.default,t()}o(e)})).catch((t=>{o(t)}))))}setJob(t){this.currentJob=t,Hr.set({currentJob:t}),this.dispatchEvent(new CustomEvent("change",{detail:t}))}_setActiveIcon(){return R`Sélectionné`}_getCurrentJob(){return Jr.format(new Date(this.currentJob??this.defaultJob))}render(){return R`
`}}function Vr(){setTimeout((function(){document.activeElement instanceof HTMLIFrameElement&&document.activeElement.parentElement.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}),0)}window.customElements.define("cv-job-list",Gr);class Zr extends ot{#o;static properties={open:{type:Boolean,attribute:!0,reflect:!0},totalErrors:{type:Number,state:!0}};static styles=c`${n(':host{--cv-error:#cc3241;--cv-warning:#fad209;--cv-success:#6fa738;--cv-accent:#cc3241;--cv-body-color:#333;--cv-body-font-family:var(--cv-font-sans-serif);--cv-code-font:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--cv-body-font-size:16px;--cv-gray-200:#eee;--cv-link-color:#3166b3;--cv-link-hover-color:#3166b3;--cv-code-color:unset;--cv-space-width:0.2473958333333333em;--cv-color-neutral-muted:#ebedf0;--cv-muted-color:#82878f;--cv-backdrop-color:rgba(0,0,0,.32);--cv-radius-inline:0.3333em;--cv-radius-block:16px;--cv-radius-round:50vw;--cv-speed-duration-short:100ms;--cv-speed-duration-medium-in:250ms;--cv-speed-duration-medium-out:200ms;--cv-speed-duration-large-in:300ms;--cv-speed-duration-large-out:250ms;--cv-shadow-2:0 0.35rem 0.8rem rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.2);--cv-navbar-height:60px;color:var(--cv-body-color);font-family:var(--cv-body-font-family);font-size:var(--cv-body-font-size)}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}dt{font-weight:700}dd{margin-bottom:0;margin-left:0}a{color:var(--cv-link-color);text-decoration:underline}a:hover{color:var(--cv-link-hover-color)}a:has(code){text-decoration-color:rgba(65,80,88,.5)}a:has(code):active,a:has(code):hover{text-decoration-color:rgba(0,101,153,.5)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}label{cursor:pointer}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,select{text-transform:none}[role=button],select{cursor:pointer}select{word-wrap:normal;background-color:transparent;border:1px solid #a5a5b1;border-radius:.25em}select:disabled{opacity:1}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{border-style:none;padding:0}code{background-color:#eff0f1;border-radius:6px;color:var(--cv-body-color);font-family:var(--cv-code-font);font-size:.85em;padding:.2em .4em}[hidden]{display:none!important}.cv-url{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word;word-break:break-all}.cv-hide{display:none!important}.console-btn-close{-webkit-box-shadow:var(--cv-widget-state-color,hsla(0,0%,100%,0)) 0 0 0 var(--cv-widget-state-border-width,3px)!important;box-shadow:var(--cv-widget-state-color,hsla(0,0%,100%,0)) 0 0 0 var(--cv-widget-state-border-width,3px)!important}.console-btn-close,.console-btn-close:hover{-webkit-transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out,-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out}.console-btn-close:hover{-webkit-box-shadow:var(--cv-widget-state-hover-color,#e8edeb) 0 0 0 3px!important;box-shadow:var(--cv-widget-state-hover-color,#e8edeb) 0 0 0 3px!important}.console-btn-close:active{-webkit-box-shadow:var(--cv-widget-state-active-color,#c5c9c8) 0 0 0 3px!important;box-shadow:var(--cv-widget-state-active-color,#c5c9c8) 0 0 0 3px!important;-webkit-transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out;transition:box-shadow var(--cv-speed-duration-short) ease-in-out,-webkit-box-shadow var(--cv-speed-duration-short) ease-in-out}.cv-i{-ms-flex-negative:0;display:inline-block;flex-shrink:0;font-size:.9em;overflow:visible;vertical-align:-.125em}.btn-close:focus{-webkit-box-shadow:none;box-shadow:none}.btn-close:focus-visible{outline:2px auto;outline-offset:-2px}:host{--cv-body-font-size:15px;--cv-console-height:var(--cv-navbar-height);--cv-console-box-shadow:var(--cv-shadow-2);--cv-console-bg-color:#fff;--_console-open:-1;--_console-box-shadow:0;left:0;line-height:normal;padding-bottom:0;-webkit-transition:padding-bottom var(--cv-speed-duration-large-in);transition:padding-bottom var(--cv-speed-duration-large-in);width:100%}:host([open]){--_console-box-shadow:var(--cv-console-box-shadow);--_console-open:0;padding-bottom:var(--cv-console-height)}.console-outer{background-color:var(--cv-console-bg-color);border-bottom:1px solid #e0e0e0;-webkit-box-shadow:var(--_console-box-shadow);box-shadow:var(--_console-box-shadow);height:var(--cv-console-height);position:fixed;top:calc(var(--cv-console-height)*var(--_console-open));-webkit-transition-duration:var(--cv-speed-duration-large-in);transition-duration:var(--cv-speed-duration-large-in);-webkit-transition-property:top;transition-property:top;width:100%;z-index:16001}a:link{text-decoration:underline}a:hover{text-decoration:none}.console-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;left:50%;margin:0 0 0 -599px;padding:1em 0;position:absolute;width:1198px}.console-title .h1{color:#bc520b;font-size:2em!important;font-weight:200}.console-title .h1 a{color:inherit;text-decoration:none}.console-total-errors{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding-left:1em}.console-total-errors strong{font-size:1.75em;font-weight:400}.console-content-right{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex}.console-date{display:inline-block}.console-date:after{content:"|";margin-right:1.145em}.console-btn-close{background-color:transparent;border:0;border-radius:var(--cv-radius-round);height:2em;margin-left:1em;opacity:.6;padding:0;position:relative;-webkit-transition:all var(--cv-speed-duration-short) ease-in-out;transition:all var(--cv-speed-duration-short) ease-in-out;width:2em}.console-btn-close:hover{opacity:1}.cv-i-close-l{height:2em;width:2em}')}`;constructor(){super(),this.#o=er.totalErrors,er.addEventListener("total-errors",(t=>{this.totalErrors=t.detail.totalErrors}))}set totalErrors(t){const o=this.#o;this.#o=t,this.requestUpdate("totalErrors",o)}get totalErrors(){return R`${this.#o>0?this.#o:"Aucun"} signalement${this.#o>1?"s":""} dans cette page`}async connectedCallback(){super.connectedCallback(),window.addEventListener("blur",Vr),this.role="complementary",this.open=!1}deconnectedCallback(){window.removeEventListener("blur",Vr)}show(){this.open=!0}#d(t=!0){this.open=!1,t&&this.dispatchEvent(new Event("close"))}close(){this.#d(!1)}render(){return R`
${this.totalErrors}
Liens vérifiés le 38 octembre 3017Liste de tous les liens brisés
`}}function Kr(t,o){return new Promise(((e,r)=>{let i=[window.parent];"slaves"===t&&(i=window.frames);for(var n=0;n{"currentJob"===t.detail.prop&&this._loadData().then((()=>{this._buildReportWidgets()})).catch((t=>{}))})),"master"===this.role&&this.console.addEventListener("close",(()=>{this.stop(!0)}))}#v(t){"master"===this.role&&this.slaves.forEach((o=>o.postMessage(t,"*")))}start(t=!1){const o=this.role,e=this;function r(){return this.fontsStylesheet.disabled=!1,"master"===e.role&&(Hr.set({isActive:!0}),document.body.prepend(e.console),setTimeout((()=>{e.console.show()}))),e._loadData().then((()=>e._buildReportWidgets())).catch((t=>{}))}t?"master"===o?r.call(this).then((()=>{Kr("slaves",{action:"start"})})):Kr("master",{action:"start"}).then((()=>{r.call(this)})):r.call(this)}async stop(t=!1){return new Promise(((o,e)=>{Hr.set({isActive:!1}),this._killWidgets(),"master"===this.role?(this.console.open&&this.console.close(),this.console.addEventListener("transitionend",(()=>{this.console.remove(),o()}),{once:!0})):o(),t&&Kr("master"===this.role?"slaves":this.role,{action:"stop"})})).then((()=>{this.fontsStylesheet.disabled=!0}))}_killWidgets(){for(;this.reportWidgets.length>0;)this.reportWidgets.pop().dispose()}async _loadFonts(){const{default:t}=await import(`${Ye}/2.1.0/client/fonts.js`);this.fontsStylesheet.replace(t)}async _loadData(){const t=Hr.get("currentJob");return new Promise((async(o,e)=>{const r=new URL(`${Ye}/api/links`);var i;r.searchParams.set("parent",(i=window.location,(i=new URL(i)).hash="",i.pathname=i.pathname.replace(/(index|default)\.html?$/,""),i.searchParams.forEach(((t,o)=>{o.startsWith("utm_")&&i.searchParams.delete(o)})),i.href)),t&&r.searchParams.set("job",t),fetch(r).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{this.data=t,o()})).catch((t=>{e(t)}))}))}_buildReportWidgets(){this._killWidgets(),this.data.total>0&&this.data.reports.forEach((t=>{const o=t.url.split("\\").join("\\\\").split('"').join('\\"'),e=Array.from(document.querySelectorAll('a[href="'+o+'"]:not([data-cv-report-widget]), img[src="'+o+'"]:not([data-cv-report-widget])')).filter((o=>{let e=o.innerText.replace(/\n/g,"").trim();return"A"===o.nodeName?(""===e&&o.querySelectorAll(":scope > img[alt]").length>0&&(e=o.querySelector("img[alt]").getAttribute("alt").trim()),e===(()=>{const o=document.createElement("div");return o.innerHTML=t.text.replace(/\n/g,""),o.innerText.trim()})()):"IMG"===o.nodeName&&(!o.alt||o.alt.replace(/\n/,"").trim()===t.text.replace(/\n/g,"").trim())}))[0];e&&this.reportWidgets.push(new xr(e,t))}))}};globalThis.corvee=globalThis.corvee||{},globalThis.corvee.client=Qr,globalThis.corvee.start=function(){Qr.start()},globalThis.corvee.stop=async function(){await Qr.stop()};export{Qr as corveeApp}; diff --git a/build/2.1.0/client/corvee.js.br b/build/2.1.0/client/corvee.js.br index 35b10d1..bbdf591 100644 Binary files a/build/2.1.0/client/corvee.js.br and b/build/2.1.0/client/corvee.js.br differ diff --git a/build/2.1.0/client/corvee.js.gz b/build/2.1.0/client/corvee.js.gz index dbfd838..1274ef3 100644 Binary files a/build/2.1.0/client/corvee.js.gz and b/build/2.1.0/client/corvee.js.gz differ diff --git a/build/2.1.0/client/corvee.js.zz b/build/2.1.0/client/corvee.js.zz index 6e5114d..f48506c 100644 Binary files a/build/2.1.0/client/corvee.js.zz and b/build/2.1.0/client/corvee.js.zz differ diff --git a/src/cv-console/cv-console.js b/src/cv-console/cv-console.js index 5d735e3..e95d2a7 100644 --- a/src/cv-console/cv-console.js +++ b/src/cv-console/cv-console.js @@ -99,7 +99,7 @@ dans cette page`
${this.totalErrors}
- Liens vérifiés le 38 octembre 3017 + Liens vérifiés le 38 octembre 3017 Liste de tous les liens brisés