vendor: 5,610 bytes, lines 1-7
1/* @license GPL-2.0-or-later https://git.drupalcode.org/project/once/-/raw/v1.0.1/LICENSE.md */ 2/*! @drupal/once - v1.0.1 - 2021-06-12 */ 3var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}(); 4 5; 6/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 7window.drupalTranslations={"strings":{"":{"An AJAX HTTP error occurred.":"Ocorreu um erro HTTP no AJAX.","HTTP Result Code: !status":"C\u00f3digo do Resultado HTTP: !status","StatusText: !statusText":"Texto de Status: !statusText","ResponseText: !responseText":"Texto de Resposta: !responseText","ReadyState: !readyState":"ReadyState: !readyState","CustomMessage: !customMessage":"Mensagem personalizada: !customMessage","The callback URL is not local and not trusted: !url":"A URL de retorno de chamada n\u00e3o \u00e9 local e n\u00e3o \u00e9 confi\u00e1vel: !url","An error occurred during the execution of the Ajax response: !error":"Ocorreu um erro durante a execu\u00e7\u00e3o da resposta do Ajax: !error","Changed":"Alterado","List additional actions":"Listar a\u00e7\u00f5es adicionais","New revision":"Nova revis\u00e3o","No revision":"Sem revis\u00e3o","Needs to be updated":"Necessita atualiza\u00e7\u00e3o","Does not need to be updated":"N\u00e3o necessita atualiza\u00e7\u00e3o","Flag other translations as outdated":"Marcar outras tradu\u00e7\u00f5es como desatualizadas","Do not flag other translations as outdated":"N\u00e3o marcar outras tradu\u00e7\u00f5es como desatualizadas","Edit machine name":"Editar nome de m\u00e1quina","Edit":"Editar","Status message":"Mensagem de status","Error message":"Mensagem de erro","Warning message":"Mensagem de aviso","You have unsaved changes.":"Voc\u00ea possui altera\u00e7\u00f5es n\u00e3o salvas.","Hide row weights":"Ocultar pesos das linhas","Show row weights":"Exibir pesos das linhas","Drag to re-order":"Arraste para reordenar","Show all columns":"Mostrar todas as colunas","Hide lower priority columns":"Esconder colunas de menor prioridade","Select all rows in this table":"Selecionar todas as linhas da tabela","Deselect all rows in this table":"Desmarcar todas as linhas da tabela","(active tab)":"(aba ativa)","Not restricted":"Sem restri\u00e7\u00f5es","Restricted to certain pages":"Restrito para certas p\u00e1ginas","The block cannot be placed in this region.":"O bloco n\u00e3o pode ser colocado nessa regi\u00e3o.","Preview failed":"A pr\u00e9-visualiza\u00e7\u00e3o falhou","Media widget":"Widget de m\u00eddia","Insert Media":"Inserir M\u00eddia","Drupal Media toolbar":"Barra de ferramentas Drupal Media","Not all functionality may be available because some information could not be retrieved.":"Nem todas as funcionalidades podem estar dispon\u00edveis porque algumas informa\u00e7\u00f5es n\u00e3o puderam ser recuperadas.","Save":"Salvar","Cancel":"Cancelar","Alternative text override":"Texto alternativo sobrescrito","Default alternative text:":"Texto alternativo padr\u00e3o:","Override media image alternative text":"Sobrescrever texto alternativo da imagem da m\u00eddia","Link media":"Link de m\u00eddia","Enter media caption":"Adicionar legenda da m\u00eddia","Caption media":"Legenda da m\u00eddia","Toggle caption off":"Desabilitar legenda","Toggle caption on":"Habilitar legenda","Decorative image":"Imagem decorativa","Button @name has been copied to the active toolbar.":"O bot\u00e3o @name foi copiado para a barra de ferramentas ativa.","Button @name has been removed from the active toolbar.":"O bot\u00e3o @name foi removido da barra de ferramentas ativa.","Divider":"Divisor","Wrapping":"Empacotamento","Press the down arrow key to activate":"Pressione a seta para baixo para ativar","Available buttons":"Bot\u00f5es dispon\u00edveis","Button divider":"Divisor de bot\u00f5es","Active toolbar":"Barra de ferramentas ativa","No styles configured":"Nenhum estilo configurado","Open":"Aberto","Close":"Fechar","@action @title configuration options":"Op\u00e7\u00f5es de configura\u00e7\u00e3o @action @title","Press the esc key to exit.":"Pressione ESC para sair.","Changing the text format to %text_format will permanently remove content that is not allowed in that text format.\u003Cbr\u003E\u003Cbr\u003ESave your changes before switching the text format to avoid losing data.":"Mudar o formato de texto para %text_format remover\u00e1 permanentemente o conte\u00fado que n\u00e3o \u00e9 permitido nesse formato de texto.\u
7003Cbr\u003E\u003Cbr\u003ESalve suas mudan\u00e7as antes de alternar o formato de texto para evitar perda de dados.","Continue":"Continuar","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"O arquivo selecionado %filename n\u00e3o p\u00f4de ser transferido. Somente arquivos com as seguintes extens\u00f5es s\u00e3o permitidos: %extensions.","Enabled":"Habilitado","Disabled":"Desativado","Based on the text editor configuration, these tags have automatically been added: \u003Cstrong\u003E@tag-list\u003C\/strong\u003E.":"Com base nas configura\u00e7\u00f5es do editor de texto, estas tags foram adicionadas automaticamente: \u003Cstrong\u003E@tag-list\u003C\/strong\u003E.","All available blocks are listed.":"Todos os blocos dispon\u00edveis est\u00e3o listados.","Block previews are visible. Block labels are hidden.":"A pr\u00e9-visualiza\u00e7\u00e3o de blocos s\u00e3o vis\u00edveis. As etiquetas dos blocos est\u00e3o ocultas.","Block previews are hidden. Block labels are visible.":"A pr\u00e9-visualiza\u00e7\u00e3o de blocos s\u00e3o vis\u00edveis. As etiquetas dos blocos est\u00e3o vis\u00edveis.","Hide description":"Ocultar descri\u00e7\u00e3o","Show description":"Mostrar descri\u00e7\u00e3o","By @name on @date":"Por @name em @date","By @name":"Por @name","Authored on @date":"Criado em @date","Show media item weights":"Mostrar pesos dos itens de m\u00eddia","Hide media item weights":"Esconder pesos dos itens de m\u00eddia","Not in menu":"Fora do menu","Not promoted":"N\u00e3o promovido","Leave preview?":"Sair da pr\u00e9-visualiza\u00e7\u00e3o?","Leave preview":"Sair da pr\u00e9-visualiza\u00e7\u00e3o","Alias: @alias":"Apelido: @alias","No alias":"Nenhum apelido","Hide summary":"Ocultar sum\u00e1rio","Edit summary":"Editar resumo","Horizontal orientation":"Orienta\u00e7\u00e3o horizontal","Vertical orientation":"Orienta\u00e7\u00e3o vertical","Extend":"Estender","Collapse":"Encolher","@label":"@label","Tray orientation changed to @orientation.":"Orienta\u00e7\u00e3o da bandeja alterada para @orientation.","closed":"fechado","opened":"aberto","Tray \u0022@tray\u0022 @action.":"Bandeja \u0022@tray\u0022 @action.","Tray @action.":"Bandeja @action.","No items selected":"Nenhum item selecionado","Abbreviation":"Abrevia\u00e7\u00e3o","Remove":"Remover","Title":"T\u00edtulo","CSS classes":"Classes CSS","ID":"ID","Advanced":"Avan\u00e7ado","Open in new window":"Abrir em uma nova janela","Content limited to @limit characters, remaining: \u003Cstrong\u003E@remaining\u003C\/strong\u003E":"Conte\u00fado limitado a @limit caracteres, restam: \u003Cstrong\u003E@remaining\u003C\/strong\u003E","Automatic alias":"Apelido autom\u00e1tico","Scheduled for publishing":"Agendado para publica\u00e7\u00e3o","Scheduled for unpublishing":"Agendado para despublica\u00e7\u00e3o","Not scheduled":"N\u00e3o agendado","Publishing enabled":"Publica\u00e7\u00e3o habilitada","Unpublishing enabled":"Despublica\u00e7\u00e3o habilitada","Insert this token into your form":"Insira este token no seu formul\u00e1rio","First click a text field to insert your tokens into.":"Primeiramente, clique no campo de texto para inserir seus tokens.","item":"item","items":"itens","Hide":"Ocultar","Hide sidebar panel":"Esconder painel da barra lateral","Show sidebar panel":"Mostrar painel da barra lateral","An error occurred while trying to preview the media. Please save your work and reload this page.":"Um erro ocorreu ao tentar pr\u00e9-visualizar a m\u00eddia. Por favor, salve seu trabalho e recarregue esta p\u00e1gina.","Select all media":"Selecionar todas as m\u00eddias","All @count items selected":"Todos os itens @count selecionados","Zero items selected":"Nenhum item selecionado"}},"pluralFormula":{"1":0,"default":1}};; 8(function(){const settingsElement=document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]');window.drupalSettings={};if(settingsElement!==null)window.drupalSettings=JSON.parse(settingsElement.textContent);})();; 9window.Drupal={behaviors:{},locale:{}};(function(Drupal,drupalSettings,drupalTranslations,console,Proxy,Reflect){Drupal.throwError=function(error){setTimeout(()=>{throw error;},0);};Drupal.attachBehaviors=function(context,settings){context=context||document;settings=settings||drupalSettings;const behaviors=Drupal.behaviors;Object.keys(behaviors||{}
9).forEach((i)=>{if(typeof behaviors[i].attach==='function')try{behaviors[i].attach(context,settings);}catch(e){Drupal.throwError(e);}});};Drupal.detachBehaviors=function(context,settings,trigger){context=context||document;settings=settings||drupalSettings;trigger=trigger||'unload';const behaviors=Drupal.behaviors;Object.keys(behaviors||{}).forEach((i)=>{if(typeof behaviors[i].detach==='function')try{behaviors[i].detach(context,settings,trigger);}catch(e){Drupal.throwError(e);}});};Drupal.checkPlain=function(str){str=str.toString().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');return str;};Drupal.formatString=function(str,args){const processedArgs={};Object.keys(args||{}).forEach((key)=>{switch(key.charAt(0)){case '@':processedArgs[key]=Drupal.checkPlain(args[key]);break;case '!':processedArgs[key]=args[key];break;default:processedArgs[key]=Drupal.theme('placeholder',args[key]);break;}});return Drupal.stringReplace(str,processedArgs,null);};Drupal.stringReplace=function(str,args,keys){if(str.length===0)return str;if(!Array.isArray(keys)){keys=Object.keys(args||{});keys.sort((a,b)=>a.length-b.length);}if(keys.length===0)return str;const key=keys.pop();const fragments=str.split(key);if(keys.length){for(let i=0;i<fragments.length;i++)fragments[i]=Drupal.stringReplace(fragments[i],args,keys.slice(0));}return fragments.join(args[key]);};Drupal.t=function(str,args,options){options=options||{};options.context=options.context||'';if(drupalTranslations?.strings?.[options.context]?.[str])str=drupalTranslations.strings[options.context][str];if(args)str=Drupal.formatString(str,args);return str;};Drupal.url=function(path){return drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix+path;};Drupal.url.toAbsolute=function(url){const urlParsingNode=document.createElement('a');urlParsingNode.setAttribute('href',url);return urlParsingNode.href;};Drupal.url.isLocal=function(url){let absoluteUrl=Drupal.url.toAbsolute(url);let {protocol}=window.location;if(protocol==='http:'&&absoluteUrl.startsWith('https:'))protocol='https:';let baseUrl=`${protocol}//${window.location.host}${drupalSettings.path.baseUrl.slice(0,-1)}`;try{absoluteUrl=decodeURIComponent(absoluteUrl);}catch(e){}try{baseUrl=decodeURIComponent(baseUrl);}catch(e){}return absoluteUrl===baseUrl||absoluteUrl.startsWith(`${baseUrl}/`);};Drupal.formatPlural=function(count,singular,plural,args,options){args=args||{};args['@count']=count;const pluralDelimiter=drupalSettings.pluralDelimiter;const translations=Drupal.t(singular+pluralDelimiter+plural,args,options).split(pluralDelimiter);let index=0;if(drupalTranslations?.pluralFormula)index=count in drupalTranslations.pluralFormula?drupalTranslations.pluralFormula[count]:drupalTranslations.pluralFormula.default;else{if(args['@count']!==1)index=1;}return translations[index];};Drupal.encodePath=function(item){return window.encodeURIComponent(item).replace(/%2F/g,'/');};Drupal.deprecationError=({message})=>{if(drupalSettings.suppressDeprecationErrors===false&&console?.warn)console.warn(`[Deprecation] ${message}`);};Drupal.deprecatedProperty=({target,deprecatedProperty,message})=>{if(!Proxy||!Reflect)return target;return new Proxy(target,{get:(target,key,...rest)=>{if(key===deprecatedProperty)Drupal.deprecationError({message});return Reflect.get(target,key,...rest);}});};Drupal.theme=function(func,...args){if(typeof Drupal.theme?.[func]==='function')return Drupal.theme[func](...args);Drupal.throwError(new TypeError(`Drupal.theme.${func} must be function type.`));};Drupal.theme.placeholder=function(str){return `<em class="placeholder">${Drupal.checkPlain(str)}</em>`;};Drupal.elementIsVisible=function(elem){return !!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};Drupal.elementIsHidden=function(elem){return !Drupal.elementIsVisible(elem);};})(Drupal,window.drupalSettings,window.drupalTranslations,window.console,window.Proxy,window.Reflect);; 10if(window.jQuery)jQuery.noConflict();document.documentElement.className+=' js';(function(Drupal,drupalSettings){const domReady=(callback)=>{const listener=()=>{callback();document.removeEventListener('DOMContentLoaded',listener);};if(document.readyState!=='loading')setTimeout(callback,0);else document.addEventListener('DOMContentLoaded',listener);};domReady(()=>{Drupal.attachBehaviors(document,drupalSettings);});})(Drupal,window.drupalSettings);; 11const Awx={basePath:'/themes/custom/airbus_web_experience_ui',prefixCss:'awx',processedClassname:'processed',isDevEnv:document.location.host.endsWith('.local')||document.location.host.endsWith('.corp')||document.location.hostname==='localhost',isTouchDevice:'ontouchstart' in window||navigator.msMaxTouchPoints,isAuthenticated:false,utils:{},modules:{},init:{},destroy:{}};; 12Awx.utils.getNextSibling=function(el,selector=null,visible=null){let sibling=el.nextElementSibling;const isVisibilityValid=(_el,_visible)=>{if(_visible===null||!_el)return true;return _visible===Awx.utils.isVisible(_el);};if(!selector){if(!isVisibilityValid(sibling,visible))return Awx.utils.getNextSibling(sibling,null,visible);return sibling;}while(sibling){if(sibling.matches(selector)&&isVisibilityValid(sibling,visible))return sibling;sibling=sibling.nextElementSibling;}return null;};Awx.utils.getSiblings=function(el,selector){const siblings=[];if(!el.parentElement)return siblings;if(!selector)selector='*';let sibling=el.parentElement.firstElementChild;while(sibling){if(sibling!==el&&sibling.matches(selector))siblings.push(sibling);sibling=sibling.nextElementSibling;}return siblings;};Awx.utils.getClosestAncestor=function(el,selector,scope=null){let ancestor=null;while(el){el=el.parentElement;if(el&&el.matches(selector)){ancestor=el;break;}if(scope&&el.matches(scope))break;}return ancestor;};Awx.utils.getOffset=function(el){return el.getBoundingClientRect().top-document.body.getBoundingClientRect().top;};Awx.utils.triggerClick=function(el){const event=new MouseEvent('click',{bubbles:true,cancelable:true,view:window});return !el.dispatchEvent(event);};Awx.utils.triggerEvent=function(name,el=document,detail={},bubbles=true){return el.dispatchEvent(new CustomEvent(`${Awx.prefixCss}.${name}`,{cancelable:true,bubbles,detail}));};Awx.utils.isVisible=function(el){return !!(el.offsetWidth||el.offsetHeight||el.getClientRects().length);};Awx.utils.debounce=function(func,delay){let timeout;return function(...args){const context=this;clearTimeout(timeout);timeout=setTimeout(()=>func.apply(context,args),delay);};};Awx.utils.throttle=function(func,delay){let wait=false;return (...args)=>{if(wait)return;func(...args);wait=true;setTimeout(()=>{wait=false;},delay);};};Awx.utils.once=function(func){let ran=false;let result;return function(){if(ran)return result;result=func.apply(this,arguments);ran=true;return result;};};Awx.utils.memoize=function(func){const cache=new Map();return function(){const key=JSON.stringify(arguments);if(cache.has(key))return cache.get(key);const result=func.apply(this,arguments);cache.set(key,result);return result;};};Awx.utils.pick=function(obj,keys){return keys.reduce((acc,key)=>{if(obj.hasOwnProperty(key))acc[key]=obj[key];return acc;},{});};Awx.utils.omit=function(obj,keys){return Object.keys(obj).filter((key)=>!keys.includes(key)).reduce((acc,key)=>{acc[key]=obj[key];return acc;},{});};Awx.utils.toggleNamespaceWithShortcut=function(config){const keys=config.keys||null;const namespace=config.namespace||null;if(!keys||!keys.length||!namespace||typeof namespace!=='string')return;const parentSelector=config.parentSelector||'body';const parent=document.querySelector(parentSelector);function compareKey(valid,sent){const booleans=['altKey','ctrlKey','shiftKey'];const validObj=valid.reduce((o,v)=>({...o,[v]:true}),{});const validBooleans=Awx.utils.pick(validObj,booleans);const validRemains=Awx.utils.omit(validObj,booleans);const validKey=Object.entries(validRemains).map(([key,obj])=>({key,...obj})).at(0);const validResult={...validBooleans,...validKey};const sentComp={};for(const prop in validResult)if(prop in sent)sentComp[prop]=sent[prop];return JSON.stringify(sentComp)===JSON.stringify(validResult);}function getRandomInt(min,max){min=Math.ceil(min);max=Math.floor(max);return Math.floor(Math.random()*(max-min+1))+min;}document.onkeyup=function(e){if(!compareKey(keys,e))return;const cssLink=document.getElementById(namespace);if(cssLink){document.head.removeChild(cssLink);parent.classList.remove(namespace);return;}const key=getRandomInt(1000,2000);
12Awx.utils.appendCss(namespace,`${Awx.basePath}/assets/css/theme/${namespace}.css?${key}`);parent.classList.add(namespace);};};Awx.utils.appendCss=function(id,href){const link=document.createElement('link');link.id=id;link.media='screen';link.rel='stylesheet';link.href=href;document.head.appendChild(link);};Awx.utils.hashCode=function(str){let hash=0;let i;let chr;for(i=0;i<str.length;i++){chr=str.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0;}return hash;};Awx.utils.move=(el,target,query,callback=null)=>{if(el.dataset.processed&&el.dataset.processed==='1')return;el.dataset.processed='1';const initialParent=el.parentElement;el.dataset.hasMoved='0';const mediaQuery=window.matchMedia(query);function onMediaQueryChange(){if(mediaQuery.matches){target.appendChild(el);el.dataset.hasMoved='1';}else{if(el.dataset.hasMoved==='1'){initialParent.appendChild(el);el.dataset.hasMoved='0';}}if(typeof callback==='function')callback(mediaQuery,el);}mediaQuery.addEventListener('change',onMediaQueryChange);onMediaQueryChange(mediaQuery);};Awx.utils.isColorLight=function(color){let r;let g;let b;if(color.match(/^rgb/))[,r,g,b]=color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);else{color=+`0x${color.slice(1).replace(color.length<5&&/./g,'$&$&')}`;r=color>>16;g=color>>8&255;b=color&255;}const hsp=Math.sqrt(0.299*(r*r)+0.587*(g*g)+0.114*(b*b));return hsp>127.5;};Awx.utils.isTrustedImageOrigin=(img)=>{const trustedImageHostnames=drupalSettings&&Array.isArray(drupalSettings.trustedImageHostnames)?drupalSettings.trustedImageHostnames:[];try{return trustedImageHostnames.includes(new URL(img.src).hostname);}catch(e){if(Awx.isDevEnv)console.error('Error checking image origin:',e);return false;}};Awx.utils.isImageLight=(img)=>{return new Promise((resolve)=>{const EXCLUDE_CLASS='img-fallback-excluded';const evaluate=()=>{try{const canvas=document.createElement('canvas');const ctx=canvas.getContext('2d');canvas.width=img.naturalWidth||img.width;canvas.height=img.naturalHeight||img.height;ctx.drawImage(img,0,0,canvas.width,canvas.height);const {data}=ctx.getImageData(0,0,canvas.width,canvas.height);let total=0;let count=0;for(let i=0;i<data.length;i+=4){const r=data[i];const g=data[i+1];const b=data[i+2];const a=data[i+3];if(a===0)continue;total+=Math.sqrt(0.299*(r*r)+0.587*(g*g)+0.114*(b*b));count+=1;}resolve(count===0||total/count>127.5);}catch(e){if(Awx.isDevEnv)console.error('Error evaluating image:',e);resolve(false);}finally{img.classList.remove(EXCLUDE_CLASS);}};if(Awx.utils.isTrustedImageOrigin(img)&&!img.crossOrigin){img.classList.add(EXCLUDE_CLASS);img.crossOrigin='anonymous';const originalSrc=img.src;img.src='';img.src=originalSrc;img.addEventListener('load',evaluate,{once:true});img.addEventListener('error',()=>{img.removeAttribute('crossOrigin');img.src='';img.src=originalSrc;resolve(false);},{once:true});return;}if(img.complete&&img.naturalWidth>0)evaluate();else{img.classList.add(EXCLUDE_CLASS);img.addEventListener('load',evaluate,{once:true});img.addEventListener('error',()=>resolve(false),{once:true});}});};Awx.utils.ucFirst=(string)=>{return string.charAt(0).toUpperCase()+string.slice(1);};Awx.utils.wrap=function(el,wrapper){el.parentNode.insertBefore(wrapper,el);wrapper.appendChild(el);};Awx.utils.inViewport=function(el){const distance=el.getBoundingClientRect();return distance.top>=0&&distance.left>=0&&distance.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&distance.right<=(window.innerWidth||document.documentElement.clientWidth);};Awx.utils.isVisible=function(el){const style=getComputedStyle(el);if(style.display==='none')return false;if(style.visibility!=='visible')return false;if(style.opacity<0.1)return false;const rect=el.getBoundingClientRect();if(el.offsetWidth+el.offsetHeight+rect.height+rect.width===0)return false;return true;};Awx.utils.sanitizeToCSSSelector=function(str){const numberMap={0:'zero',1:'one',2:'two',3:'three',4:'four',5:'five',6:'six',7:'seven',8:'eight',9:'nine'};return str.replace(/[^a-zA-Z0-9_-]/g,'').replace(/\d/g,(char)=>numberMap[char]);};Awx.utils.uniqueId=function(str){return str+'-'+Math.random().toString(36).slice(-5);};Awx.utils.isTouchDevice=()=>'ontouchstart' in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;Awx.utils.getClientTimezoneInfo=function(date){const name=Intl.DateTimeFormat().resolvedOptions().timeZone;const isDST=Awx.utils.isDaylightSavingTime(date);const abbreviation=new Intl.DateTimeFormat('en',{timeZoneName:'shortOffset',timeZone:name}).formatToParts(date).find((part)=>part.type==='timeZoneName').value;return {name,abbreviation,offset:date.getTimezoneOffset(),isDST};};Awx.utils.isDaylightSavingTime=(date)=>{const jan=new Date(date.getFullYear(),0,1);const jul=new Date(date.getFullYear(),6,1);return date.getTimezoneOffset()<Math.max(jan.getTimezoneOffset(),jul.getTimezoneOffset());};Awx.utils.formatTime=(date)=>{return `${String(date.getHours()).padStart(2,'0')}
12:${String(date.getMinutes()).padStart(2,'0')}`;};Awx.utils.formatISO8601=(date)=>{return date.getFullYear()+'-'+String(date.getMonth()+1).padStart(2,'0')+'-'+String(date.getDate()).padStart(2,'0')+'T'+String(date.getHours()).padStart(2,'0')+':'+String(date.getMinutes()).padStart(2,'0')+':'+String(date.getSeconds()).padStart(2,'0')+'.'+String(date.getMilliseconds()).padStart(3,'0')+(date.getTimezoneOffset()>0?'-':'+')+String(Math.floor(Math.abs(date.getTimezoneOffset())/60)).padStart(2,'0')+':'+String(Math.abs(date.getTimezoneOffset())%60).padStart(2,'0');};Awx.utils.formatDuration=(seconds)=>{seconds=parseInt(seconds);const hours=Math.floor(seconds/3600);const minutes=Math.floor(seconds%3600/60);const remaining_sec=seconds%60;return `${String(hours).padStart(2,'0')}:${String(minutes).padStart(2,'0')}:${String(remaining_sec).padStart(2,'0')}`;};Awx.utils.getTimezoneOffsetFromISOString=(isoString)=>{const tzMatch=isoString.match(/([+-])(\d{2}):?(\d{2})$/);if(!tzMatch)return null;const sign=tzMatch[1]==='+'?-1:1;const hours=parseInt(tzMatch[2],10);const minutes=parseInt(tzMatch[3],10);return sign*(hours*60+minutes);};Awx.utils.hasTargetOrBrokenResource=async(element,selector)=>{if(element.querySelector(selector)!==null)return true;const mediaNodes=element.querySelectorAll('img[src], source[src], video[src], link[href]');const urlsToCheck=Array.from(mediaNodes).map((node)=>node.src||node.href).filter((url)=>url&&url.startsWith('http'));if(urlsToCheck.length===0)return false;const checkIsBroken=async(url)=>{try{const response=await fetch(url,{method:'HEAD'});return !response.ok;}catch(error){if(Awx.isDevEnv)console.error(`Error checking ${url}:`,error);return true;}};const results=await Promise.all(urlsToCheck.map((url)=>checkIsBroken(url)));return results.some((isBroken)=>isBroken===true);};; 13Awx.FOCUSABLE_ELEMENTS=['a[href]:not([aria-hidden])','area[href]:not([aria-hidden])','input:not([disabled]):not([type="hidden"]):not([aria-hidden])','select:not([disabled]):not([aria-hidden])','textarea:not([disabled]):not([aria-hidden])','button:not([disabled]):not([aria-hidden])','iframe:not([aria-hidden])','object:not([aria-hidden])','embed:not([aria-hidden])','[contenteditable]:not([aria-hidden])','[tabindex]:not([tabindex^="-"])'];Awx.lastFocusedEl=new Map();Awx.FocusManager=class{static setLastFocusedEl(el,scope){let key=scope.id;if(!key)key=scope;Awx.lastFocusedEl.set(key,el);}static getLastFocusedEl(scope){let key=scope.id;if(!key)key=scope;if(!Awx.lastFocusedEl.has(key))return null;return Awx.lastFocusedEl.get(key);}static getFocusables(scope){const nodes=scope.querySelectorAll(Awx.FOCUSABLE_ELEMENTS);return [...nodes];}static focusNotVisible(el){const focusNotVisibleClass='focus-not-visible';el.focus();el.classList.add(focusNotVisibleClass);el.addEventListener('blur',()=>el.classList.remove(focusNotVisibleClass),{once:true});}static setFocusToFirstFocusable(scope){const lastFocusedEl=Awx.FocusManager.getLastFocusedEl(scope);if(lastFocusedEl&&!lastFocusedEl.classList.contains('not-first-focusable')){Awx.FocusManager.focusNotVisible(lastFocusedEl);return;}const focusables=Awx.FocusManager.getFocusables(scope).filter((node)=>{return !node.classList.contains('not-first-focusable');});if(focusables.length===0)return;Awx.FocusManager.focusNotVisible(focusables[0]);Awx.FocusManager.setLastFocusedEl(focusables[0],scope);}static trapKeyboardNavHandler(e){if(e.key!=='Tab'&&e.key!=='ArrowUp'&&e.key!=='ArrowLeft'&&e.key!=='ArrowDown'&&e.key!=='ArrowRight')return;const scope=e.currentTarget;const focusables=Awx.FocusManager.getFocusables(scope).filter((node)=>{return node.offsetParent!==null;});if(focusables.length===0)return;const previousActiveIndex=focusables.indexOf(document.activeElement);e.preventDefault();if(e.key==='Tab'&&e.shiftKey||e.key==='ArrowUp'||e.key==='ArrowLeft'){if(previousActiveIndex===0){focusables[focusables.length-1].focus();Awx.FocusManager.setLastFocusedEl(focusables[focusables.length-1],scope);return;}focusables[previousActiveIndex-1].focus();Awx.FocusManager.setLastFocusedEl(focusables[previousActiveIndex-1],scope);return;}if(previousActiveIndex===focusables.length-1&&focusables[0]){focusables[0].focus();Awx.FocusManager.setLastFocusedEl(focusables[0],scope);return;}focusables[previousActiveIndex+1].focus();Awx.FocusManager.setLastFocusedEl(focusables[previousActiveIndex+1],scope);}static trapKeyboardNav(scope){const processedClassName=`${Awx.processedClassname}--f`;if(scope.classList.contains(`.${processedClassName}`))return;scope.removeEventListener('keydown',Awx.FocusManager.trapKeyboardNavHandler);scope.addEventListener('keydown',Awx.FocusManager.trapKeyboardNavHandler);}static untrapKeyboardNav(scope){const processedClassName=`${Awx.processedClassname}--f`;scope.classList.remove(`.${processedClassName}`);scope.removeEventListener('keydown',Awx.FocusManager.trapKeyboardNavHandler);}static preventIframeFocus(scope){scope.getElementsByTagName('iframe').onload=()=>{document.activeElement.blur();};}static init(scope,parentScope){const currentScope=parentScope||scope;Awx.FocusManager.trapKeyboardNav(currentScope);Awx.FocusManager.setFocusToFirstFocusable(scope);}};; 14(function(Drupal,Awx){Awx.bootstrap=(namespace,context,settings)=>{const namespaceObj=Awx[namespace];if(!namespaceObj)return;const entries=Object.entries(namespaceObj);if(!entries.length)return;const apply=()=>{for(let i=0;i<entries.length;i++){const [name,func]=entries[i];const className=Awx.utils.ucFirst(name);if(Awx[className]&&Awx[className].requirements&&!Awx.checkRequirements(name,Awx[className].requirements))continue;func.apply(namespaceObj[name],[context,settings]);}};apply();};Awx.bootstrapInit=(context,settings)=>{Awx.bootstrap('init',context,settings);};Awx.bootstrapDestroy=(context,settings)=>{Awx.bootstrap('destroy',context,settings);};Awx.registerModule=(name,module)=>{if(Awx.modules[name])return;Awx.modules[name]=module;};Awx.checkRequirements=(namespace,names)=>{let result=true;
14names.forEach((name)=>{if(!Awx.modules[name]){console.error(`â ï¸ Requirements for "Awx.${namespace}" not fulfilled: "Awx.modules.${name}" is not registered.`);result=false;}});return result;};Awx.attachBehaviors=(scope)=>{if(typeof Drupal.attachBehaviors==='function'&&typeof drupalSettings!=='undefined'&&!scope.processed){scope.processed=true;Drupal.attachBehaviors(scope,drupalSettings);}};Drupal.behaviors.AwxUi={attach(context,settings){const debug=false;if(Awx.isDevEnv&&debug)console.log('%câ AWX UI is loaded\n\n%câ context\n%o\n\nâ settings\n%o\n','font-weight: bold; font-size: 1rem; color: #84bd00;','font-weight: normal; font-size: .875rem;',context,settings);if(settings.user.uid>0)Awx.isAuthenticated=true;Awx.bootstrapInit(context,settings);},detach(context,settings){Awx.bootstrapDestroy(context,settings);}};Awx.FocusManager.preventIframeFocus(document);})(Drupal,Awx);; 15Awx.MenuDrawer=class{constructor(drawer){if(!drawer.id)throw new Error('The menu drawer element must have an id defined');this.drawer=drawer;this.drawerModal=drawer.querySelector('[aria-modal]');this.drawerState=document.getElementById(`${drawer.id}-state`);this.toggler=document.getElementById(`${drawer.id}-toggler`);this.buttons=this.toggler.querySelectorAll('[role=button]');this.innerButtons=this.drawer.querySelectorAll('[role=button]');this.labels=this.toggler.querySelectorAll('label[for]');this.innerLabels=this.drawer.querySelectorAll('label[for]');this.animatedWrappers=this.drawer.querySelectorAll(`.${Awx.prefixCss}-menu-list__wrapper--level0 .${Awx.prefixCss}-menu-list__wrapper`);this.lastOpenedModal=null;}static isOpen(stateEl){return !!stateEl.checked;}static getStateEl(stateId){return document.getElementById(stateId);}static getParentItem(el){return Awx.utils.getClosestAncestor(el,`.${Awx.prefixCss}-menu-list__item`,`.${Awx.prefixCss}-menu-drawer`);}static togglePageScroll(){document.documentElement.classList.toggle(`${Awx.prefixCss}-no-scroll`);}open(stateEl){stateEl.checked=true;this.setLastOpenedModal(stateEl,'open');}close(stateEl){stateEl.checked=false;this.setLastOpenedModal(stateEl,'close');}toggle(stateId){const stateEl=Awx.MenuDrawer.memoizedGetStateEl(stateId);Awx.MenuDrawer.isOpen(stateEl)?this.close(stateEl):this.open(stateEl);}isDrawerOpen(){return Awx.MenuDrawer.isOpen(this.drawerState);}getParentModal(el){if(el===null||el===this.drawer)return null;return Awx.utils.getClosestAncestor(el,'[aria-modal]',`.${Awx.prefixCss}-menu-drawer`);}getClosestModalFromStateEl(stateEl){if(stateEl===this.drawerState)return this.drawerModal;let modal=Awx.utils.getNextSibling(stateEl,'[aria-modal]');if(!modal)modal=this.getParentModal(stateEl);return modal;}setLastOpenedModal(stateEl,direction){if(stateEl===this.drawerState){Awx.MenuDrawer.togglePageScroll();direction='open';}this.lastOpenedModal&&this.lastOpenedModal.classList.remove('opened');if(direction==='open')this.lastOpenedModal=this.getClosestModalFromStateEl(stateEl);if(direction==='close')this.lastOpenedModal=this.getParentModal(stateEl);this.lastOpenedModal.classList.add('opened');}onTransitionsEnd(el){if(el===this.drawer){if(parseInt(window.getComputedStyle(el).left,10)<0){Awx.FocusManager.setFocusToFirstFocusable(this.toggler);return;}el=this.lastOpenedModal||this.drawerModal;return Awx.FocusManager.init(el,null);}const list=el.querySelector('.awx-menu-list');let parent=el;if(!el.hasAttribute('aria-modal'))parent=this.getParentModal(el);if(!Awx.utils.isVisible(list))el=Awx.MenuDrawer.getParentItem(el);Awx.FocusManager.init(el,parent);}bindEscKey(){document.addEventListener('keydown',(event)=>{if(!this.isDrawerOpen())return;if(event.key==='Escape'){const isNotCombined=!(event.ctrlKey||event.altKey||event.shiftKey);if(isNotCombined)this.close(this.drawerState);}});return this;}bindClickOutside(){const onClickOutside=(event)=>{if(!this.isDrawerOpen()||event.target===this.drawerState||event.target===this.drawer||event.target===this.toggler||this.drawer.contains(event.target)||this.toggler.contains(event.target))return;this.close(this.drawerState);};const debounceOnClickOutside=Awx.utils.debounce(onClickOutside,100);document.addEventListener('click',debounceOnClickOutside);return this;}
15bindButtons(){[...this.buttons,...this.innerButtons].forEach((el)=>{const processedClassName=`${Awx.processedClassname}--b`;if(el.classList.contains(processedClassName))return;el.classList.add(processedClassName);const {stateId}=el.dataset;if(!stateId)return;el.addEventListener('click',(e)=>{e.preventDefault();this.toggle(stateId);});});return this;}bindLabels(){[...this.labels,...this.innerLabels].forEach((el)=>{const processedClassName=`${Awx.processedClassname}--l`;if(el.classList.contains(processedClassName))return;el.classList.add(processedClassName);const stateId=el.getAttribute('for');if(!stateId)return;el.addEventListener('click',(e)=>{e.preventDefault();this.toggle(stateId);});});return this;}bindTransitionsEnd(){[this.drawer,...this.animatedWrappers].forEach((el)=>{const processedClassName=`${Awx.processedClassname}--t`;if(el.classList.contains(processedClassName))return;el.classList.add(processedClassName);el.addEventListener('transitionend',(e)=>{e.stopImmediatePropagation();if(e.target!==el)return;this.onTransitionsEnd(el);});});return this;}init(){this.bindEscKey().bindClickOutside().bindButtons().bindLabels().bindTransitionsEnd();}};Awx.MenuDrawer.memoizedGetStateEl=Awx.utils.memoize(Awx.MenuDrawer.getStateEl);; 16Awx.init.menu=function(context){if(context!==window.document)return;function createMenuDrawer(el){el.classList.add(`${Awx.processedClassname}--d`);const drawer=new Awx.MenuDrawer(el);drawer.init();}function createMenuDrawers(){const drawers=document.querySelectorAll(`.${Awx.prefixCss}-menu-drawer:not(.${Awx.processedClassname}--d)`);drawers.forEach((el)=>createMenuDrawer(el));}createMenuDrawers();};; 17(function(Drupal){'use strict';function camelize(str){return str.replace(/([-_]\w)/g,(g)=>g[1].toUpperCase());}const piwikHelper={context:document,queueName:'_paq',processedClassName:`processed-paq`,trackEventModel:{category:'paq-category',action:'paq-action',name:'paq-name',value:'paq-value',dimensions:'paq-dimensions'},grantedOrigins:new Map([[window.origin,true]]),init:function(context){this.context=context;this.registerClick().registerMessage();},registerClick:function(context){const ctx=context||this.context||document;ctx.querySelectorAll(`[data-${this.trackEventModel.category}]:not(.${this.processedClassName})`).forEach((el)=>{el.classList.add(this.processedClassName);el.addEventListener('click',(e)=>{const payload=['trackEvent'];let property,dataProperty;for(property in this.trackEventModel){dataProperty=camelize(this.trackEventModel[property]);if(el.dataset[dataProperty])payload.push(el.dataset[dataProperty]);}this.track(payload);});});return this;},registerMessage:function(){if(this.context!==document)return this;window.addEventListener('message',(e)=>{if(!this.grantedOrigins.has(e.origin))return;if(e.data.paqEvent){const payload=['trackEvent'];let property;for(property in this.trackEventModel)if(e.data.paqEvent[property])payload.push(e.data.paqEvent[property]);this.track(payload);}},false);return this;},track:function(payload){if(payload.length===0)return;if(window[this.queueName]===undefined)window[this.queueName]=[];window[this.queueName].push(payload);}};Drupal.behaviors.airbusPiwikHelper={attach:function(context,settings){once('airbusPiwikHelper','html',document).forEach(()=>{piwikHelper.init(document);});piwikHelper.registerClick(context);}};})(Drupal);; 18(function(Drupal,drupalSettings,once){'use strict';const EVENT_NAME='airbus_keepeek:image_error';const FALLBACK_CLASS='img-fallback-applied';const EXCLUDE_CLASS='img-fallback-excluded';const OVERLAY_CLASS='img-error-overlay';const WRAPPER_CLASS='img-error-wrapper';const ImageCache={_cache:new Map(),_maxSize:50,getKey(url,width,height){return `${url}_${width}x${height}`;},get(url,width,height){return this._cache.get(this.getKey(url,width,height));},set(url,width,height,dataUrl){const key=this.getKey(url,width,height);if(this._cache.size>=this._maxSize){const firstKey=this._cache.keys().next().value;this._cache.delete(firstKey);}this._cache.set(key,dataUrl);}};
18function extractDimensionsFromUrl(url){try{const urlObject=new URL(url);const width=urlObject.searchParams.get('w');const height=urlObject.searchParams.get('h');return {width:width?parseInt(width,10):null,height:height?parseInt(height,10):null};}catch{return {width:null,height:null};}}function extractHostname(url){try{return new URL(url).hostname;}catch{return null;}}function createCenterCroppedImage(imageUrl,targetWidth,targetHeight){const cached=ImageCache.get(imageUrl,targetWidth,targetHeight);if(cached)return Promise.resolve(cached);return new Promise((resolve,reject)=>{if(!targetWidth||!targetHeight||targetWidth<=0||targetHeight<=0){reject(new Error('Invalid target dimensions'));return;}const img=new Image();img.crossOrigin='anonymous';img.onload=function(){const canvas=document.createElement('canvas');const ctx=canvas.getContext('2d');if(!ctx){reject(new Error('Canvas context not available'));return;}canvas.width=targetWidth;canvas.height=targetHeight;const {naturalWidth:sourceWidth,naturalHeight:sourceHeight}=img;const targetAspect=targetWidth/targetHeight;const sourceAspect=sourceWidth/sourceHeight;let cropWidth,cropHeight,cropX,cropY;if(sourceAspect>targetAspect){cropHeight=sourceHeight;cropWidth=sourceHeight*targetAspect;cropX=(sourceWidth-cropWidth)/2;cropY=0;}else{cropWidth=sourceWidth;cropHeight=sourceWidth/targetAspect;cropX=0;cropY=(sourceHeight-cropHeight)/2;}ctx.drawImage(img,cropX,cropY,cropWidth,cropHeight,0,0,targetWidth,targetHeight);const dataUrl=canvas.toDataURL('image/jpeg',0.7);ImageCache.set(imageUrl,targetWidth,targetHeight,dataUrl);resolve(dataUrl);};img.onerror=()=>reject(new Error('Failed to load image'));img.src=imageUrl;});}function dispatchImageError(url,element){const errorEvent=new CustomEvent(EVENT_NAME,{detail:{failed_url:url,page:window.location.href,element,timestamp:Date.now()}});
18if(document.readyState==='complete')document.dispatchEvent(errorEvent);else window.addEventListener('load',()=>{document.dispatchEvent(errorEvent);},{once:true});}function cleanupPictureElement(imgElement){const parent=imgElement.parentElement;if(parent?.tagName==='PICTURE'){const sources=parent.querySelectorAll('source');sources.forEach((source)=>source.remove());}}function applyFallbackStyles(imgElement){imgElement.removeAttribute('srcset');imgElement.removeAttribute('sizes');imgElement.setAttribute('alt','');imgElement.removeAttribute('title');imgElement.style.cssText+='object-fit: cover; object-position: center center;';}function createErrorOverlay(imgElement,dimensions){if(imgElement.parentElement?.classList.contains(WRAPPER_CLASS))return;const wrapper=document.createElement('div');wrapper.className=WRAPPER_CLASS;wrapper.style.cssText=` 19 position: relative; 20 display: inline-block; 21 width: 100%; 22 height: 100%; 23 `;const overlay=document.createElement('div');overlay.className=OVERLAY_CLASS;overlay.textContent=Drupal.t('Invalid image');overlay.style.cssText=` 24 position: absolute; 25 top: 50%; 26 left: 50%; 27 transform: translate(-50%, -50%); 28 background-color: rgba(40, 40, 40, 0.75); 29 color: white; 30 padding: 4px 8px; 31 border-radius: 2px; 32 font-size: 13px; 33 font-weight: 400; 34 font-style: italic; 35 pointer-events: none; 36 text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); 37 z-index: 99; 38 mix-blend-mode: luminosity; 39 `;imgElement.parentNode.insertBefore(wrapper,imgElement);wrapper.appendChild(imgElement);wrapper.appendChild(overlay);}function handleImageError(event,config){const target=event.target;if(!target||target.tagName!=='IMG')return;if(target.classList.contains(FALLBACK_CLASS)||target.classList.contains(EXCLUDE_CLASS))return;const failedUrl=target.currentSrc||target.src||'';if(!failedUrl)return;if(failedUrl.startsWith('data:')||failedUrl.startsWith('blob:'))return;const imageHostname=extractHostname(failedUrl);if(!imageHostname||!config.trustedHostnames.includes(imageHostname))return;const defaultUrlFull=config.defaultImageUrl.startsWith('http')?config.defaultImageUrl:window.location.origin+config.defaultImageUrl;if(failedUrl===config.defaultImageUrl||failedUrl===defaultUrlFull)return;target.classList.add(FALLBACK_CLASS);target.dataset.airbusKeepeekFallback='1';const dimensions=extractDimensionsFromUrl(failedUrl);const hadAltOrTitle=target.hasAttribute('alt')&&target.alt!==''||target.hasAttribute('title');cleanupPictureElement(target);applyFallbackStyles(target);if(hadAltOrTitle)createErrorOverlay(target,dimensions);if(dimensions.width&&dimensions.height)createCenterCroppedImage(config.defaultImageUrl,dimensions.width,dimensions.height).then((croppedDataUrl)=>{target.src=croppedDataUrl;}).catch(()=>{target.src=config.defaultImageUrl;});else target.src=config.defaultImageUrl;setTimeout(()=>{dispatchImageError(failedUrl,target);},0);}Drupal.behaviors.airbusKeepeekImageFallback={attach(context,settings){once('airbusKeepeekImgError',document.documentElement,context).forEach(()=>{const defaultImageUrl=settings?.website_default_image;const trustedHostnames=Array.isArray(settings?.trustedImageHostnames)?settings.trustedImageHostnames:[];if(!defaultImageUrl){console.warn('[Airbus Keepeek] Missing drupalSettings.website_default_image parameter.');return;}if(trustedHostnames.length===0)console.warn('[Airbus Keepeek] Missing or empty drupalSettings.trustedImageHostnames array.');const config=Object.freeze({defaultImageUrl,trustedHostnames});document.addEventListener('error',(event)=>handleImageError(event,config),true);const scanExistingBrokenImages=()=>{document.querySelectorAll('img').forEach((img)=>{if(img.classList.contains(FALLBACK_CLASS))return;if(img.complete&&img.naturalWidth===0&&img.src)handleImageError({target:img},config);else{if(!img.complete)img.addEventListener('error',(event)=>handleImageError(event,config),{once:true});}});};
39if(document.readyState==='complete')scanExistingBrokenImages();else{window.addEventListener('load',scanExistingBrokenImages,{once:true});scanExistingBrokenImages();}});}};})(Drupal,drupalSettings,once);; 40(function(Drupal,once){'use strict';Drupal.behaviors.keepeekImageErrorTracker={attach(context){once('keepeekImageErrorTracker',document.documentElement,context).forEach(()=>{document.addEventListener('airbus_keepeek:image_error',(event)=>{if(typeof _paq!=='undefined')_paq.push(['trackEvent','Keepeek Image Error','Failed',event.detail.failed_url]);});});}};})(Drupal,once);; 41Awx.DialogBase=class{constructor(dialog,state,opener){this.dialog=dialog;this.state=state;this.opener=opener;this.labels=document.querySelectorAll(`label[for="${this.state.id}"]`);}applies(){return this.dialog.getAttribute('role')==='dialog';}escKeyDownHandler(e){if(e.key==='Escape'){const isNotCombined=!(e.ctrlKey||e.altKey||e.shiftKey);if(isNotCombined)this.close();}}clickOutsideHandler(e){let isLabel=false;if(this.labels)this.labels.forEach((node)=>{if(node===e.target||node.contains(e.target))isLabel=true;});if(isLabel||e.target===this.dialog||this.dialog.contains(e.target))return;this.close();}focusHandler(){Awx.FocusManager.init(this.dialog,null);}onOpen(){if(!this.applies())return;document.addEventListener('keydown',this.escKeyDownHandler.bind(this));document.addEventListener('click',this.clickOutsideHandler.bind(this),{once:true});this.dialog.addEventListener('transitionend',this.focusHandler.bind(this),{once:true});}focusOnClose(){Awx.FocusManager.untrapKeyboardNav(this.dialog);if(!this.opener)return;this.opener.focus();}uncheckState(){this.state.checked=false;setTimeout(()=>{const change=new Event('change');this.state.dispatchEvent(change);},0);}close(){if(!this.applies())return;document.removeEventListener('keydown',this.escKeyDownHandler);document.removeEventListener('click',this.clickOutsideHandler);this.dialog.removeEventListener('transitionend',this.focusHandler);this.uncheckState();}};; 42Awx.Search=class{static handleHeaderForm(){const searchForm=document.getElementById('airbus-header-search-form');if(!searchForm)return;const target=document.querySelector('[data-mobile-search-form-placeholder]');if(!target)return;Awx.utils.move(searchForm,target,'(max-width: 63.9375em)');}static handlePageForm(scope){if(!scope.classList||!scope.classList.contains(`${Awx.prefixCss}-search__view`))return;const parentEl=Awx.utils.getClosestAncestor(scope,'.node--search[data-header-title]');if(!parentEl)return;const headerTitle=parentEl.getAttribute('data-header-title');const headerSubtitle=parentEl.getAttribute('data-header-subtitle')??'';const headerTitleEl=scope.querySelector(`.${Awx.prefixCss}-header__title`);if(headerTitleEl&&headerTitleEl.innerHTML===''){headerTitleEl.innerHTML=headerTitle;if(headerSubtitle){const headerSubtitleEl=document.createElement('p');headerSubtitleEl.classList.add(`${Awx.prefixCss}-header__subtitle`);headerSubtitleEl.textContent=headerSubtitle;headerTitleEl.after(headerSubtitleEl);}}}static handleExposedForm(){const form=document.querySelector('[data-drupal-selector="views-exposed-form-global-search-general-search"]');if(form)form.classList.add(`${Awx.prefixCss}-search__view--ready`);}};Awx.Search.handleHeaderFormOnce=Awx.utils.once(Awx.Search.handleHeaderForm);Awx.Search.handlePageFormOnce=Awx.utils.once(Awx.Search.handlePageForm);Awx.Search.handleExposedFormOnce=Awx.utils.once(Awx.Search.handleExposedForm);Awx.init.Search=function(scope){Awx.Search.handleHeaderFormOnce();Awx.Search.handlePageForm(scope);Awx.Search.handleExposedFormOnce();};; 43Awx.ExternalLinks=class{static init(scope){const {hostname}=window.location;Array.from(scope.querySelectorAll('a[href^="http://"]:not([rel="external"]):not([target="_blank"]),'+' a[href^="https://"]:not([rel="external"]):not([target="_blank"])')).filter((a)=>a.hostname!==hostname&&a.hostname!=='example.com'&&a.closest('.no-external-link-icon')===null).map((a)=>{a.setAttribute('rel','external noreferrer noopener');a.setAttribute('target','_blank');});Awx.ExternalLinks.applyIconColor(scope);}static applyIconColor(scope){scope.querySelectorAll('a[target="_blank"]').forEach((a)=>{if(a.closest('.no-external-link-icon')!==null)return;const img=a.querySelector('img');if(img){Awx.utils.isImageLight(img).then((isLight)=>{if(!isLight)a.classList.add('awx-icon--white');});return;}const {color}=window.getComputedStyle(a);if(Awx.utils.isColorLight(color))a.classList.add('awx-icon--white');});}};Awx.ExternalLinks.initOnce=Awx.utils.once(Awx.ExternalLinks.init);Awx.init.ExternalLinks=function(scope){Awx.ExternalLinks.initOnce(scope);};; 44Awx.image=class{static setOrientation(img){if(img.naturalHeight>
44img.naturalWidth){img.dataset.awxOrientation='portrait';return;}if(img.naturalHeight===img.naturalWidth){img.dataset.awxOrientation='square';return;}img.dataset.awxOrientation='landscape';}static process(img){const resizeObserver=new ResizeObserver((entries)=>{entries.forEach((entry)=>{if(entry.target===img)Awx.image.setOrientation(img);});});resizeObserver.observe(img);}static init(context){const images=context.querySelectorAll('img');images.forEach((img)=>Awx.image.process(img));}};Awx.init.image=function(context){Awx.image.init(context);};; 45Awx.Card=class{constructor(el){const processedClassName=`${Awx.processedClassname}--cd`;el.classList.add(processedClassName);this.el=el;this.content=el.querySelector(`.${Awx.prefixCss}-card__content`);this.title=el.querySelector(`.${Awx.prefixCss}-card__title`);window.addEventListener('resize',Awx.utils.debounce(this.reset.bind(this),0));this.reset();this.bindTitle();}reset(){const {lineHeight,paddingBottom,marginBottom}=window.getComputedStyle(this.title);const parsedPadding=parseFloat(paddingBottom);const parsedMargin=parseFloat(marginBottom);const parsedHeight=Math.round(this.title.clientHeight-parsedPadding-parsedMargin);const parsedLineHeight=parseFloat(lineHeight);const lineCount=Math.round(parsedHeight/parsedLineHeight);this.content.style.setProperty('--title-line-count',Drupal.checkPlain(lineCount));this.content.style.setProperty('--title-height',`${Drupal.checkPlain(parsedHeight)}px`);}bindTitle(){const query='(min-width: 80em)';const mediaQuery=window.matchMedia(query);const mouseEnter=()=>{this.title.ariaExpanded='true';};const mouseLeave=()=>{this.title.ariaExpanded='false';};const onMediaQueryChange=()=>{if(mediaQuery.matches){this.title.ariaExpanded='false';this.el.addEventListener('mouseenter',mouseEnter);this.el.addEventListener('mouseleave',mouseLeave);return;}this.el.removeEventListener('mouseenter',mouseEnter);this.el.removeEventListener('mouseleave',mouseLeave);this.title.ariaExpanded='undefined';};mediaQuery.addEventListener('change',onMediaQueryChange);onMediaQueryChange();}static init(scope){scope.querySelectorAll(`.${Awx.prefixCss}-card--overlay-rect`).forEach((el)=>{if(!el.card)el.card=new Awx.Card(el);});}};Awx.Card.initOnce=Awx.utils.once(Awx.Card.init);Awx.init.Card=function(scope){Awx.Card.initOnce(scope);};; 46Awx.Carousel=class{constructor(el){this.el=el;window.addEventListener('resize',Awx.utils.debounce(this.create.bind(this),0));this.create();}create(){this.destroy();this.slides=this.el.querySelector(`.${Awx.Carousel.prefixCss}__slides`);this.count=this.slides.childElementCount;if(this.count<=1)return;const inlinePadding=parseInt(getComputedStyle(this.el).getPropertyValue('--carousel-inline-padding'))||0;if(this.slides.scrollWidth-inlinePadding*2<=this.el.clientWidth){this.el.classList.add(`${Awx.Carousel.prefixCss}--unbound`);return;}this.el.classList.remove(`${Awx.Carousel.prefixCss}--unbound`);this.slides.scrollLeft=0;this.options={autoplay:false,hasControls:true,controlsPosition:'default',hasIndicator:true,hasIndicators:false,indicatorsLabel:null,appendControlsTo:null,unboundLast:false,shrink:1,slideNavigation:false};this.controls=[];this.indicator=null;this.indicators=null;this.progress=null;this.info=null;this.index=0;this.prevIndex=0;this.nextIndex=0;this.maxIndex=this.count-1;this.cols=1;this.steps=this.count;this.direction='next';this.scrollEndHandler=null;this.scrollHandler=null;this.items=Array.from(this.slides.children);this.observers=[];this.positions=[];this.init();}destroy(){this.unbindScrollEnd();if(!this.options)return;if(this.options.hasIndicator){const indicator=this.el.querySelector(`.${Awx.Carousel.prefixCss}__indicator`);if(indicator)indicator.remove();this.indicator=null;}if(this.options.hasIndicators){const indicators=this.el.querySelector(`.${Awx.Carousel.prefixCss}__indicators`);if(indicators)indicators.remove();this.indicator=null;}this.controls.forEach((el)=>el.remove());}init(){this.setOptions();this.setVisibilityAndData();this.setPositions();this.countCols();this.createControls();this.bindEl();this.bindScrollEnd();this.bindSlideNavigation();this.createIndicator();this.createIndicators();this.setState(0);}setVisibilityAndData(){this.slides.style.setProperty('--carousel-item-shrink',`${this.options.shrink}`);
46this.items.forEach((item,i)=>{item.dataset.inView='0';const itemEndBoundary=(item.offsetLeft+item.offsetWidth)*0.99;if(itemEndBoundary<=this.el.offsetWidth)item.dataset.inView='1';item.dataset.index=`${i}`;item.style.setProperty('--carousel-index',`${i}`);this.observeItemVisibility(item,i);});}setPositions(){this.items.forEach((item,i)=>{this.positions[i]=item.offsetLeft;});}setOptions(){if(!this.el.dataset.awxCarouselOptions)return;this.options=Object.assign(this.options,JSON.parse(this.el.dataset.awxCarouselOptions));if(this.options.unboundLast)this.options.slideNavigation=true;this.options.shrink=parseFloat(`${this.options.shrink}`);if(this.options.shrink>1)this.options.shrink=1;}countCols(){const inView=this.slides.querySelectorAll(`.${Awx.Carousel.prefixCss}__slide[data-in-view="1"]`);if(!this.options.unboundLast){this.cols=inView.length||1;this.steps=this.count-this.cols+1;this.maxIndex=this.steps-1;this.positions=this.positions.slice(0,this.maxIndex);this.positions[this.maxIndex]=this.slides.scrollWidth-this.el.clientWidth;}if(this.options.unboundLast)this.items[this.maxIndex].style.width=`${this.el.clientWidth}px`;}observeItemVisibility(item,i){this.observers[i]=new IntersectionObserver((entries)=>{entries.forEach((entry)=>{entry.target.dataset.inView=entry.isIntersecting?'1':'0';});},{root:null,rootMargin:'0px',threshold:[0.9]});this.observers[i].observe(item);}setState(index){this.prevIndex=this.index;this.index=index;this.nextIndex=index;this.checkBoundaries();this.setActive();this.updateProgress();this.updateInfo();this.updateControls();this.applyShrink();}checkBoundaries(){if(this.nextIndex>this.maxIndex)this.nextIndex=this.maxIndex;if(this.nextIndex<0)this.nextIndex=0;if(this.index>this.maxIndex)this.index=this.maxIndex;if(this.index<0)this.index=0;if(this.prevIndex>this.index)this.direction='prev';else this.direction='next';}updateControls(){let buttonPrev;let buttonNext;const selector=`${Awx.Carousel.prefixCss}__controls`;this.controls.forEach((el)=>{buttonPrev=el.querySelector(`.${selector}__prev`);buttonNext=el.querySelector(`.${selector}__next`);buttonPrev.disabled=this.index===0;buttonNext.disabled=this.index===this.maxIndex;});}setActive(){this.items[this.prevIndex].classList.remove(`${Awx.Carousel.prefixCss}__slide--active`);this.items[this.index].classList.add(`${Awx.Carousel.prefixCss}__slide--active`);if(this.indicators){this.indicators.forEach((indicator)=>indicator.classList.remove('is-active'));if(this.indicators[this.index])this.indicators[this.index].classList.add('is-active');}this.applySlideNavigation();}applySlideNavigation(){if(this.options.slideNavigation){this.items[this.index].removeAttribute('role');this.items[this.index].style.cursor='auto';this.items[this.prevIndex].setAttribute('role','button');this.items[this.prevIndex].style.cursor='pointer';}}applyShrink(){if(this.options.shrink<1){const itemWidth=getComputedStyle(this.el).getPropertyValue('--carousel-item-width');const itemWidthValue=parseInt(itemWidth,10);const itemWidthUnit=itemWidth.replace(`${itemWidthValue}`,'');const shrinkedWidth=`${itemWidthValue*this.options.shrink}${itemWidthUnit}`;let gridTemplateColums='';this.items.forEach((item,index)=>{if(index===this.index){gridTemplateColums+=`${itemWidth} `;return;}gridTemplateColums+=`${shrinkedWidth} `;});this.slides.style.gridTemplateColumns=gridTemplateColums;this.setPositions();}}createIndicator(){if(!this.options.hasIndicator)return;if(!this.indicator){const selector=`${Awx.Carousel.prefixCss}__indicator`;const indicator=document.createRange().createContextualFragment(Awx.Carousel.indicatorTemplate(selector));this.slides.parentNode.insertBefore(indicator,this.slides.nextSibling);this.indicator=this.slides.parentNode.querySelector(`.${selector}`);this.progress=this.slides.parentNode.querySelector(`.${selector}__progress`);this.info=this.slides.parentNode.querySelector(`.${selector}__info`);}}createIndicators(){if(!this.options.hasIndicators)return;if(!this.indicators){const id=`${this.el.id}-indicators`;const heading=`Carousel #${id}`;let indicators=document.querySelector(`#${id}`);if(!indicators){indicators=document.createRange().createContextualFragment(Awx.Carousel.indicatorsTemplate(id,this.count,heading));this.slides.parentNode.insertBefore(indicators,this.slides.nextSibling);}this.indicators=this.el.querySelectorAll(`#${id} .${Awx.Carousel.prefixCss}__indicators-item`);this.createIndicatorsLabel();setTimeout(this.bindIndicators.bind(this),0);}}createIndicatorsLabel(){if(!this.indicators||!this.options.indicatorsLabel)return;
46this.items.forEach((item,index)=>{if(this.options.indicatorsLabel==='img[title]'){const img=item.querySelector('img[title]');if(!img)return;const label=document.createElement('span');label.innerText=img.title;label.classList.add(`${Awx.Carousel.prefixCss}__indicators-label`);this.indicators[index].appendChild(label);}});}createControls(){if(!this.options.hasControls)return;const selector=`${Awx.Carousel.prefixCss}__controls`;const createFragment=()=>{return document.createRange().createContextualFragment(Awx.Carousel.controlsTemplate(selector,this.slides.id,this.options.controlsPosition));};if(!this.controls.length){this.slides.parentNode.insertBefore(createFragment(),this.slides.nextSibling);this.controls=[this.slides.parentNode.querySelector(`.${selector}`)];if(this.options.appendControlsTo)document.querySelectorAll(this.options.appendControlsTo).forEach((el)=>{el.appendChild(createFragment());this.controls.push(el.querySelector(`.${selector}`));});}this.bindControls();}bindEl(){this.el.tabIndex=0;this.el.addEventListener('keydown',Awx.utils.throttle(this.onKeydown.bind(this),0));}bindControls(){if(!this.options.hasControls||!this.controls.length)return;const selector=`${Awx.Carousel.prefixCss}__controls`;let buttonPrev;let buttonNext;this.controls.forEach((el)=>{buttonPrev=el.querySelector(`.${selector}__prev`);buttonNext=el.querySelector(`.${selector}__next`);if(this.el.classList.contains(`${Awx.Carousel.prefixCss}--dark`)){buttonPrev.classList.add('awx-button__primary');buttonNext.classList.add('awx-button__primary');}buttonPrev.addEventListener('click',(e)=>{e.preventDefault();this.previous();});buttonNext.addEventListener('click',(e)=>{e.preventDefault();this.next();});});}bindIndicators(){this.indicators.forEach((indicator)=>{indicator.addEventListener('click',()=>{const index=parseInt(indicator.dataset.index,10);this.indicators[index].classList.add('is-active');this.goTo(index);});});}bindSlideNavigation(){if(this.options.slideNavigation)this.items.forEach((el)=>{const index=parseInt(el.dataset.index,10);if(index!==this.index){el.style.cursor='pointer';el.setAttribute('role','button');}el.addEventListener('click',()=>{if(index===this.index)return;this.goTo(index);});});}bindScrollEnd(){if(this.scrollEndHandler)return;this.scrollEndHandler=Awx.utils.debounce(this.onScrollEnd.bind(this),0);if('onscrollend' in window)this.slides.addEventListener('scrollend',this.scrollEndHandler.bind(this));else{let isScrolling;this.scrollHandler=(event)=>{event.preventDefault();clearTimeout(isScrolling);if(!this.scrollEndHandler)return;isScrolling=setTimeout(this.scrollEndHandler.bind(this),60);};this.slides.addEventListener('scroll',this.scrollHandler.bind(this),false);}}unbindScrollEnd(){if(!this.scrollEndHandler)return;if('onscrollend' in window)this.slides.removeEventListener('scrollend',this.scrollEndHandler);else{if(!this.scrollHandler)return;this.slides.removeEventListener('scroll',this.scrollHandler,false);}}animate(){this.slides.scrollTo({top:0,left:this.positions[this.nextIndex],behavior:'auto'});}updateProgress(){if(!this.options.hasIndicator)return;const width=this.indicator?.clientWidth/this.steps*(this.nextIndex+1);this.progress.style.width=`${width}px`;}updateInfo(){if(!this.options.hasIndicator)return;this.info.innerHTML=`${this.nextIndex+1}/${this.steps}`;}previous(){let prev_index=this.index-1;if(prev_index<0)this.end();this.goTo(prev_index);}next(){let next_index=this.index+1;if(next_index>this.maxIndex)this.start();this.goTo(next_index);}start(){this.goTo(0);}end(){this.goTo(this.maxIndex);}goTo(index){this.setState(index);if(index<0||index>this.maxIndex)return;this.animate();}onScrollEnd(){const inView=this.slides.querySelector(`.${Awx.Carousel.prefixCss}__slide[data-in-view="1"]`);if(!inView)return;let {index}=inView.dataset;index=parseInt(index,10);this.setState(index);}onKeydown(event){let stop=false;let blur=false;switch(event.code){case 'ArrowLeft':this.previous();stop=true;break;case 'ArrowRight':this.next();stop=true;break;case 'Tab':if(event.shiftKey){this.previous();if(this.index===0)blur=true;stop=true;break;}if(this.index===this.maxIndex)blur=true;this.next();stop=true;break;case 'Home':this.start();stop=true;break;case 'End':this.end();stop=true;break;default:break;}if(blur)document.activeElement.blur();if(stop){event.stopPropagation();event.preventDefault();}}static controlsTemplate(selector,id,position,accessible=false){const a11yAttributes=accessible?` aria-controls="${id}"`:` tabindex="-1" aria-hidden="true"`;return ` 47<div class="${selector} ${selector}--${position} awx--fade-in"> 48 <button class="awx-button awx-button__border ${selector}__prev"${a11yAttributes}> 49 <span class="visually-hidden"> 50 ${Drupal.t(`Previous Slide`)}
50 51 </span> 52 <svg width="24" height="24" viewbox="0 0 24 24" class="awx-icon awx-icon--chevron-left" role="img" focusable="false" aria-hidden="true"> 53 <use xlink:href="#awx-icon-chevron-left" /> 54 </svg> 55 </button> 56 <button class="awx-button awx-button__border ${selector}__next"${a11yAttributes}> 57 <span class="visually-hidden"> 58 ${Drupal.t(`Next Slide`)} 59 </span> 60 <svg width="24" height="24" viewbox="0 0 24 24" class="awx-icon awx-icon--chevron-right" role="img" focusable="false" aria-hidden="true"> 61 <use xlink:href="#awx-icon-chevron-right" /> 62 </svg> 63 </button> 64</div> 65`;}static indicatorTemplate(selector){return ` 66<div class="${selector} awx--fade-in"> 67 <div class="${selector}__progress"></div> 68 <div class="${selector}__info"></div> 69</div> 70`;}static indicatorsTemplate(id,count,heading){let items='';let i=0;for(i=0;i<count;i++)items+=`<li class="${Awx.Carousel.prefixCss}__indicators-list-item"> 71 <button id="${id}-${i+1}" class="${Awx.Carousel.prefixCss}__indicators-item ${Awx.Carousel.prefixCss}__indicator-item--${i+1}" data-index="${i}"> 72 <span class="visually-hidden"> 73 ${Drupal.t(`slide index, heading`,{index:`${i+1}`,heading})} 74 </span> 75 </button> 76</li>`;return `<ul id="${id}" class="${Awx.Carousel.prefixCss}__indicators awx--fade-in"> 77${items} 78</ul>`;}static createCarousels(scope){const processedClassName=`${Awx.processedClassname}--cs`;scope.querySelectorAll(`[data-awx-carousel]:not(.${processedClassName})`).forEach((el)=>{el.classList.add(processedClassName);new Awx.Carousel(el);});}};Awx.Carousel.prefixCss=`${Awx.prefixCss}-carousel`;Awx.init.Carousel=function(scope){Awx.Carousel.createCarousels(scope);};; 79Awx.Chip=class{static bindCheckbox(scope){const processedClassName=`${Awx.processedClassname}--cb`;scope.querySelectorAll(`.${Awx.prefixCss}-chip--checkbox:not(${processedClassName})`).forEach((el)=>{el.classList.add(processedClassName);const checkbox=el.querySelector('input[type="checkbox"]');if(!checkbox)return;if(checkbox.checked)el.classList.add('is-active');checkbox.addEventListener('change',()=>{el.classList.toggle('is-active',!!checkbox.checked);});});}static init(scope){Awx.Chip.bindCheckbox(scope);}};Awx.init.Chip=function(scope){Awx.Chip.init(scope);};; 80Awx.init.dc=function(context){if(context!==window.document)return;Awx.utils.toggleNamespaceWithShortcut({keys:['ctrlKey','altKey','shiftKey','Ã'],namespace:'directorscut',element:'body'});};; 81Awx.MenuSecondary=class{static init(){const menuSecondary=document.querySelector('.awx-menu-secondary .awx-menu-list__wrapper--level0');if(!menuSecondary)return;const target=document.querySelector('[data-mobile-secondary-menu-placeholder]');if(!target)return;const minWidth=getComputedStyle(document.body).getPropertyValue('--awx-menu-secondary-min-width').trim()||'79em';Awx.utils.move(menuSecondary,target,`(max-width: ${minWidth})`,function(mediaQuery,el){const whiteIcons=el.querySelectorAll('.awx-icon--white, [data-icon-color="white"]');if(mediaQuery.matches)whiteIcons.forEach((icon)=>{icon.classList.remove('awx-icon--white');icon.dataset.iconColor='white';});else whiteIcons.forEach((icon)=>{icon.classList.add('awx-icon--white');});});}};Awx.MenuSecondary.initOnce=Awx.utils.once(Awx.MenuSecondary.init);Awx.init.MenuSecondary=function(){Awx.MenuSecondary.initOnce();};; 82Awx.StickyHeader=class{static buildThresholdList(numSteps){const thresholds=[];let i;let ratio;for(i=1.0;i<=numSteps;i++){ratio=i/numSteps;thresholds.push(ratio);}thresholds.push(0);return thresholds;}static init(){const processedClassName=`${Awx.processedClassname}--s`;const header=document.querySelector(`.awx-page-header-group:not(.${processedClassName})`);if(!header)return;header.classList.add(processedClassName);const target=document.querySelector('.awx-page-content-group');const initialTop=parseInt(window.getComputedStyle(header).top,10);const maxY=initialTop;const minY=-1*header.clientHeight+initialTop;const increment=header.clientHeight;const threshold=increment*2;const minScroll=target.clientTop+threshold;const stickyHeaderH=56;const initialHeaderH=header.clientHeight;const maxScroll=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight-threshold;const margin=maxScroll/4;const options={root:null,rootMargin:`${margin}px`,threshold:Awx.StickyHeader.buildThresholdList(header.clientHeight)};let headerY=0;let headerH=initialHeaderH;const updateHeader=(direction)=>{let stickyTop=0;if(direction==='down')headerY-=increment;if(direction==='up'){headerY+=increment;stickyTop=headerH;}if(headerY>maxY||window.scrollY<=minScroll){headerY=maxY;stickyTop+=headerY;}if(headerY<minY||window.scrollY>=maxScroll){headerY=minY;stickyTop=initialTop;}if(window.scrollY<=minScroll)headerH=initialHeaderH;else headerH=stickyHeaderH;header.style.top=`${headerY}px`;document.documentElement.style.setProperty('--awx-header-height',`${headerH}px`);document.documentElement.style.setProperty('--awx-sticky-top',`${stickyTop}px`);if(document.documentElement.scrollTop<=headerH){if(document.documentElement.classList.contains('is-scrolling'))document.documentElement.classList.remove('is-scrolling');}else{if(!document.documentElement.classList.contains('is-scrolling'))document.documentElement.classList.add('is-scrolling');}};let previousY=0;const handler=(entries)=>
82{entries.forEach((entry)=>{let direction;const currentY=entry.boundingClientRect.y;if(currentY<previousY)direction='down';else{if(currentY>previousY)direction='up';}previousY=currentY;updateHeader(direction);});};const observer=new IntersectionObserver(handler,options);observer.observe(target);updateHeader('down');}};Awx.init.stickyHeader=function(context){if(context!==window.document)return;Awx.StickyHeader.init();};; 83Awx.ShowMore=class{constructor(el){const processedClassName=`${Awx.processedClassname}--sm`;el.classList.add(processedClassName);this.el=el;this.state=el.querySelector(`.${Awx.prefixCss}-show-more-state`);this.toggler=el.querySelector(`.${Awx.prefixCss}-show-more-toggler`);this.toggler.classList.add('is-hidden');this.content=el.querySelector(`.${Awx.prefixCss}-show-more__content`);this.inner=el.querySelector(`.${Awx.prefixCss}-show-more__content-inner`);this.state.addEventListener('change',()=>{this.reset();});window.addEventListener('resize',Awx.utils.debounce(this.reset.bind(this),0));this.reset();}bootstrap(){if(this.state.checked){this.open();return;}this.close();}isDisabled(){const limit=parseFloat(this.el.getAttribute('data-enable-limit'));if(Number.isNaN(limit))return false;return this.el.clientWidth>=limit;}disable(){this.toggler.classList.add('is-hidden');this.content.style.height='auto';}reset(){this.toggler.classList.add('is-hidden');if(this.isDisabled()){this.disable();return;}const maxLines=this.getMaxLines();const lines=this.measureLines();const clipAt=this.getClipOffset(lines,maxLines);this.startHeight=this.getContentHeight(clipAt===false?this.inner.scrollHeight:clipAt);if(clipAt!==false)this.toggler.classList.remove('is-hidden');this.bootstrap();}getMaxLines(){const maxLines=parseInt(window.getComputedStyle(this.content).getPropertyValue('--max-lines'),10);return Number.isNaN(maxLines)||maxLines<1?0:maxLines;}measureLines(){const previousHeight=this.content.style.height;this.content.style.height='auto';const innerTop=this.inner.getBoundingClientRect().top;const rects=[];const collect=(clientRects)=>{Array.prototype.forEach.call(clientRects,(rect)=>{if(rect.height>0&&rect.width>0)rects.push({top:rect.top-innerTop,bottom:rect.bottom-innerTop});});};const walker=document.createTreeWalker(this.inner,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:(node)=>{if(node.nodeType===Node.TEXT_NODE)return node.nodeValue.trim()===''?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT;return /^(IMG|SVG|VIDEO|CANVAS|IFRAME|INPUT|SELECT|TEXTAREA)$/.test(node.tagName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;}});const range=document.createRange();let node=walker.nextNode();while(node){if(node.nodeType===Node.TEXT_NODE){range.selectNodeContents(node);collect(range.getClientRects());}else collect(node.getClientRects());node=walker.nextNode();}this.content.style.height=previousHeight;rects.sort((a,b)=>a.top-b.top||a.bottom-b.bottom);return rects.reduce((lines,rect)=>{const line=lines[lines.length-1];if(line){const overlap=Math.min(line.bottom,rect.bottom)-Math.max(line.top,rect.top);const smallest=Math.min(line.bottom-line.top,rect.bottom-rect.top);if(overlap>0&&overlap>=smallest/2){line.top=Math.min(line.top,rect.top);line.bottom=Math.max(line.bottom,rect.bottom);return lines;}}lines.push({top:rect.top,bottom:rect.bottom});return lines;},[]);}getClipOffset(lines,maxLines){if(maxLines===0)return 0;if(!lines.length){const lineHeight=parseFloat(window.getComputedStyle(this.content).lineHeight);return Number.isNaN(lineHeight)?false:maxLines*lineHeight;}if(lines.length<=maxLines)return false;const last=lines[maxLines-1];const next=lines[maxLines];const gap=Math.max(next.top-last.bottom,0);return last.bottom+gap*0.75;}getContentHeight(offset){const style=window.getComputedStyle(this.content);let height=offset+(this.inner.getBoundingClientRect().top-this.content.getBoundingClientRect().top);if(style.boxSizing==='border-box')height+=parseFloat(style.paddingBottom)+parseFloat(style.borderBottomWidth);else height-=parseFloat(style.paddingTop)+parseFloat(style.borderTopWidth);return Math.max(Math.ceil(height),0);}close(){this.content.style.height=`${this.startHeight}px`;}open(){this.content.style.height='auto';}static init(scope){scope.querySelectorAll(`.${Awx.prefixCss}-show-more`).forEach((el)=>{if(!el.showMore)el.showMore=new Awx.ShowMore(el);el.showMore.reset();});}};Awx.ShowMore.initOnce=Awx.utils.once(Awx.ShowMore.init);Awx.init.ShowMore=function(scope){Awx.ShowMore.init(scope);};; 84Awx.ToggleSwitch=class{static bindButtons(scope){scope.querySelectorAll(`.${Awx.prefixCss}-switch-button`).forEach((el)=>{const processedClassName=`${Awx.processedClassname}--b`;if(el.classList.contains(processedClassName))return;el.classList.add(processedClassName);const {stateId}=el.dataset;if(!stateId)return;const state=document.getElementById(stateId);if(!state)return;let target;if('targetId' in state.dataset)target=document.getElementById(state.dataset.targetId);if(target&&!state.classList.contains(processedClassName)){state.classList.add(processedClassName);const dialog=new Awx.DialogBase(target,state,el);state.addEventListener('change',()=>{target.classList.toggle('toggle-checked',!!state.checked);Awx.ToggleSwitch.fireEvent({target,checked:state.checked});if(state.checked){dialog.onOpen();el.setAttribute('aria-expanded','true');return;}dialog.focusOnClose();el.setAttribute('aria-expanded','false');});}el.addEventListener('click',(e)=>{e.preventDefault();e.stopPropagation();state.checked=!state.checked;setTimeout(()=>{const change=new Event('change');state.dispatchEvent(change);},0);});});}static fireEvent(detail){document.dispatchEvent(new CustomEvent(`awx.toggle.target`,{cancelable:true,detail}));}static init(scope){Awx.ToggleSwitch.bindButtons(scope);}static reset(){function uncheckState(state){state.checked=false;}document.querySelectorAll(`.${Awx.prefixCss}-switch-state:not(.${Awx.prefixCss}-checked)`).forEach((el)=>uncheckState(el));}};Awx.ToggleSwitch.resetOnce=Awx.utils.once(Awx.ToggleSwitch.reset);Awx.init.toggleSwitch=function(scope){if(scope===document)Awx.ToggleSwitch.resetOnce();Awx.ToggleSwitch.init(scope);};;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.