{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@opten/compiler/metadata/component.ts","webpack:///./node_modules/@opten/dom/has-class/index.ts","webpack:///./node_modules/@opten/dom/add-class/index.ts","webpack:///./node_modules/@opten/dom/remove-class/index.ts","webpack:///./node_modules/@opten/dom/is-html-element/index.ts","webpack:///./node_modules/@opten/dom/get-class/index.ts","webpack:///./node_modules/@opten/compiler/util/decorators.ts","webpack:///./node_modules/@opten/animation/linear-tween/index.ts","webpack:///./node_modules/@opten/dom/class-regex/index.ts","webpack:///./node_modules/@opten/compiler/util/type.ts","webpack:///./app/components/collapse.ts","webpack:///./node_modules/@opten/collapse/initializer/index.ts","webpack:///./node_modules/@opten/events/dispatch-custom-event/index.ts","webpack:///./node_modules/@opten/cookie/set/index.ts","webpack:///./node_modules/@opten/cookie/get/index.ts","webpack:///./app/main.ts","webpack:///./node_modules/@opten/script/load-polyfill/index.ts","webpack:///./node_modules/@opten/script/create-script/index.ts","webpack:///./node_modules/@opten/script/get-script-by-src/index.ts","webpack:///./node_modules/@opten/url/remove-domain/index.ts","webpack:///./node_modules/@opten/compiler/factory/index.ts","webpack:///./node_modules/@opten/dom/as-html-element/index.ts","webpack:///./node_modules/@opten/compiler/index.ts","webpack:///./node_modules/@opten/compiler/reflector/index.ts","webpack:///./node_modules/@opten/compiler/resolver/index.ts","webpack:///./node_modules/@opten/compiler/util/factories.ts","webpack:///./node_modules/@opten/dom/get-selector-element-from-element/index.ts","webpack:///./node_modules/@opten/dom/get-selector-from-element/index.ts","webpack:///./node_modules/@opten/transition/add-transition-end-listener/index.ts","webpack:///./node_modules/@opten/transition/get-transition-end-event-name/index.ts","webpack:///./node_modules/@opten/events/event-namespace-factory/index.ts","webpack:///./app/components/modal.ts","webpack:///./node_modules/@opten/dom/get-parent-with-class/index.ts","webpack:///./node_modules/@opten/dom/first-by-class/index.ts","webpack:///./node_modules/@opten/dom/get-parents/index.ts","webpack:///./node_modules/@opten/dom/get-parents-or-self/index.ts","webpack:///./app/components/collapse-controller.ts","webpack:///./node_modules/@opten/compiler/metadata/di.ts","webpack:///./node_modules/@opten/dom/is-descendant/index.ts","webpack:///./app/components/cookie-banner.ts","webpack:///./app/components/disclaimer.ts","webpack:///./node_modules/@opten/dom/get-radio-value/index.ts","webpack:///./app/components/scrollTo.ts","webpack:///./node_modules/@opten/scroll/scroll-to-id/index.ts","webpack:///./node_modules/@opten/scroll/scroll-to-element/index.ts","webpack:///./node_modules/@opten/scroll/scroll-to-offset/index.ts","webpack:///./node_modules/@opten/scroll/scroll-to/index.ts","webpack:///./node_modules/@opten/dom/get-window-scroll-top/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Component","makeDecorator","createComponent","makeMetadataFactory","element","className","classRegex","test","getClass","hasClass","setAttribute","trim","elements","forEach","removeClassFactory","removeClass","regex","replace","HTMLElement","nodeType","nodeName","getAttribute","props","parentClass","chainFn","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","args","this","annotationInstance","typeDecorator","cls","ANNOTATIONS","push","metadataName","PropDecoratorFactory","apply","decoratorInstance","target","metaName","constructor","meta","PROP_METADATA","unshift","values","propName","timeElapsed","start","distance","duration","classRegexCache","RegExp","v","Type","Function","CollapseComponent","observe","col","Collapse","options","console","error","data","stringCollapse","activeClass","animateProp","collapsingClass","componentClass","showClass","showClassDesktop","desktopWidth","transitionDuration","isHideable","closeSiblings","useShowClassDesktop","dataParentSelector","dataTargetSelector","dataToggleSelector","hrefSelector","isTransitioning","eventNamespaceFn","eventNamespaceFactory","handleClick","event","trigger","currentTarget","tagName","preventDefault","getSelectorElementFromElement","getInstance","toggle","parentElement","init","triggers","window","outerWidth","addClass","isOpen","hide","show","parent","selector","id","actives","Array","from","querySelectorAll","filter","active","length","collapseInstance","_handleShow","_handleClose","style","document","addEventListener","_addAriaAndCollapsedClass","collapseElement","scrollHeight","addTransitionEndListener","offsetWidth","toString","toLowerCase","eventName","CustomEvent","dispatchEvent","end","path","domain","secure","expires","Number","Infinity","String","Date","toUTCString","keyStr","encodeURIComponent","valueStr","domainStr","pathStr","secureStr","cookie","decodeURIComponent","loadPolyfillv2","factory","CollapseController","CookieBanner","Disclaimer","Modal","ScrollTo","body","cb","features","loadPolyfill","join","polyfillWindow","src","polyfillsLoadedCallbacks","getScriptBySrc","polyfillsLoadedFlag","head","appendChild","createScript","polyfillsLoaded","onerror","scriptElement","createElement","async","onload","e","removeLoadingScript","loadingScriptWindow","loadingScripts","index","indexOf","splice","scripts","getElementsByTagName","currentScriptElement","item","removeDomain","url","components","rootElement","observables","Map","componentType","component","resolver","resolve","Error","getElementsByClassName","node","compiler","compile","set","size","MutationObserver","mutations","componentInitializer","mutation","addedNodes","isHTMLElement","map","asHTMLElement","comps","childList","subtree","reflector","Reflector","Resolver","Compiler","componentCache","has","keys","queries","query","nodes","descendants","cache","reduce","acc","val","concat","f","first","isType","onInit","typeOrFunc","parentCtor","getParentCtor","ownAnnotations","_ownAnnotations","annotations","propMetadata","parentPropMetadata","ownPropMetadata","_ownPropMetadata","decorators","ctor","parentProto","getPrototypeOf","QUERY_METADATA_IDENTIFIERS","type","typeMetadata","metadata","findLast","propertyMetadata","_mergeWithPropertyMetadata","a","some","_merge","mergedQueries","res","propertyName","_getQueryMetadata","q","read","arr","condition","isTypeOf","obj","attribute","fallbackHref","getSelectorFromElement","getElementById","substr","callback","fallbackDuration","remove","called","transitionEndEventName","setTimeout","listener","removeEventListener","dispatchCustomEvent","getTransitionEndEventName","transitions","WebkitTransition","transition","undefined","namespace","lang","querySelector","modal","loader","modalContent","close","stopPropagation","nodeId","state","innerHTML","toggleModal","ev","getParentWithClass","once","fetch","then","text","handleResponse","catch","display","firstByClass","getParents","getParentsOrSelf","parents","ComponentRefs","hideAll","controlledCollapses","collapses","collapseEl","toggles","isDescendant","bindEvents","hidden","canHide","collapseComp","Query","ComponentRef","makePropDecorator","ChildRef","ChildrenRef","child","parentNode","getCookie","btn","setCookie","content","failedContent","domicile","investor","showAllowed","validate","btn2","getRadioValue","setupCookie","hideContent","showContent","listItem","el","showFond","anythingVisible","listParent","hideEmpty","investorAttribute","domicileAttribute","includes","hasVisibleItems","listitem","optionsValue","getElementsByName","option","checked","header","offset","clientHeight","scrollToId","location","hash","showElement","scrollY","animationFunction","linearTween","wrapper","scrollToElement","animation","top","offsetTop","scrollTop","getBoundingClientRect","scrollToOffset","scrollTo","timeStart","b","getWindowScrollTop","loop","time","Window","requestAnimationFrame","pageYOffset","documentElement"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAO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I,gBAAeJ,EAAKD,EAAW7T,EAAUkT,EAAQS,IAhBzD,WACA,S,+FCEO,SACN5T,GAKC,IAJD0T,EAIC,uDAJsCC,cACvC1T,EAGC,uDAHU,IACXkT,EAEC,uDAFQ,EACTS,EACC,uDAD+B9Q,QAEhC,IAAAsR,UAASpU,EAAWmT,EAAQO,EAAmBzT,EAAU2T,IAV1D,WACA,S,yFCCO,SACN5T,GAMC,IAEGqU,EACAvU,EARJ4T,EAKC,uDALsC,SAAC1X,EAAGsY,EAAGnZ,EAAGC,GAChD,OAAQD,EAAIa,EAAKZ,EAAIkZ,GAEtBrU,EAEC,uDAFU,IACX2T,EACC,uDAD+B9Q,OAE5B/C,GAAQ,IAAAwU,sBAIRX,aAAmB5V,cACtB+B,EAAQ6T,EAAQK,WAQjB,SAASO,EAAKC,GACb3U,EAAc2U,EAAOJ,EAEjBT,aAAmBc,QACtBd,EAAQQ,SACP,EACAV,EAAkB5T,EAAaC,EAAOC,EAAUC,IAG7CH,EAAcG,EACjB0U,sBAAsB1Z,KAAK6H,OAAQ0R,GAEnCZ,EAAQQ,SAAS,EAAGrU,EAAQC,KAG7B4T,EAAQK,UAAYP,EACnB5T,EACAC,EACAC,EACAC,GAGGH,EAAcG,EACjB0U,sBAAsB1Z,KAAK6H,OAAQ0R,GAEnCZ,EAAQK,UAAYlU,EAAQC,GA9B/B2U,sBAAsB1Z,KAAK6H,QAAQ,SAAA2R,GAClCJ,EAAYI,EACZD,EAAKC,OApBP,a,mGCDO,WACN,YAA8BhG,IAAvB3L,OAAO8R,YACX9R,OAAO8R,aACL1Q,SAAS2Q,iBACZ3Q,SAASqC,KAAK6K,YACdlN,SAASqC,MAAsB0N","file":"Scripts/main.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 15);\n","import { makeDecorator, TypeDecorator } from '../util/decorators';\r\nimport { makeMetadataFactory, MetadataFactory } from '../util/factories';\r\n\r\nexport interface ComponentDecorator {\r\n\t(obj: Component): TypeDecorator;\r\n\tnew (obj: Component): Component;\r\n}\r\n\r\nexport interface Component {\r\n\tclassName?: string;\r\n\tobserve?: boolean;\r\n\tqueries?: { [key: string]: any };\r\n}\r\n\r\n// tslint:disable-next-line:variable-name\r\nexport const Component: ComponentDecorator = makeDecorator(\r\n\t'Component',\r\n\t(c: Component = {}) => ({ ...c })\r\n);\r\n\r\nexport const createComponent: MetadataFactory = makeMetadataFactory<\r\n\tComponent\r\n>('Component', (c: Component = {}) => ({ ...c }));\r\n","import { classRegex } from '../class-regex';\r\nimport { getClass } from '../get-class';\r\n\r\nexport function hasClass(element: Element, className: string): boolean {\r\n\treturn element && classRegex(className).test(getClass(element));\r\n}\r\n","import { getClass } from '../get-class';\r\nimport { hasClass } from '../has-class';\r\n\r\nexport function addClass(element: Element, className: string) {\r\n\tif (element && !hasClass(element, className)) {\r\n\t\telement.setAttribute(\r\n\t\t\t'class',\r\n\t\t\tgetClass(element).trim() + ' ' + className,\r\n\t\t);\r\n\t}\r\n}\r\n","import { classRegex } from '../class-regex';\r\nimport { getClass } from '../get-class';\r\nimport { hasClass } from '../has-class';\r\n\r\nexport function removeClass(element: Element, className: string) {\r\n\tif (element && hasClass(element, className)) {\r\n\t\tconst regex = classRegex(className);\r\n\t\telement.setAttribute(\r\n\t\t\t'class',\r\n\t\t\tgetClass(element)\r\n\t\t\t\t.replace(regex, ' ')\r\n\t\t\t\t.trim(),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport function removeClassFactory(className: string) {\r\n\treturn (element: Element) => {\r\n\t\tremoveClass(element, className);\r\n\t};\r\n}\r\n\r\nexport function removeClassOnCollection(elements: Element[], className: string) {\r\n\telements.forEach(removeClassFactory(className));\r\n}\r\n","export function isHTMLElement(o: any) {\r\n\treturn typeof HTMLElement === 'object'\r\n\t\t? o instanceof HTMLElement\r\n\t\t: o &&\r\n\t\t\t\ttypeof o === 'object' &&\r\n\t\t\t\to !== null &&\r\n\t\t\t\to.nodeType === 1 &&\r\n\t\t\t\ttypeof o.nodeName === 'string';\r\n}\r\n","export function getClass(element: Element) {\r\n\treturn element.getAttribute('class') || '';\r\n}\r\n","import { Type } from './type';\r\n\r\nexport const ANNOTATIONS = '__annotations__';\r\nexport const PROP_METADATA = '__prop__metadata__';\r\n\r\nexport interface TypeDecorator {\r\n\t// Invoke as ES7 decorator.\r\n\t>(type: T): T;\r\n\r\n\t// Make TypeDecorator assignable to built-in ParameterDecorator type.\r\n\t// ParameterDecorator is declared in lib.d.ts as a `declare type`\r\n\t// so we cannot declare this interface as a subtype.\r\n\t// see https://github.com/angular/angular/issues/3379#issuecomment-126169417\r\n\t(\r\n\t\ttarget: object,\r\n\t\tpropertyKey?: string | symbol,\r\n\t\tparameterIndex?: number\r\n\t): void;\r\n}\r\n\r\nexport function makeDecorator(\r\n\tname: string,\r\n\tprops?: (...args: any[]) => any,\r\n\tparentClass?: any,\r\n\tchainFn?: (fn: TypeDecorator) => void,\r\n\ttypeFn?: (type: Type, ...args: any[]) => void\r\n): {\r\n\tnew (...args: any[]): any;\r\n\t(...args: any[]): any;\r\n\t(...args: any[]): (cls: any) => any;\r\n} {\r\n\tconst metaCtor = makeMetadataCtor(props);\r\n\r\n\tfunction DecoratorFactory(...args: any[]): (cls: any) => any {\r\n\t\tif (this instanceof DecoratorFactory) {\r\n\t\t\tmetaCtor.call(this, ...args);\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tconst annotationInstance = new (DecoratorFactory as any)(...args);\r\n\t\tconst typeDecorator: TypeDecorator = (cls: Type) => {\r\n\t\t\tif (typeFn) {\r\n\t\t\t\ttypeFn(cls, ...args);\r\n\t\t\t}\r\n\t\t\t// Use of Object.defineProperty is important since it creates non-enumerable property which\r\n\t\t\t// prevents the property is copied during subclassing.\r\n\t\t\tconst annotations = cls.hasOwnProperty(ANNOTATIONS)\r\n\t\t\t\t? (cls as any)[ANNOTATIONS]\r\n\t\t\t\t: Object.defineProperty(cls, ANNOTATIONS, { value: [] })[\r\n\t\t\t\t\t\tANNOTATIONS\r\n\t\t\t\t ];\r\n\t\t\tannotations.push(annotationInstance);\r\n\t\t\treturn cls;\r\n\t\t};\r\n\t\tif (chainFn) {\r\n\t\t\tchainFn(typeDecorator);\r\n\t\t}\r\n\t\treturn typeDecorator;\r\n\t}\r\n\r\n\tif (parentClass) {\r\n\t\tDecoratorFactory.prototype = Object.create(parentClass.prototype);\r\n\t}\r\n\r\n\tDecoratorFactory.prototype.metadataName = name;\r\n\treturn DecoratorFactory as any;\r\n}\r\n\r\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\r\n\treturn function ctor(...args: any[]) {\r\n\t\tif (props) {\r\n\t\t\tconst values = props(...args);\r\n\t\t\tfor (const propName in values) {\r\n\t\t\t\tif (values.hasOwnProperty(propName)) {\r\n\t\t\t\t\tthis[propName] = values[propName];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport function makePropDecorator(\r\n\tname: string,\r\n\tprops?: (...args: any[]) => any,\r\n\tparentClass?: any\r\n): any {\r\n\tconst metaCtor = makeMetadataCtor(props);\r\n\r\n\tfunction PropDecoratorFactory(...args: any[]): any {\r\n\t\tif (this instanceof PropDecoratorFactory) {\r\n\t\t\tmetaCtor.apply(this, args);\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tconst decoratorInstance = new (PropDecoratorFactory as any)(...args);\r\n\r\n\t\treturn function PropDecorator(target: any, metaName: string) {\r\n\t\t\tconst constructor = target.constructor;\r\n\t\t\t// Use of Object.defineProperty is important since it creates non-enumerable property which\r\n\t\t\t// prevents the property is copied during subclassing.\r\n\t\t\tconst meta = constructor.hasOwnProperty(PROP_METADATA)\r\n\t\t\t\t? (constructor as any)[PROP_METADATA]\r\n\t\t\t\t: Object.defineProperty(constructor, PROP_METADATA, {\r\n\t\t\t\t\t\tvalue: {}\r\n\t\t\t\t })[PROP_METADATA];\r\n\t\t\tmeta[metaName] =\r\n\t\t\t\t(meta.hasOwnProperty(metaName) && meta[metaName]) || [];\r\n\t\t\tmeta[metaName].unshift(decoratorInstance);\r\n\t\t};\r\n\t}\r\n\r\n\tif (parentClass) {\r\n\t\tPropDecoratorFactory.prototype = Object.create(parentClass.prototype);\r\n\t}\r\n\r\n\tPropDecoratorFactory.prototype.metadataName = name;\r\n\treturn PropDecoratorFactory;\r\n}\r\n","export function linearTween(\r\n\ttimeElapsed: number,\r\n\tstart: number,\r\n\tdistance: number,\r\n\tduration: number,\r\n) {\r\n\treturn distance * timeElapsed / duration + start;\r\n}\r\n","const classRegexCache = {};\r\nexport function classRegex(className: string): RegExp {\r\n\tif (!classRegexCache[className]) {\r\n\t\tclassRegexCache[className] = new RegExp('(\\\\s|^)' + className + '(\\\\s|$)');\r\n\t}\r\n\treturn classRegexCache[className];\r\n}\r\n","// tslint:disable-next-line:variable-name\r\nexport const Type = Function;\r\n\r\n\r\nexport function isType(v: any): v is Type {\r\n\treturn typeof v === 'function';\r\n}\r\n\r\nexport interface Type extends Function {\r\n\tnew (...args: any[]): T;\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport { Collapse } from '@opten/collapse/initializer';\r\n// import { Backdrop } from './backdrop';\r\n\r\n@Component({ className: 'js-collapse', observe: true })\r\nexport class CollapseComponent {\r\n\tcol: Collapse;\r\n\tconstructor(private element: HTMLElement) {\r\n\t\tthis.col = new Collapse(element);\r\n\r\n\t\t// const backdropAttr = this.element.getAttribute('data-backdrop');\r\n\t\t// if (backdropAttr != null) {\r\n\t\t// \telement.addEventListener('show.opten.collapse', () =>\r\n\t\t// \t\tBackdrop.show(() => this.col.hide())\r\n\t\t// \t);\r\n\t\t// \telement.addEventListener('hide.opten.collapse', () =>\r\n\t\t// \t\tBackdrop.hide()\r\n\t\t// \t);\r\n\t\t// }\r\n\t}\r\n}\r\n","import { addClass } from '@opten/dom/add-class';\r\nimport { hasClass } from '@opten/dom/has-class';\r\nimport { removeClass } from '@opten/dom/remove-class';\r\n\r\nimport { getSelectorElementFromElement } from '@opten/dom/get-selector-element-from-element';\r\nimport { addTransitionEndListener } from '@opten/transition/add-transition-end-listener';\r\n\r\nimport { eventNamespaceFactory } from '@opten/events/event-namespace-factory';\r\n\r\nconst stringCollapse = 'Collapse';\r\n\r\nexport interface CollapseOptions {\r\n\tcomponentClass?: string;\r\n\tactiveClass?: string;\r\n\tshowClass?: string;\r\n\tshowClassDesktop?: string;\r\n\tdesktopWidth?: number;\r\n\tcollapsingClass?: string;\r\n\tparentElement?: HTMLElement;\r\n\ttransitionDuration?: number;\r\n\tanimateProp?: 'height' | 'width' | false;\r\n\tisHideable?: boolean;\r\n\tcloseSiblings?: boolean;\r\n\tuseShowClassDesktop?: boolean;\r\n\tdataParentSelector?: string;\r\n\tdataTargetSelector?: string;\r\n\tdataToggleSelector?: string;\r\n\threfSelector?: string;\r\n}\r\n\r\nexport class Collapse {\r\n\tprivate options: CollapseOptions = {\r\n\t\tactiveClass: 'is-active',\r\n\t\tanimateProp: 'height',\r\n\t\tcollapsingClass: 'collapse--collapsing',\r\n\t\tcomponentClass: 'collapse',\r\n\t\tshowClass: 'collapse--show',\r\n\t\tshowClassDesktop: 'collapse--md-show',\r\n\t\tdesktopWidth: 1024,\r\n\t\ttransitionDuration: 600,\r\n\t\tisHideable: true,\r\n\t\tcloseSiblings: true,\r\n\t\tuseShowClassDesktop: false,\r\n\t\tdataParentSelector: 'data-parent',\r\n\t\tdataTargetSelector: 'data-target',\r\n\t\tdataToggleSelector: 'data-toggle',\r\n\t\threfSelector: 'href'\r\n\t};\r\n\r\n\tprivate parent: HTMLElement;\r\n\tprivate triggers: HTMLElement[];\r\n\r\n\t// TODO: Uggly naming\r\n\tget toggles(): HTMLElement[] {\r\n\t\treturn this.triggers;\r\n\t}\r\n\r\n\tprivate target: Element;\r\n\tprivate isTransitioning = false; // when true it will prevent click handlers\r\n\r\n\t// event names\r\n\tprivate eventNamespaceFn = eventNamespaceFactory('opten.collapse');\r\n\r\n\tconstructor(public element: HTMLElement, options?: CollapseOptions) {\r\n\t\tthis.options = {\r\n\t\t\t...this.options,\r\n\t\t\t...options\r\n\t\t};\r\n\r\n\t\tif (!this.options.parentElement) {\r\n\t\t\tthis.options.parentElement = getSelectorElementFromElement(\r\n\t\t\t\telement,\r\n\t\t\t\tthis.options.dataParentSelector,\r\n\t\t\t\tfalse\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis.init();\r\n\t}\r\n\r\n\tisOpen() {\r\n\t\tif (\r\n\t\t\tthis.options.useShowClassDesktop &&\r\n\t\t\twindow.outerWidth >= this.options.desktopWidth &&\r\n\t\t\thasClass(this.element, this.options.showClassDesktop)\r\n\t\t) {\r\n\t\t\taddClass(this.element, this.options.showClass);\r\n\t\t}\r\n\t\tremoveClass(this.element, this.options.showClassDesktop);\r\n\t\treturn hasClass(this.element, this.options.showClass);\r\n\t}\r\n\r\n\ttoggle() {\r\n\t\tif (this.isOpen()) {\r\n\t\t\tif (this.options.isHideable) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tshow() {\r\n\t\tif (this.isTransitioning || this.isOpen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.options.closeSiblings && this.parent) {\r\n\t\t\tconst selector = `[${this.options.dataParentSelector}=\"#${\r\n\t\t\t\tthis.parent.id\r\n\t\t\t}\"]`;\r\n\t\t\tconst actives = Array.from(\r\n\t\t\t\tthis.parent.querySelectorAll(\r\n\t\t\t\t\t`${selector}.${this.options.showClass}, ${selector}.${\r\n\t\t\t\t\t\tthis.options.collapsingClass\r\n\t\t\t\t\t}`\r\n\t\t\t\t)\r\n\t\t\t).filter(active => active !== this.target);\r\n\r\n\t\t\tif (actives && actives.length) {\r\n\t\t\t\tconst anyTransitioning = actives.filter(active => {\r\n\t\t\t\t\tconst collapseInstance = active[stringCollapse] as Collapse;\r\n\t\t\t\t\treturn collapseInstance && collapseInstance.isTransitioning;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (anyTransitioning.length) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tactives.forEach(active =>\r\n\t\t\t\t\tCollapse.getInstance(active as HTMLElement).hide()\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handleShow(this.element, this.triggers);\r\n\t}\r\n\r\n\thide() {\r\n\t\tif (this.isTransitioning || !this.isOpen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._handleClose(this.element, this.triggers);\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tconst element = this.element;\r\n\r\n\t\tif (element[stringCollapse]) {\r\n\t\t\telement[stringCollapse] = null;\r\n\r\n\t\t\tremoveClass(element, this.options.componentClass);\r\n\t\t\tremoveClass(element, this.options.collapsingClass);\r\n\t\t\tremoveClass(element, this.options.showClass);\r\n\r\n\t\t\tif (this.options.animateProp) {\r\n\t\t\t\telement.style[this.options.animateProp] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate init() {\r\n\t\t// todo: only initalize once, like bootstrap does it?\r\n\t\tthis.triggers = Array.from(\r\n\t\t\tdocument.querySelectorAll(\r\n\t\t\t\t`[${this.options.hrefSelector}=\"#${this.element.id}\"], [${\r\n\t\t\t\t\tthis.options.dataTargetSelector\r\n\t\t\t\t}=\"#${this.element.id}\"]`\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t// todo: why do we need that?\r\n\t\tconst toggles = Array.from(\r\n\t\t\tdocument.querySelectorAll(\r\n\t\t\t\t`[${this.options.dataToggleSelector}=\"collapse\"]`\r\n\t\t\t)\r\n\t\t);\r\n\t\tfor (const toggle of toggles) {\r\n\t\t\tconst target = getSelectorElementFromElement(\r\n\t\t\t\ttoggle,\r\n\t\t\t\tthis.options.dataTargetSelector\r\n\t\t\t);\r\n\t\t\tif (target !== null && target === this.element) {\r\n\t\t\t\tthis.target = target;\r\n\t\t\t\tthis.triggers.push(toggle as HTMLElement);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.parent = this.options.parentElement;\r\n\r\n\t\t// init\r\n\t\tif (!(stringCollapse in this.element)) {\r\n\t\t\t// prevent adding event handlers twice\r\n\t\t\tthis.triggers.forEach(trigger =>\r\n\t\t\t\ttrigger.addEventListener('click', this.handleClick, false)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (this.parent) {\r\n\t\t\tArray.from(\r\n\t\t\t\tthis.parent.querySelectorAll(\r\n\t\t\t\t\t`[${this.options.dataToggleSelector}=\"collapse\"][${\r\n\t\t\t\t\t\tthis.options.dataParentSelector\r\n\t\t\t\t\t}=\"#${this.parent.id}\"]`\r\n\t\t\t\t)\r\n\t\t\t).forEach(element => {\r\n\t\t\t\tthis._addAriaAndCollapsedClass(\r\n\t\t\t\t\tgetSelectorElementFromElement(\r\n\t\t\t\t\t\telement,\r\n\t\t\t\t\t\tthis.options.dataTargetSelector\r\n\t\t\t\t\t),\r\n\t\t\t\t\t[element]\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis._addAriaAndCollapsedClass(this.element, this.triggers);\r\n\t\t}\r\n\r\n\t\taddClass(this.element, this.options.componentClass);\r\n\r\n\t\tthis.element[stringCollapse] = this;\r\n\t}\r\n\r\n\tprivate handleClick = (event: Event) => {\r\n\t\t// preventDefault only for elements (which change the URL) not inside the collapsible element\r\n\t\tconst trigger = event && (event.currentTarget as HTMLElement);\r\n\t\tif (trigger && trigger.tagName === 'A') {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst target = getSelectorElementFromElement(\r\n\t\t\ttrigger,\r\n\t\t\tthis.options.dataTargetSelector\r\n\t\t);\r\n\t\tlet data = target[stringCollapse] as Collapse;\r\n\r\n\t\tif (!data) {\r\n\t\t\tdata = trigger[stringCollapse] as Collapse;\r\n\t\t}\r\n\r\n\t\tif (target) {\r\n\t\t\tCollapse.getInstance(target, data.options).toggle();\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _handleShow(collapseElement: HTMLElement, triggers?: Element[]) {\r\n\t\tthis.eventNamespaceFn(collapseElement, 'show');\r\n\r\n\t\tremoveClass(collapseElement, this.options.componentClass);\r\n\t\taddClass(collapseElement, this.options.collapsingClass);\r\n\t\tif (this.options.animateProp) {\r\n\t\t\tcollapseElement.style[this.options.animateProp] =\r\n\t\t\t\tcollapseElement.scrollHeight + 'px';\r\n\t\t}\r\n\r\n\t\tif (triggers && triggers.length) {\r\n\t\t\ttriggers.forEach(trigger => {\r\n\t\t\t\taddClass(trigger, this.options.activeClass);\r\n\t\t\t\ttrigger.setAttribute('aria-expanded', 'true');\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.isTransitioning = true;\r\n\r\n\t\taddTransitionEndListener(\r\n\t\t\tcollapseElement,\r\n\t\t\t() => {\r\n\t\t\t\tremoveClass(collapseElement, this.options.collapsingClass);\r\n\t\t\t\taddClass(collapseElement, this.options.componentClass);\r\n\t\t\t\taddClass(collapseElement, this.options.showClass);\r\n\r\n\t\t\t\tthis.isTransitioning = false;\r\n\t\t\t\tif (this.options.animateProp) {\r\n\t\t\t\t\tcollapseElement.style[this.options.animateProp] = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.eventNamespaceFn(collapseElement, 'shown');\r\n\t\t\t},\r\n\t\t\tthis.options.transitionDuration\r\n\t\t);\r\n\t}\r\n\r\n\tprivate _handleClose(collapseElement: HTMLElement, triggers?: Element[]) {\r\n\t\tthis.eventNamespaceFn(collapseElement, 'hide');\r\n\r\n\t\tif (this.options.animateProp) {\r\n\t\t\tcollapseElement.style[this.options.animateProp] =\r\n\t\t\t\tcollapseElement.scrollHeight + 'px';\r\n\t\t}\r\n\r\n\t\taddClass(collapseElement, this.options.collapsingClass);\r\n\t\tremoveClass(collapseElement, this.options.componentClass);\r\n\t\tremoveClass(collapseElement, this.options.showClass);\r\n\t\t// force reflow to enable transition\r\n\t\tcollapseElement.offsetWidth; // tslint:disable-line\r\n\r\n\t\tif (triggers && triggers.length) {\r\n\t\t\ttriggers.forEach(trigger => {\r\n\t\t\t\tconst target = getSelectorElementFromElement(\r\n\t\t\t\t\ttrigger,\r\n\t\t\t\t\tthis.options.dataTargetSelector\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif (target !== null) {\r\n\t\t\t\t\tif (!hasClass(target, this.options.showClass)) {\r\n\t\t\t\t\t\tremoveClass(trigger, this.options.activeClass);\r\n\t\t\t\t\t\ttrigger.setAttribute('aria-expanded', 'false');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.isTransitioning = true;\r\n\t\tif (this.options.animateProp) {\r\n\t\t\tcollapseElement.style[this.options.animateProp] = null;\r\n\t\t}\r\n\r\n\t\taddTransitionEndListener(\r\n\t\t\tcollapseElement,\r\n\t\t\t() => {\r\n\t\t\t\tthis.isTransitioning = false;\r\n\r\n\t\t\t\tremoveClass(collapseElement, this.options.collapsingClass);\r\n\t\t\t\taddClass(collapseElement, this.options.componentClass);\r\n\r\n\t\t\t\tif (this.options.animateProp) {\r\n\t\t\t\t\tcollapseElement.style[this.options.animateProp] = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.eventNamespaceFn(collapseElement, 'hidden');\r\n\t\t\t},\r\n\t\t\tthis.options.transitionDuration\r\n\t\t);\r\n\t}\r\n\r\n\tprivate _addAriaAndCollapsedClass(element: Element, triggers: Element[]) {\r\n\t\tif (element) {\r\n\t\t\tconst isOpen = hasClass(element, this.options.showClass);\r\n\r\n\t\t\tif (triggers && triggers.length) {\r\n\t\t\t\ttriggers.forEach(trigger => {\r\n\t\t\t\t\tisOpen\r\n\t\t\t\t\t\t? addClass(trigger, this.options.activeClass)\r\n\t\t\t\t\t\t: removeClass(trigger, this.options.activeClass);\r\n\r\n\t\t\t\t\ttrigger.setAttribute(\r\n\t\t\t\t\t\t'aria-expanded',\r\n\t\t\t\t\t\tisOpen.toString().toLowerCase()\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tstatic getInstance(\r\n\t\telement: HTMLElement,\r\n\t\toptions?: CollapseOptions,\r\n\t\tcreate = true\r\n\t) {\r\n\t\tlet data = element[stringCollapse] as Collapse;\r\n\r\n\t\tif (!data && create) {\r\n\t\t\tdata = new Collapse(element, options);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nexport function collapse(\r\n\telement: HTMLElement,\r\n\toptions?: CollapseOptions\r\n): Collapse {\r\n\tconsole.error(\r\n\t\t'collapse deprecated: use new Collapse(element, options) instead. (initialized elements can be accessed via Collapse.getInstance()'\r\n\t);\r\n\tlet data = element[stringCollapse] as Collapse;\r\n\r\n\tif (!data) {\r\n\t\tdata = new Collapse(element, options);\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n","export function dispatchCustomEvent(\r\n\telement: EventTarget,\r\n\teventName: string,\r\n) {\r\n\tconst event = new CustomEvent(eventName);\r\n\telement.dispatchEvent(event);\r\n}\r\n","export function setCookie(\r\n\tkey: string,\r\n\tvalue: string,\r\n\tend: number | string | Date,\r\n\tpath = '/',\r\n\tdomain = '',\r\n\tsecure = false\r\n) {\r\n\tif (!key || /^(?:expires|max\\-age|path|domain|secure)$/i.test(key)) {\r\n\t\treturn false;\r\n\t}\r\n\tlet expires = '';\r\n\tif (end) {\r\n\t\tswitch (end.constructor) {\r\n\t\t\tcase Number:\r\n\t\t\t\texpires =\r\n\t\t\t\t\tend === Infinity\r\n\t\t\t\t\t\t? '; expires=Fri, 31 Dec 9999 23:59:59 GMT'\r\n\t\t\t\t\t\t: '; max-age=' + end;\r\n\t\t\t\tbreak;\r\n\t\t\tcase String:\r\n\t\t\t\texpires = `; expires=${end}`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Date:\r\n\t\t\t\texpires = `; expires=${(end as Date).toUTCString()}`;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\texpires = '';\r\n\t\t}\r\n\t}\r\n\tconst keyStr = encodeURIComponent(key);\r\n\tconst valueStr = encodeURIComponent(value);\r\n\tconst domainStr = `${domain ? `; domain=${domain}` : ''}`;\r\n\tconst pathStr = `${path ? `; path=${path}` : ''}`;\r\n\tconst secureStr = `${secure ? '; secure' : ''}`;\r\n\tdocument.cookie = `${keyStr}=${valueStr}${expires}${domainStr}${pathStr}${secureStr}`;\r\n\r\n\treturn true;\r\n}\r\n","export function getCookie(key: string) {\r\n\tif (!key) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn decodeURIComponent(\r\n\t\tdocument.cookie.replace(\r\n\t\t\tnew RegExp(`(?:(?:^|.*;)\\\\s*${encodeURIComponent(key).replace(/[\\-\\.\\+\\*]/g, '\\\\$&')}\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$`,\r\n\t\t\t), '$1')) || null;\r\n}\r\n","import './main.scss';\r\nimport { loadPolyfillv2 } from '@opten/script/load-polyfill';\r\nimport {factory} from '@opten/compiler/factory';\r\nimport { CollapseComponent } from './components/collapse';\r\nimport Modal from './components/modal';\r\nimport { CollapseController } from './components/collapse-controller';\r\nimport CookieBanner from './components/cookie-banner';\r\nimport Disclaimer from './components/disclaimer';\r\nimport ScrollTo from './components/scrollTo';\r\n\r\n\r\nloadPolyfillv2(\r\n\t() => {\r\n\t\tfactory([\r\n\t\tCollapseComponent,\r\n\t\tCollapseController,\r\n\t\tCookieBanner,\r\n\t\tDisclaimer,\r\n\t\tModal,\r\n\t\tScrollTo,\r\n\t\t])(document.body);\r\n\t},\r\n\t[\r\n\t\t'es6',\r\n\t\t'CustomEvent',\r\n\t\t'fetch',\r\n\t\t'HTMLPictureElement',\r\n\t\t'String.prototype.padStart',\r\n\t\t'String.prototype.padEnd',\r\n\t],\r\n);\r\n","import { createScript } from '../create-script';\r\nimport { getScriptBySrc } from '../get-script-by-src';\r\n\r\ninterface PolyfillWindow extends Window {\r\n\tpolyfillsLoadedFlag: boolean;\r\n\tpolyfillsLoadedCallbacks: Function[];\r\n\tpolyfillsLoaded: () => void;\r\n}\r\n\r\nconst polyfillWindow = window as PolyfillWindow;\r\n\r\nconst polyfillesLoadedFn = () => {\r\n\tif (polyfillWindow.polyfillsLoadedCallbacks.length) {\r\n\t\t// tslint:disable-next-line:prefer-for-of\r\n\t\tfor (\r\n\t\t\tlet i = 0;\r\n\t\t\ti < polyfillWindow.polyfillsLoadedCallbacks.length;\r\n\t\t\ti++\r\n\t\t) {\r\n\t\t\tpolyfillWindow.polyfillsLoadedCallbacks[i]();\r\n\t\t}\r\n\t}\r\n\tpolyfillWindow.polyfillsLoadedFlag = true;\r\n};\r\n\r\npolyfillWindow.polyfillsLoadedFlag = false;\r\npolyfillWindow.polyfillsLoadedCallbacks =\r\n\tpolyfillWindow.polyfillsLoadedCallbacks || [];\r\npolyfillWindow.polyfillsLoaded =\r\n\tpolyfillWindow.polyfillsLoaded || polyfillesLoadedFn;\r\n\r\nexport function loadPolyfillv2(\r\n\tcb: () => void,\r\n\tfeatures: string[] = ['es6', 'CustomEvent', 'fetch', 'HTMLPictureElement']\r\n) {\r\n\treturn loadPolyfill(\r\n\t\tcb,\r\n\t\t`https://cdn.polyfill.io/v2/polyfill.min.js?features=${features.join(\r\n\t\t\t','\r\n\t\t)}&flags=gated&callback=polyfillsLoaded`\r\n\t);\r\n}\r\n\r\nexport function loadPolyfill(\r\n\tcb: () => void,\r\n\t// tslint:disable-next-line:max-line-length\r\n\tsrc = 'https://cdn.polyfill.io/v2/polyfill.min.js?features=es6,CustomEvent,fetch,HTMLPictureElement&flags=gated&callback=polyfillsLoaded'\r\n) {\r\n\tpolyfillWindow.polyfillsLoadedCallbacks.push(cb);\r\n\r\n\tconst script = getScriptBySrc(src);\r\n\r\n\tif (script) {\r\n\t\tif (polyfillWindow.polyfillsLoadedFlag) {\r\n\t\t\tcb();\r\n\t\t}\r\n\t} else {\r\n\t\tdocument.head.appendChild(createScript(src, cb));\r\n\t}\r\n}\r\n","interface LoadingScriptWindow extends Window {\r\n\tloadingScripts: string[];\r\n}\r\n\r\nconst loadingScriptWindow = window as LoadingScriptWindow;\r\n\r\nloadingScriptWindow.loadingScripts = loadingScriptWindow.loadingScripts || [];\r\n\r\nexport function createScript(src: string, onerror: () => void = () => {}) {\r\n\tconst scriptElement = document.createElement('script');\r\n\tscriptElement.src = src;\r\n\tscriptElement.async = false;\r\n\tscriptElement.onload = e => {\r\n\t\tremoveLoadingScript(src);\r\n\t};\r\n\tscriptElement.onerror = e => {\r\n\t\tconsole.error(e);\r\n\t\tremoveLoadingScript(src);\r\n\t\tonerror();\r\n\t};\r\n\tloadingScriptWindow.loadingScripts.push(src);\r\n\treturn scriptElement;\r\n}\r\n\r\nfunction removeLoadingScript(src: string) {\r\n\tconst index = loadingScriptWindow.loadingScripts.indexOf(src);\r\n\tif (index > -1) {\r\n\t\tloadingScriptWindow.loadingScripts = loadingScriptWindow.loadingScripts.splice(\r\n\t\t\tindex,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n}\r\n","import { removeDomain } from '@opten/url/remove-domain';\r\n\r\nexport function getScriptBySrc(src: string): HTMLScriptElement {\r\n\t// HINT: NEVER EVER change to Array.from() we need this code in load-polyfill\r\n\t// and IE doesn't understand this until the polyfills are obviously loaded!\r\n\tconst scripts = document.getElementsByTagName('script');\r\n\tfor (let i = 0; i < scripts.length; i++) {\r\n\t\tconst currentScriptElement = scripts.item(i);\r\n\t\tconst currentSrc = removeDomain(currentScriptElement.src);\r\n\t\tif (currentSrc === src) {\r\n\t\t\treturn currentScriptElement;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n","export function removeDomain(url: string) {\r\n\treturn url.replace(/^[a-z]{4,5}\\:\\/{2}[a-z0-9\\.]{1,}[\\:]{0,1}[0-9]{0,4}(.*)/, '$1');\r\n}\r\n","import { asHTMLElement } from '@opten/dom/as-html-element';\r\nimport { hasClass } from '@opten/dom/has-class';\r\nimport { isHTMLElement } from '@opten/dom/is-html-element';\r\n\r\nimport { Compiler } from '../';\r\nimport { Component } from '../metadata/component';\r\nimport { Reflector } from '../reflector';\r\nimport { Resolver } from '../resolver';\r\n\r\n// todo: cache, static, inject?\r\nconst reflector = new Reflector();\r\nconst resolver = new Resolver(reflector);\r\nconst compiler = new Compiler(resolver);\r\n\r\nexport function factory(components: any[]) {\r\n\treturn (rootElement: HTMLElement) => {\r\n\t\tconst observables = new Map();\r\n\t\tcomponents.forEach(componentType => {\r\n\t\t\t// todo: inject resolver, or cache?\r\n\t\t\t// todo: static or something to cache?\r\n\t\t\tconst component = resolver.resolve(componentType);\r\n\r\n\t\t\tif (component) {\r\n\t\t\t\tArray.from(\r\n\t\t\t\t\tdocument.getElementsByClassName(component.className)\r\n\t\t\t\t).forEach(node =>\r\n\t\t\t\t\tcompiler.compile(\r\n\t\t\t\t\t\tcomponent,\r\n\t\t\t\t\t\tnode as HTMLElement,\r\n\t\t\t\t\t\tcomponentType\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif (component.observe) {\r\n\t\t\t\t\tobservables.set(component, componentType);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`No @Component annotation for ${\r\n\t\t\t\t\t\tcomponentType ? componentType.name : componentType\r\n\t\t\t\t\t} found!`\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (observables.size) {\r\n\t\t\tnew MutationObserver(mutations => {\r\n\t\t\t\tconst componentInitializer = new Map void>();\r\n\r\n\t\t\t\tmutations.forEach(mutation => {\r\n\t\t\t\t\tobservables.forEach((value, key) =>\r\n\t\t\t\t\t\tArray.from(mutation.addedNodes)\r\n\t\t\t\t\t\t\t.filter(node => isHTMLElement(node))\r\n\t\t\t\t\t\t\t.map(node => asHTMLElement(node))\r\n\t\t\t\t\t\t\t.forEach(node => {\r\n\t\t\t\t\t\t\t\tconst comps = Array.from(\r\n\t\t\t\t\t\t\t\t\tnode.getElementsByClassName(key.className)\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tif (hasClass(node, key.className)) {\r\n\t\t\t\t\t\t\t\t\tcomps.push(node);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcomps.forEach(component => {\r\n\t\t\t\t\t\t\t\t\tcomponentInitializer.set(\r\n\t\t\t\t\t\t\t\t\t\tcomponent as HTMLElement,\r\n\t\t\t\t\t\t\t\t\t\t() =>\r\n\t\t\t\t\t\t\t\t\t\t\tcompiler.compile(\r\n\t\t\t\t\t\t\t\t\t\t\t\tkey,\r\n\t\t\t\t\t\t\t\t\t\t\t\tcomponent as HTMLElement,\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalue\r\n\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tcomponentInitializer.forEach(c => c());\r\n\t\t\t}).observe(rootElement, {\r\n\t\t\t\tchildList: true,\r\n\t\t\t\tsubtree: true\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n}\r\n","import { isHTMLElement } from '../is-html-element';\r\n\r\nexport function asHTMLElement(o: any): HTMLElement {\r\n\tif (isHTMLElement(o)) {\r\n\t\treturn o as HTMLElement;\r\n\t}\r\n\treturn null;\r\n}\r\n","import { Component } from './metadata/component';\r\nimport { Query } from './metadata/di';\r\nimport { OnInit } from './metadata/lifecycle';\r\nimport { Resolver } from './resolver';\r\nimport { isType } from './util/type';\r\n\r\n\r\n// todo: move whole project to @opten/initializer?\r\nexport class Compiler {\r\n\tprivate componentCache = new Map();\r\n\r\n\tconstructor(private resolver: Resolver) {}\r\n\r\n\tcompile(\r\n\t\tcomponent: Component,\r\n\t\tnode: HTMLElement,\r\n\t\tcomponentType: /*Type*/ any\r\n\t) {\r\n\t\t// todo: cache everything?\r\n\r\n\t\t// todo: cache that also?\r\n\t\tconst constructor = new componentType(node);\r\n\r\n\t\tif (this.componentCache.has(node)) {\r\n\t\t\tthis.componentCache.get(node).push(constructor);\r\n\t\t} else {\r\n\t\t\tthis.componentCache.set(node, [constructor]);\r\n\t\t}\r\n\r\n\t\tObject.keys(component.queries).forEach(propName => {\r\n\t\t\tconst query: Query = component.queries[propName];\r\n\r\n\t\t\t// todo: why do we have to inject the resolver?\r\n\t\t\t// can we not get the class name by some other way?\r\n\t\t\tconst target = this.resolver.resolve(query.selector);\r\n\r\n\t\t\tif (target) {\r\n\t\t\t\tconst targetNode = query.descendants ? node : document;\r\n\t\t\t\tconst nodes = targetNode.getElementsByClassName(\r\n\t\t\t\t\ttarget.className\r\n\t\t\t\t);\r\n\r\n\t\t\t\tconst cache = Array.from(nodes)\r\n\t\t\t\t\t.filter(o => (query.filter ? query.filter(o) : true))\r\n\t\t\t\t\t.map(e => this.componentCache.get(e as HTMLElement))\r\n\t\t\t\t\t.reduce((acc, val) => acc.concat(val), [])\r\n\t\t\t\t\t.filter(f => f.constructor === query.selector);\r\n\r\n\t\t\t\tconstructor[propName] = query.first ? cache[0] : cache;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isType(constructor.onInit)) {\r\n\t\t\t(constructor as OnInit).onInit();\r\n\t\t}\r\n\t}\r\n}\r\n\r\n","import { ANNOTATIONS, PROP_METADATA } from '../util/decorators';\r\nimport { isType, Type } from '../util/type';\r\n\r\n\r\n// todo: @opten/reflector? or @opten/initializer/reflector?\r\nexport class Reflector {\r\n\tannotations(typeOrFunc: Type): any[] {\r\n\t\tif (!isType(typeOrFunc)) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tconst parentCtor = getParentCtor(typeOrFunc);\r\n\t\tconst ownAnnotations =\r\n\t\t\tthis._ownAnnotations(typeOrFunc, parentCtor) || [];\r\n\t\tconst parentAnnotations =\r\n\t\t\tparentCtor !== Object ? this.annotations(parentCtor) : [];\r\n\t\treturn parentAnnotations.concat(ownAnnotations);\r\n\t}\r\n\r\n\tpropMetadata(typeOrFunc: any): { [key: string]: any[] } {\r\n\t\tif (!isType(typeOrFunc)) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\tconst parentCtor = getParentCtor(typeOrFunc);\r\n\t\tconst propMetadata: { [key: string]: any[] } = {};\r\n\t\tif (parentCtor !== Object) {\r\n\t\t\tconst parentPropMetadata = this.propMetadata(parentCtor);\r\n\t\t\tObject.keys(parentPropMetadata).forEach(propName => {\r\n\t\t\t\tpropMetadata[propName] = parentPropMetadata[propName];\r\n\t\t\t});\r\n\t\t}\r\n\t\tconst ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\r\n\t\tif (ownPropMetadata) {\r\n\t\t\tObject.keys(ownPropMetadata).forEach(propName => {\r\n\t\t\t\tconst decorators: any[] = [];\r\n\t\t\t\tif (propMetadata.hasOwnProperty(propName)) {\r\n\t\t\t\t\tdecorators.push(...propMetadata[propName]);\r\n\t\t\t\t}\r\n\t\t\t\tdecorators.push(...ownPropMetadata[propName]);\r\n\t\t\t\tpropMetadata[propName] = decorators;\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn propMetadata;\r\n\t}\r\n\r\n\tprivate _ownAnnotations(\r\n\t\ttypeOrFunc: Type,\r\n\t\tparentCtor: any\r\n\t): any[] | null {\r\n\t\t// API for metadata created by invoking the decorators.\r\n\t\tif (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\r\n\t\t\treturn (typeOrFunc as any)[ANNOTATIONS];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate _ownPropMetadata(\r\n\t\ttypeOrFunc: any,\r\n\t\tparentCtor: any\r\n\t): { [key: string]: any[] } | null {\r\n\t\t// API for metadata created by invoking the decorators.\r\n\t\tif (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\r\n\t\t\treturn (typeOrFunc as any)[PROP_METADATA];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nfunction getParentCtor(ctor: Type): Type {\r\n\tconst parentProto = Object.getPrototypeOf(ctor.prototype);\r\n\tconst parentCtor = parentProto ? parentProto.constructor : null;\r\n\t// Note: We always use `Object` as the null value\r\n\t// to simplify checking later on.\r\n\treturn parentCtor || Object;\r\n}\r\n","import { Component, createComponent } from '../metadata/component';\r\nimport { Query } from '../metadata/di';\r\nimport { Reflector } from '../reflector';\r\n\r\n\r\nconst QUERY_METADATA_IDENTIFIERS = [\r\n\t'ComponentRef',\r\n\t'ComponentRefs',\r\n\t'ChildRef',\r\n\t'ChildrenRef'\r\n];\r\n\r\n// todo: @opten/resolver? or @opten/initializer/resolver?\r\nexport class Resolver {\r\n\tconstructor(private reflector: Reflector) {}\r\n\r\n\t// propertyCache = new Map();\r\n\r\n\tresolve(type: any /*Type*/): Component | null {\r\n\t\tconst typeMetadata = this.reflector.annotations(type);\r\n\r\n\t\tif (typeMetadata) {\r\n\t\t\tconst metadata = findLast(\r\n\t\t\t\ttypeMetadata,\r\n\t\t\t\tc => c && c.metadataName === 'Component'\r\n\t\t\t);\r\n\r\n\t\t\tif (metadata) {\r\n\t\t\t\tconst propertyMetadata = this.reflector.propMetadata(type);\r\n\r\n\t\t\t\treturn this._mergeWithPropertyMetadata(\r\n\t\t\t\t\tmetadata,\r\n\t\t\t\t\tpropertyMetadata,\r\n\t\t\t\t\ttype\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate _mergeWithPropertyMetadata(\r\n\t\tcomponent: Component,\r\n\t\tpropertyMetadata: { [key: string]: any[] },\r\n\t\tcomponentType: /*Type*/ any\r\n\t): Component {\r\n\t\tconst queries: { [key: string]: any } = {};\r\n\r\n\t\tObject.keys(propertyMetadata).forEach((propName: string) => {\r\n\t\t\tconst query = findLast(propertyMetadata[propName], a =>\r\n\t\t\t\tQUERY_METADATA_IDENTIFIERS.some(i => i && i === a.metadataName)\r\n\t\t\t);\r\n\r\n\t\t\tif (query) {\r\n\t\t\t\tqueries[propName] = query;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn this._merge(component, queries, componentType);\r\n\t}\r\n\r\n\tprivate _merge(\r\n\t\tcomponent: Component,\r\n\t\tqueries: { [key: string]: any },\r\n\t\tcomponentType: /*Type*/ any\r\n\t): Component {\r\n\t\tconst mergedQueries = component.queries\r\n\t\t\t? { ...component.queries, ...queries }\r\n\t\t\t: queries;\r\n\r\n\t\treturn createComponent({\r\n\t\t\tclassName: component.className,\r\n\t\t\tobserve: component.observe,\r\n\t\t\tqueries: mergedQueries\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _getQueriesMetadata(queries: { [key: string]: Query }): any[] {\r\n\t\tconst res: any[] = [];\r\n\r\n\t\tObject.keys(queries).forEach((propertyName: string) => {\r\n\t\t\tconst query = queries[propertyName];\r\n\t\t\tres.push(this._getQueryMetadata(query, propertyName));\r\n\t\t});\r\n\r\n\t\treturn res;\r\n\t}\r\n\r\n\tprivate _getQueryMetadata(q: Query, propertyName: string): any {\r\n\t\treturn {\r\n\t\t\tdescendants: q.descendants,\r\n\t\t\tfirst: q.first,\r\n\t\t\tpropertyName,\r\n\t\t\tread: false,\r\n\t\t\tselector: q.selector\r\n\t\t};\r\n\t}\r\n}\r\n\r\nfunction findLast(arr: T[], condition: (value: T) => boolean): T | null {\r\n\tfor (let i = arr.length - 1; i >= 0; i--) {\r\n\t\tif (condition(arr[i])) {\r\n\t\t\treturn arr[i];\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n","\r\n\r\nexport interface MetadataFactory {\r\n\t(...args: any[]): T;\r\n\tmetadataName: string;\r\n\tisTypeOf(obj: any): obj is T;\r\n}\r\n\r\nexport function makeMetadataFactory(\r\n\tname: string,\r\n\tprops?: (...args: any[]) => T\r\n): MetadataFactory {\r\n\tconst factory: any = (...args: any[]) => {\r\n\t\tconst values = props ? props(...args) : {};\r\n\t\treturn {\r\n\t\t\tmetadataName: name,\r\n\t\t\t...values\r\n\t\t};\r\n\t};\r\n\tfactory.isTypeOf = (obj: any) => obj && obj.metadataName === name;\r\n\tfactory.metadataName = name;\r\n\treturn factory;\r\n}\r\n","import { getSelectorFromElement } from '../get-selector-from-element';\r\n\r\nexport function getSelectorElementFromElement(\r\n\telement: Element,\r\n\tattribute = 'data-target',\r\n\tfallbackHref = true\r\n): HTMLElement {\r\n\tconst selector = getSelectorFromElement(element, attribute, fallbackHref);\r\n\r\n\tif (selector && selector.indexOf('#') === 0) {\r\n\t\treturn document.getElementById(selector.substr(1, selector.length - 1));\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n","export function getSelectorFromElement(\r\n\telement: Element,\r\n\tattribute = 'data-target',\r\n\tfallbackHref = true\r\n): string {\r\n\tlet selector = element.getAttribute(attribute);\r\n\r\n\tif (!selector && fallbackHref) {\r\n\t\tselector = element.getAttribute('href') || '';\r\n\t\tselector = /^#.*/i.test(selector) ? selector : null;\r\n\t}\r\n\r\n\treturn selector;\r\n}\r\n","import { dispatchCustomEvent } from '@opten/events/dispatch-custom-event';\r\nimport { getTransitionEndEventName } from '../get-transition-end-event-name';\r\n\r\nconst transitionEndEventName = getTransitionEndEventName();\r\n\r\nexport function addTransitionEndListener(\r\n\telement: Element,\r\n\tcallback: () => void,\r\n\tfallbackDuration = 0,\r\n\tremove = true\r\n): void {\r\n\tlet called = false;\r\n\tconst listener = (event: Event) => {\r\n\t\tcalled = true;\r\n\t\tif (remove) {\r\n\t\t\telement.removeEventListener(\r\n\t\t\t\ttransitionEndEventName as string,\r\n\t\t\t\tlistener\r\n\t\t\t);\r\n\t\t}\r\n\t\tcallback();\r\n\t};\r\n\r\n\tif (transitionEndEventName === false) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tcallback();\r\n\t\t}, fallbackDuration);\r\n\t} else {\r\n\t\telement.addEventListener(transitionEndEventName, listener);\r\n\t\t// https://github.com/twbs/bootstrap/blob/v4.0.0/js/src/util.js#L49\r\n\t\tif (fallbackDuration) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif (!called) {\r\n\t\t\t\t\tdispatchCustomEvent(element, transitionEndEventName);\r\n\t\t\t\t}\r\n\t\t\t}, fallbackDuration);\r\n\t\t}\r\n\t}\r\n}\r\n","export function getTransitionEndEventName(): string | false {\r\n\tconst element = document.createElement('_');\r\n\tconst transitions = {\r\n\t\tWebkitTransition: 'webkitTransitionEnd',\r\n\t\ttransition: 'transitionend',\r\n\t};\r\n\r\n\tfor (const transition in transitions) {\r\n\t\tif (element.style[transition] !== undefined) {\r\n\t\t\treturn transitions[transition];\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n","import { dispatchCustomEvent } from '../dispatch-custom-event';\r\n\r\nexport function eventNamespaceFactory(namespace: string) {\r\n\treturn (element: EventTarget, eventName: string) =>\r\n\t\tdispatchCustomEvent(element, eventName + '.' + namespace);\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport {addClass} from '@opten/dom/add-class';\r\nimport {removeClass} from '@opten/dom/remove-class';\r\nimport {getParentWithClass} from '@opten/dom/get-parent-with-class';\r\n\r\n\r\ndeclare const PhotoSwipe: any;\r\n\r\n@Component({ className: 'js-modal' })\r\nexport default class Modal {\r\n\tprivate modal: HTMLElement;\r\n\tprivate loader: HTMLElement;\r\n\tprivate modalContent: HTMLElement;\r\n\tprivate close: HTMLElement;\r\n\tprivate target: HTMLElement;\r\n\tprivate items: HTMLElement[];\r\n\tprivate lang: string;\r\n\r\n\tconstructor(public element: HTMLElement) {\r\n\t\tthis.lang = document.querySelector('html').getAttribute('lang');\r\n\t\tthis.modal = document.getElementById('modal');\r\n\t\tthis.loader = this.modal.querySelector('.js-modal-loading');\r\n\t\tthis.modalContent = this.modal.querySelector('.js-modal-content');\r\n\t\tthis.close = this.modal.querySelector('.js-modal-close');\r\n\r\n\t\tthis.element.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t\tconst nodeId = this.element.getAttribute('data-nodeid');\r\n\t\t\tconst state = this.element.getAttribute('data-state');\r\n\r\n\t\t\tthis.modalContent.innerHTML = '';\r\n\t\t\tremoveClass(this.loader, 'is-hidden');\r\n\t\t\tthis.toggleModal(true);\r\n\r\n\t\t\t// TODO track target click -> toggleModal\r\n\t\t\tthis.modal.addEventListener('click', (ev) => {\r\n\t\t\t\tif (!getParentWithClass((ev.target as HTMLElement), 'modal__content')) {\r\n\t\t\t\t\tthis.toggleModal(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.close.addEventListener('click', () => this.toggleModal(false), {once: true});\r\n\r\n\t\t\t// TODO: open modal\r\n\t\t\t// TODO: show loading\r\n\t\t\tfetch(`/umbraco/Api/SearchApi/Get?nodeId=${nodeId}&lang=${this.lang}&state=${state}`)\r\n\t\t\t\t.then((res) => res.text())\r\n\t\t\t\t.then((text) => this.handleResponse(text))\r\n\t\t\t\t.catch((error) => console.error(error));\r\n\t\t});\r\n\t}\r\n\r\n\tprivate handleResponse(text: string) {\r\n\t\t// TODO: hide loading\r\n\t\t// TODO: show text\r\n\t\taddClass(this.loader, 'is-hidden');\r\n\r\n\t\ttext = text.replace(/(\\\\r|\\\\n|\\\\t)/gm, '');\r\n\t\ttext = text.replace(/(\\\\\\\")/gm, '\"');\r\n\t\ttext = text.substr(1, text.length - 2);\r\n\r\n\t\tif (this.modal) {\r\n\t\t\tthis.modalContent.innerHTML = text;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate closeModal() {\r\n\t\tthis.toggleModal(false);\r\n\t}\r\n\r\n\tprivate toggleModal(show: boolean) {\r\n\t\tif (this.modal) {\r\n\t\t\tthis.modal.style.display = show ? 'block' : 'none';\r\n\t\t}\r\n\t}\r\n}\r\n","import { firstByClass } from '../first-by-class';\r\nimport { getParents } from '../get-parents';\r\n\r\nexport function getParentWithClass(\r\n\telement: HTMLElement,\r\n\tclassName: string,\r\n): HTMLElement {\r\n\treturn firstByClass(getParents(element), className);\r\n}\r\n","import { hasClass } from '../has-class';\r\n\r\nexport function firstByClass(\r\n\telements: HTMLElement[],\r\n\tclassName: string,\r\n): HTMLElement {\r\n\tfor (const parent of elements as HTMLElement[]) {\r\n\t\tif (hasClass(parent, className)) {\r\n\t\t\treturn parent;\r\n\t\t}\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n","import { getParentsOrSelf } from '../get-parents-or-self';\r\n\r\nexport function getParents(element: HTMLElement) {\r\n\treturn getParentsOrSelf(element.parentElement);\r\n}\r\n","import { isHTMLElement } from '../is-html-element';\r\n\r\nexport function getParentsOrSelf(element: HTMLElement): HTMLElement[] {\r\n\tconst parents: HTMLElement[] = [];\r\n\r\n\tif (element && isHTMLElement(element)) {\r\n\t\tparents.push(element);\r\n\r\n\t\tif (element.parentElement) {\r\n\t\t\tparents.push.apply(\r\n\t\t\t\tparents,\r\n\t\t\t\tgetParentsOrSelf(element.parentElement)\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\treturn parents;\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport { OnInit } from '@opten/compiler/metadata/lifecycle';\r\nimport { ComponentRefs } from '@opten/compiler/metadata/di';\r\nimport { Collapse } from '@opten/collapse/initializer';\r\nimport {isDescendant} from '@opten/dom/is-descendant';\r\nimport { CollapseComponent } from './collapse';\r\n\r\n@Component({ className: 'js-collapse-controller' })\r\nexport class CollapseController implements OnInit {\r\n\tprivate col: Collapse;\r\n\tprivate canHide: boolean;\r\n\tprivate controlledCollapses: CollapseComponent[];\r\n\r\n\t@ComponentRefs(CollapseComponent)\r\n\tprivate collapses: CollapseComponent[];\r\n\r\n\tconstructor(private element: HTMLElement) {\r\n\t\tthis.col = new Collapse(element, {\r\n\t\t\tanimateProp: false,\r\n\t\t\tcollapsingClass: 'fade--fading',\r\n\t\t\tcomponentClass: 'fade',\r\n\t\t\tshowClass: 'fade--show'\r\n\t\t});\r\n\r\n\t\tthis.col.element.addEventListener('hide.opten.collapse', () =>\r\n\t\t\tthis.hideAll()\r\n\t\t);\r\n\t}\r\n\r\n\tonInit(): void {\r\n\t\tthis.controlledCollapses = this.collapses.filter(collapseEl =>\r\n\t\t\tcollapseEl.col.toggles.some(toggle =>\r\n\t\t\t\tisDescendant(this.element, toggle)\r\n\t\t\t)\r\n\t\t);\r\n\t\tthis.controlledCollapses.forEach(collapseEl =>\r\n\t\t\tthis.bindEvents(collapseEl.col)\r\n\t\t);\r\n\t}\r\n\r\n\tprivate bindEvents(col: Collapse) {\r\n\t\tcol.element.addEventListener('hidden.opten.collapse', () =>\r\n\t\t\tthis.hidden()\r\n\t\t);\r\n\t\tcol.element.addEventListener('show.opten.collapse', () => this.show());\r\n\t\tcol.element.addEventListener('hide.opten.collapse', () => this.hide());\r\n\t}\r\n\r\n\tprivate show() {\r\n\t\tthis.canHide = false;\r\n\t\tthis.col.show();\r\n\t}\r\n\r\n\tprivate hide() {\r\n\t\tthis.canHide = true;\r\n\t}\r\n\r\n\tprivate hideAll() {\r\n\t\tthis.controlledCollapses.forEach(collapseComp =>\r\n\t\t\tcollapseComp.col.hide()\r\n\t\t);\r\n\t}\r\n\r\n\tprivate hidden() {\r\n\t\tif (this.canHide) {\r\n\t\t\tthis.col.hide();\r\n\t\t}\r\n\t}\r\n}\r\n","import { makePropDecorator } from '../util/decorators';\r\n\r\n// tslint:disable:variable-name\r\n\r\nexport interface Metadata extends Query {\r\n\tmetadataName: string;\r\n}\r\n\r\nexport interface Query {\r\n\tdescendants: boolean;\r\n\tfirst: boolean;\r\n\tselector: any;\r\n\tfilter: (e: Element) => boolean;\r\n}\r\n\r\nexport abstract class Query {}\r\n\r\nexport const ComponentRef = makePropDecorator(\r\n\t'ComponentRef',\r\n\t(selector?: any, data: any = {}) => ({\r\n\t\tselector,\r\n\t\tfirst: true,\r\n\t\tdescendants: false,\r\n\t\t...data\r\n\t}),\r\n\tQuery\r\n);\r\n\r\nexport const ComponentRefs = makePropDecorator(\r\n\t'ComponentRefs',\r\n\t(selector?: any, data: any = {}) => ({\r\n\t\tselector,\r\n\t\tfirst: false,\r\n\t\tdescendants: false,\r\n\t\t...data\r\n\t}),\r\n\tQuery\r\n);\r\n\r\nexport const ChildRef = makePropDecorator(\r\n\t'ChildRef',\r\n\t(selector?: any, data: any = {}) => ({\r\n\t\tselector,\r\n\t\tfirst: true,\r\n\t\tdescendants: true,\r\n\t\t...data\r\n\t}),\r\n\tQuery\r\n);\r\n\r\nexport const ChildrenRef = makePropDecorator(\r\n\t'ChildrenRef',\r\n\t(selector?: any, data: any = {}) => ({\r\n\t\tselector,\r\n\t\tfirst: false,\r\n\t\tdescendants: true,\r\n\t\t...data\r\n\t}),\r\n\tQuery\r\n);\r\n","export function isDescendant(parent: Node, child: Node) {\r\n\tlet node = child.parentNode;\r\n\twhile (node != null) {\r\n\t\tif (node === parent) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn false;\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport { setCookie } from '@opten/cookie/set';\r\nimport { getCookie } from '@opten/cookie/get';\r\nimport {removeClass} from '@opten/dom/remove-class';\r\nimport {addClass} from '@opten/dom/add-class';\r\nimport { debounce } from '@opten/reactive/debounce';\r\n\r\n@Component({ className: 'js-cookie-banner' })\r\nexport default class CookieBanner {\r\n\tconstructor(private element: HTMLElement) {\r\n\t\tif (getCookie('cookiesAccepted') !== 'true') {\r\n\t\t\tthis.show();\r\n\t\t\tArray.from(document.getElementsByClassName('js-cookie-banner-accept'))\r\n\t\t\t\t.forEach((btn) => btn.addEventListener('click', () => this.remove()));\r\n\t\t} else {\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate remove() {\r\n\t\tsetCookie('cookiesAccepted', 'true', Infinity, '/');\r\n\t\tthis.hide();\r\n\t}\r\n\r\n\tprivate show() {\r\n\t\taddClass(this.element, 'is--active');\r\n\t\taddClass(document.body, 'cookie-banner--active');\r\n\t}\r\n\r\n\tprivate hide() {\r\n\t\tremoveClass(this.element, 'is--active');\r\n\t\tremoveClass(document.body, 'cookie-banner--active');\r\n\t}\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport { setCookie } from '@opten/cookie/set';\r\nimport { getCookie } from '@opten/cookie/get';\r\nimport {removeClass} from '@opten/dom/remove-class';\r\nimport {addClass} from '@opten/dom/add-class';\r\nimport { debounce } from '@opten/reactive/debounce';\r\nimport {getRadioValue} from '@opten/dom/get-radio-value';\r\n\r\n\r\nimport {hasClass} from '@opten/dom/has-class';\r\n\r\n@Component({ className: 'js-disclaimer' })\r\nexport default class Disclaimer {\r\n\tconstructor(private element: HTMLElement) {\r\n\t\tconst content = document.getElementsByClassName('js-disclaimer-passed')[0] as HTMLSelectElement;\r\n\t\tconst failedContent = document.getElementsByClassName('js-disclaimer-failed')[0] as HTMLSelectElement;\r\n\r\n\t\t// if has value\r\n\t\tif (getCookie('investor')) {\r\n\t\t\tconst domicile = getCookie('domicile');\r\n\t\t\tconst investor = getCookie('investor');\r\n\t\t\tthis.showAllowed(domicile, investor, content, failedContent);\r\n\t\t\t// if has no value\r\n\t\t} else {\r\n\t\t\t// if cookie doesnt exist\r\n\t\t\tthis.show();\r\n\t\t\tArray.from(document.getElementsByClassName('js-disclaimer-accept'))\r\n\t\t\t\t.forEach((btn) => btn.addEventListener('click', () => this.validate('accepted', content, failedContent)));\r\n\r\n\t\t\tArray.from(document.getElementsByClassName('js-disclaimer-decline'))\r\n\t\t\t\t.forEach((btn2) => btn2.addEventListener('click', () => this.validate('decline', content, failedContent)));\r\n\t\t}\r\n\t}\r\n\r\n\t// bsp(accepted) (Switzerland) (\"no fonds 4 u\")\r\n\tprivate validate(text, content, failedContent) {\r\n\t\tconst domicile = getRadioValue('domicile');\r\n\t\tconst investor = getRadioValue('investor');\r\n\r\n\t\tif (text === 'accepted') {\r\n\t\t\t// user pressed accept\r\n\t\t\t// transfer filter\r\n\t\t\tthis.showAllowed(domicile, investor, content, failedContent);\r\n\t\t\tthis.setupCookie(domicile, investor);\r\n\t\t\tthis.hide();\r\n\t\t} else {\r\n\t\t\t// user pressed decline\r\n\t\t\tthis.hideContent(failedContent);\r\n\t\t\tremoveClass(failedContent, 'is-hidden');\r\n\t\t}\r\n\t}\r\n\r\n\tprivate remove(domicile, content, failedContent) {\r\n\t\tsetCookie('domicile', domicile, Infinity, '/');\r\n\t\t// show the content\r\n\t\tthis.showContent(content, failedContent);\r\n\t\tthis.hide();\r\n\t}\r\n\r\n\tprivate show() {\r\n\t\tremoveClass(this.element, 'is-hidden');\r\n\t\t// addClass(document.body, 'cookie-banner--active');\r\n\t}\r\n\r\n\tprivate showContent(content, failedContent) {\r\n\t\tremoveClass(content, 'is-hidden');\r\n\t\t// addClass(failedContent, 'is-hidden');\r\n\t}\r\n\r\n\tprivate hideContent(failedContent) {\r\n\t\tsetCookie('domicile', 'invalid', Infinity, '/');\r\n\t\t// destroy content\r\n\t\tremoveClass(failedContent, 'is-hidden');\r\n\t\tthis.hide();\r\n\t}\r\n\r\n\tprivate hide() {\r\n\t\taddClass(this.element, 'is-hidden');\r\n\t}\r\n\r\n\tprivate setupCookie(domicile, investor) {\r\n\t\tsetCookie('domicile', domicile, Infinity, '/');\r\n\t\tsetCookie('investor', investor, Infinity, '/');\r\n\t}\r\n\r\n\tprivate showAllowed(domicile, investor, content, failedContent) {\r\n\r\n\t\t// console.log(domicile);\r\n\t\t// console.log(investor);\r\n\r\n\t\t// count here if 0 then show zero message...\r\n\t\t// show Fonds matching to selection\r\n\t\tArray.from(document.getElementsByClassName('js-list-item'))\r\n\t\t\t.forEach((listItem, el) => this.showFond(el, listItem, domicile, investor));\r\n\r\n\t\tlet anythingVisible = false;\r\n\r\n\t\t// check if parent has visible Childs\r\n\t\tArray.from(document.getElementsByClassName('js-list-parent'))\r\n\t\t\t.forEach((listParent, el) => {\r\n\t\t\t\tif (this.hideEmpty(listParent, el, failedContent)) {\r\n\t\t\t\t\tanythingVisible = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\tif (anythingVisible === false) {\r\n\t\t\tremoveClass(failedContent, 'is-hidden');\r\n\t\t}\r\n\r\n\t\t// show overall content\r\n\t\tthis.showContent(content, failedContent);\r\n\r\n\t}\r\n\r\n\tprivate showFond(el, listItem, domicile, investor) {\r\n\r\n\t\tconst investorAttribute = (listItem.getAttribute('data-investor'));\r\n\t\tconst domicileAttribute = (listItem.getAttribute('data-domicile'));\r\n\r\n\t\tif (investorAttribute.includes(investor) && domicileAttribute.includes(domicile)) {\r\n\t\t\tremoveClass(listItem, 'is-hidden');\r\n\t\t} else {\r\n\t\t\t// stay hidden\r\n\t\t}\r\n\t}\r\n\r\n\tprivate hideEmpty(listParent, el, failedContent) {\r\n\t\tconst hasVisibleItems = Array.from(listParent.getElementsByClassName('js-list-item') as HTMLSelectElement)\r\n\t\t\t\t\t.some((listitem) => hasClass(listitem, 'is-hidden') === false);\r\n\r\n\t\tif (hasVisibleItems) {\r\n\t\t\tremoveClass(listParent, 'is-hidden');\r\n\t\t}\r\n\r\n\t\treturn hasVisibleItems;\r\n\t}\r\n}\r\n","export function getRadioValue(name: string): string {\r\n\tconst options = document.getElementsByName(name);\r\n\tlet optionsValue: string;\r\n\tfor (let i = 0; i < options.length; i++) {\r\n\t\tconst option = options[i] as HTMLInputElement;\r\n\t\tif (option.checked) {\r\n\t\t\toptionsValue = option.value;\r\n\t\t}\r\n\t}\r\n\treturn optionsValue;\r\n}\r\n","import { Component } from '@opten/compiler/metadata/component';\r\nimport { scrollToId } from '@opten/scroll/scroll-to-id';\r\nimport {addClass} from '@opten/dom/add-class';\r\nimport {removeClass} from '@opten/dom/remove-class';\r\n\r\n@Component({ className: 'js-scroll-to' })\r\nexport default class ScrollTo {\r\n\tconstructor(public element: HTMLElement) {\r\n\t\tconst target = element.getAttribute('data-target');\r\n\t\tconst header = document.getElementsByTagName('header')[0] as HTMLElement;\r\n\t\tlet offset = (header.clientHeight * -1);\r\n\t\telement.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\toffset = (header.clientHeight * -1);\r\n\t\t\tscrollToId(target, undefined, undefined, offset);\r\n\t\t});\r\n\r\n\t\tif (location.hash) {\r\n\t\t\tscrollToId(location.hash.replace('#', ''), undefined, undefined, offset);\r\n\t\t}\r\n\r\n\t\tthis.showElement();\r\n\r\n\t\twindow.addEventListener('scroll', (e) => {\r\n\t\t\tthis.showElement();\r\n\t\t});\r\n\t}\r\n\r\n\tprivate showElement() {\r\n\t\twindow.scrollY > 50 ? addClass(this.element, 'fade--show') : removeClass(this.element, 'fade--show');\r\n\t}\r\n}\r\n","import { AnimationFunction } from '@opten/animation/animation-function';\r\nimport { linearTween } from '@opten/animation/linear-tween';\r\nimport { scrollToElement } from '../scroll-to-element';\r\n\r\nexport function scrollToId(\r\n\tid: string,\r\n\tanimationFunction: AnimationFunction = linearTween,\r\n\tduration = 300,\r\n\toffset = 0,\r\n\twrapper: HTMLElement | Window = window\r\n) {\r\n\treturn scrollToElement(\r\n\t\tdocument.getElementById(id),\r\n\t\tanimationFunction,\r\n\t\tduration,\r\n\t\toffset,\r\n\t\twrapper\r\n\t);\r\n}\r\n","import { AnimationFunction } from '@opten/animation/animation-function';\r\nimport { linearTween } from '@opten/animation/linear-tween';\r\nimport { scrollToOffset } from '../scroll-to-offset';\r\n\r\nexport function scrollToElement(\r\n\ttarget: Element,\r\n\tanimation: AnimationFunction = linearTween,\r\n\tduration = 300,\r\n\toffset = 0,\r\n\twrapper: HTMLElement | Window = window\r\n) {\r\n\tconst top =\r\n\t\twrapper !== window\r\n\t\t\t? (target as HTMLElement).offsetTop -\r\n\t\t\t (wrapper as HTMLElement).scrollTop\r\n\t\t\t: target.getBoundingClientRect().top;\r\n\r\n\treturn scrollToOffset(top, animation, duration, offset, wrapper);\r\n}\r\n","import { AnimationFunction } from '@opten/animation/animation-function';\r\nimport { linearTween } from '@opten/animation/linear-tween';\r\nimport { scrollTo } from '../scroll-to';\r\n\r\nexport function scrollToOffset(\r\n\tdistance: number,\r\n\tanimationFunction: AnimationFunction = linearTween,\r\n\tduration = 300,\r\n\toffset = 0,\r\n\twrapper: HTMLElement | Window = window\r\n) {\r\n\tscrollTo(distance + offset, animationFunction, duration, wrapper);\r\n}\r\n","import { AnimationFunction } from '@opten/animation/animation-function';\r\nimport { getWindowScrollTop } from '@opten/dom/get-window-scroll-top';\r\n\r\nexport function scrollTo(\r\n\tdistance: number,\r\n\tanimationFunction: AnimationFunction = (t, b, c, d) => {\r\n\t\treturn (c * t) / d + b;\r\n\t},\r\n\tduration = 300,\r\n\twrapper: HTMLElement | Window = window\r\n) {\r\n\tlet start = getWindowScrollTop();\r\n\tlet timeStart: number;\r\n\tlet timeElapsed: number;\r\n\r\n\tif (wrapper instanceof HTMLElement) {\r\n\t\tstart = wrapper.scrollTop;\r\n\t}\r\n\r\n\trequestAnimationFrame.call(window, time => {\r\n\t\ttimeStart = time;\r\n\t\tloop(time);\r\n\t});\r\n\r\n\tfunction loop(time) {\r\n\t\ttimeElapsed = time - timeStart;\r\n\r\n\t\tif (wrapper instanceof Window) {\r\n\t\t\twrapper.scrollTo(\r\n\t\t\t\t0,\r\n\t\t\t\tanimationFunction(timeElapsed, start, distance, duration)\r\n\t\t\t);\r\n\r\n\t\t\tif (timeElapsed < duration) {\r\n\t\t\t\trequestAnimationFrame.call(window, loop);\r\n\t\t\t} else {\r\n\t\t\t\twrapper.scrollTo(0, start + distance);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twrapper.scrollTop = animationFunction(\r\n\t\t\t\ttimeElapsed,\r\n\t\t\t\tstart,\r\n\t\t\t\tdistance,\r\n\t\t\t\tduration\r\n\t\t\t);\r\n\r\n\t\t\tif (timeElapsed < duration) {\r\n\t\t\t\trequestAnimationFrame.call(window, loop);\r\n\t\t\t} else {\r\n\t\t\t\twrapper.scrollTop = start + distance;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","export function getWindowScrollTop() {\r\n\treturn window.pageYOffset !== undefined\r\n\t\t? window.pageYOffset\r\n\t\t: ((document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body) as HTMLElement).scrollTop;\r\n}\r\n"],"sourceRoot":""}