/* /web/static/src/polyfills/object.js */ if(!Object.hasOwn){Object.hasOwn=(obj,key)=>Object.prototype.hasOwnProperty.call(obj,key);}; /* /web/static/src/polyfills/array.js */ if(!Array.prototype.at){Object.defineProperty(Array.prototype,"at",{enumerable:false,value:function(index){if(index>=0){return this[index];} return this[this.length+index];}});}; /* /web/static/src/polyfills/promise.js */ if(!Promise.withResolvers){Promise.withResolvers=function withResolvers(){let resolve,reject;const promise=new Promise((res,rej)=>{resolve=res;reject=rej;});return{promise,resolve,reject};};}; /* /web/static/src/module_loader.js */ (function(odoo){"use strict";if(odoo.loader){return;} class ModuleLoader{bus=new EventTarget();checkErrorProm=null;factories=new Map();failed=new Set();jobs=new Set();modules=new Map();constructor(root){this.root=root;const strDebug=new URLSearchParams(location.search).get("debug");this.debug=Boolean(strDebug&&strDebug!=="0");} addJob(name){this.jobs.add(name);this.startModules();} define(name,deps,factory,lazy=false){if(typeof name!=="string"){throw new Error(`Module name should be a string, got: ${String(name)}`);} if(!Array.isArray(deps)){throw new Error(`Module dependencies should be a list of strings, got: ${String(deps)}`);} if(typeof factory!=="function"){throw new Error(`Module factory should be a function, got: ${String(factory)}`);} if(this.factories.has(name)){return;} this.factories.set(name,{deps,fn:factory,ignoreMissingDeps:globalThis.__odooIgnoreMissingDependencies,});if(!lazy){this.addJob(name);this.checkErrorProm||=Promise.resolve().then(()=>{this.checkErrorProm=null;this.reportErrors(this.findErrors());});}} findErrors(moduleNames){const findCycle=(currentModuleNames,visited)=>{for(const name of currentModuleNames||[]){if(visited.has(name)){const cycleModuleNames=[...visited,name];return cycleModuleNames.slice(cycleModuleNames.indexOf(name)).map((j)=>`"${j}"`).join(" => ");} const cycle=findCycle(dependencyGraph[name],new Set(visited).add(name));if(cycle){return cycle;}} return null;};moduleNames||=this.jobs;const dependencyGraph=Object.create(null);const missing=new Set();const unloaded=new Set();for(const moduleName of moduleNames){const{deps,ignoreMissingDeps}=this.factories.get(moduleName);dependencyGraph[moduleName]=deps;if(ignoreMissingDeps){continue;} unloaded.add(moduleName);for(const dep of deps){if(!this.factories.has(dep)){missing.add(dep);}}} const cycle=findCycle(moduleNames,new Set());const errors={};if(cycle){errors.cycle=cycle;} if(this.failed.size){errors.failed=this.failed;} if(missing.size){errors.missing=missing;} if(unloaded.size){errors.unloaded=unloaded;} return errors;} findJob(){for(const job of this.jobs){if(this.factories.get(job).deps.every((dep)=>this.modules.has(dep))){return job;}} return null;} async reportErrors(errors){if(!Object.keys(errors).length){return;} if(errors.failed){console.error("The following modules failed to load because of an error:",[...errors.failed,]);} if(errors.missing){console.error("The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:",[...errors.missing]);} if(errors.cycle){console.error("The following modules could not be loaded because they form a dependency cycle:",errors.cycle);} if(errors.unloaded){console.error("The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems:",[...errors.unloaded]);} const document=this.root?.ownerDocument||globalThis.document;if(document.readyState==="loading"){await new Promise((resolve)=>document.addEventListener("DOMContentLoaded",resolve));} if(this.debug){const style=document.createElement("style");style.className="o_module_error_banner";style.textContent=` body::before { font-weight: bold; content: "An error occurred while loading javascript modules, you may find more information in the devtools console"; position: fixed; left: 0; bottom: 0; z-index: 100000000000; background-color: #C00; color: #DDD; } `;document.head.appendChild(style);}} startModules(){let job;while((job=this.findJob())){this.startModule(job);}} startModule(name){const require=(dependency)=>this.modules.get(dependency);this.jobs.delete(name);const factory=this.factories.get(name);let module=null;try{module=factory.fn(require);}catch(error){this.failed.add(name);throw new Error(`Error while loading "${name}":\n${error}`);} this.modules.set(name,module);this.bus.dispatchEvent(new CustomEvent("module-started",{detail:{moduleName:name,module},}));return module;}} const loader=new ModuleLoader();odoo.define=loader.define.bind(loader);odoo.loader=loader;if(odoo.debug&&!loader.debug){odoo.debug="";}})((globalThis.odoo||={}));; /* /web/static/src/polyfills/set.js */ odoo.define('@web/polyfills/set',[],function(require){'use strict';let __exports={};const difference=__exports.difference=function(s){if(!(s instanceof Set)){throw new Error("argument must be a Set");} return new Set([...this].filter((e)=>!s.has(e)));};if(!Set.prototype.difference){Object.defineProperty(Set.prototype,"difference",{enumerable:false,value:difference,});} return __exports;});; /* /web/static/src/session.js */ odoo.define('@web/session',[],function(require){'use strict';let __exports={};const session=__exports.session=odoo.__session_info__||{};delete odoo.__session_info__;return __exports;});; /* /web/static/src/core/browser/cookie.js */ odoo.define('@web/core/browser/cookie',[],function(require){'use strict';let __exports={};const COOKIE_TTL=24*60*60*365;const cookie=__exports.cookie={get _cookieMonster(){return document.cookie;},set _cookieMonster(value){document.cookie=value;},get(str){const parts=this._cookieMonster.split("; ");for(const part of parts){const[key,value]=part.split(/=(.*)/);if(key===str){return value||"";}}},set(key,value,ttl=COOKIE_TTL){let fullCookie=[];if(value!==undefined){fullCookie.push(`${key}=${value}`);} fullCookie=fullCookie.concat(["path=/",`max-age=${Math.floor(ttl)}`]);this._cookieMonster=fullCookie.join("; ");},delete(key){this.set(key,"kill",0);},};return __exports;});; /* /web/static/src/core/utils/ui.js */ odoo.define('@web/core/utils/ui',[],function(require){'use strict';let __exports={};__exports.closest=closest;function closest(elements,targetPos){let closestEl=null;let closestDistance=Infinity;for(const el of elements){const rect=el.getBoundingClientRect();const distance=getQuadrance(rect,targetPos);if(!closestEl||distance0&&el.offsetHeight>0;}else if("getBoundingClientRect"in el){const rect=el.getBoundingClientRect();_isVisible=rect.width>0&&rect.height>0;} if(!_isVisible&&getComputedStyle(el).display==="contents"){for(const child of el.children){if(isVisible(child)){return true;}}} return _isVisible;} __exports.getQuadrance=getQuadrance;function getQuadrance(rect,pos){let q=0;if(pos.x{const r2=el.getBoundingClientRect();return(r2.x+r2.width>=r1.x&&r2.x<=r1.x+r1.width&&r2.y+r2.height>=r1.y&&r2.y<=r1.y+r1.height);});} const FOCUSABLE_SELECTORS=["[tabindex]","a","area","button","frame","iframe","input","object","select","textarea","details > summary:nth-child(1)",].map((sel)=>`${sel}:not(:disabled)`);const TABABLE_SELECTORS=FOCUSABLE_SELECTORS.map((sel)=>`${sel}:not([tabindex="-1"])`);__exports.isFocusable=isFocusable;function isFocusable(el){return el.matches(FOCUSABLE_SELECTORS.join(","))&&isVisible(el)&&!el.closest("[inert]");} __exports.getTabableElements=getTabableElements;function getTabableElements(container=document.body){const elements=[...container.querySelectorAll(TABABLE_SELECTORS.join(","))].filter((el)=>isVisible(el)&&!el.closest("[inert]"));const byTabIndex={};for(const el of[...elements]){if(!byTabIndex[el.tabIndex]){byTabIndex[el.tabIndex]=[];} byTabIndex[el.tabIndex].push(el);} const withTabIndexZero=byTabIndex[0]||[];delete byTabIndex[0];return[...Object.values(byTabIndex).flat(),...withTabIndexZero];} __exports.getNextTabableElement=getNextTabableElement;function getNextTabableElement(container=document.body){const tabableElements=getTabableElements(container);const index=tabableElements.indexOf(document.activeElement);return index===-1?tabableElements[0]:tabableElements[index+1]||null;} __exports.getPreviousTabableElement=getPreviousTabableElement;function getPreviousTabableElement(container=document.body){const tabableElements=getTabableElements(container);const index=tabableElements.indexOf(document.activeElement);return index===-1?tabableElements[tabableElements.length-1]:tabableElements[index-1]||null;} __exports.addLoadingEffect=addLoadingEffect;function addLoadingEffect(btnEl){btnEl.classList.add("o_btn_loading","disabled","pe-none");btnEl.disabled=true;const loaderEl=document.createElement("span");loaderEl.classList.add("fa","fa-circle-o-notch","fa-spin","me-2");btnEl.prepend(loaderEl);return()=>{btnEl.classList.remove("o_btn_loading","disabled","pe-none");btnEl.disabled=false;loaderEl.remove();};} return __exports;});; /* /web/static/src/legacy/js/public/minimal_dom.js */ odoo.define('@web/legacy/js/public/minimal_dom',['@web/core/utils/ui'],function(require){'use strict';let __exports={};const{addLoadingEffect}=require('@web/core/utils/ui');const DEBOUNCE=__exports.DEBOUNCE=400;const BUTTON_HANDLER_SELECTOR=__exports.BUTTON_HANDLER_SELECTOR='a, button, input[type="submit"], input[type="button"], .btn';__exports.makeAsyncHandler=makeAsyncHandler;function makeAsyncHandler(fct,preventDefault,stopPropagation,stopImmediatePropagation){let pending=false;function _isLocked(){return pending;} function _lock(){pending=true;} function _unlock(){pending=false;} return function(ev){if(preventDefault===true||preventDefault&&preventDefault()){ev.preventDefault();} if(stopPropagation===true||stopPropagation&&stopPropagation()){ev.stopPropagation();} if(stopImmediatePropagation===true||stopImmediatePropagation&&stopImmediatePropagation()){ev.stopImmediatePropagation();} if(_isLocked()){return;} _lock();const result=fct.apply(this,arguments);Promise.resolve(result).finally(_unlock);return result;};} __exports.makeButtonHandler=makeButtonHandler;function makeButtonHandler(fct,preventDefault,stopPropagation,stopImmediatePropagation){fct=makeAsyncHandler(fct,preventDefault,stopPropagation,stopImmediatePropagation);return function(ev){const handlerResult=fct.apply(this,arguments);const buttonEl=ev.target.closest(BUTTON_HANDLER_SELECTOR);if(!(buttonEl instanceof HTMLElement)){return handlerResult;} buttonEl.classList.add("pe-none");let showDebouncedLoading=false;const addLoadingIfPending=()=>{buttonEl.classList.remove("pe-none");if(showDebouncedLoading){const restore=addLoadingEffect(buttonEl);Promise.resolve(handlerResult).then(restore,restore);}};Promise.race([handlerResult,new Promise((resolve)=>setTimeout(resolve,DEBOUNCE)).then(()=>{showDebouncedLoading=true;}),]).then(addLoadingIfPending,addLoadingIfPending);return handlerResult;};} return __exports;});; /* /web/static/src/legacy/js/public/lazyloader.js */ odoo.define('@web/legacy/js/public/lazyloader',['@web/legacy/js/public/minimal_dom'],function(require){'use strict';let __exports={};const{BUTTON_HANDLER_SELECTOR,makeAsyncHandler,makeButtonHandler,}=require('@web/legacy/js/public/minimal_dom');let allScriptsLoadedResolve=null;const _allScriptsLoaded=new Promise(resolve=>{allScriptsLoadedResolve=resolve;}).then(stopWaitingLazy);const retriggeringWaitingProms=[];async function waitForLazyAndRetrigger(ev){const targetEl=ev.target;await _allScriptsLoaded;await Promise.all(retriggeringWaitingProms);setTimeout(()=>{if(targetEl.isConnected){targetEl.dispatchEvent(new ev.constructor(ev.type,ev));}},0);} const loadingEffectHandlers=[];function registerLoadingEffectHandler(el,type,handler){el.addEventListener(type,handler,{capture:true});loadingEffectHandlers.push({el,type,handler});} let waitingLazy=false;function waitLazy(){if(waitingLazy){return;} waitingLazy=true;document.body.classList.add('o_lazy_js_waiting');const mainEl=document.getElementById('wrapwrap')||document.body;const loadingEffectButtonEls=[...mainEl.querySelectorAll(BUTTON_HANDLER_SELECTOR)].filter(el=>{return!el.classList.contains('o_no_wait_lazy_js')&&!(el.nodeName==='A'&&el.href&&el.getAttribute('href')!=='#');});const loadingEffectEventTypes=['mouseover','mouseenter','mousedown','mouseup','click','mouseout','mouseleave'];for(const buttonEl of loadingEffectButtonEls){for(const eventType of loadingEffectEventTypes){const loadingEffectHandler=eventType==='click'?makeButtonHandler(waitForLazyAndRetrigger,true,true,true):makeAsyncHandler(waitForLazyAndRetrigger,true,true,true);registerLoadingEffectHandler(buttonEl,eventType,loadingEffectHandler);}} for(const formEl of document.querySelectorAll('form:not(.o_no_wait_lazy_js)')){registerLoadingEffectHandler(formEl,'submit',ev=>{ev.preventDefault();ev.stopImmediatePropagation();});}} function stopWaitingLazy(){if(!waitingLazy){return;} waitingLazy=false;document.body.classList.remove('o_lazy_js_waiting');for(const{el,type,handler}of loadingEffectHandlers){el.removeEventListener(type,handler,{capture:true});}} if(document.readyState!=='loading'){waitLazy();}else{document.addEventListener('DOMContentLoaded',function(){waitLazy();});} if(document.readyState==='complete'){setTimeout(_loadScripts,0);}else{window.addEventListener('load',function(){setTimeout(_loadScripts,0);});} function _loadScripts(scripts,index){if(scripts===undefined){scripts=document.querySelectorAll('script[data-src]');} if(index===undefined){index=0;} if(index>=scripts.length){allScriptsLoadedResolve();return;} const script=scripts[index];script.addEventListener('load',_loadScripts.bind(this,scripts,index+1));script.setAttribute('defer','defer');script.src=script.dataset.src;script.removeAttribute('data-src');} __exports[Symbol.for("default")]={loadScripts:_loadScripts,allScriptsLoaded:_allScriptsLoaded,registerPageReadinessDelay:retriggeringWaitingProms.push.bind(retriggeringWaitingProms),};return __exports;});