PageSourceSearch

https://events.connectedcaribbean.org/chunk-IDWYZHRQ.js

js connectedcaribbean.org collected 2026-10-06 15:01:32 UTC 8,772 bytes, 1 lines download raw bytes

1import{a as O}from"./chunk-BC5ZYQ7P.js";import{m as U}from"./chunk-5S46LXF2.js";import{Vf as A,X as R,_ as d,d as b,ia as k}from"./chunk-Y23T7CVK.js";import{e as c,g as S}from"./chunk-COYXNZ6O.js";var j=c(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.convertHexToRgb=void 0;var W=r=>{let s=r.replace("#","").toLowerCase();if(X(s)){let e=[...s];return[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)]}else throw new Error("Invalid HEX input")};m.convertHexToRgb=W;var X=r=>{let s=new RegExp(/[0-9a-f]{6}/);return!!(r.length===6||s.test(r))}});var E=c(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.convertRgbToHex=void 0;var z=(r,s,e)=>{if(J(r,s,e))return x(r)+x(s)+x(e);throw new Error("Invalid RGB input")};h.convertRgbToHex=z;var J=(r,s,e)=>!(!v(r)||!v(s)||!v(e)),v=r=>!(r>255||r<0),x=r=>r<10?"0"+r.toString(16):r.toString(16)});var $=c(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});l.convertRgbToHex=l.convertHexToRgb=void 0;var Q=j();Object.defineProperty(l,"convertHexToRgb",{enumerable:!0,get:function(){return Q.convertHexToRgb}});var Y=E();Object.defineProperty(l,"convertRgbToHex",{enumerable:!0,get:function(){return Y.convertRgbToHex}})});var _=c(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.colorContrastRatioCalculator=void 0;var Z=$(),ee=(r,s)=>{let e=F(r),t=F(s);if(t<e){let o=(e+.05)/(t+.05);return Math.round(o*100)/100}else{let o=(t+.05)/(e+.05);return Math.round(o*100)/100}};C.colorContrastRatioCalculator=ee;var M=r=>{let s=r/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)},H=r=>.2126*M(r[0])+.7152*M(r[1])+.0722*M(r[2]),F=r=>{if(Array.isArray(r)&&r.length===3)return H(r);if(typeof r=="string"){let s=Z.convertHexToRgb(r);return H(s)}else throw new Error("Input must be array of number or string")}});var w=c(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.colorContrastRatioCalculator=void 0;var te=_();Object.defineProperty(f,"colorContrastRatioCalculator",{enumerable:!0,get:function(){return te.colorContrastRatioCalculator}})});var D=c(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.wcagContrastChecker=void 0;var re=w(),se=(r,s)=>{let e=re.colorContrastRatioCalculator(r,s);return oe(e)};g.wcagContrastChecker=se;var oe=r=>{let s={regularText:{aa:!1,aaa:!1},largeText:{aa:!1,aaa:!1},uiComponent:{aa:!1}};return r>=7.5?(s.regularText.aa=!0,s.regularText.aaa=!0,s.largeText.aa=!0,s.largeText.aaa=!0,s.uiComponent.aa=!0):r>=4.5?(s.regularText.aa=!0,s.regularText.aaa=!1,s.largeText.aa=!0,s.largeText.aaa=!0,s.uiComponent.aa=!0):r>=3&&(s.regularText.aa=!1,s.regularText.aaa=!1,s.largeText.aa=!0,s.largeText.aaa=!1,s.uiComponent.aa=!0),s}});var L=c(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.wcagContrastChecker=void 0;var ae=D();Object.defineProperty(p,"wcagContrastChecker",{enumerable:!0,get:function(){return ae.wcagContrastChecker}})});var y=S(U());var a=(function(r){return r.DarkMode="is-dark-mode",r.ContrastMode="is-contrast-mode",r})(a||{});var Ce=(()=>{class r{document;storageService;googleFontsService;isDarkMode$;isContrastMode$;isDarkModeSubject$;isContrastModeSubject$;htmlMetaDarkThemeColour="#1c1c2b";htmlMetaLightThemeColour="#2d344b";loadedFontElements=[];darkThemeCssClass="dark-theme";contrastThemeCssClass="contrast-theme";constructor(e,t,o){this.document=e,this.storageService=t,this.googleFontsService=o;let i=!!this.storageService.get(a.DarkMode);this.isDarkModeSubject$=new b(i),this.isDarkMode$=this.isDarkModeSubject$.asObservable();let n=!!this.storageService.get(a.ContrastMode);this.isContrastModeSubject$=new b(n),this.isContrastMode$=this.isContrastModeSubject$.asObservable()}initialiseDarkMode(){this.storageService.get(a.DarkMode)&&(this.document.body.classList.add(this.darkThemeCssClass),this.document.head.querySelector('meta[name="theme-color"]')?.setAttribute("content",this.htmlMetaDarkThemeColour))}initialiseContrastMode(){this.storageService.get(a.ContrastMode)&&this.document.body.classList.add(this.contrastThemeCssClass)}setCss(e,t){let o=this.document.querySelector(`.${t}`),i=o??this.document.createElement("style");i.innerHTML=e,i.classList.add(t??"custom-css"),o||this.document.head.appendChild(i)}setScopedCss(e,t){let o=`@scope (${t.scope}) { :scope {${e} }}`;this.setCss(o,t.className)}removeCss(e){this.document.querySelector(`.${e}`)?.remove()}setAppFont(e){e&&(this.createCssProperty("--font-family",e),this.importFont(e))}importFont(e){if(!e||this.loadedFontElements.some(u=>u.name===e))return;let o=this.googleFontsService.getFontFamiliesStylesheetUrl([e]);if(!o)return;let i=this.document.querySelector("head"),n=this.document.createElement("link");n.href=o,n.rel="stylesheet",i?.appendChild(n),this.loadedFontElements.push({name:e,element:n})}
1clearLoadedFonts(){this.loadedFontElements.forEach(e=>e.element.remove()),this.loadedFontElements=[]}setThemeMode(e){let{isDarkMode:t,isContrastMode:o}=e;this.isDarkModeSubject$.next(t),this.isContrastModeSubject$.next(o),this.setHtmlMetaThemeColour(t),t?(this.document.body.classList.add(this.darkThemeCssClass),this.storageService.set(a.DarkMode,"true")):(this.document.body.classList.remove(this.darkThemeCssClass),this.storageService.removeItem(a.DarkMode)),o?(this.document.body.classList.add(this.contrastThemeCssClass),this.storageService.set(a.ContrastMode,"true")):(this.document.body.classList.remove(this.contrastThemeCssClass),this.storageService.removeItem(a.ContrastMode))}disableThemes(){this.document.body.classList.remove(this.darkThemeCssClass),this.document.body.classList.remove(this.contrastThemeCssClass)}initialiseTheme(e){let t=e?.primaryOverride?.trim(),o=e?.accentOverride?.trim(),i=e?.textOnPrimaryOverride?.trim(),n=e?.textOnAccentOverride?.trim(),u=t??this.getRootCssProperty("--base-primary"),I=i??this.getRootCssProperty("--base-text-on-primary"),V=t??this.getRootCssProperty("--base-primary-dark"),q=t??this.getRootCssProperty("--base-primary-contrast"),N=o??this.getRootCssProperty("--base-accent"),B=n??this.getRootCssProperty("--base-text-on-accent"),G=o??this.getRootCssProperty("--base-accent-dark"),K=o??this.getRootCssProperty("--base-accent-contrast");t&&(this.htmlMetaLightThemeColour=u,this.htmlMetaDarkThemeColour=u,this.setHtmlMetaThemeColour(this.isDarkModeSubject$.value)),this.setVariables({prefix:"primary",colour:this.createColour(u)}),this.setVariables({prefix:"accent",colour:this.createColour(N)}),this.setVariables({prefix:"primary-dark",colour:this.createColour(V)}),this.setVariables({prefix:"accent-dark",colour:this.createColour(G)}),this.setVariables({prefix:"primary-contrast",colour:this.createColour(q)}),this.setVariables({prefix:"accent-contrast",colour:this.createColour(K)});let T=I?.trim();T&&this.createCssProperty("--text-on-primary-base",T);let P=B?.trim();P&&this.createCssProperty("--text-on-accent-base",P)}createCssProperty(e,t){this.document.documentElement.style.setProperty(e,t)}deleteCssProperty(e){this.document.documentElement.style.removeProperty(e)}retrieveDynamicValue(e,t=500){return this.getRootCssProperty(`--${e}-base-${t}`)}retrieveDynamicTextValue(){return this.getRootCssProperty("--color-grey-80")??""}setVariables(e){let t=e.colour;this.createCssProperty(`--${e.prefix}-base-50`,this.lightenColour(t,1)),this.createCssProperty(`--${e.prefix}-base-100`,this.lightenColour(t,.8)),this.createCssProperty(`--${e.prefix}-base-200`,this.lightenColour(t,.6)),this.createCssProperty(`--${e.prefix}-base-300`,this.lightenColour(t,.4)),this.createCssProperty(`--${e.prefix}-base-400`,this.lightenColour(t,.2)),this.createCssProperty(`--${e.prefix}-base-500`,t.hex().toString()),this.createCssProperty(`--${e.prefix}-base-600`,this.darkenColour(t,.1)),this.createCssProperty(`--${e.prefix}-base-700`,this.darkenColour(t,.2)),this.createCssProperty(`--${e.prefix}-base-800`,this.darkenColour(t,.3)),this.createCssProperty(`--${e.prefix}-base-900`,this.darkenColour(t,.4)),this.createCssProperty(`--${e.prefix}-base-rgb`,t.rgb().array().join())}lightenColour(e,t){return e.lighten(t).hex().toString()}darkenColour(e,t){return e.darken(t).hex().toString()}setHtmlMetaThemeColour(e){let t=this.document.head.querySelector('meta[name="theme-color"]');e?t?.setAttribute("content",this.htmlMetaDarkThemeColour):t?.setAttribute("content",this.htmlMetaLightThemeColour)}getRootCssProperty(e){return getComputedStyle(this.document.documentElement).getPropertyValue(e)||getComputedStyle(this.document.body).getPropertyValue(e)||""}createColour(e){let t=e?.trim();return t?(0,y.default)(t):(0,y.default)("#000000")}static \u0275fac=function(t){return new(t||r)(d(k),d(A),d(O))};static \u0275prov=R({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var ie=S(L());export{Ce as a};

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.