1 line
794 KiB
Plaintext
1 line
794 KiB
Plaintext
{"version":3,"sources":["ts_src/platform/es6-misc.ts"," [synthetic:es6/util/arrayiterator] "," [synthetic:util/defineproperty] "," [synthetic:util/global] "," [synthetic:util/polyfill] "," [synthetic:es6/symbol] "," [synthetic:es6/util/makeiterator] "," [synthetic:es6/util/arrayfromiterable] "," [synthetic:es6/util/arrayfromiterator] "," [synthetic:es6/util/setprototypeof] "," [synthetic:es6/generator_engine] ","ts_src/platform/symbol.ts","../../../promise-polyfill/src/index.js","../../../promise-polyfill/src/finally.js","ts_src/platform/promise.ts","../../../get-own-property-symbols/build/get-own-property-symbols.max.js","ts_src/platform/custom-event.ts","ts_src/platform/event-listener-options.ts","ts_src/platform/baseuri.ts","ts_src/platform/get-attribute-names.ts","ts_src/platform/matches.ts","ts_src/platform/parent-node/append.ts","ts_src/platform/parent-node/prepend.ts","ts_src/platform/parent-node/replace-children.ts","ts_src/platform/child-node/after.ts","ts_src/platform/child-node/before.ts","ts_src/platform/child-node/remove.ts","ts_src/platform/child-node/replace-with.ts","ts_src/platform/svg-element-class-list.ts","ts_src/platform/toggle-attribute.ts","ts_src/unresolved.ts","ts_src/flag-parser.ts","../../template/template.js","../../shadydom/src/shady-data.js","../../shadydom/src/utils.js","../../shadydom/src/patch-native.js","../../shadydom/src/flush.js","../../shadydom/src/observe-changes.js","../../shadydom/src/innerHTML.js","../../shadydom/src/patch-instances.js","../../shadydom/src/patch-events.js","../../shadydom/src/array-splice.js","../../shadydom/src/patches/EventTarget.js","../../shadydom/src/style-scoping.js","../../shadydom/src/patches/Node.js","../../shadydom/src/attach-shadow.js","../../shadydom/src/patches/Slotable.js","../../shadydom/src/selector-parser.js","../../shadydom/src/patches/ParentNode.js","../../shadydom/src/patches/ChildNode.js","../../shadydom/src/patches/Element.js","../../shadydom/src/patches/ElementOrShadowRoot.js","../../shadydom/src/patches/HTMLElement.js","../../shadydom/src/patches/Slot.js","../../shadydom/src/patches/DocumentOrFragment.js","../../shadydom/src/patches/DocumentOrShadowRoot.js","../../shadydom/src/patches/Document.js","../../shadydom/src/patches/Window.js","../../shadydom/src/patch-prototypes.js","../../shadydom/src/link-nodes.js","../../shadydom/src/patches/ShadowRoot.js","../../shadydom/src/patch-shadyRoot.js","../../shadydom/src/wrapper.js","../../shadydom/src/shadydom.js","../../custom-elements/ts_src/Patch/Native.ts","../../custom-elements/ts_src/Utilities.ts","../../custom-elements/ts_src/CustomElementInternals.ts","../../custom-elements/ts_src/custom-elements.ts","../../custom-elements/ts_src/CustomElementState.ts","../../custom-elements/ts_src/Deferred.ts","../../custom-elements/ts_src/DocumentConstructionObserver.ts","../../custom-elements/ts_src/CustomElementRegistry.ts","../../custom-elements/ts_src/Patch/Interface/ParentNode.ts","../../custom-elements/ts_src/Patch/Document.ts","../../custom-elements/ts_src/Patch/Interface/ChildNode.ts","../../custom-elements/ts_src/Patch/Element.ts","../../custom-elements/ts_src/AlreadyConstructedMarker.ts","../../custom-elements/ts_src/Patch/HTMLElement.ts","../../custom-elements/ts_src/Patch/Node.ts","../../custom-elements/ts_src/Patch/DocumentFragment.ts","../../shadycss/src/css-parse.js","../../shadycss/src/style-settings.js","../../shadycss/src/common-regex.js","../../shadycss/src/unscoped-style-handler.js","../../shadycss/src/style-util.js","../../shadycss/src/style-transformer.js","../../shadycss/src/scoping-shim.js","../../shadycss/src/document-watcher.js","../../shadycss/src/style-properties.js","../../shadycss/src/style-info.js","../../shadycss/src/style-placeholder.js","../../shadycss/src/style-cache.js","../../shadycss/src/template-map.js","../../shadycss/src/apply-shim-utils.js","../../shadycss/src/common-utils.js","../../shadycss/entrypoints/scoping-shim.js","../../url/url.js"],"names":["$jscomp.defineProperty","$jscomp.global","$jscomp.getGlobal","$jscomp.polyfill","$jscomp.iteratorPrototype","$jscomp.arrayIteratorImpl","$jscomp.setPrototypeOf","$jscomp.generator.Context","$jscomp.generator.Generator_","$jscomp.generator.Engine_","Array","from","Array.from","object","slice","call","Object","assign","Object.assign","target","args","arguments","i","s","length","n$","keys","source","p","setTimeoutFunc","setTimeout","noop","bind","fn","thisArg","apply","Promise","TypeError","_state","_handled","_value","undefined","_deferreds","doResolve","handle","self","deferred","push","Promise$$module$node_modules$promise_polyfill$src$index._immediateFn","cb","onFulfilled","onRejected","resolve","reject","promise","ret","e","newValue","then","finale","console","warn","len","Handler","done","value","reason","ex","prototype","Promise.prototype.then","prom","constructor","finallyConstructor","callback","Promise.all","arr","res","val","remaining","Promise.resolve","Promise.reject","Promise.race","Promise$$module$node_modules$promise_polyfill$src$index.resolve","setImmediate","window","Promise$$module$node_modules$promise_polyfill$src$index.all","Promise$$module$node_modules$promise_polyfill$src$index.race","Promise$$module$node_modules$promise_polyfill$src$index.reject","node","document","createTextNode","callbacks","MutationObserver","splice","observe","characterData","PromisePolyfill._immediateFn","textContent","GOPS","G","global","id","random","String","Math","internalSymbol","gOPN","GOPN","gOPD","GOPD","create","freeze","defineProperty","DP","$defineProperties","DPies","descriptor","ObjectProto","hOP","hasOwnProperty","pIE","PIE","toString","addInternalIfNeeded","o","uid","enumerable","configurable","writable","createWithSymbols","proto","descriptors","forEach","key","propertyIsEnumerable","$defineProperty","get","onlyNonSymbols","name","onlySymbols","setAndGetSymbol","set","setDescriptor","sourceConstructor","Symbol","description","prefix","concat","sourceMap","newDescriptor","$getOwnPropertySymbols","filter","map","descriptor.value","symbols","symbol","label","str","o_O","protoDescriptor","O","dP","toStringTag","getOwnPropertyDescriptor","tst","Si","AP","SP","returnThis","iterator","next","fromCodePoint","c","codePointAt","Object.prototype.toString","Object.keys","obj","getOwnPropertyNames","prop","$jscomp.generator.createGenerator","Set","temp","Map","entries","createEvent","initEvent","preventDefault","defaultPrevented","origPreventDefault","Event","Event.prototype.preventDefault","cancelable","isIE","test","navigator","userAgent","origEvent","inType","params","bubbles","CustomEvent","initCustomEvent","detail","MouseEvent","origMouseEvent","initMouseEvent","view","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","j","_a","supportsEventOptions","listener","callCount","supported","onceSupported","eventOptions","capture","once","d","createElement","addEventListener","fullySupported","dispatchEvent","removeEventListener","nativeEventTarget","EventTarget","Node","parseEventOptions","optionsOrCapture","origAddEventListener","origRemoveEventListener","captureListenerMap","WeakMap","listenerMap","getListenerMap","type","elMap","typeMap","listeners","nativeEventTarget.prototype.addEventListener","options","has","cachedListener","delete","handleEvent","nativeEventTarget.prototype.removeEventListener","native_baseURI","base","ownerDocument","querySelector","href","location","_b","Element_prototype","Element","attributesDescriptor","getAttributes","attributes","getAttributeNames","Element_prototype.getAttributeNames","attr","matches","webkitMatchesSelector","msMatchesSelector","nativeAppendChild","appendChild","installAppend","append","$jscomp.makeIterator","arg","Document","DocumentFragment","nativeInsertBefore","insertBefore","nativeGetFirstChild","firstChild","installPrepend","prepend","newNode","nativeRemoveChild","removeChild","installReplaceChildren","replaceChildren","child","_c","_d","nativeGetParentNode","parentNode","nativeGetNextSibling","nextSibling","installAfter","after","CharacterData","installBefore","before","installRemove","remove","installReplaceWith","replaceWith","HTMLElement_prototype","HTMLElement","SVGElement_prototype","nativeHasAttribute","hasAttribute","nativeSetAttribute","setAttribute","nativeRemoveAttribute","removeAttribute","toggleAttribute","Element_prototype.toggleAttribute","force","style","head","extendedWindow","script","flagMatcher","flags","search","split","option","parts","match","a","log","f","forceShady","noPatch","forceCE","PolyfilledHTMLTemplateElement","QSA","selector","childNodes","nodeType","DOCUMENT_NODE","docQuerySelectorAll","DOCUMENT_FRAGMENT_NODE","fragQuerySelectorAll","elementQuerySelectorAll","needsTemplate","HTMLTemplateElement","brokenDocFragment","createDocumentFragment","cloneNode","needsDocFrag","refNode","origInsertBefore","origCloneNode","Node.prototype.cloneNode","deep","newDom","__proto__","querySelectorAll","defineProperties","origAppendChild","Node.prototype.appendChild","origRemoveChild","origReplaceChild","replaceChild","Node.prototype.replaceChild","newChild","oldChild","Document.prototype.createDocumentFragment","frag","origImportNode","importNode","Document.prototype.importNode","impNode","capturedCloneNode","capturedCreateElement","capturedImportNode","capturedRemoveChild","capturedAppendChild","capturedReplaceChild","capturedParseFromString","DOMParser","parseFromString","capturedHTMLElementInnerHTML","innerHTML","text","capturedChildNodes","needsCloning","t","t2","content","clone","contentDoc","implementation","createHTMLDocument","canDecorate","templateStyle","firstElementChild","canProtoPatch","decorate","PolyfilledHTMLTemplateElement.decorate","template","namespaceURI","documentElement","template.cloneNode","_cloneNode","defineInnerHTML","defineOuterHTML","err","bootstrap","topLevelWrappingMap","getInnerHTML","wrap","exec","toLowerCase","body","lastChild","docFrag","Error","PolyfilledHTMLTemplateElement.bootstrap","doc","templates","TEMPLATE_TAG","l","Document.prototype.createElement","el","localName","DOMParser.prototype.parseFromString","escapeAttrRegExp","escapeDataRegExp","escapeReplace","makeSet","voidElements","plaintextParents","c$","ELEMENT_NODE","tagName","attrs","replace","TEXT_NODE","data","COMMENT_NODE","error","PolyfilledHTMLTemplateElement._cloneNode","fixClonedDom","s$","t$","dom","element","scripts","scriptSelector","ns","ai","ShadyData","toJSON","ensureShadyDataForNode","__shady","shadyDataForNode","settings","hasNativeShadowDOM","attachShadow","getRootNode","desc","hasDescriptors","inUse","preferPerformance","patchOnDemand","userValue","acceptedValues","indexOf","querySelectorImplementation","IS_IE","getPropertyName","prefixed","isTrackingLogicalChildNodes","nodeData","isShadyRoot","ShadowRoot","hasShadowRootWithSlot","root","_hasInsertionPoint","matchesSelector","mozMatchesSelector","oMatchesSelector","twiddle","queue","shift","microtask","documentContains","contains","container","createPolyfilledHTMLCollection","nodes","getAttribute","isNaN","item","nodes.item","index","namedItem","nodes.namedItem","nativeChildNodesArray","parent","result","n","childNodesArray","patchProperty","patchProperties","disallowedPatches","patchExistingProperties","getOwnPropertyDescriptors","names","convertIntoANode","convertNodesIntoANode","fragment","flat","array","depth","reduce","acc","isArray","$jscomp.arrayFromIterable","deduplicate","results","add","flushList","scheduled","enqueue","flush","didFlush","AsyncObserver","_scheduled","addedNodes","removedNodes","schedule","mutations","takeRecords","observeChildren","sd","observer","_callback","_observer","_node","unobserveChildren","size","filterMutations","targetRootNode","mutation","mutationInScope","m","nativeMethods","nativeTree","installNativeAccessor","NATIVE_PREFIX","defineNativeAccessors","copyProperties","list","nodeWalker","createTreeWalker","NodeFilter","SHOW_ALL","elementWalker","SHOW_ELEMENT","inertDoc","clearNode","ParentNodeAccessors","ParentNodeMethods","addNativePrefixedProperties","eventProps","Window","XMLHttpRequest","currentNode","previousSibling","parentElement","textWalker","SHOW_TEXT","nextNode","nodeValue","ParentNodeWalkerDescriptors","lastElementChild","children","childElementCount","previousElementSibling","nextElementSibling","containerName","htmlContainer","createElementNS","newContent","className","InsideDescriptors","shadowRoot","TextContentInnerHTMLDescriptors","OutsideDescriptors","makeNonEnumerable","noInstancePatching","patchOutsideElementAccessors","__outsideAccessors","patchInsideElementAccessors","__insideAccessors","customElements","eventWrappersName","Date","now","composedGetter","composedProp","ev","shadyTarget","__shadyTarget","nativeEventOptions","alwaysComposed","unpatchedEvents","getRootNodeWithFallback","eventTarget","pathComposer","startNode","composed","composedPath","current","startRoot","host","event","__composedPath","retarget","path","refNodePath","ancestor","lastRoot","rootIdx","EventPatches","__composed","isTrusted","currentTarget","__relatedTarget","__relatedTargetComposedPath","stopPropagation","__propagationStopped","stopImmediatePropagation","__immediatePropagationStopped","eventPhaseDescriptor","AT_TARGET","mixinComposedFlag","Base","klazz","nonBubblingEventsToRetarget","hasRetargeted","fireHandlers","phase","hs","__handlers","shadyDispatchEventNeedsProxyEvent","shadyDispatchEvent","originalEvent","retargetedPath","prevCurrentTargetDesc","eventPhase","CAPTURING_PHASE","prevEventPhaseDesc","atTarget","BUBBLING_PHASE","findListener","wrappers","savedType","savedListener","savedCapture","savedNode","patchEvent","fnOrObj","handlerType","wrapperFn","lastCurrentTargetDesc","lastEventPhaseDesc","idx","activateFocusEventOverrides","EventPatchesDescriptors","getPrototypeOf","SHADY_PROTO","patchedProto","SHADY_SOURCE_PROTO","PatchedEvent","PatchedCustomEvent","PatchedMouseEvent","patchClick","composedClickFn","click","eventPropertyNamesForElement","substring","eventPropertyNamesForHTMLElement","wrappedDescriptorForEventProperty","property","shadyData","eventName","__onCallbackListeners","newSplice","addedCount","removed","calcSplices","currentEnd","old","oldEnd","currentStart","oldStart","prefixCount","suffixCount","minLength","min","currentValue","previousValue","index1","index2","count","equals","rowCount","columnCount","distances","north","west","edits","EDIT_ADD","EDIT_DELETE","northWest","EDIT_LEAVE","EDIT_UPDATE","reverse","splices","oldIndex","EventTargetPatches","scopingShim","getScopingShim","scopeClassAttribute","removeShadyScoping","currentScopeName","currentScopeIsCorrect","newScopeName","correctScope","currentScope","currentScopeForNode","treeVisitor","visitorFn","nativeIsConnectedAccessors","nativeIsConnected","removeOwnerShadyRoot","ownerShadyRoot","firstComposedNode","flattened","flattenedNodes","scheduleObserver","addedNode","removedNode","NodePatches","childNodes.item","isConnected","tc","join","ref_node","refData","slotsAdded","ownerRoot","ownerShadyRootForNode","oldScopeName","skipUnscoping","allowNativeInsert","needsScoping","needsSlotFinding","_ensureSlotData","_pendingSlots","_asyncRender","recordInsertBefore","parentData","adoptNode","removingInsertionPoint","_removeContainedSlots","recordRemoveChild","preventNativeRemove","changeSlotContent","ATTRIBUTE_NODE","nc","SlotablePatches","assignedSlot","_render","PARENS","end","matchNestedParens","k","v","findNext","start","queryChars","parenInfo","parseSelectorList","endComplexSelector","chunks","pop","compoundSelectors","x","combinators","prevChunk","nextIndex","nextChunk","query","matcher","halter","queryChildNodes","ParentNodePatches","logicalQuerySelectorAll","contextNode","selectorList","matchesCompoundSelector","compoundSelector","complexSelectors","cursors","complexSelectorParts","matchedElement","some","cursor","lastIndex","combinator","sibling","QueryPatches","candidates","candidate","useNative","ParentNodeDocumentOrFragmentPatches","ChildNodePatches","distributeAttributeChange","_slotList","_validateSlots","oldName","__slotName","_nameForSlot","slots","_slotMap","_sortSlots","ElementPatches","slot","ElementShadowPatches","_init","recordChildNodes","ShadyRoot","ShadyRootConstructionToken","publicRoot","ElementOrShadowRootPatches","HTMLElementPatches","blur","shadowActive","activeElement","SlotPatches","assignedNodes","flatten","DocumentOrFragmentPatches","getElementById","getElInRoot","roots","elRoot","getAncestorRoots","docOrRoot","elementsFromPointProperty","DocumentOrShadowRootPatches","active","activeRoot","elementsFromPoint","y","nativeResult","USE_NATIVE_DOCUMENT_EFP","nativeArray","ancestorRoots","rootedResult","r","elementFromPoint","DocumentPatches","WindowPatches","NonStandardHTMLElement","patchMap","Text","Comment","CDATASection","ProcessingInstruction","HTMLSlotElement","disallowedNativePatches","applyPatchList","disallowed","patch","applyPatches","ctor","PROTO_IS_PATCHED","PATCHED_PROTO","patchElementProto","patchNode","nativeProto","setPrototypeOf","OutsideAccessors","InsideAcccessors","linkNode","containerData","ref_nodeData","psd","nsd","first","adoptedParent","previous","ShadowRootPatches","patchShadyAccessors","isRendering","readyState","rootRendered","ancestorList","ancestors","unshift","token","mode","hostData","MODE_CLOSED","rootData","_renderPending","renderRoot","__childSlotCount","_renderSelf","wasRendering","_distribute","slotData","_previouslyAssignedNodes","_prevAssignedSlot","_distributeNodeToSlot","slotParentRoot","slotParentData","_addAssignedToFlattenedNodes","prevAssignedNodes","dirty","_fireSlotChange","_compose","composeList","targetNode","distributedNode","_hasRendered","forcedSlot","oldSlot","CATCHALL_NAME","assigned","nestedAssigned","slotNamesToSort","slotParent","_mapSlots","sort","b","listA","listB","nA","nB","didRemove","patchShadyRoot","SHADY_PREFIX","nodeName","define","connectMap","clear","ManageConnect","connected","disconnected","counter","connectFlag","connectedCallback","disconnectedCallback","originalDefine","Wrapper","?.prototype","focus","$jscomp.global.Object.defineProperties","_activeElement","addEventPropertyWrapper","wrapperMap","wrapper","ShadyDOM","flushInitial","Document_createElement","Document_createElementNS","Document_importNode","Document_prepend","Document_append","DocumentFragment_prepend","DocumentFragment_append","Node_cloneNode","Node_appendChild","Node_insertBefore","Node_removeChild","Node_replaceChild","Node_textContent","Element_attachShadow","Element_innerHTML","Element_getAttribute","Element_setAttribute","Element_removeAttribute","Element_toggleAttribute","Element_getAttributeNS","getAttributeNS","Element_setAttributeNS","setAttributeNS","Element_removeAttributeNS","removeAttributeNS","Element_insertAdjacentElement","Element_insertAdjacentHTML","Element_prepend","Element_append","Element_before","Element_after","Element_replaceWith","Element_remove","HTMLElement_innerHTML","HTMLElement_insertAdjacentElement","HTMLElement_insertAdjacentHTML","reservedElementNameSet","isValidCustomElementName","reserved","validForm","nativeContains","nativeValue","__CE_isImportDocument","childrenFromFragment","nativeChildren","nextSiblingOrAncestorSibling","walkDeepDescendantElements","visitedImports","import","__CE_shadowRoot","CustomElementInternals","noDocumentConstructionObserver","priorCustomElements","shadyDomFastWalk","_patchesNode","_patchesElement","_hasPatches","useDocumentConstructionObserver","forEachElement","elements","addNodePatch","addElementPatch","patchTree","patchElement","__CE_patched","connectTree","custom","__CE_state","upgradeReaction","disconnectTree","patchAndUpgradeTree","upgrade","gatherElements","__CE_registry","__CE_documentLoadHandled","clonedVisitedImports","registry","defaultView","internal_localNameToDefinition","definition","constructionStack","constructorFunction","failed","__CE_definition","attributeChangedCallback","hasAttributes","observedAttributes","_upgradeAnElement","reportTheException","oldValue","namespace","createAnElement","NS_HTML","HTMLUnknownElement","message","filename","lineno","colno","sourceURL","fileName","line","lineNumber","column","columnNumber","ErrorEvent","initErrorEvent","event.preventDefault","Deferred","_promise","_resolve","DocumentConstructionObserver","internals","_internals","_document","_handleMutations","childList","subtree","disconnect","CustomElementRegistry","_localNameToConstructorGetter","_localNameToDefinition","_constructorToDefinition","_elementDefinitionIsRunning","_whenDefinedDeferred","_flushCallback","this._flushCallback","_flushPending","_unflushedLocalNames","_documentConstructionObserver","polyfillDefineLazy","constructorGetter","Function","internal_assertCanDefineLocalName","_flush","internal_reifyDefinition","SyntaxError","getCallback","callbackValue","adoptedCallback","elementsWithStableDefinitions","unflushedLocalNames","elementsWithPendingDefinitions","pendingElements","pendingUpgradableElements","whenDefined","prior","anyDefinitionExists","definitionHasFlushed","polyfillWrapFlushCallback","outer","inner","existingDefinition","destination","builtIn","appendPrependPatch","builtInMethod","connectedElements","Document.prototype.createElementNS","PatchParentNode","beforeAfterPatch","destination.replaceWith","wasConnected","destination.remove","patch_innerHTML","baseDescriptor","htmlString","removedElements","patch_insertAdjacentElement","baseMethod","insertAdjacentElement","destination.insertAdjacentElement","position","insertedElement","patch_insertAdjacentHTML","upgradeNodesInRange","insertAdjacentHTML","destination.insertAdjacentHTML","strPosition","marker","Element.prototype.attachShadow","init","assignedValue","isTemplate","rawElement","Element.prototype.setAttribute","Element.prototype.setAttributeNS","Element.prototype.removeAttribute","Element.prototype.toggleAttribute","hadAttribute","Element.prototype.removeAttributeNS","PatchChildNode","alreadyConstructedMarker","PatchedHTMLElement","patch_textContent","childNodesLength","Node.prototype.insertBefore","insertedNodes","nodeWasConnectedElement","Node.prototype.removeChild","nodeToInsert","nodeToRemove","nodeToInsertWasConnectedElement","thisIsConnected","installPolyfill","PatchHTMLElement","PatchDocument","PatchNode","PatchElement","StyleNode","parse","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.comments","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.port","OPEN_BRACE","CLOSE_BRACE","parseCss","trim","ss","_expandUnicodeEscapes","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.multipleSpaces","lastIndexOf","AT_START","MEDIA_START","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.MEDIA_RULE","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.keyframesRule","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.KEYFRAMES_RULE","VAR_START","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.MIXIN_RULE","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.STYLE_RULE","r$","code","repeat","stringify","preserveProperties","cssText","rules","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.customProp","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.mixinProp","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.mixinApply","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.varApply","STYLE_RULE","KEYFRAMES_RULE","MEDIA_RULE","MIXIN_RULE","comments","port","customProp","mixinProp","mixinApply","varApply","keyframesRule","multipleSpaces","nativeShadow","nativeCssVariables_","calcCssVariables","shimcssproperties","CSS","supports","cssBuild","ShadyCSS","disableRuntime","nativeCss","nativeCssVariables","VAR_ASSIGN","MIXIN_MATCH","VAR_CONSUMED","ANIMATION_MATCH","MEDIA_MATCH","BRACKETED","styleTextSet","toCssText","forEachRule","rulesForStyle","isKeyframesSelector","rule","styleRuleCallback","keyframesRuleCallback","onlyActiveRules","skipRules","matchMedia","applyCss","moniker","applyStyle","lastHeadApplyNode","applyStylePlaceHolder","placeHolder","createComment","scope","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findMatchingParen","level","processVariableAndFallback","suffix","comma","fallback","setElementClassRaw","getIsExtends","typeExtension","is","extends","splitSelectorList","part","getCssBuild","__cssBuild","attrValue","CSS_BUILD_ATTR","buildComment","commentParts","isOptimalCssBuild","StyleTransformer","domAddScope","_transformDom","transformer","_content","shouldRemoveScope","classList","SCOPE_NAME","CLASS","domReplaceScope","oldScope","newScope","domRemoveScope","elementStyles","styleRules","css","ext","hostScope","_calcHostScope","CSS_CLASS_PREFIX","isScoped","transformedSelector","_transformRuleCss","_transformComplexSelector","p$","COMPLEX_SELECTOR_SEP","_twiddleNthPlus","NTH","inside","_preserveMatchesPseudo","MATCHES","input","MATCHES_REPLACEMENT","_replaceMatchesPseudo","cur","stop","isNth","isMatches","SLOTTED_START","SIMPLE_SELECTOR_SEP","info","_transformCompoundSelector","DIR_PAREN","dir","slottedIndex","SLOTTED","HOST","_transformHostSelector","_transformSimpleSelector","slotted","SLOTTED_PAREN","paren","output","PSEUDO_PREFIX","HOST_PAREN","SIMPLE_SELECTOR_PREFIX","typeSelector","SELECTOR_NO_MATCH","normalizeRootSelector","ROOT","_transformDocumentSelector","SCOPE_DOC_SELECTOR","$jscompDefaultExport","StyleInfo","ast","placeholder","ownStylePropertyNames","overrideStyleProperties","customStyle","scopeSelector","styleProperties","infoKey","styleInfo","_getStyleRules","method","rootSelector","StyleProperties","decorateStyles","props","keyframes","ruleIndex","decorateRule","onKeyframesRule","_keyframes","propertyInfo","properties","collectProperties","hasProperties","rx","any","valueForProperty","valueForProperties","propertyValue","colon","pp","propertyDataFromStyles","selectorToMatch","parseInt","whenHostOrRootRule","parsedSelector","isHost","isRoot","hostAndRootPropertiesForScope","hostProps","rootProps","_element","transformStyles","hostSelector","hostRx","RegExp","HOST_PREFIX","rxHostSelector","HOST_SUFFIX","StyleInfo$$module$node_modules$$webcomponents$shadycss$src$style_info.get","keyframeTransforms","_elementKeyframeTransforms","hasAnimations","keyframeNamesToTransform","keyframe","transform","keyframesRules","keyframesNameRx","transformedKeyframesName","scopeId","_keyframesRuleTransformer","applyCustomStyle","XSCOPE_NAME","placeholderMap","ce","origDefine","wrappedDefine","clazz","StyleCache","cache","store","tagname","styleElement","typeMax","scopeRegExp","getCurrentScope","getOwnerScope","handler","mxns","mxn","unscopedNodes","unscopedNode","scopeForPreviouslyUnscopedNode","delayedStart","requestAnimationFrame","templateMap","invalidate","elementName","CURRENT_VERSION","VALIDATING_VERSION","NEXT_VERSION","templateIsValid","startValidatingTemplate","_validating","adoptedCssTextMap","styleCache","ScopingShim","_scopeCounter","_documentOwner","_documentOwnerStyleInfo","StyleInfo$$module$node_modules$$webcomponents$shadycss$src$style_info.set","_elementsHaveApplied","_customStyleInterface","_applyShim","watcherFlush","getStyleAst","styleAstToString","prepareTemplate","prepareTemplateDom","prepareTemplateStyles","_prepared","optimalBuild","styleTextParts","styles","scopingAttribute","newStyle","_ensure","hasMixins","ownPropertyNames","shadowroot","_style","_ownPropertyNames","prepareAdoptedCssText","cssTextArray","_domPrepared","_prepareHost","_ensureCustomStyleInterface","CustomStyleInterface","transformCustomStyleForDocument","flushCustomStyles","_ensureApplyShim","ApplyShim","needsApplyShimUpdate","customStyles","_revalidateCustomStyleApplyShim","_reorderCustomStylesRules","_updateProperties","_applyCustomStyles","styleDocument","DOCUMENT_POSITION_FOLLOWING","overrideProps","styleElementNativeVariables","_isRootOwner","styleElementShimVariables","cacheEntry","entry","pn","cachedStyle","oldScopeSelector","cachedScopeSelector","applyElementStyle","removeProperty","setProperty","_styleOwnerForNode","owner","ownerStyleInfo","ownerProperties","hostAndRootProps","propertiesMatchingHost","propertyData","overrides","reify","styleSubtree","wrappedHost","isRootOwner","descendantRoot","descendantHosts","documentRule","_transformRule","getComputedStyleValue","getComputedStyle","getPropertyValue","setElementClass","classString","classes","definitelyString","scopeName","classAttr","k$","_styleInfoForNode","scopeNode","unscopeNode","scopeForNode","elementExtends","IDNAToASCII","h","_isInvalid","percentEscape","unicode","charCodeAt","encodeURIComponent","percentEscapeQuery","stateOverride","errors","state","buffer","seenAt","seenBracket","ALPHA","ALPHANUMERIC","_scheme","relative","_isRelative","_query","_fragment","_schemeData","_host","_port","_path","_username","_password","nextC","nextNextC","cp","tempC","tmp","relativePathDotMapping","jURL","url","_url","hasWorkingUrl","u","URL","pathname","authority","protocol","hostname","hash","origin","OriginalURL","blob","createObjectURL","revokeObjectURL"],"mappings":"A;;;;;;;;;;;;;;;;;;;aAaA,IAAA,CCc4B,SAAA,GAAQ,CAAC,CAAD,CAAQ,CAC1C,IAAI,EAAQ,CACZ,OAAO,SAAQ,EAAG,CAChB,MAAI,EAAJ,CAAY,CAAZ,CAAkB,MAAlB,CACS,CACL,KAAM,CAAA,CADD,CAEL,MAAO,CAAA,CAAM,CAAA,EAAN,CAFF,CADT,CAMS,CAAC,KAAM,CAAA,CAAP,CAPO,CAFwB,CCQ5C,IAAAA,GAC4D,UAAxD,EAAsB,MAAO,OAAP,CAAc,gBAApC,CACA,MADA,CACO,cADP,CAEA,QAAQ,CAAC,CAAD,CAAS,CAAT,CAAmB,CAAnB,CAA+B,CACrC,GAAI,CAAJ,EAAc,KAAd,CAAoB,SAApB,EAEsB,CAFtB,EAEiC,MAFjC,CAEwC,SAFxC,CAGE,MAAO,EAUT,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GXuB,QAAI,CAACA,CAAD,CAAO,CACT,IAAJ,CAASzC,CAAT,GAGKyC,CAAL,EAIA,IAIA,CAJKvB,CAIL,CAJiB,GAIjB,CAHI,GAGJ,EAHWuB,CAAA,CAAK,CAAL,CAGX,GAFEA,CAEF,CAFSA,CAAA,CAAKvhD,KAAL,CAAW,CAAX,CAET,EAAAgpC,CAAA,CAAM/oC,IAAN,CAAW,IAAX,CAAiBshD,CAAjB,CAAuB,UAAvB,CARA,EACE,IADF,CACOvB,CADP,CACmB,EAJnB,CADa,CA9GA,CA6HXwB,UAAS,EAAA,CACX,IAAI17B,CACJ,IAAI,IAAJ,CAASg5B,CAAT,EAAuB,CAAC,IAAD,CAAMc,CAA7B,CACE,MAAO,EAOT,QAAQ,IAAR,CAAaA,CAAb,EACE,KAAK,MAAL,CACA,KAAK,MAAL,CACA,KAAK,YAAL,CACA,KAAK,QAAL,CACE,MAAO,MALX,CAQA,MAAA,CADA95B,CACA,CADO,IACP,CADYA,IACZ,EAGO,IAHP,CAGY85B,CAHZ,CAGsB,KAHtB,CAG8B95B,CAH9B,CACS,EAnBE,CA7HE,CAuJjB,KAAI27B,EAAc5T,CAAd4T,CAAoBP,GACpBO,EAAJ,GAEEZ,CAKA,CALK,eAKL,CAL0B,QAAS,CAACa,CAAD,CAAO,CAGxC,MAAOD,EAAA,CAAYE,eAAZ,CAA4BtgD,KAA5B,CAAkCogD,CAAlC;AAA+ClhD,SAA/C,CAHiC,CAK1C,CAAAsgD,CAAA,CAAK,eAAL,CAA0B,QAAS,CAACC,CAAD,CAAM,CACvCW,CAAA,CAAYG,eAAZ,CAA4Bd,CAA5B,CADuC,CAP3C,CAYAjT,EAAA,CAAMqT,GAAN,CAAYL,CAtrBZ,CAbgB,CAAjB,CAAD,CAosBGv8C,MApsBH,C","file":"webcomponents-sd-ce-pf.js","sourcesContent":["/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\nif (!Array.from) {\n Array.from = <T>(object: ArrayLike<T>): Array<T> => {\n return [].slice.call(object);\n };\n}\n\nif (!Object.assign) {\n const assign = (target: object, source: object) => {\n const n$ = Object.keys(source);\n for (let i = 0; i < n$.length; i++) {\n const p = n$[i];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (target as any)[p] = (source as any)[p];\n }\n };\n\n Object.assign = function (target: object) {\n // eslint-disable-next-line prefer-rest-params\n const args: object[] = [].slice.call(arguments, 1);\n for (let i = 0, s; i < args.length; i++) {\n s = args[i];\n if (s) {\n assign(target, s);\n }\n }\n return target;\n };\n}\n",null,null,null,null,null,null,null,null,null,null,"/**\n@license\nCopyright (c) 2018 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\n// import polyfill for Symbol and Object.getOwnPropertySymbols\nimport 'get-own-property-symbols/build/get-own-property-symbols.max';\n\n// Fix issue in toString patch when compiled into strict mode via closure\n// https://github.com/es-shims/get-own-property-symbols/issues/16\nconst toString = Object.prototype.toString;\nObject.prototype.toString = function () {\n if (this === undefined) {\n return '[object Undefined]';\n } else if (this === null) {\n return '[object Null]';\n } else {\n return toString.call(this);\n }\n};\n\n// overwrite Object.keys to filter out symbols\nObject.keys = function (obj: object) {\n return Object.getOwnPropertyNames(obj).filter((name) => {\n const prop = Object.getOwnPropertyDescriptor(obj, name);\n return prop && prop.enumerable;\n });\n};\n\n// implement iterators for IE 11\nif (!String.prototype[Symbol.iterator] || !String.prototype.codePointAt) {\n String.prototype[Symbol.iterator] = function* (this: string) {\n for (let i = 0; i < this.length; i++) {\n yield this[i];\n }\n };\n}\n\nif (!Set.prototype[Symbol.iterator]) {\n Set.prototype[Symbol.iterator] = function* <T>(this: Set<T>) {\n const temp: T[] = [];\n this.forEach((value) => {\n temp.push(value);\n });\n for (let i = 0; i < temp.length; i++) {\n yield temp[i];\n }\n };\n}\n\nif (!Map.prototype[Symbol.iterator]) {\n Map.prototype[Symbol.iterator] = function* <K, V>(this: Map<K, V>) {\n const entries: Array<[K, V]> = [];\n this.forEach((value, key) => {\n entries.push([key, value]);\n });\n for (let i = 0; i < entries.length; i++) {\n yield entries[i];\n }\n };\n}\n","import promiseFinally from './finally';\nimport allSettled from './allSettled';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction isArray(x) {\n return Boolean(x && typeof x.length !== 'undefined');\n}\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments);\n };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n /** @type {!number} */\n this._state = 0;\n /** @type {!boolean} */\n this._handled = false;\n /** @type {Promise|undefined} */\n this._value = undefined;\n /** @type {!Array<!Function>} */\n this._deferreds = [];\n\n doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\n\nfunction resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\n\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\n\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n // @ts-ignore\n var prom = new this.constructor(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.all accepts an array'));\n }\n\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n reject\n );\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.allSettled = allSettled;\n\nPromise.resolve = function(value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function(resolve) {\n resolve(value);\n });\n};\n\nPromise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.race accepts an array'));\n }\n\n for (var i = 0, len = arr.length; i < len; i++) {\n Promise.resolve(arr[i]).then(resolve, reject);\n }\n });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n // @ts-ignore\n (typeof setImmediate === 'function' &&\n function(fn) {\n // @ts-ignore\n setImmediate(fn);\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0);\n };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n};\n\nexport default Promise;\n","/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n // @ts-ignore\n return constructor.reject(reason);\n });\n }\n );\n}\n\nexport default finallyConstructor;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nimport PromisePolyfill from 'promise-polyfill/src/index.js';\n\n/*\nAssign the ES6 promise polyfill to window ourselves instead of using the \"auto\"\npolyfill to work around\nhttps://github.com/webcomponents/webcomponentsjs/issues/837\n*/\nif (!window.Promise) {\n window.Promise = PromisePolyfill;\n // save Promise API\n /* eslint-disable no-self-assign */\n // PromisePolyfill.prototype['catch'] = PromisePolyfill.prototype.catch;\n PromisePolyfill.prototype['then'] = PromisePolyfill.prototype.then;\n // PromisePolyfill.prototype['finally'] = PromisePolyfill.prototype.finally;\n PromisePolyfill['all'] = PromisePolyfill.all;\n PromisePolyfill['race'] = PromisePolyfill.race;\n PromisePolyfill['resolve'] = PromisePolyfill.resolve;\n PromisePolyfill['reject'] = PromisePolyfill.reject;\n /* eslint-enable */\n\n // approach copied from\n // https://github.com/Polymer/polymer/blob/v3.0.2/lib/utils/async.js\n const node = document.createTextNode('');\n const twiddleNode = function twiddleNode() {\n node.textContent = node.textContent!.length > 0 ? '' : 'a';\n };\n /** @type {!Array<function():void>} */\n const callbacks: Array<() => void> = [];\n new MutationObserver(() => {\n const len = callbacks.length;\n for (let i = 0; i < len; i++) {\n callbacks[i]();\n }\n callbacks.splice(0, len);\n }).observe(node, {characterData: true});\n\n // set _immediateFn to a MutationObserver for close-to-native timing\n PromisePolyfill._immediateFn = (fn: () => void) => {\n callbacks.push(fn);\n twiddleNode();\n };\n}\n","/*!\nCopyright (C) 2015 by WebReflection\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n(function (Object, GOPS) {\n 'use strict';\n\n // (C) Andrea Giammarchi - Mit Style\n\n if (GOPS in Object) { return; }\n\n var\n setDescriptor,\n G = typeof global === typeof G ? window : global,\n id = 0,\n random = String(Math.random()),\n prefix = '__\\x01symbol:',\n prefixLength = prefix.length,\n internalSymbol = '__\\x01symbol@@' + random,\n DP = 'defineProperty',\n DPies = 'defineProperties',\n GOPN = 'getOwnPropertyNames',\n GOPD = 'getOwnPropertyDescriptor',\n PIE = 'propertyIsEnumerable',\n gOPN = Object[GOPN],\n gOPD = Object[GOPD],\n create = Object.create,\n keys = Object.keys,\n freeze = Object.freeze || Object,\n defineProperty = Object[DP],\n $defineProperties = Object[DPies],\n descriptor = gOPD(Object, GOPN),\n ObjectProto = Object.prototype,\n hOP = ObjectProto.hasOwnProperty,\n pIE = ObjectProto[PIE],\n toString = ObjectProto.toString,\n addInternalIfNeeded = function (o, uid, enumerable) {\n if (!hOP.call(o, internalSymbol)) {\n defineProperty(o, internalSymbol, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: {}\n });\n }\n o[internalSymbol]['@@' + uid] = enumerable; // eslint-disable-line no-param-reassign\n },\n createWithSymbols = function (proto, descriptors) {\n var self = create(proto);\n gOPN(descriptors).forEach(function (key) {\n if (propertyIsEnumerable.call(descriptors, key)) {\n $defineProperty(self, key, descriptors[key]);\n }\n });\n return self;\n },\n copyAsNonEnumerable = function (descriptor) {\n var newDescriptor = create(descriptor);\n newDescriptor.enumerable = false;\n return newDescriptor;\n },\n get = function get() {},\n onlyNonSymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && !hOP.call(source, name);\n },\n onlySymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && hOP.call(source, name);\n },\n propertyIsEnumerable = function propertyIsEnumerable(key) {\n var uid = String(key);\n return onlySymbols(uid) ? hOP.call(this, uid) && !!this[internalSymbol] && this[internalSymbol]['@@' + uid] : pIE.call(this, key);\n },\n setAndGetSymbol = function (uid) {\n var descriptor = {\n enumerable: false,\n configurable: true,\n get: get,\n set: function (value) {\n setDescriptor(this, uid, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n addInternalIfNeeded(this, uid, true);\n }\n };\n defineProperty(ObjectProto, uid, descriptor);\n source[uid] = defineProperty(\n Object(uid),\n 'constructor',\n sourceConstructor\n );\n return freeze(source[uid]);\n },\n Symbol = function Symbol(description) {\n if (this instanceof Symbol) {\n throw new TypeError('Symbol is not a constructor');\n }\n return setAndGetSymbol(prefix.concat(description || '', random, ++id));\n },\n source = create(null),\n sourceConstructor = { value: Symbol },\n sourceMap = function (uid) {\n return source[uid];\n },\n $defineProperty = function defineProp(o, key, descriptor) {\n var uid = String(key);\n if (onlySymbols(uid)) {\n setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor);\n addInternalIfNeeded(o, uid, !!descriptor.enumerable);\n } else {\n defineProperty(o, key, descriptor);\n }\n return o;\n },\n $getOwnPropertySymbols = function getOwnPropertySymbols(o) {\n return gOPN(o).filter(onlySymbols).map(sourceMap);\n };\n descriptor.value = $defineProperty;\n defineProperty(Object, DP, descriptor);\n\n descriptor.value = $getOwnPropertySymbols;\n defineProperty(Object, GOPS, descriptor);\n\n descriptor.value = function getOwnPropertyNames(o) {\n return gOPN(o).filter(onlyNonSymbols);\n };\n defineProperty(Object, GOPN, descriptor);\n\n descriptor.value = function defineProperties(o, descriptors) {\n var symbols = $getOwnPropertySymbols(descriptors);\n if (symbols.length) {\n keys(descriptors).concat(symbols).forEach(function (uid) {\n if (propertyIsEnumerable.call(descriptors, uid)) {\n $defineProperty(o, uid, descriptors[uid]);\n }\n });\n } else {\n $defineProperties(o, descriptors);\n }\n return o;\n };\n defineProperty(Object, DPies, descriptor);\n\n descriptor.value = propertyIsEnumerable;\n defineProperty(ObjectProto, PIE, descriptor);\n\n descriptor.value = Symbol;\n defineProperty(G, 'Symbol', descriptor);\n\n // defining `Symbol.for(key)`\n descriptor.value = function (key) {\n var uid = prefix.concat(prefix, key, random);\n return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid);\n };\n defineProperty(Symbol, 'for', descriptor);\n\n // defining `Symbol.keyFor(symbol)`\n descriptor.value = function (symbol) {\n if (onlyNonSymbols(symbol)) { throw new TypeError(symbol + ' is not a symbol'); }\n if (!hOP.call(source, symbol)) {\n return void 0;\n }\n var label = symbol.slice(prefixLength);\n if (label.slice(0, prefixLength) !== prefix) {\n return void 0;\n }\n label = label.slice(prefixLength);\n if (label === random) {\n return void 0;\n }\n label = label.slice(0, label.length - random.length);\n return label.length > 0 ? label : void 0;\n };\n defineProperty(Symbol, 'keyFor', descriptor);\n\n descriptor.value = function getOwnPropertyDescriptor(o, key) {\n var descriptor = gOPD(o, key);\n if (descriptor && onlySymbols(key)) {\n descriptor.enumerable = propertyIsEnumerable.call(o, key);\n }\n return descriptor;\n };\n defineProperty(Object, GOPD, descriptor);\n\n descriptor.value = function (proto, descriptors) {\n return arguments.length === 1 || typeof descriptors === 'undefined' ? create(proto) : createWithSymbols(proto, descriptors);\n };\n defineProperty(Object, 'create', descriptor);\n\n descriptor.value = function () {\n var str = toString.call(this);\n return str === '[object String]' && onlySymbols(this) ? '[object Symbol]' : str;\n };\n defineProperty(ObjectProto, 'toString', descriptor);\n\n try { // fails in few pre ES 5.1 engines\n if (\n create(defineProperty({}, prefix, {\n get: function () {\n return defineProperty(this, prefix, { value: true })[prefix];\n }\n }))[prefix] === true\n ) {\n setDescriptor = defineProperty;\n } else {\n throw 'IE11'; // eslint-disable-line no-throw-literal\n }\n } catch (o_O) { // eslint-disable-line camelcase\n setDescriptor = function (o, key, descriptor) {\n var protoDescriptor = gOPD(ObjectProto, key);\n delete ObjectProto[key];\n defineProperty(o, key, descriptor);\n defineProperty(ObjectProto, key, protoDescriptor);\n };\n }\n\n}(Object, 'getOwnPropertySymbols'));\n\n(function (O, Symbol) {\n 'use strict';\n\n var\n dP = O.defineProperty,\n ObjectProto = O.prototype,\n toString = ObjectProto.toString,\n toStringTag = 'toStringTag',\n descriptor;\n [\n 'iterator', // A method returning the default iterator for an object. Used by for...of.\n 'match', // A method that matches against a string, also used to determine if an object may be used as a regular expression. Used by String.prototype.match().\n 'replace', // A method that replaces matched substrings of a string. Used by String.prototype.replace().\n 'search', // A method that returns the index within a string that matches the regular expression. Used by String.prototype.search().\n 'split', // A method that splits a string at the indices that match a regular expression. Used by String.prototype.split().\n 'hasInstance', // A method determining if a constructor object recognizes an object as its instance. Used by instanceof.\n 'isConcatSpreadable', // A Boolean value indicating if an object should be flattened to its array elements. Used by Array.prototype.concat().\n 'unscopables', // An Array of string values that are property values. These are excluded from the with environment bindings of the associated objects.\n 'species', // A constructor function that is used to create derived objects.\n 'toPrimitive', // A method converting an object to a primitive value.\n toStringTag // A string value used for the default description of an object. Used by Object.prototype.toString().\n ].forEach(function (name) {\n if (!(name in Symbol)) {\n dP(Symbol, name, { value: Symbol(name) });\n if (name === toStringTag) {\n descriptor = O.getOwnPropertyDescriptor(ObjectProto, 'toString');\n descriptor.value = function () {\n var str = toString.call(this);\n var tst = this == null ? this : this[Symbol.toStringTag];\n return tst == null ? str : '[object ' + tst + ']';\n };\n dP(ObjectProto, 'toString', descriptor);\n }\n }\n });\n}(Object, Symbol));\n\n(function (Si, AP, SP) {\n\n function returnThis() { return this; }\n\n /*\n * make Arrays usable as iterators\n * so that other iterables can copy same logic\n */\n if (!AP[Si]) {\n // eslint-disable-next-line no-param-reassign\n AP[Si] = function () {\n var\n i = 0,\n self = this,\n iterator = {\n next: function next() {\n var done = self.length <= i;\n return done ? { done: done } : { done: done, value: self[i++] };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n /*\n * make Strings usable as iterators\n * to simplify Array.from and for/of like loops\n */\n if (!SP[Si]) {\n // eslint-disable-next-line no-param-reassign\n SP[Si] = function () {\n var\n fromCodePoint = String.fromCodePoint,\n self = this,\n i = 0,\n length = self.length,\n iterator = {\n next: function next() {\n var\n done = length <= i,\n c = done ? '' : fromCodePoint(self.codePointAt(i));\n i += c.length;\n return done ? { done: done } : { done: done, value: c };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n}(Symbol.iterator, Array.prototype, String.prototype));\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\n// defaultPrevented is broken in IE.\n// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called\nconst workingDefaultPrevented = (() => {\n const e = document.createEvent('Event');\n e.initEvent('foo', true, true);\n e.preventDefault();\n return e.defaultPrevented;\n})();\n\nif (!workingDefaultPrevented) {\n const origPreventDefault = Event.prototype.preventDefault;\n Event.prototype.preventDefault = function (this: Event) {\n if (!this.cancelable) {\n return;\n }\n\n origPreventDefault.call(this);\n\n Object.defineProperty(this, 'defaultPrevented', {\n get() {\n return true;\n },\n configurable: true,\n });\n };\n}\n\nconst isIE = /Trident/.test(navigator.userAgent);\n\n// Event constructor shim\nif (!window.Event || (isIE && typeof window.Event !== 'function')) {\n const origEvent = window.Event as typeof Event;\n window['Event'] = (((inType: string, params?: EventInit) => {\n params = params || {};\n const e = document.createEvent('Event');\n e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));\n return e;\n }) as unknown) as typeof Event;\n if (origEvent) {\n for (const i in origEvent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window['Event'] as any)[i] = (origEvent as any)[i];\n }\n window['Event'].prototype = origEvent.prototype;\n }\n}\n\n// CustomEvent constructor shim\nif (!window.CustomEvent || (isIE && typeof window.CustomEvent !== 'function')) {\n window['CustomEvent'] = ((<T>(\n inType: string,\n params?: CustomEventInit<T>\n ) => {\n params = params || {};\n const e: CustomEvent<T> = document.createEvent('CustomEvent');\n e.initCustomEvent(\n inType,\n Boolean(params.bubbles),\n Boolean(params.cancelable),\n params.detail!\n );\n return e;\n }) as unknown) as typeof CustomEvent;\n window['CustomEvent'].prototype = window.Event.prototype as CustomEvent;\n}\n\nif (!window.MouseEvent || (isIE && typeof window.MouseEvent !== 'function')) {\n const origMouseEvent = window.MouseEvent as typeof MouseEvent;\n window['MouseEvent'] = (((inType: string, params?: MouseEventInit) => {\n params = params || {};\n const e = document.createEvent('MouseEvent');\n e.initMouseEvent(\n inType,\n Boolean(params.bubbles),\n Boolean(params.cancelable),\n params.view || window,\n params.detail!,\n params.screenX!,\n params.screenY!,\n params.clientX!,\n params.clientY!,\n params.ctrlKey!,\n params.altKey!,\n params.shiftKey!,\n params.metaKey!,\n params.button!,\n params.relatedTarget!\n );\n return e;\n }) as unknown) as typeof MouseEvent;\n if (origMouseEvent) {\n for (const j in origMouseEvent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window.MouseEvent as any)[j] = (origMouseEvent as any)[j];\n }\n }\n window['MouseEvent'].prototype = origMouseEvent.prototype;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\n// Older browsers like IE do not support an object as the options parameter\n// to add/removeEventListener.\n// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called\nconst supportsEventOptions = (() => {\n let supported = false;\n let onceSupported = false;\n const eventOptions = {\n get capture() {\n supported = true;\n return true;\n },\n\n get once() {\n onceSupported = true;\n return true;\n },\n };\n let callCount = 0;\n const listener = () => {\n callCount++;\n };\n const d = document.createElement('div');\n // NOTE: These will be unpatched at this point.\n d.addEventListener('click', listener, eventOptions);\n let fullySupported = supported && onceSupported;\n // Once + capture broken on Edge >= 17 < 79.\n if (fullySupported) {\n d.dispatchEvent(new Event('click'));\n d.dispatchEvent(new Event('click'));\n fullySupported = callCount == 1;\n }\n d.removeEventListener('click', listener, eventOptions);\n return fullySupported;\n})();\n\nconst nativeEventTarget = window.EventTarget ?? window.Node;\n\nif (\n !supportsEventOptions &&\n 'addEventListener' in nativeEventTarget.prototype\n) {\n const parseEventOptions = (\n optionsOrCapture?: boolean | AddEventListenerOptions\n ) => {\n let capture, once;\n if (\n optionsOrCapture &&\n (typeof optionsOrCapture === 'object' ||\n typeof optionsOrCapture === 'function')\n ) {\n capture = Boolean((optionsOrCapture as AddEventListenerOptions).capture);\n once = Boolean((optionsOrCapture as AddEventListenerOptions).once);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n }\n return {\n capture,\n once,\n };\n };\n\n const origAddEventListener = nativeEventTarget.prototype.addEventListener;\n const origRemoveEventListener =\n nativeEventTarget.prototype.removeEventListener;\n\n type ListenerMap = WeakMap<\n EventListenerOrEventListenerObject,\n EventListenerOrEventListenerObject | null\n >;\n type TypeMap = Map<string, ListenerMap>;\n type ElementListenerMap = WeakMap<EventTarget, TypeMap>;\n\n const captureListenerMap: ElementListenerMap = new WeakMap();\n const listenerMap: ElementListenerMap = new WeakMap();\n\n const getListenerMap = (\n target: EventTarget,\n type: string,\n capture: boolean\n ) => {\n const elMap = capture ? captureListenerMap : listenerMap;\n let typeMap = elMap.get(target);\n if (typeMap === undefined) {\n elMap.set(target, (typeMap = new Map()));\n }\n let listeners = typeMap.get(type);\n if (listeners === undefined) {\n typeMap.set(type, (listeners = new WeakMap()));\n }\n return listeners;\n };\n\n nativeEventTarget.prototype.addEventListener = function (\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions | undefined\n ) {\n if (listener == null) {\n return;\n }\n const {capture, once} = parseEventOptions(options);\n const map = getListenerMap(this, type, capture);\n if (!map.has(listener)) {\n const cachedListener = once\n ? (e: Event) => {\n map.delete(listener);\n origRemoveEventListener.call(this, type, cachedListener, capture);\n if (typeof listener === 'function') {\n return listener.call(this, e);\n }\n\n if (typeof listener?.handleEvent === 'function') {\n return listener.handleEvent(e);\n }\n }\n : null;\n map.set(listener, cachedListener);\n // Note, the cached listener is null if no wrapper is used to avoid\n // a strong ref to it;\n origAddEventListener.call(\n this,\n type,\n cachedListener ?? listener,\n capture\n );\n }\n };\n\n nativeEventTarget.prototype.removeEventListener = function (\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions | undefined\n ) {\n if (listener == null) {\n return;\n }\n const {capture} = parseEventOptions(options);\n const map = getListenerMap(this, type, capture);\n const cachedListener = map.get(listener);\n if (cachedListener !== undefined) {\n map.delete(listener);\n // Note, the cached listener is null if no wrapper was used so that a\n // strong ref to it is not kept.\n origRemoveEventListener.call(\n this,\n type,\n cachedListener ?? listener,\n capture\n );\n }\n };\n}\n","/**\n@license\nCopyright (c) 2018 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// Implement Node.baseURI for IE 11\n// adapted from\n// https://github.com/webcomponents/html-imports/blob/v1.2.0/src/html-imports.js\n\nconst native_baseURI = Object.getOwnPropertyDescriptor(\n Node.prototype,\n 'baseURI'\n);\nif (!native_baseURI) {\n Object.defineProperty(Node.prototype, 'baseURI', {\n get(this: Node): string {\n // this.ownerDocument is `null` for documents\n const doc = this.ownerDocument || (this as Document);\n const base = doc.querySelector('base[href]') as HTMLBaseElement;\n return (base && base.href) || window.location.href;\n },\n configurable: true,\n enumerable: true,\n });\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\n// In IE11, the `attributes` descriptor is on `Node.prototype`.\nconst attributesDescriptor =\n Object.getOwnPropertyDescriptor(Element_prototype, 'attributes') ??\n Object.getOwnPropertyDescriptor(Node.prototype, 'attributes');\n// In Safari 9, the `attributes` descriptor's getter is undefined. In Chrome 41,\n// the `attributes` descriptor is a data descriptor on each Element instance.\nconst getAttributes =\n attributesDescriptor?.get ??\n function (this: Element) {\n return this.attributes;\n };\nconst map = Array.prototype.map;\n\nif (!Element_prototype.hasOwnProperty('getAttributeNames')) {\n Element_prototype.getAttributeNames = function getAttributeNames(\n this: Element\n ): Array<string> {\n return map.call(\n getAttributes.call(this),\n (attr) => attr.name\n ) as Array<string>;\n };\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\n\nif (!Element_prototype.hasOwnProperty('matches')) {\n Element_prototype.matches =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Element_prototype as any).webkitMatchesSelector as Element['matches']) ??\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Element_prototype as any).msMatchesSelector as Element['matches']);\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeAppendChild = Node.prototype.appendChild;\n\nconst installAppend = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('append')) {\n return;\n }\n\n Object.defineProperty(prototype, 'append', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function append(...args: Array<Node | string>) {\n for (const arg of args) {\n nativeAppendChild.call(\n this,\n typeof arg === 'string' ? document.createTextNode(arg) : arg\n );\n }\n },\n });\n};\n\ninstallAppend(Document);\ninstallAppend(DocumentFragment);\ninstallAppend(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetFirstChild =\n // In Chrome 41, `firstChild` is a data descriptor on every instance, not a\n // accessor descriptor on `Node.prototype`.\n Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')?.get ??\n // In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.firstChild;\n };\n\nconst installPrepend = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('prepend')) {\n return;\n }\n\n Object.defineProperty(prototype, 'prepend', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function prepend(...args: Array<Node | string>) {\n const firstChild = nativeGetFirstChild.call(this);\n for (const arg of args) {\n const newNode =\n typeof arg === 'string' ? document.createTextNode(arg) : arg;\n nativeInsertBefore.call(this, newNode, firstChild);\n }\n },\n });\n};\n\ninstallPrepend(Document);\ninstallPrepend(DocumentFragment);\ninstallPrepend(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeAppendChild = Node.prototype.appendChild;\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetFirstChild =\n // In Chrome 41, `firstChild` is a data descriptor on every instance, not a\n // accessor descriptor on `Node.prototype`.\n Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')?.get ??\n // In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.firstChild;\n };\n\nconst installReplaceChildren = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('replaceChildren')) {\n return;\n }\n\n Object.defineProperty(prototype, 'replaceChildren', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function replaceChildren(...args: Array<Node | string>) {\n let child;\n while ((child = nativeGetFirstChild.call(this)) !== null) {\n nativeRemoveChild.call(this, child);\n }\n\n for (const arg of args) {\n nativeAppendChild.call(\n this,\n typeof arg === 'string' ? document.createTextNode(arg) : arg\n );\n }\n },\n });\n};\n\ninstallReplaceChildren(Document);\ninstallReplaceChildren(DocumentFragment);\ninstallReplaceChildren(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\nconst nativeGetNextSibling =\n Object.getOwnPropertyDescriptor(Node.prototype, 'nextSibling')?.get ??\n // In Safari 9, the `nextSibling` descriptor's `get` and `set` are\n // undefined.\n function (this: Node) {\n return this.nextSibling;\n };\n\nconst installAfter = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('after')) {\n return;\n }\n\n Object.defineProperty(prototype, 'after', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function after(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n const nextSibling = nativeGetNextSibling.call(this);\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n nextSibling\n );\n }\n },\n });\n};\n\ninstallAfter(CharacterData);\ninstallAfter(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installBefore = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('before')) {\n return;\n }\n\n Object.defineProperty(prototype, 'before', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function before(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n this\n );\n }\n },\n });\n};\n\ninstallBefore(CharacterData);\ninstallBefore(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installRemove = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('remove')) {\n return;\n }\n\n Object.defineProperty(prototype, 'remove', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function remove() {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode) {\n nativeRemoveChild.call(parentNode, this);\n }\n },\n });\n};\n\ninstallRemove(CharacterData);\ninstallRemove(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installReplaceWith = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('replaceWith')) {\n return;\n }\n\n Object.defineProperty(prototype, 'replaceWith', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function replaceWith(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n this\n );\n }\n\n nativeRemoveChild.call(parentNode, this);\n },\n });\n};\n\ninstallReplaceWith(CharacterData);\ninstallReplaceWith(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = window.Element.prototype;\nconst HTMLElement_prototype = window.HTMLElement.prototype;\nconst SVGElement_prototype = window['SVGElement'].prototype;\n\n// Thanks to @justinfagnani for finding this:\n//\n// In IE11, `classList` is only supported on `HTMLElement` instances: the\n// descriptor is an own property of `HTMLElement.prototype` and is an accessor\n// descriptor with `set` as `undefined` and no `get`. However, it seems to be\n// implemented generically enough such that copying it to something in the\n// prototype chain of `SVGElement` correctly adds support for `classList` (as\n// far as `DOMTokenList` implemented in IE11).\nif (\n HTMLElement_prototype.hasOwnProperty('classList') &&\n !Element_prototype.hasOwnProperty('classList') &&\n !SVGElement_prototype.hasOwnProperty('classList')\n) {\n Object.defineProperty(\n Element_prototype,\n 'classList',\n Object.getOwnPropertyDescriptor(HTMLElement_prototype, 'classList')!\n );\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\nconst nativeHasAttribute = Element.prototype.hasAttribute;\nconst nativeSetAttribute = Element.prototype.setAttribute;\nconst nativeRemoveAttribute = Element.prototype.removeAttribute;\n\nif (!Element_prototype.hasOwnProperty('toggleAttribute')) {\n Element_prototype.toggleAttribute = function toggleAttribute(\n this: Element,\n name: string,\n force?: boolean\n ): boolean {\n if (force === undefined) {\n if (nativeHasAttribute.call(this, name)) {\n nativeRemoveAttribute.call(this, name);\n return false;\n } else {\n nativeSetAttribute.call(this, name, '');\n return true;\n }\n }\n if (force) {\n if (!nativeHasAttribute.call(this, name)) {\n nativeSetAttribute.call(this, name, '');\n }\n return true;\n }\n // force is falsey\n nativeRemoveAttribute.call(this, name);\n return false;\n };\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\n// It's desireable to provide a default stylesheet\n// that's convenient for styling unresolved elements, but\n// it's cumbersome to have to include this manually in every page.\n// It would make sense to put inside some HTMLImport but\n// the HTMLImports polyfill does not allow loading of stylesheets\n// that block rendering. Therefore this injection is tolerated here.\n//\n// NOTE: position: relative fixes IE's failure to inherit opacity\n// when a child is not statically positioned.\nconst style = document.createElement('style');\nstyle.textContent =\n '' +\n 'body {' +\n 'transition: opacity ease-in 0.2s;' +\n ' } \\n' +\n 'body[unresolved] {' +\n 'opacity: 0; display: block; overflow: hidden; position: relative;' +\n ' } \\n';\nconst head = document.querySelector('head')!;\nhead.insertBefore(style, head.firstChild);\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\ninterface ExtendedWindow extends Window {\n WebComponents?: {flags?: Flags};\n ShadyDOM?: {force?: boolean | string; noPatch?: boolean | string};\n customElements: CustomElementRegistry & {\n forcePolyfill?: string | boolean;\n };\n}\n\ntype Flags = Record<string, string | boolean | Record<string, boolean>>;\n\n// Establish scope.\nconst extendedWindow = (window as unknown) as ExtendedWindow;\nextendedWindow['WebComponents'] = extendedWindow['WebComponents'] || {\n 'flags': {},\n};\n\n// loading script\nconst file = 'webcomponents-bundle';\nconst script = document.querySelector('script[src*=\"' + file + '\"]');\nconst flagMatcher = /wc-(.+)/;\n\n// Note(rictic): a lot of this code looks wrong. Should we be pulling\n// the flags local variable off of window.WebComponents.flags? If not\n// then why check for noOpts, which can't possibly have been set?\n\n// Flags. Convert url arguments to flags\nconst flags: Flags = {};\nif (!flags['noOpts']) {\n // from url\n location.search\n .slice(1)\n .split('&')\n .forEach(function (option) {\n const parts = option.split('=');\n let match;\n if (parts[0] && (match = parts[0].match(flagMatcher))) {\n flags[match[1]] = parts[1] || true;\n }\n });\n // from script\n if (script) {\n for (let i = 0, a; (a = script.attributes[i]); i++) {\n if (a.name !== 'src') {\n flags[a.name] = a.value || true;\n }\n }\n }\n // log flags\n const log: Record<string, boolean> = {};\n if (flags['log'] && (flags['log'] as string)['split']) {\n const parts = (flags['log'] as string).split(',');\n parts.forEach(function (f) {\n log[f] = true;\n });\n }\n flags['log'] = log;\n}\n\n// exports\nextendedWindow['WebComponents']['flags'] = flags;\nconst forceShady = flags['shadydom'] as boolean | string;\nif (forceShady) {\n extendedWindow['ShadyDOM'] = extendedWindow['ShadyDOM'] || {};\n extendedWindow['ShadyDOM']['force'] = forceShady;\n const noPatch = flags['noPatch'] as boolean | string;\n extendedWindow['ShadyDOM']['noPatch'] = noPatch === 'true' ? true : noPatch;\n}\n\nconst forceCE = (flags['register'] || flags['ce']) as boolean | string;\nif (forceCE && window['customElements']) {\n extendedWindow['customElements']['forcePolyfill'] = forceCE;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n// minimal template polyfill\n(function () {\n 'use strict';\n\n var needsTemplate = typeof HTMLTemplateElement === 'undefined';\n var brokenDocFragment = !(\n document.createDocumentFragment().cloneNode() instanceof DocumentFragment\n );\n var needsDocFrag = false;\n\n // NOTE: Replace DocumentFragment to work around IE11 bug that\n // causes children of a document fragment modified while\n // there is a mutation observer to not have a parentNode, or\n // have a broken parentNode (!?!)\n if (/Trident/.test(navigator.userAgent)) {\n (function () {\n needsDocFrag = true;\n\n var origCloneNode = Node.prototype.cloneNode;\n Node.prototype.cloneNode = function cloneNode(deep) {\n var newDom = origCloneNode.call(this, deep);\n if (this instanceof DocumentFragment) {\n newDom.__proto__ = DocumentFragment.prototype;\n }\n return newDom;\n };\n\n // IE's DocumentFragment querySelector code doesn't work when\n // called on an element instance\n DocumentFragment.prototype.querySelectorAll =\n HTMLElement.prototype.querySelectorAll;\n DocumentFragment.prototype.querySelector =\n HTMLElement.prototype.querySelector;\n\n Object.defineProperties(DocumentFragment.prototype, {\n 'nodeType': {\n get: function () {\n return Node.DOCUMENT_FRAGMENT_NODE;\n },\n configurable: true,\n },\n\n 'localName': {\n get: function () {\n return undefined;\n },\n configurable: true,\n },\n\n 'nodeName': {\n get: function () {\n return '#document-fragment';\n },\n configurable: true,\n },\n });\n\n var origInsertBefore = Node.prototype.insertBefore;\n function insertBefore(newNode, refNode) {\n if (newNode instanceof DocumentFragment) {\n var child;\n while ((child = newNode.firstChild)) {\n origInsertBefore.call(this, child, refNode);\n }\n } else {\n origInsertBefore.call(this, newNode, refNode);\n }\n return newNode;\n }\n Node.prototype.insertBefore = insertBefore;\n\n var origAppendChild = Node.prototype.appendChild;\n Node.prototype.appendChild = function appendChild(child) {\n if (child instanceof DocumentFragment) {\n insertBefore.call(this, child, null);\n } else {\n origAppendChild.call(this, child);\n }\n return child;\n };\n\n var origRemoveChild = Node.prototype.removeChild;\n var origReplaceChild = Node.prototype.replaceChild;\n Node.prototype.replaceChild = function replaceChild(newChild, oldChild) {\n if (newChild instanceof DocumentFragment) {\n insertBefore.call(this, newChild, oldChild);\n origRemoveChild.call(this, oldChild);\n } else {\n origReplaceChild.call(this, newChild, oldChild);\n }\n return oldChild;\n };\n\n Document.prototype.createDocumentFragment = function createDocumentFragment() {\n var frag = this.createElement('df');\n frag.__proto__ = DocumentFragment.prototype;\n return frag;\n };\n\n var origImportNode = Document.prototype.importNode;\n Document.prototype.importNode = function importNode(impNode, deep) {\n deep = deep || false;\n var newNode = origImportNode.call(this, impNode, deep);\n if (impNode instanceof DocumentFragment) {\n newNode.__proto__ = DocumentFragment.prototype;\n }\n return newNode;\n };\n })();\n }\n\n // NOTE: we rely on this cloneNode not causing element upgrade.\n // This means this polyfill must load before the CE polyfill and\n // this would need to be re-worked if a browser supports native CE\n // but not <template>.\n var capturedCloneNode = Node.prototype.cloneNode;\n var capturedCreateElement = Document.prototype.createElement;\n var capturedImportNode = Document.prototype.importNode;\n var capturedRemoveChild = Node.prototype.removeChild;\n var capturedAppendChild = Node.prototype.appendChild;\n var capturedReplaceChild = Node.prototype.replaceChild;\n var capturedParseFromString = DOMParser.prototype.parseFromString;\n var capturedHTMLElementInnerHTML = Object.getOwnPropertyDescriptor(\n window.HTMLElement.prototype,\n 'innerHTML'\n ) || {\n /**\n * @this {!HTMLElement}\n * @return {string}\n */\n get: function () {\n return this.innerHTML;\n },\n /**\n * @this {!HTMLElement}\n * @param {string}\n */\n set: function (text) {\n this.innerHTML = text;\n },\n };\n var capturedChildNodes = Object.getOwnPropertyDescriptor(\n window.Node.prototype,\n 'childNodes'\n ) || {\n /**\n * @this {!Node}\n * @return {!NodeList}\n */\n get: function () {\n return this.childNodes;\n },\n };\n\n var elementQuerySelectorAll = Element.prototype.querySelectorAll;\n var docQuerySelectorAll = Document.prototype.querySelectorAll;\n var fragQuerySelectorAll = DocumentFragment.prototype.querySelectorAll;\n\n var scriptSelector =\n 'script:not([type]),script[type=\"application/javascript\"],script[type=\"text/javascript\"]';\n\n function QSA(node, selector) {\n // IE 11 throws a SyntaxError with `scriptSelector` if the node has no children due to the `:not([type])` syntax\n if (!node.childNodes.length) {\n return [];\n }\n switch (node.nodeType) {\n case Node.DOCUMENT_NODE:\n return docQuerySelectorAll.call(node, selector);\n case Node.DOCUMENT_FRAGMENT_NODE:\n return fragQuerySelectorAll.call(node, selector);\n default:\n return elementQuerySelectorAll.call(node, selector);\n }\n }\n\n // returns true if nested templates cannot be cloned (they cannot be on\n // some impl's like Safari 8 and Edge)\n // OR if cloning a document fragment does not result in a document fragment\n var needsCloning = (function () {\n if (!needsTemplate) {\n var t = document.createElement('template');\n var t2 = document.createElement('template');\n t2.content.appendChild(document.createElement('div'));\n t.content.appendChild(t2);\n var clone = t.cloneNode(true);\n return (\n clone.content.childNodes.length === 0 ||\n clone.content.firstChild.content.childNodes.length === 0 ||\n brokenDocFragment\n );\n }\n })();\n\n var TEMPLATE_TAG = 'template';\n var PolyfilledHTMLTemplateElement = function () {};\n\n if (needsTemplate) {\n var contentDoc = document.implementation.createHTMLDocument('template');\n var canDecorate = true;\n\n var templateStyle = document.createElement('style');\n templateStyle.textContent = TEMPLATE_TAG + '{display:none;}';\n\n var head = document.head;\n head.insertBefore(templateStyle, head.firstElementChild);\n\n /**\n Provides a minimal shim for the <template> element.\n */\n PolyfilledHTMLTemplateElement.prototype = Object.create(\n HTMLElement.prototype\n );\n\n // if elements do not have `innerHTML` on instances, then\n // templates can be patched by swizzling their prototypes.\n var canProtoPatch = !document\n .createElement('div')\n .hasOwnProperty('innerHTML');\n\n /**\n The `decorate` method moves element children to the template's `content`.\n NOTE: there is no support for dynamically adding elements to templates.\n */\n PolyfilledHTMLTemplateElement.decorate = function (template) {\n // if the template is decorated or not in HTML namespace, return fast\n if (\n template.content ||\n template.namespaceURI !== document.documentElement.namespaceURI\n ) {\n return;\n }\n template.content = contentDoc.createDocumentFragment();\n var child;\n while ((child = template.firstChild)) {\n capturedAppendChild.call(template.content, child);\n }\n // NOTE: prefer prototype patching for performance and\n // because on some browsers (IE11), re-defining `innerHTML`\n // can result in intermittent errors.\n if (canProtoPatch) {\n template.__proto__ = PolyfilledHTMLTemplateElement.prototype;\n } else {\n template.cloneNode = function (deep) {\n return PolyfilledHTMLTemplateElement._cloneNode(this, deep);\n };\n // add innerHTML to template, if possible\n // Note: this throws on Safari 7\n if (canDecorate) {\n try {\n defineInnerHTML(template);\n defineOuterHTML(template);\n } catch (err) {\n canDecorate = false;\n }\n }\n }\n // bootstrap recursively\n PolyfilledHTMLTemplateElement.bootstrap(template.content);\n };\n\n // Taken from https://github.com/jquery/jquery/blob/73d7e6259c63ac45f42c6593da8c2796c6ce9281/src/manipulation/wrapMap.js\n var topLevelWrappingMap = {\n 'option': ['select'],\n 'thead': ['table'],\n 'col': ['colgroup', 'table'],\n 'tr': ['tbody', 'table'],\n 'th': ['tr', 'tbody', 'table'],\n 'td': ['tr', 'tbody', 'table'],\n };\n\n var getTagName = function (text) {\n // Taken from https://github.com/jquery/jquery/blob/73d7e6259c63ac45f42c6593da8c2796c6ce9281/src/manipulation/var/rtagName.js\n return (/<([a-z][^/\\0>\\x20\\t\\r\\n\\f]+)/i.exec(text) || [\n '',\n '',\n ])[1].toLowerCase();\n };\n\n var defineInnerHTML = function defineInnerHTML(obj) {\n Object.defineProperty(obj, 'innerHTML', {\n get: function () {\n return getInnerHTML(this);\n },\n set: function (text) {\n // For IE11, wrap the text in the correct (table) context\n var wrap = topLevelWrappingMap[getTagName(text)];\n if (wrap) {\n for (var i = 0; i < wrap.length; i++) {\n text = '<' + wrap[i] + '>' + text + '</' + wrap[i] + '>';\n }\n }\n contentDoc.body.innerHTML = text;\n PolyfilledHTMLTemplateElement.bootstrap(contentDoc);\n while (this.content.firstChild) {\n capturedRemoveChild.call(this.content, this.content.firstChild);\n }\n var body = contentDoc.body;\n // If we had wrapped, get back to the original node\n if (wrap) {\n for (var j = 0; j < wrap.length; j++) {\n body = body.lastChild;\n }\n }\n while (body.firstChild) {\n capturedAppendChild.call(this.content, body.firstChild);\n }\n },\n configurable: true,\n });\n };\n\n var defineOuterHTML = function defineOuterHTML(obj) {\n Object.defineProperty(obj, 'outerHTML', {\n get: function () {\n return `<${TEMPLATE_TAG}>${this.innerHTML}</${TEMPLATE_TAG}>`;\n },\n set: function (innerHTML) {\n if (this.parentNode) {\n contentDoc.body.innerHTML = innerHTML;\n var docFrag = this.ownerDocument.createDocumentFragment();\n while (contentDoc.body.firstChild) {\n capturedAppendChild.call(docFrag, contentDoc.body.firstChild);\n }\n capturedReplaceChild.call(this.parentNode, docFrag, this);\n } else {\n throw new Error(\n \"Failed to set the 'outerHTML' property on 'Element': This element has no parent node.\"\n );\n }\n },\n configurable: true,\n });\n };\n\n defineInnerHTML(PolyfilledHTMLTemplateElement.prototype);\n defineOuterHTML(PolyfilledHTMLTemplateElement.prototype);\n\n /**\n The `bootstrap` method is called automatically and \"fixes\" all\n <template> elements in the document referenced by the `doc` argument.\n */\n PolyfilledHTMLTemplateElement.bootstrap = function bootstrap(doc) {\n var templates = QSA(doc, TEMPLATE_TAG);\n for (\n var i = 0, l = templates.length, t;\n i < l && (t = templates[i]);\n i++\n ) {\n PolyfilledHTMLTemplateElement.decorate(t);\n }\n };\n\n // auto-bootstrapping for main document\n document.addEventListener('DOMContentLoaded', function () {\n PolyfilledHTMLTemplateElement.bootstrap(document);\n });\n\n // Patch document.createElement to ensure newly created templates have content\n Document.prototype.createElement = function createElement() {\n var el = capturedCreateElement.apply(this, arguments);\n if (el.localName === 'template') {\n PolyfilledHTMLTemplateElement.decorate(el);\n }\n return el;\n };\n\n DOMParser.prototype.parseFromString = function () {\n var el = capturedParseFromString.apply(this, arguments);\n PolyfilledHTMLTemplateElement.bootstrap(el);\n return el;\n };\n\n Object.defineProperty(HTMLElement.prototype, 'innerHTML', {\n get: function () {\n return getInnerHTML(this);\n },\n set: function (text) {\n capturedHTMLElementInnerHTML.set.call(this, text);\n PolyfilledHTMLTemplateElement.bootstrap(this);\n },\n configurable: true,\n enumerable: true,\n });\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\n var escapeAttrRegExp = /[&\\u00A0\"]/g;\n var escapeDataRegExp = /[&\\u00A0<>]/g;\n\n var escapeReplace = function (c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"';\n case '\\u00A0':\n return ' ';\n }\n };\n\n var escapeAttr = function (s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n };\n\n var escapeData = function (s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n };\n\n var makeSet = function (arr) {\n var set = {};\n for (var i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n };\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n ]);\n\n var plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript',\n ]);\n\n /**\n * @param {Node} node\n * @param {Node} parentNode\n * @param {Function=} callback\n */\n var getOuterHTML = function (node, parentNode, callback) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE: {\n var tagName = node.localName;\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; (attr = attrs[i]); i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName]) {\n return s;\n }\n return s + getInnerHTML(node, callback) + '</' + tagName + '>';\n }\n case Node.TEXT_NODE: {\n var data = /** @type {Text} */ (node).data;\n if (parentNode && plaintextParents[parentNode.localName]) {\n return data;\n }\n return escapeData(data);\n }\n case Node.COMMENT_NODE: {\n return '<!--' + /** @type {Comment} */ (node).data + '-->';\n }\n default: {\n window.console.error(node);\n throw new Error('not implemented');\n }\n }\n };\n\n /**\n * @param {Node} node\n * @param {Function=} callback\n */\n var getInnerHTML = function (node, callback) {\n if (node.localName === 'template') {\n node = /** @type {HTMLTemplateElement} */ (node).content;\n }\n var s = '';\n var c$ = callback ? callback(node) : capturedChildNodes.get.call(node);\n for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {\n s += getOuterHTML(child, node, callback);\n }\n return s;\n };\n }\n\n // make cloning/importing work!\n if (needsTemplate || needsCloning) {\n PolyfilledHTMLTemplateElement._cloneNode = function _cloneNode(\n template,\n deep\n ) {\n var clone = capturedCloneNode.call(template, false);\n // NOTE: decorate doesn't auto-fix children because they are already\n // decorated so they need special clone fixup.\n if (this.decorate) {\n this.decorate(clone);\n }\n if (deep) {\n // NOTE: use native clone node to make sure CE's wrapped\n // cloneNode does not cause elements to upgrade.\n capturedAppendChild.call(\n clone.content,\n capturedCloneNode.call(template.content, true)\n );\n // now ensure nested templates are cloned correctly.\n fixClonedDom(clone.content, template.content);\n }\n return clone;\n };\n\n // Given a source and cloned subtree, find <template>'s in the cloned\n // subtree and replace them with cloned <template>'s from source.\n // We must do this because only the source templates have proper .content.\n var fixClonedDom = function fixClonedDom(clone, source) {\n // do nothing if cloned node is not an element\n if (!source.querySelectorAll) {\n return;\n }\n // these two lists should be coincident\n var s$ = QSA(source, TEMPLATE_TAG);\n if (s$.length === 0) {\n return;\n }\n var t$ = QSA(clone, TEMPLATE_TAG);\n for (var i = 0, l = t$.length, t, s; i < l; i++) {\n s = s$[i];\n t = t$[i];\n if (\n PolyfilledHTMLTemplateElement &&\n PolyfilledHTMLTemplateElement.decorate\n ) {\n PolyfilledHTMLTemplateElement.decorate(s);\n }\n capturedReplaceChild.call(t.parentNode, cloneNode.call(s, true), t);\n }\n };\n\n // make sure scripts inside of a cloned template are executable\n var fixClonedScripts = function fixClonedScripts(fragment) {\n var scripts = QSA(fragment, scriptSelector);\n for (var ns, s, i = 0; i < scripts.length; i++) {\n s = scripts[i];\n ns = capturedCreateElement.call(document, 'script');\n ns.textContent = s.textContent;\n var attrs = s.attributes;\n for (var ai = 0, a; ai < attrs.length; ai++) {\n a = attrs[ai];\n ns.setAttribute(a.name, a.value);\n }\n capturedReplaceChild.call(s.parentNode, ns, s);\n }\n };\n\n // override all cloning to fix the cloned subtree to contain properly\n // cloned templates.\n var cloneNode = (Node.prototype.cloneNode = function cloneNode(deep) {\n var dom;\n // workaround for Edge bug cloning documentFragments\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8619646/\n if (\n !needsDocFrag &&\n brokenDocFragment &&\n this instanceof DocumentFragment\n ) {\n if (!deep) {\n return this.ownerDocument.createDocumentFragment();\n } else {\n dom = importNode.call(this.ownerDocument, this, true);\n }\n } else if (\n this.nodeType === Node.ELEMENT_NODE &&\n this.localName === TEMPLATE_TAG &&\n this.namespaceURI == document.documentElement.namespaceURI\n ) {\n dom = PolyfilledHTMLTemplateElement._cloneNode(this, deep);\n } else {\n dom = capturedCloneNode.call(this, deep);\n }\n // template.content is cloned iff `deep`.\n if (deep) {\n fixClonedDom(dom, this);\n }\n return dom;\n });\n\n // NOTE: we are cloning instead of importing <template>'s.\n // However, the ownerDocument of the cloned template will be correct!\n // This is because the native import node creates the right document owned\n // subtree and `fixClonedDom` inserts cloned templates into this subtree,\n // thus updating the owner doc.\n var importNode = (Document.prototype.importNode = function importNode(\n element,\n deep\n ) {\n deep = deep || false;\n if (element.localName === TEMPLATE_TAG) {\n return PolyfilledHTMLTemplateElement._cloneNode(element, deep);\n } else {\n var dom = capturedImportNode.call(this, element, deep);\n if (deep) {\n fixClonedDom(dom, element);\n fixClonedScripts(dom);\n }\n return dom;\n }\n });\n }\n\n if (needsTemplate) {\n window.HTMLTemplateElement = PolyfilledHTMLTemplateElement;\n }\n})();\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport class ShadyData {\n /** @override */\n toJSON() {\n return {};\n }\n}\n\nexport function ensureShadyDataForNode(node) {\n if (!node.__shady) {\n node.__shady = new ShadyData();\n }\n return node.__shady;\n}\n\nexport function shadyDataForNode(node) {\n return node && node.__shady;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport {shadyDataForNode} from './shady-data.js';\n\n/** @type {!Object} */\nexport const settings = window['ShadyDOM'] || {};\n\nsettings.hasNativeShadowDOM = Boolean(\n Element.prototype.attachShadow && Node.prototype.getRootNode\n);\n\n// The user might need to pass the custom elements polyfill a flag by setting an\n// object to `customElements`, so check for `customElements.define` also.\nexport const hasCustomElements = () =>\n Boolean(window.customElements && window.customElements.define);\n// The custom elements polyfill is typically loaded after Shady DOM, so this\n// check isn't reliable during initial evaluation. However, because the\n// polyfills are loaded immediately after one another, it works at runtime.\nexport const hasPolyfilledCustomElements = () =>\n Boolean(\n window.customElements && window.customElements['polyfillWrapFlushCallback']\n );\n\nconst desc = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild');\n\nsettings.hasDescriptors = Boolean(desc && desc.configurable && desc.get);\nsettings.inUse = settings['force'] || !settings.hasNativeShadowDOM;\nsettings.noPatch = /** @type {string|boolean} */ (settings['noPatch'] || false);\n// eslint-disable-next-line no-self-assign\nsettings.preferPerformance = settings['preferPerformance'];\nsettings.patchOnDemand = settings.noPatch === 'on-demand';\nsettings.querySelectorImplementation = (() => {\n const acceptedValues = ['native', 'selectorEngine'];\n const userValue = settings['querySelectorImplementation'];\n if (acceptedValues.indexOf(userValue) > -1) {\n return userValue;\n }\n return undefined;\n})();\n\nconst IS_IE = navigator.userAgent.match('Trident');\nsettings.IS_IE = IS_IE;\n\n// Helper for prefixed properties.\nexport const getPropertyName = (obj, name) => {\n const prefixed = `ms${name[0].toUpperCase() + name.slice(1)}`;\n return obj[prefixed] ? prefixed : name;\n};\n\nexport const canUpgrade = () => !settings.IS_IE;\n\nexport const isTrackingLogicalChildNodes = (node) => {\n const nodeData = shadyDataForNode(node);\n return nodeData && nodeData.firstChild !== undefined;\n};\n\nexport const isShadyRoot = (obj) => obj instanceof ShadowRoot;\n\nexport const hasShadowRootWithSlot = (node) => {\n const nodeData = shadyDataForNode(node);\n let root = nodeData && nodeData.root;\n return root && root._hasInsertionPoint();\n};\n\nlet p = Element.prototype;\nlet matches =\n p.matches ||\n p.matchesSelector ||\n p.mozMatchesSelector ||\n p.msMatchesSelector ||\n p.oMatchesSelector ||\n p.webkitMatchesSelector;\n\nexport const matchesSelector = (element, selector) => {\n return matches.call(element, selector);\n};\n\nexport const mixin = (target, source) => {\n for (var i in source) {\n target[i] = source[i];\n }\n return target;\n};\n\n// NOTE, prefer MutationObserver over Promise for microtask timing\n// for consistency x-platform.\nlet twiddle = document.createTextNode('');\nlet content = 0;\nlet queue = [];\nnew MutationObserver(() => {\n while (queue.length) {\n // catch errors in user code...\n try {\n queue.shift()();\n } catch (e) {\n // enqueue another record and throw\n twiddle.textContent = content++;\n throw e;\n }\n }\n}).observe(twiddle, {characterData: true});\n\n// use MutationObserver to get microtask async timing.\nexport const microtask = (callback) => {\n queue.push(callback);\n twiddle.textContent = content++;\n};\n\n/** @type {function(!Document, !Node): boolean} */\nexport const documentContains = (() => {\n if (document.contains) {\n return (doc, node) => doc[NATIVE_PREFIX + 'contains'](node);\n } else {\n return (doc, node) =>\n doc === node ||\n (doc.documentElement &&\n doc.documentElement[NATIVE_PREFIX + 'contains'](node));\n }\n})();\n\nexport const contains = (container, node) => {\n while (node) {\n if (node == container) {\n return true;\n }\n node = node[SHADY_PREFIX + 'parentNode'];\n }\n return false;\n};\n\nconst getNodeHTMLCollectionName = (node) =>\n node.getAttribute('id') || node.getAttribute('name');\n\nconst isValidHTMLCollectionName = (name) => name !== 'length' && isNaN(name);\n\nexport const createPolyfilledHTMLCollection = (nodes) => {\n // Note: loop in reverse so that the first named item matches the named property\n for (let l = nodes.length - 1; l >= 0; l--) {\n const node = nodes[l];\n const name = getNodeHTMLCollectionName(node);\n\n if (name && isValidHTMLCollectionName(name)) {\n nodes[name] = node;\n }\n }\n nodes.item = function (index) {\n return nodes[index];\n };\n nodes.namedItem = function (name) {\n if (isValidHTMLCollectionName(name) && nodes[name]) {\n return nodes[name];\n }\n\n for (const node of nodes) {\n const nodeName = getNodeHTMLCollectionName(node);\n\n if (nodeName == name) {\n return node;\n }\n }\n\n return null;\n };\n return nodes;\n};\n\nexport const NATIVE_PREFIX = '__shady_native_';\nexport const SHADY_PREFIX = '__shady_';\n\nexport const nativeChildNodesArray = (parent) => {\n const result = [];\n for (\n let n = parent[NATIVE_PREFIX + 'firstChild'];\n n;\n n = n[NATIVE_PREFIX + 'nextSibling']\n ) {\n result.push(n);\n }\n return result;\n};\n\nexport const childNodesArray = (parent) => {\n const result = [];\n for (\n let n = parent[SHADY_PREFIX + 'firstChild'];\n n;\n n = n[SHADY_PREFIX + 'nextSibling']\n ) {\n result.push(n);\n }\n return result;\n};\n\nconst patchProperty = (proto, name, descriptor) => {\n descriptor.configurable = true;\n // NOTE: we prefer writing directly because some browsers\n // have descriptors that are writable but not configurable (e.g.\n // `appendChild` on older browsers)\n if (descriptor.value) {\n proto[name] = descriptor.value;\n } else {\n try {\n Object.defineProperty(proto, name, descriptor);\n } catch (e) {\n // this error is harmless so we just trap it.\n }\n }\n};\n\n/**\n * Patch a group of accessors on an object. By default this overrides\n * @param {!Object} proto\n * @param {!Object} descriptors\n * @param {string=} prefix\n * @param {Array=} disallowedPatches\n */\nexport const patchProperties = (\n proto,\n descriptors,\n prefix = '',\n disallowedPatches\n) => {\n for (let name in descriptors) {\n if (disallowedPatches && disallowedPatches.indexOf(name) >= 0) {\n continue;\n }\n patchProperty(proto, prefix + name, descriptors[name]);\n }\n};\n\nexport const patchExistingProperties = (proto, descriptors) => {\n for (let name in descriptors) {\n if (name in proto) {\n patchProperty(proto, name, descriptors[name]);\n }\n }\n};\n\n// note, this is not a perfect polyfill since it doesn't include symbols\n/** @return {!Object<!ObjectPropertyDescriptor>} */\nexport const getOwnPropertyDescriptors = (obj) => {\n const descriptors = {};\n Object.getOwnPropertyNames(obj).forEach((name) => {\n descriptors[name] = Object.getOwnPropertyDescriptor(obj, name);\n });\n return descriptors;\n};\n\nexport const assign = (target, source) => {\n const names = Object.getOwnPropertyNames(source);\n for (let i = 0, p; i < names.length; i++) {\n p = names[i];\n target[p] = source[p];\n }\n};\n\nexport const arrayFrom = (object) => {\n return [].slice.call(/** @type {IArrayLike} */ (object));\n};\n\n/**\n * Converts a single value to a node for `convertNodesIntoANode`.\n *\n * @param {*} arg\n * @return {!Node}\n */\nconst convertIntoANode = (arg) => {\n // `\"\" + arg` is used to implicitly coerce the value to a string (coercing a\n // symbol *should* fail here) before passing to `createTextNode`, which has\n // argument type `(number|string)`.\n return !(arg instanceof Node) ? document.createTextNode('' + arg) : arg;\n};\n\n/**\n * Implements 'convert nodes into a node'. The spec text indicates that strings\n * become text nodes, but doesn't describe what should happen if a non-Node,\n * non-string value is found in the arguments list. In practice, browsers coerce\n * these values to strings and convert those to text nodes.\n * https://dom.spec.whatwg.org/#converting-nodes-into-a-node\n *\n * @param {...*} args\n * @return {!Node}\n */\nexport const convertNodesIntoANode = (...args) => {\n if (args.length === 1) {\n return convertIntoANode(args[0]);\n }\n\n const fragment = document.createDocumentFragment();\n for (const arg of args) {\n fragment.appendChild(convertIntoANode(arg));\n }\n return fragment;\n};\n\n/**\n * Equivalent to `Array.prototype.flat`. Closure does not compile out this\n * function, so we need an implementation for browsers that don't natively\n * support it.\n *\n * @template T\n * @param {!Array<!T | !Array<!T>>} array\n * @param {number} depth\n * @return {!Array<!T>}\n */\nexport const flat = (array, depth = 1) => {\n for (; depth > 0; depth--) {\n array = array.reduce((acc, item) => {\n if (Array.isArray(item)) {\n acc.push(...item);\n } else {\n acc.push(item);\n }\n return acc;\n }, []);\n }\n\n return array;\n};\n\n/**\n * Deduplicates items in an array.\n *\n * This function could normally be implemented as merely `Array.from(new\n * Set(...))`. However, in IE 11, `Set` does not support being constructed with\n * an iterable. Further, some polyfills for `Array.from` effectively default to\n * `Array.prototype.slice.call(...)` when they are unable to find\n * `[Symbol.iterator]`; this is incompatible with `Set` which has no `length` or\n * indexable properties.\n *\n * @template T\n * @param {!Array<!T>} array\n * @return {!Array<!T>}\n */\nexport const deduplicate = (array) => {\n const results = [];\n const set = new Set();\n for (const item of array) {\n if (!set.has(item)) {\n results.push(item);\n set.add(item);\n }\n }\n return results;\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport * as utils from './utils.js';\nimport {patchProperties} from './utils.js';\nimport {getInnerHTML} from './innerHTML.js';\n\nconst hasDescriptors = utils.settings.hasDescriptors;\nexport const NATIVE_PREFIX = utils.NATIVE_PREFIX;\n\n// Object on which raw native methods are stored.\n// e.g. `nativeMethods.querySelector.call(node, selector)`\n// same as `node.querySelector(selector)`\nexport const nativeMethods = {\n /** @this {Element} */\n querySelector(selector) {\n return this[NATIVE_PREFIX + 'querySelector'](selector);\n },\n /** @this {Element} */\n querySelectorAll(selector) {\n return this[NATIVE_PREFIX + 'querySelectorAll'](selector);\n },\n};\n// Object on which raw native accessors are available via `accessorName(node)`.\n// e.g. `nativeTree.firstChild(node)`\n// same as `node.firstChild`\nexport const nativeTree = {};\n\nconst installNativeAccessor = (name) => {\n nativeTree[name] = (node) => node[NATIVE_PREFIX + name];\n};\n\nconst installNativeMethod = (name, fn) => {\n if (!nativeMethods[name]) {\n nativeMethods[name] = fn;\n }\n};\n\nconst defineNativeAccessors = (proto, descriptors) => {\n patchProperties(proto, descriptors, NATIVE_PREFIX);\n // make native accessors available to users\n for (let prop in descriptors) {\n installNativeAccessor(prop);\n }\n};\n\nconst copyProperties = (proto, list = []) => {\n for (let i = 0; i < list.length; i++) {\n const name = list[i];\n const descriptor = Object.getOwnPropertyDescriptor(proto, name);\n if (descriptor) {\n Object.defineProperty(proto, NATIVE_PREFIX + name, descriptor);\n // make native methods/accessors available to users\n if (descriptor.value) {\n installNativeMethod(name, descriptor.value);\n } else {\n installNativeAccessor(name);\n }\n }\n }\n};\n\n/** @type {!TreeWalker} */\nconst nodeWalker = document.createTreeWalker(\n document,\n NodeFilter.SHOW_ALL,\n null,\n false\n);\n\n/** @type {!TreeWalker} */\nconst elementWalker = document.createTreeWalker(\n document,\n NodeFilter.SHOW_ELEMENT,\n null,\n false\n);\n\n/** @type {!Document} */\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nconst clearNode = (node) => {\n let firstChild;\n while ((firstChild = node[NATIVE_PREFIX + 'firstChild'])) {\n node[NATIVE_PREFIX + 'removeChild'](firstChild);\n }\n};\n\nconst ParentNodeAccessors = [\n 'firstElementChild',\n 'lastElementChild',\n 'children',\n 'childElementCount',\n];\n\nconst ParentNodeMethods = [\n 'querySelector',\n 'querySelectorAll',\n 'append',\n 'prepend',\n 'replaceChildren',\n];\n\nexport const addNativePrefixedProperties = () => {\n // EventTarget\n const eventProps = [\n 'dispatchEvent',\n 'addEventListener',\n 'removeEventListener',\n ];\n if (window.EventTarget) {\n copyProperties(window.EventTarget.prototype, eventProps);\n\n // In Firefox 31, `EventTarget` exists, but `EventTarget.prototype` is not\n // in the prototype chain of `window` and, strangely,\n // `window instanceof EventTarget` still returns true.\n if (window[NATIVE_PREFIX + 'addEventListener'] === undefined) {\n copyProperties(Window.prototype, eventProps);\n }\n } else {\n copyProperties(Node.prototype, eventProps);\n copyProperties(Window.prototype, eventProps);\n copyProperties(XMLHttpRequest.prototype, eventProps);\n }\n\n // Node\n if (hasDescriptors) {\n copyProperties(Node.prototype, [\n 'parentNode',\n 'firstChild',\n 'lastChild',\n 'previousSibling',\n 'nextSibling',\n 'childNodes',\n 'parentElement',\n 'textContent',\n ]);\n } else {\n defineNativeAccessors(Node.prototype, {\n parentNode: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.parentNode();\n },\n },\n firstChild: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.firstChild();\n },\n },\n lastChild: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.lastChild();\n },\n },\n previousSibling: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.previousSibling();\n },\n },\n nextSibling: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.nextSibling();\n },\n },\n // TODO(sorvell): make this a NodeList or whatever\n childNodes: {\n /** @this {Node} */\n get() {\n const nodes = [];\n nodeWalker.currentNode = this;\n let n = nodeWalker.firstChild();\n while (n) {\n nodes.push(n);\n n = nodeWalker.nextSibling();\n }\n return nodes;\n },\n },\n parentElement: {\n /** @this {Node} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.parentNode();\n },\n },\n textContent: {\n /** @this {Node} */\n get() {\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n // TODO(sorvell): This cannot be a single TreeWalker that's reused\n // at least for Safari 9, but it's unclear why.\n // eslint-disable-next-line no-case-declarations\n const textWalker = document.createTreeWalker(\n this,\n NodeFilter.SHOW_TEXT,\n null,\n false\n );\n // eslint-disable-next-line no-case-declarations\n let content = '',\n n;\n while ((n = textWalker.nextNode())) {\n // TODO(sorvell): can't use textContent since we patch it on Node.prototype!\n // However, should probably patch it only on element.\n content += n.nodeValue;\n }\n return content;\n default:\n return this.nodeValue;\n }\n },\n // Needed on browsers that do not proper accessors (e.g. old versions of Chrome)\n /** @this {Node} */\n set(value) {\n if (typeof value === 'undefined' || value === null) {\n value = '';\n }\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n clearNode(this);\n // Document fragments must have no childnodes if setting a blank string\n if (value.length > 0 || this.nodeType === Node.ELEMENT_NODE) {\n // Note: old Chrome versions require 2nd argument here\n this[NATIVE_PREFIX + 'insertBefore'](\n document.createTextNode(value),\n undefined\n );\n }\n break;\n default:\n // TODO(sorvell): can't do this if patch nodeValue.\n this.nodeValue = value;\n break;\n }\n },\n },\n });\n }\n\n copyProperties(Node.prototype, [\n 'appendChild',\n 'insertBefore',\n 'removeChild',\n 'replaceChild',\n 'cloneNode',\n 'contains',\n ]);\n\n // NOTE, on some browsers IE 11 / Edge 15 some properties are incorrectly on HTMLElement\n copyProperties(HTMLElement.prototype, ['parentElement', 'contains']);\n\n const ParentNodeWalkerDescriptors = {\n firstElementChild: {\n /** @this {ParentNode} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.firstChild();\n },\n },\n lastElementChild: {\n /** @this {ParentNode} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.lastChild();\n },\n },\n children: {\n /** @this {ParentNode} */\n get() {\n let nodes = [];\n elementWalker.currentNode = this;\n let n = elementWalker.firstChild();\n while (n) {\n nodes.push(n);\n n = elementWalker.nextSibling();\n }\n return utils.createPolyfilledHTMLCollection(nodes);\n },\n },\n childElementCount: {\n /** @this {ParentNode} */\n get() {\n if (this.children) {\n return this.children.length;\n }\n return 0;\n },\n },\n };\n\n // Element\n if (hasDescriptors) {\n copyProperties(Element.prototype, ParentNodeAccessors);\n\n copyProperties(Element.prototype, [\n 'previousElementSibling',\n 'nextElementSibling',\n 'innerHTML',\n 'className',\n ]);\n\n // NOTE, on some browsers IE 11 / Edge 15 some properties are incorrectly on HTMLElement\n copyProperties(HTMLElement.prototype, [\n 'children',\n 'innerHTML',\n 'className',\n ]);\n } else {\n defineNativeAccessors(Element.prototype, ParentNodeWalkerDescriptors);\n defineNativeAccessors(Element.prototype, {\n previousElementSibling: {\n /** @this {Element} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.previousSibling();\n },\n },\n nextElementSibling: {\n /** @this {Element} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.nextSibling();\n },\n },\n innerHTML: {\n /** @this {Element} */\n get() {\n return getInnerHTML(this, utils.nativeChildNodesArray);\n },\n // Needed on browsers that do not proper accessors (e.g. old versions of Chrome)\n /** @this {Element} */\n set(value) {\n const content =\n this.localName === 'template'\n ? /** @type {HTMLTemplateElement} */ (this).content\n : this;\n clearNode(content);\n const containerName = this.localName || 'div';\n let htmlContainer;\n if (\n !this.namespaceURI ||\n this.namespaceURI === inertDoc.namespaceURI\n ) {\n htmlContainer = inertDoc.createElement(containerName);\n } else {\n htmlContainer = inertDoc.createElementNS(\n this.namespaceURI,\n containerName\n );\n }\n htmlContainer.innerHTML = value;\n const newContent =\n this.localName === 'template'\n ? /** @type {HTMLTemplateElement} */ (htmlContainer).content\n : htmlContainer;\n let firstChild;\n while ((firstChild = newContent[NATIVE_PREFIX + 'firstChild'])) {\n // Note: old Chrome versions require 2nd argument here\n content[NATIVE_PREFIX + 'insertBefore'](firstChild, undefined);\n }\n },\n },\n className: {\n /** @this {Element} */\n get() {\n return this.getAttribute('class') || '';\n },\n /** @this {Element} */\n set(value) {\n this.setAttribute('class', value);\n },\n },\n });\n }\n\n copyProperties(Element.prototype, [\n 'setAttribute',\n 'getAttribute',\n 'hasAttribute',\n 'removeAttribute',\n 'toggleAttribute',\n // on older Safari, these are on Element.\n 'focus',\n 'blur',\n ]);\n copyProperties(Element.prototype, ParentNodeMethods);\n\n // HTMLElement\n copyProperties(HTMLElement.prototype, ['focus', 'blur']);\n\n // HTMLTemplateElement\n if (window.HTMLTemplateElement) {\n copyProperties(window.HTMLTemplateElement.prototype, ['innerHTML']);\n }\n\n // DocumentFragment\n if (hasDescriptors) {\n // NOTE, IE 11 does not have on DocumentFragment\n // firstElementChild\n // lastElementChild\n copyProperties(DocumentFragment.prototype, ParentNodeAccessors);\n } else {\n defineNativeAccessors(\n DocumentFragment.prototype,\n ParentNodeWalkerDescriptors\n );\n }\n\n copyProperties(DocumentFragment.prototype, ParentNodeMethods);\n\n // Document\n if (hasDescriptors) {\n copyProperties(Document.prototype, ParentNodeAccessors);\n copyProperties(Document.prototype, ['activeElement']);\n } else {\n defineNativeAccessors(Document.prototype, ParentNodeWalkerDescriptors);\n }\n\n copyProperties(Document.prototype, [\n 'importNode',\n 'getElementById',\n 'elementFromPoint',\n utils.getPropertyName(Document.prototype, 'elementsFromPoint'),\n ]);\n copyProperties(Document.prototype, ParentNodeMethods);\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\n\n// render enqueuer/flusher\nlet flushList = [];\nlet scheduled;\nexport function enqueue(callback) {\n if (!scheduled) {\n scheduled = true;\n utils.microtask(flush);\n }\n flushList.push(callback);\n}\n\nexport function flush() {\n scheduled = false;\n let didFlush = Boolean(flushList.length);\n while (flushList.length) {\n flushList.shift()();\n }\n return didFlush;\n}\n\nflush['list'] = flushList;\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {ensureShadyDataForNode} from './shady-data.js';\n\nclass AsyncObserver {\n constructor() {\n this._scheduled = false;\n this.addedNodes = [];\n this.removedNodes = [];\n this.callbacks = new Set();\n }\n\n schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n utils.microtask(() => {\n this.flush();\n });\n }\n }\n\n flush() {\n if (this._scheduled) {\n this._scheduled = false;\n let mutations = this.takeRecords();\n if (mutations.length) {\n this.callbacks.forEach(function (cb) {\n cb(mutations);\n });\n }\n }\n }\n\n takeRecords() {\n if (this.addedNodes.length || this.removedNodes.length) {\n let mutations = [\n {\n addedNodes: this.addedNodes,\n removedNodes: this.removedNodes,\n },\n ];\n this.addedNodes = [];\n this.removedNodes = [];\n return mutations;\n }\n return [];\n }\n}\n\n// TODO(sorvell): consider instead polyfilling MutationObserver\n// directly so that users do not have to fork their code.\n// Supporting the entire api may be challenging: e.g. filtering out\n// removed nodes in the wrong scope and seeing non-distributing\n// subtree child mutations.\nexport let observeChildren = function (node, callback) {\n const sd = ensureShadyDataForNode(node);\n if (!sd.observer) {\n sd.observer = new AsyncObserver();\n }\n sd.observer.callbacks.add(callback);\n let observer = sd.observer;\n return {\n _callback: callback,\n _observer: observer,\n _node: node,\n takeRecords() {\n return observer.takeRecords();\n },\n };\n};\n\nexport let unobserveChildren = function (handle) {\n let observer = handle && handle._observer;\n if (observer) {\n observer.callbacks.delete(handle._callback);\n if (!observer.callbacks.size) {\n ensureShadyDataForNode(handle._node).observer = null;\n }\n }\n};\n\nexport function filterMutations(mutations, target) {\n /** @const {Node} */\n const targetRootNode = target.getRootNode();\n return mutations\n .map(function (mutation) {\n /** @const {boolean} */\n const mutationInScope = targetRootNode === mutation.target.getRootNode();\n if (mutationInScope && mutation.addedNodes) {\n let nodes = utils.arrayFrom(mutation.addedNodes).filter(function (n) {\n return targetRootNode === n.getRootNode();\n });\n if (nodes.length) {\n mutation = Object.create(mutation);\n Object.defineProperty(mutation, 'addedNodes', {\n value: nodes,\n configurable: true,\n });\n return mutation;\n }\n } else if (mutationInScope) {\n return mutation;\n }\n })\n .filter(function (m) {\n return m;\n });\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n// Cribbed from ShadowDOM polyfill\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/ShadowDOM/wrappers/HTMLElement.js#L28\n/////////////////////////////////////////////////////////////////////////////\n// innerHTML and outerHTML\n\n// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\nlet escapeAttrRegExp = /[&\\u00A0\"]/g;\nlet escapeDataRegExp = /[&\\u00A0<>]/g;\n\nfunction escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"';\n case '\\u00A0':\n return ' ';\n }\n}\n\nfunction escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n}\n\nfunction escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n}\n\nfunction makeSet(arr) {\n let set = {};\n for (let i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n}\n\n// http://www.whatwg.org/specs/web-apps/current-work/#void-elements\nlet voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nlet plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript',\n]);\n\n/**\n * @param {Node} node\n * @param {Node} parentNode\n * @param {Function=} callback\n */\nexport function getOuterHTML(node, parentNode, callback) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE: {\n let tagName = node.localName;\n let s = '<' + tagName;\n let attrs = node.attributes;\n for (let i = 0, attr; (attr = attrs[i]); i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName]) {\n return s;\n }\n return s + getInnerHTML(node, callback) + '</' + tagName + '>';\n }\n case Node.TEXT_NODE: {\n let data = /** @type {Text} */ (node).data;\n if (parentNode && plaintextParents[parentNode.localName]) {\n return data;\n }\n return escapeData(data);\n }\n case Node.COMMENT_NODE: {\n return '<!--' + /** @type {Comment} */ (node).data + '-->';\n }\n default: {\n window.console.error(node);\n throw new Error('not implemented');\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Function=} callback\n */\nexport function getInnerHTML(node, callback) {\n if (node.localName === 'template') {\n node = /** @type {HTMLTemplateElement} */ (node).content;\n }\n let s = '';\n let c$ = callback ? callback(node) : node.childNodes;\n for (let i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {\n s += getOuterHTML(child, node, callback);\n }\n return s;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {ensureShadyDataForNode} from './shady-data.js';\n\nexport const InsideDescriptors = utils.getOwnPropertyDescriptors({\n /** @this {Node} */\n get childNodes() {\n return this[utils.SHADY_PREFIX + 'childNodes'];\n },\n\n /** @this {Node} */\n get firstChild() {\n return this[utils.SHADY_PREFIX + 'firstChild'];\n },\n\n /** @this {Node} */\n get lastChild() {\n return this[utils.SHADY_PREFIX + 'lastChild'];\n },\n\n /** @this {Node} */\n get childElementCount() {\n return this[utils.SHADY_PREFIX + 'childElementCount'];\n },\n\n /** @this {Node} */\n get children() {\n return this[utils.SHADY_PREFIX + 'children'];\n },\n\n /** @this {Node} */\n get firstElementChild() {\n return this[utils.SHADY_PREFIX + 'firstElementChild'];\n },\n\n /** @this {Node} */\n get lastElementChild() {\n return this[utils.SHADY_PREFIX + 'lastElementChild'];\n },\n\n /** @this {Node} */\n get shadowRoot() {\n return this[utils.SHADY_PREFIX + 'shadowRoot'];\n },\n});\n\nexport const TextContentInnerHTMLDescriptors = utils.getOwnPropertyDescriptors({\n /** @this {Node} */\n get textContent() {\n return this[utils.SHADY_PREFIX + 'textContent'];\n },\n\n /** @this {Node} */\n set textContent(value) {\n this[utils.SHADY_PREFIX + 'textContent'] = value;\n },\n\n /** @this {Node} */\n get innerHTML() {\n return this[utils.SHADY_PREFIX + 'innerHTML'];\n },\n\n /** @this {Node} */\n set innerHTML(value) {\n this[utils.SHADY_PREFIX + 'innerHTML'] = value;\n },\n});\n\nexport const OutsideDescriptors = utils.getOwnPropertyDescriptors({\n /** @this {Node} */\n get parentElement() {\n return this[utils.SHADY_PREFIX + 'parentElement'];\n },\n\n /** @this {Node} */\n get parentNode() {\n return this[utils.SHADY_PREFIX + 'parentNode'];\n },\n\n /** @this {Node} */\n get nextSibling() {\n return this[utils.SHADY_PREFIX + 'nextSibling'];\n },\n\n /** @this {Node} */\n get previousSibling() {\n return this[utils.SHADY_PREFIX + 'previousSibling'];\n },\n\n /** @this {Node} */\n get nextElementSibling() {\n return this[utils.SHADY_PREFIX + 'nextElementSibling'];\n },\n\n /** @this {Node} */\n get previousElementSibling() {\n return this[utils.SHADY_PREFIX + 'previousElementSibling'];\n },\n\n /** @this {Node} */\n get className() {\n return this[utils.SHADY_PREFIX + 'className'];\n },\n\n /** @this {Node} */\n set className(value) {\n this[utils.SHADY_PREFIX + 'className'] = value;\n },\n});\n\nconst makeNonEnumerable = (descriptors) => {\n for (let prop in descriptors) {\n const descriptor = descriptors[prop];\n // NOTE, the only known reason the descriptor wouldn't exist here is\n // if someone has patched `Object.getOwnPropertyNames`, but we've seen this\n // so this is just to be extra safe.\n if (descriptor) {\n descriptor.enumerable = false;\n }\n }\n};\n\nmakeNonEnumerable(InsideDescriptors);\nmakeNonEnumerable(TextContentInnerHTMLDescriptors);\nmakeNonEnumerable(OutsideDescriptors);\n\nconst noInstancePatching =\n utils.settings.hasDescriptors || utils.settings.noPatch === true;\n\n// ensure an element has patched \"outside\" accessors; no-op when not needed\nexport let patchOutsideElementAccessors = noInstancePatching\n ? function () {}\n : function (element) {\n const sd = ensureShadyDataForNode(element);\n if (!sd.__outsideAccessors) {\n sd.__outsideAccessors = true;\n utils.patchExistingProperties(element, OutsideDescriptors);\n }\n };\n\n// ensure an element has patched \"inside\" accessors; no-op when not needed\nexport let patchInsideElementAccessors = noInstancePatching\n ? function () {}\n : function (element) {\n const sd = ensureShadyDataForNode(element);\n if (!sd.__insideAccessors) {\n sd.__insideAccessors = true;\n utils.patchExistingProperties(element, InsideDescriptors);\n // NOTE: There are compatibility issues with patches for `textContent`\n // and `innerHTML` between CE and SD. Since SD patches are applied\n // via `ShadyDOM.patch` and CE patches are applied as the tree is walked,\n // SD patches overwrite CE patches.\n // * When SD is in patching mode, SD calls through to native\n // methods not patched by CE (since SD is at the bottom) and CE does not\n // upgrade, connect, or disconnect elements. Therefore do *not patch*\n // these accessors in this case.\n // * When SD is in `noPatch` mode, the SD patches call through to\n // \"native\" methods that are patched by CE (since CE is at the bottom).\n // Therefore continue to patch in this case.\n // If the custom elements polyfill is not loaded, then these accessors\n // should be patched so they work correctly.\n if (!utils.hasPolyfilledCustomElements() || utils.settings.noPatch) {\n utils.patchExistingProperties(\n element,\n TextContentInnerHTMLDescriptors\n );\n }\n }\n };\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {flush} from './flush.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from './shady-data.js';\n\n/*\nMake this name unique so it is unlikely to conflict with properties on objects passed to `addEventListener`\nhttps://github.com/webcomponents/shadydom/issues/173\n*/\nconst /** string */ eventWrappersName = `__eventWrappers${Date.now()}`;\n\n/** @type {?function(!Event): boolean} */\nconst composedGetter = (() => {\n const composedProp = Object.getOwnPropertyDescriptor(\n Event.prototype,\n 'composed'\n );\n return composedProp ? (ev) => composedProp.get.call(ev) : null;\n})();\n\nconst supportsEventOptions = (() => {\n let supported = false;\n let eventOptions = {\n get capture() {\n supported = true;\n return false;\n },\n };\n const listener = () => {};\n // NOTE: These will be unpatched at this point.\n window.addEventListener('test', listener, eventOptions);\n window.removeEventListener('test', listener, eventOptions);\n return supported;\n})();\n\nconst parseEventOptions = (optionsOrCapture) => {\n let capture, once, shadyTarget;\n if (\n optionsOrCapture !== null &&\n (typeof optionsOrCapture === 'object' ||\n typeof optionsOrCapture === 'function')\n ) {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n shadyTarget = optionsOrCapture.__shadyTarget;\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n }\n return {\n shadyTarget,\n capture,\n once,\n nativeEventOptions: supportsEventOptions ? optionsOrCapture : capture,\n };\n};\n\n// https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937\nconst alwaysComposed = {\n 'blur': true,\n 'focus': true,\n 'focusin': true,\n 'focusout': true,\n 'click': true,\n 'dblclick': true,\n 'mousedown': true,\n 'mouseenter': true,\n 'mouseleave': true,\n 'mousemove': true,\n 'mouseout': true,\n 'mouseover': true,\n 'mouseup': true,\n 'wheel': true,\n 'beforeinput': true,\n 'input': true,\n 'keydown': true,\n 'keyup': true,\n 'compositionstart': true,\n 'compositionupdate': true,\n 'compositionend': true,\n 'touchstart': true,\n 'touchend': true,\n 'touchmove': true,\n 'touchcancel': true,\n 'pointerover': true,\n 'pointerenter': true,\n 'pointerdown': true,\n 'pointermove': true,\n 'pointerup': true,\n 'pointercancel': true,\n 'pointerout': true,\n 'pointerleave': true,\n 'gotpointercapture': true,\n 'lostpointercapture': true,\n 'dragstart': true,\n 'drag': true,\n 'dragenter': true,\n 'dragleave': true,\n 'dragover': true,\n 'drop': true,\n 'dragend': true,\n 'DOMActivate': true,\n 'DOMFocusIn': true,\n 'DOMFocusOut': true,\n 'keypress': true,\n};\n\nconst unpatchedEvents = {\n 'DOMAttrModified': true,\n 'DOMAttributeNameChanged': true,\n 'DOMCharacterDataModified': true,\n 'DOMElementNameChanged': true,\n 'DOMNodeInserted': true,\n 'DOMNodeInsertedIntoDocument': true,\n 'DOMNodeRemoved': true,\n 'DOMNodeRemovedFromDocument': true,\n 'DOMSubtreeModified': true,\n};\n\n/**\n * Some EventTarget subclasses are not Node subclasses, and you cannot call\n * `getRootNode()` on them.\n *\n * @param {!(Node|EventTarget)} eventTarget\n * @return {!(Node|EventTarget)}\n */\nfunction getRootNodeWithFallback(eventTarget) {\n if (eventTarget instanceof Node) {\n return eventTarget[utils.SHADY_PREFIX + 'getRootNode']();\n } else {\n return eventTarget;\n }\n}\n\nfunction pathComposer(startNode, composed) {\n let composedPath = [];\n let current = startNode;\n let startRoot = getRootNodeWithFallback(startNode);\n while (current) {\n composedPath.push(current);\n if (current[utils.SHADY_PREFIX + 'assignedSlot']) {\n current = current[utils.SHADY_PREFIX + 'assignedSlot'];\n } else if (\n current.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n current.host &&\n (composed || current !== startRoot)\n ) {\n current = current.host;\n } else {\n current = current[utils.SHADY_PREFIX + 'parentNode'];\n }\n }\n // event composedPath includes window when startNode's ownerRoot is document\n if (composedPath[composedPath.length - 1] === document) {\n composedPath.push(window);\n }\n return composedPath;\n}\n\nexport const composedPath = (event) => {\n if (!event.__composedPath) {\n event.__composedPath = pathComposer(event.target, true);\n }\n return event.__composedPath;\n};\n\nfunction retarget(refNode, path) {\n if (!utils.isShadyRoot) {\n return refNode;\n }\n // If ANCESTOR's root is not a shadow root or ANCESTOR's root is BASE's\n // shadow-including inclusive ancestor, return ANCESTOR.\n let refNodePath = pathComposer(refNode, true);\n let p$ = path;\n for (let i = 0, ancestor, lastRoot, root, rootIdx; i < p$.length; i++) {\n ancestor = p$[i];\n root = getRootNodeWithFallback(ancestor);\n if (root !== lastRoot) {\n rootIdx = refNodePath.indexOf(root);\n lastRoot = root;\n }\n if (!utils.isShadyRoot(root) || rootIdx > -1) {\n return ancestor;\n }\n }\n}\n\nlet EventPatches = {\n /**\n * @this {Event}\n */\n get composed() {\n if (this.__composed === undefined) {\n // if there's an original `composed` getter on the Event prototype, use that\n if (composedGetter) {\n // TODO(web-padawan): see https://github.com/webcomponents/shadydom/issues/275\n this.__composed =\n this.type === 'focusin' ||\n this.type === 'focusout' ||\n composedGetter(this);\n // If the event is trusted, or `isTrusted` is not supported, check the list of always composed events\n } else if (this.isTrusted !== false) {\n this.__composed = alwaysComposed[this.type];\n }\n }\n return /** @type {!Event} */ (this).__composed || false;\n },\n\n /**\n * @this {Event}\n */\n composedPath() {\n if (!this.__composedPath) {\n this.__composedPath = pathComposer(this['__target'], this.composed);\n }\n return /** @type {!Event} */ (this).__composedPath;\n },\n\n /**\n * @this {Event}\n */\n get target() {\n return retarget(\n this.currentTarget || this['__previousCurrentTarget'],\n this.composedPath()\n );\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-relatedtarget-retargeting\n /**\n * @this {Event}\n */\n get relatedTarget() {\n if (!this.__relatedTarget) {\n return null;\n }\n if (!this.__relatedTargetComposedPath) {\n this.__relatedTargetComposedPath = pathComposer(\n this.__relatedTarget,\n true\n );\n }\n // find the deepest node in relatedTarget composed path that is in the same root with the currentTarget\n return retarget(\n this.currentTarget || this['__previousCurrentTarget'],\n /** @type {!Event} */ (this).__relatedTargetComposedPath\n );\n },\n /**\n * @this {Event}\n */\n stopPropagation() {\n Event.prototype.stopPropagation.call(this);\n this.__propagationStopped = true;\n },\n /**\n * @this {Event}\n */\n stopImmediatePropagation() {\n Event.prototype.stopImmediatePropagation.call(this);\n this.__immediatePropagationStopped = true;\n this.__propagationStopped = true;\n },\n};\n\n// Some browsers have missing or broken descriptors. If this is the case\n// eventPhase can't be polyfilled. For example, Chrome 41 does not\n// have prototypical descriptors on DOM objects and Safari 9 has broken ones\n// that cannot be used.\nconst eventPhaseDescriptor =\n utils.settings.hasDescriptors &&\n Object.getOwnPropertyDescriptor(Event.prototype, 'eventPhase');\nif (eventPhaseDescriptor) {\n Object.defineProperty(\n EventPatches,\n 'eventPhase',\n /** @type {!ObjectPropertyDescriptor<!Event>} */ ({\n /**\n * @this {Event}\n */\n get() {\n return this.currentTarget === this.target\n ? Event.AT_TARGET\n : this[utils.NATIVE_PREFIX + 'eventPhase'];\n },\n enumerable: true,\n configurable: true,\n })\n );\n\n Object.defineProperty(\n EventPatches,\n utils.NATIVE_PREFIX + 'eventPhase',\n eventPhaseDescriptor\n );\n}\n\nfunction mixinComposedFlag(Base) {\n // NOTE: avoiding use of `class` here so that transpiled output does not\n // try to do `Base.call` with a dom construtor.\n let klazz = function (type, options) {\n let event = new Base(type, options);\n event.__composed = options && Boolean(options['composed']);\n return event;\n };\n // put constructor properties on subclass\n klazz.__proto__ = Base;\n klazz.prototype = Base.prototype;\n return klazz;\n}\n\nlet nonBubblingEventsToRetarget = {\n 'focus': true,\n 'blur': true,\n};\n\n/**\n * Check if the event has been retargeted by comparing original `target`, and calculated `target`\n * @param {Event} event\n * @return {boolean} True if the original target and calculated target are the same\n */\nfunction hasRetargeted(event) {\n return (\n event['__target'] !== event.target ||\n event.__relatedTarget !== event.relatedTarget\n );\n}\n\n/**\n *\n * @param {Event} event\n * @param {Node} node\n * @param {string} phase\n */\nfunction fireHandlers(event, node, phase) {\n let hs =\n node.__handlers &&\n node.__handlers[event.type] &&\n node.__handlers[event.type][phase];\n if (hs) {\n for (let i = 0, fn; (fn = hs[i]); i++) {\n if (hasRetargeted(event) && event.target === event.relatedTarget) {\n return;\n }\n fn.call(node, event);\n if (event.__immediatePropagationStopped) {\n return;\n }\n }\n }\n}\n\n// In Chrome 41, `currentTarget` is an own property of every `Event` and its\n// descriptor is a _data_ descriptor and not an accessor descriptor (so there is\n// no getter that could be saved and wrapped) but the browser effectively treats\n// this property as if it had a getter and returns different values on getting\n// as necessary. Further, setting a new descriptor for `currentTarget`, as\n// `shadyDispatchEvent` does below, permanently breaks this special descriptor\n// behavior. In this case, `shadyDispatchEvent` creates a new object with the\n// original event as its prototype (via `Object.create`) and modifies that\n// object's `currentTarget` instead, to avoid breaking the descriptor on the\n// original event.\n//\n// In Chrome 104 and Safari 9, some getters on events do not allow `this` to be\n// anything other than exactly the original event object. This means that the\n// above process of using a proxy-like (not a `Proxy`) object for the event\n// fails because any user that attempts to use properties of the original event\n// will be using the proxy as `this`.\n//\n// Fortunately, these two issues seem to be mutually exclusive amongst the\n// browsers that we test on, so we can specifically check if `currentTarget`\n// exists on a new `Event` and switch based off of that.\n// `utils.settings.hasDescriptors` is not sufficient for deciding this behavior\n// because, in Safari 9, `currentTarget` is not an own property of events, but\n// `.hasDescriptors` is still false.\nconst shadyDispatchEventNeedsProxyEvent = new Event('e').hasOwnProperty(\n 'currentTarget'\n);\n\nfunction shadyDispatchEvent(originalEvent) {\n const e = shadyDispatchEventNeedsProxyEvent\n ? Object.create(originalEvent)\n : originalEvent;\n const path = e.composedPath();\n const retargetedPath = path.map((node) => retarget(node, path));\n const bubbles = e.bubbles;\n\n let currentTarget;\n // override `currentTarget` to let patched `target` calculate correctly\n const prevCurrentTargetDesc = Object.getOwnPropertyDescriptor(\n e,\n 'currentTarget'\n );\n Object.defineProperty(e, 'currentTarget', {\n configurable: true,\n enumerable: true,\n get: function () {\n return currentTarget;\n },\n });\n\n let eventPhase = Event.CAPTURING_PHASE;\n const prevEventPhaseDesc = Object.getOwnPropertyDescriptor(e, 'eventPhase');\n Object.defineProperty(e, 'eventPhase', {\n configurable: true,\n enumerable: true,\n get: function () {\n return eventPhase;\n },\n });\n\n try {\n for (let i = path.length - 1; i >= 0; i--) {\n currentTarget = path[i];\n eventPhase =\n currentTarget === retargetedPath[i]\n ? Event.AT_TARGET\n : Event.CAPTURING_PHASE;\n // capture phase fires all capture handlers\n fireHandlers(e, currentTarget, 'capture');\n if (e.__propagationStopped) {\n return;\n }\n }\n\n for (let i = 0; i < path.length; i++) {\n currentTarget = path[i];\n const atTarget = currentTarget === retargetedPath[i];\n if (atTarget || bubbles) {\n eventPhase = atTarget ? Event.AT_TARGET : Event.BUBBLING_PHASE;\n fireHandlers(e, currentTarget, 'bubble');\n if (e.__propagationStopped) {\n return;\n }\n }\n }\n } finally {\n if (!shadyDispatchEventNeedsProxyEvent) {\n // Restore previous currentTarget & eventPhase descriptors when\n // dispatching is complete\n if (prevCurrentTargetDesc) {\n Object.defineProperty(e, 'currentTarget', prevCurrentTargetDesc);\n } else {\n delete e['currentTarget'];\n }\n if (prevEventPhaseDesc) {\n Object.defineProperty(e, 'eventPhase', prevEventPhaseDesc);\n } else {\n delete e['eventPhase'];\n }\n }\n }\n}\n\nfunction listenerSettingsEqual(savedListener, node, type, capture) {\n let {node: savedNode, type: savedType, capture: savedCapture} = savedListener;\n return node === savedNode && type === savedType && capture === savedCapture;\n}\n\nexport function findListener(wrappers, node, type, capture) {\n for (let i = 0; i < wrappers.length; i++) {\n if (listenerSettingsEqual(wrappers[i], node, type, capture)) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Firefox can throw on accessing eventWrappers inside of `removeEventListener` during a selenium run\n * Try/Catch accessing eventWrappers to work around\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1353074\n */\nfunction getEventWrappers(eventLike) {\n let wrappers = null;\n try {\n wrappers = eventLike[eventWrappersName];\n } catch (e) {} // eslint-disable-line no-empty\n return wrappers;\n}\n\nfunction targetNeedsPathCheck(node) {\n return utils.isShadyRoot(node) || node.localName === 'slot';\n}\n\n/** @this {Node} */\nexport function dispatchEvent(event) {\n flush();\n // If the target is disconnected from the real document, it might still be\n // connected in the user-facing tree. To allow its path to potentially\n // include both connected and disconnected parts, dispatch it manually.\n if (\n !utils.settings.preferPerformance &&\n this instanceof Node &&\n !utils.documentContains(document, this)\n ) {\n if (!event['__target']) {\n patchEvent(event, this);\n }\n return shadyDispatchEvent(event);\n } else {\n return this[utils.NATIVE_PREFIX + 'dispatchEvent'](event);\n }\n}\n\n/**\n * @this {EventTarget}\n */\nexport function addEventListener(type, fnOrObj, optionsOrCapture) {\n const {capture, once, shadyTarget, nativeEventOptions} = parseEventOptions(\n optionsOrCapture\n );\n if (!fnOrObj) {\n return;\n }\n\n const handlerType = typeof fnOrObj;\n\n // bail if `fnOrObj` is not a function, not an object\n if (handlerType !== 'function' && handlerType !== 'object') {\n return;\n }\n\n // bail if `fnOrObj` is an object without a `handleEvent` method\n if (\n handlerType === 'object' &&\n (!fnOrObj.handleEvent || typeof fnOrObj.handleEvent !== 'function')\n ) {\n return;\n }\n\n if (unpatchedEvents[type]) {\n return this[utils.NATIVE_PREFIX + 'addEventListener'](\n type,\n fnOrObj,\n nativeEventOptions\n );\n }\n\n // hack to let ShadyRoots have event listeners\n // event listener will be on host, but `currentTarget`\n // will be set to shadyroot for event listener\n let target = shadyTarget || this;\n\n let wrappers = fnOrObj[eventWrappersName];\n if (wrappers) {\n // The callback `fn` might be used for multiple nodes/events. Since we generate\n // a wrapper function, we need to keep track of it when we remove the listener.\n // It's more efficient to store the node/type/options information as Array in\n // `fn` itself rather than the node (we assume that the same callback is used\n // for few nodes at most, whereas a node will likely have many event listeners).\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n // Stop if the wrapper function has already been created.\n if (findListener(wrappers, target, type, capture) > -1) {\n return;\n }\n } else {\n fnOrObj[eventWrappersName] = [];\n }\n\n /**\n * @this {EventTarget}\n * @param {Event} e\n */\n const wrapperFn = (e) => {\n // Support `once` option.\n if (once) {\n this[utils.SHADY_PREFIX + 'removeEventListener'](\n type,\n fnOrObj,\n optionsOrCapture\n );\n }\n if (!e['__target']) {\n patchEvent(e);\n }\n let lastCurrentTargetDesc;\n let lastEventPhaseDesc;\n if (target !== this) {\n // replace `currentTarget` to make `target` and `relatedTarget` correct for inside the shadowroot\n lastCurrentTargetDesc = Object.getOwnPropertyDescriptor(\n e,\n 'currentTarget'\n );\n Object.defineProperty(e, 'currentTarget', {\n get() {\n return target;\n },\n configurable: true,\n });\n lastEventPhaseDesc = Object.getOwnPropertyDescriptor(e, 'eventPhase');\n Object.defineProperty(e, 'eventPhase', {\n configurable: true,\n enumerable: true,\n get() {\n // Shady DOM doesn't support dispatching to a shadow root as the\n // target, so we don't need to handle Event.AT_TARGET.\n return capture ? Event.CAPTURING_PHASE : Event.BUBBLING_PHASE;\n },\n });\n }\n e['__previousCurrentTarget'] = e['currentTarget'];\n // Always check if a shadowRoot or slot is in the current event path.\n // If it is not, the event was generated on either the host of the shadowRoot\n // or a children of the host.\n if (\n targetNeedsPathCheck(target) &&\n e.composedPath().indexOf(target) == -1\n ) {\n return;\n }\n // There are two critera that should stop events from firing on this node\n // 1. the event is not composed and the current node is not in the same root as the target\n // 2. when bubbling, if after retargeting, relatedTarget and target point to the same node\n if (e.composed || e.composedPath().indexOf(target) > -1) {\n if (hasRetargeted(e) && e.target === e.relatedTarget) {\n if (e.eventPhase === Event.BUBBLING_PHASE) {\n e.stopImmediatePropagation();\n }\n return;\n }\n // prevent non-bubbling events from triggering bubbling handlers on shadowroot, but only if not in capture phase\n if (\n e.eventPhase !== Event.CAPTURING_PHASE &&\n !e.bubbles &&\n e.target !== target &&\n !(target instanceof Window)\n ) {\n return;\n }\n let ret =\n handlerType === 'function'\n ? fnOrObj.call(target, e)\n : fnOrObj.handleEvent && fnOrObj.handleEvent(e);\n if (target !== this) {\n // Replace the original descriptors for `currentTarget` and `eventPhase`.\n if (lastCurrentTargetDesc) {\n Object.defineProperty(e, 'currentTarget', lastCurrentTargetDesc);\n lastCurrentTargetDesc = null;\n } else {\n delete e['currentTarget'];\n }\n if (lastEventPhaseDesc) {\n Object.defineProperty(e, 'eventPhase', lastEventPhaseDesc);\n lastEventPhaseDesc = null;\n } else {\n delete e['eventPhase'];\n }\n }\n return ret;\n }\n };\n\n // Store the wrapper information.\n fnOrObj[eventWrappersName].push({\n // note: use target here which is either a shadowRoot\n // (when the host element is proxy'ing the event) or this element\n node: target,\n type,\n capture,\n wrapperFn,\n });\n\n this.__handlers = this.__handlers || {};\n this.__handlers[type] = this.__handlers[type] || {\n 'capture': [],\n 'bubble': [],\n };\n this.__handlers[type][capture ? 'capture' : 'bubble'].push(wrapperFn);\n\n if (!nonBubblingEventsToRetarget[type]) {\n this[utils.NATIVE_PREFIX + 'addEventListener'](\n type,\n wrapperFn,\n nativeEventOptions\n );\n }\n}\n\n/**\n * @this {EventTarget}\n */\nexport function removeEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n const {capture, shadyTarget, nativeEventOptions} = parseEventOptions(\n optionsOrCapture\n );\n if (unpatchedEvents[type]) {\n return this[utils.NATIVE_PREFIX + 'removeEventListener'](\n type,\n fnOrObj,\n nativeEventOptions\n );\n }\n let target = shadyTarget || this;\n // Search the wrapped function.\n let wrapperFn = undefined;\n let wrappers = getEventWrappers(fnOrObj);\n if (wrappers) {\n let idx = findListener(wrappers, target, type, capture);\n if (idx > -1) {\n wrapperFn = wrappers.splice(idx, 1)[0].wrapperFn;\n // Cleanup.\n if (!wrappers.length) {\n fnOrObj[eventWrappersName] = undefined;\n }\n }\n }\n this[utils.NATIVE_PREFIX + 'removeEventListener'](\n type,\n wrapperFn || fnOrObj,\n nativeEventOptions\n );\n if (wrapperFn && this.__handlers && this.__handlers[type]) {\n const arr = this.__handlers[type][capture ? 'capture' : 'bubble'];\n const idx = arr.indexOf(wrapperFn);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n }\n}\n\nfunction activateFocusEventOverrides() {\n for (let ev in nonBubblingEventsToRetarget) {\n window[utils.NATIVE_PREFIX + 'addEventListener'](\n ev,\n function (e) {\n if (!e['__target']) {\n patchEvent(e);\n shadyDispatchEvent(e);\n }\n },\n true\n );\n }\n}\n\nconst EventPatchesDescriptors = utils.getOwnPropertyDescriptors(EventPatches);\n\nconst SHADY_PROTO = '__shady_patchedProto';\nconst SHADY_SOURCE_PROTO = '__shady_sourceProto';\n\nfunction patchEvent(event, target = event.target) {\n event['__target'] = target;\n event.__relatedTarget = event.relatedTarget;\n // attempt to patch prototype (via cache)\n if (utils.settings.hasDescriptors) {\n const proto = Object.getPrototypeOf(event);\n // eslint-disable-next-line no-prototype-builtins\n if (!proto.hasOwnProperty(SHADY_PROTO)) {\n const patchedProto = Object.create(proto);\n patchedProto[SHADY_SOURCE_PROTO] = proto;\n utils.patchProperties(patchedProto, EventPatchesDescriptors);\n proto[SHADY_PROTO] = patchedProto;\n }\n event.__proto__ = proto[SHADY_PROTO];\n // and fallback to patching instance\n } else {\n utils.patchProperties(event, EventPatchesDescriptors);\n }\n}\n\nlet PatchedEvent = mixinComposedFlag(Event);\nlet PatchedCustomEvent = mixinComposedFlag(CustomEvent);\nlet PatchedMouseEvent = mixinComposedFlag(MouseEvent);\n\nexport function patchEvents() {\n activateFocusEventOverrides();\n window.Event = PatchedEvent;\n window.CustomEvent = PatchedCustomEvent;\n window.MouseEvent = PatchedMouseEvent;\n}\n\nexport function patchClick() {\n // Fix up `Element.prototype.click()` if `isTrusted` is supported, but `composed` isn't\n if (\n !composedGetter &&\n Object.getOwnPropertyDescriptor(Event.prototype, 'isTrusted')\n ) {\n /** @this {Element} */\n const composedClickFn = function () {\n const ev = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n composed: true,\n });\n this[utils.SHADY_PREFIX + 'dispatchEvent'](ev);\n };\n if (Element.prototype.click) {\n Element.prototype.click = composedClickFn;\n } else if (HTMLElement.prototype.click) {\n HTMLElement.prototype.click = composedClickFn;\n }\n }\n}\n\nexport const eventPropertyNamesForElement = Object.getOwnPropertyNames(\n Element.prototype\n).filter((name) => name.substring(0, 2) === 'on');\n\nexport const eventPropertyNamesForHTMLElement = Object.getOwnPropertyNames(\n HTMLElement.prototype\n).filter((name) => name.substring(0, 2) === 'on');\n\n/**\n * @param {string} property\n * @return {!ObjectPropertyDescriptor<Element>}\n */\nexport const wrappedDescriptorForEventProperty = (property) => {\n return {\n /** @this {Element} */\n set: function (fn) {\n const shadyData = ensureShadyDataForNode(this);\n const eventName = property.substring(2);\n if (!shadyData.__onCallbackListeners) {\n shadyData.__onCallbackListeners = {};\n }\n shadyData.__onCallbackListeners[property] &&\n this.removeEventListener(\n eventName,\n shadyData.__onCallbackListeners[property]\n );\n this[utils.SHADY_PREFIX + 'addEventListener'](eventName, fn);\n shadyData.__onCallbackListeners[property] = fn;\n },\n /** @this {Element} */\n get() {\n const shadyData = shadyDataForNode(this);\n return (\n shadyData &&\n shadyData.__onCallbackListeners &&\n shadyData.__onCallbackListeners[property]\n );\n },\n configurable: true,\n };\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nfunction newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount,\n };\n}\n\nconst EDIT_LEAVE = 0;\nconst EDIT_UPDATE = 1;\nconst EDIT_ADD = 2;\nconst EDIT_DELETE = 3;\n\n// Note: This function is *based* on the computation of the Levenshtein\n// \"edit\" distance. The one change is that \"updates\" are treated as two\n// edits - not one. With Array splices, an update is really a delete\n// followed by an add. By retaining this, we optimize for \"keeping\" the\n// maximum array items in the original array. For example:\n//\n// 'xxxx123' -> '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(\n current,\n currentStart,\n currentEnd,\n old,\n oldStart,\n oldEnd\n) {\n // \"Deletion\" columns\n let rowCount = oldEnd - oldStart + 1;\n let columnCount = currentEnd - currentStart + 1;\n let distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (let i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (let j = 0; j < columnCount; j++) {\n distances[0][j] = j;\n }\n\n for (let i = 1; i < rowCount; i++) {\n for (let j = 1; j < columnCount; j++) {\n if (equals(current[currentStart + j - 1], old[oldStart + i - 1])) {\n distances[i][j] = distances[i - 1][j - 1];\n } else {\n let north = distances[i - 1][j] + 1;\n let west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n}\n\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n let i = distances.length - 1;\n let j = distances[0].length - 1;\n let current = distances[i][j];\n let edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n let northWest = distances[i - 1][j - 1];\n let west = distances[i - 1][j];\n let north = distances[i][j - 1];\n\n let min;\n if (west < north) {\n min = west < northWest ? west : northWest;\n } else {\n min = north < northWest ? north : northWest;\n }\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n}\n\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n/**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\nfunction calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n let prefixCount = 0;\n let suffixCount = 0;\n let splice;\n\n let minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0) {\n prefixCount = sharedPrefix(current, old, minLength);\n }\n\n if (currentEnd == current.length && oldEnd == old.length) {\n suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n }\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) {\n return [];\n }\n\n if (currentStart == currentEnd) {\n splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd) {\n splice.removed.push(old[oldStart++]);\n }\n\n return [splice];\n } else if (oldStart == oldEnd) {\n return [newSplice(currentStart, [], currentEnd - currentStart)];\n }\n\n let ops = spliceOperationsFromEditDistances(\n calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd)\n );\n\n splice = undefined;\n let splices = [];\n let index = currentStart;\n let oldIndex = oldStart;\n for (let i = 0; i < ops.length; i++) {\n switch (ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n}\n\nfunction sharedPrefix(current, old, searchLength) {\n for (let i = 0; i < searchLength; i++) {\n if (!equals(current[i], old[i])) {\n return i;\n }\n }\n return searchLength;\n}\n\nfunction sharedSuffix(current, old, searchLength) {\n let index1 = current.length;\n let index2 = old.length;\n let count = 0;\n while (count < searchLength && equals(current[--index1], old[--index2])) {\n count++;\n }\n\n return count;\n}\n\nfunction equals(currentValue, previousValue) {\n return currentValue === previousValue;\n}\n\nexport function calculateSplices(current, previous) {\n return calcSplices(current, 0, current.length, previous, 0, previous.length);\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n// prettier-ignore\nimport {addEventListener, removeEventListener, dispatchEvent} from '../patch-events.js';\n\nexport const EventTargetPatches = utils.getOwnPropertyDescriptors({\n dispatchEvent,\n\n addEventListener,\n\n removeEventListener,\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\n\nlet scopingShim = null;\n\nexport function getScopingShim() {\n if (!scopingShim) {\n scopingShim = window['ShadyCSS'] && window['ShadyCSS']['ScopingShim'];\n }\n return scopingShim || null;\n}\n\n/**\n * @param {!Node} node\n * @param {string} attr\n * @param {string} value\n */\nexport function scopeClassAttribute(node, attr, value) {\n const scopingShim = getScopingShim();\n if (scopingShim && attr === 'class') {\n scopingShim['setElementClass'](node, value);\n return true;\n }\n return false;\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n */\nexport function addShadyScoping(node, newScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n scopingShim['scopeNode'](node, newScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} currentScopeName\n */\nexport function removeShadyScoping(node, currentScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n scopingShim['unscopeNode'](node, currentScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n * @param {string} oldScopeName\n */\nexport function replaceShadyScoping(node, newScopeName, oldScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n if (oldScopeName) {\n removeShadyScoping(node, oldScopeName);\n }\n addShadyScoping(node, newScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n * @return {boolean}\n */\nexport function currentScopeIsCorrect(node, newScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return true;\n }\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // NOTE: as an optimization, only check that all the top-level children\n // have the correct scope.\n let correctScope = true;\n for (\n let n = node[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n correctScope = correctScope && currentScopeIsCorrect(n, newScopeName);\n }\n return correctScope;\n }\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n const currentScope = scopingShim['currentScopeForNode'](node);\n return currentScope === newScopeName;\n}\n\n/**\n * @param {!Node} node\n * @return {string}\n */\nexport function currentScopeForNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return '';\n }\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return '';\n }\n return scopingShim['currentScopeForNode'](node);\n}\n\n/**\n * Walk over a node's tree and apply visitorFn to each element node\n *\n * @param {Node} node\n * @param {function(!Node):void} visitorFn\n */\nexport function treeVisitor(node, visitorFn) {\n if (!node) {\n return;\n }\n // this check is necessary if `node` is a Document Fragment\n if (node.nodeType === Node.ELEMENT_NODE) {\n visitorFn(node);\n }\n for (\n let n = node[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n if (n.nodeType === Node.ELEMENT_NODE) {\n treeVisitor(n, visitorFn);\n }\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n// prettier-ignore\nimport {getScopingShim, removeShadyScoping, replaceShadyScoping, treeVisitor, currentScopeForNode, currentScopeIsCorrect} from '../style-scoping.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from '../shady-data.js';\nimport {recordInsertBefore, recordRemoveChild} from '../link-nodes.js';\nimport {ownerShadyRootForNode} from '../attach-shadow.js';\n\nconst doc = window.document;\n\nconst preferPerformance = utils.settings.preferPerformance;\n\nconst nativeIsConnectedAccessors = /** @type {ObjectPropertyDescriptor} */ (Object.getOwnPropertyDescriptor(\n Node.prototype,\n 'isConnected'\n));\n\nconst nativeIsConnected =\n nativeIsConnectedAccessors && nativeIsConnectedAccessors.get;\n\nexport function clearNode(node) {\n let firstChild;\n while ((firstChild = node[utils.SHADY_PREFIX + 'firstChild'])) {\n node[utils.SHADY_PREFIX + 'removeChild'](firstChild);\n }\n}\n\nfunction removeOwnerShadyRoot(node) {\n // optimization: only reset the tree if node is actually in a root\n if (hasCachedOwnerRoot(node)) {\n for (\n let n = node[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n removeOwnerShadyRoot(n);\n }\n }\n const nodeData = shadyDataForNode(node);\n if (nodeData) {\n nodeData.ownerShadyRoot = undefined;\n }\n}\n\nfunction hasCachedOwnerRoot(node) {\n const nodeData = shadyDataForNode(node);\n return Boolean(nodeData && nodeData.ownerShadyRoot !== undefined);\n}\n\n/**\n * Finds the first flattened node that is composed in the node's parent.\n * If the given node is a slot, then the first flattened node is returned\n * if it exists, otherwise advance to the node's nextSibling.\n * @param {Node} node within which to find first composed node\n * @returns {Node} first composed node\n */\nfunction firstComposedNode(node) {\n let composed = node;\n if (node && node.localName === 'slot') {\n const nodeData = shadyDataForNode(node);\n const flattened = nodeData && nodeData.flattenedNodes;\n // Note, if `flattened` is falsey, it means that the containing shadowRoot\n // has not rendered and therefore the `<slot>` is still in the composed\n // DOM. If that's the case the `<slot>` is the first composed node.\n if (flattened) {\n composed = flattened.length\n ? flattened[0]\n : firstComposedNode(node[utils.SHADY_PREFIX + 'nextSibling']);\n }\n }\n return composed;\n}\n\n/**\n * @param {Node} node\n * @param {Node=} addedNode\n * @param {Node=} removedNode\n */\nfunction scheduleObserver(node, addedNode, removedNode) {\n const nodeData = shadyDataForNode(node);\n const observer = nodeData && nodeData.observer;\n if (observer) {\n if (addedNode) {\n if (addedNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n for (let i = 0, l = addedNode.childNodes.length; i < l; i++) {\n observer.addedNodes.push(addedNode.childNodes[i]);\n }\n } else {\n observer.addedNodes.push(addedNode);\n }\n }\n if (removedNode) {\n observer.removedNodes.push(removedNode);\n }\n observer.schedule();\n }\n}\n\nexport const NodePatches = utils.getOwnPropertyDescriptors({\n /** @this {Node} */\n get parentNode() {\n const nodeData = shadyDataForNode(this);\n const l = nodeData && nodeData.parentNode;\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'parentNode'];\n },\n\n /** @this {Node} */\n get firstChild() {\n const nodeData = shadyDataForNode(this);\n const l = nodeData && nodeData.firstChild;\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'firstChild'];\n },\n\n /** @this {Node} */\n get lastChild() {\n const nodeData = shadyDataForNode(this);\n const l = nodeData && nodeData.lastChild;\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'lastChild'];\n },\n\n /** @this {Node} */\n get nextSibling() {\n const nodeData = shadyDataForNode(this);\n const l = nodeData && nodeData.nextSibling;\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'nextSibling'];\n },\n\n /** @this {Node} */\n get previousSibling() {\n const nodeData = shadyDataForNode(this);\n const l = nodeData && nodeData.previousSibling;\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'previousSibling'];\n },\n\n /** @this {Node} */\n get childNodes() {\n let childNodes;\n if (utils.isTrackingLogicalChildNodes(this)) {\n const nodeData = shadyDataForNode(this);\n if (!nodeData.childNodes) {\n nodeData.childNodes = [];\n for (\n let n = this[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n nodeData.childNodes.push(n);\n }\n }\n childNodes = nodeData.childNodes;\n } else {\n childNodes = this[utils.NATIVE_PREFIX + 'childNodes'];\n }\n childNodes.item = function (index) {\n return childNodes[index];\n };\n return childNodes;\n },\n\n /** @this {Node} */\n get parentElement() {\n const nodeData = shadyDataForNode(this);\n let l = nodeData && nodeData.parentNode;\n if (l && l.nodeType !== Node.ELEMENT_NODE) {\n l = null;\n }\n return l !== undefined ? l : this[utils.NATIVE_PREFIX + 'parentElement'];\n },\n\n /** @this {Node} */\n get isConnected() {\n if (nativeIsConnected && nativeIsConnected.call(this)) {\n return true;\n }\n if (this.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {\n return false;\n }\n // Fast path for distributed nodes.\n const ownerDocument = this.ownerDocument;\n if (ownerDocument === null || utils.documentContains(ownerDocument, this)) {\n return true;\n }\n // Slow path for non-distributed nodes.\n let node = this;\n while (node && !(node instanceof Document)) {\n node =\n node[utils.SHADY_PREFIX + 'parentNode'] ||\n (utils.isShadyRoot(node)\n ? /** @type {ShadowRoot} */ (node).host\n : undefined);\n }\n return !!(node && node instanceof Document);\n },\n\n /** @this {Node} */\n get textContent() {\n if (utils.isTrackingLogicalChildNodes(this)) {\n let tc = [];\n for (\n let n = this[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n if (n.nodeType !== Node.COMMENT_NODE) {\n tc.push(n[utils.SHADY_PREFIX + 'textContent']);\n }\n }\n return tc.join('');\n } else {\n return this[utils.NATIVE_PREFIX + 'textContent'];\n }\n },\n\n /**\n * @this {Node}\n * @param {string} value\n */\n set textContent(value) {\n if (typeof value === 'undefined' || value === null) {\n value = '';\n }\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n if (\n !utils.isTrackingLogicalChildNodes(this) &&\n utils.settings.hasDescriptors\n ) {\n // may be removing a nested slot but fast path if we know we are not.\n const firstChild = this[utils.SHADY_PREFIX + 'firstChild'];\n if (\n firstChild != this[utils.SHADY_PREFIX + 'lastChild'] ||\n (firstChild && firstChild.nodeType != Node.TEXT_NODE)\n ) {\n clearNode(this);\n }\n this[utils.NATIVE_PREFIX + 'textContent'] = value;\n } else {\n clearNode(this);\n // Document fragments must have no childNodes if setting a blank string\n if (value.length > 0 || this.nodeType === Node.ELEMENT_NODE) {\n this[utils.SHADY_PREFIX + 'insertBefore'](\n document.createTextNode(value)\n );\n }\n }\n break;\n default:\n // Note, be wary of patching `nodeValue`.\n this.nodeValue = value;\n break;\n }\n },\n\n // Patched `insertBefore`. Note that all mutations that add nodes are routed\n // here. When a <slot> is added or a node is added to a host with a shadowRoot\n // with a slot, a standard dom `insert` call is aborted and `_asyncRender`\n // is called on the relevant shadowRoot. In all other cases, a standard dom\n // `insert` can be made, but the location and ref_node may need to be changed.\n /**\n * @this {Node}\n * @param {Node} node\n * @param {Node=} ref_node\n */\n insertBefore(node, ref_node) {\n // optimization: assume native insertBefore is ok if the nodes are not in the document.\n if (this.ownerDocument !== doc && node.ownerDocument !== doc) {\n this[utils.NATIVE_PREFIX + 'insertBefore'](node, ref_node);\n return node;\n }\n if (node === this) {\n throw Error(\n `Failed to execute 'appendChild' on 'Node': The new child element contains the parent.`\n );\n }\n if (ref_node) {\n const refData = shadyDataForNode(ref_node);\n const p = refData && refData.parentNode;\n if (\n (p !== undefined && p !== this) ||\n (p === undefined &&\n ref_node[utils.NATIVE_PREFIX + 'parentNode'] !== this)\n ) {\n throw Error(\n `Failed to execute 'insertBefore' on 'Node': The node ` +\n `before which the new node is to be inserted is not a child of this node.`\n );\n }\n }\n if (ref_node === node) {\n return node;\n }\n scheduleObserver(this, node);\n /** @type {!Array<!HTMLSlotElement>} */\n const slotsAdded = [];\n const ownerRoot = ownerShadyRootForNode(this);\n /** @type {string} */\n const newScopeName = ownerRoot\n ? ownerRoot.host.localName\n : currentScopeForNode(this);\n /** @type {string} */\n let oldScopeName;\n // remove from existing location\n const parentNode = node[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode) {\n oldScopeName = currentScopeForNode(node);\n const skipUnscoping =\n // Don't remove scoping if we're inserting into another shadowRoot;\n // this would be unnecessary since it will be re-scoped below\n Boolean(ownerRoot) ||\n // Don't remove scoping if we're being moved between non-shadowRoot\n // locations (the likely case is when moving pre-scoped nodes in a template)\n !ownerShadyRootForNode(node) ||\n // Under preferPerformance, don't remove scoping when moving back into\n // a document fragment that was previously scoped; the assumption is\n // that the user should only move correctly-scoped DOM back into it\n (preferPerformance && this['__noInsertionPoint'] !== undefined);\n parentNode[utils.SHADY_PREFIX + 'removeChild'](node, skipUnscoping);\n }\n // add to new parent\n let allowNativeInsert = true;\n const needsScoping =\n (!preferPerformance ||\n // Under preferPerformance, only re-scope if we're not coming from a\n // pre-scoped doc fragment or back into a pre-scoped doc fragment\n (node['__noInsertionPoint'] === undefined &&\n this['__noInsertionPoint'] === undefined)) &&\n !currentScopeIsCorrect(node, newScopeName);\n const needsSlotFinding =\n ownerRoot &&\n !node['__noInsertionPoint'] &&\n (!preferPerformance || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);\n if (needsSlotFinding || needsScoping) {\n // NOTE: avoid node.removeChild as this *can* trigger another patched\n // method (e.g. custom elements) and we want only the shady method to run.\n // The following table describes what style scoping actions should happen as a result of this insertion.\n // document -> shadowRoot: replace\n // shadowRoot -> shadowRoot: replace\n // shadowRoot -> shadowRoot of same type: do nothing\n // shadowRoot -> document: allow unscoping\n // document -> document: do nothing\n // The \"same type of shadowRoot\" and \"document to document cases rely on `currentScopeIsCorrect` returning true\n if (needsScoping) {\n // in a document or disconnected tree, replace scoping if necessary\n oldScopeName = oldScopeName || currentScopeForNode(node);\n }\n treeVisitor(node, (node) => {\n if (needsSlotFinding && node.localName === 'slot') {\n slotsAdded.push(/** @type {!HTMLSlotElement} */ (node));\n }\n if (needsScoping) {\n replaceShadyScoping(node, newScopeName, oldScopeName);\n }\n });\n }\n // if a slot is added, must render containing root.\n if (slotsAdded.length) {\n ownerRoot._addSlots(slotsAdded);\n ownerRoot._asyncRender();\n }\n if (utils.isTrackingLogicalChildNodes(this)) {\n recordInsertBefore(node, this, ref_node);\n const parentData = shadyDataForNode(this);\n // if the node being inserted into has a shadowRoot, do not perform\n // a native insertion\n if (parentData.root) {\n allowNativeInsert = false;\n // when inserting into a host with a shadowRoot with slot, use\n // `shadowRoot._asyncRender()` via `attach-shadow` module\n // when inserting into a host with shadowRoot with NO slot, do nothing\n // as the node should not be added to composed DOM anywhere.\n if (utils.hasShadowRootWithSlot(this)) {\n parentData.root._asyncRender();\n }\n }\n // when inserting into a slot inside a shadowRoot, render the\n // containing shadowRoot to update fallback content.\n else if (ownerRoot && this.localName === 'slot') {\n allowNativeInsert = false;\n ownerRoot._asyncRender();\n }\n }\n if (allowNativeInsert) {\n // if adding to a shadyRoot, add to host instead\n let container = utils.isShadyRoot(this)\n ? /** @type {ShadowRoot} */ (this).host\n : this;\n // if ref_node, get the ref_node that's actually in composed dom.\n if (ref_node) {\n ref_node = firstComposedNode(ref_node);\n container[utils.NATIVE_PREFIX + 'insertBefore'](node, ref_node);\n } else {\n container[utils.NATIVE_PREFIX + 'appendChild'](node);\n }\n }\n // Since ownerDocument is not patched, it can be incorrect after this call\n // if the node is physically appended via distribution. This can result\n // in the custom elements polyfill not upgrading the node if it's in an inert doc.\n // We correct this by calling `adoptNode`.\n else if (node.ownerDocument !== this.ownerDocument) {\n this.ownerDocument.adoptNode(node);\n }\n return node;\n },\n\n /**\n * @this {Node}\n * @param {Node} node\n */\n appendChild(node) {\n // if this is a shadowRoot and the shadowRoot is passed as `node`\n // then an optimized append has already been performed, so do nothing.\n if (!(this == node && utils.isShadyRoot(node))) {\n return this[utils.SHADY_PREFIX + 'insertBefore'](node);\n }\n },\n\n /**\n * Patched `removeChild`. Note that all dom \"removals\" are routed here.\n * Removes the given `node` from the element's `children`.\n * This method also performs dom composition.\n * @this {Node}\n * @param {Node} node\n * @param {boolean=} skipUnscoping\n */\n removeChild(node, skipUnscoping = false) {\n if (this.ownerDocument !== doc) {\n return this[utils.NATIVE_PREFIX + 'removeChild'](node);\n }\n if (node[utils.SHADY_PREFIX + 'parentNode'] !== this) {\n throw Error(\n 'The node to be removed is not a child of this node: ' + node\n );\n }\n scheduleObserver(this, null, node);\n let preventNativeRemove;\n let ownerRoot = ownerShadyRootForNode(node);\n const removingInsertionPoint =\n ownerRoot && ownerRoot._removeContainedSlots(node);\n const parentData = shadyDataForNode(this);\n if (utils.isTrackingLogicalChildNodes(this)) {\n recordRemoveChild(node, this);\n if (utils.hasShadowRootWithSlot(this)) {\n parentData.root._asyncRender();\n preventNativeRemove = true;\n }\n }\n // unscope a node leaving a ShadowRoot if ShadyCSS is present, and this node\n // is not going to be rescoped in `insertBefore`\n if (\n getScopingShim() &&\n !skipUnscoping &&\n ownerRoot &&\n node.nodeType !== Node.TEXT_NODE\n ) {\n const oldScopeName = currentScopeForNode(node);\n treeVisitor(node, (node) => {\n removeShadyScoping(node, oldScopeName);\n });\n }\n removeOwnerShadyRoot(node);\n // if removing slot, must render containing root\n if (ownerRoot) {\n let changeSlotContent = this.localName === 'slot';\n if (changeSlotContent) {\n preventNativeRemove = true;\n }\n if (removingInsertionPoint || changeSlotContent) {\n ownerRoot._asyncRender();\n }\n }\n if (!preventNativeRemove) {\n // if removing from a shadyRoot, remove from host instead\n let container = utils.isShadyRoot(this)\n ? /** @type {ShadowRoot} */ (this).host\n : this;\n // not guaranteed to physically be in container; e.g.\n // (1) if parent has a shadyRoot, element may or may not at distributed\n // location (could be undistributed)\n // (2) if parent is a slot, element may not ben in composed dom\n if (\n !(parentData.root || node.localName === 'slot') ||\n container === node[utils.NATIVE_PREFIX + 'parentNode']\n ) {\n container[utils.NATIVE_PREFIX + 'removeChild'](node);\n }\n }\n return node;\n },\n\n /**\n * @this {Node}\n * @param {Node} node\n * @param {Node=} ref_node\n */\n replaceChild(node, ref_node) {\n this[utils.SHADY_PREFIX + 'insertBefore'](node, ref_node);\n this[utils.SHADY_PREFIX + 'removeChild'](ref_node);\n return node;\n },\n\n /**\n * @this {Node}\n * @param {boolean=} deep\n */\n cloneNode(deep) {\n if (this.localName == 'template') {\n return this[utils.NATIVE_PREFIX + 'cloneNode'](deep);\n } else {\n const n = this[utils.NATIVE_PREFIX + 'cloneNode'](false);\n // Attribute nodes historically had childNodes, but they have later\n // been removed from the spec.\n // Make sure we do not do a deep clone on them for old browsers (IE11)\n if (deep && n.nodeType !== Node.ATTRIBUTE_NODE) {\n for (\n let c = this[utils.SHADY_PREFIX + 'firstChild'], nc;\n c;\n c = c[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n nc = c[utils.SHADY_PREFIX + 'cloneNode'](true);\n n[utils.SHADY_PREFIX + 'appendChild'](nc);\n }\n }\n return n;\n }\n },\n\n /**\n * @this {Node}\n * @param {Object=} options\n */\n // TODO(sorvell): implement `options` e.g. `{ composed: boolean }`\n getRootNode(options) {\n if (!this || !this.nodeType) {\n return;\n }\n const nodeData = ensureShadyDataForNode(this);\n let root = nodeData.ownerShadyRoot;\n if (root === undefined) {\n if (utils.isShadyRoot(this)) {\n root = this;\n nodeData.ownerShadyRoot = root;\n } else {\n let parent = this[utils.SHADY_PREFIX + 'parentNode'];\n root = parent\n ? parent[utils.SHADY_PREFIX + 'getRootNode'](options)\n : this;\n // memo-ize result for performance but only memo-ize\n // result if node is in the document. This avoids a problem where a root\n // can be cached while an element is inside a fragment.\n // If this happens and we cache the result, the value can become stale\n // because for perf we avoid processing the subtree of added fragments.\n if (document.documentElement[utils.NATIVE_PREFIX + 'contains'](this)) {\n nodeData.ownerShadyRoot = root;\n }\n }\n }\n return root;\n },\n\n /** @this {Node} */\n contains(node) {\n return utils.contains(this, node);\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport {calculateSplices} from './array-splice.js';\nimport * as utils from './utils.js';\nimport {enqueue} from './flush.js';\nimport {ensureShadyDataForNode, shadyDataForNode} from './shady-data.js';\nimport {recordChildNodes} from './link-nodes.js';\nimport {patchShadyRoot} from './patch-shadyRoot.js';\n\n// Do not export this object. It must be passed as the first argument to the\n// ShadyRoot constructor in `attachShadow` to prevent the constructor from\n// throwing. This prevents the user from being able to manually construct a\n// ShadyRoot (i.e. `new ShadowRoot()`).\nconst ShadyRootConstructionToken = {};\n\nconst CATCHALL_NAME = '__catchall';\n\nconst MODE_CLOSED = 'closed';\n\nlet isRendering =\n utils.settings['deferConnectionCallbacks'] &&\n document.readyState === 'loading';\nlet rootRendered;\n\nfunction ancestorList(node) {\n let ancestors = [];\n do {\n ancestors.unshift(node);\n } while ((node = node[utils.SHADY_PREFIX + 'parentNode']));\n return ancestors;\n}\n\n/**\n * @extends {ShadowRoot}\n */\nclass ShadyRoot {\n constructor(token, host, options) {\n if (token !== ShadyRootConstructionToken) {\n throw new TypeError('Illegal constructor');\n }\n /** @type {boolean} */\n this._renderPending;\n /** @type {boolean} */\n this._hasRendered;\n /** @type {?Array<HTMLSlotElement>} */\n this._slotList = null;\n /** @type {?Object<string, Array<HTMLSlotElement>>} */\n this._slotMap;\n /** @type {?Array<HTMLSlotElement>} */\n this._pendingSlots;\n this._init(host, options);\n }\n\n _init(host, options) {\n // root <=> host\n this.host = host;\n /** @type {!string|undefined} */\n this.mode = options && options.mode;\n recordChildNodes(this.host);\n const hostData = ensureShadyDataForNode(this.host);\n /** @type {!ShadyRoot} */\n hostData.root = this;\n hostData.publicRoot = this.mode !== MODE_CLOSED ? this : null;\n // setup root\n const rootData = ensureShadyDataForNode(this);\n rootData.firstChild = rootData.lastChild = rootData.parentNode = rootData.nextSibling = rootData.previousSibling = null;\n // NOTE: optimization flag, only require an asynchronous render\n // to record parsed children if flag is not set.\n if (utils.settings['preferPerformance']) {\n let n;\n while ((n = this.host[utils.NATIVE_PREFIX + 'firstChild'])) {\n this.host[utils.NATIVE_PREFIX + 'removeChild'](n);\n }\n } else {\n this._asyncRender();\n }\n }\n\n _asyncRender() {\n if (!this._renderPending) {\n this._renderPending = true;\n enqueue(() => this._render());\n }\n }\n\n // returns the oldest renderPending ancestor root.\n _getPendingDistributionRoot() {\n let renderRoot;\n let root = this;\n while (root) {\n if (root._renderPending) {\n renderRoot = root;\n }\n root = root._getDistributionParent();\n }\n return renderRoot;\n }\n\n // Returns the shadyRoot `this.host` if `this.host`\n // has children that require distribution.\n _getDistributionParent() {\n let root = this.host[utils.SHADY_PREFIX + 'getRootNode']();\n if (!utils.isShadyRoot(root)) {\n return;\n }\n const nodeData = shadyDataForNode(this.host);\n if (nodeData && nodeData.__childSlotCount > 0) {\n return root;\n }\n }\n\n // Renders the top most render pending shadowRoot in the distribution tree.\n // This is safe because when a distribution parent renders, all children render.\n _render() {\n // If this root is not pending, it needs no rendering work. Any pending\n // parent that needs to render wll cause this root to render.\n const root = this._renderPending && this._getPendingDistributionRoot();\n if (root) {\n root._renderSelf();\n }\n }\n\n _flushInitial() {\n if (!this._hasRendered && this._renderPending) {\n this._render();\n }\n }\n\n /** @override */\n _renderSelf() {\n // track rendering state.\n const wasRendering = isRendering;\n isRendering = true;\n this._renderPending = false;\n if (this._slotList) {\n this._distribute();\n this._compose();\n }\n // NOTE: optimization flag, only process parsed children\n // if optimization flag is not set.\n // on initial render remove any undistributed children.\n if (!utils.settings['preferPerformance'] && !this._hasRendered) {\n for (\n let n = this.host[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n const data = shadyDataForNode(n);\n if (\n n[utils.NATIVE_PREFIX + 'parentNode'] === this.host &&\n (n.localName === 'slot' || !data.assignedSlot)\n ) {\n this.host[utils.NATIVE_PREFIX + 'removeChild'](n);\n }\n }\n }\n this._hasRendered = true;\n isRendering = wasRendering;\n if (rootRendered) {\n rootRendered();\n }\n }\n\n _distribute() {\n this._validateSlots();\n // capture # of previously assigned nodes to help determine if dirty.\n for (let i = 0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n this._clearSlotAssignedNodes(slot);\n }\n // distribute host children.\n for (\n let n = this.host[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n this._distributeNodeToSlot(n);\n }\n // fallback content, slotchange, and dirty roots\n for (let i = 0; i < this._slotList.length; i++) {\n const slot = this._slotList[i];\n const slotData = shadyDataForNode(slot);\n // distribute fallback content\n if (!slotData.assignedNodes.length) {\n for (\n let n = slot[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n this._distributeNodeToSlot(n, slot);\n }\n }\n const slotParentData = shadyDataForNode(\n slot[utils.SHADY_PREFIX + 'parentNode']\n );\n const slotParentRoot = slotParentData && slotParentData.root;\n if (\n slotParentRoot &&\n (slotParentRoot._hasInsertionPoint() || slotParentRoot._renderPending)\n ) {\n slotParentRoot._renderSelf();\n }\n this._addAssignedToFlattenedNodes(\n slotData.flattenedNodes,\n slotData.assignedNodes\n );\n let prevAssignedNodes = slotData._previouslyAssignedNodes;\n if (prevAssignedNodes) {\n for (let i = 0; i < prevAssignedNodes.length; i++) {\n shadyDataForNode(prevAssignedNodes[i])._prevAssignedSlot = null;\n }\n slotData._previouslyAssignedNodes = null;\n // dirty if previously less assigned nodes than previously assigned.\n if (prevAssignedNodes.length > slotData.assignedNodes.length) {\n slotData.dirty = true;\n }\n }\n /* Note: A slot is marked dirty whenever a node is newly assigned to it\n or a node is assigned to a different slot (done in `_distributeNodeToSlot`)\n or if the number of nodes assigned to the slot has decreased (done above);\n */\n if (slotData.dirty) {\n slotData.dirty = false;\n this._fireSlotChange(slot);\n }\n }\n }\n\n /**\n * Distributes given `node` to the appropriate slot based on its `slot`\n * attribute. If `forcedSlot` is given, then the node is distributed to the\n * `forcedSlot`.\n * Note: slot to which the node is assigned will be marked dirty for firing\n * `slotchange`.\n * @param {Node} node\n * @param {Node=} forcedSlot\n *\n */\n _distributeNodeToSlot(node, forcedSlot) {\n const nodeData = ensureShadyDataForNode(node);\n let oldSlot = nodeData._prevAssignedSlot;\n nodeData._prevAssignedSlot = null;\n let slot = forcedSlot;\n if (!slot) {\n let name = node[utils.SHADY_PREFIX + 'slot'] || CATCHALL_NAME;\n const list = this._slotMap[name];\n slot = list && list[0];\n }\n if (slot) {\n const slotData = ensureShadyDataForNode(slot);\n slotData.assignedNodes.push(node);\n nodeData.assignedSlot = slot;\n } else {\n nodeData.assignedSlot = undefined;\n }\n if (oldSlot !== nodeData.assignedSlot) {\n if (nodeData.assignedSlot) {\n ensureShadyDataForNode(nodeData.assignedSlot).dirty = true;\n }\n }\n }\n\n /**\n * Clears the assignedNodes tracking data for a given `slot`. Note, the current\n * assigned node data is tracked (via _previouslyAssignedNodes and\n * _prevAssignedSlot) to see if `slotchange` should fire. This data may be out\n * of date at this time because the assigned nodes may have already been\n * distributed to another root. This is ok since this data is only used to\n * track changes.\n * @param {HTMLSlotElement} slot\n */\n _clearSlotAssignedNodes(slot) {\n const slotData = shadyDataForNode(slot);\n let n$ = slotData.assignedNodes;\n slotData.assignedNodes = [];\n slotData.flattenedNodes = [];\n slotData._previouslyAssignedNodes = n$;\n if (n$) {\n for (let i = 0; i < n$.length; i++) {\n let n = shadyDataForNode(n$[i]);\n n._prevAssignedSlot = n.assignedSlot;\n // only clear if it was previously set to this slot;\n // this helps ensure that if the node has otherwise been distributed\n // ignore it.\n if (n.assignedSlot === slot) {\n n.assignedSlot = null;\n }\n }\n }\n }\n\n _addAssignedToFlattenedNodes(flattened, assigned) {\n for (let i = 0, n; i < assigned.length && (n = assigned[i]); i++) {\n if (n.localName == 'slot') {\n const nestedAssigned = shadyDataForNode(n).assignedNodes;\n if (nestedAssigned && nestedAssigned.length) {\n this._addAssignedToFlattenedNodes(flattened, nestedAssigned);\n }\n } else {\n flattened.push(assigned[i]);\n }\n }\n }\n\n _fireSlotChange(slot) {\n // NOTE: cannot bubble correctly here so not setting bubbles: true\n // Safari tech preview does not bubble but chrome does\n // Spec says it bubbles (https://dom.spec.whatwg.org/#mutation-observers)\n slot[utils.NATIVE_PREFIX + 'dispatchEvent'](new Event('slotchange'));\n const slotData = shadyDataForNode(slot);\n if (slotData.assignedSlot) {\n this._fireSlotChange(slotData.assignedSlot);\n }\n }\n\n // Reify dom such that it is at its correct rendering position\n // based on logical distribution.\n // NOTE: here we only compose parents of <slot> elements and not the\n // shadowRoot into the host. The latter is performend via a fast path\n // in the `logical-mutation`.insertBefore.\n _compose() {\n const slots = this._slotList;\n let composeList = [];\n for (let i = 0; i < slots.length; i++) {\n const parent = slots[i][utils.SHADY_PREFIX + 'parentNode'];\n /* compose node only if:\n (1) parent does not have a shadowRoot since shadowRoot has already\n composed into the host\n (2) we're not already composing it\n [consider (n^2) but rare better than Set]\n */\n const parentData = shadyDataForNode(parent);\n if (!(parentData && parentData.root) && composeList.indexOf(parent) < 0) {\n composeList.push(parent);\n }\n }\n for (let i = 0; i < composeList.length; i++) {\n const node = composeList[i];\n const targetNode = node === this ? this.host : node;\n this._updateChildNodes(targetNode, this._composeNode(node));\n }\n }\n\n // Returns the list of nodes which should be rendered inside `node`.\n _composeNode(node) {\n let children = [];\n for (\n let n = node[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n // Note: if we see a slot here, the nodes are guaranteed to need to be\n // composed here. This is because if there is redistribution, it has\n // already been handled by this point.\n if (this._isInsertionPoint(n)) {\n let flattenedNodes = shadyDataForNode(n).flattenedNodes;\n for (let j = 0; j < flattenedNodes.length; j++) {\n let distributedNode = flattenedNodes[j];\n children.push(distributedNode);\n }\n } else {\n children.push(n);\n }\n }\n return children;\n }\n\n _isInsertionPoint(node) {\n return node.localName == 'slot';\n }\n\n // Ensures that the rendered node list inside `container` is `children`.\n _updateChildNodes(container, children) {\n let composed = utils.nativeChildNodesArray(container);\n let splices = calculateSplices(children, composed);\n // process removals\n for (let i = 0, d = 0, s; i < splices.length && (s = splices[i]); i++) {\n for (let j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {\n // check if the node is still where we expect it is before trying\n // to remove it; this can happen if we move a node and\n // then schedule its previous host for distribution resulting in\n // the node being removed here.\n if (n[utils.NATIVE_PREFIX + 'parentNode'] === container) {\n container[utils.NATIVE_PREFIX + 'removeChild'](n);\n }\n // TODO(sorvell): avoid the need for splicing here.\n composed.splice(s.index + d, 1);\n }\n d -= s.addedCount;\n }\n // process adds\n for (let i = 0, s, next; i < splices.length && (s = splices[i]); i++) {\n // eslint-disable-line no-redeclare\n next = composed[s.index];\n for (let j = s.index, n; j < s.index + s.addedCount; j++) {\n n = children[j];\n container[utils.NATIVE_PREFIX + 'insertBefore'](n, next);\n composed.splice(j, 0, n);\n }\n }\n }\n\n _ensureSlotData() {\n this._pendingSlots = this._pendingSlots || [];\n this._slotList = this._slotList || [];\n this._slotMap = this._slotMap || {};\n }\n\n _addSlots(slots) {\n this._ensureSlotData();\n this._pendingSlots.push(...slots);\n }\n\n _validateSlots() {\n if (this._pendingSlots && this._pendingSlots.length) {\n this._mapSlots(this._pendingSlots);\n this._pendingSlots = [];\n }\n }\n\n /**\n * Adds the given slots. Slots are maintained in an dom-ordered list.\n * In addition a map of name to slot is updated.\n */\n _mapSlots(slots) {\n let slotNamesToSort;\n for (let i = 0; i < slots.length; i++) {\n const slot = slots[i];\n // ensure insertionPoints's and their parents have logical dom info.\n // save logical tree info\n // a. for shadyRoot\n // b. for insertion points (fallback)\n // c. for parents of insertion points\n recordChildNodes(slot);\n const slotParent = slot[utils.SHADY_PREFIX + 'parentNode'];\n recordChildNodes(slotParent);\n const slotParentData = shadyDataForNode(slotParent);\n slotParentData.__childSlotCount =\n (slotParentData.__childSlotCount || 0) + 1;\n let name = this._nameForSlot(slot);\n if (this._slotMap[name]) {\n slotNamesToSort = slotNamesToSort || {};\n slotNamesToSort[name] = true;\n this._slotMap[name].push(slot);\n } else {\n this._slotMap[name] = [slot];\n }\n this._slotList.push(slot);\n }\n if (slotNamesToSort) {\n for (let n in slotNamesToSort) {\n this._slotMap[n] = this._sortSlots(this._slotMap[n]);\n }\n }\n }\n\n _nameForSlot(slot) {\n const name = slot['name'] || slot.getAttribute('name') || CATCHALL_NAME;\n slot.__slotName = name;\n return name;\n }\n\n /**\n * Slots are kept in an ordered list. Slots with the same name\n * are sorted here by tree order.\n */\n _sortSlots(slots) {\n // NOTE: Cannot use `compareDocumentPosition` because it's not polyfilled,\n // but the code here could be used to polyfill the preceeding/following info\n // in `compareDocumentPosition`.\n return slots.sort((a, b) => {\n let listA = ancestorList(a);\n let listB = ancestorList(b);\n for (var i = 0; i < listA.length; i++) {\n let nA = listA[i];\n let nB = listB[i];\n if (nA !== nB) {\n let c$ = utils.childNodesArray(nA[utils.SHADY_PREFIX + 'parentNode']);\n return c$.indexOf(nA) - c$.indexOf(nB);\n }\n }\n });\n }\n\n /**\n * Removes from tracked slot data any slots contained within `container` and\n * then updates the tracked data (_slotList and _slotMap).\n * Any removed slots also have their `assignedNodes` removed from comopsed dom.\n */\n _removeContainedSlots(container) {\n if (!this._slotList) {\n return;\n }\n this._validateSlots();\n let didRemove;\n const map = this._slotMap;\n for (let n in map) {\n const slots = map[n];\n for (let i = 0; i < slots.length; i++) {\n const slot = slots[i];\n if (utils.contains(container, slot)) {\n slots.splice(i, 1);\n const x = this._slotList.indexOf(slot);\n if (x >= 0) {\n this._slotList.splice(x, 1);\n const slotParentData = shadyDataForNode(\n slot[utils.SHADY_PREFIX + 'parentNode']\n );\n if (slotParentData && slotParentData.__childSlotCount) {\n slotParentData.__childSlotCount--;\n }\n }\n i--;\n this._removeFlattenedNodes(slot);\n didRemove = true;\n }\n }\n }\n return didRemove;\n }\n\n _updateSlotName(slot) {\n if (!this._slotList) {\n return;\n }\n // make sure slotMap is initialized with this slot\n this._validateSlots();\n const oldName = slot.__slotName;\n const name = this._nameForSlot(slot);\n if (name === oldName) {\n return;\n }\n // remove from existing tracking\n let slots = this._slotMap[oldName];\n const i = slots.indexOf(slot);\n if (i >= 0) {\n slots.splice(i, 1);\n }\n // add to new location and sort if nedessary\n let list = this._slotMap[name] || (this._slotMap[name] = []);\n list.push(slot);\n if (list.length > 1) {\n this._slotMap[name] = this._sortSlots(list);\n }\n }\n\n _removeFlattenedNodes(slot) {\n const data = shadyDataForNode(slot);\n let n$ = data.flattenedNodes;\n if (n$) {\n for (let i = 0; i < n$.length; i++) {\n let node = n$[i];\n let parent = node[utils.NATIVE_PREFIX + 'parentNode'];\n if (parent) {\n parent[utils.NATIVE_PREFIX + 'removeChild'](node);\n }\n }\n }\n data.flattenedNodes = [];\n data.assignedNodes = [];\n }\n\n _hasInsertionPoint() {\n this._validateSlots();\n return Boolean(this._slotList && this._slotList.length);\n }\n}\n\npatchShadyRoot(ShadyRoot.prototype);\nexport {ShadyRoot};\n\n/**\n Implements a pared down version of ShadowDOM's scoping, which is easy to\n polyfill across browsers.\n*/\nexport const attachShadow = (host, options) => {\n if (!host) {\n throw new Error('Must provide a host.');\n }\n if (!options) {\n throw new Error('Not enough arguments.');\n }\n let root;\n // Optimization for booting up a shadowRoot from a fragment rather than\n // creating one.\n if (options['shadyUpgradeFragment'] && utils.canUpgrade()) {\n root = options['shadyUpgradeFragment'];\n root.__proto__ = ShadowRoot.prototype;\n root._init(host, options);\n recordChildNodes(root, root);\n // Note: qsa is native when used with noPatch.\n /** @type {?NodeList<Element>} */\n const slotsAdded = root['__noInsertionPoint']\n ? null\n : root.querySelectorAll('slot');\n // Reset scoping information so normal scoing rules apply after this.\n root['__noInsertionPoint'] = undefined;\n // if a slot is added, must render containing root.\n if (slotsAdded && slotsAdded.length) {\n root._addSlots(slotsAdded);\n root._asyncRender();\n }\n /** @type {ShadowRoot} */ (root).host[utils.NATIVE_PREFIX + 'appendChild'](\n root\n );\n } else {\n root = new ShadyRoot(ShadyRootConstructionToken, host, options);\n }\n return root;\n};\n\n// Mitigate connect/disconnect spam by wrapping custom element classes. This\n// should happen if custom elements are available in any capacity, polyfilled or\n// not.\nif (\n utils.hasCustomElements() &&\n utils.settings.inUse &&\n !utils.settings['preferPerformance']\n) {\n // process connect/disconnect after roots have rendered to avoid\n // issues with reaction stack.\n let connectMap = new Map();\n rootRendered = function () {\n // allow elements to connect\n // save map state (without needing polyfills on IE11)\n const r = [];\n connectMap.forEach((v, k) => {\n r.push([k, v]);\n });\n connectMap.clear();\n for (let i = 0; i < r.length; i++) {\n const e = r[i][0],\n value = r[i][1];\n if (value) {\n e['__shadydom_connectedCallback']();\n } else {\n e['__shadydom_disconnectedCallback']();\n }\n }\n };\n\n // Document is in loading state and flag is set (deferConnectionCallbacks)\n // so process connection stack when `readystatechange` fires.\n if (isRendering) {\n document.addEventListener(\n 'readystatechange',\n () => {\n isRendering = false;\n rootRendered();\n },\n {once: true}\n );\n }\n\n /*\n * (1) elements can only be connected/disconnected if they are in the expected\n * state.\n * (2) never run connect/disconnect during rendering to avoid reaction stack issues.\n */\n const ManageConnect = (base, connected, disconnected) => {\n let counter = 0;\n const connectFlag = `__isConnected${counter++}`;\n if (connected || disconnected) {\n /** @this {!HTMLElement} */\n base.prototype.connectedCallback = base.prototype[\n '__shadydom_connectedCallback'\n ] = function () {\n // if rendering defer connected\n // otherwise connect only if we haven't already\n if (isRendering) {\n connectMap.set(this, true);\n } else if (!this[connectFlag]) {\n this[connectFlag] = true;\n if (connected) {\n connected.call(this);\n }\n }\n };\n\n /** @this {!HTMLElement} */\n base.prototype.disconnectedCallback = base.prototype[\n '__shadydom_disconnectedCallback'\n ] = function () {\n // if rendering, cancel a pending connection and queue disconnect,\n // otherwise disconnect only if a connection has been allowed\n if (isRendering) {\n // This is necessary only because calling removeChild\n // on a node that requires distribution leaves it in the DOM tree\n // until distribution.\n // NOTE: remember this is checking the patched isConnected to determine\n // if the node is in the logical tree.\n if (!this.isConnected) {\n connectMap.set(this, false);\n }\n } else if (this[connectFlag]) {\n this[connectFlag] = false;\n if (disconnected) {\n disconnected.call(this);\n }\n }\n };\n }\n\n return base;\n };\n\n const originalDefine = window['customElements']['define'];\n const define = function (name, constructor) {\n const connected = constructor.prototype.connectedCallback;\n const disconnected = constructor.prototype.disconnectedCallback;\n originalDefine.call(\n window['customElements'],\n name,\n ManageConnect(constructor, connected, disconnected)\n );\n // unpatch connected/disconnected on class; custom elements tears this off\n // so the patch is maintained, but if the user calls these methods for\n // e.g. testing, they will be as expected.\n constructor.prototype.connectedCallback = connected;\n constructor.prototype.disconnectedCallback = disconnected;\n };\n // Note, it would be better to only patch the CustomElementRegistry.prototype,\n // but ShadyCSS patches define directly.\n window.customElements.define = define;\n // Still patch the registry directly since Safari 10 loses the patch\n // unless this is done.\n Object.defineProperty(window['CustomElementRegistry'].prototype, 'define', {\n value: define,\n configurable: true,\n });\n}\n\n/** @return {!ShadyRoot|undefined} */\nexport const ownerShadyRootForNode = (node) => {\n let root = node[utils.SHADY_PREFIX + 'getRootNode']();\n if (utils.isShadyRoot(root)) {\n return root;\n }\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\n\nexport const SlotablePatches = utils.getOwnPropertyDescriptors({\n /** @this {Node} */\n get assignedSlot() {\n // Force any parent's shadowRoot to flush so that distribution occurs\n // and this node has an assignedSlot.\n const parent = this[utils.SHADY_PREFIX + 'parentNode'];\n const ownerRoot = parent && parent[utils.SHADY_PREFIX + 'shadowRoot'];\n if (ownerRoot) {\n ownerRoot._render();\n }\n const nodeData = shadyDataForNode(this);\n return (nodeData && nodeData.assignedSlot) || null;\n },\n});\n","/**\n * @license\n * Copyright (c) 2022 The Polymer Project Authors\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * A map describing parentheses-like grouping characters and their behavior. The\n * keys are the group's start character and the value's `end` property contains\n * the end character. The `matchNestedParens` property indicates whether or not\n * other grouping characters nested in the group retain their grouping behavior\n * within that group - i.e. if nested grouping characters need to be matched.\n *\n * @type {!Map<string, {end: string, matchNestedParens: boolean}>}\n */\nconst PARENS = new Map();\n// IE 11 doesn't support `Map`'s constructor parameter.\n[\n ['(', {end: ')', matchNestedParens: true}],\n ['[', {end: ']', matchNestedParens: true}],\n ['\"', {end: '\"', matchNestedParens: false}],\n [\"'\", {end: \"'\", matchNestedParens: false}],\n].forEach(([k, v]) => {\n PARENS.set(k, v);\n});\n\n/**\n * Finds the first character of `queryChars` within `str` from index `start`\n * onwards that is _not_ nested within any parentheses, brackets, or\n * single/double-quoted strings or part of an escape sequence.\n *\n * If the end of the string is reached without finding a character in\n * `queryChars`, the length of the string is returned.\n *\n * @param {string} str\n * @param {number} start\n * @param {!Array<string>} queryChars\n * @param {boolean} matchNestedParens\n * @return {number}\n */\nconst findNext = (str, start, queryChars, matchNestedParens = true) => {\n for (let i = start; i < str.length; i++) {\n if (str[i] === '\\\\' && i < str.length - 1 && str[i + 1] !== '\\n') {\n // Skip escape sequences.\n i++;\n } else if (queryChars.indexOf(str[i]) !== -1) {\n // One of `queryChars` was found.\n return i;\n } else if (matchNestedParens && PARENS.has(str[i])) {\n // Handle any grouping characters by skipping over the group.\n const parenInfo = PARENS.get(str[i]);\n i = findNext(str, i + 1, [parenInfo.end], parenInfo.matchNestedParens);\n continue;\n }\n\n // Do nothing, let `i++` happen.\n }\n\n // Reached the end of the string without finding a final char.\n return str.length;\n};\n\n/**\n * Arrays of compound selectors and combinators that form a complex selector\n * when interleaved.\n *\n * @typedef {{\n * compoundSelectors: !Array<string>,\n * combinators: !Array<string>,\n * }}\n */\nexport let ComplexSelectorParts;\n\n/**\n * Splits a selector list into individual complex selectors and creates a\n * `ComplexSelectorParts` for each.\n *\n * @param {string} str\n * @return {!Array<!ComplexSelectorParts>}\n */\nexport const parseSelectorList = (str) => {\n /**\n * @type {!Array<!ComplexSelectorParts>}\n */\n const results = [];\n\n /**\n * Compound selectors and combinators parsed from the current complex\n * selector.\n *\n * @type {!Array<string>}\n */\n const chunks = [];\n\n /**\n * Creates a new `ComplexSelectorParts` from the current `chunks`, pushes it\n * into `results` and resets `chunks`.\n */\n const endComplexSelector = () => {\n if (chunks.length > 0) {\n while (chunks[chunks.length - 1] === ' ') {\n chunks.pop();\n }\n results.push({\n compoundSelectors: chunks.filter((x, i) => i % 2 === 0),\n combinators: chunks.filter((x, i) => i % 2 === 1),\n });\n chunks.length = 0;\n }\n };\n\n for (let i = 0; i < str.length; ) {\n const prevChunk = chunks[chunks.length - 1];\n // `nextIndex` is the next complex selector boundary, combinator, or\n // whitespace that isn't inside other grouping characters.\n const nextIndex = findNext(str, i, [',', ' ', '>', '+', '~']);\n // If `nextIndex` is `i`, then the chunk we're considering is only the next\n // single character.\n const nextChunk = nextIndex === i ? str[i] : str.substring(i, nextIndex);\n\n if (nextChunk === ',') {\n endComplexSelector();\n } else if (\n [undefined, ' ', '>', '+', '~'].indexOf(prevChunk) !== -1 &&\n nextChunk === ' '\n ) {\n // Ignore leading whitespace and whitespace directly after combinators.\n } else if (prevChunk === ' ' && ['>', '+', '~'].indexOf(nextChunk) !== -1) {\n // If the last chunk was whitespace and this chunk is a non-whitespace\n // combinator, replace the whitespace with this combinator.\n chunks[chunks.length - 1] = nextChunk;\n } else {\n chunks.push(nextChunk);\n }\n\n i = nextIndex + (nextIndex === i ? 1 : 0);\n }\n\n endComplexSelector();\n\n return results;\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\nimport {ComplexSelectorParts, parseSelectorList} from '../selector-parser.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n/**\n * @param {Node} node\n * @param {Function} matcher\n * @param {Function=} halter\n */\nexport function query(node, matcher, halter) {\n let list = [];\n queryChildNodes(node, matcher, halter, list);\n return list;\n}\n\nfunction queryChildNodes(parent, matcher, halter, list) {\n for (\n let n = parent[utils.SHADY_PREFIX + 'firstChild'];\n n;\n n = n[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n if (\n n.nodeType === Node.ELEMENT_NODE &&\n queryElement(n, matcher, halter, list)\n ) {\n return true;\n }\n }\n}\n\nfunction queryElement(node, matcher, halter, list) {\n let result = matcher(node);\n if (result) {\n list.push(node);\n }\n if (halter && halter(result)) {\n return result;\n }\n queryChildNodes(node, matcher, halter, list);\n}\n\n// Needed on Element, DocumentFragment, Document\nexport const ParentNodePatches = utils.getOwnPropertyDescriptors({\n /** @this {Element} */\n get firstElementChild() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.firstChild !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'firstChild'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'nextSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'firstElementChild'];\n }\n },\n\n /** @this {Element} */\n get lastElementChild() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.lastChild !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'lastChild'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'previousSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'lastElementChild'];\n }\n },\n\n /** @this {Element} */\n get children() {\n if (!utils.isTrackingLogicalChildNodes(this)) {\n return this[utils.NATIVE_PREFIX + 'children'];\n }\n return utils.createPolyfilledHTMLCollection(\n Array.prototype.filter.call(utils.childNodesArray(this), (n) => {\n return n.nodeType === Node.ELEMENT_NODE;\n })\n );\n },\n\n /** @this {Element} */\n get childElementCount() {\n let children = this[utils.SHADY_PREFIX + 'children'];\n if (children) {\n return children.length;\n }\n return 0;\n },\n\n /** @this {Element} */\n append(...args) {\n this[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n null\n );\n },\n\n /** @this {Element} */\n prepend(...args) {\n this[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n this[utils.SHADY_PREFIX + 'firstChild']\n );\n },\n\n /** @this {Element} */\n ['replaceChildren'](...args) {\n let child;\n while ((child = this[utils.SHADY_PREFIX + 'firstChild']) !== null) {\n this[utils.SHADY_PREFIX + 'removeChild'](child);\n }\n this[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n null\n );\n },\n});\n\n/**\n * Performs the equivalent of `querySelectorAll` within Shady DOM's logical\n * model of the tree for a selector list.\n *\n * See <./logicalQuerySelectorAll.md> for implementation details.\n *\n * @param {!ParentNode} contextNode\n * @param {string} selectorList\n * @return {!Array<!Element>}\n */\nconst logicalQuerySelectorAll = (contextNode, selectorList) => {\n /**\n * @type {!Array<!ComplexSelectorParts>}\n */\n const complexSelectors = parseSelectorList(selectorList);\n\n if (complexSelectors.length < 1) {\n return [];\n }\n\n /**\n * Determines if a single compound selector matches an element. If the\n * selector contains `:scope` (as a substring), then the selector only is only\n * considered matching if `element` is `contextNode`.\n *\n * @param {!Element} element\n * @param {string} compoundSelector\n * @return {boolean}\n */\n const matchesCompoundSelector = (element, compoundSelector) => {\n return (\n (element === contextNode || compoundSelector.indexOf(':scope') === -1) &&\n utils.matchesSelector(element, compoundSelector)\n );\n };\n\n /**\n * An object used to track the current position of a potential selector match.\n *\n * - `target` is the element that would be considered matching if the cursor\n * eventually results in a complete match.\n *\n * - `complexSelectorParts` is the parsed representation of the complex\n * selector that this cursor is attempting to match.\n *\n * - `index` is the index into `.complexSelectorParts.compoundSelectors` of\n * the last successfully matched compound selector.\n *\n * - `matchedElement` is the element that successfully matched the compound\n * selector in `.complexSelectorParts.compoundSelectors` at `index`.\n *\n * @typedef {{\n * target: !Element,\n * complexSelectorParts: !ComplexSelectorParts,\n * matchedElement: !Element,\n * index: number,\n * }}\n */\n let SelectorMatchingCursor; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n /**\n * The list of `SelectorMatchingCursor`s, initialized with cursors pointing at\n * all descendants of `contextNode` that match the last compound selector in\n * any complex selector in `selectorList`.\n *\n * @type {!Array<!SelectorMatchingCursor>}\n */\n let cursors = utils.flat(\n query(contextNode, (_element) => true).map((element) => {\n return utils.flat(\n complexSelectors.map((complexSelectorParts) => {\n const {compoundSelectors} = complexSelectorParts;\n // Selectors are matched by iterating their compound selectors in\n // reverse order for efficiency. In particular, when finding\n // candidates for the descendant combinator, iterating forwards would\n // imply needing to walk all descendants of the last matched element\n // for possible candidates, but iterating backwards only requires\n // walking up the ancestor chain.\n const index = compoundSelectors.length - 1;\n if (matchesCompoundSelector(element, compoundSelectors[index])) {\n return {\n target: element,\n complexSelectorParts,\n matchedElement: element,\n index,\n };\n } else {\n return [];\n }\n })\n );\n })\n );\n\n // At each step, any remaining cursors that have not finished matching (i.e.\n // with `cursor.index > 0`) should be replaced with new cursors for any valid\n // candidates that match the next compound selector.\n while (cursors.some((cursor) => cursor.index > 0)) {\n cursors = utils.flat(\n cursors.map((cursor) => {\n // Cursors with `index` of 0 have already matched and should not be\n // replaced or removed.\n if (cursor.index <= 0) {\n return cursor;\n }\n\n const {\n target,\n matchedElement,\n complexSelectorParts,\n index: lastIndex,\n } = cursor;\n const index = lastIndex - 1;\n const combinator = complexSelectorParts.combinators[index];\n const compoundSelector = complexSelectorParts.compoundSelectors[index];\n\n if (combinator === ' ') {\n const results = [];\n\n // For `a b`, where existing cursors have `matchedElement`s matching\n // `b`, the candidates to test against `a` are all ancestors of each\n // cursor's `matchedElement`.\n for (\n let ancestor = matchedElement[utils.SHADY_PREFIX + 'parentElement'];\n ancestor;\n ancestor = ancestor[utils.SHADY_PREFIX + 'parentElement']\n ) {\n if (matchesCompoundSelector(ancestor, compoundSelector)) {\n results.push({\n target,\n complexSelectorParts,\n matchedElement: ancestor,\n index,\n });\n }\n }\n\n return results;\n } else if (combinator === '>') {\n const parent = matchedElement[utils.SHADY_PREFIX + 'parentElement'];\n\n // For `a > b`, where existing cursors have `matchedElement`s matching\n // `b`, the candidates to test against `a` are the parents of each\n // cursor's `matchedElement`.\n if (matchesCompoundSelector(parent, compoundSelector)) {\n return {\n target,\n complexSelectorParts,\n matchedElement: parent,\n index,\n };\n }\n\n return [];\n } else if (combinator === '+') {\n const sibling =\n matchedElement[utils.SHADY_PREFIX + 'previousElementSibling'];\n\n // For `a + b`, where existing cursors have `matchedElement`s matching\n // `b`, the candidates to test against `a` are the immediately\n // preceding siblings of each cursor's `matchedElement`.\n if (sibling && matchesCompoundSelector(sibling, compoundSelector)) {\n return {\n target,\n complexSelectorParts,\n matchedElement: sibling,\n index,\n };\n }\n\n return [];\n } else if (combinator === '~') {\n const results = [];\n\n // For `a ~ b`, where existing cursors have `matchedElement`s matching\n // `b`, the candidates to test against `a` are all preceding siblings\n // of each cursor's `matchedElement`.\n for (\n let sibling =\n matchedElement[utils.SHADY_PREFIX + 'previousElementSibling'];\n sibling;\n sibling = sibling[utils.SHADY_PREFIX + 'previousElementSibling']\n ) {\n if (matchesCompoundSelector(sibling, compoundSelector)) {\n results.push({\n target,\n complexSelectorParts,\n matchedElement: sibling,\n index,\n });\n }\n }\n\n return results;\n } else {\n // As of writing, there are no other combinators:\n // <https://drafts.csswg.org/selectors/#combinators>\n throw new Error(`Unrecognized combinator: '${combinator}'.`);\n }\n })\n );\n }\n\n // Map remaining cursors to their `target` and deduplicate.\n return utils.deduplicate(cursors.map(({target}) => target));\n};\n\nconst querySelectorImplementation =\n utils.settings['querySelectorImplementation'];\n\nexport const QueryPatches = utils.getOwnPropertyDescriptors({\n /**\n * @this {!ParentNode}\n * @param {string} selector\n */\n querySelector(selector) {\n if (querySelectorImplementation === 'native') {\n // Polyfilled `ShadowRoot`s don't have a native `querySelectorAll`.\n const target =\n this instanceof ShadowRoot\n ? /** @type {!ShadowRoot} */ (this).host\n : this;\n const candidates = Array.prototype.slice.call(\n target[utils.NATIVE_PREFIX + 'querySelectorAll'](selector)\n );\n const root = this[utils.SHADY_PREFIX + 'getRootNode']();\n // This could use `find`, but Closure doesn't polyfill it.\n for (const candidate of candidates) {\n if (candidate[utils.SHADY_PREFIX + 'getRootNode']() == root) {\n return candidate;\n }\n }\n return null;\n } else if (querySelectorImplementation === 'selectorEngine') {\n return logicalQuerySelectorAll(this, selector)[0] || null;\n } else if (querySelectorImplementation === undefined) {\n // match selector and halt on first result.\n let result = query(\n this,\n function (n) {\n return utils.matchesSelector(n, selector);\n },\n function (n) {\n return Boolean(n);\n }\n )[0];\n return result || null;\n } else {\n throw new Error(\n 'Unrecognized value of ShadyDOM.querySelectorImplementation: ' +\n `'${querySelectorImplementation}'`\n );\n }\n },\n\n /**\n * @this {!ParentNode}\n * @param {string} selector\n * @param {boolean} useNative\n */\n querySelectorAll(selector, useNative) {\n if (useNative || querySelectorImplementation === 'native') {\n // Polyfilled `ShadowRoot`s don't have a native `querySelectorAll`.\n const target =\n this instanceof ShadowRoot\n ? /** @type {!ShadowRoot} */ (this).host\n : this;\n const candidates = Array.prototype.slice.call(\n target[utils.NATIVE_PREFIX + 'querySelectorAll'](selector)\n );\n const root = this[utils.SHADY_PREFIX + 'getRootNode']();\n return utils.createPolyfilledHTMLCollection(\n candidates.filter(\n (e) => e[utils.SHADY_PREFIX + 'getRootNode']() == root\n )\n );\n } else if (querySelectorImplementation === 'selectorEngine') {\n return utils.createPolyfilledHTMLCollection(\n logicalQuerySelectorAll(this, selector)\n );\n } else if (querySelectorImplementation === undefined) {\n return utils.createPolyfilledHTMLCollection(\n query(this, function (n) {\n return utils.matchesSelector(n, selector);\n })\n );\n } else {\n throw new Error(\n 'Unrecognized value of ShadyDOM.querySelectorImplementation: ' +\n `'${querySelectorImplementation}'`\n );\n }\n },\n});\n\n// In preferPerformance mode, create a custom `ParentNodeDocumentOrFragment`\n// that optionally does not mixin querySelector/All; this is a performance\n// optimization. In noPatch, we need to keep the query patches here in order to\n// ensure the query API is available on the wrapper\nexport const ParentNodeDocumentOrFragmentPatches =\n utils.settings.preferPerformance && !utils.settings.noPatch\n ? utils.assign({}, ParentNodePatches)\n : ParentNodePatches;\n\nutils.assign(ParentNodePatches, QueryPatches);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n\nexport const ChildNodePatches = utils.getOwnPropertyDescriptors({\n /** @this {Element} */\n after(...args) {\n const parentNode = this[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode === null) {\n return;\n }\n const nextSibling = this[utils.SHADY_PREFIX + 'nextSibling'];\n parentNode[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n nextSibling\n );\n },\n\n /** @this {Element} */\n before(...args) {\n const parentNode = this[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode === null) {\n return;\n }\n parentNode[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n this\n );\n },\n\n /** @this {Element} */\n remove() {\n const parentNode = this[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode === null) {\n return;\n }\n parentNode[utils.SHADY_PREFIX + 'removeChild'](this);\n },\n\n /** @this {Element} */\n replaceWith(...args) {\n const parentNode = this[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode === null) {\n return;\n }\n const nextSibling = this[utils.SHADY_PREFIX + 'nextSibling'];\n parentNode[utils.SHADY_PREFIX + 'removeChild'](this);\n parentNode[utils.SHADY_PREFIX + 'insertBefore'](\n utils.convertNodesIntoANode(...args),\n nextSibling\n );\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {scopeClassAttribute} from '../style-scoping.js';\nimport {shadyDataForNode} from '../shady-data.js';\nimport {attachShadow, ownerShadyRootForNode} from '../attach-shadow.js';\n// prettier-ignore\nimport {eventPropertyNamesForElement, wrappedDescriptorForEventProperty} from '../patch-events.js';\n\nconst doc = window.document;\n\n/**\n * Should be called whenever an attribute changes. If the `slot` attribute\n * changes, provokes rendering if necessary. If a `<slot>` element's `name`\n * attribute changes, updates the root's slot map and renders.\n * @param {Node} node\n * @param {string} name\n */\nfunction distributeAttributeChange(node, name) {\n if (name === 'slot') {\n const parent = node[utils.SHADY_PREFIX + 'parentNode'];\n if (utils.hasShadowRootWithSlot(parent)) {\n shadyDataForNode(parent).root._asyncRender();\n }\n } else if (node.localName === 'slot' && name === 'name') {\n let root = ownerShadyRootForNode(node);\n if (root) {\n root._updateSlotName(node);\n root._asyncRender();\n }\n }\n}\n\nexport const ElementPatches = utils.getOwnPropertyDescriptors({\n /** @this {Element} */\n get previousElementSibling() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.previousSibling !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'previousSibling'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'previousSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'previousElementSibling'];\n }\n },\n\n /** @this {Element} */\n get nextElementSibling() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.nextSibling !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'nextSibling'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'nextSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'nextElementSibling'];\n }\n },\n\n /** @this {Element} */\n get slot() {\n return this.getAttribute('slot');\n },\n\n /** @this {Element} */\n set slot(value) {\n this[utils.SHADY_PREFIX + 'setAttribute']('slot', value);\n },\n\n /** @this {Element} */\n get className() {\n return this.getAttribute('class') || '';\n },\n\n /**\n * @this {Element}\n * @param {string} value\n */\n set className(value) {\n this[utils.SHADY_PREFIX + 'setAttribute']('class', value);\n },\n\n /**\n * @this {Element}\n * @param {string} attr\n * @param {string} value\n */\n setAttribute(attr, value) {\n if (this.ownerDocument !== doc) {\n this[utils.NATIVE_PREFIX + 'setAttribute'](attr, value);\n } else if (!scopeClassAttribute(this, attr, value)) {\n this[utils.NATIVE_PREFIX + 'setAttribute'](attr, value);\n distributeAttributeChange(this, attr);\n }\n },\n\n /**\n * @this {Element}\n * @param {string} attr\n */\n removeAttribute(attr) {\n if (this.ownerDocument !== doc) {\n this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);\n } else if (!scopeClassAttribute(this, attr, '')) {\n this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);\n distributeAttributeChange(this, attr);\n } else if (this.getAttribute(attr) === '') {\n // When attr='class', scopeClassAttribute() will handle the change as a\n // side-effect and return `true`, allowing us to get to this branch,\n // which cleans up the 'class' attribute if it's empty and we were\n // supposed to have removed it.\n this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);\n }\n },\n\n /**\n * @this {Element}\n * @param {string} attr\n * @param {boolean | undefined} force\n */\n toggleAttribute(attr, force) {\n if (this.ownerDocument !== doc) {\n return this[utils.NATIVE_PREFIX + 'toggleAttribute'](attr, force);\n } else if (!scopeClassAttribute(this, attr, '')) {\n const result = this[utils.NATIVE_PREFIX + 'toggleAttribute'](attr, force);\n distributeAttributeChange(this, attr);\n return result;\n } else if (this.getAttribute(attr) === '' && !force) {\n // When attr='class', scopeClassAttribute() will handle the change as a\n // side-effect and return `true`, allowing us to get to this branch,\n // which cleans up the 'class' attribute if it's empty and we were\n // supposed to have removed it.\n // We check for `force` being falsey because we only want to clean up on\n // removal of the attribute.\n return this[utils.NATIVE_PREFIX + 'toggleAttribute'](attr, force);\n }\n },\n});\n\nif (!utils.settings.preferPerformance) {\n eventPropertyNamesForElement.forEach((property) => {\n ElementPatches[property] = wrappedDescriptorForEventProperty(property);\n });\n}\n\nexport const ElementShadowPatches = utils.getOwnPropertyDescriptors({\n /**\n * @this {Element}\n * @param {!{mode: string}} options\n */\n attachShadow(options) {\n const root = attachShadow(this, options);\n // TODO(sorvell): Workaround for CE not seeing shadowRoot in `on-demand`\n // noPatch mode. CE's attachShadow patch is overwritten by this patch\n // and cannot set its own special tracking for shadowRoot. It does this\n // to be able to see closed shadowRoots.\n // This is necessary so that the CE polyfill can traverse into nodes\n // with shadowRoot that will under `on-demand` have their childNodes patched.\n this['__CE_shadowRoot'] = root;\n return root;\n },\n\n // Note: Can be patched on element prototype on all browsers.\n // Must be patched on instance on browsers that support native Shadow DOM\n // but do not have builtin accessors (old Chrome).\n /** @this {Element} */\n get shadowRoot() {\n const nodeData = shadyDataForNode(this);\n return (nodeData && nodeData.publicRoot) || null;\n },\n});\n\nutils.assign(ElementPatches, ElementShadowPatches);\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {getInnerHTML} from '../innerHTML.js';\nimport {clearNode} from './Node.js';\n\n/** @type {!Document} */\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nexport const ElementOrShadowRootPatches = utils.getOwnPropertyDescriptors({\n /** @this {Element} */\n get innerHTML() {\n if (utils.isTrackingLogicalChildNodes(this)) {\n const content =\n this.localName === 'template'\n ? /** @type {HTMLTemplateElement} */ (this).content\n : this;\n return getInnerHTML(content, utils.childNodesArray);\n } else {\n return this[utils.NATIVE_PREFIX + 'innerHTML'];\n }\n },\n\n /**\n * @this {Element}\n * @param {string} value\n */\n set innerHTML(value) {\n if (this.localName === 'template') {\n this[utils.NATIVE_PREFIX + 'innerHTML'] = value;\n } else {\n clearNode(this);\n const containerName = this.localName || 'div';\n let htmlContainer;\n if (!this.namespaceURI || this.namespaceURI === inertDoc.namespaceURI) {\n htmlContainer = inertDoc.createElement(containerName);\n } else {\n htmlContainer = inertDoc.createElementNS(\n this.namespaceURI,\n containerName\n );\n }\n if (utils.settings.hasDescriptors) {\n htmlContainer[utils.NATIVE_PREFIX + 'innerHTML'] = value;\n } else {\n htmlContainer.innerHTML = value;\n }\n let firstChild;\n while ((firstChild = htmlContainer[utils.SHADY_PREFIX + 'firstChild'])) {\n this[utils.SHADY_PREFIX + 'insertBefore'](firstChild);\n }\n }\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n// prettier-ignore\nimport {eventPropertyNamesForHTMLElement, wrappedDescriptorForEventProperty} from '../patch-events.js';\nimport {shadyDataForNode} from '../shady-data.js';\n\nexport const HTMLElementPatches = utils.getOwnPropertyDescriptors({\n /** @this {HTMLElement} */\n blur() {\n const nodeData = shadyDataForNode(this);\n let root = nodeData && nodeData.root;\n let shadowActive = root && root.activeElement;\n if (shadowActive) {\n shadowActive[utils.SHADY_PREFIX + 'blur']();\n } else {\n this[utils.NATIVE_PREFIX + 'blur']();\n }\n },\n});\n\nif (!utils.settings.preferPerformance) {\n eventPropertyNamesForHTMLElement.forEach((property) => {\n HTMLElementPatches[property] = wrappedDescriptorForEventProperty(property);\n });\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\nimport {addEventListener, removeEventListener} from '../patch-events.js';\n\nexport const SlotPatches = utils.getOwnPropertyDescriptors({\n /**\n * @this {HTMLSlotElement}\n * @param {Object=} options\n */\n assignedNodes(options) {\n if (this.localName === 'slot') {\n // Force any containing shadowRoot to flush so that distribution occurs\n // and this node has assignedNodes.\n const root = this[utils.SHADY_PREFIX + 'getRootNode']();\n if (root && utils.isShadyRoot(root)) {\n root._render();\n }\n const nodeData = shadyDataForNode(this);\n return nodeData\n ? (options && options.flatten\n ? nodeData.flattenedNodes\n : nodeData.assignedNodes) || []\n : [];\n }\n },\n\n /**\n * @this {HTMLSlotElement}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n addEventListener(type, fn, optionsOrCapture) {\n // NOTE, check if this is a `slot` because these patches are installed on\n // Element where browsers don't have `<slot>`\n if (this.localName !== 'slot' || type === 'slotchange') {\n addEventListener.call(this, type, fn, optionsOrCapture);\n } else {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture),\n };\n }\n const parent = this[utils.SHADY_PREFIX + 'parentNode'];\n if (!parent) {\n throw new Error(\n 'ShadyDOM cannot attach event to slot unless it has a `parentNode`'\n );\n }\n optionsOrCapture.__shadyTarget = this;\n parent[utils.SHADY_PREFIX + 'addEventListener'](\n type,\n fn,\n optionsOrCapture\n );\n }\n },\n\n /**\n * @this {HTMLSlotElement}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n removeEventListener(type, fn, optionsOrCapture) {\n // NOTE, check if this is a `slot` because these patches are installed on\n // Element where browsers don't have `<slot>`\n if (this.localName !== 'slot' || type === 'slotchange') {\n removeEventListener.call(this, type, fn, optionsOrCapture);\n } else {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture),\n };\n }\n const parent = this[utils.SHADY_PREFIX + 'parentNode'];\n if (!parent) {\n throw new Error(\n 'ShadyDOM cannot attach event to slot unless it has a `parentNode`'\n );\n }\n optionsOrCapture.__shadyTarget = this;\n parent[utils.SHADY_PREFIX + 'removeEventListener'](\n type,\n fn,\n optionsOrCapture\n );\n }\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport * as utils from '../utils.js';\nimport {query} from './ParentNode.js';\n\nexport const DocumentOrFragmentPatches = utils.getOwnPropertyDescriptors({\n /**\n * @this {Element}\n * @param {string} id\n */\n getElementById(id) {\n if (id === '') {\n return null;\n }\n let result = query(\n this,\n function (n) {\n return n.id == id;\n },\n function (n) {\n return Boolean(n);\n }\n )[0];\n return result || null;\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {ownerShadyRootForNode} from '../attach-shadow.js';\n\nfunction getDocumentActiveElement() {\n if (utils.settings.hasDescriptors) {\n return document[utils.NATIVE_PREFIX + 'activeElement'];\n } else {\n return document.activeElement;\n }\n}\n\n// Get the element within the given set of roots.\nfunction getElInRoot(roots, el) {\n let elRoot;\n while (\n el &&\n !roots.has((elRoot = el[utils.SHADY_PREFIX + 'getRootNode']()))\n ) {\n el = elRoot.host;\n }\n return el;\n}\n\nfunction getAncestorRoots(docOrRoot) {\n const roots = new Set();\n roots.add(docOrRoot);\n while (utils.isShadyRoot(docOrRoot) && docOrRoot.host) {\n docOrRoot = docOrRoot.host[utils.SHADY_PREFIX + 'getRootNode']();\n roots.add(docOrRoot);\n }\n return roots;\n}\n\nconst USE_NATIVE_DOCUMENT_EFP = 'useNativeDocumentEFP';\n\nconst elementsFromPointProperty =\n utils.NATIVE_PREFIX +\n utils.getPropertyName(Document.prototype, 'elementsFromPoint');\n\nexport const DocumentOrShadowRootPatches = utils.getOwnPropertyDescriptors({\n /** @this {Document|ShadowRoot} */\n get activeElement() {\n let active = getDocumentActiveElement();\n // In IE11, activeElement might be an empty object if the document is\n // contained in an iframe.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10998788/\n if (!active || !active.nodeType) {\n return null;\n }\n let isShadyRoot = !!utils.isShadyRoot(this);\n if (this !== document) {\n // If this node isn't a document or shady root, then it doesn't have\n // an active element.\n if (!isShadyRoot) {\n return null;\n }\n // If this shady root's host is the active element or the active\n // element is not a descendant of the host (in the composed tree),\n // then it doesn't have an active element.\n if (\n this.host === active ||\n !this.host[utils.NATIVE_PREFIX + 'contains'](active)\n ) {\n return null;\n }\n }\n // This node is either the document or a shady root of which the active\n // element is a (composed) descendant of its host; iterate upwards to\n // find the active element's most shallow host within it.\n let activeRoot = ownerShadyRootForNode(active);\n while (activeRoot && activeRoot !== this) {\n active = activeRoot.host;\n activeRoot = ownerShadyRootForNode(active);\n }\n if (this === document) {\n // This node is the document, so activeRoot should be null.\n return activeRoot ? null : active;\n } else {\n // This node is a non-document shady root, and it should be\n // activeRoot.\n return activeRoot === this ? active : null;\n }\n },\n\n /** @this {Document|ShadowRoot} */\n elementsFromPoint(x, y) {\n const nativeResult = document[elementsFromPointProperty](x, y);\n // support optionally opt-ing out for document\n if (this === document && utils.settings[USE_NATIVE_DOCUMENT_EFP]) {\n return nativeResult;\n }\n const nativeArray = utils.arrayFrom(nativeResult);\n // Filter native result to return the element in this root\n // OR an above root.\n // Set containing this root and its ancestor roots.\n const ancestorRoots = getAncestorRoots(this);\n // Use a Set since the elements can repeat.\n const rootedResult = new Set();\n for (let i = 0; i < nativeArray.length; i++) {\n rootedResult.add(getElInRoot(ancestorRoots, nativeArray[i]));\n }\n // Note, for IE compat avoid Array.from(set).\n const r = [];\n rootedResult.forEach((x) => r.push(x));\n return r;\n },\n\n /** @this {Document|ShadowRoot} */\n elementFromPoint(x, y) {\n // support optionally opt-ing out for document\n return this === document && utils.settings[USE_NATIVE_DOCUMENT_EFP]\n ? this[utils.NATIVE_PREFIX + 'elementFromPoint'](x, y)\n : this[utils.SHADY_PREFIX + 'elementsFromPoint'](x, y)[0] || null;\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n\nconst doc = window.document;\n\nexport const DocumentPatches = utils.getOwnPropertyDescriptors({\n // note: Though not technically correct, we fast path `importNode`\n // when called on a node not owned by the main document.\n // This allows, for example, elements that cannot\n // contain custom elements and are therefore not likely to contain shadowRoots\n // to cloned natively. This is a fairly significant performance win.\n /**\n * @this {Document}\n * @param {Node} node\n * @param {boolean} deep\n */\n importNode(node, deep) {\n // A template element normally has no children with shadowRoots, so make\n // sure we always make a deep copy to correctly construct the template.content\n if (node.ownerDocument !== doc || node.localName === 'template') {\n return this[utils.NATIVE_PREFIX + 'importNode'](node, deep);\n }\n let n = this[utils.NATIVE_PREFIX + 'importNode'](node, false);\n if (deep) {\n for (\n let c = node[utils.SHADY_PREFIX + 'firstChild'], nc;\n c;\n c = c[utils.SHADY_PREFIX + 'nextSibling']\n ) {\n nc = this[utils.SHADY_PREFIX + 'importNode'](c, true);\n n[utils.SHADY_PREFIX + 'appendChild'](nc);\n }\n }\n return n;\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport * as utils from '../utils.js';\n// prettier-ignore\nimport {addEventListener, removeEventListener, dispatchEvent} from '../patch-events.js';\n\nexport const WindowPatches = utils.getOwnPropertyDescriptors({\n // Ensure that `dispatchEvent` is patched directly on Window since on\n // IE11, Window does not descend from EventTarget.\n dispatchEvent,\n\n // NOTE: ensure these methods are bound to `window` so that `this` is correct\n // when called directly from global context without a receiver; e.g.\n // `addEventListener(...)`.\n addEventListener: addEventListener.bind(window),\n\n removeEventListener: removeEventListener.bind(window),\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {EventTargetPatches} from './patches/EventTarget.js';\nimport {NodePatches} from './patches/Node.js';\nimport {SlotablePatches} from './patches/Slotable.js';\n// prettier-ignore\nimport {ParentNodePatches, ParentNodeDocumentOrFragmentPatches} from './patches/ParentNode.js';\nimport {ChildNodePatches} from './patches/ChildNode.js';\nimport {ElementPatches, ElementShadowPatches} from './patches/Element.js';\nimport {ElementOrShadowRootPatches} from './patches/ElementOrShadowRoot.js';\nimport {HTMLElementPatches} from './patches/HTMLElement.js';\nimport {SlotPatches} from './patches/Slot.js';\nimport {DocumentOrFragmentPatches} from './patches/DocumentOrFragment.js';\nimport {DocumentOrShadowRootPatches} from './patches/DocumentOrShadowRoot.js';\nimport {DocumentPatches} from './patches/Document.js';\nimport {WindowPatches} from './patches/Window.js';\n\n// Some browsers (IE/Edge) have non-standard HTMLElement accessors.\nconst NonStandardHTMLElement = {};\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'parentElement')) {\n NonStandardHTMLElement.parentElement = NodePatches.parentElement;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'contains')) {\n NonStandardHTMLElement.contains = NodePatches.contains;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'children')) {\n NonStandardHTMLElement.children = ParentNodePatches.children;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML')) {\n NonStandardHTMLElement.innerHTML = ElementOrShadowRootPatches.innerHTML;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'className')) {\n NonStandardHTMLElement.className = ElementPatches.className;\n}\n\n// Avoid patching `innerHTML` if it does not exist on Element (IE)\n// and we can patch accessors (hasDescriptors).\nconst ElementShouldHaveInnerHTML =\n !utils.settings.hasDescriptors || 'innerHTML' in Element.prototype;\n\n// setup patching\nconst patchMap = {\n EventTarget: [EventTargetPatches],\n Node: [NodePatches, !window.EventTarget ? EventTargetPatches : null],\n Text: [SlotablePatches],\n Comment: [SlotablePatches],\n CDATASection: [SlotablePatches],\n ProcessingInstruction: [SlotablePatches],\n Element: [\n ElementPatches,\n ParentNodePatches,\n ChildNodePatches,\n SlotablePatches,\n ElementShouldHaveInnerHTML ? ElementOrShadowRootPatches : null,\n !window.HTMLSlotElement ? SlotPatches : null,\n ],\n HTMLElement: [HTMLElementPatches, NonStandardHTMLElement],\n HTMLSlotElement: [SlotPatches],\n DocumentFragment: [\n ParentNodeDocumentOrFragmentPatches,\n DocumentOrFragmentPatches,\n ],\n Document: [\n DocumentPatches,\n ParentNodeDocumentOrFragmentPatches,\n DocumentOrFragmentPatches,\n DocumentOrShadowRootPatches,\n ],\n Window: [WindowPatches],\n CharacterData: [ChildNodePatches],\n XMLHttpRequest: [!window.EventTarget ? EventTargetPatches : null],\n};\n\nconst getPatchPrototype = (name) => window[name] && window[name].prototype;\n\n// Note, must avoid patching accessors on prototypes when descriptors are not correct\n// because the CustomElements polyfill checks if these exist before patching instances.\n// CustomElements polyfill *only* cares about these accessors.\nconst disallowedNativePatches = utils.settings.hasDescriptors\n ? null\n : ['innerHTML', 'textContent'];\n\n/**\n * Patch a group of accessors on an object.\n * @param {!Object} proto\n * @param {!Array<Object>} list\n * @param {string=} prefix\n * @param {Array=} disallowed\n */\nfunction applyPatchList(proto, list, prefix, disallowed) {\n list.forEach(\n (patch) =>\n proto && patch && utils.patchProperties(proto, patch, prefix, disallowed)\n );\n}\n\n/** @param {string=} prefix */\nexport const applyPatches = (prefix) => {\n const disallowed = prefix ? null : disallowedNativePatches;\n for (let p in patchMap) {\n const proto = getPatchPrototype(p);\n applyPatchList(proto, patchMap[p], prefix, disallowed);\n }\n};\n\nconst PROTO_IS_PATCHED = utils.SHADY_PREFIX + 'protoIsPatched';\n\n// This property is stored directly on these objects, rather than in a local\n// Map, because IE11 has a bug around `defineProperty`/`hasOwnProperty` which\n// breaks Closure Compiler's WeakMap polyfill when using both certain native\n// prototypes (e.g. of CDATASection) and their instances as keys - even if\n// they're isolated to different WeakMaps. Closure's WeakMap polyfill is used\n// transitively by its own Map and Set polyfills, so this bug applies to any\n// situation where either of Map or Set are polyfilled also.\nconst PATCHED_PROTO = utils.SHADY_PREFIX + 'patchedProto';\n\n// Patch non-element prototypes up front so that we don't have to check\n// the type of Node when patching an can always assume we're patching an element.\n['Text', 'Comment', 'CDATASection', 'ProcessingInstruction'].forEach((name) => {\n const ctor = window[name];\n const patchedProto = Object.create(ctor.prototype);\n patchedProto[PROTO_IS_PATCHED] = true;\n applyPatchList(patchedProto, patchMap.EventTarget);\n applyPatchList(patchedProto, patchMap.Node);\n if (patchMap[name]) {\n applyPatchList(patchedProto, patchMap[name]);\n }\n ctor.prototype[PATCHED_PROTO] = patchedProto;\n});\n\nexport const patchElementProto = (proto) => {\n proto[PROTO_IS_PATCHED] = true;\n applyPatchList(proto, patchMap.EventTarget);\n applyPatchList(proto, patchMap.Node);\n applyPatchList(proto, patchMap.Element);\n applyPatchList(proto, patchMap.HTMLElement);\n applyPatchList(proto, patchMap.HTMLSlotElement);\n return proto;\n};\n\nexport const patchNodeProto = (node) => {\n if (node[PROTO_IS_PATCHED] || utils.isShadyRoot(node)) {\n return;\n }\n const nativeProto = Object.getPrototypeOf(node);\n // Note, this hasOwnProperty check is critical to avoid seeing a patched\n // prototype lower in the prototype chain, e.g. if an <s> element has been\n // patched, without this check, an <input> element would get the wrong patch.\n let proto =\n nativeProto.hasOwnProperty(PATCHED_PROTO) && nativeProto[PATCHED_PROTO];\n if (!proto) {\n proto = Object.create(nativeProto);\n patchElementProto(proto);\n nativeProto[PATCHED_PROTO] = proto;\n }\n Object.setPrototypeOf(node, proto);\n};\n\nexport const patchShadowOnElement = () => {\n utils.patchProperties(Element.prototype, ElementShadowPatches);\n};\n\nexport const addShadyPrefixedProperties = () => {\n // perform shady patches\n applyPatches(utils.SHADY_PREFIX);\n\n // install `_activeElement` because some browsers (older Chrome/Safari) do not have\n // a 'configurable' `activeElement` accesssor.\n const descriptor = DocumentOrShadowRootPatches.activeElement;\n Object.defineProperty(document, '_activeElement', descriptor);\n\n // On Window, we're patching `addEventListener` which is a weird auto-bound\n // property that is not directly on the Window prototype.\n utils.patchProperties(Window.prototype, WindowPatches, utils.SHADY_PREFIX);\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from './shady-data.js';\n// prettier-ignore\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-instances.js';\nimport {patchNodeProto} from './patch-prototypes.js';\n\nconst OutsideAccessors = 1;\nconst InsideAcccessors = 2;\n\nconst patchOnDemand = utils.settings.patchOnDemand;\nconst hasDescriptors = utils.settings.hasDescriptors;\n\nfunction patchNode(node, type) {\n if (patchOnDemand) {\n patchNodeProto(node);\n }\n if (!hasDescriptors) {\n if (type === OutsideAccessors) {\n patchOutsideElementAccessors(node);\n } else if (type === InsideAcccessors) {\n patchInsideElementAccessors(node);\n }\n }\n}\n\nfunction linkNode(node, container, containerData, ref_node) {\n patchNode(node, OutsideAccessors);\n ref_node = ref_node || null;\n const nodeData = ensureShadyDataForNode(node);\n const ref_nodeData = ref_node ? ensureShadyDataForNode(ref_node) : null;\n // update ref_node.previousSibling <-> node\n nodeData.previousSibling = ref_node\n ? ref_nodeData.previousSibling\n : container[utils.SHADY_PREFIX + 'lastChild'];\n let psd = shadyDataForNode(nodeData.previousSibling);\n if (psd) {\n psd.nextSibling = node;\n }\n // update node <-> ref_node\n let nsd = shadyDataForNode((nodeData.nextSibling = ref_node));\n if (nsd) {\n nsd.previousSibling = node;\n }\n // update node <-> container\n nodeData.parentNode = container;\n if (ref_node) {\n if (ref_node === containerData.firstChild) {\n containerData.firstChild = node;\n }\n } else {\n containerData.lastChild = node;\n if (!containerData.firstChild) {\n containerData.firstChild = node;\n }\n }\n // remove caching of childNodes\n containerData.childNodes = null;\n}\n\nexport const recordInsertBefore = (node, container, ref_node) => {\n patchNode(container, InsideAcccessors);\n const containerData = ensureShadyDataForNode(container);\n if (containerData.firstChild !== undefined) {\n containerData.childNodes = null;\n }\n // handle document fragments\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // Note, documentFragments should not have logical DOM so there's\n // no need update that. It is possible to append a ShadowRoot, but we're\n // choosing not to support that.\n const first = node[utils.NATIVE_PREFIX + 'firstChild'];\n for (let n = first; n; n = n[utils.NATIVE_PREFIX + 'nextSibling']) {\n linkNode(n, container, containerData, ref_node);\n }\n } else {\n linkNode(node, container, containerData, ref_node);\n }\n};\n\nexport const recordRemoveChild = (node, container) => {\n const nodeData = ensureShadyDataForNode(node);\n const containerData = ensureShadyDataForNode(container);\n if (node === containerData.firstChild) {\n containerData.firstChild = nodeData.nextSibling;\n }\n if (node === containerData.lastChild) {\n containerData.lastChild = nodeData.previousSibling;\n }\n let p = nodeData.previousSibling;\n let n = nodeData.nextSibling;\n if (p) {\n ensureShadyDataForNode(p).nextSibling = n;\n }\n if (n) {\n ensureShadyDataForNode(n).previousSibling = p;\n }\n // When an element is removed, logical data is no longer tracked.\n // Explicitly set `undefined` here to indicate this. This is disginguished\n // from `null` which is set if info is null.\n nodeData.parentNode = nodeData.previousSibling = nodeData.nextSibling = undefined;\n if (containerData.childNodes !== undefined) {\n // remove caching of childNodes\n containerData.childNodes = null;\n }\n};\n\n/**\n * @param {!Node|DocumentFragment} node\n * @param {!Node|DocumentFragment=} adoptedParent\n */\nexport const recordChildNodes = (node, adoptedParent) => {\n const nodeData = ensureShadyDataForNode(node);\n if (!adoptedParent && nodeData.firstChild !== undefined) {\n return;\n }\n // remove caching of childNodes\n nodeData.childNodes = null;\n const first = (nodeData.firstChild =\n node[utils.NATIVE_PREFIX + 'firstChild']);\n nodeData.lastChild = node[utils.NATIVE_PREFIX + 'lastChild'];\n patchNode(node, InsideAcccessors);\n for (let n = first, previous; n; n = n[utils.NATIVE_PREFIX + 'nextSibling']) {\n const sd = ensureShadyDataForNode(n);\n sd.parentNode = adoptedParent || node;\n sd.nextSibling = n[utils.NATIVE_PREFIX + 'nextSibling'];\n sd.previousSibling = previous || null;\n previous = n;\n patchNode(n, OutsideAccessors);\n }\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n\nexport const ShadowRootPatches = utils.getOwnPropertyDescriptors({\n /**\n * @this {ShadowRoot}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n addEventListener(type, fn, optionsOrCapture) {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture),\n };\n }\n // Note, `__shadyTarget` may already be set if an event was added on a <slot> child\n optionsOrCapture.__shadyTarget = optionsOrCapture.__shadyTarget || this;\n this.host[utils.SHADY_PREFIX + 'addEventListener'](\n type,\n fn,\n optionsOrCapture\n );\n },\n\n /**\n * @this {ShadowRoot}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n removeEventListener(type, fn, optionsOrCapture) {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture),\n };\n }\n // Note, `__shadyTarget` may already be set if an event was added on a <slot> child\n optionsOrCapture.__shadyTarget = optionsOrCapture.__shadyTarget || this;\n this.host[utils.SHADY_PREFIX + 'removeEventListener'](\n type,\n fn,\n optionsOrCapture\n );\n },\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {NodePatches} from './patches/Node.js';\n// prettier-ignore\nimport {OutsideDescriptors, InsideDescriptors, TextContentInnerHTMLDescriptors} from './patch-instances.js';\nimport {ParentNodePatches} from './patches/ParentNode.js';\nimport {DocumentOrFragmentPatches} from './patches/DocumentOrFragment.js';\nimport {DocumentOrShadowRootPatches} from './patches/DocumentOrShadowRoot.js';\nimport {ElementOrShadowRootPatches} from './patches/ElementOrShadowRoot.js';\nimport {ShadowRootPatches} from './patches/ShadowRoot.js';\n\n/**\n * @param {!Object} proto\n * @param {string=} prefix\n */\nconst patchShadyAccessors = (proto, prefix) => {\n utils.patchProperties(proto, ShadowRootPatches, prefix);\n utils.patchProperties(proto, DocumentOrShadowRootPatches, prefix);\n utils.patchProperties(proto, ElementOrShadowRootPatches, prefix);\n // We ensure ParentNode accessors since these do not exist in Edge/IE on DocumentFragments.\n utils.patchProperties(proto, ParentNodePatches, prefix);\n // Ensure `shadowRoot` has basic descriptors when we cannot rely\n // on them coming from DocumentFragment.\n //\n // Case 1, noPatching: Because we want noPatch ShadyRoots to have native property\n // names so that they do not have to be wrapped...\n // When we do *not* patch Node/DocumentFragment.prototype\n // we must manually install those properties on ShadyRoot's prototype.\n // Note, it's important to only install these in this mode so as not to stomp\n // over CustomElements polyfill's patches on Node/DocumentFragment methods.\n if (utils.settings.noPatch && !prefix) {\n utils.patchProperties(proto, NodePatches, prefix);\n utils.patchProperties(proto, DocumentOrFragmentPatches, prefix);\n }\n // Case 2, bad descriptors: Ensure accessors are on ShadowRoot.\n // These descriptors are normally used for instance patching but because\n // ShadyRoot can always be patched, just do it to the prototype.\n else if (!utils.settings.hasDescriptors) {\n utils.patchProperties(proto, OutsideDescriptors);\n utils.patchProperties(proto, InsideDescriptors);\n utils.patchProperties(proto, TextContentInnerHTMLDescriptors);\n }\n};\n\nexport const patchShadyRoot = (proto) => {\n proto.__proto__ = DocumentFragment.prototype;\n\n // patch both prefixed and not, even when noPatch == true.\n patchShadyAccessors(proto, utils.SHADY_PREFIX);\n patchShadyAccessors(proto);\n\n // Ensure native properties are all safely wrapped since ShadowRoot is not an\n // actual DocumentFragment instance.\n Object.defineProperties(proto, {\n nodeType: {\n value: Node.DOCUMENT_FRAGMENT_NODE,\n configurable: true,\n },\n nodeName: {\n value: '#document-fragment',\n configurable: true,\n },\n nodeValue: {\n value: null,\n configurable: true,\n },\n });\n\n // make undefined\n ['localName', 'namespaceURI', 'prefix'].forEach((prop) => {\n Object.defineProperty(proto, prop, {\n value: undefined,\n configurable: true,\n });\n });\n\n // defer properties to host\n ['ownerDocument', 'baseURI', 'isConnected'].forEach((prop) => {\n Object.defineProperty(proto, prop, {\n /** @this {ShadowRoot} */\n get() {\n return this.host[prop];\n },\n configurable: true,\n });\n });\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\n// prettier-ignore\nimport {eventPropertyNamesForElement, eventPropertyNamesForHTMLElement} from './patch-events.js';\n\n/** @implements {IWrapper} */\nclass Wrapper {\n /** @param {!Node} node */\n constructor(node) {\n this.node = node;\n }\n\n // node\n addEventListener(name, fn, options) {\n return this.node[utils.SHADY_PREFIX + 'addEventListener'](\n name,\n fn,\n options\n );\n }\n\n removeEventListener(name, fn, options) {\n return this.node[utils.SHADY_PREFIX + 'removeEventListener'](\n name,\n fn,\n options\n );\n }\n\n appendChild(node) {\n return this.node[utils.SHADY_PREFIX + 'appendChild'](node);\n }\n\n insertBefore(node, ref_node) {\n return this.node[utils.SHADY_PREFIX + 'insertBefore'](node, ref_node);\n }\n\n removeChild(node) {\n return this.node[utils.SHADY_PREFIX + 'removeChild'](node);\n }\n\n replaceChild(node, ref_node) {\n return this.node[utils.SHADY_PREFIX + 'replaceChild'](node, ref_node);\n }\n\n cloneNode(deep) {\n return this.node[utils.SHADY_PREFIX + 'cloneNode'](deep);\n }\n\n getRootNode(options) {\n return this.node[utils.SHADY_PREFIX + 'getRootNode'](options);\n }\n\n contains(node) {\n return this.node[utils.SHADY_PREFIX + 'contains'](node);\n }\n\n dispatchEvent(event) {\n return this.node[utils.SHADY_PREFIX + 'dispatchEvent'](event);\n }\n\n // element\n setAttribute(name, value) {\n this.node[utils.SHADY_PREFIX + 'setAttribute'](name, value);\n }\n\n // NOTE: not needed, just here for balance\n getAttribute(name) {\n return this.node[utils.NATIVE_PREFIX + 'getAttribute'](name);\n }\n\n // NOTE: not needed, just here for balance\n hasAttribute(name) {\n return this.node[utils.NATIVE_PREFIX + 'hasAttribute'](name);\n }\n\n removeAttribute(name) {\n this.node[utils.SHADY_PREFIX + 'removeAttribute'](name);\n }\n\n toggleAttribute(name, force) {\n return this.node[utils.SHADY_PREFIX + 'toggleAttribute'](name, force);\n }\n\n attachShadow(options) {\n return this.node[utils.SHADY_PREFIX + 'attachShadow'](options);\n }\n\n /** @return {!Node|undefined} */\n get activeElement() {\n if (\n utils.isShadyRoot(this.node) ||\n this.node.nodeType === Node.DOCUMENT_NODE\n ) {\n const e = this.node[utils.SHADY_PREFIX + 'activeElement'];\n return e;\n }\n return undefined;\n }\n\n /**\n * Installed for compatibility with browsers (older Chrome/Safari) that do\n * not have a configurable `activeElement` accessor. Enables noPatch and\n * patch mode both to consistently use ShadyDOM.wrap(document)._activeElement.\n * @override\n * @return {!Node|undefined}\n */\n get _activeElement() {\n return this.activeElement;\n }\n\n // NOTE: not needed, just here for balance\n /** @override */\n focus() {\n this.node[utils.NATIVE_PREFIX + 'focus']();\n }\n\n blur() {\n this.node[utils.SHADY_PREFIX + 'blur']();\n }\n\n // document\n importNode(node, deep) {\n if (this.node.nodeType === Node.DOCUMENT_NODE) {\n return this.node[utils.SHADY_PREFIX + 'importNode'](node, deep);\n }\n }\n\n getElementById(id) {\n if (this.node.nodeType === Node.DOCUMENT_NODE) {\n return this.node[utils.SHADY_PREFIX + 'getElementById'](id);\n }\n }\n\n elementsFromPoint(x, y) {\n return this.node[utils.SHADY_PREFIX + 'elementsFromPoint'](x, y);\n }\n\n elementFromPoint(x, y) {\n return this.node[utils.SHADY_PREFIX + 'elementFromPoint'](x, y);\n }\n\n // query\n querySelector(selector) {\n return this.node[utils.SHADY_PREFIX + 'querySelector'](selector);\n }\n\n querySelectorAll(selector, useNative) {\n return this.node[utils.SHADY_PREFIX + 'querySelectorAll'](\n selector,\n useNative\n );\n }\n\n // slot\n assignedNodes(options) {\n if (this.node.localName === 'slot') {\n return this.node[utils.SHADY_PREFIX + 'assignedNodes'](options);\n }\n }\n\n get host() {\n if (utils.isShadyRoot(this.node)) {\n return /** @type {!ShadowRoot} */ (this.node).host;\n }\n return undefined;\n }\n\n get parentNode() {\n return this.node[utils.SHADY_PREFIX + 'parentNode'];\n }\n\n get firstChild() {\n return this.node[utils.SHADY_PREFIX + 'firstChild'];\n }\n\n get lastChild() {\n return this.node[utils.SHADY_PREFIX + 'lastChild'];\n }\n\n get nextSibling() {\n return this.node[utils.SHADY_PREFIX + 'nextSibling'];\n }\n\n get previousSibling() {\n return this.node[utils.SHADY_PREFIX + 'previousSibling'];\n }\n\n get childNodes() {\n return this.node[utils.SHADY_PREFIX + 'childNodes'];\n }\n\n get parentElement() {\n return this.node[utils.SHADY_PREFIX + 'parentElement'];\n }\n\n get firstElementChild() {\n return this.node[utils.SHADY_PREFIX + 'firstElementChild'];\n }\n\n get lastElementChild() {\n return this.node[utils.SHADY_PREFIX + 'lastElementChild'];\n }\n\n get nextElementSibling() {\n return this.node[utils.SHADY_PREFIX + 'nextElementSibling'];\n }\n\n get previousElementSibling() {\n return this.node[utils.SHADY_PREFIX + 'previousElementSibling'];\n }\n\n get children() {\n return this.node[utils.SHADY_PREFIX + 'children'];\n }\n\n get childElementCount() {\n return this.node[utils.SHADY_PREFIX + 'childElementCount'];\n }\n\n get shadowRoot() {\n return this.node[utils.SHADY_PREFIX + 'shadowRoot'];\n }\n\n get assignedSlot() {\n return this.node[utils.SHADY_PREFIX + 'assignedSlot'];\n }\n\n get isConnected() {\n return this.node[utils.SHADY_PREFIX + 'isConnected'];\n }\n\n get innerHTML() {\n return this.node[utils.SHADY_PREFIX + 'innerHTML'];\n }\n\n set innerHTML(value) {\n this.node[utils.SHADY_PREFIX + 'innerHTML'] = value;\n }\n\n get textContent() {\n return this.node[utils.SHADY_PREFIX + 'textContent'];\n }\n\n set textContent(value) {\n this.node[utils.SHADY_PREFIX + 'textContent'] = value;\n }\n\n get slot() {\n return this.node[utils.SHADY_PREFIX + 'slot'];\n }\n\n set slot(value) {\n this.node[utils.SHADY_PREFIX + 'slot'] = value;\n }\n\n get className() {\n return this.node[utils.SHADY_PREFIX + 'className'];\n }\n\n set className(value) {\n this.node[utils.SHADY_PREFIX + 'className'] = value;\n }\n\n append(...args) {\n return this.node[utils.SHADY_PREFIX + 'append'](...args);\n }\n\n prepend(...args) {\n return this.node[utils.SHADY_PREFIX + 'prepend'](...args);\n }\n\n replaceChildren(...args) {\n return this.node[utils.SHADY_PREFIX + 'replaceChildren'](...args);\n }\n\n after(...args) {\n return this.node[utils.SHADY_PREFIX + 'after'](...args);\n }\n\n before(...args) {\n return this.node[utils.SHADY_PREFIX + 'before'](...args);\n }\n\n remove() {\n return this.node[utils.SHADY_PREFIX + 'remove']();\n }\n\n replaceWith(...args) {\n return this.node[utils.SHADY_PREFIX + 'replaceWith'](...args);\n }\n}\n\nconst addEventPropertyWrapper = (name) => {\n Object.defineProperty(Wrapper.prototype, name, {\n /** @this {Wrapper} */\n get() {\n return this.node[utils.SHADY_PREFIX + name];\n },\n /** @this {Wrapper} */\n set(value) {\n this.node[utils.SHADY_PREFIX + name] = value;\n },\n configurable: true,\n });\n};\n\neventPropertyNamesForElement.forEach((name) => addEventPropertyWrapper(name));\neventPropertyNamesForHTMLElement.forEach((name) =>\n addEventPropertyWrapper(name)\n);\n\nexport {Wrapper};\n\nconst wrapperMap = new WeakMap();\n\nexport function wrap(obj) {\n if (utils.isShadyRoot(obj) || obj instanceof Wrapper) {\n return obj;\n }\n let wrapper = wrapperMap.get(obj);\n if (!wrapper) {\n wrapper = new Wrapper(obj);\n wrapperMap.set(obj, wrapper);\n }\n return wrapper;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Patches elements that interacts with ShadyDOM\n * such that tree traversal and mutation apis act like they would under\n * ShadowDOM.\n *\n * This import enables seemless interaction with ShadyDOM powered\n * custom elements, enabling better interoperation with 3rd party code,\n * libraries, and frameworks that use DOM tree manipulation apis.\n */\n\nimport * as utils from './utils.js';\nimport {flush, enqueue} from './flush.js';\n// prettier-ignore\nimport {observeChildren, unobserveChildren, filterMutations} from './observe-changes.js';\n// prettier-ignore\nimport {addNativePrefixedProperties, nativeMethods, nativeTree} from './patch-native.js';\n// prettier-ignore\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-instances.js';\nimport {patchEvents, patchClick, composedPath} from './patch-events.js';\nimport {ShadyRoot} from './attach-shadow.js';\nimport {wrap, Wrapper} from './wrapper.js';\n// prettier-ignore\nimport {addShadyPrefixedProperties, applyPatches, patchShadowOnElement, patchElementProto} from './patch-prototypes.js';\n\nif (utils.settings.inUse) {\n const patch = utils.settings.hasDescriptors\n ? (n) => n\n : (node) => {\n patchInsideElementAccessors(node);\n patchOutsideElementAccessors(node);\n return node;\n };\n\n let ShadyDOM = {\n // TODO(sorvell): remove when Polymer does not depend on this.\n 'inUse': utils.settings.inUse,\n // NOTE: old browsers without prototype accessors (very old Chrome\n // and Safari) need manually patched accessors to properly set\n // `innerHTML` and `textContent` when an element is:\n // (1) inside a shadowRoot\n // (2) does not have special (slot) children itself\n // (3) and setting the property needs to provoke distribution (because\n // a nested slot is added/removed)\n 'patch': patch,\n 'isShadyRoot': utils.isShadyRoot,\n 'enqueue': enqueue,\n 'flush': flush,\n 'flushInitial': (root) => {\n root._flushInitial();\n },\n 'settings': utils.settings,\n 'filterMutations': filterMutations,\n 'observeChildren': observeChildren,\n 'unobserveChildren': unobserveChildren,\n // Set to true to defer native custom elements connection until the\n // document has fully parsed. This enables custom elements that create\n // shadowRoots to be defined while the document is loading. Elements\n // customized as they are created by the parser will successfully\n // render with this flag on.\n 'deferConnectionCallbacks': utils.settings['deferConnectionCallbacks'],\n // Set to true to speed up the polyfill slightly at the cost of correctness\n // * does not patch querySelector/All on Document or DocumentFragment\n // * does not wrap connected/disconnected callbacks to de-dup these\n // when using native customElements\n // * does not wait to process children of elements with shadowRoots\n // meaning shadowRoots should not be created while an element is parsing\n // (e.g. if a custom element that creates a shadowRoot is defined before\n // a candidate element in the document below it.\n 'preferPerformance': utils.settings['preferPerformance'],\n // Integration point with ShadyCSS to disable styling MutationObserver,\n // as ShadyDOM will now handle dynamic scoping.\n 'handlesDynamicScoping': true,\n // Ensure the node is wrapped. This should be used when `noPatch` is set\n // to ensure Shadow DOM compatible DOM operation.\n // Note, wrap falls back to patch so that it ensures API \"always just works\"\n 'wrap': utils.settings.noPatch ? wrap : patch,\n // When code should be compatible with `noPatch` `true` and `on-demand`\n // settings, `wrapIfNeeded` can be used for optimal performance (v. `wrap`)\n // for all DOM operations except the following: `appendChild` and\n // `insertBefore` (when the node is being moved from a location where it\n // was logically positioned in the DOM); when setting `className`/`class`;\n // when calling `querySelector|All`; when setting `textContent` or\n // `innerHTML`; `addEventListener`, `removeEventListener` and\n // `dispatchEvent`; and all scope specific API's like `getRootNode`,\n // `isConnected`, `slot`, `assignedSlot`, `assignedNodes`. Note,\n // `wrapIfNeeded` falls back to a pass through to preserve optimal\n // performance.\n 'wrapIfNeeded': utils.settings.noPatch === true ? wrap : (n) => n,\n 'Wrapper': Wrapper,\n 'composedPath': composedPath,\n // Set to true to avoid patching regular platform property names. When set,\n // Shadow DOM compatible behavior is only available when accessing DOM\n // API using `ShadyDOM.wrap`, e.g. `ShadyDOM.wrap(element).shadowRoot`.\n // This setting provides a small performance boost, but requires all DOM API\n // access that requires Shadow DOM behavior to be proxied via `ShadyDOM.wrap`.\n //\n // WARNING: When `noPatch` is set and the Custom Elements polyfill is\n // needed, the Custom Elements polyfill must be loaded before this\n // polyfill; however, when `noPatch` is not used, this polyfill should be\n // loaded before the Custom Elements polyfill. This is because\n // ShadyDOM captures DOM mutation methods and when `noPatch` is used,\n // ShadyDOM must call the mutation methods patched by the Custom Elements\n // polyfill or custom elements will not function as expected. When `noPatch`\n // is not used, the Custom Elements polyfill patches call through to the\n // ShadyDOM patches so ShadyDOM should be loaded first.\n 'noPatch': utils.settings.noPatch,\n 'patchOnDemand': utils.settings.patchOnDemand,\n 'nativeMethods': nativeMethods,\n 'nativeTree': nativeTree,\n 'patchElementProto': patchElementProto,\n // Use this setting to choose the implementation of `querySelector` and\n // `querySelectorAll`. The options provide different tradeoffs between\n // accuracy and performance, as explained below. More specifically, the\n // logical tree exposed by Shady DOM through the DOM APIs it wraps doesn't\n // match the structure of the tree seen by the browser (the 'real tree'), so\n // the degree to which the browser itself is used to match selectors affects\n // this tradeoff.\n //\n // - `undefined` (default): Shady DOM will walk the logical descendants of\n // the context element and call `matches` with the given selector to find\n // matching elements.\n //\n // This option is a balance between accuracy and performance. This option\n // will be able to match all logical descendants of the context element\n // (i.e. including descendants of unassigned nodes) but selectors are\n // matched against the real tree, so complex selectors may fail to match\n // since their combinators will attempt to match against the structure of\n // the real tree. Generally, you should only pass compound selectors when\n // using the default implementation. This implementation also breaks the\n // semantics of `:scope` because the wrapped `querySelector` call is\n // translated into many `matches` calls on different elements.\n //\n // - `'native'`: Shady DOM's wrapper for (e.g.) `querySelector` will call\n // into the native `querySelector` function and then filter out results that\n // are not in the same shadow root in the logical tree.\n //\n // This is the fastest option. This option will not match elements that\n // are logical descendants of unassigned nodes because they will not be in\n // the real tree, against which the browser matches the selector. Like the\n // default option, this option may not correctly match complex selectors\n // (i.e. those with combinators) due to the structural differences between\n // the real tree and the logical tree. This option preserves the semantics\n // of `:scope` because the context element of the call to the wrapper is\n // also the context element of the call to the native function.\n //\n // - `'selectorEngine'`: Shady DOM's wrapper for (e.g.) `querySelector` will\n // partially parse the given selector list and perform the tree-traversal\n // steps of a selector engine against the logical tree.\n //\n // This is the slowest and most accurate option. This option is able to\n // find all logical descendants of the context element by manually walking\n // the tree. This option is also able to correctly match complex selectors\n // because it does not rely on the browser to handle combinators. Despite\n // using `matches` to match compound selectors during selector evaluation,\n // this option preserves the semantics of `:scope` by only considering\n // compound selectors containing `:scope` to be matching if the context\n // element of the `matches` call is also the context element of the\n // wrapper call.\n //\n // However, the parser used for this option is not strictly correct.\n // Notable caveats include:\n //\n // - The parser assumes the selector list it's given is syntactically\n // correct. When given a selector that would not parse under a full\n // implementation, this implementation may fail silently.\n //\n // - Nested selectors are _not_ taken into consideration while walking\n // the tree. Each outer-most compound selector is tested against\n // candidate elements as a whole, without modification. This means that\n // selectors nested in arguments of functional pseudo-classes, such as\n // `a > b` in `:is(a > b)`, are still matched by the browser against the\n // real tree, not Shady DOM's logical tree.\n //\n // - `:scope` is only supported at the top-level. Particularly, if the\n // text `:scope` appears anywhere within a compound selector, then the\n // selector engine will only allow that compound selector to match the\n // context element. Having the text `:scope` inside a string\n // (`x[y=\":scope\"]`) or an argument to a functional pseudo-selector\n // (`:not(:scope > x)`) will likely break your selector.\n //\n // - The `:host` and `:host-context` pseudo-classes are not supported.\n //\n // - Comments are not supported. (e.g. `a /* b */ c`)\n //\n // - The (draft) column combinator is not supported. (e.g. `a || b`)\n 'querySelectorImplementation':\n utils.settings['querySelectorImplementation'],\n };\n\n window['ShadyDOM'] = ShadyDOM;\n\n // Modifies native prototypes for Node, Element, etc. to\n // make native platform behavior available at prefixed names, e.g.\n // `utils.NATIVE_PREFIX + 'firstChild'` or `__shady_native_firstChild`.\n // This allows the standard names to be safely patched while retaining the\n // ability for native behavior to be used. This polyfill manipulates DOM\n // by using this saved native behavior.\n // Note, some browsers do not have proper element descriptors for\n // accessors; in this case, native behavior for these accessors is simulated\n // via a TreeWalker.\n addNativePrefixedProperties();\n\n // Modifies native prototypes for Node, Element, etc. to make ShadowDOM\n // behavior available at prefixed names, e.g.\n // `utils.SHADY_PREFIX + 'firstChild` or `__shady_firstChild`. This is done\n // so this polyfill can perform Shadow DOM style DOM manipulation.\n // Because patching normal platform property names is optional, these prefixed\n // names are used internally.\n addShadyPrefixedProperties();\n\n // Modifies native prototypes for Node, Element, etc. to patch\n // regular platform property names to have Shadow DOM compatible API behavior.\n // This applies the utils.SHADY_PREFIX behavior to normal names. For example,\n // if `noPatch` is not set, then `el.__shady_firstChild` is equivalent to\n // `el.firstChild`.\n // NOTE, on older browsers (old Chrome/Safari) native accessors cannot be\n // patched on prototypes (e.g. Node.prototype.firstChild cannot be modified).\n // On these browsers, instance level patching is performed where needed; this\n // instance patching is only done when `noPatch` is *not* set.\n if (!utils.settings.noPatch) {\n applyPatches();\n // Patch click event behavior only if we're patching\n patchClick();\n } else if (utils.settings.patchOnDemand) {\n // In `on-demand` patching, do patch `attachShadow` and `shadowRoot`.\n // These are the only patched properties in `on-demand` mode and these\n // patches kick off patching \"on-demand\" for other nodes.\n patchShadowOnElement();\n }\n\n // For simplicity, patch events unconditionally.\n // Patches the event system to have Shadow DOM compatible behavior (e.g.\n // event retargeting). When `noPatch` is set, retargeting is only available\n // when adding event listeners and dispatching events via `ShadyDOM.wrap`\n // (e.g. `ShadyDOM.wrap(element).addEventListener(...)`).\n patchEvents();\n\n window.ShadowRoot = /** @type {function(new:ShadowRoot)} */ (ShadyRoot);\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const Document_createElement = window.Document.prototype.createElement;\nexport const Document_createElementNS =\n window.Document.prototype.createElementNS;\nexport const Document_importNode = window.Document.prototype.importNode;\n\nexport const Document_prepend = window.Document.prototype['prepend'];\nexport const Document_append = window.Document.prototype['append'];\nexport const DocumentFragment_prepend =\n window.DocumentFragment.prototype['prepend'];\nexport const DocumentFragment_append =\n window.DocumentFragment.prototype['append'];\nexport const Node_cloneNode = window.Node.prototype.cloneNode;\nexport const Node_appendChild = window.Node.prototype.appendChild;\nexport const Node_insertBefore = window.Node.prototype.insertBefore;\nexport const Node_removeChild = window.Node.prototype.removeChild;\nexport const Node_replaceChild = window.Node.prototype.replaceChild;\nexport const Node_textContent = Object.getOwnPropertyDescriptor(\n window.Node.prototype,\n 'textContent'\n);\nexport const Element_attachShadow = window.Element.prototype['attachShadow'];\nexport const Element_innerHTML = Object.getOwnPropertyDescriptor(\n window.Element.prototype,\n 'innerHTML'\n);\nexport const Element_getAttribute = window.Element.prototype.getAttribute;\nexport const Element_setAttribute = window.Element.prototype.setAttribute;\nexport const Element_removeAttribute = window.Element.prototype.removeAttribute;\nexport const Element_toggleAttribute = window.Element.prototype.toggleAttribute;\nexport const Element_getAttributeNS = window.Element.prototype.getAttributeNS;\nexport const Element_setAttributeNS = window.Element.prototype.setAttributeNS;\nexport const Element_removeAttributeNS =\n window.Element.prototype.removeAttributeNS;\nexport const Element_insertAdjacentElement =\n window.Element.prototype['insertAdjacentElement'];\nexport const Element_insertAdjacentHTML =\n window.Element.prototype['insertAdjacentHTML'];\nexport const Element_prepend = window.Element.prototype['prepend'];\nexport const Element_append = window.Element.prototype['append'];\nexport const Element_before = window.Element.prototype['before'];\nexport const Element_after = window.Element.prototype['after'];\nexport const Element_replaceWith = window.Element.prototype['replaceWith'];\nexport const Element_remove = window.Element.prototype['remove'];\nexport const HTMLElement = window.HTMLElement;\nexport const HTMLElement_innerHTML = Object.getOwnPropertyDescriptor(\n window.HTMLElement.prototype,\n 'innerHTML'\n);\nexport const HTMLElement_insertAdjacentElement =\n window.HTMLElement.prototype['insertAdjacentElement'];\nexport const HTMLElement_insertAdjacentHTML =\n window.HTMLElement.prototype['insertAdjacentHTML'];\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nconst reservedElementNameSet = new Set<string>();\n// IE11 does not support constructing a set using an iterable.\n[\n 'annotation-xml',\n 'color-profile',\n 'font-face',\n 'font-face-src',\n 'font-face-uri',\n 'font-face-format',\n 'font-face-name',\n 'missing-glyph',\n].forEach((item) => reservedElementNameSet.add(item));\n\nexport function isValidCustomElementName(localName: string) {\n const reserved = reservedElementNameSet.has(localName);\n const validForm = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(localName);\n return !reserved && validForm;\n}\n\n// Note, IE11 doesn't have `document.contains`.\nconst nativeContains = document.contains\n ? document.contains.bind(document)\n : document.documentElement.contains.bind(document.documentElement);\n\nexport function isConnected(node: Node) {\n // Use `Node#isConnected`, if defined.\n const nativeValue = node.isConnected;\n if (nativeValue !== undefined) {\n return nativeValue;\n }\n // Optimization: It's significantly faster here to try to use `contains`,\n // especially on Edge/IE/\n if (nativeContains(node)) {\n return true;\n }\n\n let current: Node | undefined = node;\n while (\n current &&\n !(current.__CE_isImportDocument || current instanceof Document)\n ) {\n current =\n current.parentNode ||\n (window.ShadowRoot && current instanceof ShadowRoot\n ? current.host\n : undefined);\n }\n return !!(\n current &&\n (current.__CE_isImportDocument || current instanceof Document)\n );\n}\n\nexport function childrenFromFragment(\n fragment: DocumentFragment\n): Array<Element> {\n // Note, IE doesn't have `children` on document fragments.\n const nativeChildren = fragment.children;\n if (nativeChildren) {\n return Array.prototype.slice.call(nativeChildren);\n }\n const children: Array<Element> = [];\n for (let n = fragment.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.ELEMENT_NODE) {\n children.push(n as Element);\n }\n }\n return children;\n}\n\nfunction nextSiblingOrAncestorSibling(root: Node, start: Node) {\n let node: Node | null = start;\n while (node && node !== root && !node.nextSibling) {\n node = node.parentNode;\n }\n return !node || node === root ? null : node.nextSibling;\n}\n\nfunction nextNode(root: Node, start: Node) {\n return start.firstChild\n ? start.firstChild\n : nextSiblingOrAncestorSibling(root, start);\n}\n\nexport function walkDeepDescendantElements(\n root: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set<Node>\n) {\n let node: Node | null = root;\n while (node) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n\n callback(element);\n\n const localName = element.localName;\n if (localName === 'link' && element.getAttribute('rel') === 'import') {\n // If this import (polyfilled or not) has its root node available,\n // walk it.\n const importNode = (element as HTMLLinkElement).import;\n if (visitedImports === undefined) {\n visitedImports = new Set();\n }\n if (importNode instanceof Node && !visitedImports.has(importNode)) {\n // Prevent multiple walks of the same import root.\n visitedImports.add(importNode);\n\n for (\n let child = importNode.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n\n // Ignore descendants of import links to prevent attempting to walk the\n // elements created by the HTML Imports polyfill that we just walked\n // above.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n } else if (localName === 'template') {\n // Ignore descendants of templates. There shouldn't be any descendants\n // because they will be moved into `.content` during construction in\n // browsers that support template but, in case they exist and are still\n // waiting to be moved by a polyfill, they will be ignored.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n }\n\n // Walk shadow roots.\n const shadowRoot = element.__CE_shadowRoot;\n if (shadowRoot) {\n for (\n let child = shadowRoot.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n }\n\n node = nextNode(root, node);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport {CustomElementState as CEState} from './CustomElementState.js';\nimport * as Native from './Patch/Native.js';\nimport * as Utilities from './Utilities.js';\n\nconst NS_HTML = 'http://www.w3.org/1999/xhtml';\n\nexport default class CustomElementInternals {\n private readonly _patchesNode: Array<(node: Node) => void> = [];\n private readonly _patchesElement: Array<(elem: Element) => void> = [];\n private _hasPatches = false;\n public readonly shadyDomFastWalk: boolean;\n public readonly useDocumentConstructionObserver: boolean;\n\n constructor(options: {\n shadyDomFastWalk: boolean;\n noDocumentConstructionObserver: boolean;\n }) {\n this.shadyDomFastWalk = options.shadyDomFastWalk;\n this.useDocumentConstructionObserver = !options.noDocumentConstructionObserver;\n }\n\n forEachElement(\n node: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set<Node>\n ) {\n const sd = window['ShadyDOM'];\n if (this.shadyDomFastWalk && sd && sd['inUse']) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n callback(element);\n }\n // most easily gets to document, element, documentFragment\n if ((node as Element).querySelectorAll!) {\n const elements = sd['nativeMethods'].querySelectorAll.call(node, '*');\n for (let i = 0; i < elements.length; i++) {\n callback(elements[i]);\n }\n }\n } else {\n Utilities.walkDeepDescendantElements(node, callback, visitedImports);\n }\n }\n\n addNodePatch(patch: (node: Node) => void) {\n this._hasPatches = true;\n this._patchesNode.push(patch);\n }\n\n addElementPatch(patch: (element: Element) => void) {\n this._hasPatches = true;\n this._patchesElement.push(patch);\n }\n\n patchTree(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n this.forEachElement(node, (element) => this.patchElement(element));\n }\n\n patchNode(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n if (node.__CE_patched) {\n return;\n }\n node.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](node);\n }\n }\n\n patchElement(element: Element) {\n if (!this._hasPatches) {\n return;\n }\n\n if (element.__CE_patched) {\n return;\n }\n element.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](element);\n }\n\n for (let i = 0; i < this._patchesElement.length; i++) {\n this._patchesElement[i](element);\n }\n }\n\n connectTree(root: Node) {\n const elements: Array<Element> = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.connectedCallback(element);\n } else {\n this.upgradeReaction(element as HTMLElement);\n }\n }\n }\n\n disconnectTree(root: Node) {\n const elements: Array<Element> = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.disconnectedCallback(element);\n }\n }\n }\n\n /**\n * Upgrades all uncustomized custom elements at and below a root node for\n * which there is a definition. When custom element reaction callbacks are\n * assumed to be called synchronously (which, by the current DOM / HTML spec\n * definitions, they are *not*), callbacks for both elements customized\n * synchronously by the parser and elements being upgraded occur in the same\n * relative order.\n *\n * NOTE: This function, when used to simulate the construction of a tree\n * that is already created but not customized (i.e. by the parser), does\n * *not* prevent the element from reading the 'final' (true) state of the\n * tree. For example, the element, during truly synchronous parsing /\n * construction would see that it contains no children as they have not yet\n * been inserted. However, this function does not modify the tree, the\n * element will (incorrectly) have children. Additionally, self-modification\n * restrictions for custom element constructors imposed by the DOM spec are\n * *not* enforced.\n *\n *\n * The following nested list shows the steps extending down from the HTML\n * spec's parsing section that cause elements to be synchronously created\n * and upgraded:\n *\n * The \"in body\" insertion mode:\n * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n * - Switch on token:\n * .. other cases ..\n * -> Any other start tag\n * - [Insert an HTML element](below) for the token.\n *\n * Insert an HTML element:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element\n * - Insert a foreign element for the token in the HTML namespace:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element\n * - Create an element for a token:\n * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token\n * - Will execute script flag is true?\n * - (Element queue pushed to the custom element reactions stack.)\n * - Create an element:\n * https://dom.spec.whatwg.org/#concept-create-element\n * - Sync CE flag is true?\n * - Constructor called.\n * - Self-modification restrictions enforced.\n * - Sync CE flag is false?\n * - (Upgrade reaction enqueued.)\n * - Attributes appended to element.\n * (`attributeChangedCallback` reactions enqueued.)\n * - Will execute script flag is true?\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n * - (Element queue pushed to the custom element reactions stack.)\n * - Insert the element:\n * https://dom.spec.whatwg.org/#concept-node-insert\n * - Shadow-including descendants are connected. During parsing\n * construction, there are no shadow-*excluding* descendants.\n * However, the constructor may have validly attached a shadow\n * tree to itself and added descendants to that shadow tree.\n * (`connectedCallback` reactions enqueued.)\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n */\n patchAndUpgradeTree(\n root: Node,\n options: {\n visitedImports?: Set<Node>;\n upgrade?: (elem: HTMLElement) => void;\n } = {}\n ) {\n const visitedImports = options.visitedImports;\n const upgrade =\n options.upgrade || ((element) => this.upgradeReaction(element));\n\n const elements: Array<Element> = [];\n\n const gatherElements = (element: Element) => {\n if (this._hasPatches) {\n this.patchElement(element);\n }\n if (\n element.localName === 'link' &&\n element.getAttribute('rel') === 'import'\n ) {\n const importElem = element as HTMLLinkElement;\n // The HTML Imports polyfill sets a descendant element of the link to\n // the `import` property, specifically this is *not* a Document.\n const importNode = importElem.import;\n\n if (importNode instanceof Node) {\n importNode.__CE_isImportDocument = true;\n // Connected links are associated with the global registry.\n importNode.__CE_registry = document.__CE_registry;\n }\n\n if (importNode && importNode.readyState === 'complete') {\n importNode.__CE_documentLoadHandled = true;\n } else {\n // If this link's import root is not available, its contents can't\n // be walked. Wait for 'load' and walk it when it's ready.\n element.addEventListener('load', () => {\n const importNode = importElem.import!;\n\n if (importNode.__CE_documentLoadHandled) {\n return;\n }\n importNode.__CE_documentLoadHandled = true;\n\n // Clone the `visitedImports` set that was populated sync during\n // the `patchAndUpgradeTree` call that caused this 'load' handler\n // to be added. Then, remove *this* link's import node so that we\n // can walk that import again, even if it was partially walked\n // later during the same `patchAndUpgradeTree` call.\n const clonedVisitedImports = new Set<Node>();\n if (visitedImports) {\n // IE11 does not support constructing a set using an iterable.\n visitedImports.forEach((item) => clonedVisitedImports.add(item));\n clonedVisitedImports.delete(importNode);\n }\n this.patchAndUpgradeTree(importNode, {\n visitedImports: clonedVisitedImports,\n upgrade,\n });\n });\n }\n } else {\n elements.push(element);\n }\n };\n\n // `forEachElement` populates (and internally checks against)\n // `visitedImports` when traversing a loaded import.\n this.forEachElement(root, gatherElements, visitedImports);\n\n for (let i = 0; i < elements.length; i++) {\n upgrade(elements[i] as HTMLElement);\n }\n }\n\n upgradeReaction(element: HTMLElement) {\n try {\n const definition = this._lookupACustomElementDefinition(\n element.ownerDocument!,\n element.localName\n );\n if (definition) {\n this._upgradeAnElement(element, definition);\n }\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element\n */\n private _upgradeAnElement(\n element: HTMLElement,\n definition: CustomElementDefinition\n ) {\n const currentState = element.__CE_state;\n if (currentState !== undefined) {\n return;\n }\n\n definition.constructionStack.push(element);\n\n try {\n try {\n const result = new definition.constructorFunction();\n if (result !== element) {\n throw new Error(\n 'The custom element constructor did not produce the element being upgraded.'\n );\n }\n } finally {\n definition.constructionStack.pop();\n }\n } catch (e) {\n element.__CE_state = CEState.failed;\n throw e;\n }\n\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n\n // Check `hasAttributes` here to avoid iterating when it's not necessary.\n if (definition.attributeChangedCallback && element.hasAttributes()) {\n const observedAttributes = definition.observedAttributes;\n for (let i = 0; i < observedAttributes.length; i++) {\n const name = observedAttributes[i];\n const value = element.getAttribute(name);\n if (value !== null) {\n this.attributeChangedCallback(element, name, null, value, null);\n }\n }\n }\n\n if (Utilities.isConnected(element)) {\n this.connectedCallback(element);\n }\n }\n\n connectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.connectedCallback) {\n try {\n definition.connectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n disconnectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.disconnectedCallback) {\n try {\n definition.disconnectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n attributeChangedCallback(\n element: Element,\n name: string,\n oldValue?: string | null,\n newValue?: string | null,\n namespace?: string | null\n ) {\n const definition = element.__CE_definition!;\n if (\n definition.attributeChangedCallback &&\n definition.observedAttributes.indexOf(name) > -1\n ) {\n try {\n definition.attributeChangedCallback.call(\n element,\n name,\n oldValue,\n newValue,\n namespace\n );\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n /**\n * Runs HTML's 'look up a custom element definition', excluding the namespace\n * check.\n *\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n */\n private _lookupACustomElementDefinition(\n doc: Document,\n localName: string\n ): CustomElementDefinition | undefined {\n // The document must be associated with a registry.\n const registry = doc.__CE_registry;\n if (!registry) {\n return;\n }\n\n // Prevent elements created in documents without a browsing context from\n // upgrading.\n //\n // https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n // \"If document does not have a browsing context, return null.\"\n //\n // https://html.spec.whatwg.org/multipage/window-object.html#dom-document-defaultview\n // \"The defaultView IDL attribute of the Document interface, on getting,\n // must return this Document's browsing context's WindowProxy object, if\n // this Document has an associated browsing context, or null otherwise.\"\n if (!doc.defaultView && !doc.__CE_isImportDocument) {\n return;\n }\n\n return registry.internal_localNameToDefinition(localName);\n }\n\n /**\n * Runs the DOM's 'create an element'. If namespace is not null, then the\n * native `createElementNS` is used. Otherwise, `createElement` is used.\n *\n * Note, the template polyfill only wraps `createElement`, preventing this\n * function from using `createElementNS` in all cases.\n *\n * @see https://dom.spec.whatwg.org/#concept-create-element\n */\n createAnElement(\n doc: Document,\n localName: string,\n namespace: string | null\n ): Element {\n const registry = doc.__CE_registry;\n // Only create custom elements if the document is associated with a\n // registry.\n if (registry && (namespace === null || namespace === NS_HTML)) {\n const definition = ((registry as unknown) as CustomElementRegistry).internal_localNameToDefinition(\n localName\n );\n if (definition) {\n try {\n const result = new definition.constructorFunction();\n\n // These conformance checks can't be performed when the user calls\n // the element's constructor themselves. However, this also true in\n // native implementations.\n\n if (\n result.__CE_state === undefined ||\n result.__CE_definition === undefined\n ) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The returned value was not constructed with the HTMLElement ' +\n 'constructor.'\n );\n }\n\n if (result.namespaceURI !== NS_HTML) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's namespace must be the HTML \" +\n 'namespace.'\n );\n }\n\n // The following Errors should be DOMExceptions but DOMException\n // isn't constructible in all browsers.\n\n if (result.hasAttributes()) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any attributes.'\n );\n }\n\n // ShadyDOM doesn't wrap `#hasChildNodes`, so we check `#firstChild`\n // instead.\n if (result.firstChild !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any children.'\n );\n }\n\n if (result.parentNode !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have a parent node.'\n );\n }\n\n if (result.ownerDocument !== doc) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's owner document is incorrect.\"\n );\n }\n\n if (result.localName !== localName) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's local name is incorrect.\"\n );\n }\n\n return result;\n } catch (e: unknown) {\n this.reportTheException(e);\n\n // When construction fails, a new HTMLUnknownElement is produced.\n // However, there's no direct way to create one, so we create a\n // regular HTMLElement and replace its prototype.\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n Object.setPrototypeOf(result, HTMLUnknownElement.prototype);\n result.__CE_state = CEState.failed;\n result.__CE_definition = undefined;\n this.patchElement(result);\n return result;\n }\n }\n }\n\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n this.patchElement(result);\n return result;\n }\n\n /**\n * Runs the DOM's 'report the exception' algorithm.\n *\n * @see https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception\n */\n reportTheException(arg: unknown) {\n interface ExtendedError extends Error {\n // Non-standard Safari properties.\n sourceURL?: string;\n line?: number;\n column?: number;\n\n // Non-standard Firefox properties.\n fileName?: string;\n lineNumber?: number;\n columnNumber?: number;\n }\n\n let message = '';\n let filename = '';\n let lineno = 0;\n let colno = 0;\n\n if (arg instanceof Error) {\n const error = arg as ExtendedError;\n message = error.message;\n filename = error.sourceURL || error.fileName || '';\n lineno = error.line || error.lineNumber || 0;\n colno = error.column || error.columnNumber || 0;\n } else {\n message = `Uncaught ${String(arg)}`;\n }\n\n let event: ErrorEvent | undefined = undefined;\n if (ErrorEvent.prototype.initErrorEvent === undefined) {\n event = new ErrorEvent('error', {\n cancelable: true,\n message,\n filename,\n lineno,\n colno,\n error: arg,\n });\n } else {\n event = document.createEvent('ErrorEvent') as ErrorEvent;\n // initErrorEvent(type, bubbles, cancelable, message, filename, line)\n event.initErrorEvent!('error', false, true, message, filename, lineno);\n // Hack for IE, where ErrorEvent#preventDefault does not set\n // #defaultPrevented to true.\n event.preventDefault = function (this: ErrorEvent) {\n Object.defineProperty(this, 'defaultPrevented', {\n configurable: true,\n get: function (this: ErrorEvent) {\n return true;\n },\n });\n };\n }\n\n if (event.error === undefined) {\n Object.defineProperty(event, 'error', {\n configurable: true,\n enumerable: true,\n get: function () {\n return arg;\n },\n });\n }\n\n window.dispatchEvent(event);\n if (!event.defaultPrevented) {\n // In 'report the exception', UAs may optionally write errors to the\n // console if their associated ErrorEvent isn't handled during dispatch\n // (indicated by calling `preventDefault`). In practice, these errors are\n // always displayed.\n console.error(arg);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport PatchDocument from './Patch/Document.js';\nimport PatchDocumentFragment from './Patch/DocumentFragment.js';\nimport PatchElement from './Patch/Element.js';\nimport PatchHTMLElement from './Patch/HTMLElement.js';\nimport PatchNode from './Patch/Node.js';\n\nconst priorCustomElements = window['customElements'];\n\nfunction installPolyfill() {\n const noDocumentConstructionObserver = !!priorCustomElements?.[\n 'noDocumentConstructionObserver'\n ];\n const shadyDomFastWalk = !!priorCustomElements?.['shadyDomFastWalk'];\n\n const internals = new CustomElementInternals({\n noDocumentConstructionObserver,\n shadyDomFastWalk,\n });\n\n PatchHTMLElement(internals);\n PatchDocument(internals);\n PatchDocumentFragment(internals);\n PatchNode(internals);\n PatchElement(internals);\n\n window[\n 'CustomElementRegistry'\n ] = (CustomElementRegistry as unknown) as typeof window['CustomElementRegistry'];\n\n const customElements = new CustomElementRegistry(internals);\n\n // The main document is associated with the global registry.\n document.__CE_registry = customElements;\n\n Object.defineProperty(window, 'customElements', {\n configurable: true,\n enumerable: true,\n value: customElements,\n });\n}\n\nif (\n !priorCustomElements ||\n priorCustomElements['forcePolyfill'] ||\n typeof priorCustomElements['define'] != 'function' ||\n typeof priorCustomElements['get'] != 'function'\n) {\n installPolyfill();\n}\n\n// This is NOT public API and is only meant to work around a GC bug in older\n// versions of Safari that randomly removes the polyfill during tests.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(window as any)['__CE_installPolyfill'] = installPolyfill;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const CustomElementState = {\n custom: 1,\n failed: 2,\n} as const;\nexport type CustomElementState =\n | typeof CustomElementState.custom\n | typeof CustomElementState.failed;\n\nexport default CustomElementState;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport default class Deferred<T> {\n private _value: T | undefined = undefined;\n\n private _resolve!: (val: T) => void;\n\n private readonly _promise: Promise<T>;\n constructor() {\n this._promise = new Promise((resolve) => {\n this._resolve = resolve;\n });\n }\n\n resolve(value: T) {\n if (this._value) {\n throw new Error('Already resolved.');\n }\n\n this._value = value;\n this._resolve(value);\n }\n\n toPromise() {\n return this._promise;\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\n\nexport default class DocumentConstructionObserver {\n private readonly _internals: CustomElementInternals;\n private readonly _document: Document;\n private _observer: MutationObserver | undefined = undefined;\n constructor(internals: CustomElementInternals, doc: Document) {\n this._internals = internals;\n this._document = doc;\n\n // Simulate tree construction for all currently accessible nodes in the\n // document.\n this._internals.patchAndUpgradeTree(this._document);\n\n if (this._document.readyState === 'loading') {\n this._observer = new MutationObserver(this._handleMutations.bind(this));\n\n // Nodes created by the parser are given to the observer *before* the next\n // task runs. Inline scripts are run in a new task. This means that the\n // observer will be able to handle the newly parsed nodes before the\n // inline script is run.\n this._observer.observe(this._document, {\n childList: true,\n subtree: true,\n });\n }\n }\n\n disconnect() {\n if (this._observer) {\n this._observer.disconnect();\n }\n }\n\n private _handleMutations(mutations: ReadonlyArray<MutationRecord>) {\n // Once the document's `readyState` is 'interactive' or 'complete', all new\n // nodes created within that document will be the result of script and\n // should be handled by patching.\n const readyState = this._document.readyState;\n if (readyState === 'interactive' || readyState === 'complete') {\n this.disconnect();\n }\n\n for (let i = 0; i < mutations.length; i++) {\n const addedNodes = mutations[i].addedNodes;\n for (let j = 0; j < addedNodes.length; j++) {\n const node = addedNodes[j];\n this._internals.patchAndUpgradeTree(node);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport {AlreadyConstructedMarkerType} from './AlreadyConstructedMarker.js';\nimport CustomElementInternals from './CustomElementInternals.js';\nimport Deferred from './Deferred.js';\nimport DocumentConstructionObserver from './DocumentConstructionObserver.js';\nimport * as Utilities from './Utilities.js';\n\ninterface ElementConstructor {\n new (): HTMLElement;\n observedAttributes?: Array<string>;\n}\ntype ConstructorGetter = () => ElementConstructor;\n\n/**\n * @unrestricted\n */\nexport default class CustomElementRegistry {\n private readonly _localNameToConstructorGetter = new Map<\n string,\n ConstructorGetter\n >();\n private readonly _localNameToDefinition = new Map<\n string,\n CustomElementDefinition\n >();\n private readonly _constructorToDefinition = new Map<\n ElementConstructor,\n CustomElementDefinition\n >();\n private _elementDefinitionIsRunning = false;\n private readonly _internals: CustomElementInternals;\n private readonly _whenDefinedDeferred = new Map<\n string,\n Deferred<undefined>\n >();\n\n /**\n * The default flush callback triggers the document walk synchronously.\n */\n private _flushCallback: (fn: () => void) => void = (fn) => fn();\n private _flushPending = false;\n\n /**\n * A map from `localName`s of definitions that were defined *after* the\n * last flush to unupgraded elements matching that definition, in document\n * order. Entries are added to this map when a definition is registered,\n * but the list of elements is only populated during a flush after which\n * all of the entries are removed. DO NOT edit outside of `#_flush`.\n */\n private readonly _unflushedLocalNames: Array<string> = [];\n\n private readonly _documentConstructionObserver:\n | DocumentConstructionObserver\n | undefined;\n\n constructor(internals: CustomElementInternals) {\n this._internals = internals;\n this._documentConstructionObserver = internals.useDocumentConstructionObserver\n ? new DocumentConstructionObserver(internals, document)\n : undefined;\n }\n\n polyfillDefineLazy(localName: string, constructorGetter: ConstructorGetter) {\n if (!(constructorGetter instanceof Function)) {\n throw new TypeError(\n 'Custom element constructor getters must be functions.'\n );\n }\n this.internal_assertCanDefineLocalName(localName);\n this._localNameToConstructorGetter.set(localName, constructorGetter);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n define(localName: string, constructor: Function) {\n if (!(constructor instanceof Function)) {\n throw new TypeError('Custom element constructors must be functions.');\n }\n\n this.internal_assertCanDefineLocalName(localName);\n\n this.internal_reifyDefinition(localName, constructor as ElementConstructor);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n internal_assertCanDefineLocalName(localName: string) {\n if (!Utilities.isValidCustomElementName(localName)) {\n throw new SyntaxError(`The element name '${localName}' is not valid.`);\n }\n\n if (this.internal_localNameToDefinition(localName)) {\n throw new Error(\n `A custom element with name ` +\n `'${localName}' has already been defined.`\n );\n }\n\n if (this._elementDefinitionIsRunning) {\n throw new Error('A custom element is already being defined.');\n }\n }\n\n internal_reifyDefinition(localName: string, constructor: ElementConstructor) {\n this._elementDefinitionIsRunning = true;\n\n let connectedCallback: CustomElementDefinition['connectedCallback'];\n let disconnectedCallback: CustomElementDefinition['disconnectedCallback'];\n let adoptedCallback: CustomElementDefinition['adoptedCallback'];\n let attributeChangedCallback: CustomElementDefinition['attributeChangedCallback'];\n let observedAttributes: CustomElementDefinition['observedAttributes'];\n try {\n const prototype = constructor.prototype;\n if (!(prototype instanceof Object)) {\n throw new TypeError(\n \"The custom element constructor's prototype is not an object.\"\n );\n }\n\n type CEReactionCallback =\n | 'connectedCallback'\n | 'disconnectedCallback'\n | 'adoptedCallback'\n | 'attributeChangedCallback';\n const getCallback = function getCallback(name: CEReactionCallback) {\n const callbackValue = prototype[name];\n if (\n callbackValue !== undefined &&\n !(callbackValue instanceof Function)\n ) {\n throw new Error(`The '${name}' callback must be a function.`);\n }\n return callbackValue;\n };\n\n connectedCallback = getCallback('connectedCallback');\n disconnectedCallback = getCallback('disconnectedCallback');\n adoptedCallback = getCallback('adoptedCallback');\n attributeChangedCallback = getCallback('attributeChangedCallback');\n // `observedAttributes` should not be read unless an\n // `attributesChangedCallback` exists\n observedAttributes =\n (attributeChangedCallback && constructor['observedAttributes']) || [];\n // eslint-disable-next-line no-useless-catch\n } catch (e) {\n throw e;\n } finally {\n this._elementDefinitionIsRunning = false;\n }\n\n const definition = {\n localName,\n constructorFunction: constructor,\n connectedCallback,\n disconnectedCallback,\n adoptedCallback,\n attributeChangedCallback,\n observedAttributes,\n constructionStack: [] as Array<\n HTMLElement | AlreadyConstructedMarkerType\n >,\n };\n\n this._localNameToDefinition.set(localName, definition);\n this._constructorToDefinition.set(\n definition.constructorFunction,\n definition\n );\n\n return definition;\n }\n\n upgrade(node: Node): void {\n this._internals.patchAndUpgradeTree(node);\n }\n\n private _flush() {\n // If no new definitions were defined, don't attempt to flush. This could\n // happen if a flush callback keeps the function it is given and calls it\n // multiple times.\n if (this._flushPending === false) {\n return;\n }\n this._flushPending = false;\n\n /**\n * Unupgraded elements with definitions that were defined *before* the last\n * flush, in document order.\n */\n const elementsWithStableDefinitions: Array<HTMLElement> = [];\n\n const unflushedLocalNames = this._unflushedLocalNames;\n const elementsWithPendingDefinitions = new Map<\n string,\n Array<HTMLElement>\n >();\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n elementsWithPendingDefinitions.set(unflushedLocalNames[i], []);\n }\n\n this._internals.patchAndUpgradeTree(document, {\n upgrade: (element) => {\n // Ignore the element if it has already upgraded or failed to upgrade.\n if (element.__CE_state !== undefined) {\n return;\n }\n\n const localName = element.localName;\n\n // If there is an applicable pending definition for the element, add the\n // element to the list of elements to be upgraded with that definition.\n const pendingElements = elementsWithPendingDefinitions.get(localName);\n if (pendingElements) {\n pendingElements.push(element);\n // If there is *any other* applicable definition for the element, add\n // it to the list of elements with stable definitions that need to be\n // upgraded.\n } else if (this._localNameToDefinition.has(localName)) {\n elementsWithStableDefinitions.push(element);\n }\n },\n });\n\n // Upgrade elements with 'stable' definitions first.\n for (let i = 0; i < elementsWithStableDefinitions.length; i++) {\n this._internals.upgradeReaction(elementsWithStableDefinitions[i]);\n }\n\n // Upgrade elements with 'pending' definitions in the order they were\n // defined.\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n const localName = unflushedLocalNames[i];\n const pendingUpgradableElements = elementsWithPendingDefinitions.get(\n localName\n )!;\n\n // Attempt to upgrade all applicable elements.\n for (let i = 0; i < pendingUpgradableElements.length; i++) {\n this._internals.upgradeReaction(pendingUpgradableElements[i]);\n }\n\n // Resolve any promises created by `whenDefined` for the definition.\n const deferred = this._whenDefinedDeferred.get(localName);\n if (deferred) {\n deferred.resolve(undefined);\n }\n }\n\n unflushedLocalNames.length = 0;\n }\n\n get(localName: string): undefined | {new (): HTMLElement} {\n const definition = this.internal_localNameToDefinition(localName);\n if (definition) {\n return definition.constructorFunction;\n }\n\n return undefined;\n }\n\n whenDefined(localName: string): Promise<void> {\n if (!Utilities.isValidCustomElementName(localName)) {\n return Promise.reject(\n new SyntaxError(`'${localName}' is not a valid custom element name.`)\n );\n }\n\n const prior = this._whenDefinedDeferred.get(localName);\n if (prior) {\n return prior.toPromise();\n }\n\n const deferred = new Deferred<undefined>();\n this._whenDefinedDeferred.set(localName, deferred);\n\n // Resolve immediately if the given local name has a regular or lazy\n // definition *and* the full document walk to upgrade elements with that\n // local name has already happened.\n //\n // The behavior of the returned promise differs between the lazy and the\n // non-lazy cases if the definition fails. Normally, the definition would\n // fail synchronously and no pending promises would resolve. However, if\n // the definition is lazy but has not yet been reified, the promise is\n // resolved early here even though it might fail later when reified.\n const anyDefinitionExists =\n this._localNameToDefinition.has(localName) ||\n this._localNameToConstructorGetter.has(localName);\n const definitionHasFlushed =\n this._unflushedLocalNames.indexOf(localName) === -1;\n if (anyDefinitionExists && definitionHasFlushed) {\n deferred.resolve(undefined);\n }\n\n return deferred.toPromise();\n }\n\n polyfillWrapFlushCallback(outer: (fn: () => void) => void) {\n if (this._documentConstructionObserver) {\n this._documentConstructionObserver.disconnect();\n }\n const inner = this._flushCallback;\n this._flushCallback = (flush) => outer(() => inner(flush));\n }\n\n internal_localNameToDefinition(\n localName: string\n ): CustomElementDefinition | undefined {\n const existingDefinition = this._localNameToDefinition.get(localName);\n if (existingDefinition) {\n return existingDefinition;\n }\n\n const constructorGetter = this._localNameToConstructorGetter.get(localName);\n if (constructorGetter) {\n this._localNameToConstructorGetter.delete(localName);\n try {\n return this.internal_reifyDefinition(localName, constructorGetter());\n } catch (e: unknown) {\n this._internals.reportTheException(e);\n }\n }\n\n return undefined;\n }\n\n internal_constructorToDefinition(\n constructor: ElementConstructor\n ): CustomElementDefinition | undefined {\n return this._constructorToDefinition.get(constructor);\n }\n}\n\n// Closure compiler exports.\n/* eslint-disable no-self-assign */\nCustomElementRegistry.prototype['define'] =\n CustomElementRegistry.prototype.define;\nCustomElementRegistry.prototype['upgrade'] =\n CustomElementRegistry.prototype.upgrade;\nCustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;\nCustomElementRegistry.prototype['whenDefined'] =\n CustomElementRegistry.prototype.whenDefined;\nCustomElementRegistry.prototype['polyfillDefineLazy'] =\n CustomElementRegistry.prototype.polyfillDefineLazy;\nCustomElementRegistry.prototype['polyfillWrapFlushCallback'] =\n CustomElementRegistry.prototype.polyfillWrapFlushCallback;\n/* eslint-enable no-self-assign */\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: Node, ...args: Array<Node | string>) => void;\n\ninterface ParentNodeNativeMethods {\n prepend: NativeMethod;\n append: NativeMethod;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ParentNode,\n builtIn: ParentNodeNativeMethods\n) {\n function appendPrependPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: Node, ...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array<Node | string> = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.prepend !== undefined) {\n destination.prepend = appendPrependPatch(builtIn.prepend);\n }\n\n if (builtIn.append !== undefined) {\n destination.append = appendPrependPatch(builtIn.append);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n Document.prototype.createElement = function (\n this: Document,\n localName: string\n ) {\n return internals.createAnElement(this, localName, null);\n } as typeof Document.prototype.createElement;\n\n Document.prototype.importNode = function <T extends Node>(\n this: Document,\n node: T,\n deep?: boolean\n ): T {\n const clone = Native.Document_importNode.call(this, node, !!deep) as T;\n // Only create custom elements if this document is associated with the\n // registry.\n if (!this.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Document.prototype.createElementNS = function (\n this: Document,\n namespace: string | null,\n localName: string\n ) {\n return internals.createAnElement(this, localName, namespace);\n } as typeof Document.prototype.createElementNS;\n\n PatchParentNode(internals, Document.prototype, {\n prepend: Native.Document_prepend,\n append: Native.Document_append,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: ChildNode, ...args: Array<Node | string>) => void;\n\ninterface ChildNodeNativeMethods {\n before: NativeMethod;\n after: NativeMethod;\n replaceWith: NativeMethod;\n remove: (this: ChildNode) => void;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ChildNode,\n builtIn: ChildNodeNativeMethods\n) {\n function beforeAfterPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: ChildNode, ...nodes) {\n const flattenedNodes: Array<string | Node> = [];\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.before !== undefined) {\n destination.before = beforeAfterPatch(builtIn.before);\n }\n\n if (builtIn.after !== undefined) {\n destination.after = beforeAfterPatch(builtIn.after);\n }\n\n if (builtIn.replaceWith !== undefined) {\n destination.replaceWith = function (\n this: ChildNode,\n ...nodes: Array<Node | string>\n ) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array<Node | string> = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.replaceWith.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (wasConnected) {\n internals.disconnectTree(this);\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.remove !== undefined) {\n destination.remove = function (this: ChildNode) {\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.remove.call(this);\n\n if (wasConnected) {\n internals.disconnectTree(this);\n }\n };\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Utilities from '../Utilities.js';\n\nimport PatchChildNode from './Interface/ChildNode.js';\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n if (Native.Element_attachShadow) {\n Element.prototype.attachShadow = function (\n this: Element,\n init: ShadowRootInit\n ) {\n const shadowRoot = Native.Element_attachShadow.call(this, init);\n internals.patchNode(shadowRoot);\n this.__CE_shadowRoot = shadowRoot;\n return shadowRoot;\n };\n }\n\n function patch_innerHTML(\n destination: Element,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'innerHTML', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Element, htmlString) {\n const isConnected = Utilities.isConnected(this);\n\n // NOTE: In IE11, when using the native `innerHTML` setter, all nodes\n // that were previously descendants of the context element have all of\n // their children removed as part of the set - the entire subtree is\n // 'disassembled'. This work around walks the subtree *before* using the\n // native setter.\n let removedElements: undefined | Array<Element> = undefined;\n if (isConnected) {\n removedElements = [];\n internals.forEachElement(this, (element) => {\n if (element !== this) {\n removedElements!.push(element);\n }\n });\n }\n\n baseDescriptor.set!.call(this, htmlString);\n\n if (removedElements) {\n for (let i = 0; i < removedElements.length; i++) {\n const element = removedElements[i];\n if (element.__CE_state === CEState.custom) {\n internals.disconnectedCallback(element);\n }\n }\n }\n\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(this);\n } else {\n internals.patchAndUpgradeTree(this);\n }\n return htmlString;\n },\n });\n }\n\n if (Native.Element_innerHTML && Native.Element_innerHTML.get) {\n patch_innerHTML(Element.prototype, Native.Element_innerHTML);\n } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {\n patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);\n } else {\n internals.addElementPatch(function (element) {\n patch_innerHTML(element, {\n enumerable: true,\n configurable: true,\n // Implements getting `innerHTML` by performing an unpatched `cloneNode`\n // of the element and returning the resulting element's `innerHTML`.\n // TODO: Is this too expensive?\n get: function (this: Element) {\n return (Native.Node_cloneNode.call(this, true) as Element).innerHTML;\n },\n // Implements setting `innerHTML` by creating an unpatched element,\n // setting `innerHTML` of that element and replacing the target\n // element's children with those of the unpatched element.\n set: function (this: Element, assignedValue) {\n // NOTE: re-route to `content` for `template` elements.\n // We need to do this because `template.appendChild` does not\n // route into `template.content`.\n const isTemplate = this.localName === 'template';\n const content = isTemplate\n ? (this as HTMLTemplateElement).content\n : this;\n const rawElement = Native.Document_createElementNS.call(\n document,\n this.namespaceURI,\n this.localName\n );\n rawElement.innerHTML = assignedValue;\n\n while (content.childNodes.length > 0) {\n Native.Node_removeChild.call(content, content.childNodes[0]);\n }\n const container = isTemplate\n ? (rawElement as HTMLTemplateElement).content\n : rawElement;\n while (container.childNodes.length > 0) {\n Native.Node_appendChild.call(content, container.childNodes[0]);\n }\n },\n });\n });\n }\n\n Element.prototype.setAttribute = function (this: Element, name, newValue) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttribute.call(this, name, newValue);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_setAttribute.call(this, name, newValue);\n newValue = Native.Element_getAttribute.call(this, name)!;\n internals.attributeChangedCallback(this, name, oldValue, newValue, null);\n };\n\n Element.prototype.setAttributeNS = function (\n this: Element,\n namespace,\n name,\n newValue\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttributeNS.call(\n this,\n namespace,\n name,\n newValue\n );\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_setAttributeNS.call(this, namespace, name, newValue);\n newValue = Native.Element_getAttributeNS.call(this, namespace, name)!;\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n };\n\n Element.prototype.removeAttribute = function (this: Element, name) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttribute.call(this, name);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_removeAttribute.call(this, name);\n if (oldValue !== null) {\n internals.attributeChangedCallback(this, name, oldValue, null, null);\n }\n };\n\n if (Native.Element_toggleAttribute) {\n Element.prototype.toggleAttribute = function (\n this: Element,\n name,\n force?: boolean | undefined\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_toggleAttribute.call(this, name, force);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n const hadAttribute = oldValue !== null;\n const hasAttribute = Native.Element_toggleAttribute.call(\n this,\n name,\n force\n );\n if (hadAttribute !== hasAttribute) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n hasAttribute ? '' : null,\n null\n );\n }\n return hasAttribute;\n };\n }\n\n Element.prototype.removeAttributeNS = function (\n this: Element,\n namespace,\n name\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttributeNS.call(this, namespace, name);\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_removeAttributeNS.call(this, namespace, name);\n // In older browsers, `Element#getAttributeNS` may return the empty string\n // instead of null if the attribute does not exist. For details, see;\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes\n const newValue = Native.Element_getAttributeNS.call(this, namespace, name);\n if (oldValue !== newValue) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n }\n };\n\n function patch_insertAdjacentElement(\n destination: Element,\n baseMethod: Element['insertAdjacentElement']\n ) {\n destination.insertAdjacentElement = function (\n this: Element,\n position,\n element\n ) {\n const wasConnected = Utilities.isConnected(element);\n const insertedElement = baseMethod.call(this, position, element)!;\n\n if (wasConnected) {\n internals.disconnectTree(element);\n }\n\n if (Utilities.isConnected(insertedElement)) {\n internals.connectTree(element);\n }\n return insertedElement;\n };\n }\n\n if (Native.HTMLElement_insertAdjacentElement) {\n patch_insertAdjacentElement(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentElement\n );\n } else if (Native.Element_insertAdjacentElement) {\n patch_insertAdjacentElement(\n Element.prototype,\n Native.Element_insertAdjacentElement\n );\n }\n\n function patch_insertAdjacentHTML(\n destination: Element,\n baseMethod: Element['insertAdjacentHTML']\n ) {\n /**\n * Patches and upgrades all nodes which are siblings between `start`\n * (inclusive) and `end` (exclusive). If `end` is `null`, then all siblings\n * following `start` will be patched and upgraded.\n */\n function upgradeNodesInRange(start: Node, end: Node | null) {\n const nodes = [];\n for (let node: Node = start; node !== end; node = node.nextSibling!) {\n nodes.push(node);\n }\n for (let i = 0; i < nodes.length; i++) {\n internals.patchAndUpgradeTree(nodes[i]);\n }\n }\n\n destination.insertAdjacentHTML = function (this: Element, position, text) {\n const strPosition = position.toLowerCase();\n\n if (strPosition === 'beforebegin') {\n const marker = this.previousSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.parentNode!.firstChild!, this);\n } else if (strPosition === 'afterbegin') {\n const marker = this.firstChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.firstChild!, marker);\n } else if (strPosition === 'beforeend') {\n const marker = this.lastChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.firstChild!, null);\n } else if (strPosition === 'afterend') {\n const marker = this.nextSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.nextSibling!, marker);\n } else {\n throw new SyntaxError(\n `The value provided (${String(strPosition)}) is ` +\n \"not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.\"\n );\n }\n };\n }\n\n if (Native.HTMLElement_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentHTML\n );\n } else if (Native.Element_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n Element.prototype,\n Native.Element_insertAdjacentHTML\n );\n }\n\n PatchParentNode(internals, Element.prototype, {\n prepend: Native.Element_prepend,\n append: Native.Element_append,\n });\n\n PatchChildNode(internals, Element.prototype, {\n before: Native.Element_before,\n after: Native.Element_after,\n replaceWith: Native.Element_replaceWith,\n remove: Native.Element_remove,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Represents the 'already constructed marker' used in custom\n * element construction stacks.\n *\n * https://html.spec.whatwg.org/#concept-already-constructed-marker\n */\nconst alreadyConstructedMarker = {} as {_alreadyConstructedMarker: never};\n\nexport default alreadyConstructedMarker;\nexport type AlreadyConstructedMarkerType = typeof alreadyConstructedMarker;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport AlreadyConstructedMarker from '../AlreadyConstructedMarker.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n const PatchedHTMLElement = function HTMLElement(this: HTMLElement) {\n // This should really be `new.target` but `new.target` can't be\n // emulated in ES5. Assuming the user keeps the default value of the\n // constructor's prototype's `constructor` property, this is\n // equivalent.\n const constructor = this.constructor as {new (): HTMLElement};\n\n // Always look up the definition from the global registry.\n const registry = document.__CE_registry!;\n const definition = registry.internal_constructorToDefinition(constructor);\n if (!definition) {\n throw new Error(\n 'Failed to construct a custom element: ' +\n 'The constructor was not registered with `customElements`.'\n );\n }\n\n const constructionStack = definition.constructionStack;\n\n if (constructionStack.length === 0) {\n const element = Native.Document_createElement.call(\n document,\n definition.localName\n ) as HTMLElement;\n Object.setPrototypeOf(element, constructor.prototype as typeof element);\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n internals.patchElement(element);\n return element;\n }\n\n const lastIndex = constructionStack.length - 1;\n const element = constructionStack[lastIndex];\n if (element === AlreadyConstructedMarker) {\n const localName = definition.localName;\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'This element was already constructed.'\n );\n }\n const toConstructElement = element as HTMLElement;\n constructionStack[lastIndex] = AlreadyConstructedMarker;\n\n Object.setPrototypeOf(\n toConstructElement,\n constructor.prototype as typeof toConstructElement\n );\n internals.patchElement(toConstructElement);\n\n return toConstructElement;\n };\n\n PatchedHTMLElement.prototype = Native.HTMLElement.prototype;\n // Safari 9 has `writable: false` on the propertyDescriptor\n // Make it writable so that TypeScript can patch up the\n // constructor in the ES5 compiled code.\n Object.defineProperty(HTMLElement.prototype, 'constructor', {\n writable: true,\n configurable: true,\n enumerable: false,\n value: PatchedHTMLElement,\n });\n\n window['HTMLElement'] = (PatchedHTMLElement as unknown) as typeof HTMLElement;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport * as Utilities from '../Utilities.js';\n\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n // `Node#nodeValue` is implemented on `Attr`.\n // `Node#textContent` is implemented on `Attr`, `Element`.\n\n Node.prototype.insertBefore = function <T extends Node>(\n this: Node,\n node: T,\n refNode: Node | null\n ) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_insertBefore.call(this, node, refNode);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult as T;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_insertBefore.call(\n this,\n node,\n refNode\n ) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.appendChild = function <T extends Node>(this: Node, node: T) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.cloneNode = function (this: Node, deep) {\n const clone = Native.Node_cloneNode.call(this, !!deep);\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Node.prototype.removeChild = function <T extends Node>(this: Node, node: T) {\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_removeChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.replaceChild = function <T extends Node>(\n this: Node,\n nodeToInsert: Node,\n nodeToRemove: T\n ) {\n if (nodeToInsert instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n internals.disconnectTree(nodeToRemove);\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeToInsertWasConnectedElement =\n nodeToInsert instanceof Element && Utilities.isConnected(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n const thisIsConnected = Utilities.isConnected(this);\n\n if (thisIsConnected) {\n internals.disconnectTree(nodeToRemove);\n }\n\n if (nodeToInsertWasConnectedElement) {\n internals.disconnectTree(nodeToInsert);\n }\n\n if (thisIsConnected) {\n internals.connectTree(nodeToInsert);\n }\n\n return nativeResult;\n };\n\n function patch_textContent(\n destination: Node,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'textContent', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Node, assignedValue) {\n // If this is a text node then there are no nodes to disconnect.\n if (this.nodeType === Node.TEXT_NODE) {\n baseDescriptor.set!.call(this, assignedValue);\n return;\n }\n\n let removedNodes = undefined;\n // Checking for `firstChild` is faster than reading `childNodes.length`\n // to compare with 0.\n if (this.firstChild) {\n // Using `childNodes` is faster than `children`, even though we only\n // care about elements.\n const childNodes = this.childNodes;\n const childNodesLength = childNodes.length;\n if (childNodesLength > 0 && Utilities.isConnected(this)) {\n // Copying an array by iterating is faster than using slice.\n removedNodes = new Array(childNodesLength);\n for (let i = 0; i < childNodesLength; i++) {\n removedNodes[i] = childNodes[i];\n }\n }\n }\n\n baseDescriptor.set!.call(this, assignedValue);\n\n if (removedNodes) {\n for (let i = 0; i < removedNodes.length; i++) {\n internals.disconnectTree(removedNodes[i]);\n }\n }\n },\n });\n }\n\n if (Native.Node_textContent && Native.Node_textContent.get) {\n patch_textContent(Node.prototype, Native.Node_textContent);\n } else {\n internals.addNodePatch(function (element) {\n patch_textContent(element, {\n enumerable: true,\n configurable: true,\n // NOTE: This implementation of the `textContent` getter assumes that\n // text nodes' `textContent` getter will not be patched.\n get: function (this: Node) {\n const parts: Array<string | null> = [];\n\n for (let n = this.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.COMMENT_NODE) {\n continue;\n }\n parts.push(n.textContent);\n }\n\n return parts.join('');\n },\n set: function (this: Node, assignedValue) {\n while (this.firstChild) {\n Native.Node_removeChild.call(this, this.firstChild);\n }\n // `textContent = null | undefined | ''` does not result in\n // a TextNode childNode\n if (assignedValue != null && assignedValue !== '') {\n Native.Node_appendChild.call(\n this,\n document.createTextNode(assignedValue)\n );\n }\n },\n });\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n PatchParentNode(internals, DocumentFragment.prototype, {\n prepend: Native.DocumentFragment_prepend,\n append: Native.DocumentFragment_append,\n });\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/*\nExtremely simple css parser. Intended to be not more than what we need\nand definitely not necessarily correct =).\n*/\n\n'use strict';\n\n/** @unrestricted */\nclass StyleNode {\n constructor() {\n /** @type {number} */\n this['start'] = 0;\n /** @type {number} */\n this['end'] = 0;\n /** @type {StyleNode} */\n this['previous'] = null;\n /** @type {StyleNode} */\n this['parent'] = null;\n /** @type {Array<StyleNode>} */\n this['rules'] = null;\n /** @type {string} */\n this['parsedCssText'] = '';\n /** @type {string} */\n this['cssText'] = '';\n /** @type {boolean} */\n this['atRule'] = false;\n /** @type {number} */\n this['type'] = 0;\n /** @type {string} */\n this['keyframesName'] = '';\n /** @type {string} */\n this['selector'] = '';\n /** @type {string} */\n this['parsedSelector'] = '';\n }\n}\n\nexport {StyleNode};\n\n// given a string of css, return a simple rule tree\n/**\n * @param {string} text\n * @return {StyleNode}\n */\nexport function parse(text) {\n text = clean(text);\n return parseCss(lex(text), text);\n}\n\n// remove stuff we don't care about that may hinder parsing\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction clean(cssText) {\n return cssText.replace(RX.comments, '').replace(RX.port, '');\n}\n\n// super simple {...} lexer that returns a node tree\n/**\n * @param {string} text\n * @return {!StyleNode}\n */\nfunction lex(text) {\n let root = new StyleNode();\n root['start'] = 0;\n root['end'] = text.length;\n let n = root;\n for (let i = 0, l = text.length; i < l; i++) {\n if (text[i] === OPEN_BRACE) {\n if (!n['rules']) {\n n['rules'] = [];\n }\n let p = n;\n let previous = p['rules'][p['rules'].length - 1] || null;\n n = new StyleNode();\n n['start'] = i + 1;\n n['parent'] = p;\n n['previous'] = previous;\n p['rules'].push(n);\n } else if (text[i] === CLOSE_BRACE) {\n n['end'] = i + 1;\n n = n['parent'] || root;\n }\n }\n return root;\n}\n\n// add selectors/cssText to node tree\n/**\n * @param {StyleNode} node\n * @param {string} text\n * @return {!StyleNode}\n */\nfunction parseCss(node, text) {\n let t = text.substring(node['start'], node['end'] - 1);\n node['parsedCssText'] = node['cssText'] = t.trim();\n if (node['parent']) {\n let ss = node['previous']\n ? node['previous']['end']\n : node['parent']['start'];\n t = text.substring(ss, node['start'] - 1);\n t = _expandUnicodeEscapes(t);\n t = t.replace(RX.multipleSpaces, ' ');\n // TODO(sorvell): ad hoc; make selector include only after last ;\n // helps with mixin syntax\n t = t.substring(t.lastIndexOf(';') + 1);\n let s = (node['parsedSelector'] = node['selector'] = t.trim());\n node['atRule'] = s.indexOf(AT_START) === 0;\n // note, support a subset of rule types...\n if (node['atRule']) {\n if (s.indexOf(MEDIA_START) === 0) {\n node['type'] = types.MEDIA_RULE;\n } else if (s.match(RX.keyframesRule)) {\n node['type'] = types.KEYFRAMES_RULE;\n node['keyframesName'] = node['selector'].split(RX.multipleSpaces).pop();\n }\n } else {\n if (s.indexOf(VAR_START) === 0) {\n node['type'] = types.MIXIN_RULE;\n } else {\n node['type'] = types.STYLE_RULE;\n }\n }\n }\n let r$ = node['rules'];\n if (r$) {\n for (let i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {\n parseCss(r, text);\n }\n }\n return node;\n}\n\n/**\n * conversion of sort unicode escapes with spaces like `\\33 ` (and longer) into\n * expanded form that doesn't require trailing space `\\000033`\n * @param {string} s\n * @return {string}\n */\nfunction _expandUnicodeEscapes(s) {\n return s.replace(/\\\\([0-9a-f]{1,6})\\s/gi, function () {\n let code = arguments[1],\n repeat = 6 - code.length;\n while (repeat--) {\n code = '0' + code;\n }\n return '\\\\' + code;\n });\n}\n\n/**\n * stringify parsed css.\n * @param {StyleNode} node\n * @param {boolean=} preserveProperties\n * @param {string=} text\n * @return {string}\n */\nexport function stringify(node, preserveProperties, text = '') {\n // calc rule cssText\n let cssText = '';\n if (node['cssText'] || node['rules']) {\n let r$ = node['rules'];\n if (r$ && !_hasMixinRules(r$)) {\n for (let i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {\n cssText = stringify(r, preserveProperties, cssText);\n }\n } else {\n cssText = preserveProperties\n ? node['cssText']\n : removeCustomProps(node['cssText']);\n cssText = cssText.trim();\n if (cssText) {\n cssText = ' ' + cssText + '\\n';\n }\n }\n }\n // emit rule if there is cssText\n if (cssText) {\n if (node['selector']) {\n text += node['selector'] + ' ' + OPEN_BRACE + '\\n';\n }\n text += cssText;\n if (node['selector']) {\n text += CLOSE_BRACE + '\\n\\n';\n }\n }\n return text;\n}\n\n/**\n * @param {Array<StyleNode>} rules\n * @return {boolean}\n */\nfunction _hasMixinRules(rules) {\n let r = rules[0];\n return (\n Boolean(r) &&\n Boolean(r['selector']) &&\n r['selector'].indexOf(VAR_START) === 0\n );\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction removeCustomProps(cssText) {\n cssText = removeCustomPropAssignment(cssText);\n return removeCustomPropApply(cssText);\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nexport function removeCustomPropAssignment(cssText) {\n return cssText.replace(RX.customProp, '').replace(RX.mixinProp, '');\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction removeCustomPropApply(cssText) {\n return cssText.replace(RX.mixinApply, '').replace(RX.varApply, '');\n}\n\n/** @enum {number} */\nexport const types = {\n STYLE_RULE: 1,\n KEYFRAMES_RULE: 7,\n MEDIA_RULE: 4,\n MIXIN_RULE: 1000,\n};\n\nconst OPEN_BRACE = '{';\nconst CLOSE_BRACE = '}';\n\n// helper regexp's\nconst RX = {\n comments: /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n port: /@import[^;]*;/gim,\n customProp: /(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,\n mixinProp: /(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,\n mixinApply: /@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,\n varApply: /[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,\n keyframesRule: /^@[^\\s]*keyframes/,\n multipleSpaces: /\\s+/g,\n};\n\nconst VAR_START = '--';\nconst MEDIA_START = '@media';\nconst AT_START = '@';\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nexport const nativeShadow = !(\n window['ShadyDOM'] && window['ShadyDOM']['inUse']\n);\n/** @type {boolean} */\nlet nativeCssVariables_;\n\n/**\n * @param {(ShadyCSSOptions | ShadyCSSInterface)=} settings\n */\nfunction calcCssVariables(settings) {\n if (settings && settings.shimcssproperties) {\n nativeCssVariables_ = false;\n } else {\n // chrome 49 has semi-working css vars, check if box-shadow works\n // safari 9.1 has a recalc bug: https://bugs.webkit.org/show_bug.cgi?id=155782\n // However, shim css custom properties are only supported with ShadyDOM enabled,\n // so fall back on native if we do not detect ShadyDOM\n // Edge 15: custom properties used in ::before and ::after will also be used in the parent element\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12414257/\n nativeCssVariables_ =\n nativeShadow ||\n Boolean(\n !navigator.userAgent.match(/AppleWebKit\\/601|Edge\\/15/) &&\n window.CSS &&\n CSS.supports &&\n CSS.supports('box-shadow', '0 0 0 var(--foo)')\n );\n }\n}\n\n/** @type {string | undefined} */\nexport let cssBuild;\nif (window.ShadyCSS && window.ShadyCSS.cssBuild !== undefined) {\n cssBuild = window.ShadyCSS.cssBuild;\n}\n\n/** @type {boolean} */\nexport const disableRuntime = Boolean(\n window.ShadyCSS && window.ShadyCSS.disableRuntime\n);\n\nif (window.ShadyCSS && window.ShadyCSS.nativeCss !== undefined) {\n nativeCssVariables_ = window.ShadyCSS.nativeCss;\n} else if (window.ShadyCSS) {\n calcCssVariables(window.ShadyCSS);\n // reset window variable to let ShadyCSS API take its place\n window.ShadyCSS = undefined;\n} else {\n calcCssVariables(window['WebComponents'] && window['WebComponents']['flags']);\n}\n\n// Hack for type error under new type inference which doesn't like that\n// nativeCssVariables is updated in a function and assigns the type\n// `function(): ?` instead of `boolean`.\nexport const nativeCssVariables = /** @type {boolean} */ (nativeCssVariables_);\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport const VAR_ASSIGN = /(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};{])+)|\\{([^}]*)\\}(?:(?=[;\\s}])|$))/gi;\nexport const MIXIN_MATCH = /(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi;\nexport const VAR_CONSUMED = /(--[\\w-]+)\\s*([:,;)]|$)/gi;\nexport const ANIMATION_MATCH = /(animation\\s*:)|(animation-name\\s*:)/;\nexport const MEDIA_MATCH = /@media\\s(.*)/;\nexport const IS_VAR = /^--/;\nexport const BRACKETED = /\\{[^}]*\\}/g;\nexport const HOST_PREFIX = '(?:^|[^.#[:])';\nexport const HOST_SUFFIX = '($|[.:[\\\\s>+~])';\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\n/** @type {!Set<string>} */\nconst styleTextSet = new Set();\n\nexport const scopingAttribute = 'shady-unscoped';\n\n/**\n * Add a specifically-marked style to the document directly, and only one copy of that style.\n *\n * @param {!HTMLStyleElement} style\n * @return {undefined}\n */\nexport function processUnscopedStyle(style) {\n const text = style.textContent;\n if (!styleTextSet.has(text)) {\n styleTextSet.add(text);\n const newStyle = document.createElement('style');\n newStyle.setAttribute('shady-unscoped', '');\n newStyle.textContent = text;\n document.head.appendChild(newStyle);\n }\n}\n\n/**\n * Check if a style is supposed to be unscoped\n * @param {!HTMLStyleElement} style\n * @return {boolean} true if the style has the unscoping attribute\n */\nexport function isUnscopedStyle(style) {\n return style.hasAttribute(scopingAttribute);\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {nativeShadow, nativeCssVariables, cssBuild} from './style-settings.js';\nimport {parse, stringify, types, StyleNode} from './css-parse.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport {MEDIA_MATCH} from './common-regex.js';\n// prettier-ignore\nimport {processUnscopedStyle, isUnscopedStyle} from './unscoped-style-handler.js';\n\n/**\n * @param {string|StyleNode} rules\n * @param {function(StyleNode)=} callback\n * @return {string}\n */\nexport function toCssText(rules, callback) {\n if (!rules) {\n return '';\n }\n if (typeof rules === 'string') {\n rules = parse(rules);\n }\n if (callback) {\n forEachRule(rules, callback);\n }\n return stringify(rules, nativeCssVariables);\n}\n\n/**\n * @param {HTMLStyleElement} style\n * @return {StyleNode}\n */\nexport function rulesForStyle(style) {\n if (!style['__cssRules'] && style.textContent) {\n style['__cssRules'] = parse(style.textContent);\n }\n return style['__cssRules'] || null;\n}\n\n// Tests if a rule is a keyframes selector, which looks almost exactly\n// like a normal selector but is not (it has nothing to do with scoping\n// for example).\n/**\n * @param {StyleNode} rule\n * @return {boolean}\n */\nexport function isKeyframesSelector(rule) {\n return (\n Boolean(rule['parent']) && rule['parent']['type'] === types.KEYFRAMES_RULE\n );\n}\n\n/**\n * @param {StyleNode} node\n * @param {Function=} styleRuleCallback\n * @param {Function=} keyframesRuleCallback\n * @param {boolean=} onlyActiveRules\n */\nexport function forEachRule(\n node,\n styleRuleCallback,\n keyframesRuleCallback,\n onlyActiveRules\n) {\n if (!node) {\n return;\n }\n let skipRules = false;\n let type = node['type'];\n if (onlyActiveRules) {\n if (type === types.MEDIA_RULE) {\n let matchMedia = node['selector'].match(MEDIA_MATCH);\n if (matchMedia) {\n // if rule is a non matching @media rule, skip subrules\n if (!window.matchMedia(matchMedia[1]).matches) {\n skipRules = true;\n }\n }\n }\n }\n if (type === types.STYLE_RULE) {\n styleRuleCallback(node);\n } else if (keyframesRuleCallback && type === types.KEYFRAMES_RULE) {\n keyframesRuleCallback(node);\n } else if (type === types.MIXIN_RULE) {\n skipRules = true;\n }\n let r$ = node['rules'];\n if (r$ && !skipRules) {\n for (let i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {\n forEachRule(r, styleRuleCallback, keyframesRuleCallback, onlyActiveRules);\n }\n }\n}\n\n// add a string of cssText to the document.\n/**\n * @param {string} cssText\n * @param {string} moniker\n * @param {Node} target\n * @param {Node} contextNode\n * @return {HTMLStyleElement}\n */\nexport function applyCss(cssText, moniker, target, contextNode) {\n let style = createScopeStyle(cssText, moniker);\n applyStyle(style, target, contextNode);\n return style;\n}\n\n/**\n * @param {string} cssText\n * @param {string} moniker\n * @return {!HTMLStyleElement}\n */\nexport function createScopeStyle(cssText, moniker) {\n let style = /** @type {HTMLStyleElement} */ (document.createElement('style'));\n if (moniker) {\n style.setAttribute('scope', moniker);\n }\n style.textContent = cssText;\n return style;\n}\n\n/**\n * Track the position of the last added style for placing placeholders\n * @type {Node}\n */\nlet lastHeadApplyNode = null;\n\n// insert a comment node as a styling position placeholder.\n/**\n * @param {string} moniker\n * @return {!Comment}\n */\nexport function applyStylePlaceHolder(moniker) {\n let placeHolder = document.createComment(\n ' Shady DOM styles for ' + moniker + ' '\n );\n let after = lastHeadApplyNode ? lastHeadApplyNode['nextSibling'] : null;\n let scope = document.head;\n scope.insertBefore(placeHolder, after || scope.firstChild);\n lastHeadApplyNode = placeHolder;\n return placeHolder;\n}\n\n/**\n * @param {HTMLStyleElement} style\n * @param {?Node} target\n * @param {?Node} contextNode\n */\nexport function applyStyle(style, target, contextNode) {\n target = target || document.head;\n let after = (contextNode && contextNode.nextSibling) || target.firstChild;\n target.insertBefore(style, after);\n if (!lastHeadApplyNode) {\n lastHeadApplyNode = style;\n } else {\n // only update lastHeadApplyNode if the new style is inserted after the old lastHeadApplyNode\n let position = style.compareDocumentPosition(lastHeadApplyNode);\n if (position === Node.DOCUMENT_POSITION_PRECEDING) {\n lastHeadApplyNode = style;\n }\n }\n}\n\n/**\n * @param {string} buildType\n * @return {boolean}\n */\nexport function isTargetedBuild(buildType) {\n return nativeShadow ? buildType === 'shadow' : buildType === 'shady';\n}\n\n/**\n * Walk from text[start] matching parens and\n * returns position of the outer end paren\n * @param {string} text\n * @param {number} start\n * @return {number}\n */\nexport function findMatchingParen(text, start) {\n let level = 0;\n for (let i = start, l = text.length; i < l; i++) {\n if (text[i] === '(') {\n level++;\n } else if (text[i] === ')') {\n if (--level === 0) {\n return i;\n }\n }\n }\n return -1;\n}\n\n/**\n * @param {string} str\n * @param {function(string, string, string, string)} callback\n */\nexport function processVariableAndFallback(str, callback) {\n // find 'var('\n let start = str.indexOf('var(');\n if (start === -1) {\n // no var?, everything is prefix\n return callback(str, '', '', '');\n }\n //${prefix}var(${inner})${suffix}\n let end = findMatchingParen(str, start + 3);\n let inner = str.substring(start + 4, end);\n let prefix = str.substring(0, start);\n // suffix may have other variables\n let suffix = processVariableAndFallback(str.substring(end + 1), callback);\n let comma = inner.indexOf(',');\n // value and fallback args should be trimmed to match in property lookup\n if (comma === -1) {\n // variable, no fallback\n return callback(prefix, inner.trim(), '', suffix);\n }\n // var(${value},${fallback})\n let value = inner.substring(0, comma).trim();\n let fallback = inner.substring(comma + 1).trim();\n return callback(prefix, value, fallback, suffix);\n}\n\n/**\n * @param {Element} element\n * @param {string} value\n */\nexport function setElementClassRaw(element, value) {\n // use native setAttribute provided by ShadyDOM when setAttribute is patched\n if (nativeShadow) {\n element.setAttribute('class', value);\n } else {\n window['ShadyDOM']['nativeMethods']['setAttribute'].call(\n element,\n 'class',\n value\n );\n }\n}\n\n/**\n * @type {function(*):*}\n */\nexport const wrap =\n (window['ShadyDOM'] && window['ShadyDOM']['wrap']) || ((node) => node);\n\n/**\n * @param {Element | {is: string, extends: string}} element\n * @return {{is: string, typeExtension: string}}\n */\nexport function getIsExtends(element) {\n let localName = element['localName'];\n let is = '',\n typeExtension = '';\n /*\n NOTE: technically, this can be wrong for certain svg elements\n with `-` in the name like `<font-face>`\n */\n if (localName) {\n if (localName.indexOf('-') > -1) {\n is = localName;\n } else {\n typeExtension = localName;\n is = (element.getAttribute && element.getAttribute('is')) || '';\n }\n } else {\n is = /** @type {?} */ (element).is;\n typeExtension = /** @type {?} */ (element).extends;\n }\n return {is, typeExtension};\n}\n\n/**\n * @param {Element|DocumentFragment} element\n * @return {string}\n */\nexport function gatherStyleText(element) {\n /** @type {!Array<string>} */\n const styleTextParts = [];\n const styles = /** @type {!NodeList<!HTMLStyleElement>} */ (element.querySelectorAll(\n 'style'\n ));\n for (let i = 0; i < styles.length; i++) {\n const style = styles[i];\n if (isUnscopedStyle(style)) {\n if (!nativeShadow) {\n processUnscopedStyle(style);\n style.parentNode.removeChild(style);\n }\n } else {\n styleTextParts.push(style.textContent);\n style.parentNode.removeChild(style);\n }\n }\n return styleTextParts.join('').trim();\n}\n\n/**\n * Split a selector separated by commas into an array in a smart way\n * @param {string} selector\n * @return {!Array<string>}\n */\nexport function splitSelectorList(selector) {\n const parts = [];\n let part = '';\n for (let i = 0; i >= 0 && i < selector.length; i++) {\n // A selector with parentheses will be one complete part\n if (selector[i] === '(') {\n // find the matching paren\n const end = findMatchingParen(selector, i);\n // push the paren block into the part\n part += selector.slice(i, end + 1);\n // move the index to after the paren block\n i = end;\n } else if (selector[i] === ',') {\n parts.push(part);\n part = '';\n } else {\n part += selector[i];\n }\n }\n // catch any pieces after the last comma\n if (part) {\n parts.push(part);\n }\n return parts;\n}\n\nconst CSS_BUILD_ATTR = 'css-build';\n\n/**\n * Return the polymer-css-build \"build type\" applied to this element\n *\n * @param {!HTMLElement} element\n * @return {string} Can be \"\", \"shady\", or \"shadow\"\n */\nexport function getCssBuild(element) {\n if (cssBuild !== undefined) {\n return /** @type {string} */ (cssBuild);\n }\n if (element.__cssBuild === undefined) {\n // try attribute first, as it is the common case\n const attrValue = element.getAttribute(CSS_BUILD_ATTR);\n if (attrValue) {\n element.__cssBuild = attrValue;\n } else {\n const buildComment = getBuildComment(element);\n if (buildComment !== '') {\n // remove build comment so it is not needlessly copied into every element instance\n removeBuildComment(element);\n }\n element.__cssBuild = buildComment;\n }\n }\n return element.__cssBuild || '';\n}\n\n/**\n * Check if the given element, either a <template> or <style>, has been processed\n * by polymer-css-build.\n *\n * If so, then we can make a number of optimizations:\n * - polymer-css-build will decompose mixins into individual CSS Custom Properties,\n * so the ApplyShim can be skipped entirely.\n * - Under native ShadowDOM, the style text can just be copied into each instance\n * without modification\n * - If the build is \"shady\" and ShadyDOM is in use, the styling does not need\n * scoping beyond the shimming of CSS Custom Properties\n *\n * @param {!HTMLElement} element\n * @return {boolean}\n */\nexport function elementHasBuiltCss(element) {\n return getCssBuild(element) !== '';\n}\n\n/**\n * For templates made with tagged template literals, polymer-css-build will\n * insert a comment of the form `<!--css-build:shadow-->`\n *\n * @param {!HTMLElement} element\n * @return {string}\n */\nexport function getBuildComment(element) {\n const buildComment =\n element.localName === 'template'\n ? /** @type {!HTMLTemplateElement} */ (element).content.firstChild\n : element.firstChild;\n if (buildComment instanceof Comment) {\n const commentParts = buildComment.textContent.trim().split(':');\n if (commentParts[0] === CSS_BUILD_ATTR) {\n return commentParts[1];\n }\n }\n return '';\n}\n\n/**\n * Check if the css build status is optimal, and do no unneeded work.\n *\n * @param {string=} cssBuild CSS build status\n * @return {boolean} css build is optimal or not\n */\nexport function isOptimalCssBuild(cssBuild = '') {\n // CSS custom property shim always requires work\n if (cssBuild === '' || !nativeCssVariables) {\n return false;\n }\n return nativeShadow ? cssBuild === 'shadow' : cssBuild === 'shady';\n}\n\n/**\n * @param {!HTMLElement} element\n */\nfunction removeBuildComment(element) {\n const buildComment =\n element.localName === 'template'\n ? /** @type {!HTMLTemplateElement} */ (element).content.firstChild\n : element.firstChild;\n buildComment.parentNode.removeChild(buildComment);\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {StyleNode} from './css-parse.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as StyleUtil from './style-util.js';\nimport {nativeShadow} from './style-settings.js';\n\n/* Transforms ShadowDOM styling into ShadyDOM styling\n\n* scoping:\n\n * elements in scope get scoping selector class=\"x-foo-scope\"\n * selectors re-written as follows:\n\n div button -> div.x-foo-scope button.x-foo-scope\n\n* :host -> scopeName\n\n* :host(...) -> scopeName...\n\n* ::slotted(...) -> scopeName > ...\n\n* ...:dir(ltr|rtl) -> [dir=\"ltr|rtl\"] ..., ...[dir=\"ltr|rtl\"]\n\n* :host(:dir[rtl]) -> scopeName:dir(rtl) -> [dir=\"rtl\"] scopeName, scopeName[dir=\"rtl\"]\n\n*/\nconst SCOPE_NAME = 'style-scope';\n\nclass StyleTransformer {\n /** @return {string} */\n get SCOPE_NAME() {\n return SCOPE_NAME;\n }\n /**\n * Given a node and scope name, add a scoping class to each node\n * in the tree. This facilitates transforming css into scoped rules.\n * @param {!Node} node\n * @param {string} scope\n * @param {boolean=} shouldRemoveScope\n * @deprecated\n */\n dom(node, scope, shouldRemoveScope) {\n const fn = (node) => {\n this.element(node, scope || '', shouldRemoveScope);\n };\n this._transformDom(node, fn);\n }\n\n /**\n * Given a node and scope name, add a scoping class to each node in the tree.\n * @param {!Node} node\n * @param {string} scope\n */\n domAddScope(node, scope) {\n const fn = (node) => {\n this.element(node, scope || '');\n };\n this._transformDom(node, fn);\n }\n\n /**\n * @param {!Node} startNode\n * @param {function(!Node)} transformer\n */\n _transformDom(startNode, transformer) {\n if (startNode.nodeType === Node.ELEMENT_NODE) {\n transformer(startNode);\n }\n let c$;\n if (startNode.localName === 'template') {\n const template = /** @type {!HTMLTemplateElement} */ (startNode);\n // In case the template is in svg context, fall back to the node\n // since it won't be an HTMLTemplateElement with a .content property\n c$ = (template.content || template._content || template).childNodes;\n } else {\n c$ =\n /** @type {!ParentNode} */ (startNode).children || startNode.childNodes;\n }\n if (c$) {\n for (let i = 0; i < c$.length; i++) {\n this._transformDom(c$[i], transformer);\n }\n }\n }\n\n /**\n * @param {?} element\n * @param {?} scope\n * @param {?=} shouldRemoveScope\n */\n element(element, scope, shouldRemoveScope) {\n // note: if using classes, we add both the general 'style-scope' class\n // as well as the specific scope. This enables easy filtering of all\n // `style-scope` elements\n if (scope) {\n // note: svg on IE does not have classList so fallback to class\n if (element.classList) {\n if (shouldRemoveScope) {\n element.classList.remove(SCOPE_NAME);\n element.classList.remove(scope);\n } else {\n element.classList.add(SCOPE_NAME);\n element.classList.add(scope);\n }\n } else if (element.getAttribute) {\n let c = element.getAttribute(CLASS);\n if (shouldRemoveScope) {\n if (c) {\n let newValue = c.replace(SCOPE_NAME, '').replace(scope, '');\n StyleUtil.setElementClassRaw(element, newValue);\n }\n } else {\n let newValue = (c ? c + ' ' : '') + SCOPE_NAME + ' ' + scope;\n StyleUtil.setElementClassRaw(element, newValue);\n }\n }\n }\n }\n\n /**\n * Given a node, replace the scoping class to each subnode in the tree.\n * @param {!Node} node\n * @param {string} oldScope\n * @param {string} newScope\n */\n domReplaceScope(node, oldScope, newScope) {\n const fn = (node) => {\n this.element(node, oldScope, true);\n this.element(node, newScope);\n };\n this._transformDom(node, fn);\n }\n /**\n * Given a node, remove the scoping class to each subnode in the tree.\n * @param {!Node} node\n * @param {string} oldScope\n */\n domRemoveScope(node, oldScope) {\n const fn = (node) => {\n this.element(node, oldScope || '', true);\n };\n this._transformDom(node, fn);\n }\n\n /**\n * @param {?} element\n * @param {?} styleRules\n * @param {?=} callback\n * @param {string=} cssBuild\n * @param {string=} cssText\n * @return {string}\n */\n elementStyles(element, styleRules, callback, cssBuild = '', cssText = '') {\n // no need to shim selectors if settings.useNativeShadow, also\n // a shady css build will already have transformed selectors\n // NOTE: This method may be called as part of static or property shimming.\n // When there is a targeted build it will not be called for static shimming,\n // but when the property shim is used it is called and should opt out of\n // static shimming work when a proper build exists.\n if (cssText === '') {\n if (nativeShadow || cssBuild === 'shady') {\n cssText = StyleUtil.toCssText(styleRules, callback);\n } else {\n let {is, typeExtension} = StyleUtil.getIsExtends(element);\n cssText = this.css(styleRules, is, typeExtension, callback) + '\\n\\n';\n }\n }\n return cssText.trim();\n }\n\n // Given a string of cssText and a scoping string (scope), returns\n // a string of scoped css where each selector is transformed to include\n // a class created from the scope. ShadowDOM selectors are also transformed\n // (e.g. :host) to use the scoping selector.\n css(rules, scope, ext, callback) {\n let hostScope = this._calcHostScope(scope, ext);\n scope = this._calcElementScope(scope);\n let self = this;\n return StyleUtil.toCssText(rules, function (/** StyleNode */ rule) {\n if (!(/** @type {?} */ (rule.isScoped))) {\n self.rule(rule, scope, hostScope);\n rule.isScoped = true;\n }\n if (callback) {\n callback(rule, scope, hostScope);\n }\n });\n }\n\n _calcElementScope(scope) {\n if (scope) {\n return CSS_CLASS_PREFIX + scope;\n } else {\n return '';\n }\n }\n\n _calcHostScope(scope, ext) {\n return ext ? `[is=${scope}]` : scope;\n }\n\n rule(rule, scope, hostScope) {\n this._transformRule(rule, this._transformComplexSelector, scope, hostScope);\n }\n\n /**\n * transforms a css rule to a scoped rule.\n *\n * @param {StyleNode} rule\n * @param {Function} transformer\n * @param {string=} scope\n * @param {string=} hostScope\n */\n _transformRule(rule, transformer, scope, hostScope) {\n // NOTE: save transformedSelector for subsequent matching of elements\n // against selectors (e.g. when calculating style properties)\n rule[\n 'selector'\n ] = /** @type {?} */ (rule).transformedSelector = this._transformRuleCss(\n rule,\n transformer,\n scope,\n hostScope\n );\n }\n\n /**\n * @param {StyleNode} rule\n * @param {Function} transformer\n * @param {string=} scope\n * @param {string=} hostScope\n */\n _transformRuleCss(rule, transformer, scope, hostScope) {\n let p$ = StyleUtil.splitSelectorList(rule['selector']);\n // we want to skip transformation of rules that appear in keyframes,\n // because they are keyframe selectors, not element selectors.\n if (!StyleUtil.isKeyframesSelector(rule)) {\n for (let i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {\n p$[i] = transformer.call(this, p, scope, hostScope);\n }\n }\n return p$.filter((part) => Boolean(part)).join(COMPLEX_SELECTOR_SEP);\n }\n\n /**\n * @param {string} selector\n * @return {string}\n */\n _twiddleNthPlus(selector) {\n return selector.replace(NTH, (m, type, inside) => {\n if (inside.indexOf('+') > -1) {\n inside = inside.replace(/\\+/g, '___');\n } else if (inside.indexOf('___') > -1) {\n inside = inside.replace(/___/g, '+');\n }\n return `:${type}(${inside})`;\n });\n }\n\n /**\n * Preserve `:matches()` selectors by replacing them with MATCHES_REPLACMENT\n * and returning an array of `:matches()` selectors.\n * Use `_replacesMatchesPseudo` to replace the `:matches()` parts\n *\n * @param {string} selector\n * @return {{selector: string, matches: !Array<string>}}\n */\n _preserveMatchesPseudo(selector) {\n /** @type {!Array<string>} */\n const matches = [];\n let match;\n while ((match = selector.match(MATCHES))) {\n const start = match.index;\n const end = StyleUtil.findMatchingParen(selector, start);\n if (end === -1) {\n throw new Error(`${match.input} selector missing ')'`);\n }\n const part = selector.slice(start, end + 1);\n selector = selector.replace(part, MATCHES_REPLACEMENT);\n matches.push(part);\n }\n return {selector, matches};\n }\n\n /**\n * Replace MATCHES_REPLACMENT character with the given set of `:matches()`\n * selectors.\n *\n * @param {string} selector\n * @param {!Array<string>} matches\n * @return {string}\n */\n _replaceMatchesPseudo(selector, matches) {\n const parts = selector.split(MATCHES_REPLACEMENT);\n return matches.reduce(\n (acc, cur, idx) => acc + cur + parts[idx + 1],\n parts[0]\n );\n }\n\n /**\n * @param {string} selector\n * @param {string} scope\n * @param {string=} hostScope\n */\n _transformComplexSelector(selector, scope, hostScope) {\n let stop = false;\n selector = selector.trim();\n // Remove spaces inside of selectors like `:nth-of-type` because it confuses SIMPLE_SELECTOR_SEP\n let isNth = NTH.test(selector);\n if (isNth) {\n selector = selector.replace(\n NTH,\n (m, type, inner) => `:${type}(${inner.replace(/\\s/g, '')})`\n );\n selector = this._twiddleNthPlus(selector);\n }\n // Preserve selectors like `:-webkit-any` so that SIMPLE_SELECTOR_SEP does\n // not get confused by spaces inside the pseudo selector\n const isMatches = MATCHES.test(selector);\n /** @type {!Array<string>} */\n let matches;\n if (isMatches) {\n ({selector, matches} = this._preserveMatchesPseudo(selector));\n }\n selector = selector.replace(SLOTTED_START, `${HOST} $1`);\n selector = selector.replace(SIMPLE_SELECTOR_SEP, (m, c, s) => {\n if (!stop) {\n let info = this._transformCompoundSelector(s, c, scope, hostScope);\n stop = stop || info.stop;\n c = info.combinator;\n s = info.value;\n }\n return c + s;\n });\n // replace `:matches()` selectors\n if (isMatches) {\n selector = this._replaceMatchesPseudo(selector, matches);\n }\n if (isNth) {\n selector = this._twiddleNthPlus(selector);\n }\n selector = selector.replace(\n DIR_PAREN,\n (m, before, dir, after) =>\n `[dir=\"${dir}\"] ${before}${after}, ${before}[dir=\"${dir}\"]${after}`\n );\n return selector;\n }\n\n _transformCompoundSelector(selector, combinator, scope, hostScope) {\n // replace :host with host scoping class\n let slottedIndex = selector.indexOf(SLOTTED);\n if (selector.indexOf(HOST) >= 0) {\n selector = this._transformHostSelector(selector, hostScope);\n // replace other selectors with scoping class\n } else if (slottedIndex !== 0) {\n selector = scope\n ? this._transformSimpleSelector(selector, scope)\n : selector;\n }\n // mark ::slotted() scope jump to replace with descendant selector + arg\n // also ignore left-side combinator\n let slotted = false;\n if (slottedIndex >= 0) {\n combinator = '';\n slotted = true;\n }\n // process scope jumping selectors up to the scope jump and then stop\n let stop;\n if (slotted) {\n stop = true;\n if (slotted) {\n // .zonk ::slotted(.foo) -> .zonk.scope > .foo\n selector = selector.replace(SLOTTED_PAREN, (m, paren) => ` > ${paren}`);\n }\n }\n return {value: selector, combinator, stop};\n }\n\n _transformSimpleSelector(selector, scope) {\n const attributes = selector.split(/(\\[.+?\\])/);\n\n const output = [];\n for (let i = 0; i < attributes.length; i++) {\n // Do not attempt to transform any attribute selector content\n if (i % 2 === 1) {\n output.push(attributes[i]);\n } else {\n const part = attributes[i];\n\n if (!(part === '' && i === attributes.length - 1)) {\n let p$ = part.split(PSEUDO_PREFIX);\n p$[0] += scope;\n output.push(p$.join(PSEUDO_PREFIX));\n }\n }\n }\n\n return output.join('');\n }\n\n // :host(...) -> scopeName...\n _transformHostSelector(selector, hostScope) {\n let m = selector.match(HOST_PAREN);\n let paren = (m && m[2].trim()) || '';\n if (paren) {\n if (!paren[0].match(SIMPLE_SELECTOR_PREFIX)) {\n // paren starts with a type selector\n let typeSelector = paren.split(SIMPLE_SELECTOR_PREFIX)[0];\n // if the type selector is our hostScope then avoid pre-pending it\n if (typeSelector === hostScope) {\n return paren;\n }\n // otherwise, this selector should not match in this scope so\n // output a bogus selector.\n else {\n return SELECTOR_NO_MATCH;\n }\n } else {\n // make sure to do a replace here to catch selectors like:\n // `:host(.foo)::before`\n return selector.replace(HOST_PAREN, function (m, host, paren) {\n return hostScope + paren;\n });\n }\n }\n // if no paren, do a straight :host replacement.\n // TODO(sorvell): this should not strictly be necessary but\n // it's needed to maintain support for `:host[foo]` type selectors\n // which have been improperly used under Shady DOM. This should be\n // deprecated.\n else {\n return selector.replace(HOST, hostScope);\n }\n }\n\n /**\n * @param {StyleNode} rule\n */\n documentRule(rule) {\n // reset selector in case this is redone.\n rule['selector'] = rule['parsedSelector'];\n this.normalizeRootSelector(rule);\n this._transformRule(rule, this._transformDocumentSelector);\n }\n\n /**\n * @param {StyleNode} rule\n */\n normalizeRootSelector(rule) {\n if (rule['selector'] === ROOT) {\n rule['selector'] = 'html';\n }\n }\n\n /**\n * @param {string} selector\n */\n _transformDocumentSelector(selector) {\n if (selector.match(HOST)) {\n // remove ':host' type selectors in document rules\n return '';\n } else if (selector.match(SLOTTED)) {\n return this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR);\n } else {\n return this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);\n }\n }\n}\n\nconst NTH = /:(nth[-\\w]+)\\(([^)]+)\\)/;\nconst SCOPE_DOC_SELECTOR = `:not(.${SCOPE_NAME})`;\nconst COMPLEX_SELECTOR_SEP = ',';\nconst SIMPLE_SELECTOR_SEP = /(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=[])+)/g;\nconst SIMPLE_SELECTOR_PREFIX = /[[.:#*]/;\nconst HOST = ':host';\nconst ROOT = ':root';\nconst SLOTTED = '::slotted';\nconst SLOTTED_START = new RegExp(`^(${SLOTTED})`);\n// NOTE: this supports 1 nested () pair for things like\n// :host(:not([selected]), more general support requires\n// parsing which seems like overkill\nconst HOST_PAREN = /(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/;\n// similar to HOST_PAREN\nconst SLOTTED_PAREN = /(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/;\nconst DIR_PAREN = /(.*):dir\\((?:(ltr|rtl))\\)(.*)/;\nconst CSS_CLASS_PREFIX = '.';\nconst PSEUDO_PREFIX = ':';\nconst CLASS = 'class';\nconst SELECTOR_NO_MATCH = 'should_not_match';\nconst MATCHES = /:(?:matches|any|-(?:webkit|moz)-any)/;\nconst MATCHES_REPLACEMENT = '\\u{e000}';\n\nexport default new StyleTransformer();\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {parse, StyleNode} from './css-parse.js';\n// prettier-ignore\nimport {nativeShadow, nativeCssVariables, disableRuntime} from './style-settings.js';\nimport StyleTransformer from './style-transformer.js';\nimport * as StyleUtil from './style-util.js';\nimport StyleProperties from './style-properties.js';\n// prettier-ignore\nimport {ensureStylePlaceholder, getStylePlaceholder} from './style-placeholder.js';\nimport StyleInfo from './style-info.js';\nimport StyleCache from './style-cache.js';\n// prettier-ignore\nimport {flush as watcherFlush, getOwnerScope, getCurrentScope} from './document-watcher.js';\nimport templateMap from './template-map.js';\nimport * as ApplyShimUtils from './apply-shim-utils.js';\nimport {updateNativeProperties, detectMixin} from './common-utils.js';\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport {CustomStyleInterfaceInterface, CustomStyleProvider} from './custom-style-interface.js';\n\n/** @type {!Object<string, string>} */\nconst adoptedCssTextMap = {};\n\n/**\n * @const {StyleCache}\n */\nconst styleCache = new StyleCache();\n\nexport default class ScopingShim {\n constructor() {\n this._scopeCounter = {};\n this._documentOwner = /** @type {!HTMLElement} */ (document.documentElement);\n let ast = new StyleNode();\n ast['rules'] = [];\n this._documentOwnerStyleInfo = StyleInfo.set(\n this._documentOwner,\n new StyleInfo(ast)\n );\n this._elementsHaveApplied = false;\n /** @type {?Object} */\n this._applyShim = null;\n /** @type {?CustomStyleInterfaceInterface} */\n this._customStyleInterface = null;\n }\n flush() {\n watcherFlush();\n }\n _generateScopeSelector(name) {\n let id = (this._scopeCounter[name] = (this._scopeCounter[name] || 0) + 1);\n return `${name}-${id}`;\n }\n getStyleAst(style) {\n return StyleUtil.rulesForStyle(style);\n }\n styleAstToString(ast) {\n return StyleUtil.toCssText(ast);\n }\n _gatherStyles(template) {\n return StyleUtil.gatherStyleText(template.content);\n }\n /**\n * Prepare the styling and template for the given element type\n *\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n * @param {string=} typeExtension\n */\n prepareTemplate(template, elementName, typeExtension) {\n this.prepareTemplateDom(template, elementName);\n this.prepareTemplateStyles(template, elementName, typeExtension);\n }\n /**\n * Prepare styling for the given element type\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n * @param {string=} typeExtension\n */\n prepareTemplateStyles(template, elementName, typeExtension) {\n if (template._prepared || disableRuntime) {\n return;\n }\n // style placeholders are only used when ShadyDOM is active\n if (!nativeShadow) {\n ensureStylePlaceholder(elementName);\n }\n template._prepared = true;\n template.name = elementName;\n template.extends = typeExtension;\n templateMap[elementName] = template;\n let cssBuild = StyleUtil.getCssBuild(template);\n const optimalBuild = StyleUtil.isOptimalCssBuild(cssBuild);\n let info = {\n is: elementName,\n extends: typeExtension,\n };\n let cssText =\n this._gatherStyles(template) + (adoptedCssTextMap[elementName] || '');\n // check if the styling has mixin definitions or uses\n this._ensure();\n if (!optimalBuild) {\n let hasMixins = !cssBuild && detectMixin(cssText);\n let ast = parse(cssText);\n // only run the applyshim transforms if there is a mixin involved\n if (hasMixins && nativeCssVariables && this._applyShim) {\n this._applyShim['transformRules'](ast, elementName);\n }\n template['_styleAst'] = ast;\n }\n let ownPropertyNames = [];\n if (!nativeCssVariables) {\n ownPropertyNames = StyleProperties.decorateStyles(template['_styleAst']);\n }\n if (!ownPropertyNames.length || nativeCssVariables) {\n let root = nativeShadow ? template.content : null;\n let placeholder = getStylePlaceholder(elementName);\n let style = this._generateStaticStyle(\n info,\n template['_styleAst'],\n root,\n placeholder,\n cssBuild,\n optimalBuild ? cssText : ''\n );\n template._style = style;\n }\n template._ownPropertyNames = ownPropertyNames;\n }\n\n /**\n * @param {!Array<string>} cssTextArray\n * @param {string} elementName\n */\n prepareAdoptedCssText(cssTextArray, elementName) {\n adoptedCssTextMap[elementName] = cssTextArray.join(' ');\n }\n /**\n * Prepare template for the given element type\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n */\n prepareTemplateDom(template, elementName) {\n if (disableRuntime) {\n return;\n }\n const cssBuild = StyleUtil.getCssBuild(template);\n if (!nativeShadow && cssBuild !== 'shady' && !template._domPrepared) {\n template._domPrepared = true;\n StyleTransformer.domAddScope(template.content, elementName);\n }\n }\n /**\n * @param {!{is: string, extends: (string|undefined)}} info\n * @param {!StyleNode} rules\n * @param {DocumentFragment} shadowroot\n * @param {Node} placeholder\n * @param {string} cssBuild\n * @param {string=} cssText\n * @return {?HTMLStyleElement}\n */\n _generateStaticStyle(\n info,\n rules,\n shadowroot,\n placeholder,\n cssBuild,\n cssText\n ) {\n cssText = StyleTransformer.elementStyles(\n info,\n rules,\n null,\n cssBuild,\n cssText\n );\n if (cssText.length) {\n return StyleUtil.applyCss(cssText, info.is, shadowroot, placeholder);\n }\n return null;\n }\n _prepareHost(host) {\n const {is, typeExtension} = StyleUtil.getIsExtends(host);\n const placeholder = getStylePlaceholder(is);\n const template = templateMap[is];\n if (!template) {\n return;\n }\n const ast = template['_styleAst'];\n const ownStylePropertyNames = template._ownPropertyNames;\n const cssBuild = StyleUtil.getCssBuild(template);\n const styleInfo = new StyleInfo(\n ast,\n placeholder,\n ownStylePropertyNames,\n is,\n typeExtension,\n cssBuild\n );\n StyleInfo.set(host, styleInfo);\n return styleInfo;\n }\n /**\n * Returns a boolean that indicates if styles need to be reprocessed because\n * the apply shim is now available.\n * @return {boolean}\n */\n _ensureApplyShim() {\n if (!this._applyShim && window.ShadyCSS && window.ShadyCSS.ApplyShim) {\n this._applyShim = /** @type {!Object} */ (window.ShadyCSS.ApplyShim);\n this._applyShim['invalidCallback'] = ApplyShimUtils.invalidate;\n return true;\n }\n return false;\n }\n _ensureCustomStyleInterface() {\n if (this._customStyleInterface) {\n return;\n } else if (window.ShadyCSS && window.ShadyCSS.CustomStyleInterface) {\n this._customStyleInterface = /** @type {!CustomStyleInterfaceInterface} */ (window\n .ShadyCSS.CustomStyleInterface);\n /** @type {function(!HTMLStyleElement)} */\n this._customStyleInterface['transformCallback'] = (style) => {\n this.transformCustomStyleForDocument(style);\n };\n this._customStyleInterface['validateCallback'] = () => {\n requestAnimationFrame(() => {\n if (\n this._customStyleInterface['enqueued'] ||\n this._elementsHaveApplied\n ) {\n this.flushCustomStyles();\n }\n });\n };\n }\n }\n /**\n * Returns a boolean that indicates if styles need to be reprocessed because\n * the apply shim is now available.\n * @return {boolean}\n */\n _ensure() {\n const needsApplyShimUpdate = this._ensureApplyShim();\n this._ensureCustomStyleInterface();\n return needsApplyShimUpdate;\n }\n /**\n * Flush and apply custom styles to document\n */\n flushCustomStyles() {\n if (disableRuntime) {\n return;\n }\n const needsApplyShimUpdate = this._ensure();\n if (!this._customStyleInterface) {\n return;\n }\n let customStyles = this._customStyleInterface['processStyles']();\n // early return if custom-styles don't need validation\n if (!needsApplyShimUpdate && !this._customStyleInterface['enqueued']) {\n return;\n }\n // bail if custom styles are built optimally\n if (StyleUtil.isOptimalCssBuild(this._documentOwnerStyleInfo.cssBuild)) {\n return;\n }\n if (!nativeCssVariables) {\n this._reorderCustomStylesRules(customStyles);\n this._updateProperties(this._documentOwner, this._documentOwnerStyleInfo);\n this._applyCustomStyles(customStyles);\n if (this._elementsHaveApplied) {\n // if custom elements have upgraded and there are no native css variables, we must recalculate the whole tree\n this.styleDocument();\n }\n } else if (!this._documentOwnerStyleInfo.cssBuild) {\n this._revalidateCustomStyleApplyShim(customStyles);\n }\n this._customStyleInterface['enqueued'] = false;\n }\n /**\n * Reorder of custom styles for Custom Property shim\n * @param {!Array<!CustomStyleProvider>} customStyles\n */\n _reorderCustomStylesRules(customStyles) {\n const styles = customStyles\n .map((c) => this._customStyleInterface['getStyleForCustomStyle'](c))\n .filter((s) => !!s);\n // sort styles in document order\n styles.sort((a, b) => {\n // use `b.compare(a)` to be more straightforward\n const position = b.compareDocumentPosition(a);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n // A is after B, A should be higher sorted\n return 1;\n } else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n // A is before B, A should be lower sorted\n return -1;\n } else {\n return 0;\n }\n });\n // sort ast ordering for document\n this._documentOwnerStyleInfo.styleRules['rules'] = styles.map((s) =>\n StyleUtil.rulesForStyle(s)\n );\n }\n /**\n * Apply styles for the given element\n *\n * @param {!HTMLElement} host\n * @param {Object=} overrideProps\n */\n styleElement(host, overrideProps) {\n if (disableRuntime) {\n if (overrideProps) {\n if (!StyleInfo.get(host)) {\n StyleInfo.set(host, new StyleInfo(null));\n }\n const styleInfo = /** @type {!StyleInfo} */ (StyleInfo.get(host));\n this._mixOverrideStyleProps(styleInfo, overrideProps);\n this.styleElementNativeVariables(host, styleInfo);\n }\n return;\n }\n const styleInfo = StyleInfo.get(host) || this._prepareHost(host);\n // if there is no style info at this point, bail\n if (!styleInfo) {\n return;\n }\n // Only trip the `elementsHaveApplied` flag if a node other that the root document has `applyStyle` called\n if (!this._isRootOwner(host)) {\n this._elementsHaveApplied = true;\n }\n if (overrideProps) {\n this._mixOverrideStyleProps(styleInfo, overrideProps);\n }\n if (!nativeCssVariables) {\n this.styleElementShimVariables(host, styleInfo);\n } else {\n this.styleElementNativeVariables(host, styleInfo);\n }\n }\n /**\n * @param {!StyleInfo} styleInfo\n * @param {Object} overrideProps\n */\n _mixOverrideStyleProps(styleInfo, overrideProps) {\n styleInfo.overrideStyleProperties = styleInfo.overrideStyleProperties || {};\n Object.assign(styleInfo.overrideStyleProperties, overrideProps);\n }\n /**\n * @param {!HTMLElement} host\n * @param {!StyleInfo} styleInfo\n */\n styleElementShimVariables(host, styleInfo) {\n this.flush();\n this._updateProperties(host, styleInfo);\n if (\n styleInfo.ownStylePropertyNames &&\n styleInfo.ownStylePropertyNames.length\n ) {\n this._applyStyleProperties(host, styleInfo);\n }\n }\n /**\n * @param {!HTMLElement} host\n * @param {!StyleInfo} styleInfo\n */\n styleElementNativeVariables(host, styleInfo) {\n const {is} = StyleUtil.getIsExtends(host);\n if (styleInfo.overrideStyleProperties) {\n updateNativeProperties(host, styleInfo.overrideStyleProperties);\n }\n const template = templateMap[is];\n // bail early if there is no shadowroot for this element\n if (!template && !this._isRootOwner(host)) {\n return;\n }\n // bail early if the template was built with polymer-css-build\n if (template && StyleUtil.elementHasBuiltCss(template)) {\n return;\n }\n if (\n template &&\n template._style &&\n !ApplyShimUtils.templateIsValid(template)\n ) {\n // update template\n if (!ApplyShimUtils.templateIsValidating(template)) {\n this._ensure();\n this._applyShim &&\n this._applyShim['transformRules'](template['_styleAst'], is);\n template._style.textContent = StyleTransformer.elementStyles(\n host,\n styleInfo.styleRules\n );\n ApplyShimUtils.startValidatingTemplate(template);\n }\n // update instance if native shadowdom\n if (nativeShadow) {\n let root = host.shadowRoot;\n if (root) {\n let style = root.querySelector('style');\n if (style) {\n style.textContent = StyleTransformer.elementStyles(\n host,\n styleInfo.styleRules\n );\n }\n }\n }\n styleInfo.styleRules = template['_styleAst'];\n }\n }\n _styleOwnerForNode(node) {\n let root = StyleUtil.wrap(node).getRootNode();\n let host = root.host;\n if (host) {\n if (StyleInfo.get(host) || this._prepareHost(host)) {\n return host;\n } else {\n return this._styleOwnerForNode(host);\n }\n }\n return this._documentOwner;\n }\n _isRootOwner(node) {\n return node === this._documentOwner;\n }\n _applyStyleProperties(host, styleInfo) {\n let is = StyleUtil.getIsExtends(host).is;\n let cacheEntry = styleCache.fetch(\n is,\n styleInfo.styleProperties,\n styleInfo.ownStylePropertyNames\n );\n let cachedScopeSelector = cacheEntry && cacheEntry.scopeSelector;\n let cachedStyle = cacheEntry ? cacheEntry.styleElement : null;\n let oldScopeSelector = styleInfo.scopeSelector;\n // only generate new scope if cached style is not found\n styleInfo.scopeSelector =\n cachedScopeSelector || this._generateScopeSelector(is);\n let style = StyleProperties.applyElementStyle(\n host,\n styleInfo.styleProperties,\n styleInfo.scopeSelector,\n cachedStyle\n );\n if (!nativeShadow) {\n StyleProperties.applyElementScopeSelector(\n host,\n styleInfo.scopeSelector,\n oldScopeSelector\n );\n }\n if (!cacheEntry) {\n styleCache.store(\n is,\n styleInfo.styleProperties,\n style,\n styleInfo.scopeSelector\n );\n }\n return style;\n }\n _updateProperties(host, styleInfo) {\n let owner = this._styleOwnerForNode(host);\n let ownerStyleInfo = StyleInfo.get(owner);\n let ownerProperties = ownerStyleInfo.styleProperties;\n // style owner has not updated properties yet\n // go up the chain and force property update,\n // except if the owner is the document\n if (owner !== this._documentOwner && !ownerProperties) {\n this._updateProperties(owner, ownerStyleInfo);\n ownerProperties = ownerStyleInfo.styleProperties;\n }\n let props = Object.create(ownerProperties || null);\n let hostAndRootProps = StyleProperties.hostAndRootPropertiesForScope(\n host,\n styleInfo.styleRules,\n styleInfo.cssBuild\n );\n let propertyData = StyleProperties.propertyDataFromStyles(\n ownerStyleInfo.styleRules,\n host\n );\n let propertiesMatchingHost = propertyData.properties;\n Object.assign(\n props,\n hostAndRootProps.hostProps,\n propertiesMatchingHost,\n hostAndRootProps.rootProps\n );\n this._mixinOverrideStyles(props, styleInfo.overrideStyleProperties);\n StyleProperties.reify(props);\n styleInfo.styleProperties = props;\n }\n _mixinOverrideStyles(props, overrides) {\n for (let p in overrides) {\n let v = overrides[p];\n // skip override props if they are not truthy or 0\n // in order to fall back to inherited values\n if (v || v === 0) {\n props[p] = v;\n }\n }\n }\n /**\n * Update styles of the whole document\n *\n * @param {Object=} properties\n */\n styleDocument(properties) {\n this.styleSubtree(this._documentOwner, properties);\n }\n /**\n * Update styles of a subtree\n *\n * @param {!HTMLElement} host\n * @param {Object=} properties\n */\n styleSubtree(host, properties) {\n const wrappedHost = StyleUtil.wrap(host);\n const root = wrappedHost.shadowRoot;\n const isRootOwner = this._isRootOwner(host);\n if (root || isRootOwner) {\n this.styleElement(host, properties);\n }\n const descendantRoot = isRootOwner ? wrappedHost : root;\n if (descendantRoot) {\n const descendantHosts = Array.from(\n descendantRoot.querySelectorAll('*')\n ).filter((x) => StyleUtil.wrap(x).shadowRoot);\n for (let i = 0; i < descendantHosts.length; i++) {\n this.styleSubtree(descendantHosts[i]);\n }\n }\n }\n /* Custom Style operations */\n _revalidateCustomStyleApplyShim(customStyles) {\n for (let i = 0; i < customStyles.length; i++) {\n let c = customStyles[i];\n let s = this._customStyleInterface['getStyleForCustomStyle'](c);\n if (s) {\n this._revalidateApplyShim(s);\n }\n }\n }\n _applyCustomStyles(customStyles) {\n for (let i = 0; i < customStyles.length; i++) {\n let c = customStyles[i];\n let s = this._customStyleInterface['getStyleForCustomStyle'](c);\n if (s) {\n StyleProperties.applyCustomStyle(\n s,\n this._documentOwnerStyleInfo.styleProperties\n );\n }\n }\n }\n transformCustomStyleForDocument(style) {\n const cssBuild = StyleUtil.getCssBuild(style);\n if (cssBuild !== this._documentOwnerStyleInfo.cssBuild) {\n this._documentOwnerStyleInfo.cssBuild = cssBuild;\n }\n if (StyleUtil.isOptimalCssBuild(cssBuild)) {\n return;\n }\n let ast = StyleUtil.rulesForStyle(style);\n StyleUtil.forEachRule(ast, (rule) => {\n if (nativeShadow) {\n StyleTransformer.normalizeRootSelector(rule);\n } else {\n StyleTransformer.documentRule(rule);\n }\n if (nativeCssVariables && cssBuild === '') {\n this._ensure();\n this._applyShim && this._applyShim['transformRule'](rule);\n }\n });\n if (nativeCssVariables) {\n style.textContent = StyleUtil.toCssText(ast);\n } else {\n this._documentOwnerStyleInfo.styleRules['rules'].push(ast);\n }\n }\n _revalidateApplyShim(style) {\n if (nativeCssVariables && this._applyShim) {\n let ast = StyleUtil.rulesForStyle(style);\n this._ensure();\n this._applyShim['transformRules'](ast);\n style.textContent = StyleUtil.toCssText(ast);\n }\n }\n getComputedStyleValue(element, property) {\n let value;\n if (!nativeCssVariables) {\n // element is either a style host, or an ancestor of a style host\n let styleInfo =\n StyleInfo.get(element) ||\n StyleInfo.get(this._styleOwnerForNode(element));\n value = styleInfo.styleProperties[property];\n }\n // fall back to the property value from the computed styling\n value =\n value || window.getComputedStyle(element).getPropertyValue(property);\n // trim whitespace that can come after the `:` in css\n // example: padding: 2px -> \" 2px\"\n return value ? value.trim() : '';\n }\n // given an element and a classString, replaces\n // the element's class with the provided classString and adds\n // any necessary ShadyCSS static and property based scoping selectors\n setElementClass(element, classString) {\n let root = StyleUtil.wrap(element).getRootNode();\n let classes;\n if (classString) {\n let definitelyString =\n typeof classString === 'string' ? classString : String(classString);\n classes = definitelyString.split(/\\s/);\n } else {\n classes = [];\n }\n let scopeName = root.host && root.host.localName;\n // If no scope, try to discover scope name from existing class.\n // This can occur if, for example, a template stamped element that\n // has been scoped is manipulated when not in a root.\n if (!scopeName) {\n var classAttr = element.getAttribute('class');\n if (classAttr) {\n let k$ = classAttr.split(/\\s/);\n for (let i = 0; i < k$.length; i++) {\n if (k$[i] === StyleTransformer.SCOPE_NAME) {\n scopeName = k$[i + 1];\n break;\n }\n }\n }\n }\n if (scopeName) {\n classes.push(StyleTransformer.SCOPE_NAME, scopeName);\n }\n if (!nativeCssVariables) {\n let styleInfo = StyleInfo.get(element);\n if (styleInfo && styleInfo.scopeSelector) {\n classes.push(StyleProperties.XSCOPE_NAME, styleInfo.scopeSelector);\n }\n }\n StyleUtil.setElementClassRaw(element, classes.join(' '));\n }\n _styleInfoForNode(node) {\n return StyleInfo.get(node);\n }\n /**\n * @param {!Element} node\n * @param {string} scope\n */\n scopeNode(node, scope) {\n StyleTransformer.element(node, scope);\n }\n /**\n * @param {!Element} node\n * @param {string} scope\n */\n unscopeNode(node, scope) {\n StyleTransformer.element(node, scope, true);\n }\n /**\n * @param {!Node} node\n * @return {string}\n */\n scopeForNode(node) {\n return getOwnerScope(node);\n }\n /**\n * @param {!Element} node\n * @return {string}\n */\n currentScopeForNode(node) {\n return getCurrentScope(node);\n }\n}\n\n/* exports */\n/* eslint-disable no-self-assign */\nScopingShim.prototype['flush'] = ScopingShim.prototype.flush;\nScopingShim.prototype['prepareTemplate'] =\n ScopingShim.prototype.prepareTemplate;\nScopingShim.prototype['styleElement'] = ScopingShim.prototype.styleElement;\nScopingShim.prototype['styleDocument'] = ScopingShim.prototype.styleDocument;\nScopingShim.prototype['styleSubtree'] = ScopingShim.prototype.styleSubtree;\nScopingShim.prototype['getComputedStyleValue'] =\n ScopingShim.prototype.getComputedStyleValue;\nScopingShim.prototype['setElementClass'] =\n ScopingShim.prototype.setElementClass;\nScopingShim.prototype['_styleInfoForNode'] =\n ScopingShim.prototype._styleInfoForNode;\nScopingShim.prototype['transformCustomStyleForDocument'] =\n ScopingShim.prototype.transformCustomStyleForDocument;\nScopingShim.prototype['getStyleAst'] = ScopingShim.prototype.getStyleAst;\nScopingShim.prototype['styleAstToString'] =\n ScopingShim.prototype.styleAstToString;\nScopingShim.prototype['flushCustomStyles'] =\n ScopingShim.prototype.flushCustomStyles;\nScopingShim.prototype['scopeNode'] = ScopingShim.prototype.scopeNode;\nScopingShim.prototype['unscopeNode'] = ScopingShim.prototype.unscopeNode;\nScopingShim.prototype['scopeForNode'] = ScopingShim.prototype.scopeForNode;\nScopingShim.prototype['currentScopeForNode'] =\n ScopingShim.prototype.currentScopeForNode;\nScopingShim.prototype['prepareAdoptedCssText'] =\n ScopingShim.prototype.prepareAdoptedCssText;\n/* eslint-enable no-self-assign */\nObject.defineProperties(ScopingShim.prototype, {\n 'nativeShadow': {\n get() {\n return nativeShadow;\n },\n },\n 'nativeCss': {\n get() {\n return nativeCssVariables;\n },\n },\n});\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {nativeShadow} from './style-settings.js';\nimport StyleTransformer from './style-transformer.js';\nimport {getIsExtends, elementHasBuiltCss, wrap} from './style-util.js';\n\nexport let flush = function () {};\n\n/**\n * @param {!Element} element\n * @return {string}\n */\nfunction getClasses(element) {\n if (element.classList && element.classList.value) {\n return element.classList.value;\n } else {\n // NOTE: className is patched to remove scoping classes in ShadyDOM\n // use getAttribute('class') instead, which is unpatched\n return element.getAttribute('class') || '';\n }\n}\n\nconst scopeRegExp = new RegExp(`${StyleTransformer.SCOPE_NAME}\\\\s*([^\\\\s]*)`);\n\n/**\n * @param {!Element} element\n * @return {string}\n */\nexport function getCurrentScope(element) {\n const match = getClasses(element).match(scopeRegExp);\n if (match) {\n return match[1];\n } else {\n return '';\n }\n}\n\n/**\n * @param {!Node} node\n */\nexport function getOwnerScope(node) {\n const ownerRoot = wrap(node).getRootNode();\n if (ownerRoot === node || ownerRoot === node.ownerDocument) {\n return '';\n }\n const host = /** @type {!ShadowRoot} */ (ownerRoot).host;\n if (!host) {\n // this may actually be a document fragment\n return '';\n }\n return getIsExtends(host).is;\n}\n\n/**\n * @param {!Element} element\n */\nexport function ensureCorrectScope(element) {\n const currentScope = getCurrentScope(element);\n const ownerRoot = wrap(element).getRootNode();\n if (ownerRoot === element) {\n return;\n }\n if (currentScope && ownerRoot === element.ownerDocument) {\n // node was scoped, but now is in document\n StyleTransformer.domRemoveScope(element, currentScope);\n } else if (ownerRoot instanceof ShadowRoot) {\n const ownerScope = getOwnerScope(element);\n if (ownerScope !== currentScope) {\n // node was scoped, but not by its current owner\n StyleTransformer.domReplaceScope(element, currentScope, ownerScope);\n }\n }\n}\n\n/**\n * @param {!HTMLElement|!HTMLDocument} element\n */\nexport function ensureCorrectSubtreeScoping(element) {\n // find unscoped subtree nodes\n const unscopedNodes = window['ShadyDOM']['nativeMethods'][\n 'querySelectorAll'\n ].call(element, `:not(.${StyleTransformer.SCOPE_NAME})`);\n\n for (let j = 0; j < unscopedNodes.length; j++) {\n // it's possible, during large batch inserts, that nodes that aren't\n // scoped within the current scope were added.\n // To make sure that any unscoped nodes that were inserted in the current batch are correctly styled,\n // query all unscoped nodes and force their style-scope to be applied.\n // This could happen if a sub-element appended an unscoped node in its shadowroot and this function\n // runs on a parent element of the host of that unscoped node:\n // parent-element -> element -> unscoped node\n // Here unscoped node should have the style-scope element, not parent-element.\n const unscopedNode = unscopedNodes[j];\n const scopeForPreviouslyUnscopedNode = getOwnerScope(unscopedNode);\n if (scopeForPreviouslyUnscopedNode) {\n StyleTransformer.element(unscopedNode, scopeForPreviouslyUnscopedNode);\n }\n }\n}\n\n/**\n * @param {HTMLElement} el\n * @return {boolean}\n */\nfunction isElementWithBuiltCss(el) {\n if (el.localName === 'style' || el.localName === 'template') {\n return elementHasBuiltCss(el);\n }\n return false;\n}\n\n/**\n * @param {Array<MutationRecord|null>|null} mxns\n */\nfunction handler(mxns) {\n for (let x = 0; x < mxns.length; x++) {\n let mxn = mxns[x];\n if (\n mxn.target === document.documentElement ||\n mxn.target === document.head\n ) {\n continue;\n }\n for (let i = 0; i < mxn.addedNodes.length; i++) {\n let n = mxn.addedNodes[i];\n if (n.nodeType !== Node.ELEMENT_NODE) {\n continue;\n }\n n = /** @type {HTMLElement} */ (n); // eslint-disable-line no-self-assign\n let root = n.getRootNode();\n let currentScope = getCurrentScope(n);\n // node was scoped, but now is in document\n // If this element has built css, we must not remove scoping as this node\n // will be used as a template or style without re - applying scoping as an optimization\n if (\n currentScope &&\n root === n.ownerDocument &&\n !isElementWithBuiltCss(n)\n ) {\n StyleTransformer.domRemoveScope(n, currentScope);\n } else if (root instanceof ShadowRoot) {\n const newScope = getOwnerScope(n);\n // rescope current node and subtree if necessary\n if (newScope !== currentScope) {\n StyleTransformer.domReplaceScope(n, currentScope, newScope);\n }\n // make sure all the subtree elements are scoped correctly\n ensureCorrectSubtreeScoping(n);\n }\n }\n }\n}\n\n// if native Shadow DOM is being used, or ShadyDOM handles dynamic scoiping, do not activate the MutationObserver\nif (\n !nativeShadow &&\n !(window['ShadyDOM'] && window['ShadyDOM']['handlesDynamicScoping'])\n) {\n let observer = new MutationObserver(handler);\n let start = (node) => {\n observer.observe(node, {childList: true, subtree: true});\n };\n let nativeCustomElements =\n window['customElements'] &&\n !window['customElements']['polyfillWrapFlushCallback'];\n // need to start immediately with native custom elements\n // TODO(dfreedm): with polyfilled HTMLImports and native custom elements\n // excessive mutations may be observed; this can be optimized via cooperation\n // with the HTMLImports polyfill.\n if (nativeCustomElements) {\n start(document);\n } else {\n let delayedStart = () => {\n start(document.body);\n };\n // use polyfill timing if it's available\n if (window['HTMLImports']) {\n window['HTMLImports']['whenReady'](delayedStart);\n // otherwise push beyond native imports being ready\n // which requires RAF + readystate interactive.\n } else {\n requestAnimationFrame(function () {\n if (document.readyState === 'loading') {\n let listener = function () {\n delayedStart();\n document.removeEventListener('readystatechange', listener);\n };\n document.addEventListener('readystatechange', listener);\n } else {\n delayedStart();\n }\n });\n }\n }\n\n flush = function () {\n handler(observer.takeRecords());\n };\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {removeCustomPropAssignment, StyleNode} from './css-parse.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport {nativeShadow} from './style-settings.js';\nimport StyleTransformer from './style-transformer.js';\nimport * as StyleUtil from './style-util.js';\nimport * as RX from './common-regex.js';\nimport StyleInfo from './style-info.js';\n\n// TODO: dedupe with shady\n/**\n * @param {string} selector\n * @return {boolean}\n * @this {Element}\n */\nconst matchesSelector = function (selector) {\n const method =\n this.matches ||\n this.matchesSelector ||\n this.mozMatchesSelector ||\n this.msMatchesSelector ||\n this.oMatchesSelector ||\n this.webkitMatchesSelector;\n return method && method.call(this, selector);\n};\n\nconst rootSelector = /:host\\s*>\\s*/;\n\nfunction checkRoot(hostScope, selector) {\n return (\n Boolean(selector.match(rootSelector)) ||\n (hostScope === 'html' && selector.indexOf('html') > -1)\n );\n}\n\nconst IS_IE = navigator.userAgent.match('Trident');\n\nconst XSCOPE_NAME = 'x-scope';\n\nclass StyleProperties {\n /** @return {string} */\n get XSCOPE_NAME() {\n return XSCOPE_NAME;\n }\n /**\n * decorates styles with rule info and returns an array of used style property names\n *\n * @param {StyleNode} rules\n * @return {!Array<string>}\n */\n decorateStyles(rules) {\n let self = this,\n props = {},\n keyframes = [],\n ruleIndex = 0;\n StyleUtil.forEachRule(\n rules,\n function (rule) {\n self.decorateRule(rule);\n // mark in-order position of ast rule in styles block, used for cache key\n rule.index = ruleIndex++;\n self.collectPropertiesInCssText(rule.propertyInfo.cssText, props);\n },\n function onKeyframesRule(rule) {\n keyframes.push(rule);\n }\n );\n // Cache all found keyframes rules for later reference:\n rules._keyframes = keyframes;\n // return this list of property names *consumes* in these styles.\n let names = [];\n for (let i in props) {\n names.push(i);\n }\n return names;\n }\n\n // decorate a single rule with property info\n decorateRule(rule) {\n if (rule.propertyInfo) {\n return rule.propertyInfo;\n }\n let info = {},\n properties = {};\n let hasProperties = this.collectProperties(rule, properties);\n if (hasProperties) {\n info.properties = properties;\n // TODO(sorvell): workaround parser seeing mixins as additional rules\n rule['rules'] = null;\n }\n info.cssText = this.collectCssText(rule);\n rule.propertyInfo = info;\n return info;\n }\n\n // collects the custom properties from a rule's cssText\n collectProperties(rule, properties) {\n let info = rule.propertyInfo;\n if (info) {\n if (info.properties) {\n Object.assign(properties, info.properties);\n return true;\n }\n } else {\n let m,\n rx = RX.VAR_ASSIGN;\n let cssText = rule['parsedCssText'];\n let value;\n let any;\n while ((m = rx.exec(cssText))) {\n // note: group 2 is var, 3 is mixin\n value = (m[2] || m[3]).trim();\n // value of 'inherit' or 'unset' is equivalent to not setting the property here\n if (value !== 'inherit' || value !== 'unset') {\n properties[m[1].trim()] = value;\n }\n any = true;\n }\n return any;\n }\n }\n\n // returns cssText of properties that consume variables/mixins\n collectCssText(rule) {\n return this.collectConsumingCssText(rule['parsedCssText']);\n }\n\n // NOTE: we support consumption inside mixin assignment\n // but not production, so strip out {...}\n collectConsumingCssText(cssText) {\n return cssText.replace(RX.BRACKETED, '').replace(RX.VAR_ASSIGN, '');\n }\n\n collectPropertiesInCssText(cssText, props) {\n let m;\n while ((m = RX.VAR_CONSUMED.exec(cssText))) {\n let name = m[1];\n // This regex catches all variable names, and following non-whitespace char\n // If next char is not ':', then variable is a consumer\n if (m[2] !== ':') {\n props[name] = true;\n }\n }\n }\n\n // turns custom properties into realized values.\n reify(props) {\n // big perf optimization here: reify only *own* properties\n // since this object has __proto__ of the element's scope properties\n let names = Object.getOwnPropertyNames(props);\n for (let i = 0, n; i < names.length; i++) {\n n = names[i];\n props[n] = this.valueForProperty(props[n], props);\n }\n }\n\n // given a property value, returns the reified value\n // a property value may be:\n // (1) a literal value like: red or 5px;\n // (2) a variable value like: var(--a), var(--a, red), or var(--a, --b) or\n // var(--a, var(--b));\n // (3) a literal mixin value like { properties }. Each of these properties\n // can have values that are: (a) literal, (b) variables, (c) @apply mixins.\n valueForProperty(property, props) {\n // case (1) default\n // case (3) defines a mixin and we have to reify the internals\n if (property) {\n if (property.indexOf(';') >= 0) {\n property = this.valueForProperties(property, props);\n } else {\n // case (2) variable\n let self = this;\n let fn = function (prefix, value, fallback, suffix) {\n if (!value) {\n return prefix + suffix;\n }\n let propertyValue = self.valueForProperty(props[value], props);\n // if value is \"initial\", then the variable should be treated as unset\n if (!propertyValue || propertyValue === 'initial') {\n // fallback may be --a or var(--a) or literal\n propertyValue =\n self.valueForProperty(props[fallback] || fallback, props) ||\n fallback;\n } else if (propertyValue === 'apply-shim-inherit') {\n // CSS build will replace `inherit` with `apply-shim-inherit`\n // for use with native css variables.\n // Since we have full control, we can use `inherit` directly.\n propertyValue = 'inherit';\n }\n return prefix + (propertyValue || '') + suffix;\n };\n property = StyleUtil.processVariableAndFallback(property, fn);\n }\n }\n return (property && property.trim()) || '';\n }\n\n // note: we do not yet support mixin within mixin\n valueForProperties(property, props) {\n let parts = property.split(';');\n for (let i = 0, p, m; i < parts.length; i++) {\n if ((p = parts[i])) {\n RX.MIXIN_MATCH.lastIndex = 0;\n m = RX.MIXIN_MATCH.exec(p);\n if (m) {\n p = this.valueForProperty(props[m[1]], props);\n } else {\n let colon = p.indexOf(':');\n if (colon !== -1) {\n let pp = p.substring(colon);\n pp = pp.trim();\n pp = this.valueForProperty(pp, props) || pp;\n p = p.substring(0, colon) + pp;\n }\n }\n parts[i] =\n p && p.lastIndexOf(';') === p.length - 1\n ? p.slice(0, -1) // strip trailing ;\n : p || '';\n }\n }\n return parts.join(';');\n }\n\n applyProperties(rule, props) {\n let output = '';\n // dynamically added sheets may not be decorated so ensure they are.\n if (!rule.propertyInfo) {\n this.decorateRule(rule);\n }\n if (rule.propertyInfo.cssText) {\n output = this.valueForProperties(rule.propertyInfo.cssText, props);\n }\n rule['cssText'] = output;\n }\n\n // Apply keyframe transformations to the cssText of a given rule. The\n // keyframeTransforms object is a map of keyframe names to transformer\n // functions which take in cssText and spit out transformed cssText.\n applyKeyframeTransforms(rule, keyframeTransforms) {\n let input = rule['cssText'];\n let output = rule['cssText'];\n if (rule.hasAnimations == null) {\n // Cache whether or not the rule has any animations to begin with:\n rule.hasAnimations = RX.ANIMATION_MATCH.test(input);\n }\n // If there are no animations referenced, we can skip transforms:\n if (rule.hasAnimations) {\n let transform;\n // If we haven't transformed this rule before, we iterate over all\n // transforms:\n if (rule.keyframeNamesToTransform == null) {\n rule.keyframeNamesToTransform = [];\n for (let keyframe in keyframeTransforms) {\n transform = keyframeTransforms[keyframe];\n output = transform(input);\n // If the transform actually changed the CSS text, we cache the\n // transform name for future use:\n if (input !== output) {\n input = output;\n rule.keyframeNamesToTransform.push(keyframe);\n }\n }\n } else {\n // If we already have a list of keyframe names that apply to this\n // rule, we apply only those keyframe name transforms:\n for (let i = 0; i < rule.keyframeNamesToTransform.length; ++i) {\n transform = keyframeTransforms[rule.keyframeNamesToTransform[i]];\n input = transform(input);\n }\n output = input;\n }\n }\n rule['cssText'] = output;\n }\n\n // Test if the rules in these styles matches the given `element` and if so,\n // collect any custom properties into `props`.\n /**\n * @param {StyleNode} rules\n * @param {Element} element\n */\n propertyDataFromStyles(rules, element) {\n let props = {};\n // generates a unique key for these matches\n let o = [];\n // note: active rules excludes non-matching @media rules\n StyleUtil.forEachRule(\n rules,\n (rule) => {\n // TODO(sorvell): we could trim the set of rules at declaration\n // time to only include ones that have properties\n if (!rule.propertyInfo) {\n this.decorateRule(rule);\n }\n // match element against transformedSelector: selector may contain\n // unwanted uniquification and parsedSelector does not directly match\n // for :host selectors.\n let selectorToMatch =\n rule.transformedSelector || rule['parsedSelector'];\n if (element && rule.propertyInfo.properties && selectorToMatch) {\n if (matchesSelector.call(element, selectorToMatch)) {\n this.collectProperties(rule, props);\n // produce numeric key for these matches for lookup\n addToBitMask(rule.index, o);\n }\n }\n },\n null,\n true\n );\n return {properties: props, key: o};\n }\n\n /**\n * @param {Element} scope\n * @param {StyleNode} rule\n * @param {string} cssBuild\n * @param {function(Object)} callback\n */\n whenHostOrRootRule(scope, rule, cssBuild, callback) {\n if (!(/** @type {?} */ (rule.propertyInfo))) {\n this.decorateRule(rule);\n }\n if (!(/** @type {?} */ (rule.propertyInfo).properties)) {\n return;\n }\n let {is, typeExtension} = StyleUtil.getIsExtends(scope);\n let hostScope = is\n ? StyleTransformer._calcHostScope(is, typeExtension)\n : 'html';\n let parsedSelector = rule['parsedSelector'];\n let isRoot = checkRoot(hostScope, parsedSelector);\n let isHost = parsedSelector.indexOf(':host') === 0 && !isRoot;\n // build info is either in scope (when scope is an element) or in the style\n // when scope is the default scope; note: this allows default scope to have\n // mixed mode built and unbuilt styles.\n if (cssBuild === 'shady') {\n // :root -> x-foo > *.x-foo for elements and html for custom-style\n isRoot =\n parsedSelector === hostScope + ' > *.' + hostScope ||\n parsedSelector.indexOf('html') !== -1;\n // :host -> x-foo for elements, but sub-rules have .x-foo in them\n isHost = !isRoot && parsedSelector.indexOf(hostScope) === 0;\n }\n if (!isRoot && !isHost) {\n return;\n }\n let selectorToMatch = hostScope;\n if (isHost) {\n // need to transform :host because `:host` does not work with `matches`\n if (!(/** @type {?} */ (rule.transformedSelector))) {\n // transform :host into a matchable selector\n rule.transformedSelector = StyleTransformer._transformRuleCss(\n rule,\n StyleTransformer._transformComplexSelector,\n StyleTransformer._calcElementScope(is),\n hostScope\n );\n }\n selectorToMatch =\n /** @type {?} */ (rule.transformedSelector) || hostScope;\n }\n if (isRoot && hostScope === 'html') {\n selectorToMatch =\n /** @type {?} */ (rule.transformedSelector) ||\n /** @type {?} */ (rule.parsedSelector);\n }\n callback({\n selector: selectorToMatch,\n isHost: isHost,\n isRoot: isRoot,\n });\n }\n /**\n * @param {Element} scope\n * @param {StyleNode} rules\n * @param {string} cssBuild\n * @return {!Object}\n */\n hostAndRootPropertiesForScope(scope, rules, cssBuild) {\n let hostProps = {},\n rootProps = {};\n // note: active rules excludes non-matching @media rules\n StyleUtil.forEachRule(\n rules,\n (rule) => {\n // if scope is StyleDefaults, use _element for matchesSelector\n this.whenHostOrRootRule(scope, rule, cssBuild, (info) => {\n let element = scope._element || scope;\n if (matchesSelector.call(element, info.selector)) {\n if (info.isHost) {\n this.collectProperties(rule, hostProps);\n } else {\n this.collectProperties(rule, rootProps);\n }\n }\n });\n },\n null,\n true\n );\n return {rootProps: rootProps, hostProps: hostProps};\n }\n\n /**\n * @param {Element} element\n * @param {Object} properties\n * @param {string} scopeSelector\n */\n transformStyles(element, properties, scopeSelector) {\n let self = this;\n let {is, typeExtension} = StyleUtil.getIsExtends(element);\n let hostSelector = StyleTransformer._calcHostScope(is, typeExtension);\n let rxHostSelector = element.extends\n ? '\\\\' + hostSelector.slice(0, -1) + '\\\\]'\n : hostSelector;\n let hostRx = new RegExp(RX.HOST_PREFIX + rxHostSelector + RX.HOST_SUFFIX);\n let {styleRules: rules, cssBuild} = StyleInfo.get(element);\n let keyframeTransforms = this._elementKeyframeTransforms(\n element,\n rules,\n scopeSelector\n );\n return StyleTransformer.elementStyles(\n element,\n rules,\n function (rule) {\n self.applyProperties(rule, properties);\n if (\n !nativeShadow &&\n !StyleUtil.isKeyframesSelector(rule) &&\n rule['cssText']\n ) {\n // NOTE: keyframe transforms only scope munge animation names, so it\n // is not necessary to apply them in ShadowDOM.\n self.applyKeyframeTransforms(rule, keyframeTransforms);\n self._scopeSelector(rule, hostRx, hostSelector, scopeSelector);\n }\n },\n cssBuild\n );\n }\n\n /**\n * @param {Element} element\n * @param {StyleNode} rules\n * @param {string} scopeSelector\n * @return {!Object}\n */\n _elementKeyframeTransforms(element, rules, scopeSelector) {\n let keyframesRules = rules._keyframes;\n let keyframeTransforms = {};\n if (!nativeShadow && keyframesRules) {\n // For non-ShadowDOM, we transform all known keyframes rules in\n // advance for the current scope. This allows us to catch keyframes\n // rules that appear anywhere in the stylesheet:\n for (\n let i = 0, keyframesRule = keyframesRules[i];\n i < keyframesRules.length;\n keyframesRule = keyframesRules[++i]\n ) {\n this._scopeKeyframes(keyframesRule, scopeSelector);\n keyframeTransforms[\n keyframesRule['keyframesName']\n ] = this._keyframesRuleTransformer(keyframesRule);\n }\n }\n return keyframeTransforms;\n }\n\n // Generate a factory for transforming a chunk of CSS text to handle a\n // particular scoped keyframes rule.\n /**\n * @param {StyleNode} keyframesRule\n * @return {function(string):string}\n */\n _keyframesRuleTransformer(keyframesRule) {\n return function (cssText) {\n return cssText.replace(\n /** @type {?} */ (keyframesRule.keyframesNameRx),\n /** @type {?} */ (keyframesRule.transformedKeyframesName)\n );\n };\n }\n\n /**\n * Transforms `@keyframes` names to be unique for the current host.\n * Example: @keyframes foo-anim -> @keyframes foo-anim-x-foo-0\n *\n * @param {StyleNode} rule\n * @param {string} scopeId\n */\n _scopeKeyframes(rule, scopeId) {\n // Animation names are of the form [\\w-], so ensure that the name regex does not partially apply\n // to similarly named keyframe names by checking for a word boundary at the beginning and\n // a non-word boundary or `-` at the end.\n rule.keyframesNameRx = new RegExp(\n `\\\\b${rule['keyframesName']}(?!\\\\B|-)`,\n 'g'\n );\n rule.transformedKeyframesName = rule['keyframesName'] + '-' + scopeId;\n rule.transformedSelector =\n /** @type {?} */ (rule.transformedSelector) || rule['selector'];\n rule['selector'] = /** @type {?} */ (rule.transformedSelector).replace(\n rule['keyframesName'],\n rule.transformedKeyframesName\n );\n }\n\n // Strategy: x scope shim a selector e.g. to scope `.x-foo-42` (via classes):\n // non-host selector: .a.x-foo -> .x-foo-42 .a.x-foo\n // host selector: x-foo.wide -> .x-foo-42.wide\n // note: we use only the scope class (.x-foo-42) and not the hostSelector\n // (x-foo) to scope :host rules; this helps make property host rules\n // have low specificity. They are overrideable by class selectors but,\n // unfortunately, not by type selectors (e.g. overriding via\n // `.special` is ok, but not by `x-foo`).\n /**\n * @param {StyleNode} rule\n * @param {RegExp} hostRx\n * @param {string} hostSelector\n * @param {string} scopeId\n */\n _scopeSelector(rule, hostRx, hostSelector, scopeId) {\n rule.transformedSelector =\n /** @type {?} */ (rule.transformedSelector) || rule['selector'];\n let selector = rule.transformedSelector;\n let scope = '.' + scopeId;\n let parts = StyleUtil.splitSelectorList(selector);\n for (let i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {\n parts[i] = p.match(hostRx)\n ? p.replace(hostSelector, scope)\n : scope + ' ' + p;\n }\n rule['selector'] = parts.join(',');\n }\n\n /**\n * @param {Element} element\n * @param {string} selector\n * @param {string} old\n */\n applyElementScopeSelector(element, selector, old) {\n let c = element.getAttribute('class') || '';\n let v = c;\n if (old) {\n v = c.replace(\n new RegExp('\\\\s*' + XSCOPE_NAME + '\\\\s*' + old + '\\\\s*', 'g'),\n ' '\n );\n }\n v += (v ? ' ' : '') + XSCOPE_NAME + ' ' + selector;\n if (c !== v) {\n StyleUtil.setElementClassRaw(element, v);\n }\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Object} properties\n * @param {string} selector\n * @param {HTMLStyleElement} style\n * @return {HTMLStyleElement}\n */\n applyElementStyle(element, properties, selector, style) {\n // calculate cssText to apply\n let cssText = style\n ? style.textContent || ''\n : this.transformStyles(element, properties, selector);\n // if shady and we have a cached style that is not style, decrement\n let styleInfo = StyleInfo.get(element);\n let s = styleInfo.customStyle;\n if (s && !nativeShadow && s !== style) {\n s['_useCount']--;\n if (s['_useCount'] <= 0 && s.parentNode) {\n s.parentNode.removeChild(s);\n }\n }\n // apply styling always under native or if we generated style\n // or the cached style is not in document(!)\n if (nativeShadow) {\n // update existing style only under native\n if (styleInfo.customStyle) {\n styleInfo.customStyle.textContent = cssText;\n style = styleInfo.customStyle;\n // otherwise, if we have css to apply, do so\n } else if (cssText) {\n // apply css after the scope style of the element to help with\n // style precedence rules.\n style = StyleUtil.applyCss(\n cssText,\n selector,\n element.shadowRoot,\n styleInfo.placeholder\n );\n }\n } else {\n // shady and no cache hit\n if (!style) {\n // apply css after the scope style of the element to help with\n // style precedence rules.\n if (cssText) {\n style = StyleUtil.applyCss(\n cssText,\n selector,\n null,\n styleInfo.placeholder\n );\n }\n // shady and cache hit but not in document\n } else if (!style.parentNode) {\n if (IS_IE && cssText.indexOf('@media') > -1) {\n // @media rules may be stale in IE 10 and 11\n // refresh the text content of the style to revalidate them.\n style.textContent = cssText;\n }\n StyleUtil.applyStyle(style, null, styleInfo.placeholder);\n }\n }\n // ensure this style is our custom style and increment its use count.\n if (style) {\n style['_useCount'] = style['_useCount'] || 0;\n // increment use count if we changed styles\n if (styleInfo.customStyle != style) {\n style['_useCount']++;\n }\n styleInfo.customStyle = style;\n }\n return style;\n }\n\n /**\n * @param {Element} style\n * @param {Object} properties\n */\n applyCustomStyle(style, properties) {\n let rules = StyleUtil.rulesForStyle(\n /** @type {HTMLStyleElement} */ (style)\n );\n let self = this;\n style.textContent = StyleUtil.toCssText(rules, function (\n /** StyleNode */ rule\n ) {\n let css = (rule['cssText'] = rule['parsedCssText']);\n if (\n /** @type {?} */ (rule.propertyInfo) &&\n /** @type {?} */ (rule.propertyInfo).cssText\n ) {\n // remove property assignments\n // so next function isn't confused\n // NOTE: we have 3 categories of css:\n // (1) normal properties,\n // (2) custom property assignments (--foo: red;),\n // (3) custom property usage: border: var(--foo); @apply(--foo);\n // In elements, 1 and 3 are separated for efficiency; here they\n // are not and this makes this case unique.\n css = removeCustomPropAssignment(/** @type {string} */ (css));\n // replace with reified properties, scenario is same as mixin\n rule['cssText'] = self.valueForProperties(css, properties);\n }\n });\n }\n}\n\n/**\n * @param {number} n\n * @param {Array<number>} bits\n */\nfunction addToBitMask(n, bits) {\n let o = parseInt(n / 32, 10);\n let v = 1 << n % 32;\n bits[o] = (bits[o] || 0) | v;\n}\n\nexport default new StyleProperties();\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {StyleNode} from './css-parse.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n/** @const {string} */\nconst infoKey = '__styleInfo';\n\nexport default class StyleInfo {\n /**\n * @param {Element} node\n * @return {StyleInfo}\n */\n static get(node) {\n if (node) {\n return node[infoKey];\n } else {\n return null;\n }\n }\n /**\n * @param {!Element} node\n * @param {StyleInfo} styleInfo\n * @return {StyleInfo}\n */\n static set(node, styleInfo) {\n node[infoKey] = styleInfo;\n return styleInfo;\n }\n /**\n * @param {StyleNode} ast\n * @param {Node=} placeholder\n * @param {Array<string>=} ownStylePropertyNames\n * @param {string=} elementName\n * @param {string=} typeExtension\n * @param {string=} cssBuild\n */\n constructor(\n ast,\n placeholder,\n ownStylePropertyNames,\n elementName,\n typeExtension,\n cssBuild\n ) {\n /** @type {StyleNode} */\n this.styleRules = ast || null;\n /** @type {Node} */\n this.placeholder = placeholder || null;\n /** @type {!Array<string>} */\n this.ownStylePropertyNames = ownStylePropertyNames || [];\n /** @type {Object} */\n this.overrideStyleProperties = null;\n /** @type {string} */\n this.elementName = elementName || '';\n /** @type {string} */\n this.cssBuild = cssBuild || '';\n /** @type {string} */\n this.typeExtension = typeExtension || '';\n /** @type {Object<string, string>} */\n this.styleProperties = null;\n /** @type {?string} */\n this.scopeSelector = null;\n /** @type {HTMLStyleElement} */\n this.customStyle = null;\n }\n _getStyleRules() {\n return this.styleRules;\n }\n}\n\n/* eslint-disable-next-line no-self-assign */\nStyleInfo.prototype['_getStyleRules'] = StyleInfo.prototype._getStyleRules;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {applyStylePlaceHolder} from './style-util.js';\nimport {nativeShadow, disableRuntime} from './style-settings.js';\n\n/** @type {!Object<string, !Node>} */\nconst placeholderMap = {};\n\n/**\n * @param {string} elementName\n * @return {Node}\n */\nexport function getStylePlaceholder(elementName) {\n return placeholderMap[elementName] || null;\n}\n\n/**\n * @param {string} elementName\n */\nexport function ensureStylePlaceholder(elementName) {\n if (!placeholderMap[elementName]) {\n placeholderMap[elementName] = applyStylePlaceHolder(elementName);\n }\n}\n\n/**\n * @const {CustomElementRegistry}\n */\nconst ce = window['customElements'];\nif (ce && !nativeShadow && !disableRuntime) {\n /**\n * @const {function(this:CustomElementRegistry, string,function(new:HTMLElement),{extends: string}=)}\n */\n const origDefine = ce['define'];\n /**\n * @param {string} name\n * @param {function(new:HTMLElement)} clazz\n * @param {{extends: string}=} options\n */\n const wrappedDefine = (name, clazz, options) => {\n ensureStylePlaceholder(name);\n origDefine.call(\n /** @type {!CustomElementRegistry} */ (ce),\n name,\n clazz,\n options\n );\n };\n ce['define'] = wrappedDefine;\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n'use strict';\n\nexport default class StyleCache {\n constructor(typeMax = 100) {\n // map element name -> [{properties, styleElement, scopeSelector}]\n this.cache = {};\n /** @type {number} */\n this.typeMax = typeMax;\n }\n\n _validate(cacheEntry, properties, ownPropertyNames) {\n for (let idx = 0; idx < ownPropertyNames.length; idx++) {\n let pn = ownPropertyNames[idx];\n if (cacheEntry.properties[pn] !== properties[pn]) {\n return false;\n }\n }\n return true;\n }\n\n store(tagname, properties, styleElement, scopeSelector) {\n let list = this.cache[tagname] || [];\n list.push({properties, styleElement, scopeSelector});\n if (list.length > this.typeMax) {\n list.shift();\n }\n this.cache[tagname] = list;\n }\n\n fetch(tagname, properties, ownPropertyNames) {\n let list = this.cache[tagname];\n if (!list) {\n return;\n }\n // reverse list for most-recent lookups\n for (let idx = list.length - 1; idx >= 0; idx--) {\n let entry = list[idx];\n if (this._validate(entry, properties, ownPropertyNames)) {\n return entry;\n }\n }\n }\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\n/**\n * @const {!Object<string, !HTMLTemplateElement>}\n */\nconst templateMap = {};\nexport default templateMap;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\nimport templateMap from './template-map.js';\nimport {StyleNode} from './css-parse.js'; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n/*\n * Utilities for handling invalidating apply-shim mixins for a given template.\n *\n * The invalidation strategy involves keeping track of the \"current\" version of a template's mixins, and updating that count when a mixin is invalidated.\n * The template\n */\n\n/** @const {string} */\nconst CURRENT_VERSION = '_applyShimCurrentVersion';\n\n/** @const {string} */\nconst NEXT_VERSION = '_applyShimNextVersion';\n\n/** @const {string} */\nconst VALIDATING_VERSION = '_applyShimValidatingVersion';\n\n/**\n * @const {Promise<void>}\n */\nconst promise = Promise.resolve();\n\n/**\n * @param {string} elementName\n */\nexport function invalidate(elementName) {\n let template = templateMap[elementName];\n if (template) {\n invalidateTemplate(template);\n }\n}\n\n/**\n * This function can be called multiple times to mark a template invalid\n * and signal that the style inside must be regenerated.\n *\n * Use `startValidatingTemplate` to begin an asynchronous validation cycle.\n * During that cycle, call `templateIsValidating` to see if the template must\n * be revalidated\n * @param {HTMLTemplateElement} template\n */\nexport function invalidateTemplate(template) {\n // default the current version to 0\n template[CURRENT_VERSION] = template[CURRENT_VERSION] || 0;\n // ensure the \"validating for\" flag exists\n template[VALIDATING_VERSION] = template[VALIDATING_VERSION] || 0;\n // increment the next version\n template[NEXT_VERSION] = (template[NEXT_VERSION] || 0) + 1;\n}\n\n/**\n * @param {string} elementName\n * @return {boolean}\n */\nexport function isValid(elementName) {\n let template = templateMap[elementName];\n if (template) {\n return templateIsValid(template);\n }\n return true;\n}\n\n/**\n * @param {HTMLTemplateElement} template\n * @return {boolean}\n */\nexport function templateIsValid(template) {\n return template[CURRENT_VERSION] === template[NEXT_VERSION];\n}\n\n/**\n * @param {string} elementName\n * @return {boolean}\n */\nexport function isValidating(elementName) {\n let template = templateMap[elementName];\n if (template) {\n return templateIsValidating(template);\n }\n return false;\n}\n\n/**\n * Returns true if the template is currently invalid and `startValidating` has been called since the last invalidation.\n * If false, the template must be validated.\n * @param {HTMLTemplateElement} template\n * @return {boolean}\n */\nexport function templateIsValidating(template) {\n return (\n !templateIsValid(template) &&\n template[VALIDATING_VERSION] === template[NEXT_VERSION]\n );\n}\n\n/**\n * the template is marked as `validating` for one microtask so that all instances\n * found in the tree crawl of `applyStyle` will update themselves,\n * but the template will only be updated once.\n * @param {string} elementName\n */\nexport function startValidating(elementName) {\n let template = templateMap[elementName];\n startValidatingTemplate(template);\n}\n\n/**\n * Begin an asynchronous invalidation cycle.\n * This should be called after every validation of a template\n *\n * After one microtask, the template will be marked as valid until the next call to `invalidateTemplate`\n * @param {HTMLTemplateElement} template\n */\nexport function startValidatingTemplate(template) {\n // remember that the current \"next version\" is the reason for this validation cycle\n template[VALIDATING_VERSION] = template[NEXT_VERSION];\n // however, there only needs to be one async task to clear the counters\n if (!template._validating) {\n template._validating = true;\n promise.then(function () {\n // sync the current version to let future invalidations cause a refresh cycle\n template[CURRENT_VERSION] = template[NEXT_VERSION];\n template._validating = false;\n });\n }\n}\n\n/**\n * @return {boolean}\n */\nexport function elementsAreInvalid() {\n for (let elementName in templateMap) {\n let template = templateMap[elementName];\n if (!templateIsValid(template)) {\n return true;\n }\n }\n return false;\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {MIXIN_MATCH, VAR_ASSIGN} from './common-regex.js';\n\n/**\n * @param {Element} element\n * @param {Object=} properties\n */\nexport function updateNativeProperties(element, properties) {\n // remove previous properties\n for (let p in properties) {\n // NOTE: for bc with shim, don't apply null values.\n if (p === null) {\n element.style.removeProperty(p);\n } else {\n element.style.setProperty(p, properties[p]);\n }\n }\n}\n\n/**\n * @param {Element} element\n * @param {string} property\n * @return {string}\n */\nexport function getComputedStyleValue(element, property) {\n /**\n * @const {string}\n */\n const value = window.getComputedStyle(element).getPropertyValue(property);\n if (!value) {\n return '';\n } else {\n return value.trim();\n }\n}\n\n/**\n * return true if `cssText` contains a mixin definition or consumption\n * @param {string} cssText\n * @return {boolean}\n */\nexport function detectMixin(cssText) {\n const has = MIXIN_MATCH.test(cssText) || VAR_ASSIGN.test(cssText);\n // reset state of the regexes\n MIXIN_MATCH.lastIndex = 0;\n VAR_ASSIGN.lastIndex = 0;\n return has;\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport ScopingShim from '../src/scoping-shim.js';\n// prettier-ignore\nimport {nativeCssVariables, nativeShadow, cssBuild, disableRuntime} from '../src/style-settings.js';\n\n/** @const {ScopingShim} */\nconst scopingShim = new ScopingShim();\n\nlet ApplyShim, CustomStyleInterface;\n\nif (window['ShadyCSS']) {\n ApplyShim = window['ShadyCSS']['ApplyShim'];\n CustomStyleInterface = window['ShadyCSS']['CustomStyleInterface'];\n}\n\nwindow.ShadyCSS = {\n ScopingShim: scopingShim,\n /**\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n * @param {string=} elementExtends\n */\n prepareTemplate(template, elementName, elementExtends) {\n scopingShim.flushCustomStyles();\n scopingShim.prepareTemplate(template, elementName, elementExtends);\n },\n\n /**\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n */\n prepareTemplateDom(template, elementName) {\n scopingShim.prepareTemplateDom(template, elementName);\n },\n\n /**\n * @param {!HTMLTemplateElement} template\n * @param {string} elementName\n * @param {string=} elementExtends\n */\n prepareTemplateStyles(template, elementName, elementExtends) {\n scopingShim.flushCustomStyles();\n scopingShim.prepareTemplateStyles(template, elementName, elementExtends);\n },\n /**\n * @param {!HTMLElement} element\n * @param {Object=} properties\n */\n styleSubtree(element, properties) {\n scopingShim.flushCustomStyles();\n scopingShim.styleSubtree(element, properties);\n },\n\n /**\n * @param {!HTMLElement} element\n */\n styleElement(element) {\n scopingShim.flushCustomStyles();\n scopingShim.styleElement(element);\n },\n\n /**\n * @param {Object=} properties\n */\n styleDocument(properties) {\n scopingShim.flushCustomStyles();\n scopingShim.styleDocument(properties);\n },\n\n flushCustomStyles() {\n scopingShim.flushCustomStyles();\n },\n\n /**\n * @param {Element} element\n * @param {string} property\n * @return {string}\n */\n getComputedStyleValue(element, property) {\n return scopingShim.getComputedStyleValue(element, property);\n },\n\n nativeCss: nativeCssVariables,\n\n nativeShadow: nativeShadow,\n\n cssBuild: cssBuild,\n\n disableRuntime: disableRuntime,\n};\n\nif (ApplyShim) {\n window.ShadyCSS.ApplyShim = ApplyShim;\n}\n\nif (CustomStyleInterface) {\n window.ShadyCSS.CustomStyleInterface = CustomStyleInterface;\n}\n","/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n\n/** @type {boolean|undefined} */\nWindow.prototype.forceJURL = false;\n\n(function (scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope.forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n hasWorkingUrl = u.href === 'http://a/c%20d';\n } catch (e) {} // eslint-disable-line no-empty\n }\n\n if (hasWorkingUrl) {\n return;\n }\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this);\n }\n // XXX\n return h.toLowerCase();\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (\n unicode > 0x20 &&\n unicode < 0x7f &&\n // \" # < > ? `\n [0x22, 0x23, 0x3c, 0x3e, 0x3f, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (\n unicode > 0x20 &&\n unicode < 0x7f &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3c, 0x3e, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9+\\-.]/;\n\n /**\n * @param {!string} input\n * @param {?string=} stateOverride\n * @param {(URL|string)=} base\n */\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message);\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while (\n (input[cursor - 1] != EOF || cursor == 0) &&\n !this._isInvalid\n ) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (\n this._isRelative &&\n base &&\n base._scheme == this._scheme\n ) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c);\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !isRelativeScheme(base._scheme)) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor + 1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme) {\n this._scheme = base._scheme;\n }\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._username = base._username;\n this._password = base._password;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n this._username = base._username;\n this._password = base._password;\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n this._username = base._username;\n this._password = base._password;\n state = 'fragment';\n } else {\n var nextC = input[cursor + 1];\n var nextNextC = input[cursor + 2];\n if (\n 'file' != this._scheme ||\n !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC &&\n '/' != nextNextC &&\n '\\\\' != nextNextC &&\n '?' != nextNextC &&\n '#' != nextNextC)\n ) {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n null !== this._password\n ? (this._password += tempC)\n : (this._username += tempC);\n }\n buffer = '';\n } else if (\n EOF == c ||\n '/' == c ||\n '\\\\' == c ||\n '?' == c ||\n '#' == c\n ) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (\n buffer.length == 2 &&\n ALPHA.test(buffer[0]) &&\n (buffer[1] == ':' || buffer[1] == '|')\n ) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (\n EOF == c ||\n '/' == c ||\n '\\\\' == c ||\n '?' == c ||\n '#' == c\n ) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (\n EOF == c ||\n '/' == c ||\n '\\\\' == c ||\n '?' == c ||\n '#' == c ||\n stateOverride\n ) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c) {\n err(\"'\\\\' not allowed in path.\");\n }\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (\n EOF == c ||\n '/' == c ||\n '\\\\' == c ||\n (!stateOverride && ('?' == c || '#' == c))\n ) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n // eslint-disable-next-line no-cond-assign\n if ((tmp = relativePathDotMapping[buffer.toLowerCase()])) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if (\n 'file' == this._scheme &&\n this._path.length == 0 &&\n buffer.length == 2 &&\n ALPHA.test(buffer[0]) &&\n buffer[1] == '|'\n ) {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n /**\n * @constructor\n * @extends {URL}\n * @param {!string} url\n * @param {(URL|string)=} base\n */\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL)) {\n base = new jURL(String(base));\n }\n\n this._url = '' + url;\n clear.call(this);\n\n var input = this._url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n toString: function () {\n return this.href;\n },\n get href() {\n if (this._isInvalid) {\n return this._url;\n }\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority =\n this._username +\n (null != this._password ? ':' + this._password : '') +\n '@';\n }\n\n return (\n this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname +\n this._query +\n this._fragment\n );\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid) {\n return;\n }\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid\n ? ''\n : this._port\n ? this._host + ':' + this._port\n : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid\n ? ''\n : this._isRelative\n ? '/' + this._path.join('/')\n : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query\n ? ''\n : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n this._query = '?';\n if ('?' == search[0]) {\n search = search.slice(1);\n }\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment\n ? ''\n : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid) {\n return;\n }\n if (!hash) {\n this._fragment = '';\n return;\n }\n this._fragment = '#';\n if ('#' == hash[0]) {\n hash = hash.slice(1);\n }\n parse.call(this, hash, 'fragment');\n },\n\n get origin() {\n var host;\n if (this._isInvalid || !this._scheme) {\n return '';\n }\n // javascript: Gecko returns String(\"\"), WebKit/Blink String(\"null\")\n // Gecko throws error for \"data://\"\n // data: Gecko returns \"\", Blink returns \"data://\", WebKit returns \"null\"\n // Gecko returns String(\"\") for file: mailto:\n // WebKit/Blink returns String(\"SCHEME://\") for file: mailto:\n switch (this._scheme) {\n case 'data':\n case 'file':\n case 'javascript':\n case 'mailto':\n return 'null';\n }\n host = this.host;\n if (!host) {\n return '';\n }\n return this._scheme + '://' + host;\n },\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n jURL['createObjectURL'] = function (blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n jURL['revokeObjectURL'] = function (url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n})(window);\n"]} |